commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r5052 - in gnuradio/branches/developers/jcorgan/snd/gr


From: jcorgan
Subject: [Commit-gnuradio] r5052 - in gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga: lib rbf/rev2 rbf/rev4 top
Date: Fri, 20 Apr 2007 13:54:14 -0600 (MDT)

Author: jcorgan
Date: 2007-04-20 13:54:14 -0600 (Fri, 20 Apr 2007)
New Revision: 5052

Added:
   gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/sounder.v
Modified:
   gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/Makefile.am
   gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/sounder_rx.v
   gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/sounder_tx.v
   
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/rbf/rev2/usrp_sounder.rbf
   
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/rbf/rev4/usrp_sounder.rbf
   
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/top/usrp_sounder.qsf
   
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/top/usrp_sounder.v
Log:
Work in progress, refactoring.

Modified: 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/Makefile.am    
    2007-04-20 19:39:09 UTC (rev 5051)
+++ 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/Makefile.am    
    2007-04-20 19:54:14 UTC (rev 5052)
@@ -24,6 +24,7 @@
 EXTRA_DIST = \
        dac_interface.v \
        dacpll.v \
+       sounder.v \
        sounder_rx.v \
        sounder_tx.v
 

Added: 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/sounder.v
===================================================================
--- gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/sounder.v  
                        (rev 0)
+++ gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/sounder.v  
2007-04-20 19:54:14 UTC (rev 5052)
@@ -0,0 +1,89 @@
+// -*- verilog -*-
+//
+//  USRP - Universal Software Radio Peripheral
+//
+//  Copyright (C) 2007 Corgan Enterprises LLC
+//
+//  This program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation; either version 2 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin Street, Boston, MA  02110-1301  USA
+//
+
+`include "../../../../usrp/firmware/include/fpga_regs_common.v"
+`include "../../../../usrp/firmware/include/fpga_regs_standard.v"
+
+module 
sounder(clk_i,saddr_i,sdata_i,s_strobe_i,tx_rst_i,tx_enable_i,tx_strobe_i,
+              
tx_dac_i_o,tx_dac_q_o,tx_debug_o,rx_rst_i,rx_enable_i,rx_strobe_o,
+              rx_adc_i_i,rx_adc_q_i,rx_imp_i_o,rx_imp_q_o,rx_debug_o);
+
+   // System interface
+   input         clk_i;                // Master clock @ 64 MHz
+   input  [6:0]  saddr_i;      // Configuration bus address
+   input  [31:0] sdata_i;      // Configuration bus data
+   input        s_strobe_i;    // Configuration bus write
+   
+   // Transmit subsystem
+   input         tx_rst_i;     // Independent subsystem reset
+   input         tx_enable_i;  // Turn on transmitter functionality
+   input         tx_strobe_i;  // Generate an transmitter output sample
+   output [15:0] tx_dac_i_o;   // I channel transmitter output to DAC
+   output [15:0] tx_dac_q_o;    // Q channel transmitter output to DAC
+   output [15:0] tx_debug_o;    // Transmitter subsystem debugger bus
+
+   // Receive subsystem
+   input        rx_rst_i;      // Independent subsystem reset
+   input        rx_enable_i;   // Turn on receiver functionality
+   output       rx_strobe_o;   // Indicates output samples ready for Rx FIFO
+   input  [15:0] rx_adc_i_i;   // I channel input from ADC
+   input  [15:0] rx_adc_q_i;   // Q channel input from ADC
+   output [15:0] rx_imp_i_o;   // I channel impulse response to Rx FIFO
+   output [15:0] rx_imp_q_o;   // Q channel impulse response to Rx FIFO
+   output [15:0] rx_debug_o;   // Receive subsystem debugger bus
+
+   wire   [15:0] lfsr_mask;    // PN code parity mask
+
+   setting_reg #(`FR_USER_0) sr_lfsr_mask
+     ( .clock(clk_i),
+       .reset(1'b0),
+       .strobe(s_strobe_i),
+       .addr(saddr_i),
+       .in(sdata_i),
+       .out(lfsr_mask) 
+       );
+
+   sounder_tx transmitter
+     ( .clk_i(clk_i),
+       .rst_i(tx_rst_i),
+       .ena_i(tx_enable_i),
+       .strobe_i(tx_strobe_i),
+       .lfsr_mask_i(lfsr_mask),
+       .tx_i_o(tx_dac_i_o),
+       .tx_q_o(tx_dac_q_o),
+       .debug_o(tx_debug_o) 
+       );
+   
+   sounder_rx receiver
+     ( .clk_i(clk_i),
+       .rst_i(rx_rst_i),
+       .ena_i(rx_enable_i),
+       .strobe_i(1'b1),
+       .rx_in_i_i(rx_adc_i_i),
+       .rx_in_q_i(rx_adc_q_i),
+       .rx_i_o(rx_imp_i_o),
+       .rx_q_o(rx_imp_q_o),
+       .rx_strobe_o(rx_strobe_o),
+       .debug_o(rx_debug_o) 
+       );
+   
+endmodule // sounder
+

Modified: 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/sounder_rx.v
===================================================================
--- 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/sounder_rx.v   
    2007-04-20 19:39:09 UTC (rev 5051)
+++ 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/sounder_rx.v   
    2007-04-20 19:54:14 UTC (rev 5052)
@@ -19,16 +19,12 @@
 //  Foundation, Inc., 51 Franklin Street, Boston, MA  02110-1301  USA
 //
 
-module 
sounder_rx(clk_i,rst_i,ena_i,strobe_i,saddr_i,sdata_i,s_strobe_i,rx_in_i_i,rx_in_q_i,rx_i_o,rx_q_o,rx_strobe_o,debug_o);
+module 
sounder_rx(clk_i,rst_i,ena_i,strobe_i,rx_in_i_i,rx_in_q_i,rx_i_o,rx_q_o,rx_strobe_o,debug_o);
    input clk_i;
    input rst_i;
    input ena_i;
    input strobe_i;
 
-   input [6:0] saddr_i;
-   input [31:0] sdata_i;
-   input s_strobe_i;
-
    input [15:0] rx_in_i_i;
    input [15:0] rx_in_q_i;
 
@@ -55,7 +51,10 @@
    // Temporarily we duplicate what master_control.v did to generate 
decim_strobe
    // so we can do receive debugging. Later we'll drive rx_strobe_o in bursts 
to
    // load receiver data into the rx fifo.
-   strobe_gen rx_strobe_gen( 
.clock(clk_i),.reset(rst_i),.enable(ena_i),.rate(cpi_i),.strobe_in(strobe_i),.strobe(rx_strobe_o));
+   strobe_gen rx_strobe_gen
+       ( .clock(clk_i),.reset(rst_i),.enable(ena_i),.rate(8),
+      .strobe_in(strobe_i),.strobe(rx_strobe_o)
+         );
    
 endmodule // sounder_rx
 

Modified: 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/sounder_tx.v
===================================================================
--- 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/sounder_tx.v   
    2007-04-20 19:39:09 UTC (rev 5051)
+++ 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/lib/sounder_tx.v   
    2007-04-20 19:54:14 UTC (rev 5052)
@@ -22,30 +22,29 @@
 `include "../../../../usrp/firmware/include/fpga_regs_common.v"
 `include "../../../../usrp/firmware/include/fpga_regs_standard.v"
 
-module 
sounder_tx(clk_i,rst_i,ena_i,strobe_i,saddr_i,sdata_i,s_strobe_i,tx_i_o,tx_q_o,debug_o);
-   input clk_i;
-   input rst_i;
-   input ena_i;
-   input strobe_i;
-   
-   input [6:0] saddr_i;
-   input [31:0] sdata_i;
-   input s_strobe_i;
+`define MAX_VALUE 16'h7FFF // 2s complement
+`define MIN_VALUE 16'h8000
 
+module 
sounder_tx(clk_i,rst_i,ena_i,strobe_i,tx_i_o,tx_q_o,lfsr_mask_i,debug_o);
+   input         clk_i;
+   input         rst_i;
+   input         ena_i;
+   input         strobe_i;
+   input  [15:0] lfsr_mask_i;
+   
    output [15:0] tx_i_o;
    output [15:0] tx_q_o;
    output [15:0] debug_o;
 
-   wire pn;
-   wire [15:0] mask;
+   wire          pn;
 
-   setting_reg #(`FR_USER_0) 
-     
sr_lfsr_mask(.clock(clk_i),.reset(1'b0),.strobe(s_strobe_i),.addr(saddr_i),.in(sdata_i),.out(mask));
+   lfsr pn_code
+     ( 
.clk_i(clk_i),.rst_i(rst_i),.ena_i(ena_i),.strobe_i(strobe_i),.mask_i(lfsr_mask_i),.pn_o(pn)
 );
 
-   lfsr 
lfsr(.clk_i(clk_i),.rst_i(rst_i),.ena_i(ena_i),.strobe_i(strobe_i),.mask_i(mask),.pn_o(pn));
-   
-   assign tx_i_o = pn ? 16'h7FFF : 16'h8000;   // Bipolar -max, max 2s 
complement
+   assign tx_i_o = pn ? `MAX_VALUE : `MIN_VALUE; // Bipolar
    assign tx_q_o = 16'b0;
+
+   // Temporary
    assign debug_o = 16'hAA55;
          
 endmodule // sounder_tx

Modified: 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/rbf/rev2/usrp_sounder.rbf
===================================================================
(Binary files differ)

Modified: 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/rbf/rev4/usrp_sounder.rbf
===================================================================
(Binary files differ)

Modified: 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/top/usrp_sounder.qsf
===================================================================
--- 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/top/usrp_sounder.qsf
   2007-04-20 19:39:09 UTC (rev 5051)
+++ 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/top/usrp_sounder.qsf
   2007-04-20 19:54:14 UTC (rev 5052)
@@ -368,6 +368,7 @@
 set_instance_assignment -name PARTITION_HIERARCHY no_file_for_top_partition 
-to | -section_id Top
 set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top
 
+set_global_assignment -name VERILOG_FILE ../lib/sounder.v
 set_global_assignment -name VERILOG_FILE ../lib/lfsr.v
 set_global_assignment -name VERILOG_FILE 
../../../../usrp/fpga/sdr_lib/atr_delay.v
 set_global_assignment -name VERILOG_FILE ../lib/dac_interface.v

Modified: 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/top/usrp_sounder.v
===================================================================
--- 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/top/usrp_sounder.v 
    2007-04-20 19:39:09 UTC (rev 5051)
+++ 
gnuradio/branches/developers/jcorgan/snd/gr-sounder/src/fpga/top/usrp_sounder.v 
    2007-04-20 19:54:14 UTC (rev 5052)
@@ -99,9 +99,6 @@
    wire [6:0]  serial_addr;
    wire [31:0] serial_data;
    
-   // Either one will reset both 
-   wire master_reset = tx_dsp_reset|rx_dsp_reset;
-
    
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Transmit Side
 
@@ -116,13 +113,7 @@
    assign      tx_strobe = tx_sample_strobe; // Generated by master_control, 
every other clock
 `endif
 
-   // Transmitter creates a new output sample per tx_strobe
-   sounder_tx 
transmitter(.clk_i(clk64),.rst_i(master_reset),.ena_i(enable_tx),.strobe_i(tx_strobe),
-                         
.saddr_i(serial_addr),.sdata_i(serial_data),.s_strobe_i(serial_strobe),
-                         .tx_i_o(tx_i),.tx_q_o(tx_q),.debug_o(tx_debug));
-
-
-   dac_interface 
dac_interface(.clk_i(clk64),.rst_i(master_reset),.ena_i(enable_tx),.strobe_i(tx_strobe),
+   dac_interface 
dac_interface(.clk_i(clk64),.rst_i(tx_dsp_reset),.ena_i(enable_tx),.strobe_i(tx_strobe),
                               
.tx_i_i(tx_i),.tx_q_i(tx_q),.tx_data_o(tx_data),.tx_sync_o(TXSYNC_A));
 
    assign tx_a = tx_data[15:2];
@@ -148,11 +139,6 @@
    wire        rx_strobe;
    wire [15:0] rx_debug;
 
-   sounder_rx 
receiver(.clk_i(clk64),.rst_i(master_reset),.ena_i(enable_rx),.strobe_i(rx_sample_strobe),
-                      
.saddr_i(serial_addr),.sdata_i(serial_data),.s_strobe_i(serial_strobe),
-                      
.rx_in_i_i(rx_in_i),.rx_in_q_i(rx_in_q),.rx_i_o(rx_i),.rx_q_o(rx_q),
-                      .rx_strobe_o(rx_strobe),.debug_o(rx_debug));
-
    rx_buffer rx_buffer
      ( .usbclk(usbclk),.bus_reset(rx_bus_reset),.reset(rx_dsp_reset),
        .reset_regs(rx_dsp_reset),
@@ -169,6 +155,18 @@
 
 
    
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+   // Application Section
+
+   sounder sounder
+     ( 
.clk_i(clk64),.saddr_i(serial_addr),.sdata_i(serial_data),.s_strobe_i(serial_strobe),
+       .tx_rst_i(tx_dsp_reset),.tx_enable_i(enable_tx),.tx_strobe_i(tx_strobe),
+       .tx_dac_i_o(tx_i),.tx_dac_q_o(tx_q),.tx_debug_o(tx_debug),
+       .rx_rst_i(rx_dsp_reset),.rx_enable_i(enable_rx),.rx_strobe_o(rx_strobe),
+       
.rx_adc_i_i(rx_in_i),.rx_adc_q_i(rx_in_q),.rx_imp_i_o(rx_i),.rx_imp_q_o(rx_q),.rx_debug_o(rx_debug)
+       );
+
+   
+   
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    // Control Functions
 
    wire [31:0] capabilities;





reply via email to

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