Closed kangliyu1 closed 1 month ago
You could reduce the number of lines of code in the initial block by using something like $readmemb
or $readmemh
to initialize the contents from a separate file. But this will only improve code cleanliness, it should not affect the resulting synthesis.
For your question on reducing the resource usage, this is harder to say. You're doing custom synthesis which has resulted in mapping ultimately to $_DFF_P_
which is a Yosys internal cell that will usually get mapped by a liberty file onto a technology specific primitive. You are not actually mapping to a BRAM. I am not sure if this was your intent, but there's not enough information in the output from Yosys you provided to fully understand what happens when this gets run.
For what it's worth, I would check to see what things are looking like right before the memory_map
step runs. Since that pass will convert any memories not mapped already by the techmap
pass above into DFF
based memories that eventually get mapped to the $_DFF_P_
internal primitives you see in your results.
Closing as stale. @kangliyu1 If you still want the original questions answered please reopen the issue or, preferably, open a discussion thread.
Hello! When I used script 1 to synthesize the code1 below, I found that the circuit occupied too many resources. After thinking, I found that the initail part caused too much resource occupancy. How should I deal with this problem?Can the BRAM in it use a file like coe or other methods to pre-store the data initialized in initail into the BRAM? I hope you can give some pointers. The comprehensive results are shown in Figure 1:
code1:
script 1:
fig1: