siliconcompiler 0.33.0__py3-none-any.whl → 0.33.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/_common.py +5 -0
- siliconcompiler/_metadata.py +1 -1
- siliconcompiler/apps/sc_install.py +7 -0
- siliconcompiler/apps/sc_remote.py +7 -2
- siliconcompiler/core.py +34 -12
- siliconcompiler/metric.py +59 -0
- siliconcompiler/record.py +6 -2
- siliconcompiler/remote/client.py +10 -3
- siliconcompiler/remote/server.py +7 -2
- siliconcompiler/report/dashboard/cli/__init__.py +2 -0
- siliconcompiler/report/dashboard/cli/board.py +34 -30
- siliconcompiler/report/report.py +10 -5
- siliconcompiler/report/utils.py +12 -6
- siliconcompiler/scheduler/__init__.py +137 -974
- siliconcompiler/scheduler/send_messages.py +9 -3
- siliconcompiler/scheduler/slurm.py +10 -43
- siliconcompiler/scheduler/taskscheduler.py +320 -0
- siliconcompiler/schema/schema_cfg.py +2 -2
- siliconcompiler/tool.py +127 -19
- siliconcompiler/tools/_common/asic.py +5 -5
- siliconcompiler/tools/bluespec/convert.py +2 -1
- siliconcompiler/tools/builtin/_common.py +9 -2
- siliconcompiler/tools/builtin/concatenate.py +6 -2
- siliconcompiler/tools/builtin/minimum.py +7 -2
- siliconcompiler/tools/builtin/mux.py +7 -2
- siliconcompiler/tools/builtin/nop.py +7 -2
- siliconcompiler/tools/builtin/verify.py +7 -3
- siliconcompiler/tools/chisel/convert.py +10 -10
- siliconcompiler/tools/klayout/drc.py +2 -2
- siliconcompiler/tools/klayout/klayout_show.py +6 -6
- siliconcompiler/tools/klayout/klayout_utils.py +12 -12
- siliconcompiler/tools/netgen/count_lvs.py +2 -2
- siliconcompiler/tools/netgen/lvs.py +1 -1
- siliconcompiler/tools/openroad/_apr.py +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_init_floorplan.tcl +1 -7
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +18 -0
- siliconcompiler/tools/openroad/scripts/common/read_input_files.tcl +1 -7
- siliconcompiler/tools/opensta/scripts/sc_timing.tcl +10 -0
- siliconcompiler/tools/opensta/timing.py +11 -0
- siliconcompiler/tools/slang/__init__.py +3 -3
- siliconcompiler/tools/slang/elaborate.py +6 -6
- siliconcompiler/tools/slang/lint.py +1 -3
- siliconcompiler/tools/vpr/_xml_constraint.py +8 -8
- siliconcompiler/tools/yosys/prepareLib.py +2 -2
- siliconcompiler/tools/yosys/sc_synth_asic.tcl +43 -1
- siliconcompiler/tools/yosys/screenshot.py +1 -1
- siliconcompiler/tools/yosys/syn_asic.py +5 -5
- siliconcompiler/toolscripts/_tools.json +8 -6
- siliconcompiler/toolscripts/rhel8/install-chisel.sh +9 -2
- siliconcompiler/toolscripts/rhel8/install-icarus.sh +10 -3
- siliconcompiler/toolscripts/rhel8/install-klayout.sh +8 -1
- siliconcompiler/toolscripts/rhel8/install-magic.sh +9 -2
- siliconcompiler/toolscripts/rhel8/install-montage.sh +1 -1
- siliconcompiler/toolscripts/rhel8/install-netgen.sh +9 -2
- siliconcompiler/toolscripts/rhel8/install-slang.sh +11 -4
- siliconcompiler/toolscripts/rhel8/install-surelog.sh +9 -2
- siliconcompiler/toolscripts/rhel8/install-sv2v.sh +11 -4
- siliconcompiler/toolscripts/rhel8/install-verible.sh +11 -3
- siliconcompiler/toolscripts/rhel8/install-verilator.sh +10 -3
- siliconcompiler/toolscripts/rhel8/install-xyce.sh +15 -10
- siliconcompiler/toolscripts/rhel9/install-chisel.sh +9 -2
- siliconcompiler/toolscripts/rhel9/install-ghdl.sh +9 -2
- siliconcompiler/toolscripts/rhel9/install-gtkwave.sh +10 -3
- siliconcompiler/toolscripts/rhel9/install-icarus.sh +10 -3
- siliconcompiler/toolscripts/rhel9/install-klayout.sh +8 -1
- siliconcompiler/toolscripts/rhel9/install-magic.sh +9 -2
- siliconcompiler/toolscripts/rhel9/install-montage.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-netgen.sh +9 -2
- siliconcompiler/toolscripts/rhel9/install-openroad.sh +16 -3
- siliconcompiler/toolscripts/rhel9/install-opensta.sh +17 -5
- siliconcompiler/toolscripts/rhel9/install-slang.sh +11 -4
- siliconcompiler/toolscripts/rhel9/install-surelog.sh +9 -2
- siliconcompiler/toolscripts/rhel9/install-sv2v.sh +11 -4
- siliconcompiler/toolscripts/rhel9/install-verible.sh +11 -3
- siliconcompiler/toolscripts/rhel9/install-verilator.sh +10 -3
- siliconcompiler/toolscripts/rhel9/install-vpr.sh +9 -2
- siliconcompiler/toolscripts/rhel9/install-xdm.sh +10 -2
- siliconcompiler/toolscripts/rhel9/install-xyce.sh +15 -10
- siliconcompiler/toolscripts/rhel9/install-yosys-moosic.sh +9 -2
- siliconcompiler/toolscripts/rhel9/install-yosys-parmys.sh +10 -3
- siliconcompiler/toolscripts/rhel9/install-yosys-slang.sh +10 -2
- siliconcompiler/toolscripts/rhel9/install-yosys.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-bambu.sh +10 -2
- siliconcompiler/toolscripts/ubuntu20/install-bluespec.sh +10 -3
- siliconcompiler/toolscripts/ubuntu20/install-chisel.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-ghdl.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-gtkwave.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-icarus.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-icepack.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-klayout.sh +8 -1
- siliconcompiler/toolscripts/ubuntu20/install-magic.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-montage.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-netgen.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-nextpnr.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-openroad.sh +16 -3
- siliconcompiler/toolscripts/ubuntu20/install-opensta.sh +16 -5
- siliconcompiler/toolscripts/ubuntu20/install-slang.sh +11 -4
- siliconcompiler/toolscripts/ubuntu20/install-slurm.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-surelog.sh +10 -2
- siliconcompiler/toolscripts/ubuntu20/install-sv2v.sh +11 -4
- siliconcompiler/toolscripts/ubuntu20/install-verible.sh +11 -3
- siliconcompiler/toolscripts/ubuntu20/install-verilator.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-xdm.sh +10 -2
- siliconcompiler/toolscripts/ubuntu20/install-xyce.sh +13 -8
- siliconcompiler/toolscripts/ubuntu20/install-yosys-moosic.sh +9 -2
- siliconcompiler/toolscripts/ubuntu20/install-yosys.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-bambu.sh +10 -2
- siliconcompiler/toolscripts/ubuntu22/install-bluespec.sh +10 -3
- siliconcompiler/toolscripts/ubuntu22/install-chisel.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-ghdl.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-gtkwave.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-icarus.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-icepack.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-klayout.sh +8 -1
- siliconcompiler/toolscripts/ubuntu22/install-magic.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-montage.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-netgen.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-nextpnr.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-openroad.sh +16 -3
- siliconcompiler/toolscripts/ubuntu22/install-opensta.sh +17 -5
- siliconcompiler/toolscripts/ubuntu22/install-slang.sh +11 -4
- siliconcompiler/toolscripts/ubuntu22/install-slurm.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-surelog.sh +10 -2
- siliconcompiler/toolscripts/ubuntu22/install-sv2v.sh +11 -4
- siliconcompiler/toolscripts/ubuntu22/install-verible.sh +11 -3
- siliconcompiler/toolscripts/ubuntu22/install-verilator.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-vpr.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-xdm.sh +10 -2
- siliconcompiler/toolscripts/ubuntu22/install-xyce.sh +13 -8
- siliconcompiler/toolscripts/ubuntu22/install-yosys-moosic.sh +9 -2
- siliconcompiler/toolscripts/ubuntu22/install-yosys-parmys.sh +10 -3
- siliconcompiler/toolscripts/ubuntu22/install-yosys-slang.sh +10 -2
- siliconcompiler/toolscripts/ubuntu22/install-yosys.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-bambu.sh +12 -4
- siliconcompiler/toolscripts/ubuntu24/install-bluespec.sh +10 -3
- siliconcompiler/toolscripts/ubuntu24/install-chisel.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-ghdl.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-gtkwave.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-icarus.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-icepack.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-klayout.sh +8 -1
- siliconcompiler/toolscripts/ubuntu24/install-magic.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-montage.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-netgen.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-nextpnr.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-openroad.sh +16 -3
- siliconcompiler/toolscripts/ubuntu24/install-opensta.sh +17 -5
- siliconcompiler/toolscripts/ubuntu24/install-slang.sh +11 -4
- siliconcompiler/toolscripts/ubuntu24/install-slurm.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-surelog.sh +10 -2
- siliconcompiler/toolscripts/ubuntu24/install-sv2v.sh +11 -4
- siliconcompiler/toolscripts/ubuntu24/install-verible.sh +11 -3
- siliconcompiler/toolscripts/ubuntu24/install-verilator.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-vpr.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-xdm.sh +10 -2
- siliconcompiler/toolscripts/ubuntu24/install-xyce.sh +13 -8
- siliconcompiler/toolscripts/ubuntu24/install-yosys-moosic.sh +9 -2
- siliconcompiler/toolscripts/ubuntu24/install-yosys-parmys.sh +10 -3
- siliconcompiler/toolscripts/ubuntu24/install-yosys-slang.sh +10 -2
- siliconcompiler/toolscripts/ubuntu24/install-yosys.sh +9 -2
- siliconcompiler/utils/__init__.py +11 -0
- siliconcompiler/utils/flowgraph.py +6 -101
- siliconcompiler/utils/issue.py +15 -23
- siliconcompiler/utils/logging.py +2 -2
- {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.1.dist-info}/METADATA +2 -2
- {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.1.dist-info}/RECORD +170 -169
- {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.1.dist-info}/WHEEL +1 -1
- {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.1.dist-info}/entry_points.txt +0 -0
- {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.1.dist-info}/licenses/LICENSE +0 -0
- {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.1.dist-info}/top_level.txt +0 -0
|
@@ -50,11 +50,5 @@ if { [sc_has_input_files odb "input layout odb"] } {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
# Handle global connect setup
|
|
53
|
-
|
|
54
|
-
foreach global_connect [sc_cfg_tool_task_get {file} global_connect] {
|
|
55
|
-
puts "Loading global connect configuration: ${global_connect}"
|
|
56
|
-
source $global_connect
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
tee -file reports/global_connections.rpt {report_global_connect}
|
|
53
|
+
sc_global_connections
|
|
60
54
|
}
|
|
@@ -150,6 +150,16 @@ foreach corner $sc_scenarios {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
foreach corner $sc_scenarios {
|
|
154
|
+
set pex_corner [sc_cfg_get constraint timing $corner pexcorner]
|
|
155
|
+
|
|
156
|
+
set input_sdf_file "inputs/${sc_design}.${pex_corner}.sdf"
|
|
157
|
+
if { [file exists $input_sdf_file] } {
|
|
158
|
+
puts "Reading SDF ($corner): $input_sdf_file"
|
|
159
|
+
read_sdf -corner $corner $input_sdf_file
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
153
163
|
###############################
|
|
154
164
|
# Report Metrics
|
|
155
165
|
###############################
|
|
@@ -70,6 +70,17 @@ def setup(chip):
|
|
|
70
70
|
chip.add('tool', tool, 'task', task, 'require', f'constraint,timing,{scenario},file',
|
|
71
71
|
step=step, index=index)
|
|
72
72
|
|
|
73
|
+
# Add the SPEF or SDF files as inputs if provided.
|
|
74
|
+
spef_files = [f for f in input_provides(chip, step, index) if f.endswith(".spef")]
|
|
75
|
+
sdf_files = [f for f in input_provides(chip, step, index) if f.endswith(".sdf")]
|
|
76
|
+
if spef_files and sdf_files:
|
|
77
|
+
# If both SPEF and SDF files are provided, only use the SPEF files.
|
|
78
|
+
chip.add('tool', tool, 'task', task, 'input', spef_files, step=step, index=index)
|
|
79
|
+
elif spef_files:
|
|
80
|
+
chip.add('tool', tool, 'task', task, 'input', spef_files, step=step, index=index)
|
|
81
|
+
elif sdf_files:
|
|
82
|
+
chip.add('tool', tool, 'task', task, 'input', sdf_files, step=step, index=index)
|
|
83
|
+
|
|
73
84
|
add_common_file(chip, 'opensta_generic_sdc', 'sdc/sc_constraints.sdc')
|
|
74
85
|
|
|
75
86
|
|
|
@@ -133,11 +133,11 @@ def _get_driver(chip, options_func, ignored_diagnotics=None):
|
|
|
133
133
|
|
|
134
134
|
options = options_func(chip)
|
|
135
135
|
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
parse_options = pyslang.CommandLineOptions()
|
|
137
|
+
parse_options.ignoreProgramName = True
|
|
138
138
|
opts = " ".join(options)
|
|
139
139
|
code = 0
|
|
140
|
-
if not driver.parseCommandLine(opts,
|
|
140
|
+
if not driver.parseCommandLine(opts, parse_options):
|
|
141
141
|
code = 1
|
|
142
142
|
|
|
143
143
|
if code == 0 and not driver.processOptions():
|
|
@@ -50,16 +50,16 @@ def __get_files(manager, tree):
|
|
|
50
50
|
nodes = Queue(maxsize=0)
|
|
51
51
|
nodes.put(tree.root)
|
|
52
52
|
|
|
53
|
-
def
|
|
53
|
+
def proc_range(range):
|
|
54
54
|
files.add(manager.getFileName(range.start))
|
|
55
55
|
files.add(manager.getFileName(range.end))
|
|
56
56
|
|
|
57
57
|
while not nodes.empty():
|
|
58
58
|
node = nodes.get()
|
|
59
|
-
|
|
59
|
+
proc_range(node.sourceRange)
|
|
60
60
|
for token in node:
|
|
61
61
|
if isinstance(token, pyslang.Token):
|
|
62
|
-
|
|
62
|
+
proc_range(token.range)
|
|
63
63
|
else:
|
|
64
64
|
nodes.put(token)
|
|
65
65
|
|
|
@@ -103,7 +103,7 @@ def run(chip):
|
|
|
103
103
|
add_source = chip.get('tool', tool, 'task', task, 'var', 'include_source_paths',
|
|
104
104
|
step=step, index=index)[0] == 'true'
|
|
105
105
|
|
|
106
|
-
def
|
|
106
|
+
def print_files(out, files):
|
|
107
107
|
for src_file in files:
|
|
108
108
|
out.write(f'// File: {src_file}\n')
|
|
109
109
|
|
|
@@ -126,12 +126,12 @@ def run(chip):
|
|
|
126
126
|
|
|
127
127
|
out.write("////////////////////////////////////////////////////////////////\n")
|
|
128
128
|
out.write("// Start:\n")
|
|
129
|
-
|
|
129
|
+
print_files(out, files)
|
|
130
130
|
|
|
131
131
|
out.write(writer.print(tree).str() + '\n')
|
|
132
132
|
|
|
133
133
|
out.write("// End:\n")
|
|
134
|
-
|
|
134
|
+
print_files(out, files)
|
|
135
135
|
out.write("////////////////////////////////////////////////////////////////\n")
|
|
136
136
|
|
|
137
137
|
if ok:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
from xml.etree import ElementTree
|
|
2
2
|
import xml.dom.minidom
|
|
3
3
|
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ def generate_vpr_constraints_xml_file(pin_map, filename):
|
|
|
10
10
|
|
|
11
11
|
def generate_vpr_constraints_xml(pin_map):
|
|
12
12
|
|
|
13
|
-
constraints_xml =
|
|
13
|
+
constraints_xml = ElementTree.Element("vpr_constraints")
|
|
14
14
|
|
|
15
15
|
# Generate partition list section
|
|
16
16
|
partition_list = generate_partition_list_xml(pin_map)
|
|
@@ -22,7 +22,7 @@ def generate_vpr_constraints_xml(pin_map):
|
|
|
22
22
|
|
|
23
23
|
def generate_partition_list_xml(pin_map):
|
|
24
24
|
|
|
25
|
-
partition_list =
|
|
25
|
+
partition_list = ElementTree.Element("partition_list")
|
|
26
26
|
|
|
27
27
|
# ***ASSUMPTION: pin map is a dictionary of block names
|
|
28
28
|
# and tuples, where the tuples specify the
|
|
@@ -38,7 +38,7 @@ def generate_partition_list_xml(pin_map):
|
|
|
38
38
|
|
|
39
39
|
def generate_partition_xml(pin, pin_region):
|
|
40
40
|
|
|
41
|
-
partition =
|
|
41
|
+
partition = ElementTree.Element("partition")
|
|
42
42
|
|
|
43
43
|
partition_name = generate_partition_name(pin)
|
|
44
44
|
partition.set("name", partition_name)
|
|
@@ -80,7 +80,7 @@ def generate_partition_name(pin):
|
|
|
80
80
|
|
|
81
81
|
def generate_add_atom_xml(pin_name):
|
|
82
82
|
|
|
83
|
-
atom_xml =
|
|
83
|
+
atom_xml = ElementTree.Element("add_atom")
|
|
84
84
|
|
|
85
85
|
atom_xml.set("name_pattern", str(pin_name))
|
|
86
86
|
|
|
@@ -89,7 +89,7 @@ def generate_add_atom_xml(pin_name):
|
|
|
89
89
|
|
|
90
90
|
def generate_add_region_xml(x_low, x_high, y_low, y_high, subtile):
|
|
91
91
|
|
|
92
|
-
region_xml =
|
|
92
|
+
region_xml = ElementTree.Element("add_region")
|
|
93
93
|
|
|
94
94
|
region_xml.set("x_low", str(x_low))
|
|
95
95
|
region_xml.set("y_low", str(y_low))
|
|
@@ -100,9 +100,9 @@ def generate_add_region_xml(x_low, x_high, y_low, y_high, subtile):
|
|
|
100
100
|
return region_xml
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
def write_vpr_constraints_xml_file(constraints:
|
|
103
|
+
def write_vpr_constraints_xml_file(constraints: ElementTree.Element, filename: str):
|
|
104
104
|
|
|
105
|
-
dom = xml.dom.minidom.parseString(
|
|
105
|
+
dom = xml.dom.minidom.parseString(ElementTree.tostring(constraints))
|
|
106
106
|
xml_string = dom.toprettyxml()
|
|
107
107
|
|
|
108
108
|
with open(filename, 'w') as xfile:
|
|
@@ -6,7 +6,7 @@ import gzip
|
|
|
6
6
|
import argparse # argument parsing
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
def
|
|
9
|
+
def process_liberty_file(input_file, logger=None):
|
|
10
10
|
# Read input file
|
|
11
11
|
if logger:
|
|
12
12
|
logger.info(f"Opening file for replace: {input_file}")
|
|
@@ -56,4 +56,4 @@ if __name__ == "__main__":
|
|
|
56
56
|
help='Output File')
|
|
57
57
|
args = parser.parse_args()
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
process_liberty_file(args.inputFile, args.outputFile, args.patterns)
|
|
@@ -75,7 +75,9 @@ if { [sc_cfg_tool_task_exists file memory_techmap] } {
|
|
|
75
75
|
########################################################
|
|
76
76
|
|
|
77
77
|
foreach lib_file "$sc_libraries $sc_macro_libraries" {
|
|
78
|
-
yosys read_liberty -setattr liberty_cell -lib $lib_file
|
|
78
|
+
yosys read_liberty -overwrite -setattr liberty_cell -lib $lib_file
|
|
79
|
+
yosys read_liberty -overwrite -setattr liberty_cell \
|
|
80
|
+
-unit_delay -wb -ignore_miss_func -ignore_buses $lib_file
|
|
79
81
|
}
|
|
80
82
|
foreach bb_file $sc_blackboxes {
|
|
81
83
|
yosys log "Reading blackbox model file: $bb_file"
|
|
@@ -187,6 +189,45 @@ proc get_modules { { find "*" } } {
|
|
|
187
189
|
return [lsort $modules]
|
|
188
190
|
}
|
|
189
191
|
|
|
192
|
+
proc sc_annotate_gate_cost_equivalent { } {
|
|
193
|
+
yosys cellmatch -derive_luts =A:liberty_cell
|
|
194
|
+
# find a reference nand2 gate
|
|
195
|
+
set found_cell ""
|
|
196
|
+
set found_cell_area ""
|
|
197
|
+
# iterate over all cells with a nand2 signature
|
|
198
|
+
yosys echo off
|
|
199
|
+
set nand2_cells [yosys tee -q -s result.string select -list-mod =*/a:lut=4'b0111 %m]
|
|
200
|
+
yosys echo on
|
|
201
|
+
foreach cell $nand2_cells {
|
|
202
|
+
if { ![rtlil::has_attr -mod $cell area] } {
|
|
203
|
+
puts "WARNING: Cell $cell missing area information"
|
|
204
|
+
continue
|
|
205
|
+
}
|
|
206
|
+
set area [rtlil::get_attr -string -mod $cell area]
|
|
207
|
+
if { $found_cell == "" || $area < $found_cell_area } {
|
|
208
|
+
set found_cell $cell
|
|
209
|
+
set found_cell_area $area
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
if { $found_cell == "" } {
|
|
213
|
+
set found_cell_area 1
|
|
214
|
+
puts "WARNING: reference nand2 cell not found, using $found_cell_area as area"
|
|
215
|
+
} else {
|
|
216
|
+
puts "Using nand2 reference cell ($found_cell) with area: $found_cell_area"
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
# convert the area on all Liberty cells to a gate number equivalent
|
|
220
|
+
yosys echo off
|
|
221
|
+
set cells [yosys tee -q -s result.string select -list-mod =A:area =A:liberty_cell %i]
|
|
222
|
+
yosys echo on
|
|
223
|
+
foreach cell $cells {
|
|
224
|
+
set area [rtlil::get_attr -mod -string $cell area]
|
|
225
|
+
set gate_eq [expr { int(max(1, ceil($area / $found_cell_area))) }]
|
|
226
|
+
puts "Setting gate_cost_equivalent for $cell as $gate_eq"
|
|
227
|
+
rtlil::set_attr -mod -uint $cell gate_cost_equivalent $gate_eq
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
190
231
|
#########################
|
|
191
232
|
# Schema helper functions
|
|
192
233
|
#########################
|
|
@@ -296,6 +337,7 @@ if { !$flatten_design && [lindex [sc_cfg_tool_task_get var auto_flatten] 0] == "
|
|
|
296
337
|
set sc_hier_threshold \
|
|
297
338
|
[lindex [sc_cfg_tool_task_get var hier_threshold] 0]
|
|
298
339
|
|
|
340
|
+
sc_annotate_gate_cost_equivalent
|
|
299
341
|
yosys keep_hierarchy -min_cost $sc_hier_threshold
|
|
300
342
|
|
|
301
343
|
yosys synth -flatten {*}$synth_args -top $sc_design -run coarse:fine
|
|
@@ -75,7 +75,7 @@ def prepare_asic_libraries(chip):
|
|
|
75
75
|
lib_file_name = f'{lib_file_name_base}_{unique_ident}'
|
|
76
76
|
unique_ident += 1
|
|
77
77
|
|
|
78
|
-
lib_content[lib_file_name] = prepareLib.
|
|
78
|
+
lib_content[lib_file_name] = prepareLib.process_liberty_file(
|
|
79
79
|
lib_file,
|
|
80
80
|
logger=None if chip.get('option', 'quiet',
|
|
81
81
|
step=step, index=index) else chip.logger)
|
|
@@ -2,7 +2,7 @@ from siliconcompiler.tools.yosys import synth_post_process, setup as tool_setup
|
|
|
2
2
|
import os
|
|
3
3
|
import json
|
|
4
4
|
import re
|
|
5
|
-
from siliconcompiler.tools.yosys.prepareLib import
|
|
5
|
+
from siliconcompiler.tools.yosys.prepareLib import process_liberty_file
|
|
6
6
|
from siliconcompiler import sc_open
|
|
7
7
|
from siliconcompiler import utils
|
|
8
8
|
from siliconcompiler.tools._common.asic import set_tool_task_var, get_libraries, get_mainlib, \
|
|
@@ -322,7 +322,7 @@ def prepare_synthesis_libraries(chip):
|
|
|
322
322
|
lib_file_name = f'{lib_file_name_base}_{unique_ident}'
|
|
323
323
|
unique_ident += 1
|
|
324
324
|
|
|
325
|
-
lib_content[lib_file_name] =
|
|
325
|
+
lib_content[lib_file_name] = process_liberty_file(
|
|
326
326
|
lib_file,
|
|
327
327
|
logger=logger
|
|
328
328
|
)
|
|
@@ -583,7 +583,7 @@ def _generate_cell_area_report(chip):
|
|
|
583
583
|
cell_type = level_info["cells"][cell]["type"]
|
|
584
584
|
if cell_type in modules:
|
|
585
585
|
area, count = get_area_count(cell_type)
|
|
586
|
-
cellarea_report.
|
|
586
|
+
cellarea_report.add_cell(
|
|
587
587
|
name=f"{prefix}{cell}",
|
|
588
588
|
module=cell_type,
|
|
589
589
|
cellcount=count,
|
|
@@ -594,7 +594,7 @@ def _generate_cell_area_report(chip):
|
|
|
594
594
|
area = 0.0
|
|
595
595
|
if "area" in stat["design"]:
|
|
596
596
|
area = stat["design"]["area"]
|
|
597
|
-
cellarea_report.
|
|
597
|
+
cellarea_report.add_cell(
|
|
598
598
|
name=design,
|
|
599
599
|
module=design,
|
|
600
600
|
cellarea=area,
|
|
@@ -604,4 +604,4 @@ def _generate_cell_area_report(chip):
|
|
|
604
604
|
handle_heir(netlist["modules"][design], "")
|
|
605
605
|
|
|
606
606
|
if cellarea_report.size() > 0:
|
|
607
|
-
cellarea_report.
|
|
607
|
+
cellarea_report.write_report("reports/hierarchical_cell_area.json")
|
|
@@ -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": "b0107893ea0693f3cf09bbf95450a38c1b26b950",
|
|
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": "71bdfb99049f33a010bb23527c5c921c925378a0",
|
|
21
21
|
"auto-update": true
|
|
22
22
|
},
|
|
23
23
|
"netgen": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"sv2v": {
|
|
52
52
|
"git-url": "https://github.com/zachjs/sv2v.git",
|
|
53
|
-
"git-commit": "
|
|
53
|
+
"git-commit": "380c2b978a54e459ac216c9e6b7f1a4e31573a0e",
|
|
54
54
|
"auto-update": true
|
|
55
55
|
},
|
|
56
56
|
"verilator": {
|
|
@@ -101,8 +101,10 @@
|
|
|
101
101
|
"auto-update": true
|
|
102
102
|
},
|
|
103
103
|
"xyce": {
|
|
104
|
-
"
|
|
105
|
-
"
|
|
104
|
+
"git-url": "https://github.com/Xyce/Xyce.git",
|
|
105
|
+
"git-commit": "Release-7.9.0",
|
|
106
|
+
"version-prefix": "Release-",
|
|
107
|
+
"auto-update": true
|
|
106
108
|
},
|
|
107
109
|
"xdm": {
|
|
108
110
|
"git-url": "https://github.com/Xyce/XDM.git",
|
|
@@ -144,7 +146,7 @@
|
|
|
144
146
|
},
|
|
145
147
|
"yosys-slang": {
|
|
146
148
|
"git-url": "https://github.com/povik/yosys-slang.git",
|
|
147
|
-
"git-commit": "
|
|
149
|
+
"git-commit": "34753c07b7bd285b784b3a2c756cfac56e1a26ab",
|
|
148
150
|
"docker-depends": "yosys",
|
|
149
151
|
"auto-update": true
|
|
150
152
|
},
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
|
-
set -
|
|
3
|
+
set -ex
|
|
4
4
|
|
|
5
5
|
# Get directory of script
|
|
6
6
|
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
7
|
|
|
8
|
+
USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
|
|
9
|
+
if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
|
|
10
|
+
SUDO_INSTALL=sudo
|
|
11
|
+
else
|
|
12
|
+
SUDO_INSTALL=""
|
|
13
|
+
fi
|
|
14
|
+
|
|
8
15
|
sudo yum install -y wget
|
|
9
16
|
|
|
10
17
|
mkdir -p deps
|
|
@@ -19,7 +26,7 @@ if [ ! -z ${PREFIX} ]; then
|
|
|
19
26
|
args="-C $PREFIX --strip-components 1"
|
|
20
27
|
fi
|
|
21
28
|
|
|
22
|
-
tar xvf sbt.tgz $args
|
|
29
|
+
$SUDO_INSTALL tar xvf sbt.tgz $args
|
|
23
30
|
|
|
24
31
|
cd -
|
|
25
32
|
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
|
-
set -
|
|
3
|
+
set -ex
|
|
4
4
|
|
|
5
5
|
# Get directory of script
|
|
6
6
|
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
7
|
|
|
8
|
+
USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
|
|
9
|
+
if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
|
|
10
|
+
SUDO_INSTALL=sudo
|
|
11
|
+
else
|
|
12
|
+
SUDO_INSTALL=""
|
|
13
|
+
fi
|
|
14
|
+
|
|
8
15
|
sudo yum group install -y "Development Tools"
|
|
9
16
|
sudo yum install -y wget git
|
|
10
17
|
|
|
@@ -21,7 +28,7 @@ tar xvf gperf-3.1.tar.gz
|
|
|
21
28
|
cd gperf-3.1
|
|
22
29
|
./configure $args
|
|
23
30
|
make -j$(nproc)
|
|
24
|
-
|
|
31
|
+
$SUDO_INSTALL make install
|
|
25
32
|
cd ..
|
|
26
33
|
|
|
27
34
|
if [ ! -z ${PREFIX} ]; then
|
|
@@ -36,6 +43,6 @@ git checkout $(python3 ${src_path}/_tools.py --tool icarus --field git-commit)
|
|
|
36
43
|
sh autoconf.sh
|
|
37
44
|
./configure $args
|
|
38
45
|
make -j$(nproc)
|
|
39
|
-
|
|
46
|
+
$SUDO_INSTALL make install
|
|
40
47
|
|
|
41
48
|
cd -
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
|
-
set -
|
|
3
|
+
set -ex
|
|
4
4
|
|
|
5
5
|
# Get directory of script
|
|
6
6
|
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
7
|
|
|
8
|
+
USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
|
|
9
|
+
if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
|
|
10
|
+
SUDO_INSTALL=sudo
|
|
11
|
+
else
|
|
12
|
+
SUDO_INSTALL=""
|
|
13
|
+
fi
|
|
14
|
+
|
|
8
15
|
sudo yum install -y wget
|
|
9
16
|
|
|
10
17
|
mkdir -p deps
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
|
-
set -
|
|
3
|
+
set -ex
|
|
4
4
|
|
|
5
5
|
# Get directory of script
|
|
6
6
|
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
7
|
|
|
8
|
+
USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
|
|
9
|
+
if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
|
|
10
|
+
SUDO_INSTALL=sudo
|
|
11
|
+
else
|
|
12
|
+
SUDO_INSTALL=""
|
|
13
|
+
fi
|
|
14
|
+
|
|
8
15
|
sudo yum group install -y "Development Tools"
|
|
9
16
|
sudo yum install -y tcl-devel tk-devel tcsh csh git
|
|
10
17
|
|
|
@@ -22,4 +29,4 @@ fi
|
|
|
22
29
|
|
|
23
30
|
LD_FLAGS=-shared ./configure $args
|
|
24
31
|
make -j$(nproc)
|
|
25
|
-
|
|
32
|
+
$SUDO_INSTALL make install
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
|
-
set -
|
|
3
|
+
set -ex
|
|
4
4
|
|
|
5
5
|
# Get directory of script
|
|
6
6
|
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
7
|
|
|
8
|
+
USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
|
|
9
|
+
if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
|
|
10
|
+
SUDO_INSTALL=sudo
|
|
11
|
+
else
|
|
12
|
+
SUDO_INSTALL=""
|
|
13
|
+
fi
|
|
14
|
+
|
|
8
15
|
sudo yum group install -y "Development Tools"
|
|
9
16
|
sudo yum install -y tcl-devel tk-devel git
|
|
10
17
|
|
|
@@ -22,4 +29,4 @@ fi
|
|
|
22
29
|
|
|
23
30
|
./configure $args
|
|
24
31
|
make -j$(nproc)
|
|
25
|
-
|
|
32
|
+
$SUDO_INSTALL make install
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
|
-
set -
|
|
3
|
+
set -ex
|
|
4
4
|
|
|
5
5
|
# Get directory of script
|
|
6
6
|
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
@@ -15,6 +15,13 @@ python3 -m venv .slang --clear
|
|
|
15
15
|
python3 -m pip install --upgrade pip
|
|
16
16
|
python3 -m pip install cmake
|
|
17
17
|
|
|
18
|
+
USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
|
|
19
|
+
if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
|
|
20
|
+
SUDO_INSTALL="sudo -E PATH=$PATH"
|
|
21
|
+
else
|
|
22
|
+
SUDO_INSTALL=""
|
|
23
|
+
fi
|
|
24
|
+
|
|
18
25
|
sudo yum install -y gcc-toolset-12
|
|
19
26
|
|
|
20
27
|
git clone $(python3 ${src_path}/_tools.py --tool slang --field git-url) slang
|
|
@@ -23,11 +30,11 @@ git checkout $(python3 ${src_path}/_tools.py --tool slang --field git-commit)
|
|
|
23
30
|
|
|
24
31
|
cfg_args=""
|
|
25
32
|
if [ ! -z ${PREFIX} ]; then
|
|
26
|
-
cfg_args="
|
|
33
|
+
cfg_args="-D CMAKE_INSTALL_PREFIX=$PREFIX"
|
|
27
34
|
fi
|
|
28
35
|
|
|
29
|
-
scl run gcc-toolset-12 "cmake -B build"
|
|
36
|
+
scl run gcc-toolset-12 "cmake -B build $cfg_args"
|
|
30
37
|
scl run gcc-toolset-12 "cmake --build build -j$(nproc)"
|
|
31
|
-
scl run gcc-toolset-12 "
|
|
38
|
+
scl run gcc-toolset-12 "$SUDO_INSTALL make -C build install"
|
|
32
39
|
|
|
33
40
|
cd -
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
|
-
set -
|
|
3
|
+
set -ex
|
|
4
4
|
|
|
5
5
|
# Get directory of script
|
|
6
6
|
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
@@ -29,6 +29,13 @@ git submodule update --init --recursive
|
|
|
29
29
|
|
|
30
30
|
scl run gcc-toolset-12 "LDFLAGS=\"-lrt\" make -j$(nproc)"
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
|
|
33
|
+
if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
|
|
34
|
+
SUDO_INSTALL="sudo -E PATH=$PATH"
|
|
35
|
+
else
|
|
36
|
+
SUDO_INSTALL=""
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
$SUDO_INSTALL make install
|
|
33
40
|
|
|
34
41
|
cd -
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
|
-
set -
|
|
3
|
+
set -ex
|
|
4
4
|
|
|
5
5
|
# Get directory of script
|
|
6
6
|
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
@@ -18,7 +18,14 @@ if [ ! -z ${PREFIX} ]; then
|
|
|
18
18
|
export PATH="$PREFIX:$PATH"
|
|
19
19
|
fi
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
|
|
22
|
+
if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
|
|
23
|
+
SUDO_INSTALL="sudo -E PATH=$PATH"
|
|
24
|
+
else
|
|
25
|
+
SUDO_INSTALL=""
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
curl -sSL https://get.haskellstack.org/ | $SUDO_INSTALL sh -s - -f $haskell_args
|
|
22
29
|
|
|
23
30
|
git clone $(python3 ${src_path}/_tools.py --tool sv2v --field git-url) sv2v
|
|
24
31
|
cd sv2v
|
|
@@ -27,8 +34,8 @@ git checkout $(python3 ${src_path}/_tools.py --tool sv2v --field git-commit)
|
|
|
27
34
|
make -j$(nproc)
|
|
28
35
|
|
|
29
36
|
if [ ! -z ${PREFIX} ]; then
|
|
30
|
-
|
|
31
|
-
|
|
37
|
+
$SUDO_INSTALL mkdir -p ${PREFIX}/bin/
|
|
38
|
+
$SUDO_INSTALL cp bin/* ${PREFIX}/bin/
|
|
32
39
|
fi
|
|
33
40
|
|
|
34
41
|
cd -
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
|
-
set -
|
|
3
|
+
set -ex
|
|
4
4
|
|
|
5
5
|
# Get directory of script
|
|
6
6
|
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
7
|
|
|
8
|
+
USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
|
|
9
|
+
if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
|
|
10
|
+
SUDO_INSTALL=sudo
|
|
11
|
+
else
|
|
12
|
+
SUDO_INSTALL=""
|
|
13
|
+
fi
|
|
14
|
+
|
|
8
15
|
sudo yum install -y wget
|
|
9
16
|
|
|
10
17
|
mkdir -p deps
|
|
@@ -19,8 +26,9 @@ tar xzf $filename
|
|
|
19
26
|
|
|
20
27
|
if [ -z ${PREFIX} ]; then
|
|
21
28
|
PREFIX=/opt/verible
|
|
22
|
-
sudo
|
|
29
|
+
SUDO_INSTALL=sudo
|
|
30
|
+
$SUDO_INSTALL mkdir -p $PREFIX
|
|
23
31
|
echo "Please add \"export PATH="/opt/verible/bin:\$PATH"\" to your .bashrc"
|
|
24
32
|
fi
|
|
25
33
|
|
|
26
|
-
|
|
34
|
+
$SUDO_INSTALL mv verible-$version/* $PREFIX
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
|
-
set -
|
|
3
|
+
set -ex
|
|
4
4
|
|
|
5
5
|
# Get directory of script
|
|
6
6
|
src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
|
|
7
7
|
|
|
8
|
+
USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
|
|
9
|
+
if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
|
|
10
|
+
SUDO_INSTALL=sudo
|
|
11
|
+
else
|
|
12
|
+
SUDO_INSTALL=""
|
|
13
|
+
fi
|
|
14
|
+
|
|
8
15
|
sudo yum group install -y "Development Tools"
|
|
9
16
|
sudo yum install -y git wget
|
|
10
17
|
|
|
@@ -22,7 +29,7 @@ cd help2man-1.43.3
|
|
|
22
29
|
|
|
23
30
|
./configure $args
|
|
24
31
|
make -j$(nproc)
|
|
25
|
-
|
|
32
|
+
$SUDO_INSTALL make install
|
|
26
33
|
|
|
27
34
|
cd ..
|
|
28
35
|
|
|
@@ -36,6 +43,6 @@ autoconf
|
|
|
36
43
|
|
|
37
44
|
./configure $args
|
|
38
45
|
make -j$(nproc)
|
|
39
|
-
|
|
46
|
+
$SUDO_INSTALL make install
|
|
40
47
|
|
|
41
48
|
cd -
|