siliconcompiler 0.35.4__py3-none-any.whl → 0.36.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/constraints/__init__.py +4 -1
- siliconcompiler/constraints/asic_timing.py +230 -38
- siliconcompiler/constraints/fpga_timing.py +209 -14
- siliconcompiler/constraints/timing_mode.py +82 -0
- siliconcompiler/data/templates/tcl/manifest.tcl.j2 +0 -6
- siliconcompiler/flowgraph.py +95 -42
- siliconcompiler/flows/generate_openroad_rcx.py +2 -2
- siliconcompiler/flows/highresscreenshotflow.py +37 -0
- siliconcompiler/library.py +2 -1
- siliconcompiler/package/__init__.py +39 -45
- siliconcompiler/project.py +4 -1
- siliconcompiler/scheduler/scheduler.py +64 -35
- siliconcompiler/scheduler/schedulernode.py +5 -2
- siliconcompiler/scheduler/slurm.py +7 -6
- siliconcompiler/scheduler/taskscheduler.py +19 -16
- siliconcompiler/schema/_metadata.py +1 -1
- siliconcompiler/schema/namedschema.py +2 -4
- siliconcompiler/schema_support/cmdlineschema.py +0 -3
- siliconcompiler/schema_support/dependencyschema.py +0 -6
- siliconcompiler/schema_support/record.py +4 -3
- siliconcompiler/tool.py +58 -27
- siliconcompiler/tools/_common/tcl/sc_schema_access.tcl +0 -6
- siliconcompiler/tools/chisel/convert.py +44 -0
- siliconcompiler/tools/ghdl/convert.py +37 -2
- siliconcompiler/tools/icarus/compile.py +14 -0
- siliconcompiler/tools/keplerformal/__init__.py +7 -0
- siliconcompiler/tools/keplerformal/lec.py +112 -0
- siliconcompiler/tools/klayout/drc.py +14 -0
- siliconcompiler/tools/klayout/export.py +40 -0
- siliconcompiler/tools/klayout/operations.py +40 -0
- siliconcompiler/tools/klayout/screenshot.py +66 -1
- siliconcompiler/tools/klayout/scripts/klayout_export.py +10 -40
- siliconcompiler/tools/klayout/scripts/klayout_show.py +4 -4
- siliconcompiler/tools/klayout/scripts/klayout_utils.py +13 -1
- siliconcompiler/tools/montage/tile.py +26 -12
- siliconcompiler/tools/openroad/__init__.py +11 -0
- siliconcompiler/tools/openroad/_apr.py +780 -11
- siliconcompiler/tools/openroad/antenna_repair.py +26 -0
- siliconcompiler/tools/openroad/fillmetal_insertion.py +14 -0
- siliconcompiler/tools/openroad/global_placement.py +67 -0
- siliconcompiler/tools/openroad/global_route.py +15 -0
- siliconcompiler/tools/openroad/init_floorplan.py +19 -2
- siliconcompiler/tools/openroad/macro_placement.py +252 -0
- siliconcompiler/tools/openroad/power_grid.py +43 -0
- siliconcompiler/tools/openroad/power_grid_analysis.py +1 -1
- siliconcompiler/tools/openroad/rcx_bench.py +28 -0
- siliconcompiler/tools/openroad/rcx_extract.py +14 -0
- siliconcompiler/tools/openroad/rdlroute.py +14 -0
- siliconcompiler/tools/openroad/repair_design.py +41 -0
- siliconcompiler/tools/openroad/repair_timing.py +54 -0
- siliconcompiler/tools/openroad/screenshot.py +31 -1
- siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +8 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_init_floorplan.tcl +54 -15
- siliconcompiler/tools/openroad/scripts/apr/sc_irdrop.tcl +6 -4
- siliconcompiler/tools/openroad/scripts/apr/sc_write_data.tcl +4 -4
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +14 -5
- siliconcompiler/tools/openroad/scripts/common/read_liberty.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/common/reports.tcl +6 -3
- siliconcompiler/tools/openroad/scripts/common/screenshot.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/common/write_data_physical.tcl +8 -0
- siliconcompiler/tools/openroad/scripts/common/write_images.tcl +16 -12
- siliconcompiler/tools/openroad/scripts/sc_rdlroute.tcl +3 -1
- siliconcompiler/tools/openroad/write_data.py +78 -2
- siliconcompiler/tools/opensta/scripts/sc_check_library.tcl +2 -2
- siliconcompiler/tools/opensta/scripts/sc_report_libraries.tcl +2 -2
- siliconcompiler/tools/opensta/scripts/sc_timing.tcl +12 -14
- siliconcompiler/tools/opensta/timing.py +42 -3
- siliconcompiler/tools/slang/elaborate.py +16 -1
- siliconcompiler/tools/surelog/parse.py +54 -0
- siliconcompiler/tools/verilator/compile.py +120 -0
- siliconcompiler/tools/vivado/syn_fpga.py +27 -0
- siliconcompiler/tools/vpr/route.py +40 -0
- siliconcompiler/tools/xdm/convert.py +14 -0
- siliconcompiler/tools/xyce/simulate.py +26 -0
- siliconcompiler/tools/yosys/lec_asic.py +13 -0
- siliconcompiler/tools/yosys/syn_asic.py +332 -3
- siliconcompiler/tools/yosys/syn_fpga.py +32 -0
- siliconcompiler/toolscripts/_tools.json +9 -4
- siliconcompiler/toolscripts/ubuntu22/install-keplerformal.sh +72 -0
- siliconcompiler/toolscripts/ubuntu24/install-keplerformal.sh +72 -0
- siliconcompiler/utils/multiprocessing.py +11 -0
- siliconcompiler/utils/settings.py +70 -49
- {siliconcompiler-0.35.4.dist-info → siliconcompiler-0.36.1.dist-info}/METADATA +4 -4
- {siliconcompiler-0.35.4.dist-info → siliconcompiler-0.36.1.dist-info}/RECORD +89 -83
- {siliconcompiler-0.35.4.dist-info → siliconcompiler-0.36.1.dist-info}/WHEEL +0 -0
- {siliconcompiler-0.35.4.dist-info → siliconcompiler-0.36.1.dist-info}/entry_points.txt +0 -0
- {siliconcompiler-0.35.4.dist-info → siliconcompiler-0.36.1.dist-info}/licenses/LICENSE +0 -0
- {siliconcompiler-0.35.4.dist-info → siliconcompiler-0.36.1.dist-info}/top_level.txt +0 -0
|
@@ -22,7 +22,7 @@ set sc_design [sc_top]
|
|
|
22
22
|
# APR Parameters
|
|
23
23
|
set sc_targetlibs [sc_get_asic_libraries logic]
|
|
24
24
|
set sc_delaymodel [sc_cfg_get asic delaymodel]
|
|
25
|
-
set sc_scenarios [dict keys [sc_cfg_get constraint timing]]
|
|
25
|
+
set sc_scenarios [dict keys [sc_cfg_get constraint timing scenario]]
|
|
26
26
|
|
|
27
27
|
###############################
|
|
28
28
|
# Optional
|
|
@@ -41,7 +41,7 @@ define_corners {*}$sc_scenarios
|
|
|
41
41
|
foreach lib "$sc_targetlibs $sc_macrolibs" {
|
|
42
42
|
#Liberty
|
|
43
43
|
foreach corner $sc_scenarios {
|
|
44
|
-
foreach libcorner [sc_cfg_get constraint timing $corner libcorner] {
|
|
44
|
+
foreach libcorner [sc_cfg_get constraint timing scenario $corner libcorner] {
|
|
45
45
|
if { [sc_cfg_exists library $lib output $libcorner $sc_delaymodel] } {
|
|
46
46
|
foreach lib_file [sc_cfg_get library $lib output $libcorner $sc_delaymodel] {
|
|
47
47
|
puts "Reading liberty file for ${corner} ($libcorner): ${lib_file}"
|
|
@@ -23,10 +23,10 @@ if { $opensta_timing_mode == "asic" } {
|
|
|
23
23
|
set sc_logiclibs [sc_cfg_get asic asiclib]
|
|
24
24
|
set sc_delaymodel [sc_cfg_get asic delaymodel]
|
|
25
25
|
|
|
26
|
-
foreach corner [dict keys [sc_cfg_get constraint timing]] {
|
|
26
|
+
foreach corner [dict keys [sc_cfg_get constraint timing scenario]] {
|
|
27
27
|
if {
|
|
28
28
|
$sc_timing_mode == {} ||
|
|
29
|
-
[sc_cfg_get constraint timing $corner mode] == $sc_timing_mode
|
|
29
|
+
[sc_cfg_get constraint timing scenario $corner mode] == $sc_timing_mode
|
|
30
30
|
} {
|
|
31
31
|
lappend sc_scenarios $corner
|
|
32
32
|
}
|
|
@@ -56,7 +56,7 @@ if { $opensta_timing_mode == "asic" } {
|
|
|
56
56
|
foreach corner $sc_scenarios {
|
|
57
57
|
foreach lib $sc_logiclibs {
|
|
58
58
|
set lib_filesets []
|
|
59
|
-
foreach libcorner [sc_cfg_get constraint timing $corner libcorner] {
|
|
59
|
+
foreach libcorner [sc_cfg_get constraint timing scenario $corner libcorner] {
|
|
60
60
|
if {
|
|
61
61
|
[sc_cfg_exists library $lib asic \
|
|
62
62
|
libcornerfileset $libcorner $sc_delaymodel]
|
|
@@ -115,15 +115,13 @@ if { [file exists "inputs/${sc_topmodule}.sdc"] } {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
if { $sc_timing_mode != {} } {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
read_sdc $sdc
|
|
126
|
-
}
|
|
118
|
+
set sdcfileset [sc_cfg_get constraint timing mode $sc_timing_mode sdcfileset]
|
|
119
|
+
foreach sdc [sc_cfg_get_fileset $sc_topmodulelib $sdcfileset sdc] {
|
|
120
|
+
if { [lsearch -exact $sdc_files $sdc] == -1 } {
|
|
121
|
+
# read step constraint if exists
|
|
122
|
+
puts "Reading mode (${sc_timing_mode}) SDC: ${sdc}"
|
|
123
|
+
lappend sdc_files $sdc
|
|
124
|
+
read_sdc $sdc
|
|
127
125
|
}
|
|
128
126
|
}
|
|
129
127
|
}
|
|
@@ -168,7 +166,7 @@ puts "Timing path groups: [sta::path_group_names]"
|
|
|
168
166
|
|
|
169
167
|
if { $opensta_timing_mode == "asic" } {
|
|
170
168
|
foreach corner $sc_scenarios {
|
|
171
|
-
set pex_corner [sc_cfg_get constraint timing $corner pexcorner]
|
|
169
|
+
set pex_corner [sc_cfg_get constraint timing scenario $corner pexcorner]
|
|
172
170
|
|
|
173
171
|
set spef_file "inputs/${sc_topmodule}.${pex_corner}.spef"
|
|
174
172
|
if { [file exists $spef_file] } {
|
|
@@ -178,7 +176,7 @@ if { $opensta_timing_mode == "asic" } {
|
|
|
178
176
|
}
|
|
179
177
|
|
|
180
178
|
foreach corner $sc_scenarios {
|
|
181
|
-
set pex_corner [sc_cfg_get constraint timing $corner pexcorner]
|
|
179
|
+
set pex_corner [sc_cfg_get constraint timing scenario $corner pexcorner]
|
|
182
180
|
|
|
183
181
|
set input_sdf_file "inputs/${sc_topmodule}.${pex_corner}.sdf"
|
|
184
182
|
if { [file exists $input_sdf_file] } {
|
|
@@ -2,6 +2,8 @@ import re
|
|
|
2
2
|
|
|
3
3
|
import os.path
|
|
4
4
|
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
5
7
|
from siliconcompiler import sc_open
|
|
6
8
|
|
|
7
9
|
from siliconcompiler.tools.opensta import OpenSTATask
|
|
@@ -27,8 +29,43 @@ class TimingTaskBase(OpenSTATask):
|
|
|
27
29
|
defvalue="tools/_common/sdc/sc_constraints.sdc",
|
|
28
30
|
dataroot="siliconcompiler")
|
|
29
31
|
|
|
30
|
-
def
|
|
31
|
-
|
|
32
|
+
def set_opensta_topnpaths(self, n: int,
|
|
33
|
+
step: Optional[str] = None,
|
|
34
|
+
index: Optional[str] = None):
|
|
35
|
+
"""
|
|
36
|
+
Sets the number of paths to report timing for.
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
n (int): The number of paths.
|
|
40
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
41
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
42
|
+
"""
|
|
43
|
+
self.set("var", "top_n_paths", n, step=step, index=index)
|
|
44
|
+
|
|
45
|
+
def set_opensta_uniquepathgroupsperclock(self, enable: bool,
|
|
46
|
+
step: Optional[str] = None,
|
|
47
|
+
index: Optional[str] = None):
|
|
48
|
+
"""
|
|
49
|
+
Enables or disables generating separate path groups per clock.
|
|
50
|
+
|
|
51
|
+
Args:
|
|
52
|
+
enable (bool): Whether to enable unique path groups per clock.
|
|
53
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
54
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
55
|
+
"""
|
|
56
|
+
self.set("var", "unique_path_groups_per_clock", enable, step=step, index=index)
|
|
57
|
+
|
|
58
|
+
def set_opensta_timingmode(self, mode: str,
|
|
59
|
+
step: Optional[str] = None, index: Optional[str] = None):
|
|
60
|
+
"""
|
|
61
|
+
Sets the timing mode to use.
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
mode (str): The timing mode to use.
|
|
65
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
66
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
67
|
+
"""
|
|
68
|
+
self.set("var", "timing_mode", mode, step=step, index=index)
|
|
32
69
|
|
|
33
70
|
def setup(self):
|
|
34
71
|
super().setup()
|
|
@@ -40,6 +77,8 @@ class TimingTaskBase(OpenSTATask):
|
|
|
40
77
|
|
|
41
78
|
if self.get("var", "timing_mode"):
|
|
42
79
|
self.add_required_key("var", "timing_mode")
|
|
80
|
+
if self.get("var", "timing_mode") not in self.project.constraint.timing.get_modes():
|
|
81
|
+
raise LookupError(f'{self.get("var", "timing_mode")} is not a defined mode')
|
|
43
82
|
self.add_required_key("var", "top_n_paths")
|
|
44
83
|
self.add_required_key("var", "unique_path_groups_per_clock")
|
|
45
84
|
self.add_required_key("var", "opensta_generic_sdc")
|
|
@@ -149,7 +188,7 @@ class TimingTaskBase(OpenSTATask):
|
|
|
149
188
|
self.record_metric("drvs", drv_count, source_file=[drv_report])
|
|
150
189
|
|
|
151
190
|
def __report_map(self, metric):
|
|
152
|
-
corners = self.project.getkeys('constraint', 'timing')
|
|
191
|
+
corners = self.project.getkeys('constraint', 'timing', 'scenario')
|
|
153
192
|
mapping = {
|
|
154
193
|
"power": [f"reports/power.{corner}.rpt" for corner in corners],
|
|
155
194
|
"unconstrained": ["reports/unconstrained.rpt", "reports/unconstrained.topN.rpt"],
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
from typing import Optional, Union
|
|
2
|
+
|
|
1
3
|
import os.path
|
|
2
|
-
from siliconcompiler.tools.slang import pyslang
|
|
3
4
|
|
|
5
|
+
from siliconcompiler.tools.slang import pyslang
|
|
4
6
|
|
|
5
7
|
from siliconcompiler.tools.slang import SlangTask
|
|
6
8
|
|
|
@@ -18,6 +20,19 @@ class Elaborate(SlangTask):
|
|
|
18
20
|
"true/false, if true add the source file path information",
|
|
19
21
|
True)
|
|
20
22
|
|
|
23
|
+
def set_slang_includesourcepaths(self, enable: bool,
|
|
24
|
+
step: Optional[str] = None,
|
|
25
|
+
index: Optional[Union[int, str]] = None):
|
|
26
|
+
"""
|
|
27
|
+
Enables or disables adding source file path information to the output.
|
|
28
|
+
|
|
29
|
+
Args:
|
|
30
|
+
enable (bool): True to include source paths, False to exclude.
|
|
31
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
32
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
33
|
+
"""
|
|
34
|
+
self.set("var", "include_source_paths", enable, step=step, index=index)
|
|
35
|
+
|
|
21
36
|
def task(self):
|
|
22
37
|
return "elaborate"
|
|
23
38
|
|
|
@@ -3,6 +3,8 @@ import sys
|
|
|
3
3
|
|
|
4
4
|
import os.path
|
|
5
5
|
|
|
6
|
+
from typing import Optional
|
|
7
|
+
|
|
6
8
|
from siliconcompiler import sc_open
|
|
7
9
|
from siliconcompiler import utils
|
|
8
10
|
|
|
@@ -23,6 +25,58 @@ class ElaborateTask(Task):
|
|
|
23
25
|
self.add_parameter("disable_note", "bool",
|
|
24
26
|
"true/false, when true instructs Surelog to not log notes.")
|
|
25
27
|
|
|
28
|
+
def set_surelog_enablelowmem(self, enable: bool,
|
|
29
|
+
step: Optional[str] = None,
|
|
30
|
+
index: Optional[str] = None):
|
|
31
|
+
"""
|
|
32
|
+
Enables or disables low memory mode.
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
enable (bool): Whether to enable low memory mode.
|
|
36
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
37
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
38
|
+
"""
|
|
39
|
+
self.set("var", "enable_lowmem", enable, step=step, index=index)
|
|
40
|
+
|
|
41
|
+
def set_surelog_disablewritecache(self, disable: bool,
|
|
42
|
+
step: Optional[str] = None,
|
|
43
|
+
index: Optional[str] = None):
|
|
44
|
+
"""
|
|
45
|
+
Disables or enables writing to the cache.
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
disable (bool): Whether to disable writing to the cache.
|
|
49
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
50
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
51
|
+
"""
|
|
52
|
+
self.set("var", "disable_write_cache", disable, step=step, index=index)
|
|
53
|
+
|
|
54
|
+
def set_surelog_disableinfo(self, disable: bool,
|
|
55
|
+
step: Optional[str] = None,
|
|
56
|
+
index: Optional[str] = None):
|
|
57
|
+
"""
|
|
58
|
+
Disables or enables logging info messages.
|
|
59
|
+
|
|
60
|
+
Args:
|
|
61
|
+
disable (bool): Whether to disable logging info messages.
|
|
62
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
63
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
64
|
+
"""
|
|
65
|
+
self.set("var", "disable_info", disable, step=step, index=index)
|
|
66
|
+
|
|
67
|
+
def set_surelog_disablenote(self, disable: bool,
|
|
68
|
+
step: Optional[str] = None,
|
|
69
|
+
index: Optional[str] = None):
|
|
70
|
+
"""
|
|
71
|
+
Disables or enables logging note messages.
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
disable (bool): Whether to disable logging note messages.
|
|
75
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
76
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
77
|
+
"""
|
|
78
|
+
self.set("var", "disable_note", disable, step=step, index=index)
|
|
79
|
+
|
|
26
80
|
def tool(self):
|
|
27
81
|
return "surelog"
|
|
28
82
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import shlex
|
|
2
|
+
from typing import Optional, List, Union
|
|
2
3
|
|
|
3
4
|
from siliconcompiler.tools.verilator import VerilatorTask
|
|
4
5
|
|
|
@@ -35,6 +36,125 @@ class CompileTask(VerilatorTask):
|
|
|
35
36
|
self.add_parameter("initialize_random", "bool",
|
|
36
37
|
"true/false, when true registers will reset with a random value")
|
|
37
38
|
|
|
39
|
+
def set_verilator_mode(self, mode: str,
|
|
40
|
+
step: Optional[str] = None,
|
|
41
|
+
index: Optional[str] = None):
|
|
42
|
+
"""
|
|
43
|
+
Sets the compilation mode for Verilator.
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
mode (str): The compilation mode.
|
|
47
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
48
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
49
|
+
"""
|
|
50
|
+
self.set("var", "mode", mode, step=step, index=index)
|
|
51
|
+
|
|
52
|
+
def set_verilator_trace(self, enable: bool,
|
|
53
|
+
step: Optional[str] = None,
|
|
54
|
+
index: Optional[str] = None):
|
|
55
|
+
"""
|
|
56
|
+
Enables or disables trace generation.
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
enable (bool): Whether to enable trace generation.
|
|
60
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
61
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
62
|
+
"""
|
|
63
|
+
self.set("var", "trace", enable, step=step, index=index)
|
|
64
|
+
|
|
65
|
+
def set_verilator_tracetype(self, trace_type: str,
|
|
66
|
+
step: Optional[str] = None,
|
|
67
|
+
index: Optional[str] = None):
|
|
68
|
+
"""
|
|
69
|
+
Sets the type of wave file to create when trace is enabled.
|
|
70
|
+
|
|
71
|
+
Args:
|
|
72
|
+
trace_type (str): The trace type.
|
|
73
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
74
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
75
|
+
"""
|
|
76
|
+
self.set("var", "trace_type", trace_type, step=step, index=index)
|
|
77
|
+
|
|
78
|
+
def add_verilator_cincludes(self, include: Union[str, List[str]],
|
|
79
|
+
step: Optional[str] = None,
|
|
80
|
+
index: Optional[str] = None,
|
|
81
|
+
clobber: bool = False):
|
|
82
|
+
"""
|
|
83
|
+
Adds include directories for the C++ compiler.
|
|
84
|
+
|
|
85
|
+
Args:
|
|
86
|
+
include (Union[str, List[str]]): The include directory/directories to add.
|
|
87
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
88
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
89
|
+
clobber (bool, optional): If True, overwrites the existing list. Defaults to False.
|
|
90
|
+
"""
|
|
91
|
+
if clobber:
|
|
92
|
+
self.set("var", "cincludes", include, step=step, index=index)
|
|
93
|
+
else:
|
|
94
|
+
self.add("var", "cincludes", include, step=step, index=index)
|
|
95
|
+
|
|
96
|
+
def add_verilator_cflags(self, flag: Union[str, List[str]],
|
|
97
|
+
step: Optional[str] = None,
|
|
98
|
+
index: Optional[str] = None,
|
|
99
|
+
clobber: bool = False):
|
|
100
|
+
"""
|
|
101
|
+
Adds flags for the C++ compiler.
|
|
102
|
+
|
|
103
|
+
Args:
|
|
104
|
+
flag (Union[str, List[str]]): The flag(s) to add.
|
|
105
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
106
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
107
|
+
clobber (bool, optional): If True, overwrites the existing list. Defaults to False.
|
|
108
|
+
"""
|
|
109
|
+
if clobber:
|
|
110
|
+
self.set("var", "cflags", flag, step=step, index=index)
|
|
111
|
+
else:
|
|
112
|
+
self.add("var", "cflags", flag, step=step, index=index)
|
|
113
|
+
|
|
114
|
+
def add_verilator_ldflags(self, flag: Union[str, List[str]],
|
|
115
|
+
step: Optional[str] = None,
|
|
116
|
+
index: Optional[str] = None,
|
|
117
|
+
clobber: bool = False):
|
|
118
|
+
"""
|
|
119
|
+
Adds flags for the linker.
|
|
120
|
+
|
|
121
|
+
Args:
|
|
122
|
+
flag (Union[str, List[str]]): The flag(s) to add.
|
|
123
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
124
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
125
|
+
clobber (bool, optional): If True, overwrites the existing list. Defaults to False.
|
|
126
|
+
"""
|
|
127
|
+
if clobber:
|
|
128
|
+
self.set("var", "ldflags", flag, step=step, index=index)
|
|
129
|
+
else:
|
|
130
|
+
self.add("var", "ldflags", flag, step=step, index=index)
|
|
131
|
+
|
|
132
|
+
def set_verilator_pinsbv(self, width: int,
|
|
133
|
+
step: Optional[str] = None,
|
|
134
|
+
index: Optional[str] = None):
|
|
135
|
+
"""
|
|
136
|
+
Sets the datatype width for SystemC inputs/outputs.
|
|
137
|
+
|
|
138
|
+
Args:
|
|
139
|
+
width (int): The bit width.
|
|
140
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
141
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
142
|
+
"""
|
|
143
|
+
self.set("var", "pins_bv", width, step=step, index=index)
|
|
144
|
+
|
|
145
|
+
def set_verilator_initializerandom(self, enable: bool,
|
|
146
|
+
step: Optional[str] = None,
|
|
147
|
+
index: Optional[str] = None):
|
|
148
|
+
"""
|
|
149
|
+
Enables or disables random initialization of registers.
|
|
150
|
+
|
|
151
|
+
Args:
|
|
152
|
+
enable (bool): Whether to enable random initialization.
|
|
153
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
154
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
155
|
+
"""
|
|
156
|
+
self.set("var", "initialize_random", enable, step=step, index=index)
|
|
157
|
+
|
|
38
158
|
def task(self):
|
|
39
159
|
return "compile"
|
|
40
160
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from typing import Optional
|
|
1
2
|
from siliconcompiler.tools.vivado import VivadoTask
|
|
2
3
|
|
|
3
4
|
|
|
@@ -9,6 +10,32 @@ class SynthesisTask(VivadoTask):
|
|
|
9
10
|
self.add_parameter("synth_directive", "str", "synthesis directive", defvalue="Default")
|
|
10
11
|
self.add_parameter("synth_mode", "str", "synthesis mode", defvalue="none")
|
|
11
12
|
|
|
13
|
+
def set_vivado_synthdirective(self, directive: str,
|
|
14
|
+
step: Optional[str] = None,
|
|
15
|
+
index: Optional[str] = None):
|
|
16
|
+
"""
|
|
17
|
+
Sets the synthesis directive.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
directive (str): The synthesis directive.
|
|
21
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
22
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
23
|
+
"""
|
|
24
|
+
self.set("var", "synth_directive", directive, step=step, index=index)
|
|
25
|
+
|
|
26
|
+
def set_vivado_synthmode(self, mode: str,
|
|
27
|
+
step: Optional[str] = None,
|
|
28
|
+
index: Optional[str] = None):
|
|
29
|
+
"""
|
|
30
|
+
Sets the synthesis mode.
|
|
31
|
+
|
|
32
|
+
Args:
|
|
33
|
+
mode (str): The synthesis mode.
|
|
34
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
35
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
36
|
+
"""
|
|
37
|
+
self.set("var", "synth_mode", mode, step=step, index=index)
|
|
38
|
+
|
|
12
39
|
def task(self):
|
|
13
40
|
return "syn_fpga"
|
|
14
41
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import shutil
|
|
2
|
+
from typing import Optional
|
|
2
3
|
|
|
3
4
|
from siliconcompiler.tools.vpr import VPRTask
|
|
4
5
|
|
|
@@ -19,6 +20,45 @@ class RouteTask(VPRTask):
|
|
|
19
20
|
"set the timing corner for files generated by the post-implementation "
|
|
20
21
|
"netlist", defvalue="typical")
|
|
21
22
|
|
|
23
|
+
def set_vpr_maxrouteriterations(self, iterations: int,
|
|
24
|
+
step: Optional[str] = None,
|
|
25
|
+
index: Optional[str] = None):
|
|
26
|
+
"""
|
|
27
|
+
Sets the maximum number of routing iterations.
|
|
28
|
+
|
|
29
|
+
Args:
|
|
30
|
+
iterations (int): The maximum number of iterations.
|
|
31
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
32
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
33
|
+
"""
|
|
34
|
+
self.set("var", "max_router_iterations", iterations, step=step, index=index)
|
|
35
|
+
|
|
36
|
+
def set_vpr_genpostimplementationnetlist(self, enable: bool,
|
|
37
|
+
step: Optional[str] = None,
|
|
38
|
+
index: Optional[str] = None):
|
|
39
|
+
"""
|
|
40
|
+
Enables or disables generating a post-implementation netlist.
|
|
41
|
+
|
|
42
|
+
Args:
|
|
43
|
+
enable (bool): Whether to generate the netlist.
|
|
44
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
45
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
46
|
+
"""
|
|
47
|
+
self.set("var", "gen_post_implementation_netlist", enable, step=step, index=index)
|
|
48
|
+
|
|
49
|
+
def set_vpr_timingcorner(self, corner: str,
|
|
50
|
+
step: Optional[str] = None,
|
|
51
|
+
index: Optional[str] = None):
|
|
52
|
+
"""
|
|
53
|
+
Sets the timing corner for files generated by the post-implementation netlist.
|
|
54
|
+
|
|
55
|
+
Args:
|
|
56
|
+
corner (str): The timing corner.
|
|
57
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
58
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
59
|
+
"""
|
|
60
|
+
self.set("var", "timing_corner", corner, step=step, index=index)
|
|
61
|
+
|
|
22
62
|
def task(self):
|
|
23
63
|
return "route"
|
|
24
64
|
|
|
@@ -2,6 +2,7 @@ import shutil
|
|
|
2
2
|
|
|
3
3
|
import os.path
|
|
4
4
|
|
|
5
|
+
from typing import Optional
|
|
5
6
|
from siliconcompiler import Task
|
|
6
7
|
|
|
7
8
|
|
|
@@ -14,6 +15,19 @@ class ConvertTask(Task):
|
|
|
14
15
|
"the naming scheme for siliconcompiler",
|
|
15
16
|
defvalue=True)
|
|
16
17
|
|
|
18
|
+
def set_xdm_rename(self, enable: bool,
|
|
19
|
+
step: Optional[str] = None,
|
|
20
|
+
index: Optional[str] = None):
|
|
21
|
+
"""
|
|
22
|
+
Enables or disables renaming the output file.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
enable (bool): Whether to rename the output file.
|
|
26
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
27
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
28
|
+
"""
|
|
29
|
+
self.set("var", "rename", enable, step=step, index=index)
|
|
30
|
+
|
|
17
31
|
def tool(self):
|
|
18
32
|
return "xdm"
|
|
19
33
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import os.path
|
|
2
2
|
|
|
3
|
+
from typing import Union, Optional
|
|
4
|
+
|
|
3
5
|
from siliconcompiler import Task
|
|
4
6
|
|
|
5
7
|
|
|
@@ -11,6 +13,30 @@ class SimulateTask(Task):
|
|
|
11
13
|
self.add_parameter("trace_format", "<ASCII,binary>", "Format to use for traces.",
|
|
12
14
|
defvalue="ASCII")
|
|
13
15
|
|
|
16
|
+
def set_xyce_trace(self, enable: bool,
|
|
17
|
+
step: Optional[str] = None, index: Optional[Union[int, str]] = None):
|
|
18
|
+
"""
|
|
19
|
+
Enables or disables dumping all signals.
|
|
20
|
+
|
|
21
|
+
Args:
|
|
22
|
+
enable (bool): True to enable, False to disable.
|
|
23
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
24
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
25
|
+
"""
|
|
26
|
+
self.set('var', 'trace', enable, step=step, index=index)
|
|
27
|
+
|
|
28
|
+
def set_xyce_traceformat(self, trace_format: str,
|
|
29
|
+
step: Optional[str] = None, index: Optional[Union[int, str]] = None):
|
|
30
|
+
"""
|
|
31
|
+
Sets the format to use for traces.
|
|
32
|
+
|
|
33
|
+
Args:
|
|
34
|
+
trace_format (str): The format to use for traces.
|
|
35
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
36
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
37
|
+
"""
|
|
38
|
+
self.set('var', 'trace_format', trace_format, step=step, index=index)
|
|
39
|
+
|
|
14
40
|
def tool(self):
|
|
15
41
|
return "xyce"
|
|
16
42
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import re
|
|
2
|
+
from typing import Optional
|
|
2
3
|
|
|
3
4
|
from siliconcompiler import sc_open
|
|
4
5
|
|
|
@@ -15,6 +16,18 @@ class ASICLECTask(_ASICTask):
|
|
|
15
16
|
self.add_parameter("induction_steps", "int",
|
|
16
17
|
"Number of induction steps for yosys equivalence checking", defvalue=10)
|
|
17
18
|
|
|
19
|
+
def set_yosys_inductionsteps(self, steps: int,
|
|
20
|
+
step: Optional[str] = None, index: Optional[str] = None):
|
|
21
|
+
"""
|
|
22
|
+
Sets the number of induction steps for yosys equivalence checking.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
steps (int): The number of steps.
|
|
26
|
+
step (str, optional): The specific step to apply this configuration to.
|
|
27
|
+
index (str, optional): The specific index to apply this configuration to.
|
|
28
|
+
"""
|
|
29
|
+
self.set("var", "induction_steps", steps, step=step, index=index)
|
|
30
|
+
|
|
18
31
|
def task(self):
|
|
19
32
|
return "lec_asic"
|
|
20
33
|
|