diff options
author | David Shah <dave@ds0.me> | 2019-10-01 13:46:36 +0100 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-10-01 13:46:36 +0100 |
commit | 7a1538cd36b45fd3c397dd0414de37af768ad89e (patch) | |
tree | 2cd1a465a436a344c65ec8201e52a4334fabb84b /techlibs/ecp5/brams_map.v | |
parent | d963e8c2c6207ad98d48dc528922ad58c030173f (diff) | |
download | yosys-7a1538cd36b45fd3c397dd0414de37af768ad89e.tar.gz yosys-7a1538cd36b45fd3c397dd0414de37af768ad89e.tar.bz2 yosys-7a1538cd36b45fd3c397dd0414de37af768ad89e.zip |
ecp5: Add support for mapping 36-bit wide PDP BRAMs
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'techlibs/ecp5/brams_map.v')
-rw-r--r-- | techlibs/ecp5/brams_map.v | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/techlibs/ecp5/brams_map.v b/techlibs/ecp5/brams_map.v index 0353cbadb..310aedaf2 100644 --- a/techlibs/ecp5/brams_map.v +++ b/techlibs/ecp5/brams_map.v @@ -113,3 +113,45 @@ module \$__ECP5_DP16KD (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); wire TECHMAP_FAIL = 1'b1; end endgenerate endmodule + +module \$__ECP5_PDPW16KD (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); + parameter CFG_ABITS = 9; + parameter CFG_DBITS = 36; + parameter CFG_ENABLE_A = 4; + + parameter CLKPOL2 = 1; + parameter CLKPOL3 = 1; + parameter [18431:0] INIT = 18432'bx; + + input CLK2; + input CLK3; + + input [CFG_ABITS-1:0] A1ADDR; + input [CFG_DBITS-1:0] A1DATA; + input [CFG_ENABLE_A-1:0] A1EN; + + input [CFG_ABITS-1:0] B1ADDR; + output [CFG_DBITS-1:0] B1DATA; + input B1EN; + + localparam CLKWMUX = CLKPOL2 ? "CLKA" : "INV"; + localparam CLKRMUX = CLKPOL3 ? "CLKB" : "INV"; + + localparam WRITEMODE_A = TRANSP2 ? "WRITETHROUGH" : "READBEFOREWRITE"; + + PDPW16KD #( + `include "bram_init_9_18_36.vh" + .DATA_WIDTH_W(36), + .DATA_WIDTH_R(36), + .CLKWMUX(CLKWMUX), + .CLKRMUX(CLKRMUX), + .GSR("AUTO") + ) _TECHMAP_REPLACE_ ( + `include "bram_conn_36.vh" + .CLKW(CLK2), .CLKR(CLK3), + .CEW(1'b1), + .CER(B1EN), .OCER(1'b1), + .RST(1'b0) + ); + +endmodule |