Skip to content

Commit 6cdcd45

Browse files
committed
Merge remote-tracking branch 'origin/master' into secure-rsz-default-max-fanout-50
Signed-off-by: minjukim55 <mkim@precisioninno.com> # Conflicts: # tools/OpenROAD
2 parents baa6992 + d9b02cc commit 6cdcd45

17 files changed

Lines changed: 853 additions & 1066 deletions

File tree

‎.bazelrc‎

Lines changed: 0 additions & 31 deletions
This file was deleted.

‎docs/user/AutoMemories.md‎

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,6 @@ clear error.
130130
## Trying it
131131

132132
```shell
133-
# Unit tests (fast, no EDA tools):
134-
bazelisk test //flow:memories_tests
135-
136-
# The demo design:
137133
make DESIGN_CONFIG=designs/asap7/tinyRocket/config.mk synth floorplan
138134
```
139135

@@ -148,15 +144,35 @@ python3 flow/scripts/memories/gen_memories.py \
148144
## Consuming from bazel-orfs
149145

150146
Everything downstream keys off generated files, so a build system can
151-
declare them as ordinary stage outputs and transitive dependencies. In
152-
bazel-orfs each stage runs in a sandbox where only declared outputs
153-
survive, so it additionally needs to declare `memories.json` plus the
154-
`memories/` directory (a directory artifact — the per-memory file
155-
names are only known at run time) as canonicalize outputs and stage
156-
them into every downstream stage's sandbox. The bazel-orfs change that
157-
does this is carried alongside this feature as
158-
`flow/scripts/memories/bazel-orfs-auto-memories.patch`, to be
159-
upstreamed to bazel-orfs once the feature lands here.
147+
declare them as ordinary stage outputs and transitive dependencies.
148+
149+
A sandboxed build system, where only declared outputs survive a step and
150+
only declared inputs are present, needs three things:
151+
152+
- `memories.json` and the `memories/` directory declared as outputs of
153+
canonicalization. `memories/` has to be a directory rather than a file
154+
list: the per-memory file names are only known once the RTL is
155+
scanned.
156+
- both staged into every later step, because the flow reads them by
157+
globbing the results dir (`load.tcl` takes `memories/*.lef`,
158+
`read_liberty.tcl` takes `memories/*.lib`) rather than through a
159+
variable.
160+
- `memories_inferred.json` staged into synthesis as well. Nothing reads
161+
it there, but `make` walks the prerequisites of `yosys-dependencies`
162+
before running it, and each one depends on the next:
163+
164+
```make
165+
yosys-dependencies: $(RESULTS_DIR)/memories.json
166+
$(RESULTS_DIR)/memories.json: $(RESULTS_DIR)/memories_inferred.json ...
167+
$(RESULTS_DIR)/memories_inferred.json: $(VERILOG_FILES) ...
168+
```
169+
170+
With the far end of that chain absent, make rebuilds
171+
`memories_inferred.json` -- re-running detection at a point in the
172+
flow where the design is no longer the original RTL -- and then tries
173+
to rewrite `memories.json`.
174+
175+
bazel-orfs implements this.
160176

161177
## Variables
162178

‎docs/user/FlowVariables.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ configuration file.
296296
| <a name="SKIP_REPORT_METRICS"></a>SKIP_REPORT_METRICS| If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds.| 0|
297297
| <a name="SKIP_VT_SWAP"></a>SKIP_VT_SWAP| Do not perform VT swap to improve QoR (default: do VT swap).| |
298298
| <a name="SLEW_MARGIN"></a>SLEW_MARGIN| Specifies a slew margin when fixing max slew violations. This option allows you to overfix.| |
299-
| <a name="SWAP_ARITH_OPERATORS"></a>SWAP_ARITH_OPERATORS| Improve timing QoR by swapping ALU and MULT arithmetic operators.| |
299+
| <a name="SWAP_ARITH_OPERATORS"></a>SWAP_ARITH_OPERATORS| Improve timing QoR by swapping ALU and MULT arithmetic operators.| 0|
300300
| <a name="SYNTH_ARGS"></a>SYNTH_ARGS| Optional synthesis variables for yosys.| |
301301
| <a name="SYNTH_BLACKBOXES"></a>SYNTH_BLACKBOXES| List of cells treated as a black box by Yosys. With Bazel, this can be used to run synthesis in parallel for the large modules of the design. Non-existant modules are ignored silently, useful when listing modules statically, even if modules come and go dynamically.| |
302302
| <a name="SYNTH_CANONICALIZE_TCL"></a>SYNTH_CANONICALIZE_TCL| Specifies a Tcl script with commands to run as part of the synth canonicalize step.| |
@@ -313,15 +313,15 @@ configuration file.
313313
| <a name="SYNTH_MOCK_LARGE_MEMORIES"></a>SYNTH_MOCK_LARGE_MEMORIES| Reduce Yosys inferred memories larger than SYNTH_MEMORY_MAX_BITS to 1 row. Yosys will generally infer memories from behavioral Verilog code, whether the memories are in standalone modules or instantiated within some larger module. fakeram and empty Verilog memories(blackboxes) of memories will not be inferred memories by Yosys and are therefore not affected by this variable. This is useful and convenient to separate the concern of instantiating and placing memories from investigating other issues with a design, though it comes at the expense of the increased accuracy that using realistic fakemem would provide. Memories with a single 1 row will of course have unrealistically good timing and area characteristics, but timing will still correctly terminate in a register. Large port memories, typically register files, will still have the retain a lot of the port logic that can be useful to investigate issues. This can be especially useful during development of designs where the behavioral model comes first and suitable memories are matched up when the design RTL is stable. A typical use case would be Chisel which will generate a behavioral model for a memories with the required clocks, ports, etc. in addition to a computer readable file with the specification of the memories that is used to [automatically](https://chipyard.readthedocs.io/en/stable/Tools/Barstools.html/) match up suitable memory macros later in the flow. During an architectural screening study, a large range of memory configurations can be investigated quickly with this option, without getting bogged down in the concern of how to realize the memories in silicon for emphemral RTL configurations that exist only long enough to run through the ORFS flow to create a table of some characteristics of a design configuration.| 0|
314314
| <a name="SYNTH_NETLIST_FILES"></a>SYNTH_NETLIST_FILES| Skips synthesis and uses the supplied netlist files. If the netlist files contains duplicate modules, which can happen when using hierarchical synthesis on indvidual netlist files and combining here, subsequent modules are silently ignored and only the first module is used.| |
315315
| <a name="SYNTH_OPERATIONS_ARGS"></a>SYNTH_OPERATIONS_ARGS| Extra arguments appended to the Yosys synth command operations list. When set, replaces the default Kogge-Stone adder extra-map.| |
316-
| <a name="SYNTH_OPT_HIER"></a>SYNTH_OPT_HIER| Optimize constants across hierarchical boundaries.| |
316+
| <a name="SYNTH_OPT_HIER"></a>SYNTH_OPT_HIER| Optimize constants across hierarchical boundaries.| 0|
317317
| <a name="SYNTH_REPEATABLE_BUILD"></a>SYNTH_REPEATABLE_BUILD| License to prune anything that makes builds less repeatable, typically used with Bazel to ensure that builds are bit-for-bit identical so that caching works optimally. Removes debug information that encodes paths, timestamps, etc.| 0|
318318
| <a name="SYNTH_RETIME_MODULES"></a>SYNTH_RETIME_MODULES| *This is an experimental option and may cause adverse effects.* *No effort has been made to check if the retimed RTL is logically equivalent to the non-retimed RTL.* List of modules to apply automatic retiming to. These modules must not get dissolved and as such they should either be the top module or be included in SYNTH_KEEP_MODULES. The main use case is to quickly identify if performance can be improved by manually retiming the input RTL. Retiming will treat module ports like register endpoints/startpoints. The objective function of retiming isn't informed by SDC, even the clock period is ignored. As such, retiming will optimize for best delay at potentially high register number cost. Automatic retiming can produce suboptimal results as its timing model is crude and it doesn't find the optimal distribution of registers on long pipelines. See OR discussion # 8080.| |
319319
| <a name="SYNTH_SKIP_KEEP"></a>SYNTH_SKIP_KEEP| Only meaningful together with SYNTH_CHECKPOINT. When set, signals that the supplied checkpoint is still canonical RTLIL (coarse synth and `keep_hierarchy` have not been run yet), so synth.tcl runs the full coarse+fine synthesis flattened. When unset and SYNTH_CHECKPOINT is used, synth.tcl assumes the checkpoint already has coarse synth + `keep_hierarchy` done and resumes from `coarse:fine`.| 0|
320320
| <a name="SYNTH_SLANG_ARGS"></a>SYNTH_SLANG_ARGS| Additional arguments passed to the slang frontend during synthesis.| |
321321
| <a name="SYNTH_USE_SYN"></a>SYNTH_USE_SYN| If set to 1, run synthesis using the "syn" tool built into OpenROAD (the synth_syn.tcl flow) instead of the default Yosys-based flow. Defaults to 0 (Yosys flow).| 0|
322322
| <a name="SYNTH_WRAPPED_ADDERS"></a>SYNTH_WRAPPED_ADDERS| Specify the adder modules that can be used for synthesis, separated by commas. The default adder module is determined by the first element of this variable.| |
323323
| <a name="SYNTH_WRAPPED_MULTIPLIERS"></a>SYNTH_WRAPPED_MULTIPLIERS| Specify the multiplier modules that can be used for synthesis, separated by commas. The default multiplier module is determined by the first element of this variable.| |
324-
| <a name="SYNTH_WRAPPED_OPERATORS"></a>SYNTH_WRAPPED_OPERATORS| Synthesize multiple architectural options for each arithmetic operator in the design. These options are available for switching among in later stages of the flow.| |
324+
| <a name="SYNTH_WRAPPED_OPERATORS"></a>SYNTH_WRAPPED_OPERATORS| Synthesize multiple architectural options for each arithmetic operator in the design. These options are available for switching among in later stages of the flow.| 0|
325325
| <a name="TAPCELL_TCL"></a>TAPCELL_TCL| Path to Endcap and Welltie cells file.| |
326326
| <a name="TAP_CELL_NAME"></a>TAP_CELL_NAME| Name of the cell to use in tap cell insertion.| |
327327
| <a name="TECH_LEF"></a>TECH_LEF| A technology LEF file of the PDK that includes all relevant information regarding metal layers, vias, and spacing requirements.| |

0 commit comments

Comments
 (0)