summaryrefslogtreecommitdiff
path: root/usrp2/fpga/sdr_lib
diff options
context:
space:
mode:
authoreb2008-10-15 00:42:58 +0000
committereb2008-10-15 00:42:58 +0000
commitb34e89b319f8c8144b50bfb6f98221bf776fc503 (patch)
tree848001bc711bba69c6841df483d1042703ee9a3e /usrp2/fpga/sdr_lib
parent10ac1389a1d12524f1fdc0d7cf5eef6e31c12acb (diff)
downloadgnuradio-b34e89b319f8c8144b50bfb6f98221bf776fc503.tar.gz
gnuradio-b34e89b319f8c8144b50bfb6f98221bf776fc503.tar.bz2
gnuradio-b34e89b319f8c8144b50bfb6f98221bf776fc503.zip
Added firmware support for adc_mux to handle swapping I/Q, etc.
Modified dsp_core_rx.v to swap A and B mapping so that the software thinks that the TVRX is connected to A/D A. ISE 10.1 SP3 is required to compile the FPGA successfully. SP2 is insufficient. It compiles with SP2, but the firmware doesn't load. Only the F led is one in that case. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9795 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'usrp2/fpga/sdr_lib')
-rw-r--r--usrp2/fpga/sdr_lib/dsp_core_rx.v19
1 files changed, 14 insertions, 5 deletions
diff --git a/usrp2/fpga/sdr_lib/dsp_core_rx.v b/usrp2/fpga/sdr_lib/dsp_core_rx.v
index a2569a1dc..0e4af37fb 100644
--- a/usrp2/fpga/sdr_lib/dsp_core_rx.v
+++ b/usrp2/fpga/sdr_lib/dsp_core_rx.v
@@ -56,17 +56,26 @@ module dsp_core_rx
(.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr),
.in(set_data),.out(muxctrl),.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])
- 0: adc_i <= adc_a_ofs;
- 1: adc_i <= adc_b_ofs;
+ case(muxctrl[1:0]) // The I mapping
+ 0: adc_i <= adc_b_ofs; // "the real A"
+ 1: adc_i <= adc_a_ofs;
2: adc_i <= 0;
default: adc_i <= 0;
endcase // case(muxctrl[1:0])
always @(posedge clk)
- case(muxctrl[3:2])
- 0: adc_q <= adc_b_ofs;
+ case(muxctrl[3:2]) // The Q mapping
+ 0: adc_q <= adc_b_ofs; // "the real A"
1: adc_q <= adc_a_ofs;
2: adc_q <= 0;
default: adc_q <= 0;