patch-gnuradio
[Top][All Lists]
Advanced

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

[Patch-gnuradio] Re: [Discuss-gnuradio] FPGA mods


From: Dan Halperin
Subject: [Patch-gnuradio] Re: [Discuss-gnuradio] FPGA mods
Date: Mon, 26 Feb 2007 16:46:42 -0800
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)

Eric Blossom wrote:
Second, in what applications are multiple receive and transmit channels are used? They aren't used in tunnel.py right? I want to be doing RX and TX on the RFX2400 as in tunnel.py; this application only uses one RX and one TX channel, so I can define RX_SINGLE and TX_SINGLE instead of the DUAL versions?

Yes.

However, because I was a lazy bum, I didn't add the conditionals
that distinguish between TX_SINGLE and TX_DUAL.

You'll need to add the appropriate `ifdef TX_EN_0 and TX_EN_1 gating in
usrp_std.v.  [Please send a patch.]

And send your new config file too.  I assume it's going to be
usrp_std_config_1rxhb_1tx.vh

Thanks,
Eric

I've attached patches for usrp_std.v, usrp_std.vh (just a place to uncomment to use the new config file), and usrp_std_config_1rxhb_1tx.vh.

I modeled the changes in usrp_std.v after the ones in the RX side. I hope they're right.

Two more questions:

1) Is there a correct way to set the name of the compiled firmware file? Do we just create usrp_std.rbf and copy it to different filenames?

2) Is there intelligent handling of the MUX values based on defines in the FPGA firmware? I.E. if I set the mux to an invalid value (say all 3's), does it zero out/ignore the invalid 1 bits?

Thanks,

-Dan
--- ../gnuradio/usrp/fpga/toplevel/usrp_std/usrp_std.v  2007-02-26 
16:34:18.000000000 -0800
+++ usrp_std.v  2007-02-26 16:14:53.000000000 -0800
@@ -142,17 +142,27 @@
        .tx_empty(tx_empty),
        .debugbus(tx_debugbus) );
 
+ `ifdef TX_EN_0
    tx_chain tx_chain_0
      ( .clock(clk64),.reset(tx_dsp_reset),.enable(enable_tx),
        .interp_rate(interp_rate),.sample_strobe(tx_sample_strobe),
        .interpolator_strobe(strobe_interp),.freq(),
        .i_in(bb_tx_i0),.q_in(bb_tx_q0),.i_out(i_out_0),.q_out(q_out_0) );
+ `else
+   assign      i_out_0=16'd0;
+   assign      q_out_0=16'd0;
+ `endif
 
+ `ifdef TX_EN_0
    tx_chain tx_chain_1
      ( .clock(clk64),.reset(tx_dsp_reset),.enable(enable_tx),
        .interp_rate(interp_rate),.sample_strobe(tx_sample_strobe),
        .interpolator_strobe(strobe_interp),.freq(),
        .i_in(bb_tx_i1),.q_in(bb_tx_q1),.i_out(i_out_1),.q_out(q_out_1) );
+ `else
+   assign      i_out_1=16'd0;
+   assign      q_out_1=16'd0;
+ `endif
 
    setting_reg #(`FR_TX_MUX) 
      
sr_txmux(.clock(clk64),.reset(tx_dsp_reset),.strobe(serial_strobe),.addr(serial_addr),.in(serial_data),
--- ../gnuradio/usrp/fpga/toplevel/usrp_std/usrp_std.vh 2007-02-26 
16:34:18.000000000 -0800
+++ usrp_std.vh 2007-02-26 16:24:44.000000000 -0800
@@ -26,6 +26,9 @@
 //
 // ====================================================================
 
+// Uncomment this for 1 rx channel (w/o halfband) & 1 transmit channel
+//`include "usrp_std_config_1rxhb_1tx.vh"
+
 // Uncomment this for 2 rx channels (w/ halfband) & 2 transmit channels
   `include "usrp_std_config_2rxhb_2tx.vh"
 
// -*- verilog -*-
//
//  USRP - Universal Software Radio Peripheral
//
//  Copyright (C) 2006 Matt Ettus
//
//  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
//

// ------------------------------------------------------------
// If TX_ON is not defined, there is *no* transmit circuitry built
  `define TX_ON

// ------------------------------------------------------------
// Define 1 and only one of TX_SINGLE, TX_DUAL and TX_QUAD
// to respectively enable 1, 2 or 4 transmit channels.
// [Please note that only TX_DUAL is currently valid]
  `define TX_SINGLE
//`define TX_DUAL
//`define TX_QUAD

// ------------------------------------------------------------
// Define TX_HB_ON to enable the transmit halfband filter
// [Not implemented]
//`define TX_HB_ON

// ------------------------------------------------------------
// IF RX_ON is not defined, there is *no* transmit circuitry built
  `define RX_ON

// ------------------------------------------------------------
// Define 1 and only one of RX_SINGLE, RX_DUAL and RX_QUAD
// to respectively define 1, 2 or 4 receive channels.

  `define RX_SINGLE
//`define RX_DUAL
//`define RX_QUAD

// ------------------------------------------------------------
// Define RX_HB_ON to enable the receive halfband filter
  `define RX_HB_ON

// ------------------------------------------------------------
// Define RX_NCO_ON to enable the receive Numerical Controlled Osc
  `define RX_NCO_ON

// ------------------------------------------------------------
// Define RX_CIC_ON to enable the receive Cascaded Integrator Comb filter
  `define RX_CIC_ON

reply via email to

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