Add unconditional match blocks for force RAM
authorEddie Hung <eddie@fpgeh.com>
Mon, 16 Dec 2019 21:31:15 +0000 (13:31 -0800)
committerEddie Hung <eddie@fpgeh.com>
Mon, 16 Dec 2019 21:31:15 +0000 (13:31 -0800)
techlibs/xilinx/xc7_xcu_brams.txt
tests/arch/xilinx/blockram.ys

index 60425fed92da3a9fbc8dd533f538a65406a83137..c63218ae1b500cc7d3a129d38e2ed9e06aa768d8 100644 (file)
@@ -77,7 +77,7 @@ endbram
 # https://www.xilinx.com/support/documentation/user_guides/ug473_7Series_Memory_Resources.pdf
 
 match $__XILINX_RAMB36_SDP
-  attribute !ram_style ram_style=block ram_block
+  attribute !ram_style
   attribute !logic_block
   min bits 1024
   min efficiency 5
@@ -86,8 +86,16 @@ match $__XILINX_RAMB36_SDP
   or_next_if_better
 endmatch
 
+match $__XILINX_RAMB36_SDP
+  attribute ram_style=block ram_block
+  attribute !logic_block
+  shuffle_enable B
+  make_transp
+  or_next_if_better
+endmatch
+
 match $__XILINX_RAMB18_SDP
-  attribute !ram_style ram_style=block ram_block
+  attribute !ram_style
   attribute !logic_block
   min bits 1024
   min efficiency 5
@@ -96,8 +104,16 @@ match $__XILINX_RAMB18_SDP
   or_next_if_better
 endmatch
 
+match $__XILINX_RAMB18_SDP
+  attribute ram_style=block ram_block
+  attribute !logic_block
+  shuffle_enable B
+  make_transp
+  or_next_if_better
+endmatch
+
 match $__XILINX_RAMB36_TDP
-  attribute !ram_style ram_style=block ram_block
+  attribute !ram_style
   attribute !logic_block
   min bits 1024
   min efficiency 5
@@ -106,12 +122,28 @@ match $__XILINX_RAMB36_TDP
   or_next_if_better
 endmatch
 
+match $__XILINX_RAMB36_TDP
+  attribute ram_style=block ram_block
+  attribute !logic_block
+  shuffle_enable B
+  make_transp
+  or_next_if_better
+endmatch
+
 match $__XILINX_RAMB18_TDP
-  attribute !ram_style ram_style=block ram_block
+  attribute !ram_style
   attribute !logic_block
   min bits 1024
   min efficiency 5
   shuffle_enable B
   make_transp
+  or_next_if_better
+endmatch
+
+match $__XILINX_RAMB18_TDP
+  attribute ram_style=block ram_block
+  attribute !logic_block
+  shuffle_enable B
+  make_transp
 endmatch
 
index 362d33229380f61f0842568715692d41422167d8..b6e10585442d1201124d77d8ddb3ff779c5deca7 100644 (file)
@@ -79,3 +79,12 @@ setattr -set logic_block 1 m:memory
 synth_xilinx -top sync_ram_sdp
 cd sync_ram_sdp
 select -assert-count 0 t:RAMB18E1
+
+design -reset
+read_verilog ../common/blockram.v
+hierarchy -top sync_ram_sdp -chparam ADDRESS_WIDTH 8 -chparam DATA_WIDTH 1
+setattr -set ram_style "block" m:memory
+dump m:*
+synth_xilinx -top sync_ram_sdp
+cd sync_ram_sdp
+select -assert-count 1 t:RAMB18E1