siliconcompiler 0.36.3__py3-none-any.whl → 0.36.4__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 +23 -2
- siliconcompiler/apps/sc_issue.py +4 -0
- siliconcompiler/flows/dvflow.py +13 -0
- siliconcompiler/package/__init__.py +17 -12
- siliconcompiler/package/git.py +2 -1
- siliconcompiler/schema/baseschema.py +11 -2
- siliconcompiler/schema_support/cmdlineschema.py +3 -2
- siliconcompiler/tools/_common/cocotb/__init__.py +0 -0
- siliconcompiler/tools/_common/cocotb/cocotb_task.py +286 -0
- siliconcompiler/tools/builtin/wait.py +136 -0
- siliconcompiler/tools/icarus/cocotb_exec.py +53 -0
- siliconcompiler/tools/icarus/compile.py +47 -1
- siliconcompiler/tools/openroad/_apr.py +13 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_write_data.tcl +9 -2
- siliconcompiler/tools/verilator/cocotb_compile.py +55 -0
- siliconcompiler/tools/verilator/cocotb_exec.py +52 -0
- siliconcompiler/tools/verilator/compile.py +12 -8
- siliconcompiler/tools/vpr/__init__.py +1 -1
- siliconcompiler/tools/yosys/scripts/sc_synth_asic.tcl +1 -1
- siliconcompiler/tools/yosys/syn_asic.py +3 -3
- siliconcompiler/toolscripts/_tools.json +4 -4
- siliconcompiler/toolscripts/rhel8/install-icarus.sh +2 -2
- siliconcompiler/toolscripts/rhel8/install-magic.sh +1 -1
- siliconcompiler/toolscripts/rhel8/install-netgen.sh +1 -1
- siliconcompiler/toolscripts/rhel8/install-surelog.sh +1 -1
- siliconcompiler/toolscripts/rhel8/install-sv2v.sh +1 -1
- siliconcompiler/toolscripts/rhel8/install-verilator.sh +2 -2
- siliconcompiler/toolscripts/rhel8/install-xyce.sh +3 -3
- siliconcompiler/toolscripts/rhel9/install-ghdl.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-gtkwave.sh +2 -2
- siliconcompiler/toolscripts/rhel9/install-icarus.sh +2 -2
- siliconcompiler/toolscripts/rhel9/install-magic.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-netgen.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-openroad.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-opensta.sh +5 -5
- siliconcompiler/toolscripts/rhel9/install-surelog.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-sv2v.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-verilator.sh +2 -2
- siliconcompiler/toolscripts/rhel9/install-vpr.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-wildebeest.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-xyce.sh +3 -3
- siliconcompiler/toolscripts/rhel9/install-yosys-moosic.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-yosys-slang.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-yosys.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-bambu.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-bluespec.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-ghdl.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-gtkwave.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-icarus.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-icepack.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-magic.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-netgen.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-openroad.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-opensta.sh +5 -5
- siliconcompiler/toolscripts/ubuntu20/install-slurm.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-surelog.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-sv2v.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-verilator.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-xyce.sh +3 -3
- siliconcompiler/toolscripts/ubuntu22/install-bambu.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-bluespec.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-ghdl.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-gtkwave.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-icarus.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-icepack.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-keplerformal.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-magic.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-netgen.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-nextpnr.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-openroad.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-opensta.sh +5 -5
- siliconcompiler/toolscripts/ubuntu22/install-slurm.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-surelog.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-surfer.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-sv2v.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-verilator.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-vpr.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-wildebeest.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-xyce.sh +3 -3
- siliconcompiler/toolscripts/ubuntu22/install-yosys-moosic.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-yosys-slang.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-yosys.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-bambu.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-bluespec.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-ghdl.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-gtkwave.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-icarus.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-icepack.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-keplerformal.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-magic.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-netgen.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-nextpnr.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-openroad.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-opensta.sh +5 -5
- siliconcompiler/toolscripts/ubuntu24/install-slurm.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-surelog.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-surfer.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-sv2v.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-verilator.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-vpr.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-wildebeest.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-xyce.sh +3 -3
- siliconcompiler/toolscripts/ubuntu24/install-yosys-moosic.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-yosys-slang.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-yosys.sh +1 -1
- {siliconcompiler-0.36.3.dist-info → siliconcompiler-0.36.4.dist-info}/METADATA +3 -1
- {siliconcompiler-0.36.3.dist-info → siliconcompiler-0.36.4.dist-info}/RECORD +112 -107
- {siliconcompiler-0.36.3.dist-info → siliconcompiler-0.36.4.dist-info}/WHEEL +1 -1
- {siliconcompiler-0.36.3.dist-info → siliconcompiler-0.36.4.dist-info}/entry_points.txt +0 -0
- {siliconcompiler-0.36.3.dist-info → siliconcompiler-0.36.4.dist-info}/licenses/LICENSE +0 -0
- {siliconcompiler-0.36.3.dist-info → siliconcompiler-0.36.4.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from siliconcompiler.tools._common.cocotb.cocotb_task import (
|
|
2
|
+
CocotbTask,
|
|
3
|
+
get_cocotb_config
|
|
4
|
+
)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class CocotbExecTask(CocotbTask):
|
|
8
|
+
'''
|
|
9
|
+
Run a cocotb testbench against a compiled Icarus Verilog simulation.
|
|
10
|
+
|
|
11
|
+
This task takes a compiled .vvp file from the icarus compile task and
|
|
12
|
+
executes it with the cocotb VPI module loaded, enabling Python-based
|
|
13
|
+
testbenches to interact with the simulation.
|
|
14
|
+
|
|
15
|
+
The task requires cocotb to be installed in the Python environment.
|
|
16
|
+
Test modules are specified by adding Python files to the fileset using
|
|
17
|
+
the "python" filetype.
|
|
18
|
+
'''
|
|
19
|
+
|
|
20
|
+
def tool(self):
|
|
21
|
+
return "icarus"
|
|
22
|
+
|
|
23
|
+
def parse_version(self, stdout):
|
|
24
|
+
# vvp version output: "Icarus Verilog runtime version 13.0 (devel) ..."
|
|
25
|
+
return stdout.split()[4]
|
|
26
|
+
|
|
27
|
+
def setup(self):
|
|
28
|
+
super().setup()
|
|
29
|
+
|
|
30
|
+
# vvp is the Icarus Verilog runtime
|
|
31
|
+
self.set_exe("vvp", vswitch="-V")
|
|
32
|
+
self.add_version(">=10.3")
|
|
33
|
+
|
|
34
|
+
self.set_threads()
|
|
35
|
+
|
|
36
|
+
# Input: compiled .vvp file from compile task
|
|
37
|
+
self.add_input_file(ext="vvp")
|
|
38
|
+
|
|
39
|
+
def runtime_options(self):
|
|
40
|
+
options = super().runtime_options()
|
|
41
|
+
|
|
42
|
+
libs_dir, lib_name, _ = get_cocotb_config("icarus")
|
|
43
|
+
|
|
44
|
+
# -M: VPI module search path
|
|
45
|
+
options.extend(["-M", str(libs_dir)])
|
|
46
|
+
|
|
47
|
+
# -m: VPI module to load
|
|
48
|
+
options.extend(["-m", lib_name])
|
|
49
|
+
|
|
50
|
+
# Input .vvp file
|
|
51
|
+
options.append(f"inputs/{self.design_topmodule}.vvp")
|
|
52
|
+
|
|
53
|
+
return options
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Optional
|
|
1
|
+
from typing import Optional, Union
|
|
2
2
|
from siliconcompiler import Task
|
|
3
3
|
|
|
4
4
|
|
|
@@ -15,6 +15,11 @@ class CompileTask(Task):
|
|
|
15
15
|
'See the corresponding "-g" flags in the Icarus manual for more "'
|
|
16
16
|
'"information.')
|
|
17
17
|
|
|
18
|
+
self.add_parameter("trace", "bool",
|
|
19
|
+
'Enable waveform tracing. When enabled, a VCD dump module is '
|
|
20
|
+
'auto-generated and compiled with the design to capture all signals.',
|
|
21
|
+
defvalue=False)
|
|
22
|
+
|
|
18
23
|
def set_icarus_veriloggeneration(self, gen: str,
|
|
19
24
|
step: Optional[str] = None,
|
|
20
25
|
index: Optional[str] = None):
|
|
@@ -28,6 +33,22 @@ class CompileTask(Task):
|
|
|
28
33
|
"""
|
|
29
34
|
self.set("var", "verilog_generation", gen, step=step, index=index)
|
|
30
35
|
|
|
36
|
+
def set_trace_enabled(self, enabled: bool = True,
|
|
37
|
+
step: Optional[str] = None,
|
|
38
|
+
index: Optional[Union[str, int]] = None):
|
|
39
|
+
"""
|
|
40
|
+
Enables or disables waveform tracing.
|
|
41
|
+
|
|
42
|
+
When enabled, a VCD dump module is auto-generated and compiled with
|
|
43
|
+
the design. The waveform file will be written to reports/<topmodule>.vcd.
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
enabled (bool): Whether to enable tracing. Defaults to True.
|
|
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", "trace", enabled, step=step, index=index)
|
|
51
|
+
|
|
31
52
|
def tool(self):
|
|
32
53
|
return "icarus"
|
|
33
54
|
|
|
@@ -74,6 +95,26 @@ class CompileTask(Task):
|
|
|
74
95
|
if self.get("var", "verilog_generation"):
|
|
75
96
|
self.add_required_key("var", "verilog_generation")
|
|
76
97
|
|
|
98
|
+
def pre_process(self):
|
|
99
|
+
super().pre_process()
|
|
100
|
+
|
|
101
|
+
# Generate VCD dump module if tracing is enabled
|
|
102
|
+
if self.get("var", "trace"):
|
|
103
|
+
self._generate_trace_module()
|
|
104
|
+
|
|
105
|
+
def _generate_trace_module(self):
|
|
106
|
+
trace_file = f"reports/{self.design_topmodule}.vcd"
|
|
107
|
+
dump_module = f"""// Auto-generated waveform dump module
|
|
108
|
+
module sc_trace_dump();
|
|
109
|
+
initial begin
|
|
110
|
+
$dumpfile("{trace_file}");
|
|
111
|
+
$dumpvars(0, {self.design_topmodule});
|
|
112
|
+
end
|
|
113
|
+
endmodule
|
|
114
|
+
"""
|
|
115
|
+
with open("sc_trace_dump.v", "w") as f:
|
|
116
|
+
f.write(dump_module)
|
|
117
|
+
|
|
77
118
|
def runtime_options(self):
|
|
78
119
|
options = super().runtime_options()
|
|
79
120
|
|
|
@@ -137,4 +178,9 @@ class CompileTask(Task):
|
|
|
137
178
|
for value in lib.get_file(fileset=fileset, filetype="verilog"):
|
|
138
179
|
options.append(value)
|
|
139
180
|
|
|
181
|
+
# Add trace dump module if tracing is enabled
|
|
182
|
+
if self.get("var", "trace"):
|
|
183
|
+
options.append("sc_trace_dump.v")
|
|
184
|
+
options.extend(["-s", "sc_trace_dump"])
|
|
185
|
+
|
|
140
186
|
return options
|
|
@@ -1438,13 +1438,26 @@ class APRTask(OpenROADTask):
|
|
|
1438
1438
|
libobj = self.project.get_library(lib)
|
|
1439
1439
|
self.add_required_key(libobj, "fileset", fileset, "file", "sdc")
|
|
1440
1440
|
|
|
1441
|
+
load_tech = True
|
|
1441
1442
|
if f"{self.design_topmodule}.odb" in self.get_files_from_input_nodes():
|
|
1442
1443
|
self.add_input_file(ext="odb")
|
|
1444
|
+
load_tech = False
|
|
1443
1445
|
elif f"{self.design_topmodule}.def" in self.get_files_from_input_nodes():
|
|
1444
1446
|
self.add_input_file(ext="def")
|
|
1445
1447
|
else:
|
|
1446
1448
|
pass
|
|
1447
1449
|
|
|
1450
|
+
if load_tech:
|
|
1451
|
+
pdk = self.project.get_library(self.project.get("asic", "pdk"))
|
|
1452
|
+
for fs in pdk.get("pdk", "aprtechfileset", "openroad"):
|
|
1453
|
+
if pdk.has_file(fileset=fs, filetype="lef"):
|
|
1454
|
+
self.add_required_key(pdk, "fileset", fs, "file", "lef")
|
|
1455
|
+
for asiclib in self.project.get("asic", "asiclib"):
|
|
1456
|
+
lib = self.project.get_library(asiclib)
|
|
1457
|
+
for fs in lib.get("asic", "aprfileset"):
|
|
1458
|
+
if lib.has_file(fileset=fs, filetype="lef"):
|
|
1459
|
+
self.add_required_key(lib, "fileset", fs, "file", "lef")
|
|
1460
|
+
|
|
1448
1461
|
def _add_pnr_outputs(self):
|
|
1449
1462
|
if self.get("var", "load_sdcs"):
|
|
1450
1463
|
self.add_output_file(ext="sdc")
|
|
@@ -46,6 +46,13 @@ if { [sc_cfg_tool_task_get var write_cdl] } {
|
|
|
46
46
|
# Generate SPEF
|
|
47
47
|
###############################
|
|
48
48
|
|
|
49
|
+
set estimate_parasitics_args []
|
|
50
|
+
if { [sc_has_routing] || [sc_has_global_routing] } {
|
|
51
|
+
lappend estimate_parasitics_args -global_routing
|
|
52
|
+
} else {
|
|
53
|
+
lappend estimate_parasitics_args -placement
|
|
54
|
+
}
|
|
55
|
+
|
|
49
56
|
if { [sc_cfg_tool_task_get var write_spef] } {
|
|
50
57
|
set pexfileset [sc_cfg_get library $sc_pdk pdk pexmodelfileset openroad]
|
|
51
58
|
# just need to define a corner
|
|
@@ -75,11 +82,11 @@ if { [sc_cfg_tool_task_get var write_spef] } {
|
|
|
75
82
|
}
|
|
76
83
|
} else {
|
|
77
84
|
# estimate for metrics
|
|
78
|
-
estimate_parasitics
|
|
85
|
+
estimate_parasitics {*}$estimate_parasitics_args
|
|
79
86
|
}
|
|
80
87
|
} else {
|
|
81
88
|
# estimate for metrics
|
|
82
|
-
estimate_parasitics
|
|
89
|
+
estimate_parasitics {*}$estimate_parasitics_args
|
|
83
90
|
}
|
|
84
91
|
|
|
85
92
|
###############################
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import shlex
|
|
2
|
+
|
|
3
|
+
from siliconcompiler.tools.verilator.compile import CompileTask
|
|
4
|
+
from siliconcompiler.tools._common.cocotb.cocotb_task import (
|
|
5
|
+
get_cocotb_config
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CocotbCompileTask(CompileTask):
|
|
10
|
+
|
|
11
|
+
def task(self):
|
|
12
|
+
return "cocotb_compile"
|
|
13
|
+
|
|
14
|
+
def _setup_c_file_requirement(self):
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
def runtime_options(self):
|
|
18
|
+
options = super().runtime_options()
|
|
19
|
+
|
|
20
|
+
# Cocotb-specific flags
|
|
21
|
+
options.append('--vpi')
|
|
22
|
+
options.append('--public-flat-rw')
|
|
23
|
+
options.extend(['--prefix', 'Vtop'])
|
|
24
|
+
|
|
25
|
+
# Get cocotb configuration
|
|
26
|
+
libs_dir, lib_name, share_dir = get_cocotb_config("verilator")
|
|
27
|
+
|
|
28
|
+
# Link flags for cocotb VPI library
|
|
29
|
+
# lib_name is like "libcocotbvpi_verilator.so", but -l expects "cocotbvpi_verilator"
|
|
30
|
+
# Strip "lib" prefix and ".so" suffix
|
|
31
|
+
link_name = lib_name
|
|
32
|
+
|
|
33
|
+
if link_name.startswith('lib'):
|
|
34
|
+
link_name = link_name[3:]
|
|
35
|
+
|
|
36
|
+
if link_name.endswith('.so'):
|
|
37
|
+
link_name = link_name[:-3]
|
|
38
|
+
elif link_name.endswith('.dylib'):
|
|
39
|
+
link_name = link_name[:-6]
|
|
40
|
+
else:
|
|
41
|
+
raise RuntimeError
|
|
42
|
+
|
|
43
|
+
cocotb_flags = [
|
|
44
|
+
f'-Wl,-rpath,{libs_dir}',
|
|
45
|
+
f'-L{libs_dir}',
|
|
46
|
+
f'-l{link_name}'
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
options.extend(['-LDFLAGS', shlex.join(cocotb_flags)])
|
|
50
|
+
|
|
51
|
+
# Add cocotb's verilator.cpp as the simulation main
|
|
52
|
+
verilator_cpp = f'{share_dir}/lib/verilator/verilator.cpp'
|
|
53
|
+
options.append(verilator_cpp)
|
|
54
|
+
|
|
55
|
+
return options
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from typing import Optional, Union
|
|
2
|
+
|
|
3
|
+
from siliconcompiler.tools._common.cocotb.cocotb_task import CocotbTask
|
|
4
|
+
from siliconcompiler.tools.execute.exec_input import ExecInputTask
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class CocotbExecTask(CocotbTask, ExecInputTask):
|
|
8
|
+
|
|
9
|
+
def __init__(self):
|
|
10
|
+
super().__init__()
|
|
11
|
+
|
|
12
|
+
self.add_parameter("trace", "bool",
|
|
13
|
+
'Enable waveform tracing. The simulation must have been '
|
|
14
|
+
'compiled with trace support enabled.',
|
|
15
|
+
defvalue=False)
|
|
16
|
+
|
|
17
|
+
self.add_parameter("trace_type", "<vcd,fst>",
|
|
18
|
+
'Specifies type of wave file to create when [trace] is set.',
|
|
19
|
+
defvalue="vcd")
|
|
20
|
+
|
|
21
|
+
def set_cocotb_trace(
|
|
22
|
+
self,
|
|
23
|
+
enable: bool = True,
|
|
24
|
+
trace_type: str = "vcd",
|
|
25
|
+
step: Optional[str] = None,
|
|
26
|
+
index: Optional[Union[str, int]] = None
|
|
27
|
+
):
|
|
28
|
+
self.set("var", "trace", enable, step=step, index=index)
|
|
29
|
+
self.set("var", "trace_type", trace_type, step=step, index=index)
|
|
30
|
+
|
|
31
|
+
def tool(self):
|
|
32
|
+
return "verilator"
|
|
33
|
+
|
|
34
|
+
def setup(self):
|
|
35
|
+
super().setup()
|
|
36
|
+
|
|
37
|
+
if self.get("var", "trace"):
|
|
38
|
+
self.add_required_key("var", "trace_type")
|
|
39
|
+
|
|
40
|
+
def runtime_options(self):
|
|
41
|
+
options = super().runtime_options()
|
|
42
|
+
|
|
43
|
+
# Add trace options if tracing is enabled
|
|
44
|
+
if self.get("var", "trace"):
|
|
45
|
+
options.append("--trace")
|
|
46
|
+
|
|
47
|
+
ext = self.get("var", "trace_type")
|
|
48
|
+
|
|
49
|
+
trace_file = f"reports/{self.design_topmodule}.{ext}"
|
|
50
|
+
options.extend(["--trace-file", trace_file])
|
|
51
|
+
|
|
52
|
+
return options
|
|
@@ -158,6 +158,17 @@ class CompileTask(VerilatorTask):
|
|
|
158
158
|
def task(self):
|
|
159
159
|
return "compile"
|
|
160
160
|
|
|
161
|
+
def _setup_c_file_requirement(self):
|
|
162
|
+
"""Set up the C file requirement. Override in subclasses to customize."""
|
|
163
|
+
added_key = False
|
|
164
|
+
for lib, fileset in self.project.get_filesets():
|
|
165
|
+
if lib.has_file(fileset=fileset, filetype="c"):
|
|
166
|
+
self.add_required_key(lib, "fileset", fileset, "file", "c")
|
|
167
|
+
added_key = True
|
|
168
|
+
if not added_key:
|
|
169
|
+
self.add_required_key(self.project.design, "fileset",
|
|
170
|
+
self.project.get("option", "fileset")[0], "file", "c")
|
|
171
|
+
|
|
161
172
|
def setup(self):
|
|
162
173
|
super().setup()
|
|
163
174
|
self.set_threads()
|
|
@@ -170,14 +181,7 @@ class CompileTask(VerilatorTask):
|
|
|
170
181
|
self.add_required_key("var", "trace_type")
|
|
171
182
|
self.add_required_key("var", "initialize_random")
|
|
172
183
|
|
|
173
|
-
|
|
174
|
-
for lib, fileset in self.project.get_filesets():
|
|
175
|
-
if lib.has_file(fileset=fileset, filetype="c"):
|
|
176
|
-
self.add_required_key(lib, "fileset", fileset, "file", "c")
|
|
177
|
-
added_key = True
|
|
178
|
-
if not added_key:
|
|
179
|
-
self.add_required_key(self.project.design, "fileset",
|
|
180
|
-
self.project.get("option", "fileset")[0], "file", "c")
|
|
184
|
+
self._setup_c_file_requirement()
|
|
181
185
|
|
|
182
186
|
if self.get("var", "cincludes"):
|
|
183
187
|
self.add_required_key("var", "cincludes")
|
|
@@ -257,7 +257,7 @@ class VPRTask(Task):
|
|
|
257
257
|
super().setup()
|
|
258
258
|
|
|
259
259
|
self.set_exe("vpr", vswitch="--version")
|
|
260
|
-
self.add_version(">=v8.0.0-
|
|
260
|
+
self.add_version(">=v8.0.0-15021")
|
|
261
261
|
|
|
262
262
|
self.add_regex("warnings", "^Warning")
|
|
263
263
|
self.add_regex("errors", "^Error")
|
|
@@ -241,9 +241,9 @@ class ASICSynthesis(_ASICTask, YosysTask):
|
|
|
241
241
|
self.add_parameter(
|
|
242
242
|
"synth_extra_map",
|
|
243
243
|
"[file]",
|
|
244
|
-
"Files used in synthesis to perform additional techmapping"
|
|
245
|
-
|
|
246
|
-
|
|
244
|
+
"Files used in synthesis to perform additional techmapping")
|
|
245
|
+
# "techmaps/lcu_kogge_stone.v",
|
|
246
|
+
# dataroot="yosys-techmaps")
|
|
247
247
|
|
|
248
248
|
def __init_hierarchy_parameter(self):
|
|
249
249
|
self.add_parameter(
|
|
@@ -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": "49a31384924a2c400ce27da80e270917ffddc2bb",
|
|
5
5
|
"docker-cmds": [
|
|
6
6
|
"# Remove OR-Tools files",
|
|
7
7
|
"RUN rm -f $SC_PREFIX/Makefile $SC_PREFIX/README.md",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"opensta": {
|
|
19
19
|
"git-url": "https://github.com/parallaxsw/OpenSTA.git",
|
|
20
|
-
"git-commit": "
|
|
20
|
+
"git-commit": "0c6c3d3d35ca2c1a103702652ddb9ddba54347a8",
|
|
21
21
|
"auto-update": true
|
|
22
22
|
},
|
|
23
23
|
"netgen": {
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
},
|
|
77
77
|
"vpr": {
|
|
78
78
|
"git-url": "https://github.com/verilog-to-routing/vtr-verilog-to-routing.git",
|
|
79
|
-
"git-commit": "
|
|
79
|
+
"git-commit": "fe77ace273b3f0558763e0e91d409b2d13344eff",
|
|
80
80
|
"auto-update": false
|
|
81
81
|
},
|
|
82
82
|
"icepack": {
|
|
@@ -171,4 +171,4 @@
|
|
|
171
171
|
"git-commit": "d647673f3b3960256069a79e8d92d36a3b89d9a4",
|
|
172
172
|
"auto-update": false
|
|
173
173
|
}
|
|
174
|
-
}
|
|
174
|
+
}
|
|
@@ -27,7 +27,7 @@ wget http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz
|
|
|
27
27
|
tar xvf gperf-3.1.tar.gz
|
|
28
28
|
cd gperf-3.1
|
|
29
29
|
./configure $args
|
|
30
|
-
make -j$(nproc)
|
|
30
|
+
make -j${NPROC:-$(nproc)}
|
|
31
31
|
$SUDO_INSTALL make install
|
|
32
32
|
cd ..
|
|
33
33
|
|
|
@@ -42,7 +42,7 @@ git checkout $(python3 ${src_path}/_tools.py --tool icarus --field git-commit)
|
|
|
42
42
|
|
|
43
43
|
sh autoconf.sh
|
|
44
44
|
./configure $args
|
|
45
|
-
make -j$(nproc)
|
|
45
|
+
make -j${NPROC:-$(nproc)}
|
|
46
46
|
$SUDO_INSTALL make install
|
|
47
47
|
|
|
48
48
|
cd -
|
|
@@ -26,7 +26,7 @@ cd surelog
|
|
|
26
26
|
git checkout $(python3 ${src_path}/_tools.py --tool surelog --field git-commit)
|
|
27
27
|
git submodule update --init --recursive
|
|
28
28
|
|
|
29
|
-
scl run gcc-toolset-12 "LDFLAGS=\"-lrt\" make -j$(nproc)"
|
|
29
|
+
scl run gcc-toolset-12 "LDFLAGS=\"-lrt\" make -j${NPROC:-$(nproc)}"
|
|
30
30
|
|
|
31
31
|
USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
|
|
32
32
|
if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
|
|
@@ -31,7 +31,7 @@ git clone $(python3 ${src_path}/_tools.py --tool sv2v --field git-url) sv2v
|
|
|
31
31
|
cd sv2v
|
|
32
32
|
git checkout $(python3 ${src_path}/_tools.py --tool sv2v --field git-commit)
|
|
33
33
|
|
|
34
|
-
make -j$(nproc)
|
|
34
|
+
make -j${NPROC:-$(nproc)}
|
|
35
35
|
|
|
36
36
|
if [ ! -z ${PREFIX} ]; then
|
|
37
37
|
$SUDO_INSTALL mkdir -p ${PREFIX}/bin/
|
|
@@ -28,7 +28,7 @@ tar xvf help2man-1.43.3.tar.gz
|
|
|
28
28
|
cd help2man-1.43.3
|
|
29
29
|
|
|
30
30
|
./configure $args
|
|
31
|
-
make -j$(nproc)
|
|
31
|
+
make -j${NPROC:-$(nproc)}
|
|
32
32
|
$SUDO_INSTALL make install
|
|
33
33
|
|
|
34
34
|
cd ..
|
|
@@ -42,7 +42,7 @@ git checkout $(python3 ${src_path}/_tools.py --tool verilator --field git-commit
|
|
|
42
42
|
autoconf
|
|
43
43
|
|
|
44
44
|
./configure $args
|
|
45
|
-
make -j$(nproc)
|
|
45
|
+
make -j${NPROC:-$(nproc)}
|
|
46
46
|
$SUDO_INSTALL make install
|
|
47
47
|
|
|
48
48
|
cd -
|
|
@@ -51,7 +51,7 @@ cmake \
|
|
|
51
51
|
-D TPL_AMD_INCLUDE_DIRS="/usr/include/suitesparse" \
|
|
52
52
|
-C "../cmake/trilinos/trilinos-base.cmake" \
|
|
53
53
|
..
|
|
54
|
-
cmake --build . -j$(nproc)
|
|
54
|
+
cmake --build . -j${NPROC:-$(nproc)}
|
|
55
55
|
$SUDO_INSTALL make install
|
|
56
56
|
cd ../..
|
|
57
57
|
|
|
@@ -64,7 +64,7 @@ cmake \
|
|
|
64
64
|
-D Trilinos_ROOT=$PREFIX/trilinos \
|
|
65
65
|
-D BUILD_SHARED_LIBS=ON \
|
|
66
66
|
..
|
|
67
|
-
cmake --build . -j$(nproc)
|
|
68
|
-
cmake --build . -j$(nproc) --target xycecinterface
|
|
67
|
+
cmake --build . -j${NPROC:-$(nproc)}
|
|
68
|
+
cmake --build . -j${NPROC:-$(nproc)} --target xycecinterface
|
|
69
69
|
$SUDO_INSTALL make install
|
|
70
70
|
cd -
|
|
@@ -32,7 +32,7 @@ wget http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz
|
|
|
32
32
|
tar xvf gperf-3.1.tar.gz
|
|
33
33
|
cd gperf-3.1
|
|
34
34
|
./configure $args
|
|
35
|
-
make -j$(nproc)
|
|
35
|
+
make -j${NPROC:-$(nproc)}
|
|
36
36
|
$SUDO_INSTALL make install
|
|
37
37
|
cd ..
|
|
38
38
|
|
|
@@ -44,5 +44,5 @@ cd gtkwave3-gtk3
|
|
|
44
44
|
|
|
45
45
|
./autogen.sh
|
|
46
46
|
LDFLAGS="-ltcl -ltk" ./configure --enable-gtk3 $args
|
|
47
|
-
make -j$(nproc)
|
|
47
|
+
make -j${NPROC:-$(nproc)}
|
|
48
48
|
$SUDO_INSTALL make install
|
|
@@ -27,7 +27,7 @@ wget http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz
|
|
|
27
27
|
tar xvf gperf-3.1.tar.gz
|
|
28
28
|
cd gperf-3.1
|
|
29
29
|
./configure $args
|
|
30
|
-
make -j$(nproc)
|
|
30
|
+
make -j${NPROC:-$(nproc)}
|
|
31
31
|
$SUDO_INSTALL make install
|
|
32
32
|
cd ..
|
|
33
33
|
|
|
@@ -42,7 +42,7 @@ git checkout $(python3 ${src_path}/_tools.py --tool icarus --field git-commit)
|
|
|
42
42
|
|
|
43
43
|
sh autoconf.sh
|
|
44
44
|
./configure $args
|
|
45
|
-
make -j$(nproc)
|
|
45
|
+
make -j${NPROC:-$(nproc)}
|
|
46
46
|
$SUDO_INSTALL make install
|
|
47
47
|
|
|
48
48
|
cd -
|
|
@@ -40,7 +40,7 @@ cd eigen
|
|
|
40
40
|
mkdir build
|
|
41
41
|
cd build
|
|
42
42
|
cmake $cmake_args ..
|
|
43
|
-
make -j$(nproc)
|
|
43
|
+
make -j${NPROC:-$(nproc)}
|
|
44
44
|
$SUDO_INSTALL make install
|
|
45
45
|
|
|
46
46
|
cd ../../..
|
|
@@ -51,7 +51,7 @@ git clone --depth=1 -b 3.0.0 https://github.com/The-OpenROAD-Project/cudd.git
|
|
|
51
51
|
cd cudd
|
|
52
52
|
autoreconf
|
|
53
53
|
./configure $config_prefix
|
|
54
|
-
make -j$(nproc)
|
|
54
|
+
make -j${NPROC:-$(nproc)}
|
|
55
55
|
$SUDO_INSTALL make install
|
|
56
56
|
|
|
57
57
|
cd ../..
|
|
@@ -65,8 +65,8 @@ wget https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-1
|
|
|
65
65
|
|
|
66
66
|
./autogen.sh
|
|
67
67
|
./configure $config_prefix
|
|
68
|
-
make -j$(nproc)
|
|
69
|
-
$SUDO_INSTALL make -j$(nproc) install
|
|
68
|
+
make -j${NPROC:-$(nproc)}
|
|
69
|
+
$SUDO_INSTALL make -j${NPROC:-$(nproc)} install
|
|
70
70
|
|
|
71
71
|
cd ../..
|
|
72
72
|
# opensta
|
|
@@ -78,7 +78,7 @@ git submodule update --init --recursive
|
|
|
78
78
|
mkdir -p build
|
|
79
79
|
cd build
|
|
80
80
|
cmake .. $cmake_args
|
|
81
|
-
make -j$(nproc)
|
|
81
|
+
make -j${NPROC:-$(nproc)}
|
|
82
82
|
$SUDO_INSTALL make install
|
|
83
83
|
|
|
84
84
|
cd -
|
|
@@ -25,7 +25,7 @@ cd surelog
|
|
|
25
25
|
git checkout $(python3 ${src_path}/_tools.py --tool surelog --field git-commit)
|
|
26
26
|
git submodule update --init --recursive
|
|
27
27
|
|
|
28
|
-
scl run gcc-toolset-12 "LDFLAGS=\"-lrt\" make -j$(nproc)"
|
|
28
|
+
scl run gcc-toolset-12 "LDFLAGS=\"-lrt\" make -j${NPROC:-$(nproc)}"
|
|
29
29
|
|
|
30
30
|
USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
|
|
31
31
|
if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
|
|
@@ -31,7 +31,7 @@ git clone $(python3 ${src_path}/_tools.py --tool sv2v --field git-url) sv2v
|
|
|
31
31
|
cd sv2v
|
|
32
32
|
git checkout $(python3 ${src_path}/_tools.py --tool sv2v --field git-commit)
|
|
33
33
|
|
|
34
|
-
make -j$(nproc)
|
|
34
|
+
make -j${NPROC:-$(nproc)}
|
|
35
35
|
|
|
36
36
|
if [ ! -z ${PREFIX} ]; then
|
|
37
37
|
$SUDO_INSTALL mkdir -p ${PREFIX}/bin/
|
|
@@ -28,7 +28,7 @@ tar xvf help2man-1.43.3.tar.gz
|
|
|
28
28
|
cd help2man-1.43.3
|
|
29
29
|
|
|
30
30
|
./configure $args
|
|
31
|
-
make -j$(nproc)
|
|
31
|
+
make -j${NPROC:-$(nproc)}
|
|
32
32
|
$SUDO_INSTALL make install
|
|
33
33
|
|
|
34
34
|
cd ..
|
|
@@ -42,7 +42,7 @@ git checkout $(python3 ${src_path}/_tools.py --tool verilator --field git-commit
|
|
|
42
42
|
autoconf
|
|
43
43
|
|
|
44
44
|
./configure $args
|
|
45
|
-
make -j$(nproc)
|
|
45
|
+
make -j${NPROC:-$(nproc)}
|
|
46
46
|
$SUDO_INSTALL make install
|
|
47
47
|
|
|
48
48
|
cd -
|
|
@@ -31,6 +31,6 @@ if [ ! -z ${PREFIX} ]; then
|
|
|
31
31
|
args="-DCMAKE_INSTALL_PREFIX=$PREFIX"
|
|
32
32
|
fi
|
|
33
33
|
|
|
34
|
-
make CMAKE_PARAMS="$args -DWITH_PARMYS=OFF -DWITH_ABC=OFF -DSLANG_SYSTEMVERILOG=OFF" -j$(nproc)
|
|
34
|
+
make CMAKE_PARAMS="$args -DWITH_PARMYS=OFF -DWITH_ABC=OFF -DSLANG_SYSTEMVERILOG=OFF" -j${NPROC:-$(nproc)}
|
|
35
35
|
cd build
|
|
36
36
|
$SUDO_INSTALL make install
|
|
@@ -19,7 +19,7 @@ cd wildebeest
|
|
|
19
19
|
git checkout $(python3 ${src_path}/_tools.py --tool wildebeest --field git-commit)
|
|
20
20
|
|
|
21
21
|
cmake -S . -B build
|
|
22
|
-
cmake --build build
|
|
22
|
+
cmake --build build -j${NPROC:-$(nproc)}
|
|
23
23
|
|
|
24
24
|
USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
|
|
25
25
|
if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
|