diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-10-03 10:55:23 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-10-03 10:55:23 -0700 |
commit | 549d6ea467bddba24cc0ee43597b5ab62eb476e7 (patch) | |
tree | f33d1294939f4fcc6a7dc946d2c3d0d003f437e5 /techlibs/ecp5/brams_map.v | |
parent | 655f1b2ac559f73a7d781ae25afd1ab3b898afc0 (diff) | |
parent | 2ed2e9c3e8f2d9d6882588857c8556a6e2af57ea (diff) | |
download | yosys-549d6ea467bddba24cc0ee43597b5ab62eb476e7.tar.gz yosys-549d6ea467bddba24cc0ee43597b5ab62eb476e7.tar.bz2 yosys-549d6ea467bddba24cc0ee43597b5ab62eb476e7.zip |
Merge remote-tracking branch 'origin/master' into xaig_dff
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 |