siliconcompiler 0.32.1__py3-none-any.whl → 0.32.3__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 +3 -2
- siliconcompiler/apps/sc_install.py +13 -5
- siliconcompiler/apps/sc_remote.py +2 -1
- siliconcompiler/core.py +68 -55
- siliconcompiler/issue.py +3 -1
- siliconcompiler/remote/client.py +55 -16
- siliconcompiler/report/__init__.py +3 -2
- siliconcompiler/report/dashboard/__init__.py +61 -170
- siliconcompiler/report/dashboard/cli/__init__.py +788 -0
- siliconcompiler/report/dashboard/web/__init__.py +196 -0
- siliconcompiler/report/dashboard/{components → web/components}/__init__.py +4 -4
- siliconcompiler/report/dashboard/{components → web/components}/graph.py +1 -1
- siliconcompiler/report/dashboard/{layouts → web/layouts}/__init__.py +3 -3
- siliconcompiler/report/dashboard/{layouts → web/layouts}/_common.py +1 -1
- siliconcompiler/report/dashboard/{layouts → web/layouts}/vertical_flowgraph.py +5 -5
- siliconcompiler/report/dashboard/{layouts → web/layouts}/vertical_flowgraph_node_tab.py +6 -6
- siliconcompiler/report/dashboard/{layouts → web/layouts}/vertical_flowgraph_sac_tabs.py +6 -6
- siliconcompiler/report/dashboard/{viewer.py → web/viewer.py} +4 -4
- siliconcompiler/scheduler/__init__.py +44 -13
- siliconcompiler/scheduler/docker_runner.py +2 -1
- siliconcompiler/sphinx_ext/dynamicgen.py +11 -11
- siliconcompiler/templates/replay/replay.sh.j2 +2 -2
- siliconcompiler/templates/tcl/manifest.tcl.j2 +4 -120
- siliconcompiler/tools/_common/__init__.py +2 -0
- siliconcompiler/tools/_common/tcl/sc_schema_access.tcl +126 -0
- siliconcompiler/tools/openroad/_apr.py +7 -0
- siliconcompiler/tools/openroad/fillmetal_insertion.py +14 -14
- siliconcompiler/tools/openroad/scripts/apr/sc_antenna_repair.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_detailed_placement.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_detailed_route.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_endcap_tapcell_insertion.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_fillercell_insertion.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_fillmetal_insertion.tcl +2 -2
- siliconcompiler/tools/openroad/scripts/apr/sc_global_placement.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_global_route.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_init_floorplan.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_macro_placement.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_metrics.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_pin_placement.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_power_grid.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_design.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +54 -8
- siliconcompiler/tools/openroad/scripts/apr/sc_write_data.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +19 -1
- siliconcompiler/tools/openroad/scripts/common/reports.tcl +18 -7
- siliconcompiler/tools/openroad/scripts/sc_rcx.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/sc_rdlroute.tcl +1 -1
- siliconcompiler/tools/openroad/scripts/sc_show.tcl +1 -1
- siliconcompiler/tools/opensta/__init__.py +1 -1
- siliconcompiler/tools/opensta/scripts/sc_check_library.tcl +1 -1
- siliconcompiler/tools/opensta/scripts/sc_procs.tcl +16 -0
- siliconcompiler/tools/opensta/scripts/sc_report_libraries.tcl +1 -1
- siliconcompiler/tools/opensta/scripts/sc_timing.tcl +35 -7
- siliconcompiler/tools/opensta/timing.py +6 -2
- siliconcompiler/tools/slang/__init__.py +7 -8
- siliconcompiler/tools/sv2v/sv2v.py +4 -1
- siliconcompiler/tools/yosys/__init__.py +4 -36
- siliconcompiler/tools/yosys/lec.py +3 -4
- siliconcompiler/tools/yosys/{syn_asic.tcl → sc_synth_asic.tcl} +87 -0
- siliconcompiler/tools/yosys/{syn_fpga.tcl → sc_synth_fpga.tcl} +78 -0
- siliconcompiler/tools/yosys/syn_asic.py +36 -11
- siliconcompiler/tools/yosys/syn_fpga.py +23 -16
- siliconcompiler/toolscripts/_tools.json +23 -9
- siliconcompiler/toolscripts/rhel8/install-chisel.sh +2 -0
- siliconcompiler/toolscripts/rhel8/install-icarus.sh +1 -0
- siliconcompiler/toolscripts/rhel8/install-klayout.sh +2 -0
- siliconcompiler/toolscripts/rhel8/install-magic.sh +1 -2
- siliconcompiler/toolscripts/rhel8/install-netgen.sh +1 -1
- siliconcompiler/toolscripts/rhel8/install-slang.sh +2 -0
- siliconcompiler/toolscripts/rhel8/install-surelog.sh +3 -1
- siliconcompiler/toolscripts/rhel8/install-sv2v.sh +1 -0
- siliconcompiler/toolscripts/rhel8/install-verible.sh +2 -0
- siliconcompiler/toolscripts/rhel8/install-verilator.sh +1 -0
- siliconcompiler/toolscripts/rhel8/install-xyce.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-chisel.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-ghdl.sh +1 -0
- siliconcompiler/toolscripts/rhel9/install-gtkwave.sh +2 -1
- siliconcompiler/toolscripts/rhel9/install-icarus.sh +1 -0
- siliconcompiler/toolscripts/rhel9/install-klayout.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-magic.sh +1 -2
- siliconcompiler/toolscripts/rhel9/install-netgen.sh +1 -1
- siliconcompiler/toolscripts/rhel9/install-openroad.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-opensta.sh +76 -0
- siliconcompiler/toolscripts/rhel9/install-slang.sh +3 -1
- siliconcompiler/toolscripts/rhel9/install-surelog.sh +2 -1
- siliconcompiler/toolscripts/rhel9/install-sv2v.sh +1 -0
- siliconcompiler/toolscripts/rhel9/install-verible.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-verilator.sh +1 -0
- siliconcompiler/toolscripts/rhel9/install-vpr.sh +31 -0
- siliconcompiler/toolscripts/rhel9/install-xdm.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-xyce.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-yosys-moosic.sh +2 -0
- siliconcompiler/toolscripts/rhel9/install-yosys-parmys.sh +61 -0
- siliconcompiler/toolscripts/rhel9/install-yosys-slang.sh +3 -1
- siliconcompiler/toolscripts/rhel9/install-yosys.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-bambu.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-bluespec.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-chisel.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-ghdl.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-gtkwave.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-icarus.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-icepack.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-klayout.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-magic.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-netgen.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-nextpnr.sh +1 -3
- siliconcompiler/toolscripts/ubuntu20/install-openroad.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-opensta.sh +72 -0
- siliconcompiler/toolscripts/ubuntu20/install-slang.sh +3 -1
- siliconcompiler/toolscripts/ubuntu20/install-slurm.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-surelog.sh +3 -1
- siliconcompiler/toolscripts/ubuntu20/install-sv2v.sh +1 -1
- siliconcompiler/toolscripts/ubuntu20/install-verible.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-verilator.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-vpr.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-xdm.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-xyce.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-yosys-moosic.sh +2 -0
- siliconcompiler/toolscripts/ubuntu20/install-yosys-parmys.sh +61 -0
- siliconcompiler/toolscripts/ubuntu20/install-yosys.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-bambu.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-bluespec.sh +27 -2
- siliconcompiler/toolscripts/ubuntu22/install-chisel.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-ghdl.sh +4 -2
- siliconcompiler/toolscripts/ubuntu22/install-gtkwave.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-icarus.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-icepack.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-klayout.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-magic.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-netgen.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-nextpnr.sh +1 -2
- siliconcompiler/toolscripts/ubuntu22/install-openroad.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-opensta.sh +72 -0
- siliconcompiler/toolscripts/ubuntu22/install-slang.sh +3 -1
- siliconcompiler/toolscripts/ubuntu22/install-slurm.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-surelog.sh +3 -1
- siliconcompiler/toolscripts/ubuntu22/install-sv2v.sh +1 -1
- siliconcompiler/toolscripts/ubuntu22/install-verible.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-verilator.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-vpr.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-xdm.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-xyce.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-yosys-moosic.sh +2 -0
- siliconcompiler/toolscripts/ubuntu22/install-yosys-parmys.sh +61 -0
- siliconcompiler/toolscripts/ubuntu22/install-yosys-slang.sh +3 -1
- siliconcompiler/toolscripts/ubuntu22/install-yosys.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-bambu.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-bluespec.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-chisel.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-ghdl.sh +4 -2
- siliconcompiler/toolscripts/ubuntu24/install-gtkwave.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-icarus.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-icepack.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-klayout.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-magic.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-netgen.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-nextpnr.sh +1 -3
- siliconcompiler/toolscripts/ubuntu24/install-openroad.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-opensta.sh +72 -0
- siliconcompiler/toolscripts/ubuntu24/install-slang.sh +3 -1
- siliconcompiler/toolscripts/ubuntu24/install-slurm.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-surelog.sh +3 -1
- siliconcompiler/toolscripts/ubuntu24/install-sv2v.sh +1 -1
- siliconcompiler/toolscripts/ubuntu24/install-verible.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-verilator.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-vpr.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-xdm.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-xyce.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-yosys-moosic.sh +2 -0
- siliconcompiler/toolscripts/ubuntu24/install-yosys-parmys.sh +61 -0
- siliconcompiler/toolscripts/ubuntu24/install-yosys-slang.sh +3 -1
- siliconcompiler/toolscripts/ubuntu24/install-yosys.sh +2 -0
- siliconcompiler/utils/__init__.py +4 -1
- siliconcompiler/utils/logging.py +88 -34
- {siliconcompiler-0.32.1.dist-info → siliconcompiler-0.32.3.dist-info}/METADATA +14 -10
- {siliconcompiler-0.32.1.dist-info → siliconcompiler-0.32.3.dist-info}/RECORD +185 -175
- {siliconcompiler-0.32.1.dist-info → siliconcompiler-0.32.3.dist-info}/WHEEL +1 -1
- siliconcompiler/tools/yosys/sc_syn.tcl +0 -87
- siliconcompiler/toolscripts/ubuntu20/install-yosys-slang.sh +0 -22
- /siliconcompiler/report/dashboard/{components → web/components}/flowgraph.py +0 -0
- /siliconcompiler/report/dashboard/{state.py → web/state.py} +0 -0
- /siliconcompiler/report/dashboard/{utils → web/utils}/__init__.py +0 -0
- /siliconcompiler/report/dashboard/{utils → web/utils}/file_utils.py +0 -0
- {siliconcompiler-0.32.1.dist-info → siliconcompiler-0.32.3.dist-info}/entry_points.txt +0 -0
- {siliconcompiler-0.32.1.dist-info → siliconcompiler-0.32.3.dist-info/licenses}/LICENSE +0 -0
- {siliconcompiler-0.32.1.dist-info → siliconcompiler-0.32.3.dist-info}/top_level.txt +0 -0
|
@@ -28,7 +28,7 @@ if { [sc_cfg_tool_task_check_in_list setup var reports] } {
|
|
|
28
28
|
"report_tns"
|
|
29
29
|
report_tns_metric -setup
|
|
30
30
|
|
|
31
|
-
if { [sc_check_version 19519] } {
|
|
31
|
+
if { [sc_check_version 19519] && [llength [all_clocks]] > 0 } {
|
|
32
32
|
tee -quiet -file reports/timing/setup.histogram.rpt \
|
|
33
33
|
"report_timing_histogram -num_bins 20 -setup"
|
|
34
34
|
}
|
|
@@ -48,7 +48,7 @@ if { [sc_cfg_tool_task_check_in_list hold var reports] } {
|
|
|
48
48
|
|
|
49
49
|
report_tns_metric -hold
|
|
50
50
|
|
|
51
|
-
if { [sc_check_version 19519] } {
|
|
51
|
+
if { [sc_check_version 19519] && [llength [all_clocks]] > 0 } {
|
|
52
52
|
tee -quiet -file reports/timing/hold.histogram.rpt \
|
|
53
53
|
"report_timing_histogram -num_bins 20 -hold"
|
|
54
54
|
}
|
|
@@ -112,13 +112,24 @@ if { [sc_cfg_tool_task_check_in_list fmax var reports] } {
|
|
|
112
112
|
}
|
|
113
113
|
if { $fmax_metric == 0 } {
|
|
114
114
|
# attempt to compute based on combinatorial path
|
|
115
|
+
set fmax_valid true
|
|
115
116
|
set max_path [find_timing_paths -unconstrained -path_delay max]
|
|
116
|
-
|
|
117
|
+
if { $max_path == "" } {
|
|
118
|
+
set fmax_valid false
|
|
119
|
+
} else {
|
|
120
|
+
set max_path_delay [$max_path data_arrival_time]
|
|
121
|
+
}
|
|
117
122
|
set min_path [find_timing_paths -unconstrained -path_delay min]
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
set
|
|
123
|
+
if { $min_path == "" } {
|
|
124
|
+
set fmax_valid false
|
|
125
|
+
} else {
|
|
126
|
+
set min_path_delay [$min_path data_arrival_time]
|
|
127
|
+
}
|
|
128
|
+
if { $fmax_valid } {
|
|
129
|
+
set path_delay [expr { $max_path_delay - min(0, $min_path_delay) }]
|
|
130
|
+
if { $path_delay > 0 } {
|
|
131
|
+
set fmax_metric [expr { 1.0 / $path_delay }]
|
|
132
|
+
}
|
|
122
133
|
}
|
|
123
134
|
}
|
|
124
135
|
if { $fmax_metric > 0 } {
|
|
@@ -32,7 +32,7 @@ def setup(chip):
|
|
|
32
32
|
|
|
33
33
|
chip.set('tool', tool, 'exe', 'sta')
|
|
34
34
|
chip.set('tool', tool, 'vswitch', '-version')
|
|
35
|
-
chip.set('tool', tool, 'version', '>=v2.
|
|
35
|
+
chip.set('tool', tool, 'version', '>=v2.6.2', clobber=False)
|
|
36
36
|
chip.set('tool', tool, 'format', 'tcl')
|
|
37
37
|
|
|
38
38
|
targetlibs = get_libraries(chip, 'logic')
|
|
@@ -44,3 +44,19 @@ proc sc_display_report { report } {
|
|
|
44
44
|
close $fid
|
|
45
45
|
puts $report_content
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
proc sc_path_group { args } {
|
|
49
|
+
sta::parse_key_args "sc_path_group" args \
|
|
50
|
+
keys {-name -to -from} \
|
|
51
|
+
flags {}
|
|
52
|
+
|
|
53
|
+
sta::check_argc_eq0 "sc_path_group" $args
|
|
54
|
+
|
|
55
|
+
if { [llength $keys(-from)] == 0 } {
|
|
56
|
+
return
|
|
57
|
+
}
|
|
58
|
+
if { [llength $keys(-to)] == 0 } {
|
|
59
|
+
return
|
|
60
|
+
}
|
|
61
|
+
group_path -name $keys(-name) -from $keys(-from) -to $keys(-to)
|
|
62
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Reading SC Schema
|
|
3
3
|
###############################
|
|
4
4
|
|
|
5
|
-
source ./sc_manifest.tcl
|
|
5
|
+
source ./sc_manifest.tcl
|
|
6
6
|
|
|
7
7
|
##############################
|
|
8
8
|
# Schema Adapter
|
|
@@ -38,6 +38,12 @@ foreach corner [dict keys [sc_cfg_get constraint timing]] {
|
|
|
38
38
|
# MACROS
|
|
39
39
|
set sc_macrolibs [sc_get_asic_libraries macro]
|
|
40
40
|
|
|
41
|
+
###############################
|
|
42
|
+
# Source helper functions
|
|
43
|
+
###############################
|
|
44
|
+
|
|
45
|
+
source "$sc_refdir/sc_procs.tcl"
|
|
46
|
+
|
|
41
47
|
###############################
|
|
42
48
|
# Read Files
|
|
43
49
|
###############################
|
|
@@ -104,6 +110,34 @@ if { [file exists "inputs/${sc_design}.sdc"] } {
|
|
|
104
110
|
read_sdc "${sdc}"
|
|
105
111
|
}
|
|
106
112
|
|
|
113
|
+
# Create path groups
|
|
114
|
+
if { [llength [sta::path_group_names]] == 0 } {
|
|
115
|
+
sc_path_group -name in2out -from [all_inputs -no_clocks] -to [all_outputs]
|
|
116
|
+
|
|
117
|
+
if {
|
|
118
|
+
[llength [all_clocks]] == 1 ||
|
|
119
|
+
[lindex [sc_cfg_tool_task_get var unique_path_groups_per_clock] 0] == "false"
|
|
120
|
+
} {
|
|
121
|
+
sc_path_group -name in2reg -from [all_inputs -no_clocks] -to [all_registers]
|
|
122
|
+
sc_path_group -name reg2reg -from [all_registers] -to [all_registers]
|
|
123
|
+
sc_path_group -name reg2out -from [all_registers] -to [all_outputs]
|
|
124
|
+
} else {
|
|
125
|
+
foreach clock [all_clocks] {
|
|
126
|
+
set clk_name [get_property $clock name]
|
|
127
|
+
sc_path_group -name in2reg.${clk_name} \
|
|
128
|
+
-from [all_inputs -no_clocks] \
|
|
129
|
+
-to [all_registers -clock $clock]
|
|
130
|
+
sc_path_group -name reg2reg.${clk_name} \
|
|
131
|
+
-from [all_registers -clock $clock] \
|
|
132
|
+
-to [all_registers -clock $clock]
|
|
133
|
+
sc_path_group -name reg2out.${clk_name} \
|
|
134
|
+
-from [all_registers -clock $clock] \
|
|
135
|
+
-to [all_outputs]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
puts "Timing path groups: [sta::path_group_names]"
|
|
140
|
+
|
|
107
141
|
###############################
|
|
108
142
|
|
|
109
143
|
foreach corner $sc_scenarios {
|
|
@@ -116,12 +150,6 @@ foreach corner $sc_scenarios {
|
|
|
116
150
|
}
|
|
117
151
|
}
|
|
118
152
|
|
|
119
|
-
###############################
|
|
120
|
-
# Source helper functions
|
|
121
|
-
###############################
|
|
122
|
-
|
|
123
|
-
source "$sc_refdir/sc_procs.tcl"
|
|
124
|
-
|
|
125
153
|
###############################
|
|
126
154
|
# Report Metrics
|
|
127
155
|
###############################
|
|
@@ -45,6 +45,10 @@ def setup(chip):
|
|
|
45
45
|
set_tool_task_var(chip, param_key='top_n_paths',
|
|
46
46
|
default_value='10',
|
|
47
47
|
schelp='number of paths to report timing for')
|
|
48
|
+
set_tool_task_var(chip, param_key='unique_path_groups_per_clock',
|
|
49
|
+
default_value=False,
|
|
50
|
+
skip=['pdk', 'lib'],
|
|
51
|
+
schelp='true/false, if true will generate separate path groups per clock')
|
|
48
52
|
|
|
49
53
|
modes = get_timing_modes(chip)
|
|
50
54
|
|
|
@@ -165,13 +169,13 @@ def post_process(chip):
|
|
|
165
169
|
metric = None
|
|
166
170
|
elif metric in ('holdslack', 'setupslack'):
|
|
167
171
|
if slack:
|
|
168
|
-
record_metric(chip, step, index, metric, float(slack.group(1)),
|
|
172
|
+
record_metric(chip, step, index, metric, float(slack.group(1).split()[-1]),
|
|
169
173
|
__report_map(chip, metric, logfile),
|
|
170
174
|
source_unit=timescale)
|
|
171
175
|
metric = None
|
|
172
176
|
elif metric in ('setuptns', 'holdtns'):
|
|
173
177
|
if tns:
|
|
174
|
-
record_metric(chip, step, index, metric, float(tns.group(1)),
|
|
178
|
+
record_metric(chip, step, index, metric, float(tns.group(1).split()[-1]),
|
|
175
179
|
__report_map(chip, metric, logfile),
|
|
176
180
|
source_unit=timescale)
|
|
177
181
|
metric = None
|
|
@@ -151,7 +151,7 @@ def _get_driver(chip, options_func, ignored_diagnotics=None):
|
|
|
151
151
|
driver.diagEngine.setSeverity(
|
|
152
152
|
getattr(pyslang.Diags, warning),
|
|
153
153
|
pyslang.DiagnosticSeverity.Ignored)
|
|
154
|
-
|
|
154
|
+
else:
|
|
155
155
|
chip.logger.warning(f'{warning} is not a valid slang category')
|
|
156
156
|
|
|
157
157
|
if not ignored_diagnotics:
|
|
@@ -200,13 +200,12 @@ def _diagnostics(chip, driver, compilation):
|
|
|
200
200
|
|
|
201
201
|
report[report_level].append(line)
|
|
202
202
|
|
|
203
|
-
if
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
chip.logger.error(line)
|
|
203
|
+
if report["warning"]:
|
|
204
|
+
for line in report["warning"]:
|
|
205
|
+
chip.logger.warning(line)
|
|
206
|
+
if report["error"]:
|
|
207
|
+
for line in report["error"]:
|
|
208
|
+
chip.logger.error(line)
|
|
210
209
|
|
|
211
210
|
diags.clearCounts()
|
|
212
211
|
for diag in compilation.getAllDiagnostics():
|
|
@@ -26,7 +26,10 @@ def make_docs(chip):
|
|
|
26
26
|
|
|
27
27
|
def parse_version(stdout):
|
|
28
28
|
# 0.0.7-130-g1aa30ea
|
|
29
|
-
|
|
29
|
+
stdout = stdout.strip()
|
|
30
|
+
if '-' in stdout:
|
|
31
|
+
return '-'.join(stdout.split('-')[:-1])
|
|
32
|
+
return stdout
|
|
30
33
|
|
|
31
34
|
|
|
32
35
|
##################################################
|
|
@@ -34,12 +34,9 @@ def setup(chip):
|
|
|
34
34
|
''' Tool specific function to run before step execution
|
|
35
35
|
'''
|
|
36
36
|
|
|
37
|
-
# If the 'lock' bit is set, don't reconfigure.
|
|
38
|
-
tool = 'yosys'
|
|
39
|
-
refdir = 'tools/' + tool
|
|
40
37
|
step = chip.get('arg', 'step')
|
|
41
38
|
index = chip.get('arg', 'index')
|
|
42
|
-
|
|
39
|
+
tool, task = get_tool_task(chip, step, index)
|
|
43
40
|
|
|
44
41
|
# Standard Setup
|
|
45
42
|
chip.set('tool', tool, 'exe', 'yosys')
|
|
@@ -54,7 +51,8 @@ def setup(chip):
|
|
|
54
51
|
option.append('-C')
|
|
55
52
|
option.append('-c')
|
|
56
53
|
chip.set('tool', tool, 'task', task, 'option', option, step=step, index=index, clobber=False)
|
|
57
|
-
chip.set('tool', tool, 'task', task, 'refdir',
|
|
54
|
+
chip.set('tool', tool, 'task', task, 'refdir', os.path.join('tools', tool),
|
|
55
|
+
step=step, index=index,
|
|
58
56
|
package='siliconcompiler', clobber=False)
|
|
59
57
|
chip.set('tool', tool, 'task', task, 'regex', 'warnings', "Warning:",
|
|
60
58
|
step=step, index=index, clobber=False)
|
|
@@ -76,38 +74,8 @@ def normalize_version(version):
|
|
|
76
74
|
return version.replace('+', '-')
|
|
77
75
|
|
|
78
76
|
|
|
79
|
-
def syn_setup(chip):
|
|
80
|
-
''' Helper method for configs specific to synthesis tasks.
|
|
81
|
-
'''
|
|
82
|
-
|
|
83
|
-
# Generic tool setup.
|
|
84
|
-
setup(chip)
|
|
85
|
-
|
|
86
|
-
tool = 'yosys'
|
|
87
|
-
step = chip.get('arg', 'step')
|
|
88
|
-
index = chip.get('arg', 'index')
|
|
89
|
-
_, task = get_tool_task(chip, step, index)
|
|
90
|
-
design = chip.top()
|
|
91
|
-
|
|
92
|
-
# Set yosys script path.
|
|
93
|
-
chip.set('tool', tool, 'task', task, 'script', 'sc_syn.tcl',
|
|
94
|
-
step=step, index=index, clobber=False)
|
|
95
|
-
|
|
96
|
-
# Input/output requirements.
|
|
97
|
-
chip.set('tool', tool, 'task', task, 'input', design + '.v', step=step, index=index)
|
|
98
|
-
chip.set('tool', tool, 'task', task, 'output', design + '.vg', step=step, index=index)
|
|
99
|
-
chip.add('tool', tool, 'task', task, 'output', design + '.netlist.json', step=step, index=index)
|
|
100
|
-
|
|
101
|
-
chip.set('tool', tool, 'task', task, 'var', 'use_slang', False,
|
|
102
|
-
step=step, index=index,
|
|
103
|
-
clobber=False)
|
|
104
|
-
chip.set('tool', tool, 'task', task, 'var', 'use_slang',
|
|
105
|
-
'true/false, if true will attempt to use the slang frontend',
|
|
106
|
-
field='help')
|
|
107
|
-
|
|
108
|
-
|
|
109
77
|
##################################################
|
|
110
|
-
def
|
|
78
|
+
def synth_post_process(chip):
|
|
111
79
|
''' Tool specific function to run after step execution
|
|
112
80
|
'''
|
|
113
81
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import re
|
|
2
2
|
|
|
3
3
|
from siliconcompiler.tools.yosys import setup as setup_tool
|
|
4
|
-
from siliconcompiler.tools.yosys.syn_asic import
|
|
4
|
+
from siliconcompiler.tools.yosys.syn_asic import prepare_synthesis_libraries, setup_asic
|
|
5
5
|
from siliconcompiler import sc_open
|
|
6
6
|
from siliconcompiler.tools._common import get_tool_task, record_metric, input_provides
|
|
7
7
|
|
|
@@ -14,13 +14,12 @@ def setup(chip):
|
|
|
14
14
|
# Generic tool setup.
|
|
15
15
|
setup_tool(chip)
|
|
16
16
|
|
|
17
|
-
#
|
|
17
|
+
# Setup for asic
|
|
18
18
|
setup_asic(chip)
|
|
19
19
|
|
|
20
|
-
tool = 'yosys'
|
|
21
20
|
step = chip.get('arg', 'step')
|
|
22
21
|
index = chip.get('arg', 'index')
|
|
23
|
-
|
|
22
|
+
tool, task = get_tool_task(chip, step, index)
|
|
24
23
|
design = chip.top()
|
|
25
24
|
|
|
26
25
|
# Set yosys script path.
|
|
@@ -1,3 +1,84 @@
|
|
|
1
|
+
###############################
|
|
2
|
+
# Reading SC Schema
|
|
3
|
+
###############################
|
|
4
|
+
|
|
5
|
+
source ./sc_manifest.tcl
|
|
6
|
+
|
|
7
|
+
yosys echo on
|
|
8
|
+
|
|
9
|
+
###############################
|
|
10
|
+
# Schema Adapter
|
|
11
|
+
###############################
|
|
12
|
+
|
|
13
|
+
set sc_tool yosys
|
|
14
|
+
set sc_step [sc_cfg_get arg step]
|
|
15
|
+
set sc_index [sc_cfg_get arg index]
|
|
16
|
+
set sc_flow [sc_cfg_get option flow]
|
|
17
|
+
set sc_task [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index task]
|
|
18
|
+
set sc_refdir [sc_cfg_tool_task_get refdir]
|
|
19
|
+
|
|
20
|
+
####################
|
|
21
|
+
# DESIGNER's CHOICE
|
|
22
|
+
####################
|
|
23
|
+
|
|
24
|
+
set sc_design [sc_top]
|
|
25
|
+
set sc_flow [sc_cfg_get option flow]
|
|
26
|
+
set sc_optmode [sc_cfg_get option optmode]
|
|
27
|
+
set sc_pdk [sc_cfg_get option pdk]
|
|
28
|
+
|
|
29
|
+
########################################################
|
|
30
|
+
# Helper function
|
|
31
|
+
########################################################
|
|
32
|
+
|
|
33
|
+
source "$sc_refdir/procs.tcl"
|
|
34
|
+
|
|
35
|
+
########################################################
|
|
36
|
+
# Design Inputs
|
|
37
|
+
########################################################
|
|
38
|
+
|
|
39
|
+
set input_verilog "inputs/$sc_design.v"
|
|
40
|
+
if { ![file exists $input_verilog] } {
|
|
41
|
+
set input_verilog []
|
|
42
|
+
if { [sc_cfg_exists input rtl systemverilog] } {
|
|
43
|
+
lappend input_verilog {*}[sc_cfg_get input rtl systemverilog]
|
|
44
|
+
}
|
|
45
|
+
if { [sc_cfg_exists input rtl verilog] } {
|
|
46
|
+
lappend input_verilog {*}[sc_cfg_get input rtl verilog]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if { [lindex [sc_cfg_tool_task_get var use_slang] 0] == "true" && [sc_load_plugin slang] } {
|
|
51
|
+
# This needs some reordering of loaded to ensure blackboxes are handled
|
|
52
|
+
# before this
|
|
53
|
+
set slang_params []
|
|
54
|
+
if { [sc_cfg_exists option param] } {
|
|
55
|
+
dict for {key value} [sc_cfg_get option param] {
|
|
56
|
+
if { ![string is integer $value] } {
|
|
57
|
+
set value [concat \"$value\"]
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
lappend slang_params -G "${key}=${value}"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
yosys read_slang \
|
|
64
|
+
-D SYNTHESIS \
|
|
65
|
+
--keep-hierarchy \
|
|
66
|
+
--top $sc_design \
|
|
67
|
+
{*}$slang_params \
|
|
68
|
+
{*}$input_verilog
|
|
69
|
+
} else {
|
|
70
|
+
# Use -noblackbox to correctly interpret empty modules as empty,
|
|
71
|
+
# actual black boxes are read in later
|
|
72
|
+
# https://github.com/YosysHQ/yosys/issues/1468
|
|
73
|
+
yosys read_verilog -noblackbox -sv {*}$input_verilog
|
|
74
|
+
|
|
75
|
+
########################################################
|
|
76
|
+
# Override top level parameters
|
|
77
|
+
########################################################
|
|
78
|
+
|
|
79
|
+
sc_apply_params
|
|
80
|
+
}
|
|
81
|
+
|
|
1
82
|
####################
|
|
2
83
|
# Helper functions
|
|
3
84
|
####################
|
|
@@ -416,3 +497,9 @@ foreach lib_file "$sc_libraries $sc_macro_libraries" {
|
|
|
416
497
|
yosys echo off
|
|
417
498
|
yosys tee -o ./reports/stat.json stat -json -top $sc_design {*}$stat_libs
|
|
418
499
|
yosys echo on
|
|
500
|
+
|
|
501
|
+
########################################################
|
|
502
|
+
# Write Netlist
|
|
503
|
+
########################################################
|
|
504
|
+
yosys write_verilog -noexpr -nohex -nodec "outputs/${sc_design}.vg"
|
|
505
|
+
yosys write_json "outputs/${sc_design}.netlist.json"
|
|
@@ -1,3 +1,79 @@
|
|
|
1
|
+
###############################
|
|
2
|
+
# Reading SC Schema
|
|
3
|
+
###############################
|
|
4
|
+
|
|
5
|
+
source ./sc_manifest.tcl
|
|
6
|
+
|
|
7
|
+
yosys echo on
|
|
8
|
+
|
|
9
|
+
###############################
|
|
10
|
+
# Schema Adapter
|
|
11
|
+
###############################
|
|
12
|
+
|
|
13
|
+
set sc_tool yosys
|
|
14
|
+
set sc_step [sc_cfg_get arg step]
|
|
15
|
+
set sc_index [sc_cfg_get arg index]
|
|
16
|
+
set sc_flow [sc_cfg_get option flow]
|
|
17
|
+
set sc_task [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index task]
|
|
18
|
+
set sc_refdir [sc_cfg_tool_task_get refdir]
|
|
19
|
+
|
|
20
|
+
####################
|
|
21
|
+
# DESIGNER's CHOICE
|
|
22
|
+
####################
|
|
23
|
+
|
|
24
|
+
set sc_design [sc_top]
|
|
25
|
+
set sc_flow [sc_cfg_get option flow]
|
|
26
|
+
set sc_optmode [sc_cfg_get option optmode]
|
|
27
|
+
set sc_pdk [sc_cfg_get option pdk]
|
|
28
|
+
|
|
29
|
+
########################################################
|
|
30
|
+
# Helper function
|
|
31
|
+
########################################################
|
|
32
|
+
|
|
33
|
+
source "$sc_refdir/procs.tcl"
|
|
34
|
+
|
|
35
|
+
########################################################
|
|
36
|
+
# Design Inputs
|
|
37
|
+
########################################################
|
|
38
|
+
|
|
39
|
+
# TODO: the original OpenFPGA synth script used read_verilog with -nolatches. Is
|
|
40
|
+
# that a flag we might want here?
|
|
41
|
+
|
|
42
|
+
set input_verilog "inputs/$sc_design.v"
|
|
43
|
+
if { [file exists $input_verilog] } {
|
|
44
|
+
if { [lindex [sc_cfg_tool_task_get var use_slang] 0] == "true" && [sc_load_plugin slang] } {
|
|
45
|
+
# This needs some reordering of loaded to ensure blackboxes are handled
|
|
46
|
+
# before this
|
|
47
|
+
set slang_params []
|
|
48
|
+
if { [sc_cfg_exists option param] } {
|
|
49
|
+
dict for {key value} [sc_cfg_get option param] {
|
|
50
|
+
if { ![string is integer $value] } {
|
|
51
|
+
set value [concat \"$value\"]
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
lappend slang_params -G "${key}=${value}"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
yosys read_slang \
|
|
58
|
+
-D SYNTHESIS \
|
|
59
|
+
--keep-hierarchy \
|
|
60
|
+
--top $sc_design \
|
|
61
|
+
{*}$slang_params \
|
|
62
|
+
$input_verilog
|
|
63
|
+
} else {
|
|
64
|
+
# Use -noblackbox to correctly interpret empty modules as empty,
|
|
65
|
+
# actual black boxes are read in later
|
|
66
|
+
# https://github.com/YosysHQ/yosys/issues/1468
|
|
67
|
+
yosys read_verilog -noblackbox -sv $input_verilog
|
|
68
|
+
|
|
69
|
+
########################################################
|
|
70
|
+
# Override top level parameters
|
|
71
|
+
########################################################
|
|
72
|
+
|
|
73
|
+
sc_apply_params
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
1
77
|
####################
|
|
2
78
|
# Helper functions
|
|
3
79
|
####################
|
|
@@ -241,4 +317,6 @@ yosys echo on
|
|
|
241
317
|
########################################################
|
|
242
318
|
# Write Netlist
|
|
243
319
|
########################################################
|
|
320
|
+
yosys write_verilog -noexpr -nohex -nodec "outputs/${sc_design}.vg"
|
|
321
|
+
yosys write_json "outputs/${sc_design}.netlist.json"
|
|
244
322
|
yosys write_blif "outputs/${sc_design}.blif"
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
from siliconcompiler.tools.yosys import syn_setup, syn_post_process
|
|
1
|
+
from siliconcompiler.tools.yosys import synth_post_process, setup as tool_setup
|
|
3
2
|
import os
|
|
4
3
|
import json
|
|
5
4
|
import re
|
|
@@ -9,7 +8,7 @@ from siliconcompiler import utils
|
|
|
9
8
|
from siliconcompiler.tools._common.asic import set_tool_task_var, get_libraries, get_mainlib, \
|
|
10
9
|
CellArea
|
|
11
10
|
from siliconcompiler.tools._common.asic_clock import get_clock_period
|
|
12
|
-
from siliconcompiler.tools._common import get_tool_task
|
|
11
|
+
from siliconcompiler.tools._common import get_tool_task, input_provides, add_require_input
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
def make_docs(chip):
|
|
@@ -22,22 +21,48 @@ def setup(chip):
|
|
|
22
21
|
Perform ASIC synthesis
|
|
23
22
|
'''
|
|
24
23
|
|
|
24
|
+
tool_setup(chip)
|
|
25
|
+
|
|
25
26
|
# Generic synthesis task setup.
|
|
26
|
-
|
|
27
|
+
step = chip.get('arg', 'step')
|
|
28
|
+
index = chip.get('arg', 'index')
|
|
29
|
+
tool, task = get_tool_task(chip, step, index)
|
|
30
|
+
design = chip.top()
|
|
31
|
+
|
|
32
|
+
# Set yosys script path.
|
|
33
|
+
chip.set('tool', tool, 'task', task, 'script', 'sc_synth_asic.tcl',
|
|
34
|
+
step=step, index=index, clobber=False)
|
|
35
|
+
|
|
36
|
+
# Input/output requirements.
|
|
37
|
+
if f'{design}.v' in input_provides(chip, step, index):
|
|
38
|
+
chip.set('tool', tool, 'task', task, 'input', design + '.v', step=step, index=index)
|
|
39
|
+
else:
|
|
40
|
+
added = False
|
|
41
|
+
added |= add_require_input(chip, 'input', 'rtl', 'systemverilog',
|
|
42
|
+
include_library_files=False)
|
|
43
|
+
added |= add_require_input(chip, 'input', 'rtl', 'verilog',
|
|
44
|
+
include_library_files=False)
|
|
45
|
+
if not added:
|
|
46
|
+
chip.add('tool', tool, 'task', task, 'require', 'input,rtl,verilog')
|
|
47
|
+
chip.set('tool', tool, 'task', task, 'output', design + '.vg', step=step, index=index)
|
|
48
|
+
chip.add('tool', tool, 'task', task, 'output', design + '.netlist.json', step=step, index=index)
|
|
49
|
+
|
|
50
|
+
chip.set('tool', tool, 'task', task, 'var', 'use_slang', False,
|
|
51
|
+
step=step, index=index,
|
|
52
|
+
clobber=False)
|
|
53
|
+
chip.set('tool', tool, 'task', task, 'var', 'use_slang',
|
|
54
|
+
'true/false, if true will attempt to use the slang frontend',
|
|
55
|
+
field='help')
|
|
27
56
|
|
|
28
|
-
# ASIC-specific setup.
|
|
29
57
|
setup_asic(chip)
|
|
30
58
|
|
|
31
59
|
|
|
32
60
|
def setup_asic(chip):
|
|
33
|
-
''' Helper method for configs specific to ASIC steps (both syn and lec).
|
|
34
|
-
'''
|
|
35
|
-
|
|
36
|
-
tool = 'yosys'
|
|
37
61
|
step = chip.get('arg', 'step')
|
|
38
62
|
index = chip.get('arg', 'index')
|
|
39
|
-
|
|
63
|
+
tool, task = get_tool_task(chip, step, index)
|
|
40
64
|
|
|
65
|
+
# Setup ASIC params
|
|
41
66
|
chip.add('tool', tool, 'task', task, 'require',
|
|
42
67
|
",".join(['asic', 'logiclib']),
|
|
43
68
|
step=step, index=index)
|
|
@@ -506,7 +531,7 @@ def pre_process(chip):
|
|
|
506
531
|
|
|
507
532
|
|
|
508
533
|
def post_process(chip):
|
|
509
|
-
|
|
534
|
+
synth_post_process(chip)
|
|
510
535
|
_generate_cell_area_report(chip)
|
|
511
536
|
|
|
512
537
|
|