Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
donn committed Sep 10, 2024
2 parents b961029 + 6d00781 commit a4ebf77
Show file tree
Hide file tree
Showing 15 changed files with 100 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ body:
You also need to upload some files so we can reproduce your issue.
If a step fails, you can create a reproducible by going
into the step directory, then typing `openlane.steps create-reproducible -d .`
into the step directory, then typing `openlane.steps create-reproducible`
A new directory called `reproducible` should be created. Zip or tarball
that directory then upload by clicking and dragging the file to
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ jobs:
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
access-tokens = github.com=${{ env.GITHUB_TOKEN }}
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build with Nix
uses: ./.github/actions/build_nix
Expand All @@ -148,9 +146,7 @@ jobs:
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
access-tokens = github.com=${{ env.GITHUB_TOKEN }}
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build with Nix
uses: ./.github/actions/build_nix
Expand Down Expand Up @@ -182,9 +178,7 @@ jobs:
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
access-tokens = github.com=${{ env.GITHUB_TOKEN }}
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@main
# For some reason, GHA Macs are far more aggressively rate-limited with
# Volare than Linux
Expand Down Expand Up @@ -232,6 +226,9 @@ jobs:
fi
echo "NIX_SYSTEM=$nix_system" >> $GITHUB_ENV
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build with Nix
uses: ./.github/actions/build_nix
Expand Down Expand Up @@ -301,6 +298,9 @@ jobs:
git status || true
tree .git || true
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build with Nix
uses: ./.github/actions/build_nix
Expand Down
15 changes: 15 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@
## Documentation
-->

# 2.1.4

## Steps

* `OpenROAD.STA*PNR`
* New environment variable made accessible to SDC files used during
Multi-Corner STA steps, `OPENLANE_SDC_IDEAL_CLOCKS`, set to `1` for pre-PnR.
Band-aid until the SDC situation is properly discussed and addressed (in a
potentially breaking change.)
* Fixed issue where the clock was always propagated after `STAPrePNR`
regardless the information in the SDC file.
* For backwards compatibility, `STAPrePNR` unsets all propagated clocks and
the rest set all propagated clocks IF the SDC file lacks the strings
`set_propagated_clock` or `unset_propagated_clock`.

# 2.1.3

## Tool Updates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $ sudo apt-get install -y curl
After that, simply run this command:

```console
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm --extra-conf "
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/pr/1145 | sh -s -- install --no-confirm --extra-conf "
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Simply run this (entire) command in `Terminal.app`:

```console
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm --extra-conf "
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/pr/1145 | sh -s -- install --no-confirm --extra-conf "
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ $ sudo apt-get install -y curl
Then install Nix by running the following command:

```console
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --no-confirm --extra-conf "
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/pr/1145 | sh -s -- install --no-confirm --extra-conf "
extra-substituters = https://openlane.cachix.org
extra-trusted-public-keys = openlane.cachix.org-1:qqdwh+QMNGmZAuyeQJTH9ErW57OWSvdtuwfBKdS254E=
"
Expand Down
7 changes: 7 additions & 0 deletions openlane/scripts/base.sdc
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,10 @@ set_clock_transition $::env(CLOCK_TRANSITION_CONSTRAINT) $clocks
puts "\[INFO] Setting timing derate to: $::env(TIME_DERATING_CONSTRAINT)%"
set_timing_derate -early [expr 1-[expr $::env(TIME_DERATING_CONSTRAINT) / 100]]
set_timing_derate -late [expr 1+[expr $::env(TIME_DERATING_CONSTRAINT) / 100]]

if { [info exists ::env(OPENLANE_SDC_IDEAL_CLOCKS)] && $::env(OPENLANE_SDC_IDEAL_CLOCKS) } {
unset_propagated_clock [all_clocks]
} else {
set_propagated_clock [all_clocks]
}

10 changes: 10 additions & 0 deletions openlane/scripts/openroad/common/io.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ proc read_current_sdc {} {
exit 1
}

if { ![string_in_file $::env(_SDC_IN) "set_propagated_clock"] && ![string_in_file $::env(_SDC_IN) "unset_propagated_clock"] } {
if { [info exists ::env(OPENLANE_SDC_IDEAL_CLOCKS)] && $::env(OPENLANE_SDC_IDEAL_CLOCKS) } {
puts "\[INFO\] No information on clock propagation in input SDC file-- unpropagating all clocks."
unset_propagated_clock [all_clocks]
} else {
puts "\[INFO\] No information on clock propagation in input SDC file-- propagating all clocks."
set_propagated_clock [all_clocks]
}
}

# Restore Environment
unset ::env(IO_PCT)
unset ::env(SYNTH_TIMING_DERATE)
Expand Down
24 changes: 20 additions & 4 deletions openlane/scripts/openroad/sta/corner.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ if { [namespace exists ::ord] } {
}
read_spefs

if { $::env(STEP_ID) != "OpenROAD.STAPrePNR"} {
set_propagated_clock [all_clocks]
}

set corner [lindex [sta::corners] 0]
sta::set_cmd_corner $corner

Expand Down Expand Up @@ -328,6 +324,26 @@ write_metric_num "timing__setup_r2r__ws__corner:[$corner name]" $worst_r2r_setup
write_metric_int "timing__setup_r2r_vio__count__corner:[$corner name]" $r2r_setup_vios
puts "%OL_END_REPORT"

puts "%OL_CREATE_REPORT unpropagated.rpt"

foreach clock [all_clocks] {
if { ![get_property $clock propagated] } {
puts "[get_property $clock full_name]"
}
}

puts "%OL_END_REPORT"


# puts "%OL_CREATE_REPORT clock.rpt"

# foreach clock [all_clocks] {
# report_clock_properties $clock
# report_clock_latency -clock $clock
# report_clock_min_period -clocks [get_property $clock name]
# }

# puts "%OL_END_REPORT"

write_sdfs
write_libs
20 changes: 17 additions & 3 deletions openlane/steps/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,13 +447,15 @@ def create_reproducible(


@command(formatter_settings=formatter_settings, hidden=True)
@argument(
"step_dir",
@o(
"-d",
"--step-dir",
type=Path(
exists=False,
file_okay=False,
dir_okay=True,
),
help="The step directory from which to create the test. If provided, --config and the input state can be omitted, and vice versa.",
default=None,
)
@o(
Expand All @@ -465,8 +467,20 @@ def create_reproducible(
),
default=None,
)
@argument(
"step_dir_arg",
type=Path(
exists=False,
file_okay=False,
dir_okay=True,
),
default=None,
required=False,
nargs=1,
)
@pass_context
def create_test(ctx, step_dir, output):
def create_test(ctx, step_dir, step_dir_arg, output):
step_dir = step_dir or step_dir_arg or os.getcwd()
config = os.path.join(step_dir, "config.json")
state_in = os.path.join(step_dir, "state_in.json")
if output is None:
Expand Down
14 changes: 14 additions & 0 deletions openlane/steps/openroad.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,12 +702,21 @@ class STAPrePNR(MultiCornerSTA):
If timing information is not available for a Macro, the macro in question
will be black-boxed.
During this step, the special variable `OPENLANE_SDC_IDEAL_CLOCKS` is
exposed to SDC files with a value of `1`. We encourage PNR SDC files to use
ideal clocks at this stage based on this variable's existence and value.
"""

id = "OpenROAD.STAPrePNR"
name = "STA (Pre-PnR)"
long_name = "Static Timing Analysis (Pre-PnR)"

def prepare_env(self, env: Dict, state: State) -> Dict:
env = super().prepare_env(env, state)
env["OPENLANE_SDC_IDEAL_CLOCKS"] = "1"
return env

def run_corner(
self, state_in: State, current_env: Dict[str, Any], corner: str, corner_dir: str
) -> Dict[str, Any]:
Expand Down Expand Up @@ -743,6 +752,10 @@ class STAPostPNR(STAPrePNR):
Performs multi-corner `Static Timing Analysis <https://en.wikipedia.org/wiki/Static_timing_analysis>`_
using OpenSTA on the post-PnR Verilog netlist, with extracted parasitics for
both the top-level module and any associated macros.
During this step, the special variable `OPENLANE_SDC_IDEAL_CLOCKS` is
exposed to SDC files with a value of `0`. We encourage PNR SDC files to use
propagated clocks at this stage based on this variable's existence and value.
"""

id = "OpenROAD.STAPostPNR"
Expand All @@ -764,6 +777,7 @@ def prepare_env(self, env: dict, state: State) -> dict:
env = super().prepare_env(env, state)
if signoff_sdc_file := self.config["SIGNOFF_SDC_FILE"]:
env["_SDC_IN"] = signoff_sdc_file
env["OPENLANE_SDC_IDEAL_CLOCKS"] = "0"
return env

def filter_unannotated_report(
Expand Down
2 changes: 1 addition & 1 deletion openlane/steps/yosys.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ class SynthesisCommon(YosysStep):
# Variable(
# "SYNTH_SDC_FILE",
# Optional[Path],
# "Specifies the SDC file read during all Synthesis steps",
# "Specifies the SDC file to be read prior to PnR steps.",
# ),
]

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openlane"
version = "2.1.3"
version = "2.1.4"
description = "An infrastructure for implementing chip design flows"
authors = ["Efabless Corporation and Contributors <[email protected]>"]
readme = "Readme.md"
Expand Down
2 changes: 1 addition & 1 deletion test/designs
Submodule designs updated 1 files
+2 −1 EF_UART/config.json
2 changes: 1 addition & 1 deletion test/steps/all
Submodule all updated 33 files
+0 −5,386 by_id/netgen.lvs/003-fail-no-flatten/spm.pnl.v
+1 −0 by_id/netgen.lvs/003-fail-no-flatten/spm.pnl.v
+0 −1,181 by_id/netgen.lvs/003-fail-no-flatten/spm.spice
+1 −0 by_id/netgen.lvs/003-fail-no-flatten/spm.spice
+0 −1 by_id/netgen.lvs/003-fail-no-flatten/state_in.json
+1 −0 by_id/netgen.lvs/003-fail-no-flatten/state_in.json
+1 −0 by_id/openroad.stapostpnr/002-success-auto-propagate/config.json
+35 −0 by_id/openroad.stapostpnr/002-success-auto-propagate/handler.py
+1 −0 by_id/openroad.stapostpnr/002-success-auto-propagate/process_input.py.ref
+157 −0 by_id/openroad.stapostpnr/002-success-auto-propagate/state_in.json
+ by_id/openroad.stapostpnr/002-success-auto-propagate/xtea.def.gz
+ by_id/openroad.stapostpnr/002-success-auto-propagate/xtea.max.spef.gz
+ by_id/openroad.stapostpnr/002-success-auto-propagate/xtea.min.spef.gz
+16,685 −0 by_id/openroad.stapostpnr/002-success-auto-propagate/xtea.nl.v
+ by_id/openroad.stapostpnr/002-success-auto-propagate/xtea.nom.spef.gz
+33 −0 by_id/openroad.stapostpnr/002-success-auto-propagate/xtea.sdc
+1 −0 by_id/openroad.stapostpnr/003-success-no-auto-propagate/config.json
+37 −0 by_id/openroad.stapostpnr/003-success-no-auto-propagate/handler.py
+1 −0 by_id/openroad.stapostpnr/003-success-no-auto-propagate/process_input.py.ref
+1 −0 by_id/openroad.stapostpnr/003-success-no-auto-propagate/state_in.json
+1 −0 by_id/openroad.stapostpnr/003-success-no-auto-propagate/xtea.def.gz
+1 −0 by_id/openroad.stapostpnr/003-success-no-auto-propagate/xtea.max.spef.gz
+1 −0 by_id/openroad.stapostpnr/003-success-no-auto-propagate/xtea.min.spef.gz
+1 −0 by_id/openroad.stapostpnr/003-success-no-auto-propagate/xtea.nl.v
+1 −0 by_id/openroad.stapostpnr/003-success-no-auto-propagate/xtea.nom.spef.gz
+40 −0 by_id/openroad.stapostpnr/003-success-no-auto-propagate/xtea.sdc
+1 −0 by_id/openroad.staprepnr/002-success-auto-ideal/config.json
+35 −0 by_id/openroad.staprepnr/002-success-auto-ideal/handler.py
+1 −0 by_id/openroad.staprepnr/002-success-auto-ideal/state_in.json
+15,221 −0 by_id/openroad.staprepnr/002-success-auto-ideal/xtea.nl.v
+33 −0 by_id/openroad.staprepnr/002-success-auto-ideal/xtea.sdc
+1 −0 by_id/openroad.staprepnr/003-success-no-auto-ideal/config.json
+37 −0 by_id/openroad.staprepnr/003-success-no-auto-ideal/handler.py
+1 −0 by_id/openroad.staprepnr/003-success-no-auto-ideal/state_in.json
+1 −0 by_id/openroad.staprepnr/003-success-no-auto-ideal/xtea.nl.v
+40 −0 by_id/openroad.staprepnr/003-success-no-auto-ideal/xtea.sdc

0 comments on commit a4ebf77

Please sign in to comment.