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.


Original-commit: 0df2f9932cc270b8f1a705ea2543df8792005878
This commit is contained in:
Max Köhler
2020-08-06 16:17:33 -05:00
committed by Wade Fife
parent f28357679e
commit 06afe79a42
2 changed files with 33 additions and 28 deletions
+8 -8
View File
@@ -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;