Skip to content

Commit 772ba49

Browse files
committed
docs: add some tips on large designs
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent da6546c commit 772ba49

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docs/user/LargeDesigns.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Tips on building large design
2+
3+
Large designs can quickly result in unmanageable turnaround times for tweaking and fixing if the design contains behavioral memory models, because these memories are by default translated to flip flops.
4+
5+
ORFS has a `SYNTH_MEMORY_MAX_BITS` that limits the size of inferred memories that are translated to flip flops to avoid doomed synthesis runs that will "running forever", instead ORFS will error out early, normally within minutes.
6+
7+
Behavioral models of memories are used in simulation and FPGA tools oftentimes automatically combine hard memory macros with some extra logic to match the behavioral model. OpenROAD does not do such automatic memory inference and matching against real memories or fakemem.
8+
9+
## Doing a screening build
10+
11+
Before deciding how to set up a flow, it is useful to do a "screening build". All we're intersted in here is to know which modules we have and their relative sizes. This can help us identify memories that have not been successfully inferred by Yosys, which will manifest itself as very long synthesis times and appear in the OpenROAD hierarchical view with a large number of instances.
12+
13+
The [minimal build configuration](flow/designs/asap7/minimal/README.md)
14+
can be useful to do a screening build.
15+
16+
Options useful for a screening build are, check out [config.mk](flow/designs/asap7/minimal/config.mk):
17+
18+
- `SYNTH_HIERARCHICAL=1` and `SYNTH_MINIMUM_KEEP_SIZE=0`, to see all modules in the hierarchical OpenROAD view
19+
- `SYNTH_MEMORY_MAX_BITS=1024`, set a low threshold initially to get an error with list of memories in the system that will need to be dealt with in some way
20+
- `SYNTH_MOCK_LARGE_MEMORIES=1` enabled after first seeing the error report with memories. This sets the number of rows in memories larger than `SYNTH_MEMORY_MAX_BITS` to 1, so that synthesis will complete.
21+
22+
## Next steps on memories
23+
24+
- If you're taping out, write some wrapper Verilog for real memories.
25+
- fakemem can be a good option if available for your PDK. fakemem also needs manually written Verilog wrappers, just like real memories.
26+
- For architectural exploration, `SYNTH_MOCK_LARGE_MEMORIES=1` could give you adequate timing accuracy and is convenient.

0 commit comments

Comments
 (0)