diff options
author | jcorgan | 2009-07-30 21:54:38 +0000 |
---|---|---|
committer | jcorgan | 2009-07-30 21:54:38 +0000 |
commit | 9c31d118f7ad218d1dcd723562fe132138ab01d6 (patch) | |
tree | a2a5a6b1e27eae84b84e08fe3c398c01c3f6df5d /usrp2/fpga/top/u2_rev3_2rx_iad/impulse.v | |
parent | 5bab84be03b894b06ab939ac9bc567e3c96cf05a (diff) | |
download | gnuradio-9c31d118f7ad218d1dcd723562fe132138ab01d6.tar.gz gnuradio-9c31d118f7ad218d1dcd723562fe132138ab01d6.tar.bz2 gnuradio-9c31d118f7ad218d1dcd723562fe132138ab01d6.zip |
Add custom FPGA build.
This is a custom build for USRP2 FPGA. It allows using a BasicRX or
LFRX board and feed two independent, real signals. In addition, instead
of the CIC/HB decimator, which optimizes frequency response, it uses an
integrate and dump decimator, which optimizes for time-domain impulse
response.
These changes have been made in dsp_core_rx.v:
* A second DDC has been added, sharing a frequency register with
the existing DDC.
* The output of the two DDCs are interleaved as I1 Q1 I2 Q2I ...
into the receive FIFO. This limits the host configured decimation
to 8 intead of 4. Use gr.deinterleave to recover the streams.
* The ADCs are hardcoded:
RX_A ==> DDC #1 I-input
0 ==> DDC #1 Q-input
RX_B ==> DDC #2 I-input
0 ==> DDC #2 Q-input
Thus, the input mux has been disabled.
* The CIC/HB decimator has been replaced by an integrate and dump at
the decimation rate.
* To assist with meeting timing, the external RAM has been disabled.
The basic application is to coherently sample two real IF streams and
downconvert to baseband, while minimizing the impulse response duration
of the resampling filters.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11519 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'usrp2/fpga/top/u2_rev3_2rx_iad/impulse.v')
-rw-r--r-- | usrp2/fpga/top/u2_rev3_2rx_iad/impulse.v | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/usrp2/fpga/top/u2_rev3_2rx_iad/impulse.v b/usrp2/fpga/top/u2_rev3_2rx_iad/impulse.v new file mode 100644 index 000000000..fc5e3c1ed --- /dev/null +++ b/usrp2/fpga/top/u2_rev3_2rx_iad/impulse.v @@ -0,0 +1,68 @@ +module impulse + (input clk, + input rst, + input ena, + + input [13:0] dc_offset_a, + input [13:0] dc_offset_b, + input [13:0] amplitude, + input [15:0] impulse_len, + input [15:0] zero_len, + + output [13:0] adc_a, + output [13:0] adc_b, + output adc_ovf_a, + output adc_ovf_b + ); + + reg [13:0] adc_a_int = 0; + reg [13:0] adc_b_int = 0; + + reg [15:0] count; + + localparam ST_ZERO = 0; + localparam ST_HIGH = 1; + reg state; + + always @(posedge clk) + if (rst | ~ena) + begin + adc_a_int <= 0; + adc_b_int <= 0; + count <= 0; + state <= ST_ZERO; + end + else + case(state) + ST_ZERO: + if (count == zero_len) + begin + adc_a_int <= amplitude; + adc_b_int <= amplitude >> 2; + state <= ST_HIGH; + count <= 0; + end + else + count <= count + 1; + + ST_HIGH: + if (count == impulse_len) + begin + adc_a_int <= 0; + adc_b_int <= 0; + state <= ST_ZERO; + count <= 0; + end + else + count <= count + 1; + + endcase // case (state) + + assign adc_a = adc_a_int + dc_offset_a; + assign adc_b = adc_b_int + dc_offset_b; + + // Ignore for now + assign adc_ovf_a = 0; + assign adc_ovf_b = 0; + +endmodule // impulse |