diff options
Diffstat (limited to 'gr-sounder/src/fpga/lib/sounder_tx.v')
-rw-r--r-- | gr-sounder/src/fpga/lib/sounder_tx.v | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gr-sounder/src/fpga/lib/sounder_tx.v b/gr-sounder/src/fpga/lib/sounder_tx.v index 46165dde5..148b1e500 100644 --- a/gr-sounder/src/fpga/lib/sounder_tx.v +++ b/gr-sounder/src/fpga/lib/sounder_tx.v @@ -22,24 +22,23 @@ `include "../../../../usrp/firmware/include/fpga_regs_common.v" `include "../../../../usrp/firmware/include/fpga_regs_standard.v" -`define MAX_VALUE 14'h1FFF // 2s complement -`define MIN_VALUE 14'h2001 - -module sounder_tx(clk_i,rst_i,ena_i,strobe_i,mask_i,tx_i_o,tx_q_o); +module sounder_tx(clk_i,rst_i,ena_i,strobe_i,ampl_i,mask_i,tx_i_o,tx_q_o); input clk_i; input rst_i; input ena_i; input strobe_i; + input [13:0] ampl_i; input [15:0] mask_i; output [13:0] tx_i_o; output [13:0] tx_q_o; wire pn; - + wire [13:0] min_value = (~ampl_i)+14'b1; + lfsr pn_code ( .clk_i(clk_i),.rst_i(rst_i),.ena_i(ena_i),.strobe_i(strobe_i),.mask_i(mask_i),.pn_o(pn) ); - assign tx_i_o = ena_i ? (pn ? `MAX_VALUE : `MIN_VALUE) : 14'b0; // Bipolar + assign tx_i_o = ena_i ? (pn ? ampl_i : min_value) : 14'b0; // Bipolar assign tx_q_o = 14'b0; endmodule // sounder_tx |