diff options
author | jcorgan | 2007-06-05 04:21:29 +0000 |
---|---|---|
committer | jcorgan | 2007-06-05 04:21:29 +0000 |
commit | e283fe844c88aa33b6bde4a7cb74f0d1c2ddbbc5 (patch) | |
tree | 0081a8487d3a4bb7a65404c2662d0a7480f50421 /gr-sounder/src/fpga/lib/sounder.v | |
parent | 389906ea28957c6d7a08b5cd43a4ac2ab0c9d24d (diff) | |
download | gnuradio-e283fe844c88aa33b6bde4a7cb74f0d1c2ddbbc5.tar.gz gnuradio-e283fe844c88aa33b6bde4a7cb74f0d1c2ddbbc5.tar.bz2 gnuradio-e283fe844c88aa33b6bde4a7cb74f0d1c2ddbbc5.zip |
Merged r5566:5676 from jcorgan/snd into trunk, with minor changes. Component gr-sounder is now complete for recording impulse responses to a file.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@5679 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-sounder/src/fpga/lib/sounder.v')
-rw-r--r-- | gr-sounder/src/fpga/lib/sounder.v | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/gr-sounder/src/fpga/lib/sounder.v b/gr-sounder/src/fpga/lib/sounder.v index 58b563448..675be8881 100644 --- a/gr-sounder/src/fpga/lib/sounder.v +++ b/gr-sounder/src/fpga/lib/sounder.v @@ -23,8 +23,8 @@ `include "../../../../usrp/firmware/include/fpga_regs_standard.v" module sounder(clk_i, saddr_i, sdata_i, s_strobe_i, - tx_strobe_i, tx_dac_i_o,tx_dac_q_o, - rx_strobe_i, rx_adc_i_i,rx_adc_q_i, + tx_strobe_o, tx_dac_i_o, tx_dac_q_o, + rx_adc_i_i,rx_adc_q_i, rx_strobe_o, rx_imp_i_o,rx_imp_q_o); // System interface @@ -34,12 +34,11 @@ module sounder(clk_i, saddr_i, sdata_i, s_strobe_i, input s_strobe_i; // Configuration bus write // Transmit subsystem - input tx_strobe_i; // Generate an transmitter output sample + output tx_strobe_o; // Generate an transmitter output sample output [13:0] tx_dac_i_o; // I channel transmitter output to DAC output [13:0] tx_dac_q_o; // Q channel transmitter output to DAC // Receive subsystem - input rx_strobe_i; // Indicates receive sample ready from ADC output rx_strobe_o; // Indicates output samples ready for Rx FIFO input [15:0] rx_adc_i_i; // I channel input from ADC interface module input [15:0] rx_adc_q_i; // Q channel input from ADC interface module @@ -53,18 +52,17 @@ module sounder(clk_i, saddr_i, sdata_i, s_strobe_i, wire loopback; wire [4:0] degree; + wire [13:0] ampl; wire [15:0] mask; - wire [15:0] len; - - setting_reg #(`FR_USER_0) sr_mode - ( .clock(clk_i),.reset(1'b0),.strobe(s_strobe_i),.addr(saddr_i),.in(sdata_i), - .out({loopback,receive,transmit,reset}) ); - - setting_reg #(`FR_USER_1) sr_lfsr_degree - ( .clock(clk_i),.reset(1'b0),.strobe(s_strobe_i),.addr(saddr_i),.in(sdata_i),.out(degree) ); - - lfsr_constants constants(.degree_i(degree),.mask_o(mask),.len_o(len)); + wire ref_strobe; + wire sum_strobe; + sounder_ctrl master(.clk_i(clk_i),.rst_i(reset),.saddr_i(saddr_i), + .sdata_i(sdata_i),.s_strobe_i(s_strobe_i), + .reset_o(reset),.transmit_o(transmit),.receive_o(receive),.loopback_o(loopback), + .degree_o(degree),.ampl_o(ampl),.mask_o(mask),.tx_strobe_o(tx_strobe_o), + .rx_strobe_o(rx_strobe_o),.sum_strobe_o(sum_strobe),.ref_strobe_o(ref_strobe)); + // Loopback implementation wire [13:0] tx_i, tx_q; wire [15:0] tx_i_ext, tx_q_ext; @@ -80,13 +78,13 @@ module sounder(clk_i, saddr_i, sdata_i, s_strobe_i, sounder_tx transmitter ( .clk_i(clk_i),.rst_i(reset),.ena_i(transmit), - .strobe_i(tx_strobe_i),.mask_i(mask), + .strobe_i(tx_strobe_o),.mask_i(mask),.ampl_i(ampl), .tx_i_o(tx_i),.tx_q_o(tx_q) ); sounder_rx receiver ( .clk_i(clk_i),.rst_i(reset),.ena_i(receive), - .rx_strobe_i(rx_strobe_i),.tx_strobe_i(tx_strobe_i),.mask_i(mask),.degree_i(degree),.len_i(len), - .rx_in_i_i(rx_i),.rx_in_q_i(rx_q),.rx_i_o(rx_imp_i_o),.rx_q_o(rx_imp_q_o), - .rx_strobe_o(rx_strobe_o),.loop_i(loopback)); + .sum_strobe_i(sum_strobe),.ref_strobe_i(ref_strobe), + .mask_i(mask),.degree_i(degree), + .rx_in_i_i(rx_i),.rx_in_q_i(rx_q),.rx_i_o(rx_imp_i_o),.rx_q_o(rx_imp_q_o)); endmodule // sounder |