siliconcompiler 0.29.0__py3-none-any.whl → 0.29.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/__init__.py +26 -0
- siliconcompiler/apps/utils/replay.py +96 -38
- siliconcompiler/checklists/__init__.py +12 -0
- siliconcompiler/core.py +75 -10
- siliconcompiler/flows/__init__.py +34 -0
- siliconcompiler/flows/showflow.py +1 -1
- siliconcompiler/libs/__init__.py +5 -0
- siliconcompiler/optimizer/__init__.py +199 -0
- siliconcompiler/optimizer/vizier.py +259 -0
- siliconcompiler/pdks/__init__.py +5 -0
- siliconcompiler/scheduler/__init__.py +67 -49
- siliconcompiler/scheduler/send_messages.py +1 -1
- siliconcompiler/schema/schema_cfg.py +2 -2
- siliconcompiler/schema/schema_obj.py +13 -10
- siliconcompiler/schema/utils.py +2 -0
- siliconcompiler/sphinx_ext/__init__.py +85 -0
- siliconcompiler/sphinx_ext/dynamicgen.py +17 -33
- siliconcompiler/sphinx_ext/schemagen.py +3 -2
- siliconcompiler/targets/__init__.py +26 -0
- siliconcompiler/templates/replay/replay.py.j2 +62 -0
- siliconcompiler/templates/replay/requirements.txt +2 -1
- siliconcompiler/templates/replay/setup.sh +119 -6
- siliconcompiler/tools/__init__.py +60 -0
- siliconcompiler/tools/_common/asic.py +7 -6
- siliconcompiler/tools/ghdl/ghdl.py +1 -2
- siliconcompiler/tools/klayout/convert_drc_db.py +1 -1
- siliconcompiler/tools/klayout/drc.py +1 -1
- siliconcompiler/tools/klayout/export.py +8 -1
- siliconcompiler/tools/klayout/klayout.py +2 -2
- siliconcompiler/tools/klayout/klayout_convert_drc_db.py +2 -2
- siliconcompiler/tools/klayout/klayout_export.py +7 -5
- siliconcompiler/tools/klayout/klayout_operations.py +4 -3
- siliconcompiler/tools/klayout/klayout_show.py +3 -2
- siliconcompiler/tools/klayout/klayout_utils.py +1 -1
- siliconcompiler/tools/klayout/operations.py +8 -0
- siliconcompiler/tools/klayout/screenshot.py +6 -1
- siliconcompiler/tools/klayout/show.py +8 -1
- siliconcompiler/tools/magic/magic.py +1 -1
- siliconcompiler/tools/openroad/__init__.py +1 -1
- siliconcompiler/tools/openroad/_apr.py +2 -1
- siliconcompiler/tools/openroad/init_floorplan.py +1 -1
- siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +4 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +52 -0
- siliconcompiler/tools/openroad/scripts/common/reports.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/sc_show.tcl +5 -0
- siliconcompiler/tools/opensta/__init__.py +1 -1
- siliconcompiler/tools/opensta/check_library.py +27 -0
- siliconcompiler/tools/opensta/scripts/sc_check_library.tcl +255 -0
- siliconcompiler/tools/opensta/scripts/sc_timing.tcl +1 -1
- siliconcompiler/tools/sv2v/sv2v.py +1 -2
- siliconcompiler/tools/verilator/verilator.py +6 -7
- siliconcompiler/tools/vivado/vivado.py +1 -1
- siliconcompiler/tools/yosys/__init__.py +149 -0
- siliconcompiler/tools/yosys/lec.py +22 -9
- siliconcompiler/tools/yosys/sc_lec.tcl +94 -49
- siliconcompiler/tools/yosys/sc_syn.tcl +1 -0
- siliconcompiler/tools/yosys/screenshot.py +2 -2
- siliconcompiler/tools/yosys/syn_asic.py +98 -74
- siliconcompiler/tools/yosys/syn_asic.tcl +31 -6
- siliconcompiler/tools/yosys/syn_fpga.py +2 -3
- siliconcompiler/tools/yosys/syn_fpga.tcl +0 -1
- siliconcompiler/toolscripts/_tools.json +3 -3
- siliconcompiler/utils/__init__.py +7 -3
- {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.1.dist-info}/METADATA +13 -10
- {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.1.dist-info}/RECORD +72 -82
- {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.1.dist-info}/WHEEL +1 -1
- {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.1.dist-info}/entry_points.txt +13 -0
- siliconcompiler/libs/asap7sc7p5t.py +0 -8
- siliconcompiler/libs/gf180mcu.py +0 -8
- siliconcompiler/libs/interposer.py +0 -8
- siliconcompiler/libs/nangate45.py +0 -8
- siliconcompiler/libs/sg13g2_stdcell.py +0 -8
- siliconcompiler/libs/sky130hd.py +0 -8
- siliconcompiler/libs/sky130io.py +0 -8
- siliconcompiler/pdks/asap7.py +0 -8
- siliconcompiler/pdks/freepdk45.py +0 -8
- siliconcompiler/pdks/gf180.py +0 -8
- siliconcompiler/pdks/ihp130.py +0 -8
- siliconcompiler/pdks/interposer.py +0 -8
- siliconcompiler/pdks/skywater130.py +0 -8
- siliconcompiler/templates/replay/run.py.j2 +0 -22
- siliconcompiler/tools/yosys/yosys.py +0 -148
- {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.1.dist-info}/LICENSE +0 -0
- {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.1.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import os
|
|
1
2
|
from siliconcompiler import SiliconCompilerError
|
|
2
3
|
from siliconcompiler.tools.klayout.klayout import setup as setup_tool
|
|
4
|
+
from siliconcompiler.tools.klayout.klayout import runtime_options as runtime_options_tool
|
|
3
5
|
from siliconcompiler.tools._common import input_provides, get_tool_task
|
|
4
6
|
|
|
5
7
|
|
|
@@ -194,3 +196,9 @@ def setup(chip):
|
|
|
194
196
|
raise SiliconCompilerError('write requires a filename to save to', chip=chip)
|
|
195
197
|
chip.add('tool', tool, 'task', task, 'output', args,
|
|
196
198
|
step=step, index=index)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
def runtime_options(chip):
|
|
202
|
+
return runtime_options_tool(chip) + [
|
|
203
|
+
'-rd', f'SC_TOOLS_ROOT={os.path.dirname(os.path.dirname(__file__))}'
|
|
204
|
+
]
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
from siliconcompiler.tools.klayout import klayout
|
|
2
1
|
from siliconcompiler.tools.klayout.klayout import setup as setup_tool
|
|
3
2
|
from siliconcompiler.tools.klayout.show import general_gui_setup
|
|
4
3
|
from siliconcompiler.tools.klayout.show import pre_process as show_pre_process
|
|
4
|
+
from siliconcompiler.tools.klayout.show import runtime_options as show_runtime_options
|
|
5
5
|
from siliconcompiler.tools._common import get_tool_task
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
def make_docs(chip):
|
|
9
|
+
from siliconcompiler.tools.klayout import klayout
|
|
9
10
|
klayout.make_docs(chip)
|
|
10
11
|
chip.set('tool', 'klayout', 'task', 'screenshot', 'var', 'show_filepath', '<path>')
|
|
11
12
|
|
|
@@ -98,3 +99,7 @@ def setup_gui_screenshot(chip, require_input=True):
|
|
|
98
99
|
for y in range(ybins):
|
|
99
100
|
chip.add('tool', tool, 'task', task, 'output', f'{design}_X{x}_Y{y}.png',
|
|
100
101
|
step=step, index=index)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def runtime_options(chip):
|
|
105
|
+
return show_runtime_options(chip)
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import shutil
|
|
3
3
|
|
|
4
|
-
from siliconcompiler.tools.klayout import klayout
|
|
5
4
|
from siliconcompiler.tools.klayout.klayout import setup as setup_tool
|
|
5
|
+
from siliconcompiler.tools.klayout.klayout import runtime_options as runtime_options_tool
|
|
6
6
|
from siliconcompiler.tools._common import find_incoming_ext, get_tool_task
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
def make_docs(chip):
|
|
10
|
+
from siliconcompiler.tools.klayout import klayout
|
|
10
11
|
klayout.make_docs(chip)
|
|
11
12
|
chip.set('tool', 'klayout', 'task', 'show', 'var', 'show_filepath', '<path>')
|
|
12
13
|
|
|
@@ -99,3 +100,9 @@ def pre_process(chip):
|
|
|
99
100
|
ext_file = os.path.join(rel_path, f'{chip.top()}.{ext}')
|
|
100
101
|
if ext_file and os.path.exists(ext_file):
|
|
101
102
|
shutil.copy2(ext_file, f"inputs/{chip.top()}.{ext}")
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def runtime_options(chip):
|
|
106
|
+
return runtime_options_tool(chip) + [
|
|
107
|
+
'-rd', f'SC_TOOLS_ROOT={os.path.dirname(os.path.dirname(__file__))}'
|
|
108
|
+
]
|
|
@@ -13,7 +13,6 @@ import gzip
|
|
|
13
13
|
import shutil
|
|
14
14
|
import os
|
|
15
15
|
from siliconcompiler.tools._common import input_provides, get_tool_task
|
|
16
|
-
from siliconcompiler.targets import freepdk45_demo
|
|
17
16
|
from siliconcompiler import utils
|
|
18
17
|
|
|
19
18
|
|
|
@@ -21,6 +20,7 @@ from siliconcompiler import utils
|
|
|
21
20
|
# Make Docs
|
|
22
21
|
####################################################################
|
|
23
22
|
def make_docs(chip):
|
|
23
|
+
from siliconcompiler.targets import freepdk45_demo
|
|
24
24
|
chip.use(freepdk45_demo)
|
|
25
25
|
|
|
26
26
|
|
|
@@ -11,13 +11,13 @@ Sources: https://github.com/The-OpenROAD-Project/OpenROAD
|
|
|
11
11
|
Installation: https://github.com/The-OpenROAD-Project/OpenROAD
|
|
12
12
|
'''
|
|
13
13
|
from siliconcompiler.tools._common import get_tool_task
|
|
14
|
-
from siliconcompiler.targets import asap7_demo
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
####################################################################
|
|
18
17
|
# Make Docs
|
|
19
18
|
####################################################################
|
|
20
19
|
def make_docs(chip):
|
|
20
|
+
from siliconcompiler.targets import asap7_demo
|
|
21
21
|
chip.use(asap7_demo)
|
|
22
22
|
|
|
23
23
|
|
|
@@ -811,7 +811,7 @@ def define_mpl_params(chip):
|
|
|
811
811
|
'macro placement ([x, y] in microns)')
|
|
812
812
|
|
|
813
813
|
set_tool_task_var(chip, param_key='rtlmp_enable',
|
|
814
|
-
default_value=
|
|
814
|
+
default_value=True,
|
|
815
815
|
schelp='true/false, enables the RTLMP macro placement')
|
|
816
816
|
set_tool_task_var(chip, param_key='rtlmp_min_instances',
|
|
817
817
|
schelp='minimum number of instances to use while clustering for '
|
|
@@ -1101,6 +1101,7 @@ def build_pex_corners(chip):
|
|
|
1101
1101
|
'inputs',
|
|
1102
1102
|
'sc_parasitics.tcl'),
|
|
1103
1103
|
step=step, index=index, clobber=True)
|
|
1104
|
+
chip.set('tool', tool, 'task', task, 'file', 'parasitics', False, field='copy')
|
|
1104
1105
|
|
|
1105
1106
|
with open(chip.get('tool', tool, 'task', task, 'file', 'parasitics',
|
|
1106
1107
|
step=step, index=index)[0], 'w') as f:
|
|
@@ -50,7 +50,7 @@ def setup(chip):
|
|
|
50
50
|
schelp='remove buffers inserted by synthesis')
|
|
51
51
|
|
|
52
52
|
set_tool_task_var(chip, param_key='remove_dead_logic',
|
|
53
|
-
default_value=
|
|
53
|
+
default_value=True,
|
|
54
54
|
schelp='remove logic which does not drive a primary output')
|
|
55
55
|
|
|
56
56
|
# Handle additional input files
|
|
@@ -17,6 +17,8 @@ source -echo "$sc_refdir/apr/preamble.tcl"
|
|
|
17
17
|
###############################
|
|
18
18
|
|
|
19
19
|
if { [llength [all_clocks]] > 0 } {
|
|
20
|
+
sc_set_dont_use -clock
|
|
21
|
+
|
|
20
22
|
# Clone clock tree inverters next to register loads
|
|
21
23
|
# so cts does not try to buffer the inverted clocks.
|
|
22
24
|
repair_clock_inverters
|
|
@@ -50,6 +52,8 @@ if { [llength [all_clocks]] > 0 } {
|
|
|
50
52
|
sc_detailed_placement
|
|
51
53
|
|
|
52
54
|
global_connect
|
|
55
|
+
|
|
56
|
+
sc_set_dont_use
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
# estimate for metrics
|
|
@@ -55,7 +55,7 @@ if { [lindex [sc_cfg_tool_task_get var rsz_skip_hold_repair] 0] != "true" } {
|
|
|
55
55
|
estimate_parasitics -placement
|
|
56
56
|
|
|
57
57
|
# Enable hold cells
|
|
58
|
-
|
|
58
|
+
sc_set_dont_use -hold
|
|
59
59
|
|
|
60
60
|
repair_timing \
|
|
61
61
|
-hold \
|
|
@@ -68,7 +68,7 @@ if { [lindex [sc_cfg_tool_task_get var rsz_skip_hold_repair] 0] != "true" } {
|
|
|
68
68
|
sc_detailed_placement
|
|
69
69
|
|
|
70
70
|
# Restore dont use
|
|
71
|
-
|
|
71
|
+
sc_set_dont_use
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
global_connect
|
|
@@ -673,3 +673,55 @@ proc sc_check_version { min_required } {
|
|
|
673
673
|
|
|
674
674
|
return [expr { [lindex $version 1] >= $min_required }]
|
|
675
675
|
}
|
|
676
|
+
|
|
677
|
+
proc sc_set_gui_title { } {
|
|
678
|
+
if { ![sc_check_version 17650] } {
|
|
679
|
+
return
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
global sc_tool
|
|
683
|
+
global sc_task
|
|
684
|
+
|
|
685
|
+
set step [sc_cfg_get arg step]
|
|
686
|
+
set index [sc_cfg_get arg index]
|
|
687
|
+
set job [sc_cfg_get option jobname]
|
|
688
|
+
if { [sc_cfg_exists "tool" $sc_tool "task" $sc_task "var" "show_step"] } {
|
|
689
|
+
set step [sc_cfg_get "tool" $sc_tool "task" $sc_task "var" "show_step"]
|
|
690
|
+
}
|
|
691
|
+
if { [sc_cfg_exists "tool" $sc_tool "task" $sc_task "var" "show_index"] } {
|
|
692
|
+
set index [sc_cfg_get "tool" $sc_tool "task" $sc_task "var" "show_index"]
|
|
693
|
+
}
|
|
694
|
+
if { [sc_cfg_exists "tool" $sc_tool "task" $sc_task "var" "show_job"] } {
|
|
695
|
+
set job [sc_cfg_get "tool" $sc_tool "task" $sc_task "var" "show_job"]
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
set title "OpenROAD - ${job} / ${step}${index}"
|
|
699
|
+
gui::set_title $title
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
proc sc_set_dont_use { args } {
|
|
703
|
+
sta::parse_key_args "sc_set_dont_use" args \
|
|
704
|
+
keys {} \
|
|
705
|
+
flags {-hold -clock}
|
|
706
|
+
|
|
707
|
+
sta::check_argc_eq0 "sc_set_dont_use" $args
|
|
708
|
+
|
|
709
|
+
global sc_mainlib
|
|
710
|
+
|
|
711
|
+
set_dont_use [sc_cfg_get library $sc_mainlib asic cells dontuse]
|
|
712
|
+
|
|
713
|
+
set clk_groups "clkbuf clkgate clklogic"
|
|
714
|
+
foreach group $clk_groups {
|
|
715
|
+
set_dont_use [sc_cfg_get library $sc_mainlib asic cells $group]
|
|
716
|
+
}
|
|
717
|
+
set_dont_use [sc_cfg_get library $sc_mainlib asic cells hold]
|
|
718
|
+
|
|
719
|
+
if { [info exists flags(-hold)] } {
|
|
720
|
+
unset_dont_use [sc_cfg_get library $sc_mainlib asic cells hold]
|
|
721
|
+
}
|
|
722
|
+
if { [info exists flags(-clock)] } {
|
|
723
|
+
foreach group $clk_groups {
|
|
724
|
+
unset_dont_use [sc_cfg_get library $sc_mainlib asic cells $group]
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
@@ -7,7 +7,7 @@ file mkdir reports/timing
|
|
|
7
7
|
file mkdir reports/power
|
|
8
8
|
file mkdir reports/markers
|
|
9
9
|
|
|
10
|
-
set fields "{capacitance slew input_pins
|
|
10
|
+
set fields "{capacitance slew input_pins hierarcial_pins net fanout}"
|
|
11
11
|
set sta_top_n_paths [lindex [sc_cfg_tool_task_get var sta_top_n_paths] 0]
|
|
12
12
|
set PREFIX "SC_METRIC:"
|
|
13
13
|
|
|
@@ -28,6 +28,11 @@ source -echo "$sc_refdir/common/debugging.tcl"
|
|
|
28
28
|
|
|
29
29
|
source "$sc_refdir/common/procs.tcl"
|
|
30
30
|
|
|
31
|
+
###############################
|
|
32
|
+
# Setup GUI title early
|
|
33
|
+
###############################
|
|
34
|
+
sc_set_gui_title
|
|
35
|
+
|
|
31
36
|
###############################
|
|
32
37
|
# Design information
|
|
33
38
|
###############################
|
|
@@ -12,13 +12,13 @@ import os
|
|
|
12
12
|
from siliconcompiler.tools.openroad._apr import get_library_timing_keypaths
|
|
13
13
|
from siliconcompiler.tools._common import get_tool_task
|
|
14
14
|
from siliconcompiler.tools._common.asic import get_libraries
|
|
15
|
-
from siliconcompiler.targets import asap7_demo
|
|
16
15
|
|
|
17
16
|
|
|
18
17
|
####################################################################
|
|
19
18
|
# Make Docs
|
|
20
19
|
####################################################################
|
|
21
20
|
def make_docs(chip):
|
|
21
|
+
from siliconcompiler.targets import asap7_demo
|
|
22
22
|
chip.use(asap7_demo)
|
|
23
23
|
|
|
24
24
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from siliconcompiler.tools.opensta import setup as tool_setup
|
|
2
|
+
from siliconcompiler.tools.opensta import runtime_options as tool_runtime_options
|
|
3
|
+
from siliconcompiler.tools._common import get_tool_task
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def setup(chip):
|
|
7
|
+
'''
|
|
8
|
+
Check setup information about the timing libraries.
|
|
9
|
+
'''
|
|
10
|
+
step = chip.get('arg', 'step')
|
|
11
|
+
index = chip.get('arg', 'index')
|
|
12
|
+
tool, task = get_tool_task(chip, step, index)
|
|
13
|
+
|
|
14
|
+
tool_setup(chip)
|
|
15
|
+
|
|
16
|
+
chip.set('tool', tool, 'task', task, 'script', 'sc_check_library.tcl',
|
|
17
|
+
step=step, index=index, clobber=False)
|
|
18
|
+
|
|
19
|
+
chip.set('tool', tool, 'task', task, 'threads', 1,
|
|
20
|
+
step=step, index=index)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
################################
|
|
24
|
+
# Runtime options
|
|
25
|
+
################################
|
|
26
|
+
def runtime_options(chip):
|
|
27
|
+
return tool_runtime_options(chip)
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
###############################
|
|
2
|
+
# Reading SC Schema
|
|
3
|
+
###############################
|
|
4
|
+
|
|
5
|
+
source ./sc_manifest.tcl > /dev/null
|
|
6
|
+
|
|
7
|
+
##############################
|
|
8
|
+
# Schema Adapter
|
|
9
|
+
###############################
|
|
10
|
+
|
|
11
|
+
set sc_tool opensta
|
|
12
|
+
set sc_step [sc_cfg_get arg step]
|
|
13
|
+
set sc_index [sc_cfg_get arg index]
|
|
14
|
+
set sc_flow [sc_cfg_get option flow]
|
|
15
|
+
set sc_task [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index task]
|
|
16
|
+
|
|
17
|
+
set sc_refdir [sc_cfg_tool_task_get refdir]
|
|
18
|
+
|
|
19
|
+
# Design
|
|
20
|
+
set sc_design [sc_top]
|
|
21
|
+
|
|
22
|
+
# APR Parameters
|
|
23
|
+
set sc_targetlibs [sc_get_asic_libraries logic]
|
|
24
|
+
set sc_delaymodel [sc_cfg_get asic delaymodel]
|
|
25
|
+
set sc_scenarios [dict keys [sc_cfg_get constraint timing]]
|
|
26
|
+
|
|
27
|
+
###############################
|
|
28
|
+
# Optional
|
|
29
|
+
###############################
|
|
30
|
+
|
|
31
|
+
# MACROS
|
|
32
|
+
set sc_macrolibs [sc_get_asic_libraries macro]
|
|
33
|
+
|
|
34
|
+
###############################
|
|
35
|
+
# Read Files
|
|
36
|
+
###############################
|
|
37
|
+
|
|
38
|
+
# Read Liberty
|
|
39
|
+
puts "Defining timing corners: $sc_scenarios"
|
|
40
|
+
define_corners {*}$sc_scenarios
|
|
41
|
+
foreach lib "$sc_targetlibs $sc_macrolibs" {
|
|
42
|
+
#Liberty
|
|
43
|
+
foreach corner $sc_scenarios {
|
|
44
|
+
foreach libcorner [sc_cfg_get constraint timing $corner libcorner] {
|
|
45
|
+
if { [sc_cfg_exists library $lib output $libcorner $sc_delaymodel] } {
|
|
46
|
+
foreach lib_file [sc_cfg_get library $lib output $libcorner $sc_delaymodel] {
|
|
47
|
+
puts "Reading liberty file for ${corner} ($libcorner): ${lib_file}"
|
|
48
|
+
read_liberty -corner $corner $lib_file
|
|
49
|
+
}
|
|
50
|
+
break
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
proc assert_glob { str } {
|
|
57
|
+
if { [string first "*" $str] != -1 } {
|
|
58
|
+
puts "\[ERROR] Regex detected: $str"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
# Check cells
|
|
63
|
+
# check for globbing and report list if globs are detected
|
|
64
|
+
# check each cell
|
|
65
|
+
foreach lib $sc_targetlibs {
|
|
66
|
+
dict for {cell_type cells} [sc_cfg_get library $lib asic cells] {
|
|
67
|
+
if { [llength $cells] == 0 } {
|
|
68
|
+
continue
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
puts "Checking: $lib / asic / cells / $cell_type"
|
|
72
|
+
|
|
73
|
+
foreach cell $cells {
|
|
74
|
+
puts " $cell:"
|
|
75
|
+
|
|
76
|
+
if { $cell_type != "dontuse" } {
|
|
77
|
+
assert_glob $cell
|
|
78
|
+
}
|
|
79
|
+
set libcells [get_lib_cells $cell]
|
|
80
|
+
foreach libcell $libcells {
|
|
81
|
+
puts " [get_full_name $libcell]"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
# Check yosys setup
|
|
88
|
+
# yosys_driver_cell
|
|
89
|
+
foreach lib $sc_targetlibs {
|
|
90
|
+
puts "Checking $lib yosys_driver_cell"
|
|
91
|
+
assert_glob [sc_cfg_get library $lib option var yosys_driver_cell]
|
|
92
|
+
if { [get_lib_cells [sc_cfg_get library $lib option var yosys_driver_cell]] == 0 } {
|
|
93
|
+
puts "\[ERROR] missing"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
# yosys_buffer_cell
|
|
97
|
+
foreach lib $sc_targetlibs {
|
|
98
|
+
puts "Checking $lib yosys_buffer_cell"
|
|
99
|
+
assert_glob [sc_cfg_get library $lib option var yosys_buffer_cell]
|
|
100
|
+
if { [get_lib_cells [sc_cfg_get library $lib option var yosys_buffer_cell]] == 0 } {
|
|
101
|
+
puts "\[ERROR] missing"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
# yosys_buffer_input
|
|
105
|
+
foreach lib $sc_targetlibs {
|
|
106
|
+
puts "Checking $lib yosys_buffer_input"
|
|
107
|
+
assert_glob [sc_cfg_get library $lib option var yosys_buffer_input]
|
|
108
|
+
set cellname [sc_cfg_get library $lib option var yosys_buffer_cell]
|
|
109
|
+
set pins [get_lib_pins $cellname/[sc_cfg_get library $lib option var yosys_buffer_input]]
|
|
110
|
+
if { [llength $pins] != [llength [sta::corners]] } {
|
|
111
|
+
puts "\[ERROR] mismatch"
|
|
112
|
+
}
|
|
113
|
+
foreach pin $pins {
|
|
114
|
+
if { [get_property $pin direction] != "input" } {
|
|
115
|
+
puts "\[ERROR] [get_full_name $pin] incorrect direction"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
# yosys_buffer_output
|
|
120
|
+
foreach lib $sc_targetlibs {
|
|
121
|
+
puts "Checking $lib yosys_buffer_output"
|
|
122
|
+
assert_glob [sc_cfg_get library $lib option var yosys_buffer_output]
|
|
123
|
+
set cellname [sc_cfg_get library $lib option var yosys_buffer_cell]
|
|
124
|
+
set pins [get_lib_pins $cellname/[sc_cfg_get library $lib option var yosys_buffer_output]]
|
|
125
|
+
if { [llength $pins] != [llength [sta::corners]] } {
|
|
126
|
+
puts "\[ERROR] mismatch"
|
|
127
|
+
}
|
|
128
|
+
foreach pin $pins {
|
|
129
|
+
if { [get_property $pin direction] != "output" } {
|
|
130
|
+
puts "\[ERROR] [get_full_name $pin] incorrect direction"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
# yosys_tiehigh_cell
|
|
135
|
+
foreach lib $sc_targetlibs {
|
|
136
|
+
puts "Checking $lib yosys_tiehigh_cell"
|
|
137
|
+
assert_glob [sc_cfg_get library $lib option var yosys_tiehigh_cell]
|
|
138
|
+
if { [get_lib_cells [sc_cfg_get library $lib option var yosys_tiehigh_cell]] == 0 } {
|
|
139
|
+
puts "\[ERROR] missing"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
# yosys_tiehigh_port
|
|
143
|
+
foreach lib $sc_targetlibs {
|
|
144
|
+
puts "Checking $lib yosys_tiehigh_port"
|
|
145
|
+
assert_glob [sc_cfg_get library $lib option var yosys_tiehigh_port]
|
|
146
|
+
set cellname [sc_cfg_get library $lib option var yosys_tiehigh_cell]
|
|
147
|
+
set pins [get_lib_pins $cellname/[sc_cfg_get library $lib option var yosys_tiehigh_port]]
|
|
148
|
+
if { [llength $pins] != [llength [sta::corners]] } {
|
|
149
|
+
puts "\[ERROR] mismatch"
|
|
150
|
+
}
|
|
151
|
+
foreach pin $pins {
|
|
152
|
+
if { [get_property $pin direction] != "output" } {
|
|
153
|
+
puts "\[ERROR] [get_full_name $pin] incorrect direction"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
# yosys_tielow_cell
|
|
158
|
+
foreach lib $sc_targetlibs {
|
|
159
|
+
puts "Checking $lib yosys_tielow_cell"
|
|
160
|
+
assert_glob [sc_cfg_get library $lib option var yosys_tielow_cell]
|
|
161
|
+
if { [get_lib_cells [sc_cfg_get library $lib option var yosys_tielow_cell]] == 0 } {
|
|
162
|
+
puts "\[ERROR] missing"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
# yosys_tielow_port
|
|
166
|
+
foreach lib $sc_targetlibs {
|
|
167
|
+
puts "Checking $lib yosys_tielow_port"
|
|
168
|
+
assert_glob [sc_cfg_get library $lib option var yosys_tielow_port]
|
|
169
|
+
set cellname [sc_cfg_get library $lib option var yosys_tielow_cell]
|
|
170
|
+
set pins [get_lib_pins $cellname/[sc_cfg_get library $lib option var yosys_tielow_port]]
|
|
171
|
+
if { [llength $pins] != [llength [sta::corners]] } {
|
|
172
|
+
puts "\[ERROR] mismatch"
|
|
173
|
+
}
|
|
174
|
+
foreach pin $pins {
|
|
175
|
+
if { [get_property $pin direction] != "output" } {
|
|
176
|
+
puts "\[ERROR] [get_full_name $pin] incorrect direction"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
# yosys_abc_constraint_load
|
|
181
|
+
foreach lib $sc_targetlibs {
|
|
182
|
+
set cap 0.0
|
|
183
|
+
puts "Checking $lib yosys_abc_constraint_load"
|
|
184
|
+
set cellname [sc_cfg_get library $lib option var yosys_buffer_cell]
|
|
185
|
+
set pins [get_lib_pins $cellname/[sc_cfg_get library $lib option var yosys_buffer_input]]
|
|
186
|
+
foreach pin $pins {
|
|
187
|
+
set cap [expr { max($cap, [get_property $pin capacitance]) }]
|
|
188
|
+
}
|
|
189
|
+
set lib_cap [sc_cfg_get library $lib option var yosys_abc_constraint_load]
|
|
190
|
+
set cap [expr { 4 * $cap }]
|
|
191
|
+
set cap "[format "%.3f" $cap][sta::unit_scaled_suffix capacitance]"
|
|
192
|
+
|
|
193
|
+
if { $lib_cap != $cap } {
|
|
194
|
+
puts "\[ERROR] mismatch, should be $cap, not $lib_cap"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
# yosys_abc_clock_multiplier
|
|
199
|
+
foreach lib $sc_targetlibs {
|
|
200
|
+
puts "Checking $lib yosys_abc_clock_multiplier"
|
|
201
|
+
set ps_convert [expr { round(1.0 / [sta::time_sta_ui 1e-12]) }]
|
|
202
|
+
set convert [sc_cfg_get library $lib option var yosys_abc_clock_multiplier]
|
|
203
|
+
if { $convert != $ps_convert } {
|
|
204
|
+
puts "\[ERROR] incorrect multiplier: should be $ps_convert, not $convert"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
# Check openroad setup
|
|
209
|
+
# openroad_tiehigh_cell
|
|
210
|
+
foreach lib $sc_targetlibs {
|
|
211
|
+
puts "Checking $lib openroad_tiehigh_cell"
|
|
212
|
+
assert_glob [sc_cfg_get library $lib option var openroad_tiehigh_cell]
|
|
213
|
+
if { [get_lib_cells [sc_cfg_get library $lib option var openroad_tiehigh_cell]] == 0 } {
|
|
214
|
+
puts "\[ERROR] missing"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
# openroad_tiehigh_port
|
|
218
|
+
foreach lib $sc_targetlibs {
|
|
219
|
+
puts "Checking $lib openroad_tiehigh_port"
|
|
220
|
+
assert_glob [sc_cfg_get library $lib option var openroad_tiehigh_port]
|
|
221
|
+
set cellname [sc_cfg_get library $lib option var openroad_tiehigh_cell]
|
|
222
|
+
set pins [get_lib_pins $cellname/[sc_cfg_get library $lib option var openroad_tiehigh_port]]
|
|
223
|
+
if { [llength $pins] != [llength [sta::corners]] } {
|
|
224
|
+
puts "\[ERROR] mismatch"
|
|
225
|
+
}
|
|
226
|
+
foreach pin $pins {
|
|
227
|
+
if { [get_property $pin direction] != "output" } {
|
|
228
|
+
puts "\[ERROR] [get_full_name $pin] incorrect direction"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
# openroad_tielow_cell
|
|
234
|
+
foreach lib $sc_targetlibs {
|
|
235
|
+
puts "Checking $lib openroad_tielow_cell"
|
|
236
|
+
assert_glob [sc_cfg_get library $lib option var openroad_tielow_cell]
|
|
237
|
+
if { [get_lib_cells [sc_cfg_get library $lib option var openroad_tielow_cell]] == 0 } {
|
|
238
|
+
puts "\[ERROR] missing"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
# openroad_tielow_port
|
|
242
|
+
foreach lib $sc_targetlibs {
|
|
243
|
+
puts "Checking $lib openroad_tielow_port"
|
|
244
|
+
assert_glob [sc_cfg_get library $lib option var openroad_tielow_port]
|
|
245
|
+
set cellname [sc_cfg_get library $lib option var openroad_tielow_cell]
|
|
246
|
+
set pins [get_lib_pins $cellname/[sc_cfg_get library $lib option var openroad_tielow_port]]
|
|
247
|
+
if { [llength $pins] != [llength [sta::corners]] } {
|
|
248
|
+
puts "\[ERROR] mismatch"
|
|
249
|
+
}
|
|
250
|
+
foreach pin $pins {
|
|
251
|
+
if { [get_property $pin direction] != "output" } {
|
|
252
|
+
puts "\[ERROR] [get_full_name $pin] incorrect direction"
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
@@ -128,7 +128,7 @@ source "$sc_refdir/sc_procs.tcl"
|
|
|
128
128
|
|
|
129
129
|
set opensta_top_n_paths [lindex [sc_cfg_tool_task_get var top_n_paths] 0]
|
|
130
130
|
|
|
131
|
-
set fields "{capacitance slew input_pins
|
|
131
|
+
set fields "{capacitance slew input_pins hierarcial_pins net fanout}"
|
|
132
132
|
set PREFIX "SC_METRIC:"
|
|
133
133
|
|
|
134
134
|
puts "$PREFIX timeunit"
|
|
@@ -14,13 +14,12 @@ Sources: https://github.com/zachjs/sv2v
|
|
|
14
14
|
Installation: https://github.com/zachjs/sv2v
|
|
15
15
|
'''
|
|
16
16
|
|
|
17
|
-
from siliconcompiler.tools.sv2v import convert
|
|
18
|
-
|
|
19
17
|
|
|
20
18
|
####################################################################
|
|
21
19
|
# Make Docs
|
|
22
20
|
####################################################################
|
|
23
21
|
def make_docs(chip):
|
|
22
|
+
from siliconcompiler.tools.sv2v import convert
|
|
24
23
|
convert.setup(chip)
|
|
25
24
|
return chip
|
|
26
25
|
|
|
@@ -32,13 +32,13 @@ from siliconcompiler.tools._common import (
|
|
|
32
32
|
get_tool_task,
|
|
33
33
|
input_provides
|
|
34
34
|
)
|
|
35
|
-
from siliconcompiler.targets import freepdk45_demo
|
|
36
35
|
|
|
37
36
|
|
|
38
37
|
####################################################################
|
|
39
38
|
# Make Docs
|
|
40
39
|
####################################################################
|
|
41
40
|
def make_docs(chip):
|
|
41
|
+
from siliconcompiler.targets import freepdk45_demo
|
|
42
42
|
chip.use(freepdk45_demo)
|
|
43
43
|
|
|
44
44
|
|
|
@@ -71,10 +71,8 @@ def setup(chip):
|
|
|
71
71
|
chip.set('tool', tool, 'task', task, 'file', 'config',
|
|
72
72
|
'Verilator configuration file',
|
|
73
73
|
field='help')
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
','.join(['tool', tool, 'task', task, 'file', 'config']),
|
|
77
|
-
step=step, index=index)
|
|
74
|
+
add_require_input(chip, 'tool', tool, 'task', task, 'file', 'config')
|
|
75
|
+
add_require_input(chip, 'option', 'file', 'verilator_config')
|
|
78
76
|
|
|
79
77
|
chip.set('tool', tool, 'task', task, 'var', 'enable_assert',
|
|
80
78
|
'true/false, when true assertions are enabled in Verilator.',
|
|
@@ -132,8 +130,9 @@ def runtime_options(chip):
|
|
|
132
130
|
cmdlist.append(libext_option)
|
|
133
131
|
|
|
134
132
|
# Verilator docs recommend this file comes first in CLI arguments
|
|
135
|
-
for value in chip
|
|
136
|
-
|
|
133
|
+
for value in get_input_files(chip, 'tool', tool, 'task', task, 'file', 'config'):
|
|
134
|
+
cmdlist.append(value)
|
|
135
|
+
for value in get_input_files(chip, 'option', 'file', 'verilator_config'):
|
|
137
136
|
cmdlist.append(value)
|
|
138
137
|
|
|
139
138
|
for param, value in frontend_opts['param']:
|
|
@@ -10,10 +10,10 @@ import os
|
|
|
10
10
|
import re
|
|
11
11
|
from siliconcompiler import sc_open
|
|
12
12
|
from siliconcompiler.tools._common import record_metric
|
|
13
|
-
from siliconcompiler.targets import fpgaflow_demo
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
def make_docs(chip):
|
|
16
|
+
from siliconcompiler.targets import fpgaflow_demo
|
|
17
17
|
chip.set('fpga', 'partname', 'ice40up5k-sg48')
|
|
18
18
|
chip.use(fpgaflow_demo)
|
|
19
19
|
|