Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check tool versions at beginning of run #2000

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

troibe
Copy link
Contributor

@troibe troibe commented Sep 27, 2023

Why?
Currently even on a local run we only check if the tool version is correct and the tool exists when executing a node.
This leads to failures in the middle of the run and is annoying to the user.

What?
If the nodes are executed locally then we check at the beginning of the run if all tools are present and have right version.

How?
We use the same tool version check that we use when executing a node but run it also at the start of the run.

Issues:
Some tools like iverilog produce their binary while executing the flow.
These binaries can't be version checked in the beginning of the run.

Before:

| INFO    | /home/martin-zeroasic/coding/siliconcompiler/examples/gcd/gcd.v inferred as rtl/verilog
| INFO    | /home/martin-zeroasic/coding/siliconcompiler/examples/gcd/gcd.sdc inferred as constraint/sdc
| INFO    | job0 | --        | - | Setting up node import0 with surelog/parse
| INFO    | job0 | --        | - | Setting up node syn0 with yosys/syn_asic
| INFO    | job0 | --        | - | Setting up node floorplan0 with openroad/floorplan
| INFO    | job0 | --        | - | Setting up node place0 with openroad/place
| INFO    | job0 | --        | - | Setting up node cts0 with openroad/cts
| INFO    | job0 | --        | - | Setting up node route0 with openroad/route
| INFO    | job0 | --        | - | Setting up node dfm0 with openroad/dfm
| INFO    | job0 | --        | - | Setting up node export0 with klayout/export
| INFO    | job0 | --        | - | Setting up node export1 with openroad/export
| INFO    | job0 | --        | - | Checking manifest before running.
| INFO    | job0 | import    | 0 | Tool 'surelog' found with version '1.71' in directory '/usr/local/bin'
| INFO    | job0 | import    | 0 | Running in /tmp/pytest-of-martin-zeroasic/pytest-24/test_py_read_manifest0/build/gcd/job0/import/0
| INFO    | job0 | import    | 0 | surelog -nocache +libext+.sv+.v -parse -nouhdm /home/martin-zeroasic/coding/siliconcompiler/examples/gcd/gcd.v -top gcd
| INFO    | job0 | import    | 0 | Computing hash value for [tool,surelog,task,parse,output]
| INFO    | job0 | import    | 0 | Computing hash value for [input,rtl,verilog]
| INFO    | job0 | import    | 0 | Finished task in 0.59s
| INFO    | job0 | syn       | 0 | Tool 'yosys' found with version '0.31+16' in directory '/usr/local/bin'
| INFO    | job0 | syn       | 0 | Running in /tmp/pytest-of-martin-zeroasic/pytest-24/test_py_read_manifest0/build/gcd/job0/syn/0
| INFO    | job0 | syn       | 0 | yosys -c /home/martin-zeroasic/coding/siliconcompiler/siliconcompiler/tools/yosys/sc_syn.tcl
| INFO    | job0 | syn       | 0 | Computing hash value for [tool,yosys,task,syn_asic,output]
| INFO    | job0 | syn       | 0 | Computing hash value for [library,nangate45,output,typical,nldm]
| INFO    | job0 | syn       | 0 | Computing hash value for [library,nangate45,option,file,yosys_addermap]
| INFO    | job0 | syn       | 0 | Finished task in 2.4s
| INFO    | job0 | floorplan | 0 | Tool 'openroad' found with version 'v2.0-9907' in directory '/usr/local/bin'
| ERROR   | job0 | floorplan | 0 | Version check failed for openroad. Check installation.
| ERROR   | job0 | floorplan | 0 | Found version v2.0-9907, did not satisfy any version specifier set >=v2.0-10370.
| ERROR   | job0 | floorplan | 0 | Halting step 'floorplan' index '0' due to errors.

After:


-------------------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------------------
| INFO    | gcd.v inferred as rtl/verilog
| INFO    | rtl2gds | --        | - | Setting up node import0 with surelog/parse
| INFO    | rtl2gds | --        | - | Tool 'surelog' found with version '1.71' in directory '/usr/local/bin'
| INFO    | rtl2gds | --        | - | Setting up node syn0 with yosys/syn_asic
| INFO    | rtl2gds | --        | - | Tool 'yosys' found with version '0.31+16' in directory '/usr/local/bin'
| INFO    | rtl2gds | --        | - | Setting up node floorplan0 with openroad/floorplan
| INFO    | rtl2gds | --        | - | Tool 'openroad' found with version 'v2.0-9907' in directory '/usr/local/bin'
| ERROR   | rtl2gds | --        | - | Version check failed for openroad. Check installation.
| ERROR   | rtl2gds | --        | - | Found version v2.0-9907, did not satisfy any version specifier set >=v2.0-10370.
| ERROR   | rtl2gds | --        | - | Halting step 'floorplan' index '0' due to errors.

Testing:

  • tests/core/test_error_manifest.py and tests/core/test_fail_early.py needed to be added to the eda tests since we are now checking earlier if their executable is present
  • tests/core/test_version_early.py

@troibe troibe requested a review from gadfort September 27, 2023 12:23
Copy link
Contributor

@gadfort gadfort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be a separate function we can all after node setup and after manifest checking.

siliconcompiler/core.py Outdated Show resolved Hide resolved
siliconcompiler/core.py Outdated Show resolved Hide resolved
siliconcompiler/core.py Outdated Show resolved Hide resolved
siliconcompiler/core.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants