From 893a1350cf5b930f019f10f71f2e1acbc1354927 Mon Sep 17 00:00:00 2001 From: Matt Ettus Date: Mon, 7 Jun 2010 15:26:25 -0700 Subject: name build directory with ISE version name --- usrp2/top/u2_rev3/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usrp2/top/u2_rev3/Makefile b/usrp2/top/u2_rev3/Makefile index 7eedf5e7f..bc3933415 100644 --- a/usrp2/top/u2_rev3/Makefile +++ b/usrp2/top/u2_rev3/Makefile @@ -29,7 +29,7 @@ ISE_HELPER := ../tcl/ise_helper.tcl ################################################## # Project Setup ################################################## -BUILD_DIR := build/ +BUILD_DIR := build-ISE$(XIL)/ export TOP_MODULE := u2_rev3 export PROJ_FILE := $(BUILD_DIR)$(TOP_MODULE).ise -- cgit v1.2.3 From 31d5fac152ad342b40b8d9f2676cfdf749cfd20e Mon Sep 17 00:00:00 2001 From: Matt Ettus Date: Mon, 7 Jun 2010 15:32:04 -0700 Subject: proper name for directory --- usrp2/top/u2_rev3/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usrp2/top/u2_rev3/Makefile b/usrp2/top/u2_rev3/Makefile index bc3933415..5eb9d9420 100644 --- a/usrp2/top/u2_rev3/Makefile +++ b/usrp2/top/u2_rev3/Makefile @@ -29,7 +29,7 @@ ISE_HELPER := ../tcl/ise_helper.tcl ################################################## # Project Setup ################################################## -BUILD_DIR := build-ISE$(XIL)/ +BUILD_DIR := build$(ISE)/ export TOP_MODULE := u2_rev3 export PROJ_FILE := $(BUILD_DIR)$(TOP_MODULE).ise -- cgit v1.2.3 From 6713a56cb6a927140505cb5c8464b23362348c9c Mon Sep 17 00:00:00 2001 From: Matt Ettus Date: Mon, 7 Jun 2010 15:37:25 -0700 Subject: report ise version in build --- usrp2/top/u2_rev3/Makefile.udp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usrp2/top/u2_rev3/Makefile.udp b/usrp2/top/u2_rev3/Makefile.udp index e445fe3b2..3be4203a8 100644 --- a/usrp2/top/u2_rev3/Makefile.udp +++ b/usrp2/top/u2_rev3/Makefile.udp @@ -29,7 +29,7 @@ ISE_HELPER := ../tcl/ise_helper.tcl ################################################## # Project Setup ################################################## -BUILD_DIR := build-udp/ +BUILD_DIR := build-udp$(ISE)/ export TOP_MODULE := u2_rev3 export PROJ_FILE := $(BUILD_DIR)$(TOP_MODULE).ise -- cgit v1.2.3 From 9560e541c641e42222d8856add3ff3409b243f17 Mon Sep 17 00:00:00 2001 From: Matt Ettus Date: Tue, 8 Jun 2010 10:34:17 -0700 Subject: allow other clock rates in vita time --- usrp2/timing/time_64bit.v | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/usrp2/timing/time_64bit.v b/usrp2/timing/time_64bit.v index 8ccde3f54..51c006962 100644 --- a/usrp2/timing/time_64bit.v +++ b/usrp2/timing/time_64bit.v @@ -13,21 +13,17 @@ module time_64bit localparam NEXT_TICKS = 1; localparam PPS_POLSRC = 2; localparam PPS_IMM = 3; + localparam TPS = 4; - localparam ROLLOVER = TICKS_PER_SEC - 1; - - reg [31:0] seconds; - reg [31:0] ticks; + reg [31:0] seconds, ticks; wire end_of_second; assign vita_time = {seconds,ticks}; - wire [31:0] next_ticks_preset; - wire [31:0] next_seconds_preset; + wire [31:0] next_ticks_preset, next_seconds_preset; + wire [31:0] ticks_per_sec_reg; wire set_on_pps_trig; reg set_on_next_pps; - wire pps_polarity; - wire set_imm; - wire pps_source; + wire pps_polarity, pps_source, set_imm; setting_reg #(.my_addr(BASE+NEXT_TICKS)) sr_next_ticks (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr), @@ -37,14 +33,18 @@ module time_64bit (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr), .in(set_data),.out(next_seconds_preset),.changed(set_on_pps_trig)); - setting_reg #(.my_addr(BASE+PPS_POLSRC)) sr_pps_polsrc + setting_reg #(.my_addr(BASE+PPS_POLSRC), .width(2)) sr_pps_polsrc (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr), .in(set_data),.out({pps_source,pps_polarity}),.changed()); - setting_reg #(.my_addr(BASE+PPS_IMM)) sr_pps_imm + setting_reg #(.my_addr(BASE+PPS_IMM), .width(1)) sr_pps_imm (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr), .in(set_data),.out(set_imm),.changed()); + setting_reg #(.my_addr(BASE+TPS), .at_reset(TICKS_PER_SEC)) sr_tps + (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr), + .in(set_data),.out(ticks_per_sec_reg),.changed()); + reg [1:0] pps_del; reg pps_reg_p, pps_reg_n, pps_reg; wire pps_edge; @@ -68,6 +68,8 @@ module time_64bit set_on_next_pps <= 1; else if(set_imm | pps_edge) set_on_next_pps <= 0; + + wire [31:0] ticks_plus_one = ticks + 1; always @(posedge clk) if(rst) @@ -80,13 +82,13 @@ module time_64bit seconds <= next_seconds_preset; ticks <= next_ticks_preset; end - else if(ticks == ROLLOVER) + else if(ticks_plus_one == ticks_per_sec_reg) begin seconds <= seconds + 1; ticks <= 0; end else - ticks <= ticks + 1; + ticks <= ticks_plus_one; assign pps_int = pps_edge; -- cgit v1.2.3