aboutsummaryrefslogtreecommitdiffstats
path: root/fpga/usrp3/lib/fifo
diff options
context:
space:
mode:
authorMax Köhler <max.koehler@ni.com>2020-08-04 13:19:10 +0200
committerWade Fife <wade.fife@ettus.com>2020-08-06 16:17:33 -0500
commit0df2f9932cc270b8f1a705ea2543df8792005878 (patch)
tree4a58fddd13d8e2f0f7a815d80df0b05307a5d5af /fpga/usrp3/lib/fifo
parent7f86724ec3387f75d39d683b2ac5f5152e714c74 (diff)
downloaduhd-0df2f9932cc270b8f1a705ea2543df8792005878.tar.gz
uhd-0df2f9932cc270b8f1a705ea2543df8792005878.tar.bz2
uhd-0df2f9932cc270b8f1a705ea2543df8792005878.zip
fpga: lib: add Intel MAX10 architecture for 2clk FIFO
This commit derives parameters for MAX10 devices if provided by the DEVICE parameter. MAX10 devices FIFO generator support up to 36 bit wide FIFOs using embedded memory (M9K) in simple dual port mode, which is treated equally to RAM in the parameters. In combination with sorting the ctrlport signals by usage, the used resources can be reduced on the MAX10 devices from 6 to 3 M9K blocks for a ctrlport_clk_cross instance without time and portids.
Diffstat (limited to 'fpga/usrp3/lib/fifo')
-rw-r--r--fpga/usrp3/lib/fifo/axi_fifo_2clk.v16
1 files changed, 8 insertions, 8 deletions
diff --git a/fpga/usrp3/lib/fifo/axi_fifo_2clk.v b/fpga/usrp3/lib/fifo/axi_fifo_2clk.v
index 1f3eee924..a1af5ee8e 100644
--- a/fpga/usrp3/lib/fifo/axi_fifo_2clk.v
+++ b/fpga/usrp3/lib/fifo/axi_fifo_2clk.v
@@ -88,14 +88,14 @@ module axi_fifo_2clk #(
wire o_ext_tvalid;
wire o_ext_tready;
- // Ideally the following parameters should be technology
- // specific. For now these values have been optimized for
- // 7Series FPGAs. They also work for Spartan6 but may not
- // be optimal. For future generations, make these values
- // depend on the DEVICE parameter.
- localparam BASE_WIDTH = 72;
- localparam SRL_THRESHOLD = 5;
- localparam RAM_THRESHOLD = 9;
+ // Derive constants based on device.
+ // First triple of values is for Intel's MAX10 FPGAs. The FIFO generator for
+ // those devices supports embedded memory only (SRL_THRESHOLD = 0).
+ // The later triple has been optimized for Xilinx 7Series FPGAs. They also
+ // work for Spartan6 but may not be optimal.
+ localparam BASE_WIDTH = (DEVICE == "MAX10") ? 36 : 72;
+ localparam SRL_THRESHOLD = (DEVICE == "MAX10") ? 0 : 5;
+ localparam RAM_THRESHOLD = (DEVICE == "MAX10") ? 8 : 9;
// How many parallel FIFOs to instantiate to fit WIDTH
localparam NUM_FIFOS = ((WIDTH-1)/BASE_WIDTH)+1;