Skip to content

Commit a8a4733

Browse files
committed
flow: declare LIB_MODEL + MIN_CLK_ROUTING_LAYER + SDC_FILE_EXTRA
bazel-orfs validates every variable used by a design's config.mk against flow/scripts/variables.yaml. These three are real ORFS variables already used by platform configs, Tcl scripts, or recognised by bazel-orfs as source-typed, but were missing schema declarations, which made the bazel load phase fail for any design that referenced them: - LIB_MODEL: selects NLDM vs CCS lib files in flow/platforms/asap7/config.mk and gates CCS-specific branches in flow/scripts/load.tcl. Used by asap7/gcd-ccs and asap7/swerv_wrapper. - MIN_CLK_ROUTING_LAYER: lower bound for clock-net routing in flow/platforms/{asap7,sky130hd,nangate45,sky130hs}/fastroute.tcl. Platforms set defaults; designs (asap7/riscv32i-mock-sram fakeram, sky130hd/ibex) override. No stages: list — floorplan.tcl sources the platform fastroute.tcl too, mirroring MIN/MAX_ROUTING_LAYER. - SDC_FILE_EXTRA: per-design extra Tcl hook source'd from a design's own SDC / io.tcl. bazel-orfs's config_mk_parser already classifies this as a source-typed (path-label) variable in SOURCE_VARS, so the value is staged into the sandbox. Used by asap7/mock-cpu. flow/scripts/variables.json and docs/user/FlowVariables.md regenerated via flow/scripts/yaml_to_json.py and flow/scripts/generate-variables-docs.py so the derived artefacts stay in sync. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 6c587df commit a8a4733

3 files changed

Lines changed: 38 additions & 0 deletions

File tree

‎docs/user/FlowVariables.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ configuration file.
173173
| <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.| |
174174
| <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|
175175
| <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.| |
176+
| <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|
176177
| <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.| |
177178
| <a name="MACRO_EXTENSION"></a>MACRO_EXTENSION| Sets the number of GCells added to the blockages boundaries from macros.| |
178179
| <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.| |
@@ -188,6 +189,7 @@ configuration file.
188189
| <a name="MAX_REPAIR_TIMING_ITER"></a>MAX_REPAIR_TIMING_ITER| Maximum number of iterations for repair setup and repair hold.| |
189190
| <a name="MAX_ROUTING_LAYER"></a>MAX_ROUTING_LAYER| The highest metal layer name to be used in routing.| |
190191
| <a name="MIN_BUF_CELL_AND_PORTS"></a>MIN_BUF_CELL_AND_PORTS| Used to insert a buffer cell to pass through wires. Used in synthesis.| |
192+
| <a name="MIN_CLK_ROUTING_LAYER"></a>MIN_CLK_ROUTING_LAYER| The lowest metal layer name to be used for clock-net routing in global routing. Used in flow/platforms/*/fastroute.tcl as the lower bound of `set_routing_layers -clock`. Typically higher than MIN_ROUTING_LAYER so clock nets prefer the upper, lower-RC layers. No `stages:` list because floorplan.tcl also `source`s the platform fastroute.tcl.| |
191193
| <a name="MIN_PLACE_STEP_COEF"></a>MIN_PLACE_STEP_COEF| Sets the minimum phi coefficient (pcof_min / µ_k Lower Bound) for global placement optimization. This parameter controls the step size lower bound in the RePlAce Nesterov optimization algorithm. Lower values may improve convergence but can increase runtime. Valid range: 0.95-1.05| 0.95|
192194
| <a name="MIN_ROUTING_LAYER"></a>MIN_ROUTING_LAYER| The lowest metal layer name to be used in routing.| |
193195
| <a name="NUM_CORES"></a>NUM_CORES| Passed to `openroad -threads $(NUM_CORES)`, defaults to numbers of cores in system as determined by system specific code in Makefile, `nproc` is tried first. OpenROAD does not limit itself to this number of cores across OpenROAD running instances, which can lead to overprovisioning in contexts such as bazel-orfs where there could be many routing, or place jobs running at the same time.| |
@@ -266,6 +268,7 @@ configuration file.
266268
| <a name="RUN_SCRIPT"></a>RUN_SCRIPT| Path to script to run from `make run`, python or tcl script detected by .py or .tcl extension.| |
267269
| <a name="SC_LEF"></a>SC_LEF| Path to technology standard cell LEF file.| |
268270
| <a name="SDC_FILE"></a>SDC_FILE| The path to design constraint (SDC) file.| |
271+
| <a name="SDC_FILE_EXTRA"></a>SDC_FILE_EXTRA| Path to an extra Tcl file the design's own SDC / io.tcl can `source` for per-design hooks (constraints that don't fit cleanly in the shared SDC_FILE). bazel-orfs classifies this as a source-typed variable (path label), so the value is staged into the sandbox. Used by flow/designs/asap7/mock-cpu.| |
269272
| <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.| |
270273
| <a name="SEAL_GDS"></a>SEAL_GDS| Seal macro to place around the design.| |
271274
| <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.| |
@@ -643,7 +646,9 @@ configuration file.
643646
- [KLAYOUT_TECH_FILE](#KLAYOUT_TECH_FILE)
644647
- [LAYER_PARASITICS_FILE](#LAYER_PARASITICS_FILE)
645648
- [LIB_FILES](#LIB_FILES)
649+
- [LIB_MODEL](#LIB_MODEL)
646650
- [MACRO_EXTENSION](#MACRO_EXTENSION)
651+
- [MIN_CLK_ROUTING_LAYER](#MIN_CLK_ROUTING_LAYER)
647652
- [PLATFORM](#PLATFORM)
648653
- [PLATFORM_TCL](#PLATFORM_TCL)
649654
- [PROCESS](#PROCESS)
@@ -654,6 +659,7 @@ configuration file.
654659
- [RUN_LOG_NAME_STEM](#RUN_LOG_NAME_STEM)
655660
- [RUN_SCRIPT](#RUN_SCRIPT)
656661
- [SC_LEF](#SC_LEF)
662+
- [SDC_FILE_EXTRA](#SDC_FILE_EXTRA)
657663
- [SEAL_GDS](#SEAL_GDS)
658664
- [SET_RC_TCL](#SET_RC_TCL)
659665
- [SLEW_MARGIN](#SLEW_MARGIN)

‎flow/scripts/variables.json‎

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎flow/scripts/variables.yaml‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,14 @@ LIB_FILES:
151151
A Liberty file of the standard cell library with PVT characterization,
152152
input and output characteristics, timing and power definitions for each
153153
cell.
154+
LIB_MODEL:
155+
description: >
156+
Selects between NLDM and CCS timing models for the ASAP7 platform.
157+
Valid values: NLDM (default), CCS. Used in
158+
flow/platforms/asap7/config.mk to pick the LIB_DIR subdirectory and
159+
accumulate the corresponding $(CORNER)_$(LIB_MODEL)_LIB_FILES list,
160+
and in flow/scripts/load.tcl to gate CCS-specific Tcl branches.
161+
default: NLDM
154162
PLATFORM_TCL:
155163
description: |
156164
Specifies a Tcl script with commands to run before loading design.
@@ -832,6 +840,13 @@ MAX_ROUTING_LAYER:
832840
- grt
833841
- route
834842
- final
843+
MIN_CLK_ROUTING_LAYER:
844+
description: >
845+
The lowest metal layer name to be used for clock-net routing in global
846+
routing. Used in flow/platforms/*/fastroute.tcl as the lower bound of
847+
`set_routing_layers -clock`. Typically higher than MIN_ROUTING_LAYER so
848+
clock nets prefer the upper, lower-RC layers. No `stages:` list because
849+
floorplan.tcl also `source`s the platform fastroute.tcl.
835850
VIA_IN_PIN_MIN_LAYER:
836851
description: >
837852
Passed as -via_in_pin_bottom_layer to pin_access and detailed_route.
@@ -915,6 +930,13 @@ SDC_FILE:
915930
The path to design constraint (SDC) file.
916931
stages:
917932
- synth
933+
SDC_FILE_EXTRA:
934+
description: >
935+
Path to an extra Tcl file the design's own SDC / io.tcl can `source`
936+
for per-design hooks (constraints that don't fit cleanly in the shared
937+
SDC_FILE). bazel-orfs classifies this as a source-typed variable
938+
(path label), so the value is staged into the sandbox. Used by
939+
flow/designs/asap7/mock-cpu.
918940
SDC_GUT:
919941
description: >
920942
Load design and remove all internal logic before doing synthesis. This is

0 commit comments

Comments
 (0)