summaryrefslogtreecommitdiffstats
path: root/usrp2/sdr_lib
diff options
context:
space:
mode:
authorMatt Ettus <matt@ettus.com>2010-08-25 18:51:26 -0700
committerMatt Ettus <matt@ettus.com>2010-08-25 18:51:26 -0700
commit26ccb5e37fec2ace4f029c1cf0c769b475b3afd7 (patch)
treefefc4c41a8565200f611019a27bffa6e4e271bf9 /usrp2/sdr_lib
parent32d06cadd5c60e1080e6124cfd46c44a97157adf (diff)
parent9fa6105a49f41e39321438086b00ab12d8437828 (diff)
downloaduhd-26ccb5e37fec2ace4f029c1cf0c769b475b3afd7.tar.gz
uhd-26ccb5e37fec2ace4f029c1cf0c769b475b3afd7.tar.bz2
uhd-26ccb5e37fec2ace4f029c1cf0c769b475b3afd7.zip
Merge branch 'tx_policy' into u1e
* tx_policy: (21 commits) clean up DAC inversion and swapping to match schematics Clean up iq swapping on RX. It is now swapped in the top level. widened muxes to 4 bits to match tx side and handle more ADCs in future rx error context packets should not be marked as errors in the fifo added compat number to usrp2 readback mux makefile dependency fix for second expansion provide a way to get out of the error state without processor intervention sequence number reset upon programming streamid attempt at avoiding infinite error messages implemented "next packet" and "next burst" policies sequence errors can happen on start of burst as well. more informative error codes cleaner error handling introduce new error types test mux and gen_context_pkt this is an output file, it shouldn't be checked in insert protocol engine flags when requested move the streamid so it isn't at the same address as clear_state connect the demux fix a typo tx error packets now muxed into the ethernet stream back to the host ... Conflicts: usrp2/top/u2_rev3/u2_core_udp.v
Diffstat (limited to 'usrp2/sdr_lib')
-rw-r--r--usrp2/sdr_lib/dsp_core_rx.v35
1 files changed, 13 insertions, 22 deletions
diff --git a/usrp2/sdr_lib/dsp_core_rx.v b/usrp2/sdr_lib/dsp_core_rx.v
index 1e689fc7f..1318809d6 100644
--- a/usrp2/sdr_lib/dsp_core_rx.v
+++ b/usrp2/sdr_lib/dsp_core_rx.v
@@ -57,41 +57,32 @@ module dsp_core_rx
(.clk(clk),.rst(rst),.set_stb(set_stb),.set_addr(set_addr),.set_data(set_data),
.adc_in(adc_b),.adc_out(adc_b_ofs));
- wire [3:0] muxctrl;
- setting_reg #(.my_addr(BASE+5)) sr_8
+ wire [7:0] muxctrl;
+ setting_reg #(.my_addr(BASE+5), .width(8)) sr_8
(.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr),
.in(set_data),.out({UNUSED_2,muxctrl}),.changed());
wire [1:0] gpio_ena;
- setting_reg #(.my_addr(BASE+6)) sr_9
+ setting_reg #(.my_addr(BASE+6), .width(2)) sr_9
(.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr),
.in(set_data),.out({UNUSED_3,gpio_ena}),.changed());
- // The TVRX connects to what is called adc_b, thus A and B are
- // swapped throughout the design.
- //
- // In the interest of expediency and keeping the s/w sane, we just remap them here.
- // The I & Q fields are mapped the same:
- // 0 -> "the real A" (as determined by the TVRX)
- // 1 -> "the real B"
- // 2 -> const zero
-
always @(posedge clk)
- case(muxctrl[1:0]) // The I mapping
- 0: adc_i <= adc_b_ofs; // "the real A"
- 1: adc_i <= adc_a_ofs;
+ case(muxctrl[3:0]) // The I mapping
+ 0: adc_i <= adc_a_ofs;
+ 1: adc_i <= adc_b_ofs;
2: adc_i <= 0;
default: adc_i <= 0;
- endcase // case(muxctrl[1:0])
-
+ endcase // case (muxctrl[3:0])
+
always @(posedge clk)
- case(muxctrl[3:2]) // The Q mapping
- 0: adc_q <= adc_b_ofs; // "the real A"
- 1: adc_q <= adc_a_ofs;
+ case(muxctrl[7:4]) // The Q mapping
+ 0: adc_q <= adc_a_ofs;
+ 1: adc_q <= adc_b_ofs;
2: adc_q <= 0;
default: adc_q <= 0;
- endcase // case(muxctrl[3:2])
-
+ endcase // case (muxctrl[7:4])
+
always @(posedge clk)
if(rst)
phase <= 0;