diff options
author | Ben Hilburn <ben.hilburn@ettus.com> | 2014-07-22 15:52:30 -0700 |
---|---|---|
committer | Ben Hilburn <ben.hilburn@ettus.com> | 2014-07-22 15:52:30 -0700 |
commit | 5a5c5b59608403eb7cd6a72ab7814a368f6c360b (patch) | |
tree | 864b24d0874fc4eb144bd8015c29eb4520b4b554 /fpga/usrp3/top/b200/b200_core.v | |
parent | fe9db33c9833e485c31b48ad8808ad4419c5138f (diff) | |
parent | b63507efb3cf1a8fa20794c452d57028e18da182 (diff) | |
download | uhd-5a5c5b59608403eb7cd6a72ab7814a368f6c360b.tar.gz uhd-5a5c5b59608403eb7cd6a72ab7814a368f6c360b.tar.bz2 uhd-5a5c5b59608403eb7cd6a72ab7814a368f6c360b.zip |
Merge branch 'maint'
Diffstat (limited to 'fpga/usrp3/top/b200/b200_core.v')
-rw-r--r-- | fpga/usrp3/top/b200/b200_core.v | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/fpga/usrp3/top/b200/b200_core.v b/fpga/usrp3/top/b200/b200_core.v index 016037688..dc8baba4f 100644 --- a/fpga/usrp3/top/b200/b200_core.v +++ b/fpga/usrp3/top/b200/b200_core.v @@ -1,5 +1,5 @@ // -// Copyright 2013 Ettus Research LLC +// Copyright 2013-14 Ettus Research LLC // @@ -78,11 +78,24 @@ module b200_core /******************************************************************* * PPS Timing stuff ******************************************************************/ - reg [1:0] int_pps_del, ext_pps_del; + + // Generate an internal PPS signal + wire int_pps; + pps_generator #(.CLK_FREQ(100000000)) pps_gen + (.clk(bus_clk), .pps(int_pps)); + + // Flop PPS signals into radio clock domain + reg [1:0] gpsdo_pps_del, ext_pps_del, int_pps_del; always @(posedge radio_clk) ext_pps_del[1:0] <= {ext_pps_del[0], pps_ext}; - always @(posedge radio_clk) int_pps_del[1:0] <= {int_pps_del[0], pps_int}; - wire pps_select; - wire pps = pps_select? ext_pps_del[1] : int_pps_del[1]; + always @(posedge radio_clk) gpsdo_pps_del[1:0] <= {gpsdo_pps_del[0], pps_int}; + always @(posedge radio_clk) int_pps_del[1:0] <= {int_pps_del[0], int_pps}; + + // PPS mux + wire [1:0] pps_select; + wire pps = (pps_select == 2'b00)? gpsdo_pps_del[1] : + (pps_select == 2'b01)? ext_pps_del[1] : + (pps_select == 2'b10)? int_pps_del[1] : + 1'b0; /******************************************************************* * Response mux Routing logic @@ -189,7 +202,7 @@ module b200_core (.clk(bus_clk), .rst(1'b0/*keep*/), .strobe(set_stb), .addr(set_addr), .in(set_data), .out(gpsdo_st), .changed()); - setting_reg #(.my_addr(SR_CORE_PPS_SEL), .awidth(8), .width(1)) sr_pps_sel + setting_reg #(.my_addr(SR_CORE_PPS_SEL), .awidth(8), .width(2)) sr_pps_sel (.clk(bus_clk), .rst(bus_rst), .strobe(set_stb), .addr(set_addr), .in(set_data), .out(pps_select), .changed()); |