siliconcompiler 0.30.0__py3-none-any.whl → 0.31.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- siliconcompiler/_metadata.py +1 -1
- siliconcompiler/apps/sc_install.py +26 -4
- siliconcompiler/apps/sc_remote.py +1 -3
- siliconcompiler/core.py +24 -9
- siliconcompiler/flowgraph.py +11 -23
- siliconcompiler/{package.py → package/__init__.py} +62 -176
- siliconcompiler/package/git.py +81 -0
- siliconcompiler/package/https.py +93 -0
- siliconcompiler/remote/schema.py +9 -8
- siliconcompiler/report/report.py +4 -3
- siliconcompiler/scheduler/__init__.py +127 -113
- siliconcompiler/scheduler/docker_runner.py +4 -4
- siliconcompiler/scheduler/run_node.py +3 -3
- siliconcompiler/scheduler/send_messages.py +1 -1
- siliconcompiler/schema/schema_cfg.py +367 -357
- siliconcompiler/schema/schema_obj.py +39 -29
- siliconcompiler/schema/utils.py +19 -0
- siliconcompiler/sphinx_ext/schemagen.py +3 -1
- siliconcompiler/templates/replay/replay.sh.j2 +92 -0
- siliconcompiler/templates/tcl/manifest.tcl.j2 +1 -1
- siliconcompiler/tools/_common/__init__.py +8 -2
- siliconcompiler/tools/_common/asic.py +1 -1
- siliconcompiler/tools/_common/tcl/sc_pin_constraints.tcl +3 -5
- siliconcompiler/tools/genfasm/genfasm.py +1 -1
- siliconcompiler/tools/klayout/export.py +5 -0
- siliconcompiler/tools/klayout/klayout.py +18 -1
- siliconcompiler/tools/klayout/klayout_export.py +4 -1
- siliconcompiler/tools/klayout/klayout_operations.py +5 -2
- siliconcompiler/tools/klayout/klayout_utils.py +23 -0
- siliconcompiler/tools/klayout/operations.py +5 -0
- siliconcompiler/tools/magic/magic.py +1 -1
- siliconcompiler/tools/openroad/_apr.py +14 -3
- siliconcompiler/tools/openroad/antenna_repair.py +2 -1
- siliconcompiler/tools/openroad/clock_tree_synthesis.py +2 -1
- siliconcompiler/tools/openroad/detailed_placement.py +2 -1
- siliconcompiler/tools/openroad/detailed_route.py +8 -0
- siliconcompiler/tools/openroad/fillercell_insertion.py +2 -1
- siliconcompiler/tools/openroad/global_placement.py +2 -1
- siliconcompiler/tools/openroad/pin_placement.py +2 -1
- siliconcompiler/tools/openroad/rdlroute.py +4 -0
- siliconcompiler/tools/openroad/repair_design.py +2 -1
- siliconcompiler/tools/openroad/repair_timing.py +2 -1
- siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +6 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +1 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_detailed_route.tcl +8 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_global_placement.tcl +1 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_global_route.tcl +2 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_init_floorplan.tcl +3 -3
- siliconcompiler/tools/openroad/scripts/apr/sc_macro_placement.tcl +5 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_power_grid.tcl +1 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_design.tcl +1 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +3 -0
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +29 -12
- siliconcompiler/tools/openroad/scripts/common/reports.tcl +15 -0
- siliconcompiler/tools/openroad/scripts/common/write_images.tcl +28 -0
- siliconcompiler/tools/openroad/scripts/sc_rdlroute.tcl +3 -13
- siliconcompiler/tools/vpr/vpr.py +86 -6
- siliconcompiler/tools/yosys/__init__.py +7 -0
- siliconcompiler/tools/yosys/sc_syn.tcl +33 -24
- siliconcompiler/tools/yosys/syn_asic.py +27 -0
- siliconcompiler/tools/yosys/syn_asic.tcl +27 -0
- siliconcompiler/toolscripts/_tools.json +15 -3
- siliconcompiler/toolscripts/rhel8/install-yosys-moosic.sh +17 -0
- siliconcompiler/toolscripts/rhel8/install-yosys-slang.sh +22 -0
- siliconcompiler/toolscripts/rhel9/install-yosys-moosic.sh +17 -0
- siliconcompiler/toolscripts/rhel9/install-yosys-slang.sh +22 -0
- siliconcompiler/toolscripts/ubuntu20/install-yosys-moosic.sh +17 -0
- siliconcompiler/toolscripts/ubuntu20/install-yosys-slang.sh +22 -0
- siliconcompiler/toolscripts/ubuntu22/install-yosys-moosic.sh +17 -0
- siliconcompiler/toolscripts/ubuntu22/install-yosys-slang.sh +22 -0
- siliconcompiler/toolscripts/ubuntu24/install-yosys-moosic.sh +17 -0
- siliconcompiler/toolscripts/ubuntu24/install-yosys-slang.sh +22 -0
- siliconcompiler/utils/__init__.py +33 -5
- {siliconcompiler-0.30.0.dist-info → siliconcompiler-0.31.1.dist-info}/METADATA +21 -23
- {siliconcompiler-0.30.0.dist-info → siliconcompiler-0.31.1.dist-info}/RECORD +79 -66
- {siliconcompiler-0.30.0.dist-info → siliconcompiler-0.31.1.dist-info}/WHEEL +1 -1
- {siliconcompiler-0.30.0.dist-info → siliconcompiler-0.31.1.dist-info}/entry_points.txt +4 -0
- {siliconcompiler-0.30.0.dist-info → siliconcompiler-0.31.1.dist-info}/LICENSE +0 -0
- {siliconcompiler-0.30.0.dist-info → siliconcompiler-0.31.1.dist-info}/top_level.txt +0 -0
|
@@ -217,6 +217,33 @@ def setup_asic(chip):
|
|
|
217
217
|
chip.set('tool', tool, 'task', task, 'file', 'synth_extra_map',
|
|
218
218
|
'Files used in synthesis to perform additional techmapping', field='help')
|
|
219
219
|
|
|
220
|
+
chip.set('tool', tool, 'task', task, 'var', 'lock_design', False,
|
|
221
|
+
step=step, index=index,
|
|
222
|
+
clobber=False)
|
|
223
|
+
chip.set('tool', tool, 'task', task, 'var', 'lock_design',
|
|
224
|
+
'true/false, if true will attempt to lock the design with moosic',
|
|
225
|
+
field='help')
|
|
226
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
227
|
+
",".join(['tool', tool, 'task', task, 'var', 'lock_design']),
|
|
228
|
+
step=step, index=index)
|
|
229
|
+
chip.set('tool', tool, 'task', task, 'var', 'lock_design_key',
|
|
230
|
+
'lock locking key',
|
|
231
|
+
field='help')
|
|
232
|
+
chip.set('tool', tool, 'task', task, 'var', 'lock_design_port', 'moosic_key',
|
|
233
|
+
step=step, index=index,
|
|
234
|
+
clobber=False)
|
|
235
|
+
chip.set('tool', tool, 'task', task, 'var', 'lock_design_port',
|
|
236
|
+
'lock locking port name',
|
|
237
|
+
field='help')
|
|
238
|
+
if chip.get('tool', tool, 'task', task, 'var', 'lock_design', step=step, index=index)[0] == \
|
|
239
|
+
'true':
|
|
240
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
241
|
+
",".join(['tool', tool, 'task', task, 'var', 'lock_design_key']),
|
|
242
|
+
step=step, index=index)
|
|
243
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
244
|
+
",".join(['tool', tool, 'task', task, 'var', 'lock_design_port']),
|
|
245
|
+
step=step, index=index)
|
|
246
|
+
|
|
220
247
|
|
|
221
248
|
################################
|
|
222
249
|
# mark cells dont use and format liberty files for yosys and abc
|
|
@@ -217,6 +217,33 @@ if { !$flatten_design && [lindex [sc_cfg_tool_task_get var auto_flatten] 0] == "
|
|
|
217
217
|
# Finish synthesis
|
|
218
218
|
yosys synth {*}$synth_args -top $sc_design -run fine:check
|
|
219
219
|
|
|
220
|
+
# Logic locking
|
|
221
|
+
if { [lindex [sc_cfg_tool_task_get var lock_design] 0] == "true" } {
|
|
222
|
+
if { [sc_load_plugin moosic] } {
|
|
223
|
+
# moosic cannot handle hierarchy
|
|
224
|
+
foreach module [get_modules "*"] {
|
|
225
|
+
yosys select -module $module
|
|
226
|
+
yosys setattr -mod -unset keep_hierarchy
|
|
227
|
+
yosys select -clear
|
|
228
|
+
}
|
|
229
|
+
yosys flatten
|
|
230
|
+
yosys opt -fast
|
|
231
|
+
|
|
232
|
+
set ll_port [lindex [sc_cfg_tool_task_get var lock_design_port] 0]
|
|
233
|
+
set ll_key [lindex [sc_cfg_tool_task_get var lock_design_key] 0]
|
|
234
|
+
set ll_bits [expr { 4 * [string length $ll_key] }]
|
|
235
|
+
yosys select -module $sc_design
|
|
236
|
+
yosys logic_locking \
|
|
237
|
+
-nb-locked $ll_bits \
|
|
238
|
+
-key $ll_key \
|
|
239
|
+
-port-name $ll_port
|
|
240
|
+
yosys tee -o reports/logic_locking.rpt {ll_show}
|
|
241
|
+
yosys select -clear
|
|
242
|
+
} else {
|
|
243
|
+
puts "ERROR: unable to load moosic"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
220
247
|
# https://github.com/hdl/bazel_rules_hdl/blob/4cca75f32a3869a57c0635bc7426a696a15ec143/synthesis/synth.tcl#L54C1-L58C26
|
|
221
248
|
# Remove $print cells. These cells represent Verilog $display() tasks.
|
|
222
249
|
# Some place and route tools cannot handle these in the output Verilog,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"openroad": {
|
|
3
3
|
"git-url": "https://github.com/The-OpenROAD-Project/OpenROAD.git",
|
|
4
|
-
"git-commit": "
|
|
4
|
+
"git-commit": "1d7f91584c040b73089e415ec12fd806da1c1161",
|
|
5
5
|
"docker-cmds": [
|
|
6
6
|
"# Remove OR-Tools files",
|
|
7
7
|
"RUN rm -f $SC_PREFIX/Makefile $SC_PREFIX/README.md",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"sv2v": {
|
|
47
47
|
"git-url": "https://github.com/zachjs/sv2v.git",
|
|
48
|
-
"git-commit": "
|
|
48
|
+
"git-commit": "5d5723f65dd4501d17004736d7d048bea7ef2339",
|
|
49
49
|
"auto-update": true
|
|
50
50
|
},
|
|
51
51
|
"verilator": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"vpr": {
|
|
68
68
|
"git-url": "https://github.com/verilog-to-routing/vtr-verilog-to-routing.git",
|
|
69
|
-
"git-commit": "
|
|
69
|
+
"git-commit": "v9.0.0",
|
|
70
70
|
"auto-update": false
|
|
71
71
|
},
|
|
72
72
|
"icepack": {
|
|
@@ -136,5 +136,17 @@
|
|
|
136
136
|
"git-commit": "v3.3.116",
|
|
137
137
|
"git-url": "https://github.com/gtkwave/gtkwave.git",
|
|
138
138
|
"auto-update": false
|
|
139
|
+
},
|
|
140
|
+
"yosys-slang": {
|
|
141
|
+
"git-url": "https://github.com/povik/yosys-slang.git",
|
|
142
|
+
"git-commit": "8f2239b2b12dac43f8f47f56deef1095d5262fa2",
|
|
143
|
+
"docker-depends": "yosys",
|
|
144
|
+
"auto-update": true
|
|
145
|
+
},
|
|
146
|
+
"yosys-moosic": {
|
|
147
|
+
"git-url": "https://github.com/gadfort/moosic-yosys-plugin.git",
|
|
148
|
+
"git-commit": "5dd1d8a60d0cc7228be856350bb90faad24dae9e",
|
|
149
|
+
"docker-depends": "yosys",
|
|
150
|
+
"auto-update": true
|
|
139
151
|
}
|
|
140
152
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-url) yosys-moosic
|
|
12
|
+
cd yosys-moosic
|
|
13
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
|
|
14
|
+
|
|
15
|
+
make -j$(nproc)
|
|
16
|
+
sudo PATH="$PATH" make install
|
|
17
|
+
cd -
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
python3 -m venv .yosys-slang --clear
|
|
12
|
+
. .yosys-slang/bin/activate
|
|
13
|
+
python3 -m pip install cmake
|
|
14
|
+
|
|
15
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-url) yosys-slang
|
|
16
|
+
cd yosys-slang
|
|
17
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-commit)
|
|
18
|
+
git submodule update --init --recursive
|
|
19
|
+
|
|
20
|
+
make -j$(nproc)
|
|
21
|
+
sudo PATH="$PATH" make install
|
|
22
|
+
cd -
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-url) yosys-moosic
|
|
12
|
+
cd yosys-moosic
|
|
13
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
|
|
14
|
+
|
|
15
|
+
make -j$(nproc)
|
|
16
|
+
sudo PATH="$PATH" make install
|
|
17
|
+
cd -
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
python3 -m venv .yosys-slang --clear
|
|
12
|
+
. .yosys-slang/bin/activate
|
|
13
|
+
python3 -m pip install cmake
|
|
14
|
+
|
|
15
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-url) yosys-slang
|
|
16
|
+
cd yosys-slang
|
|
17
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-commit)
|
|
18
|
+
git submodule update --init --recursive
|
|
19
|
+
|
|
20
|
+
make -j$(nproc)
|
|
21
|
+
sudo PATH="$PATH" make install
|
|
22
|
+
cd -
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-url) yosys-moosic
|
|
12
|
+
cd yosys-moosic
|
|
13
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
|
|
14
|
+
|
|
15
|
+
make -j$(nproc)
|
|
16
|
+
sudo PATH="$PATH" make install
|
|
17
|
+
cd -
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
python3 -m venv .yosys-slang --clear
|
|
12
|
+
. .yosys-slang/bin/activate
|
|
13
|
+
python3 -m pip install cmake
|
|
14
|
+
|
|
15
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-url) yosys-slang
|
|
16
|
+
cd yosys-slang
|
|
17
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-commit)
|
|
18
|
+
git submodule update --init --recursive
|
|
19
|
+
|
|
20
|
+
make -j$(nproc)
|
|
21
|
+
sudo PATH="$PATH" make install
|
|
22
|
+
cd -
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-url) yosys-moosic
|
|
12
|
+
cd yosys-moosic
|
|
13
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
|
|
14
|
+
|
|
15
|
+
make -j$(nproc)
|
|
16
|
+
sudo PATH="$PATH" make install
|
|
17
|
+
cd -
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
python3 -m venv .yosys-slang --clear
|
|
12
|
+
. .yosys-slang/bin/activate
|
|
13
|
+
python3 -m pip install cmake
|
|
14
|
+
|
|
15
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-url) yosys-slang
|
|
16
|
+
cd yosys-slang
|
|
17
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-commit)
|
|
18
|
+
git submodule update --init --recursive
|
|
19
|
+
|
|
20
|
+
make -j$(nproc)
|
|
21
|
+
sudo PATH="$PATH" make install
|
|
22
|
+
cd -
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-url) yosys-moosic
|
|
12
|
+
cd yosys-moosic
|
|
13
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
|
|
14
|
+
|
|
15
|
+
make -j$(nproc)
|
|
16
|
+
sudo PATH="$PATH" make install
|
|
17
|
+
cd -
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
# Get directory of script
|
|
6
|
+
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
|
+
|
|
8
|
+
mkdir -p deps
|
|
9
|
+
cd deps
|
|
10
|
+
|
|
11
|
+
python3 -m venv .yosys-slang --clear
|
|
12
|
+
. .yosys-slang/bin/activate
|
|
13
|
+
python3 -m pip install cmake
|
|
14
|
+
|
|
15
|
+
git clone $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-url) yosys-slang
|
|
16
|
+
cd yosys-slang
|
|
17
|
+
git checkout $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-commit)
|
|
18
|
+
git submodule update --init --recursive
|
|
19
|
+
|
|
20
|
+
make -j$(nproc)
|
|
21
|
+
sudo PATH="$PATH" make install
|
|
22
|
+
cd -
|
|
@@ -332,17 +332,20 @@ def grep(chip, args, line):
|
|
|
332
332
|
|
|
333
333
|
|
|
334
334
|
#######################################
|
|
335
|
-
def _resolve_env_vars(chip, filepath):
|
|
335
|
+
def _resolve_env_vars(chip, filepath, step, index):
|
|
336
336
|
if not filepath:
|
|
337
337
|
return None
|
|
338
338
|
|
|
339
339
|
env_save = os.environ.copy()
|
|
340
|
-
|
|
341
|
-
|
|
340
|
+
|
|
341
|
+
os.environ.update(get_env_vars(chip, step, index))
|
|
342
342
|
resolved_path = os.path.expandvars(filepath)
|
|
343
|
+
|
|
343
344
|
os.environ.clear()
|
|
344
345
|
os.environ.update(env_save)
|
|
345
346
|
|
|
347
|
+
resolved_path = os.path.expanduser(resolved_path)
|
|
348
|
+
|
|
346
349
|
# variables that don't exist in environment get ignored by `expandvars`,
|
|
347
350
|
# but we can do our own error checking to ensure this doesn't result in
|
|
348
351
|
# silent bugs
|
|
@@ -353,8 +356,31 @@ def _resolve_env_vars(chip, filepath):
|
|
|
353
356
|
return resolved_path
|
|
354
357
|
|
|
355
358
|
|
|
359
|
+
#######################################
|
|
360
|
+
def get_env_vars(chip, step, index):
|
|
361
|
+
'''
|
|
362
|
+
Returns a dictionary of environmental variables from the manifest
|
|
363
|
+
'''
|
|
364
|
+
|
|
365
|
+
schema_env = {}
|
|
366
|
+
for env in chip.getkeys('option', 'env'):
|
|
367
|
+
schema_env[env] = chip.get('option', 'env', env)
|
|
368
|
+
|
|
369
|
+
flow = chip.get('option', 'flow')
|
|
370
|
+
if step is not None and index is not None and flow:
|
|
371
|
+
tool = chip.get('flowgraph', flow, step, str(index), 'tool')
|
|
372
|
+
task = chip.get('flowgraph', flow, step, str(index), 'task')
|
|
373
|
+
|
|
374
|
+
if chip.valid('tool', tool, 'task', task, 'env'):
|
|
375
|
+
for env in chip.getkeys('tool', tool, 'task', task, 'env'):
|
|
376
|
+
schema_env[env] = chip.get('tool', tool, 'task', task, 'env', env,
|
|
377
|
+
step=step, index=index)
|
|
378
|
+
|
|
379
|
+
return schema_env
|
|
380
|
+
|
|
381
|
+
|
|
356
382
|
###########################################################################
|
|
357
|
-
def find_sc_file(chip, filename, missing_ok=False, search_paths=None):
|
|
383
|
+
def find_sc_file(chip, filename, missing_ok=False, search_paths=None, step=None, index=None):
|
|
358
384
|
"""
|
|
359
385
|
Returns the absolute path for the filename provided.
|
|
360
386
|
|
|
@@ -370,6 +396,8 @@ def find_sc_file(chip, filename, missing_ok=False, search_paths=None):
|
|
|
370
396
|
found, rather than returning None.
|
|
371
397
|
search_paths (list): List of directories to search under instead of
|
|
372
398
|
the defaults.
|
|
399
|
+
step (str): Step name
|
|
400
|
+
index (str): Index
|
|
373
401
|
|
|
374
402
|
Returns:
|
|
375
403
|
Returns absolute path of 'filename' if found, otherwise returns
|
|
@@ -385,7 +413,7 @@ def find_sc_file(chip, filename, missing_ok=False, search_paths=None):
|
|
|
385
413
|
return None
|
|
386
414
|
|
|
387
415
|
# Replacing environment variables
|
|
388
|
-
filename = _resolve_env_vars(chip, filename)
|
|
416
|
+
filename = _resolve_env_vars(chip, filename, step, index)
|
|
389
417
|
|
|
390
418
|
# If we have an absolute path, pass-through here
|
|
391
419
|
if os.path.isabs(filename) and os.path.exists(filename):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: siliconcompiler
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.31.1
|
|
4
4
|
Summary: A compiler framework that automates translation from source code to silicon.
|
|
5
5
|
Author-email: Andreas Olofsson <andreas.d.olofsson@gmail.com>
|
|
6
6
|
License: Apache License 2.0
|
|
@@ -26,7 +26,7 @@ Requires-Python: >=3.8
|
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
27
|
License-File: LICENSE
|
|
28
28
|
Requires-Dist: aiohttp==3.10.11; python_version <= "3.8"
|
|
29
|
-
Requires-Dist: aiohttp==3.11.
|
|
29
|
+
Requires-Dist: aiohttp==3.11.13; python_version >= "3.9"
|
|
30
30
|
Requires-Dist: requests==2.32.3
|
|
31
31
|
Requires-Dist: PyYAML==6.0.2
|
|
32
32
|
Requires-Dist: pandas>=1.1.5
|
|
@@ -39,7 +39,7 @@ Requires-Dist: Pillow==10.4.0; python_version <= "3.8"
|
|
|
39
39
|
Requires-Dist: Pillow==11.1.0; python_version >= "3.9"
|
|
40
40
|
Requires-Dist: GitPython==3.1.44
|
|
41
41
|
Requires-Dist: lambdapdk>=0.1.47
|
|
42
|
-
Requires-Dist: PyGithub==2.6.
|
|
42
|
+
Requires-Dist: PyGithub==2.6.1
|
|
43
43
|
Requires-Dist: urllib3>=1.26.0
|
|
44
44
|
Requires-Dist: fasteners==0.19
|
|
45
45
|
Requires-Dist: fastjsonschema==2.21.1
|
|
@@ -48,13 +48,13 @@ Requires-Dist: importlib_metadata; python_version < "3.10"
|
|
|
48
48
|
Requires-Dist: sc-surelog==1.84.1
|
|
49
49
|
Requires-Dist: orjson==3.10.15
|
|
50
50
|
Requires-Dist: streamlit==1.40.1; python_version <= "3.8"
|
|
51
|
-
Requires-Dist: streamlit==1.42.
|
|
51
|
+
Requires-Dist: streamlit==1.42.2; python_version >= "3.9" and python_full_version != "3.9.7"
|
|
52
52
|
Requires-Dist: streamlit_agraph==0.0.45; python_full_version != "3.9.7"
|
|
53
53
|
Requires-Dist: streamlit-antd-components==0.3.2; python_full_version != "3.9.7"
|
|
54
54
|
Requires-Dist: streamlit_javascript==0.1.5; python_full_version != "3.9.7"
|
|
55
55
|
Requires-Dist: streamlit-autorefresh==1.0.1; python_full_version != "3.9.7"
|
|
56
56
|
Provides-Extra: test
|
|
57
|
-
Requires-Dist: pytest==8.3.
|
|
57
|
+
Requires-Dist: pytest==8.3.5; extra == "test"
|
|
58
58
|
Requires-Dist: pytest-xdist==3.6.1; extra == "test"
|
|
59
59
|
Requires-Dist: pytest-timeout==2.3.1; extra == "test"
|
|
60
60
|
Requires-Dist: pytest-asyncio==0.24.0; python_version <= "3.8" and extra == "test"
|
|
@@ -65,10 +65,10 @@ Requires-Dist: responses==0.25.6; extra == "test"
|
|
|
65
65
|
Requires-Dist: PyVirtualDisplay==3.0; extra == "test"
|
|
66
66
|
Provides-Extra: lint
|
|
67
67
|
Requires-Dist: flake8==7.1.2; extra == "lint"
|
|
68
|
-
Requires-Dist: tclint==0.5.
|
|
68
|
+
Requires-Dist: tclint==0.5.3; extra == "lint"
|
|
69
69
|
Requires-Dist: codespell==2.4.1; extra == "lint"
|
|
70
70
|
Provides-Extra: docs
|
|
71
|
-
Requires-Dist: Sphinx==8.
|
|
71
|
+
Requires-Dist: Sphinx==8.2.3; extra == "docs"
|
|
72
72
|
Requires-Dist: pip-licenses==5.0.0; extra == "docs"
|
|
73
73
|
Requires-Dist: pydata-sphinx-theme==0.16.1; extra == "docs"
|
|
74
74
|
Requires-Dist: sc-leflib>=0.2.0; extra == "docs"
|
|
@@ -99,19 +99,19 @@ SiliconCompiler is a modular hardware build system ("make for silicon"). The pro
|
|
|
99
99
|
|
|
100
100
|
| Type | Supported|
|
|
101
101
|
|------|----------|
|
|
102
|
-
|**Design Languages**| C, Verilog, SV, VHDL, Chisel, Migen/Amaranth, Bluespec
|
|
102
|
+
|**Design Languages**| C, Verilog, SV, VHDL, Chisel, Migen/Amaranth, Bluespec, [MLIR](https://en.wikipedia.org/wiki/MLIR_(software))
|
|
103
103
|
|**Simulation Tools**| Verilator, Icarus, GHDL, Xyce
|
|
104
104
|
|**Synthesis**| Yosys, Vivado, Synopsys, Cadence
|
|
105
|
-
|**ASIC APR**|
|
|
105
|
+
|**ASIC APR**| OpenROAD, Synopsys, Cadence
|
|
106
106
|
|**FPGA APR**| VPR, nextpnr, Vivado
|
|
107
|
-
|**Layout Viewer**| Klayout,
|
|
108
|
-
|**DRC/LVS**| Magic, Synopsys, Siemens
|
|
109
|
-
|**PDKs**| sky130, gf180, asap7, freepdk45, gf12lp, gf22fdx, intel16
|
|
107
|
+
|**Layout Viewer**| Klayout, OpenROAD, Cadence, Synopsys
|
|
108
|
+
|**DRC/LVS**| Klayout, Magic, Synopsys, Siemens
|
|
109
|
+
|**PDKs**| sky130, ihp130, gf180, asap7, freepdk45, gf12lp, gf22fdx, intel16
|
|
110
110
|
|
|
111
111
|
# Getting Started
|
|
112
112
|
|
|
113
113
|
SiliconCompiler is available as wheel packages on PyPI for macOS, Windows and
|
|
114
|
-
Linux platforms. For working Python 3.8-3.
|
|
114
|
+
Linux platforms. For working Python 3.8-3.13 environment, just use pip.
|
|
115
115
|
|
|
116
116
|
```sh
|
|
117
117
|
python3 -m pip install --upgrade siliconcompiler
|
|
@@ -166,17 +166,15 @@ A. Olofsson, W. Ransohoff, N. Moroze, "[Invited: A Distributed Approach to Silic
|
|
|
166
166
|
Bibtex:
|
|
167
167
|
```
|
|
168
168
|
@inproceedings{10.1145/3489517.3530673,
|
|
169
|
-
author = {Olofsson, Andreas and Ransohoff, William and Moroze, Noah},
|
|
170
|
-
title = {A Distributed Approach to Silicon Compilation: Invited},
|
|
171
|
-
year = {2022},
|
|
172
|
-
booktitle = {Proceedings of the 59th ACM/IEEE Design Automation Conference},
|
|
173
|
-
pages = {1343–1346},
|
|
174
|
-
location = {San Francisco, California}
|
|
169
|
+
author = {Olofsson, Andreas and Ransohoff, William and Moroze, Noah},
|
|
170
|
+
title = {A Distributed Approach to Silicon Compilation: Invited},
|
|
171
|
+
year = {2022},
|
|
172
|
+
booktitle = {Proceedings of the 59th ACM/IEEE Design Automation Conference},
|
|
173
|
+
pages = {1343–1346},
|
|
174
|
+
location = {San Francisco, California}
|
|
175
175
|
}
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
|
|
179
|
-
|
|
180
178
|
# Installation
|
|
181
179
|
|
|
182
180
|
Complete installation instructions are available in the [Installation Guide](https://docs.siliconcompiler.com/en/stable/user_guide/installation.html).
|
|
@@ -194,14 +192,14 @@ python3 -m pip install -e .[docs,test] # Optional install step for generating d
|
|
|
194
192
|
|
|
195
193
|
Installation instructions for all external tools can be found in the
|
|
196
194
|
[External Tools](https://docs.siliconcompiler.com/en/stable/user_guide/installation.html#external-tools) section
|
|
197
|
-
of the user guide. We have included shell setup scripts (Ubuntu) for most of the supported tools.
|
|
195
|
+
of the user guide. We have included shell setup scripts (Ubuntu) for most of the supported tools, which can be accessed via [sc-install](https://docs.siliconcompiler.com/en/latest/reference_manual/apps.html#apps-sc-install-ref).
|
|
198
196
|
See the [./siliconcompiler/toolscripts](./siliconcompiler/toolscripts) directory for a complete set of scripts and [./siliconcompiler/toolscripts/_tools.json](./siliconcompiler/toolscripts/_tools.json) for the currently recommended tool versions.
|
|
199
197
|
|
|
200
198
|
# Contributing
|
|
201
199
|
|
|
202
200
|
SiliconCompiler is an open-source project and welcomes contributions. To find out
|
|
203
201
|
how to contribute to the project, see our
|
|
204
|
-
[Contributing Guidelines
|
|
202
|
+
[Contributing Guidelines](./CONTRIBUTING.md).
|
|
205
203
|
|
|
206
204
|
# Issues / Bugs
|
|
207
205
|
|