3 // USRP - Universal Software Radio Peripheral
5 // Copyright (C) 2007 Corgan Enterprises LLC
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 2 of the License, or
10 // (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Boston, MA 02110-1301 USA
22 `include "../../../../usrp/firmware/include/fpga_regs_common.v"
23 `include "../../../../usrp/firmware/include/fpga_regs_standard.v"
25 module radar_rx(clk_i,rst_i,ena_i,strobe_i,saddr_i,sdata_i,s_strobe_i,
26 rx_in_i_i,rx_in_q_i,rx_i_o,rx_q_o,rx_strobe_o);
37 input [15:0] rx_in_i_i;
38 input [15:0] rx_in_q_i;
44 // Just count up for debugging
47 always @(posedge clk_i)
51 else if (strobe_i & rx_strobe_o)
52 counter <= counter + 32'b1;
55 assign rx_i_o = ena_i ? counter[31:16] : 16'b0;
56 assign rx_q_o = ena_i ? counter[15:0] : 16'b0;
58 // Temporarily we duplicate what master_control.v did to generate decim_strobe
59 // so we can do receive debugging. Later we'll drive rx_strobe_o in bursts to
60 // load receiver data into the rx fifo.
61 strobe_gen rx_strobe_gen
62 ( .clock(clk_i),.reset(rst_i),.enable(ena_i),.rate(7),.strobe_in(strobe_i),.strobe(rx_strobe_o) );