commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10713 - in gnuradio/branches/developers/jcorgan/gpio2


From: jcorgan
Subject: [Commit-gnuradio] r10713 - in gnuradio/branches/developers/jcorgan/gpio2/usrp2/fpga: sdr_lib top/u2_core
Date: Mon, 30 Mar 2009 14:53:07 -0600 (MDT)

Author: jcorgan
Date: 2009-03-30 14:53:06 -0600 (Mon, 30 Mar 2009)
New Revision: 10713

Modified:
   gnuradio/branches/developers/jcorgan/gpio2/usrp2/fpga/sdr_lib/dsp_core_rx.v
   gnuradio/branches/developers/jcorgan/gpio2/usrp2/fpga/top/u2_core/u2_core.v
Log:
FPGA changes for streaming RX GPIO.  Meets timing in synthesis after adding 
pipeline stage.

Modified: 
gnuradio/branches/developers/jcorgan/gpio2/usrp2/fpga/sdr_lib/dsp_core_rx.v
===================================================================
--- gnuradio/branches/developers/jcorgan/gpio2/usrp2/fpga/sdr_lib/dsp_core_rx.v 
2009-03-30 15:34:14 UTC (rev 10712)
+++ gnuradio/branches/developers/jcorgan/gpio2/usrp2/fpga/sdr_lib/dsp_core_rx.v 
2009-03-30 20:53:06 UTC (rev 10713)
@@ -7,6 +7,8 @@
    input [13:0] adc_a, input adc_ovf_a,
    input [13:0] adc_b, input adc_ovf_b,
    
+   input [15:0] io_rx,
+
    output [31:0] sample,
    input run,
    output strobe,
@@ -56,6 +58,11 @@
      (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr),
       .in(set_data),.out(muxctrl),.changed());
 
+   wire [1:0] gpio_ena;
+   setting_reg #(.my_addr(`DSP_CORE_RX_BASE+9)) sr_9
+     (.clk(clk),.rst(rst),.strobe(set_stb),.addr(set_addr),
+      .in(set_data),.out(gpio_ena),.changed());
+
    // The TVRX connects to what is called adc_b, thus A and B are
    // swapped throughout the design.
    //
@@ -151,7 +158,24 @@
    round #(.bits_in(18),.bits_out(16)) round_iout (.in(i_hb2),.out(i_out));
    round #(.bits_in(18),.bits_out(16)) round_qout (.in(q_hb2),.out(q_out));
 
-   assign      sample = {i_out,q_out};
+   // Streaming GPIO
+   //
+   // io_rx[15] => I channel LSB if gpio_ena[0] high
+   // io_rx[14] => Q channel LSB if gpio_ena[1] high
+   reg [14:0] i_out_d1, q_out_d1;
+   reg               i_lsb, q_lsb;
+   
+   always @(posedge clk)
+     begin
+
+       i_out_d1 <= i_out[15:1];
+       i_lsb    <= gpio_ena[0] ? io_rx[15] : i_out[0];
+       q_out_d1 <= q_out[15:1];
+       q_lsb    <= gpio_ena[1] ? io_rx[14] : q_out[0];
+
+     end
+   
+   assign      sample = {i_out_d1,i_lsb,q_out_d1,q_lsb};
    assign      strobe = strobe_hb2;
    assign      debug = {enable_hb1, enable_hb2, run, strobe, strobe_cic, 
strobe_cic_d1, strobe_hb1, strobe_hb2};
    

Modified: 
gnuradio/branches/developers/jcorgan/gpio2/usrp2/fpga/top/u2_core/u2_core.v
===================================================================
--- gnuradio/branches/developers/jcorgan/gpio2/usrp2/fpga/top/u2_core/u2_core.v 
2009-03-30 15:34:14 UTC (rev 10712)
+++ gnuradio/branches/developers/jcorgan/gpio2/usrp2/fpga/top/u2_core/u2_core.v 
2009-03-30 20:53:06 UTC (rev 10713)
@@ -602,7 +602,7 @@
      (.clk(dsp_clk),.rst(dsp_rst),
       .set_stb(set_stb),.set_addr(set_addr),.set_data(set_data),
       .adc_a(adc_a),.adc_ovf_a(adc_ovf_a),.adc_b(adc_b),.adc_ovf_b(adc_ovf_b),
-      .sample(sample_rx), .run(run_rx_d1), .strobe(strobe_rx),
+      .io_rx(io_rx),.sample(sample_rx), .run(run_rx_d1), .strobe(strobe_rx),
       .debug(debug_rx_dsp) );
 
    tx_control #(.FIFOSIZE(10)) tx_control





reply via email to

[Prev in Thread] Current Thread [Next in Thread]