Skip to content

Commit 751b2d6

Browse files
committed
Merge remote-tracking branch 'origin/master' into secure-gpl-convergence-fixes
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2 parents 72f6f89 + d26bf27 commit 751b2d6

43 files changed

Lines changed: 367 additions & 436 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.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: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,13 @@ configuration file.
177177
| <a name="KLAYOUT_TECH_FILE"></a>KLAYOUT_TECH_FILE| A mapping from LEF/DEF to GDS using the KLayout tool.| |
178178
| <a name="LATCH_MAP_FILE"></a>LATCH_MAP_FILE| Optional mapping file supplied to Yosys to map latches| |
179179
| <a name="LAYER_PARASITICS_FILE"></a>LAYER_PARASITICS_FILE| Path to per layer parasitics file. Defaults to $(PLATFORM_DIR)/setRC.tcl.| |
180-
| <a name="LEC_AUX_VERILOG_FILES"></a>LEC_AUX_VERILOG_FILES| Additional Verilog files (e.g. blackbox stubs) to include in LEC equivalence checks. Appended to the generated Verilog netlist before running the formal equivalence check.| |
181-
| <a name="LEC_CHECK"></a>LEC_CHECK| Perform a formal equivalence check between before and after netlists. If this fails, report an issue to OpenROAD.| 0|
180+
| <a name="LEC_AUX_VERILOG_FILES"></a>LEC_AUX_VERILOG_FILES| Additional Verilog files (e.g. blackbox stubs) to include in generated netlists for formal equivalence checks.| |
181+
| <a name="LEC_CHECK"></a>LEC_CHECK| Perform formal equivalence checks between before and after netlists. This checks CTS repair timing and the initial synthesis netlist against the final netlist. If this fails, report an issue to OpenROAD.| $(if $(wildcard $(KEPLER_FORMAL_EXE)),1,0)|
182182
| <a name="LIB_FILES"></a>LIB_FILES| A Liberty file of the standard cell library with PVT characterization, input and output characteristics, timing and power definitions for each cell.| |
183183
| <a name="LIB_MODEL"></a>LIB_MODEL| Selects between NLDM and CCS timing models for the ASAP7 platform. Valid values: NLDM (default), CCS. Used in flow/platforms/asap7/config.mk to pick the LIB_DIR subdirectory and accumulate the corresponding $(CORNER)_$(LIB_MODEL)_LIB_FILES list, and in flow/scripts/load.tcl to gate CCS-specific Tcl branches.| NLDM|
184184
| <a name="MACRO_BLOCKAGE_HALO"></a>MACRO_BLOCKAGE_HALO| Distance beyond the edges of a macro that will also be covered by the blockage generated for that macro. Note that the default macro blockage halo comes from the largest of the specified MACRO_PLACE_HALO x or y values. This variable overrides that calculation.| |
185185
| <a name="MACRO_EXTENSION"></a>MACRO_EXTENSION| Sets the number of GCells added to the blockages boundaries from macros.| |
186-
| <a name="MACRO_PLACEMENT_TCL"></a>MACRO_PLACEMENT_TCL| Specifies the path of a TCL file on how to place macros manually. The user may choose to place just some of the macros in the design. The macro placer will handle the remaining unplaced macros.| |
186+
| <a name="MACRO_PLACEMENT_TCL"></a>MACRO_PLACEMENT_TCL| Specifies the path of a TCL file on how to place macros manually. The user may choose to place just some of the macros in the design. The macro placer will handle the remaining unplaced macros. Note that using the macro placement file generated by the macro placer will not result in the same global placement as actually running the macro placer: the macro placement file does not contain the locations that the macro placer generates for the standard cells, and those locations impact global placement.| |
187187
| <a name="MACRO_PLACE_HALO"></a>MACRO_PLACE_HALO| Horizontal/vertical halo around macros (microns). Used by automatic macro placement.| |
188188
| <a name="MACRO_ROWS_HALO_X"></a>MACRO_ROWS_HALO_X| Horizontal distance between the edge of the macro and the beginning of the rows created by tapcell. Only available for ASAP7 PDK and GF180/uart-blocks design.| |
189189
| <a name="MACRO_ROWS_HALO_Y"></a>MACRO_ROWS_HALO_Y| Vertical distance between the edge of the macro and the beginning of the rows created by tapcell. Only available for ASAP7 PDK and GF180/uart-blocks design.| |
@@ -278,6 +278,7 @@ configuration file.
278278
| <a name="SDC_FILE"></a>SDC_FILE| The path to design constraint (SDC) file.| |
279279
| <a name="SDC_GUT"></a>SDC_GUT| Load design and remove all internal logic before doing synthesis. This is useful when creating a mock .lef abstract that has a smaller area than the amount of logic would allow. bazel-orfs uses this to mock SRAMs, for instance.| |
280280
| <a name="SEAL_GDS"></a>SEAL_GDS| Seal macro to place around the design.| |
281+
| <a name="SEC_CHECK"></a>SEC_CHECK| Perform a sequential equivalence check between the initial synthesis netlist and final netlist with the Kepler Formal PDR engine. If this fails, report an issue to OpenROAD.| 0|
281282
| <a name="SETUP_MOVE_SEQUENCE"></a>SETUP_MOVE_SEQUENCE| Passed as -sequence to repair_timing. This should be a string of move keywords separated by commas.| |
282283
| <a name="SETUP_SLACK_MARGIN"></a>SETUP_SLACK_MARGIN| Specifies a time margin for the slack when fixing setup violations. This option allows you to overfix or underfix(negative value, terminate retiming before 0 or positive slack). See HOLD_SLACK_MARGIN for more details.| 0|
283284
| <a name="SET_RC_TCL"></a>SET_RC_TCL| Metal & Via RC definition file path.| |
@@ -296,7 +297,7 @@ configuration file.
296297
| <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|
297298
| <a name="SKIP_VT_SWAP"></a>SKIP_VT_SWAP| Do not perform VT swap to improve QoR (default: do VT swap).| |
298299
| <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.| |
300+
| <a name="SWAP_ARITH_OPERATORS"></a>SWAP_ARITH_OPERATORS| Improve timing QoR by swapping ALU and MULT arithmetic operators.| 0|
300301
| <a name="SYNTH_ARGS"></a>SYNTH_ARGS| Optional synthesis variables for yosys.| |
301302
| <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.| |
302303
| <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 +314,15 @@ configuration file.
313314
| <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|
314315
| <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.| |
315316
| <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.| |
317+
| <a name="SYNTH_OPT_HIER"></a>SYNTH_OPT_HIER| Optimize constants across hierarchical boundaries.| 0|
317318
| <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|
318319
| <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.| |
319320
| <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|
320321
| <a name="SYNTH_SLANG_ARGS"></a>SYNTH_SLANG_ARGS| Additional arguments passed to the slang frontend during synthesis.| |
321322
| <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|
322323
| <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.| |
323324
| <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.| |
325+
| <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|
325326
| <a name="TAPCELL_TCL"></a>TAPCELL_TCL| Path to Endcap and Welltie cells file.| |
326327
| <a name="TAP_CELL_NAME"></a>TAP_CELL_NAME| Name of the cell to use in tap cell insertion.| |
327328
| <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.| |
@@ -353,13 +354,16 @@ configuration file.
353354
- [DFF_MAP_FILE](#DFF_MAP_FILE)
354355
- [INFER_CLKGATES](#INFER_CLKGATES)
355356
- [LATCH_MAP_FILE](#LATCH_MAP_FILE)
357+
- [LEC_AUX_VERILOG_FILES](#LEC_AUX_VERILOG_FILES)
358+
- [LEC_CHECK](#LEC_CHECK)
356359
- [MIN_BUF_CELL_AND_PORTS](#MIN_BUF_CELL_AND_PORTS)
357360
- [NEG_CLKGATE_AND_PORTS](#NEG_CLKGATE_AND_PORTS)
358361
- [POST_SYNTH_TCL](#POST_SYNTH_TCL)
359362
- [POS_CLKGATE_AND_PORTS](#POS_CLKGATE_AND_PORTS)
360363
- [PRE_SYNTH_TCL](#PRE_SYNTH_TCL)
361364
- [SDC_FILE](#SDC_FILE)
362365
- [SDC_GUT](#SDC_GUT)
366+
- [SEC_CHECK](#SEC_CHECK)
363367
- [SKIP_REPORT_METRICS](#SKIP_REPORT_METRICS)
364368
- [SYNTH_ARGS](#SYNTH_ARGS)
365369
- [SYNTH_BLACKBOXES](#SYNTH_BLACKBOXES)
@@ -602,6 +606,8 @@ configuration file.
602606
- [CDL_FILE](#CDL_FILE)
603607
- [GDS_ALLOW_EMPTY](#GDS_ALLOW_EMPTY)
604608
- [GND_NETS_VOLTAGES](#GND_NETS_VOLTAGES)
609+
- [LEC_AUX_VERILOG_FILES](#LEC_AUX_VERILOG_FILES)
610+
- [LEC_CHECK](#LEC_CHECK)
605611
- [MAX_ROUTING_LAYER](#MAX_ROUTING_LAYER)
606612
- [MIN_ROUTING_LAYER](#MIN_ROUTING_LAYER)
607613
- [POST_DENSITY_FILL_TCL](#POST_DENSITY_FILL_TCL)
@@ -611,6 +617,7 @@ configuration file.
611617
- [PWR_NETS_VOLTAGES](#PWR_NETS_VOLTAGES)
612618
- [REPORT_CLOCK_SKEW](#REPORT_CLOCK_SKEW)
613619
- [ROUTING_LAYER_ADJUSTMENT](#ROUTING_LAYER_ADJUSTMENT)
620+
- [SEC_CHECK](#SEC_CHECK)
614621
- [SKIP_DETAILED_ROUTE](#SKIP_DETAILED_ROUTE)
615622
- [SKIP_REPORT_METRICS](#SKIP_REPORT_METRICS)
616623

‎etc/DependencyInstaller.sh‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fi
1313
cd "${_script_dir}/../"
1414

1515
# package versions
16-
klayoutVersion=0.30.7
16+
klayoutVersion=0.30.12
1717
if [[ "$OSTYPE" == "darwin"* ]]; then
1818
numThreads=$(sysctl -n hw.logicalcpu)
1919
else
@@ -262,11 +262,11 @@ _installUbuntuPackages() {
262262
fi
263263
else
264264
if [[ $1 == 20.04 ]]; then
265-
klayoutChecksum=e95175a8053d3577375fbd3a7b3d7dbf
265+
klayoutChecksum=146f51de7fcc760e51c7438998934d9d
266266
elif [[ $1 == 22.04 ]]; then
267-
klayoutChecksum=202530d198b0c7b93aa5af0e8e438ccd
267+
klayoutChecksum=6dfffa50f385881768dee30bdc759608
268268
elif [[ $1 == 24.04 ]]; then
269-
klayoutChecksum=145adaa044101bb41179aa63ec6d7f86
269+
klayoutChecksum=0181713e60891e461d6d1664c1b8e213
270270
else
271271
echo "Unsupported Ubuntu version $1. Supported versions: 20.04, 22.04, 24.04. Please upgrade to a supported LTS release or install KLayout ${klayoutVersion} manually from https://www.klayout.org/build.html"
272272
exit 1

0 commit comments

Comments
 (0)