summaryrefslogtreecommitdiffstats
path: root/usrp2/top/B100/B100.v
diff options
context:
space:
mode:
Diffstat (limited to 'usrp2/top/B100/B100.v')
-rw-r--r--usrp2/top/B100/B100.v78
1 files changed, 59 insertions, 19 deletions
diff --git a/usrp2/top/B100/B100.v b/usrp2/top/B100/B100.v
index dcda974b4..cb4efa4fa 100644
--- a/usrp2/top/B100/B100.v
+++ b/usrp2/top/B100/B100.v
@@ -1,5 +1,5 @@
//
-// Copyright 2011 Ettus Research LLC
+// Copyright 2011-2012 Ettus Research 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
@@ -50,6 +50,8 @@ module B100
// /////////////////////////////////////////////////////////////////////////
// Clocking
wire clk_fpga, clk_fpga_in, reset;
+ wire gpif_clk = IFCLK;
+ wire gpif_rst;
IBUFGDS #(.IOSTANDARD("LVDS_33"), .DIFF_TERM("TRUE"))
clk_fpga_pin (.O(clk_fpga_in),.I(CLK_FPGA_P),.IB(CLK_FPGA_N));
@@ -57,6 +59,7 @@ module B100
BUFG clk_fpga_BUFG (.I(clk_fpga_in), .O(clk_fpga));
reset_sync reset_sync(.clk(clk_fpga), .reset_in((~reset_n) | (~ext_reset)), .reset_out(reset));
+ reset_sync reset_sync_gpif(.clk(gpif_clk), .reset_in((~reset_n) | (~ext_reset)), .reset_out(gpif_rst));
// /////////////////////////////////////////////////////////////////////////
// SPI
@@ -105,6 +108,7 @@ module B100
// /////////////////////////////////////////////////////////////////////////
// RX ADC -- handles deinterleaving
+ wire rxsync_0, rxsync_1;
reg [11:0] rx_i, rx_q;
wire [11:0] rx_a, rx_b;
@@ -151,24 +155,60 @@ module B100
rx_i <= rx_a;
rx_q <= rx_b;
end
-
+
// /////////////////////////////////////////////////////////////////////////
- // Main U1E Core
- u1plus_core u1p_c(.clk_fpga(clk_fpga), .rst_fpga(reset),
- .debug_led(debug_led), .debug(debug), .debug_clk(debug_clk),
- .debug_txd(), .debug_rxd(1'b1),
-
- .gpif_d(GPIF_D), .gpif_ctl(GPIF_CTL), .gpif_pktend(GPIF_PKTEND),
- .gpif_sloe(GPIF_SLOE), .gpif_slwr(GPIF_SLWR), .gpif_slrd(GPIF_SLRD),
- .gpif_fifoadr(GPIF_ADR), .gpif_clk(IFCLK),
-
- .db_sda(SDA_FPGA), .db_scl(SCL_FPGA),
- .sclk(sclk), .sen({SEN_CODEC,SEN_TX_DB,SEN_RX_DB}), .mosi(mosi), .miso(miso),
- .cgen_st_status(cgen_st_status), .cgen_st_ld(cgen_st_ld),.cgen_st_refmon(cgen_st_refmon),
- .cgen_sync_b(cgen_sync_b), .cgen_ref_sel(cgen_ref_sel),
- .io_tx(io_tx), .io_rx(io_rx),
- .tx_i(tx_i), .tx_q(tx_q),
- .rx_i(rx_i), .rx_q(rx_q),
- .pps_in(PPS_IN) );
+ // Main Core
+ wire [35:0] rx_data, tx_data, ctrl_data, resp_data;
+ wire rx_src_rdy, rx_dst_rdy, tx_src_rdy, tx_dst_rdy, resp_src_rdy, resp_dst_rdy, ctrl_src_rdy, ctrl_dst_rdy;
+ wire dsp_rx_run, dsp_tx_run;
+ wire [7:0] sen8;
+ assign {SEN_CODEC,SEN_TX_DB,SEN_RX_DB} = sen8[2:0];
+ wire [31:0] core_debug;
+
+ assign debug_led = {dsp_tx_run, dsp_rx_run, cgen_st_ld};
+ wire cgen_sync;
+ assign { cgen_sync_b, cgen_ref_sel } = {~cgen_sync, 1'b1};
+
+ u1plus_core #(
+ .NUM_RX_DSPS(1),
+ .DSP_RX_XTRA_FIFOSIZE(11),
+ .DSP_TX_XTRA_FIFOSIZE(12),
+ .USE_PACKET_PADDER(1)
+ ) core(
+ .clk(clk_fpga), .reset(reset),
+ .debug(core_debug), .debug_clk(debug_clk),
+
+ .rx_data(rx_data), .rx_src_rdy(rx_src_rdy), .rx_dst_rdy(rx_dst_rdy),
+ .tx_data(tx_data), .tx_src_rdy(tx_src_rdy), .tx_dst_rdy(tx_dst_rdy),
+ .ctrl_data(ctrl_data), .ctrl_src_rdy(ctrl_src_rdy), .ctrl_dst_rdy(ctrl_dst_rdy),
+ .resp_data(resp_data), .resp_src_rdy(resp_src_rdy), .resp_dst_rdy(resp_dst_rdy),
+
+ .dsp_rx_run(dsp_rx_run), .dsp_tx_run(dsp_tx_run),
+ .clock_sync(cgen_sync),
+
+ .db_sda(SDA_FPGA), .db_scl(SCL_FPGA),
+ .sclk(sclk), .sen(sen8), .mosi(mosi), .miso(miso),
+ .io_tx(io_tx), .io_rx(io_rx),
+ .tx_i(tx_i), .tx_q(tx_q),
+ .rx_i(rx_i), .rx_q(rx_q),
+ .pps_in(PPS_IN) );
+
+ // /////////////////////////////////////////////////////////////////////////
+ // Interface from host to/from GPIF
+ wire [31:0] gpif_debug;
+ slave_fifo slave_fifo (.gpif_clk(gpif_clk), .gpif_rst(gpif_rst), .gpif_d(GPIF_D),
+ .gpif_ctl(GPIF_CTL), .sloe(GPIF_SLOE), .slwr(GPIF_SLWR), .slrd(GPIF_SLRD),
+ .pktend(GPIF_PKTEND), .fifoadr(GPIF_ADR),
+
+ .fifo_clk(clk_fpga), .fifo_rst(reset),
+ .rx_data(rx_data), .rx_src_rdy(rx_src_rdy), .rx_dst_rdy(rx_dst_rdy),
+ .tx_data(tx_data), .tx_src_rdy(tx_src_rdy), .tx_dst_rdy(tx_dst_rdy),
+ .ctrl_data(ctrl_data), .ctrl_src_rdy(ctrl_src_rdy), .ctrl_dst_rdy(ctrl_dst_rdy),
+ .resp_data(resp_data), .resp_src_rdy(resp_src_rdy), .resp_dst_rdy(resp_dst_rdy),
+
+ .debug(gpif_debug));
+
+ //assign debug = gpif_debug;
+ assign debug = core_debug;
endmodule // B100