BRAM not being utilized in spite of it being recognised during synthesis #577
-
I am copying the text of the question I just asked in Xilinx forums: I have designed a system with Bluespec SV (BSV), but when I implement the generated Verilog design with Vivado 2021.1, no BRAM is used. I am using a BRAM2Server BSV module in my design, which is generated as an array of registers in Verilog with a wrapper around it. Vivado is not putting the array in BRAM during synthesis though, even if I explicitly add the (* ram_style = "block" *) attribute in front of the array at the generated Verilog. Even with the -verbose attribute given to synthesis, the only thing that appears in the synthesis report is the following: INFO: [Synth 8-7030] Implemented Non-Cascaded Block Ram (cascade_height = 1) of width 9 for RAM "BRAM2Load:/RAM_reg" I have tried different sizes of arrays (1KB - 32KB) in case BRAM usage was inefficient because of the array's size, but no. What am I missing? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I don't have experience with this, so hopefully someone who does (here or on the Xilinx forums) will respond. If I were try to help, I would start by asking what "no BRAM is used" means -- what are you actually observing that makes you say this? Also, does the synthesized design run successfully on FPGA? (thus showing that the array is actually being used, and hasn't been optimized away, say) But the reason I wanted to comment, was this that you said:
The is no array in the generated Verilog files; the array is in a file |
Beta Was this translation helpful? Give feedback.
Update: I did what I mentioned before and had the same problem.
Nonetheless, I figured out what the problem was and it had nothing to do with BSV, but I will write the answer here in case people have the same issue.
I synthesized the same design with an older version of Vivado (2018.3) to see if the messages change, and it was eliminating the BRAM because "it was not being used" (in spite of it being used and WORKING in the implemented version!)
The problem was that I was initializing the BRAM module with a .txt/.mem file and I was using it as a look-up table, hence I was never writing to it! The moment I added a dummy cycle where I am writing 1 word to it after reset, Vivado decided to k…