diff options
author | David Shah <dave@ds0.me> | 2018-10-12 14:22:21 +0100 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2018-10-12 14:22:21 +0100 |
commit | 812538a036f380b613d1cd3fe2f182e376150d16 (patch) | |
tree | 5094d0677ef9754ab37a854f91b972f8c134fb0f /techlibs/ecp5 | |
parent | bdfead8c648db77b9350f941d6578a48bdaa2203 (diff) | |
download | yosys-812538a036f380b613d1cd3fe2f182e376150d16.tar.gz yosys-812538a036f380b613d1cd3fe2f182e376150d16.tar.bz2 yosys-812538a036f380b613d1cd3fe2f182e376150d16.zip |
BRAM improvements
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'techlibs/ecp5')
-rw-r--r-- | techlibs/ecp5/brams_map.v | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/techlibs/ecp5/brams_map.v b/techlibs/ecp5/brams_map.v index 61dee7054..7f40f8458 100644 --- a/techlibs/ecp5/brams_map.v +++ b/techlibs/ecp5/brams_map.v @@ -22,7 +22,7 @@ module \$__ECP5_DP16KD (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); localparam CLKAMUX = CLKPOL2 ? "CLKA" : "INV"; localparam CLKBMUX = CLKPOL3 ? "CLKB" : "INV"; - localparam WRITEMODE_A = TRANSP2 ? "WRITETHROUGH" : "NORMAL"; + localparam WRITEMODE_A = TRANSP2 ? "WRITETHROUGH" : "READBEFOREWRITE"; generate if (CFG_DBITS == 1) begin DP16KD #( @@ -32,12 +32,13 @@ module \$__ECP5_DP16KD (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); .CLKAMUX(CLKAMUX), .CLKBMUX(CLKBMUX), .WRITEMODE_A(WRITEMODE_A), + .WRITEMODE_B("READBEFOREWRITE"), .GSR("DISABLED") ) _TECHMAP_REPLACE_ ( `include "bram_conn_1.vh" .CLKA(CLK2), .CLKB(CLK3), - .WEA(1'b1), .CEA(|A1EN), .OCEA(1'b1), - .WEB(1'b0), .CEB(B1EN), .OCEB(1'b1), + .WEA(|A1EN), .CEA(1'b1), .OCEA(1'b1), + .WEB(1'b0), .CEB(1'b1), .OCEB(B1EN), .RSTA(1'b0), .RSTB(1'b0) ); end else if (CFG_DBITS == 2) begin @@ -48,12 +49,13 @@ module \$__ECP5_DP16KD (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); .CLKAMUX(CLKAMUX), .CLKBMUX(CLKBMUX), .WRITEMODE_A(WRITEMODE_A), + .WRITEMODE_B("READBEFOREWRITE"), .GSR("DISABLED") ) _TECHMAP_REPLACE_ ( `include "bram_conn_2.vh" .CLKA(CLK2), .CLKB(CLK3), - .WEA(1'b1), .CEA(|A1EN), .OCEA(1'b1), - .WEB(1'b0), .CEB(B1EN), .OCEB(1'b1), + .WEA(|A1EN), .CEA(1'b1), .OCEA(1'b1), + .WEB(1'b0), .CEB(1'b1), .OCEB(B1EN), .RSTA(1'b0), .RSTB(1'b0) ); end else if (CFG_DBITS <= 4) begin @@ -64,12 +66,13 @@ module \$__ECP5_DP16KD (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); .CLKAMUX(CLKAMUX), .CLKBMUX(CLKBMUX), .WRITEMODE_A(WRITEMODE_A), + .WRITEMODE_B("READBEFOREWRITE"), .GSR("DISABLED") ) _TECHMAP_REPLACE_ ( `include "bram_conn_4.vh" .CLKA(CLK2), .CLKB(CLK3), - .WEA(1'b1), .CEA(|A1EN), .OCEA(1'b1), - .WEB(1'b0), .CEB(B1EN), .OCEB(1'b1), + .WEA(|A1EN), .CEA(1'b1), .OCEA(1'b1), + .WEB(1'b0), .CEB(1'b1), .OCEB(B1EN), .RSTA(1'b0), .RSTB(1'b0) ); end else if (CFG_DBITS <= 9) begin @@ -80,12 +83,13 @@ module \$__ECP5_DP16KD (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); .CLKAMUX(CLKAMUX), .CLKBMUX(CLKBMUX), .WRITEMODE_A(WRITEMODE_A), + .WRITEMODE_B("READBEFOREWRITE"), .GSR("DISABLED") ) _TECHMAP_REPLACE_ ( `include "bram_conn_9.vh" .CLKA(CLK2), .CLKB(CLK3), - .WEA(1'b1), .CEA(|A1EN), .OCEA(1'b1), - .WEB(1'b0), .CEB(B1EN), .OCEB(1'b1), + .WEA(|A1EN), .CEA(1'b1), .OCEA(1'b1), + .WEB(1'b0), .CEB(1'b1), .OCEB(B1EN), .RSTA(1'b0), .RSTB(1'b0) ); end else if (CFG_DBITS <= 18) begin @@ -96,12 +100,13 @@ module \$__ECP5_DP16KD (CLK2, CLK3, A1ADDR, A1DATA, A1EN, B1ADDR, B1DATA, B1EN); .CLKAMUX(CLKAMUX), .CLKBMUX(CLKBMUX), .WRITEMODE_A(WRITEMODE_A), + .WRITEMODE_B("READBEFOREWRITE"), .GSR("DISABLED") ) _TECHMAP_REPLACE_ ( `include "bram_conn_18.vh" .CLKA(CLK2), .CLKB(CLK3), - .WEA(1'b1), .CEA(|A1EN), .OCEA(1'b1), - .WEB(1'b0), .CEB(B1EN), .OCEB(1'b1), + .WEA(|A1EN), .CEA(1'b1), .OCEA(1'b1), + .WEB(1'b0), .CEB(1'b1), .OCEB(B1EN), .RSTA(1'b0), .RSTB(1'b0) ); end else begin |