Files
b210-k7-fpga/top/b200/sim/b200_tb.v
T
+18 6b67702ad7 Merge FPGA repository back into UHD repository
The FPGA codebase was removed from the UHD repository in 2014 to reduce
the size of the repository. However, over the last half-decade, the
split between the repositories has proven more burdensome than it has
been helpful. By merging the FPGA code back, it will be possible to
create atomic commits that touch both FPGA and UHD codebases. Continuous
integration testing is also simplified by merging the repositories,
because it was previously difficult to automatically derive the correct
UHD branch when testing a feature branch on the FPGA repository.

This commit also updates the license files and paths therein.

We are therefore merging the repositories again. Future development for
FPGA code will happen in the same repository as the UHD host code and
MPM code.

== Original Codebase and Rebasing ==

The original FPGA repository will be hosted for the foreseeable future
at its original local location: https://github.com/EttusResearch/fpga/

It can be used for bisecting, reference, and a more detailed history.

The final commit from said repository to be merged here is
05003794e2da61cabf64dd278c45685a7abad7ec. This commit is tagged as
v4.0.0.0-pre-uhd-merge.

If you have changes in the FPGA repository that you want to rebase onto
the UHD repository, simply run the following commands:

- Create a directory to store patches (this should be an empty
  directory):

    mkdir ~/patches

- Now make sure that your FPGA codebase is based on the same state as
  the code that was merged:

    cd src/fpga # Or wherever your FPGA code is stored
    git rebase v4.0.0.0-pre-uhd-merge

  Note: The rebase command may look slightly different depending on what
  exactly you're trying to rebase.

- Create a patch set for your changes versus v4.0.0.0-pre-uhd-merge:

    git format-patch v4.0.0.0-pre-uhd-merge -o ~/patches

  Note: Make sure that only patches are stored in your output directory.
  It should otherwise be empty. Make sure that you picked the correct
  range of commits, and only commits you wanted to rebase were exported
  as patch files.

- Go to the UHD repository and apply the patches:

    cd src/uhd # Or wherever your UHD repository is stored
    git am --directory fpga ~/patches/*
    rm -rf ~/patches # This is for cleanup

== Contributors ==

The following people have contributed mainly to these files (this list
is not complete):

Co-authored-by: Alex Williams <alex.williams@ni.com>
Co-authored-by: Andrej Rode <andrej.rode@ettus.com>
Co-authored-by: Ashish Chaudhari <ashish@ettus.com>
Co-authored-by: Ben Hilburn <ben.hilburn@ettus.com>
Co-authored-by: Ciro Nishiguchi <ciro.nishiguchi@ni.com>
Co-authored-by: Daniel Jepson <daniel.jepson@ni.com>
Co-authored-by: Derek Kozel <derek.kozel@ettus.com>
Co-authored-by: EJ Kreinar <ej@he360.com>
Co-authored-by: Humberto Jimenez <humberto.jimenez@ni.com>
Co-authored-by: Ian Buckley <ian.buckley@gmail.com>
Co-authored-by: Jörg Hofrichter <joerg.hofrichter@ni.com>
Co-authored-by: Jon Kiser <jon.kiser@ni.com>
Co-authored-by: Josh Blum <josh@joshknows.com>
Co-authored-by: Jonathon Pendlum <jonathan.pendlum@ettus.com>
Co-authored-by: Martin Braun <martin.braun@ettus.com>
Co-authored-by: Matt Ettus <matt@ettus.com>
Co-authored-by: Michael West <michael.west@ettus.com>
Co-authored-by: Moritz Fischer <moritz.fischer@ettus.com>
Co-authored-by: Nick Foster <nick@ettus.com>
Co-authored-by: Nicolas Cuervo <nicolas.cuervo@ettus.com>
Co-authored-by: Paul Butler <paul.butler@ni.com>
Co-authored-by: Paul David <paul.david@ettus.com>
Co-authored-by: Ryan Marlow <ryan.marlow@ettus.com>
Co-authored-by: Sugandha Gupta <sugandha.gupta@ettus.com>
Co-authored-by: Sylvain Munaut <tnt@246tNt.com>
Co-authored-by: Trung Tran <trung.tran@ettus.com>
Co-authored-by: Vidush Vishwanath <vidush.vishwanath@ettus.com>
Co-authored-by: Wade Fife <wade.fife@ettus.com>


Original-commit: bafa9d95453387814ef25e6b6256ba8db2df612f
2020-01-28 09:35:36 -08:00

214 lines
4.4 KiB
Verilog

module b200_tb ();
wire cat_ce;
wire cat_miso;
wire cat_mosi;
wire cat_sclk;
wire fx3_ce;
wire fx3_miso;
wire fx3_mosi;
wire fx3_sclk;
wire pll_ce;
wire pll_mosi;
wire pll_sclk;
// UART
wire FPGA_RXD0;
wire FPGA_TXD0;
// Catalina Controls
wire codec_enable;
wire codec_en_agc;
wire codec_reset;
wire codec_sync;
wire codec_txrx;
wire [3:0] codec_ctrl_in; // These should be outputs
wire [7:0] codec_ctrl_out; // MUST BE INPUT
// Catalina Data
wire codec_data_clk_p; // Clock from CAT (RX)
wire codec_fb_clk_p; // Clock to CAT (TX)
wire [11:0] rx_codec_d;
wire [11:0] tx_codec_d;
wire rx_frame_p;
wire tx_frame_p;
wire cat_clkout_fpga;
//always on 40MHz clock
wire codec_main_clk_p;
wire codec_main_clk_n;
// Debug Bus
wire [31:0] debug;
wire [1:0] debug_clk;
// GPIF; FX3 Slave FIFO
wire IFCLK; // pclk
wire FX3_EXTINT;
wire GPIF_CTL0; // n_slcs
wire GPIF_CTL1; // n_slwr
wire GPIF_CTL2; // n_sloe
wire GPIF_CTL3; // n_slrd
wire GPIF_CTL7; // n_pktend
wire GPIF_CTL4; // slfifo_flags[0]
wire GPIF_CTL5; // slfifo_flags[1]
wire GPIF_CTL6; // slfifo_flags[2]
wire GPIF_CTL8; // slfifo_flags[3]
wire GPIF_CTL11; // slfifo_addr[1]
wire GPIF_CTL12; // slfifo_addr[0]
wire [31:0] GPIF_D;
wire GPIF_CTL9; // global_reset
// GPS
wire gps_lock;
wire gps_rxd;
wire gps_txd;
wire gps_txd_nmea;
// LEDS
wire LED_RX1;
wire LED_RX2;
wire LED_TXRX1_RX;
wire LED_TXRX1_TX;
wire LED_TXRX2_RX;
wire LED_TXRX2_TX;
// Misc Hardware Control
wire ref_sel;
wire pll_lock;
wire FPGA_CFG_CS; // Driven by FX3 gpio.
wire AUX_PWR_ON; // Driven by FX3 gpio.
// PPS
wire PPS_IN_EXT;
wire PPS_IN_INT;
// RF Hardware Control
wire SFDX1_RX;
wire SFDX1_TX;
wire SFDX2_RX;
wire SFDX2_TX;
wire SRX1_RX;
wire SRX1_TX;
wire SRX2_RX;
wire SRX2_TX;
wire tx_bandsel_a;
wire tx_bandsel_b;
wire tx_enable1;
wire tx_enable2;
wire rx_bandsel_a;
wire rx_bandsel_b;
wire rx_bandsel_c;
b200 b200_i1(
// SPI Interfaces
.cat_ce(),
.cat_miso(),
.cat_mosi(),
.cat_sclk(),
.fx3_ce(),
.fx3_miso(),
.fx3_mosi(),
.fx3_sclk(),
.pll_ce(),
.pll_mosi(),
.pll_sclk(),
// UART
.FPGA_RXD0(),
.FPGA_TXD0(),
// Catalina Controls
.codec_enable(),
.codec_en_agc(),
.codec_reset(),
.codec_sync(),
.codec_txrx(),
.codec_ctrl_in(), // These should be outputs
.codec_ctrl_out(), // MUST BE INPUT
// Catalina Data
.codec_data_clk_p(), // Clock from CAT (RX)
.codec_fb_clk_p(), // Clock to CAT (TX)
.rx_codec_d(),
.tx_codec_d(),
.rx_frame_p(),
.tx_frame_p(),
.cat_clkout_fpga(),
//always on 40MHz clock
.codec_main_clk_p(),
.codec_main_clk_n(),
// Debug Bus
.debug(),
.debug_clk(),
// GPIF, FX3 Slave FIFO
.IFCLK(), // pclk
.FX3_EXTINT(),
.GPIF_CTL0(), // n_slcs
.GPIF_CTL1(), // n_slwr
.GPIF_CTL2(), // n_sloe
.GPIF_CTL3(), // n_slrd
.GPIF_CTL7(), // n_pktend
.GPIF_CTL4(), // slfifo_flags[0]
.GPIF_CTL5(), // slfifo_flags[1]
.GPIF_CTL6(), // slfifo_flags[2]
.GPIF_CTL8(), // slfifo_flags[3]
.GPIF_CTL11(), // slfifo_addr[1]
.GPIF_CTL12(), // slfifo_addr[0]
.GPIF_D(),
.GPIF_CTL9(), // global_reset
// GPS
.gps_lock(),
.gps_rxd(),
.gps_txd(),
.gps_txd_nmea(),
// LEDS
.LED_RX1(),
.LED_RX2(),
.LED_TXRX1_RX(),
.LED_TXRX1_TX(),
.LED_TXRX2_RX(),
.LED_TXRX2_TX(),
// Misc Hardware Control
.ref_sel(),
.pll_lock(),
.FPGA_CFG_CS(), // Driven by FX3 gpio.
.AUX_PWR_ON(), // Driven by FX3 gpio.
// PPS
.PPS_IN_EXT(),
.PPS_IN_INT(),
// RF Hardware Control
.SFDX1_RX(),
.SFDX1_TX(),
.SFDX2_RX(),
.SFDX2_TX(),
.SRX1_RX(),
.SRX1_TX(),
.SRX2_RX(),
.SRX2_TX(),
.tx_bandsel_a(),
.tx_bandsel_b(),
.tx_enable1(),
.tx_enable2(),
.rx_bandsel_a(),
.rx_bandsel_b(),
.rx_bandsel_c()
);
endmodule // b200_tb