diff options
author | Martin Braun <martin.braun@ettus.com> | 2021-11-22 12:09:16 +0100 |
---|---|---|
committer | Wade Fife <wade.fife@ettus.com> | 2021-12-07 12:11:35 -0600 |
commit | f23ab72129041777bcd3357a1f4e37b29e62dd86 (patch) | |
tree | 15e5464acc917a898f34dcb788a6842d59837168 /fpga/usrp3/top/x300 | |
parent | 7fb1e61a94d8e87b8ca23fafb0a31e01ebd81821 (diff) | |
download | uhd-f23ab72129041777bcd3357a1f4e37b29e62dd86.tar.gz uhd-f23ab72129041777bcd3357a1f4e37b29e62dd86.tar.bz2 uhd-f23ab72129041777bcd3357a1f4e37b29e62dd86.zip |
fpga: x300: OR ATR signals going into db_control
Before this change, only the channel 0 ATR state was sent to the
db_control module. For TwinRX, this had the disadvantage that when only
Channel 1 was used, the FP- and LED-GPIOs could not track the radio's
ATR state (e.g., no LED would light up in this case).
Note that unlike UHD 3, there is only one db_control module per slot.
There are therefore no options to map GPIOs to track the ATR state of an
individual channel.
Diffstat (limited to 'fpga/usrp3/top/x300')
-rw-r--r-- | fpga/usrp3/top/x300/x300_core.v | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fpga/usrp3/top/x300/x300_core.v b/fpga/usrp3/top/x300/x300_core.v index f4349b90a..32f0f5b5d 100644 --- a/fpga/usrp3/top/x300/x300_core.v +++ b/fpga/usrp3/top/x300/x300_core.v @@ -555,6 +555,13 @@ module x300_core #( //------------------------------------ // Daughterboard Control // ----------------------------------- + // Note: We have one db_control per slot, even though we can have up to 2 + // channels. In practice, this only affects TwinRX (and maybe some of the + // Basic- and LF-boards, depending how they're used). + // The main disadvantage in these cases is that individual channels cannot + // individually trigger GPIOs based on ATR state (i.e., we cannot tell if + // channel 0 or 1 are in a TX/RX state, we can only say that one of them is + // in such a state). localparam [7:0] SR_DB_BASE = 8'd160; localparam [7:0] RB_DB_BASE = 8'd16; @@ -570,7 +577,9 @@ module x300_core #( .clk(radio_clk), .reset(radio_rst), .set_stb(db_fe_set_stb[i]), .set_addr(db_fe_set_addr[i]), .set_data(db_fe_set_data[i]), .rb_stb(db_fe_rb_stb[i]), .rb_addr(db_fe_rb_addr[i]), .rb_data(db_fe_rb_data[i]), - .run_rx(rx_running[i*2]), .run_tx(tx_running[i*2]), + // We OR the ATR indicators from both channels + .run_rx(|{rx_running[i*2], rx_running[i*2+1]}), + .run_tx(|{tx_running[i*2], tx_running[i*2+1]}), .misc_ins(misc_ins[i]), .misc_outs(misc_outs[i]), .fp_gpio_in(fp_gpio_r_in[i]), .fp_gpio_out(fp_gpio_r_out[i]), .fp_gpio_ddr(fp_gpio_r_ddr[i]), .fp_gpio_fab(), .db_gpio_in(db_gpio_in[i]), .db_gpio_out(db_gpio_out[i]), .db_gpio_ddr(db_gpio_ddr[i]), .db_gpio_fab(), |