siliconcompiler 0.28.9__py3-none-any.whl → 0.29.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- siliconcompiler/_metadata.py +1 -1
- siliconcompiler/apps/__init__.py +26 -0
- siliconcompiler/apps/sc_remote.py +15 -14
- siliconcompiler/apps/sc_show.py +5 -5
- siliconcompiler/apps/utils/replay.py +194 -0
- siliconcompiler/checklists/__init__.py +12 -0
- siliconcompiler/core.py +89 -22
- siliconcompiler/flows/__init__.py +34 -0
- siliconcompiler/flows/_common.py +11 -13
- siliconcompiler/flows/asicflow.py +83 -42
- siliconcompiler/flows/showflow.py +1 -1
- siliconcompiler/libs/__init__.py +5 -0
- siliconcompiler/optimizer/__init__.py +199 -0
- siliconcompiler/optimizer/vizier.py +259 -0
- siliconcompiler/pdks/__init__.py +5 -0
- siliconcompiler/remote/__init__.py +11 -0
- siliconcompiler/remote/client.py +753 -815
- siliconcompiler/report/report.py +2 -0
- siliconcompiler/report/summary_table.py +1 -1
- siliconcompiler/scheduler/__init__.py +118 -58
- siliconcompiler/scheduler/send_messages.py +1 -1
- siliconcompiler/schema/schema_cfg.py +16 -4
- siliconcompiler/schema/schema_obj.py +29 -10
- siliconcompiler/schema/utils.py +2 -0
- siliconcompiler/sphinx_ext/__init__.py +85 -0
- siliconcompiler/sphinx_ext/dynamicgen.py +19 -34
- siliconcompiler/sphinx_ext/schemagen.py +3 -2
- siliconcompiler/targets/__init__.py +26 -0
- siliconcompiler/targets/gf180_demo.py +3 -3
- siliconcompiler/templates/replay/replay.py.j2 +62 -0
- siliconcompiler/templates/replay/requirements.txt +7 -0
- siliconcompiler/templates/replay/setup.sh +130 -0
- siliconcompiler/tools/__init__.py +60 -0
- siliconcompiler/tools/_common/__init__.py +15 -1
- siliconcompiler/tools/_common/asic.py +17 -9
- siliconcompiler/tools/builtin/concatenate.py +1 -1
- siliconcompiler/tools/ghdl/ghdl.py +1 -2
- siliconcompiler/tools/klayout/convert_drc_db.py +1 -1
- siliconcompiler/tools/klayout/drc.py +1 -1
- siliconcompiler/tools/klayout/export.py +8 -1
- siliconcompiler/tools/klayout/klayout.py +2 -2
- siliconcompiler/tools/klayout/klayout_convert_drc_db.py +2 -2
- siliconcompiler/tools/klayout/klayout_export.py +7 -5
- siliconcompiler/tools/klayout/klayout_operations.py +4 -3
- siliconcompiler/tools/klayout/klayout_show.py +3 -2
- siliconcompiler/tools/klayout/klayout_utils.py +1 -1
- siliconcompiler/tools/klayout/operations.py +8 -0
- siliconcompiler/tools/klayout/screenshot.py +6 -1
- siliconcompiler/tools/klayout/show.py +8 -1
- siliconcompiler/tools/magic/magic.py +1 -1
- siliconcompiler/tools/openroad/__init__.py +103 -0
- siliconcompiler/tools/openroad/{openroad.py → _apr.py} +415 -423
- siliconcompiler/tools/openroad/antenna_repair.py +78 -0
- siliconcompiler/tools/openroad/clock_tree_synthesis.py +64 -0
- siliconcompiler/tools/openroad/detailed_placement.py +59 -0
- siliconcompiler/tools/openroad/detailed_route.py +62 -0
- siliconcompiler/tools/openroad/endcap_tapcell_insertion.py +52 -0
- siliconcompiler/tools/openroad/fillercell_insertion.py +58 -0
- siliconcompiler/tools/openroad/{dfm.py → fillmetal_insertion.py} +35 -19
- siliconcompiler/tools/openroad/global_placement.py +58 -0
- siliconcompiler/tools/openroad/global_route.py +63 -0
- siliconcompiler/tools/openroad/init_floorplan.py +103 -0
- siliconcompiler/tools/openroad/macro_placement.py +65 -0
- siliconcompiler/tools/openroad/metrics.py +23 -8
- siliconcompiler/tools/openroad/pin_placement.py +56 -0
- siliconcompiler/tools/openroad/power_grid.py +65 -0
- siliconcompiler/tools/openroad/rcx_bench.py +7 -4
- siliconcompiler/tools/openroad/rcx_extract.py +2 -1
- siliconcompiler/tools/openroad/rdlroute.py +4 -4
- siliconcompiler/tools/openroad/repair_design.py +59 -0
- siliconcompiler/tools/openroad/repair_timing.py +63 -0
- siliconcompiler/tools/openroad/screenshot.py +9 -20
- siliconcompiler/tools/openroad/scripts/apr/postamble.tcl +44 -0
- siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +95 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_antenna_repair.tcl +51 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +66 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_detailed_placement.tcl +41 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_detailed_route.tcl +71 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_endcap_tapcell_insertion.tcl +55 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_fillercell_insertion.tcl +27 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_fillmetal_insertion.tcl +36 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_global_placement.tcl +26 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_global_route.tcl +61 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_init_floorplan.tcl +333 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_macro_placement.tcl +123 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_metrics.tcl +22 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_pin_placement.tcl +41 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_power_grid.tcl +60 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_design.tcl +68 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +83 -0
- siliconcompiler/tools/openroad/scripts/apr/sc_write_data.tcl +125 -0
- siliconcompiler/tools/openroad/scripts/common/debugging.tcl +28 -0
- siliconcompiler/tools/openroad/scripts/common/procs.tcl +727 -0
- siliconcompiler/tools/openroad/scripts/common/read_input_files.tcl +59 -0
- siliconcompiler/tools/openroad/scripts/common/read_liberty.tcl +20 -0
- siliconcompiler/tools/openroad/scripts/common/read_timing_constraints.tcl +16 -0
- siliconcompiler/tools/openroad/scripts/common/reports.tcl +180 -0
- siliconcompiler/tools/openroad/scripts/common/screenshot.tcl +18 -0
- siliconcompiler/tools/openroad/scripts/common/write_images.tcl +395 -0
- siliconcompiler/tools/openroad/scripts/{sc_rcx_bench.tcl → rcx/sc_rcx_bench.tcl} +5 -5
- siliconcompiler/tools/openroad/scripts/{sc_rcx_extract.tcl → rcx/sc_rcx_extract.tcl} +0 -0
- siliconcompiler/tools/openroad/scripts/sc_rcx.tcl +5 -16
- siliconcompiler/tools/openroad/scripts/sc_rdlroute.tcl +51 -51
- siliconcompiler/tools/openroad/scripts/sc_show.tcl +110 -0
- siliconcompiler/tools/openroad/show.py +28 -23
- siliconcompiler/tools/openroad/{export.py → write_data.py} +31 -26
- siliconcompiler/tools/opensta/__init__.py +2 -2
- siliconcompiler/tools/opensta/check_library.py +27 -0
- siliconcompiler/tools/opensta/scripts/sc_check_library.tcl +255 -0
- siliconcompiler/tools/opensta/scripts/sc_timing.tcl +1 -1
- siliconcompiler/tools/sv2v/sv2v.py +1 -2
- siliconcompiler/tools/verilator/verilator.py +6 -7
- siliconcompiler/tools/vivado/vivado.py +1 -1
- siliconcompiler/tools/yosys/__init__.py +149 -0
- siliconcompiler/tools/yosys/lec.py +22 -9
- siliconcompiler/tools/yosys/sc_lec.tcl +94 -49
- siliconcompiler/tools/yosys/sc_syn.tcl +1 -0
- siliconcompiler/tools/yosys/screenshot.py +2 -2
- siliconcompiler/tools/yosys/syn_asic.py +105 -74
- siliconcompiler/tools/yosys/syn_asic.tcl +58 -12
- siliconcompiler/tools/yosys/syn_fpga.py +2 -3
- siliconcompiler/tools/yosys/syn_fpga.tcl +26 -19
- siliconcompiler/toolscripts/_tools.json +5 -5
- siliconcompiler/utils/__init__.py +7 -3
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.1.dist-info}/METADATA +22 -17
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.1.dist-info}/RECORD +131 -114
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.1.dist-info}/WHEEL +1 -1
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.1.dist-info}/entry_points.txt +13 -0
- siliconcompiler/libs/asap7sc7p5t.py +0 -8
- siliconcompiler/libs/gf180mcu.py +0 -8
- siliconcompiler/libs/interposer.py +0 -8
- siliconcompiler/libs/nangate45.py +0 -8
- siliconcompiler/libs/sg13g2_stdcell.py +0 -8
- siliconcompiler/libs/sky130hd.py +0 -8
- siliconcompiler/libs/sky130io.py +0 -8
- siliconcompiler/pdks/asap7.py +0 -8
- siliconcompiler/pdks/freepdk45.py +0 -8
- siliconcompiler/pdks/gf180.py +0 -8
- siliconcompiler/pdks/ihp130.py +0 -8
- siliconcompiler/pdks/interposer.py +0 -8
- siliconcompiler/pdks/skywater130.py +0 -8
- siliconcompiler/tools/openroad/cts.py +0 -45
- siliconcompiler/tools/openroad/floorplan.py +0 -75
- siliconcompiler/tools/openroad/physyn.py +0 -27
- siliconcompiler/tools/openroad/place.py +0 -41
- siliconcompiler/tools/openroad/route.py +0 -45
- siliconcompiler/tools/openroad/scripts/__init__.py +0 -0
- siliconcompiler/tools/openroad/scripts/sc_apr.tcl +0 -514
- siliconcompiler/tools/openroad/scripts/sc_cts.tcl +0 -68
- siliconcompiler/tools/openroad/scripts/sc_dfm.tcl +0 -22
- siliconcompiler/tools/openroad/scripts/sc_export.tcl +0 -100
- siliconcompiler/tools/openroad/scripts/sc_floorplan.tcl +0 -456
- siliconcompiler/tools/openroad/scripts/sc_metrics.tcl +0 -1
- siliconcompiler/tools/openroad/scripts/sc_physyn.tcl +0 -6
- siliconcompiler/tools/openroad/scripts/sc_place.tcl +0 -84
- siliconcompiler/tools/openroad/scripts/sc_procs.tcl +0 -494
- siliconcompiler/tools/openroad/scripts/sc_report.tcl +0 -189
- siliconcompiler/tools/openroad/scripts/sc_route.tcl +0 -143
- siliconcompiler/tools/openroad/scripts/sc_screenshot.tcl +0 -18
- siliconcompiler/tools/openroad/scripts/sc_write_images.tcl +0 -393
- siliconcompiler/tools/yosys/yosys.py +0 -148
- /siliconcompiler/tools/openroad/scripts/{sc_write.tcl → common/write_data.tcl} +0 -0
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.1.dist-info}/LICENSE +0 -0
- {siliconcompiler-0.28.9.dist-info → siliconcompiler-0.29.1.dist-info}/top_level.txt +0 -0
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
##########################################################
|
|
2
|
-
# ROUTING
|
|
3
|
-
##########################################################
|
|
4
|
-
|
|
5
|
-
#######################
|
|
6
|
-
# Helper functions
|
|
7
|
-
#######################
|
|
8
|
-
|
|
9
|
-
proc insert_fillers { } {
|
|
10
|
-
upvar sc_filler sc_filler
|
|
11
|
-
global sc_mainlib
|
|
12
|
-
|
|
13
|
-
set fillers $sc_filler
|
|
14
|
-
if { [lindex [sc_cfg_tool_task_get var dpl_use_decap_fillers] 0] == "true" } {
|
|
15
|
-
lappend fillers {*}[sc_cfg_get library $sc_mainlib asic cells decap]
|
|
16
|
-
}
|
|
17
|
-
if { $fillers != "" } {
|
|
18
|
-
filler_placement $fillers
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
check_placement -verbose
|
|
22
|
-
|
|
23
|
-
global_connect
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
#######################
|
|
27
|
-
# Add Fillers
|
|
28
|
-
#######################
|
|
29
|
-
|
|
30
|
-
insert_fillers
|
|
31
|
-
|
|
32
|
-
######################
|
|
33
|
-
# Setup detailed route options
|
|
34
|
-
######################
|
|
35
|
-
|
|
36
|
-
foreach via $openroad_drt_default_vias {
|
|
37
|
-
utl::info FLW 1 "Marking $via a default routing via"
|
|
38
|
-
detailed_route_set_default_via $via
|
|
39
|
-
}
|
|
40
|
-
foreach layer $openroad_drt_unidirectional_layers {
|
|
41
|
-
utl::info FLW 1 "Marking $layer as a unidirectional routing layer"
|
|
42
|
-
detailed_route_set_unidirectional_layer $layer
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
######################
|
|
46
|
-
# GLOBAL ROUTE
|
|
47
|
-
######################
|
|
48
|
-
|
|
49
|
-
# Pin access
|
|
50
|
-
if { $openroad_grt_use_pin_access == "true" } {
|
|
51
|
-
set openroad_pin_access_args []
|
|
52
|
-
if { $openroad_drt_process_node != "false" } {
|
|
53
|
-
lappend openroad_pin_access_args "-db_process_node" $openroad_drt_process_node
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
pin_access -bottom_routing_layer $sc_minmetal \
|
|
57
|
-
-top_routing_layer $sc_maxmetal \
|
|
58
|
-
{*}$openroad_pin_access_args
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
set sc_grt_arguments []
|
|
62
|
-
if { $openroad_grt_allow_congestion == "true" } {
|
|
63
|
-
lappend sc_grt_arguments "-allow_congestion"
|
|
64
|
-
}
|
|
65
|
-
if { $openroad_grt_allow_overflow == "true" } {
|
|
66
|
-
lappend sc_grt_arguments "-allow_overflow"
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
global_route -guide_file "./route.guide" \
|
|
70
|
-
-congestion_iterations $openroad_grt_overflow_iter \
|
|
71
|
-
-congestion_report_file "reports/${sc_design}_congestion.rpt" \
|
|
72
|
-
-verbose \
|
|
73
|
-
{*}$sc_grt_arguments
|
|
74
|
-
|
|
75
|
-
######################
|
|
76
|
-
# Report and Repair Antennas
|
|
77
|
-
######################
|
|
78
|
-
|
|
79
|
-
estimate_parasitics -global_routing
|
|
80
|
-
if {
|
|
81
|
-
$openroad_ant_check == "true" &&
|
|
82
|
-
[check_antennas -report_file "reports/${sc_design}_antenna.rpt"] != 0
|
|
83
|
-
} {
|
|
84
|
-
if {
|
|
85
|
-
$openroad_ant_repair == "true" &&
|
|
86
|
-
[llength [sc_cfg_get library $sc_mainlib asic cells antenna]] != 0
|
|
87
|
-
} {
|
|
88
|
-
set sc_antenna [lindex [sc_cfg_get library $sc_mainlib asic cells antenna] 0]
|
|
89
|
-
|
|
90
|
-
# Remove filler cells before attempting to repair antennas
|
|
91
|
-
remove_fillers
|
|
92
|
-
|
|
93
|
-
repair_antenna $sc_antenna \
|
|
94
|
-
-iterations $openroad_ant_iterations \
|
|
95
|
-
-ratio_margin $openroad_ant_margin
|
|
96
|
-
|
|
97
|
-
# Add filler cells back
|
|
98
|
-
insert_fillers
|
|
99
|
-
|
|
100
|
-
# Check antennas again to get final report
|
|
101
|
-
check_antennas -report_file "reports/${sc_design}_antenna_post_repair.rpt"
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
######################
|
|
106
|
-
# Detailed Route
|
|
107
|
-
######################
|
|
108
|
-
|
|
109
|
-
set openroad_drt_arguments []
|
|
110
|
-
if { $openroad_drt_disable_via_gen == "true" } {
|
|
111
|
-
lappend openroad_drt_arguments "-disable_via_gen"
|
|
112
|
-
}
|
|
113
|
-
if { $openroad_drt_process_node != "" } {
|
|
114
|
-
lappend openroad_drt_arguments "-db_process_node" $openroad_drt_process_node
|
|
115
|
-
}
|
|
116
|
-
if { $openroad_drt_via_in_pin_bottom_layer != "" } {
|
|
117
|
-
lappend openroad_drt_arguments "-via_in_pin_bottom_layer" $openroad_drt_via_in_pin_bottom_layer
|
|
118
|
-
}
|
|
119
|
-
if { $openroad_drt_via_in_pin_top_layer != "" } {
|
|
120
|
-
lappend openroad_drt_arguments "-via_in_pin_top_layer" $openroad_drt_via_in_pin_top_layer
|
|
121
|
-
}
|
|
122
|
-
if { $openroad_drt_repair_pdn_vias != "" } {
|
|
123
|
-
lappend openroad_drt_arguments "-repair_pdn_vias" $openroad_drt_repair_pdn_vias
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
detailed_route -save_guide_updates \
|
|
127
|
-
-output_drc "reports/${sc_design}_drc.rpt" \
|
|
128
|
-
-output_maze "reports/${sc_design}_maze.log" \
|
|
129
|
-
-bottom_routing_layer $sc_minmetal \
|
|
130
|
-
-top_routing_layer $sc_maxmetal \
|
|
131
|
-
-verbose 1 \
|
|
132
|
-
{*}$openroad_drt_arguments
|
|
133
|
-
|
|
134
|
-
#########################
|
|
135
|
-
# Correct violations with the power grid
|
|
136
|
-
#########################
|
|
137
|
-
|
|
138
|
-
if { $openroad_drt_via_repair_post_route == "true" } {
|
|
139
|
-
repair_pdn_vias -all
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
# estimate for metrics
|
|
143
|
-
estimate_parasitics -global_routing
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
gui::save_display_controls
|
|
2
|
-
|
|
3
|
-
set sc_resolution \
|
|
4
|
-
[lindex [sc_cfg_tool_task_get {var} show_vertical_resolution] 0]
|
|
5
|
-
|
|
6
|
-
sc_image_setup_default
|
|
7
|
-
|
|
8
|
-
sc_save_image "screenshot" "outputs/${sc_design}.png" $sc_resolution
|
|
9
|
-
|
|
10
|
-
gui::restore_display_controls
|
|
11
|
-
|
|
12
|
-
if {
|
|
13
|
-
[sc_cfg_tool_task_exists {var} include_report_images] &&
|
|
14
|
-
[lindex [sc_cfg_tool_task_get {var} include_report_images] 0]
|
|
15
|
-
== "true"
|
|
16
|
-
} {
|
|
17
|
-
source -echo "${sc_refdir}/sc_write_images.tcl"
|
|
18
|
-
}
|
|
@@ -1,393 +0,0 @@
|
|
|
1
|
-
# Adopted from https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/3f9740e6b3643835e918d78ae1d377d65af0f0fb/flow/scripts/save_images.tcl
|
|
2
|
-
|
|
3
|
-
proc sc_image_heatmap { name ident image_name title { allow_bin_adjust 1 } } {
|
|
4
|
-
global openroad_ord_heatmap_bins_x
|
|
5
|
-
global openroad_ord_heatmap_bins_y
|
|
6
|
-
|
|
7
|
-
file mkdir reports/images/heatmap
|
|
8
|
-
|
|
9
|
-
gui::set_heatmap $ident ShowLegend 1
|
|
10
|
-
gui::set_heatmap $ident ShowNumbers 1
|
|
11
|
-
|
|
12
|
-
if { $allow_bin_adjust } {
|
|
13
|
-
set heatmap_xn $openroad_ord_heatmap_bins_x
|
|
14
|
-
set heatmap_yn $openroad_ord_heatmap_bins_y
|
|
15
|
-
|
|
16
|
-
if { $heatmap_xn < 1 } {
|
|
17
|
-
set heatmap_xn 1
|
|
18
|
-
}
|
|
19
|
-
if { $heatmap_yn < 1 } {
|
|
20
|
-
set heatmap_yn 1
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
set min_heatmap_bin 1.0
|
|
24
|
-
set max_heatmap_bin 100.0
|
|
25
|
-
|
|
26
|
-
set box [[ord::get_db_block] getDieArea]
|
|
27
|
-
set heatmap_x [expr { [ord::dbu_to_microns [$box dx]] / $heatmap_xn }]
|
|
28
|
-
set heatmap_y [expr { [ord::dbu_to_microns [$box dy]] / $heatmap_yn }]
|
|
29
|
-
|
|
30
|
-
if { $heatmap_x < $min_heatmap_bin } {
|
|
31
|
-
set heatmap_x $min_heatmap_bin
|
|
32
|
-
} elseif { $heatmap_x > $max_heatmap_bin } {
|
|
33
|
-
set heatmap_x $max_heatmap_bin
|
|
34
|
-
}
|
|
35
|
-
if { $heatmap_y < $min_heatmap_bin } {
|
|
36
|
-
set heatmap_y $min_heatmap_bin
|
|
37
|
-
} elseif { $heatmap_y > $max_heatmap_bin } {
|
|
38
|
-
set heatmap_y $max_heatmap_bin
|
|
39
|
-
}
|
|
40
|
-
gui::set_heatmap $ident GridX $heatmap_x
|
|
41
|
-
gui::set_heatmap $ident GridY $heatmap_y
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
gui::set_heatmap $ident rebuild
|
|
45
|
-
|
|
46
|
-
if { ![gui::get_heatmap_bool $ident has_data] } {
|
|
47
|
-
return
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
gui::set_display_controls "Heat Maps/${name}" visible true
|
|
51
|
-
|
|
52
|
-
sc_save_image "$title heatmap" reports/images/heatmap/${image_name}
|
|
53
|
-
|
|
54
|
-
gui::set_display_controls "Heat Maps/${name}" visible false
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
proc sc_image_placement { } {
|
|
58
|
-
if { ![sc_has_placed_instances] } {
|
|
59
|
-
return
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
global sc_design
|
|
63
|
-
|
|
64
|
-
sc_image_setup_default
|
|
65
|
-
|
|
66
|
-
# The placement view without routing
|
|
67
|
-
gui::set_display_controls "Layers/*" visible false
|
|
68
|
-
gui::set_display_controls "Instances/Physical/*" visible false
|
|
69
|
-
|
|
70
|
-
sc_save_image "placement" reports/images/${sc_design}.placement.png
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
proc sc_image_routing { } {
|
|
74
|
-
if { ![sc_has_routing] } {
|
|
75
|
-
return
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
global sc_design
|
|
79
|
-
|
|
80
|
-
sc_image_setup_default
|
|
81
|
-
|
|
82
|
-
gui::set_display_controls "Nets/Power" visible false
|
|
83
|
-
gui::set_display_controls "Nets/Ground" visible false
|
|
84
|
-
|
|
85
|
-
sc_save_image "routing" reports/images/${sc_design}.routing.png
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
proc sc_image_everything { } {
|
|
89
|
-
global sc_design
|
|
90
|
-
|
|
91
|
-
sc_image_setup_default
|
|
92
|
-
sc_save_image "snapshot" reports/images/${sc_design}.png
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
proc sc_image_irdrop { net corner } {
|
|
96
|
-
if { ![sc_has_placed_instances] || [sc_has_unplaced_instances] } {
|
|
97
|
-
return
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
sc_image_setup_default
|
|
101
|
-
|
|
102
|
-
file mkdir reports/images/heatmap/irdrop
|
|
103
|
-
|
|
104
|
-
# suppress error message related to failed analysis,
|
|
105
|
-
# that is okay, we just won't take a screenshot
|
|
106
|
-
set msgs "38 39 69"
|
|
107
|
-
foreach msg $msgs {
|
|
108
|
-
suppress_message PSM $msg
|
|
109
|
-
}
|
|
110
|
-
set failed [catch { analyze_power_grid -net $net -corner $corner -source_type STRAPS } err]
|
|
111
|
-
foreach msg $msgs {
|
|
112
|
-
unsuppress_message PSM $msg
|
|
113
|
-
}
|
|
114
|
-
if { $failed } {
|
|
115
|
-
utl::warn FLW 1 "Unable to generate IR drop heatmap for $net on $corner"
|
|
116
|
-
return
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
foreach layer [[ord::get_db_tech] getLayers] {
|
|
120
|
-
if { [$layer getRoutingLevel] == 0 } {
|
|
121
|
-
continue
|
|
122
|
-
}
|
|
123
|
-
set layer_name [$layer getName]
|
|
124
|
-
|
|
125
|
-
gui::set_heatmap IRDrop Net $net
|
|
126
|
-
gui::set_heatmap IRDrop Corner $corner
|
|
127
|
-
gui::set_heatmap IRDrop Layer $layer_name
|
|
128
|
-
gui::set_heatmap IRDrop rebuild
|
|
129
|
-
|
|
130
|
-
sc_image_heatmap "IR Drop" \
|
|
131
|
-
"IRDrop" \
|
|
132
|
-
"irdrop/${net}.${corner}.${layer_name}.png" \
|
|
133
|
-
"IR drop for $net on $layer_name for $corner"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
proc sc_image_routing_congestion { } {
|
|
138
|
-
if { ![sc_has_global_routing] } {
|
|
139
|
-
return
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
sc_image_setup_default
|
|
143
|
-
|
|
144
|
-
sc_image_heatmap "Routing Congestion" \
|
|
145
|
-
"Routing" \
|
|
146
|
-
"routing_congestion.png" \
|
|
147
|
-
"routing congestion" \
|
|
148
|
-
0
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
proc sc_image_estimated_routing_congestion { } {
|
|
152
|
-
if { ![sc_has_placed_instances] } {
|
|
153
|
-
return
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
sc_image_setup_default
|
|
157
|
-
|
|
158
|
-
suppress_message GRT 10
|
|
159
|
-
catch {
|
|
160
|
-
sc_image_heatmap "Estimated Congestion (RUDY)" \
|
|
161
|
-
"RUDY" \
|
|
162
|
-
"estimated_routing_congestion.png" \
|
|
163
|
-
"estimated routing congestion" \
|
|
164
|
-
0
|
|
165
|
-
} err
|
|
166
|
-
unsuppress_message GRT 10
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
proc sc_image_power_density { } {
|
|
170
|
-
if { ![sc_has_placed_instances] } {
|
|
171
|
-
return
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
sc_image_setup_default
|
|
175
|
-
|
|
176
|
-
file mkdir reports/images/heatmap/power_density
|
|
177
|
-
|
|
178
|
-
foreach corner [sta::corners] {
|
|
179
|
-
set corner_name [$corner name]
|
|
180
|
-
|
|
181
|
-
gui::set_heatmap Power Corner $corner_name
|
|
182
|
-
gui::set_heatmap Power rebuild
|
|
183
|
-
|
|
184
|
-
sc_image_heatmap "Power Density" \
|
|
185
|
-
"Power" \
|
|
186
|
-
"power_density/${corner_name}.png" \
|
|
187
|
-
"power density for $corner_name"
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
proc sc_image_placement_density { } {
|
|
192
|
-
if { ![sc_has_placed_instances] } {
|
|
193
|
-
return
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
sc_image_setup_default
|
|
197
|
-
|
|
198
|
-
sc_image_heatmap "Placement Density" \
|
|
199
|
-
"Placement" \
|
|
200
|
-
"placement_density.png" \
|
|
201
|
-
"placement density"
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
proc sc_image_clocks { } {
|
|
205
|
-
if { ![sc_has_placed_instances] } {
|
|
206
|
-
return
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
global sc_design
|
|
210
|
-
sc_image_setup_default
|
|
211
|
-
|
|
212
|
-
# The clock view: all clock nets and buffers
|
|
213
|
-
gui::set_display_controls "Layers/*" visible true
|
|
214
|
-
gui::set_display_controls "Nets/*" visible false
|
|
215
|
-
gui::set_display_controls "Nets/Clock" visible true
|
|
216
|
-
gui::set_display_controls "Instances/*" visible false
|
|
217
|
-
gui::set_display_controls "Instances/StdCells/Clock tree/*" visible true
|
|
218
|
-
if { [select -name "clk*" -type Inst] == 0 } {
|
|
219
|
-
# Nothing selected
|
|
220
|
-
return
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
sc_save_image "clocks" reports/images/${sc_design}.clocks.png
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
proc sc_image_clocktree { } {
|
|
227
|
-
gui::show_widget "Clock Tree Viewer"
|
|
228
|
-
global sc_scenarios
|
|
229
|
-
global sc_design
|
|
230
|
-
|
|
231
|
-
sc_image_setup_default
|
|
232
|
-
gui::set_display_controls "Layers/*" visible true
|
|
233
|
-
gui::set_display_controls "Nets/*" visible false
|
|
234
|
-
gui::set_display_controls "Nets/Clock" visible true
|
|
235
|
-
|
|
236
|
-
set clock_state []
|
|
237
|
-
foreach clock [all_clocks] {
|
|
238
|
-
lappend clock_state $clock [$clock is_propagated]
|
|
239
|
-
}
|
|
240
|
-
set_propagated_clock [all_clocks]
|
|
241
|
-
|
|
242
|
-
file mkdir reports/images/clocks
|
|
243
|
-
foreach clock [get_clocks *] {
|
|
244
|
-
if { [llength [get_property $clock sources]] == 0 } {
|
|
245
|
-
# Skip virtual clocks
|
|
246
|
-
continue
|
|
247
|
-
}
|
|
248
|
-
file mkdir reports/images/clocktree
|
|
249
|
-
|
|
250
|
-
set clock_name [get_name $clock]
|
|
251
|
-
foreach corner $sc_scenarios {
|
|
252
|
-
set path reports/images/clocktree/${clock_name}.${corner}.png
|
|
253
|
-
utl::info FLW 1 "Saving \"$clock_name\" clock tree for $corner to $path"
|
|
254
|
-
save_clocktree_image $path \
|
|
255
|
-
-clock $clock_name \
|
|
256
|
-
-width 1024 \
|
|
257
|
-
-height 1024 \
|
|
258
|
-
-corner $corner
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
if { [info commands gui::select_clockviewer_clock] != "" } {
|
|
262
|
-
gui::select_clockviewer_clock ${clock_name}
|
|
263
|
-
sc_save_image "clock - ${clock_name}" reports/images/clocks/${sc_design}.${clock_name}.png
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
foreach {clock state} $clock_state {
|
|
268
|
-
if { $state } {
|
|
269
|
-
set_propagated_clock $clock
|
|
270
|
-
} else {
|
|
271
|
-
unset_propagated_clock $clock
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
gui::hide_widget "Clock Tree Viewer"
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
proc sc_image_optimizer { } {
|
|
279
|
-
global sc_design
|
|
280
|
-
sc_image_setup_default
|
|
281
|
-
|
|
282
|
-
# The resizer view: all instances created by the resizer grouped
|
|
283
|
-
gui::set_display_controls "Layers/*" visible false
|
|
284
|
-
gui::set_display_controls "Instances/*" visible true
|
|
285
|
-
gui::set_display_controls "Instances/Physical/*" visible false
|
|
286
|
-
|
|
287
|
-
set hold_count [select -name "hold*" -type Inst -highlight 0] ;# green
|
|
288
|
-
set input_count [select -name "input*" -type Inst -highlight 1] ;# yellow
|
|
289
|
-
set output_count [select -name "output*" -type Inst -highlight 1]
|
|
290
|
-
set repeater_count [select -name "repeater*" -type Inst -highlight 3] ;# magenta
|
|
291
|
-
set fanout_count [select -name "fanout*" -type Inst -highlight 3]
|
|
292
|
-
set load_slew_count [select -name "load_slew*" -type Inst -highlight 3]
|
|
293
|
-
set max_cap_count [select -name "max_cap*" -type Inst -highlight 3]
|
|
294
|
-
set max_length_count [select -name "max_length*" -type Inst -highlight 3]
|
|
295
|
-
set wire_count [select -name "wire*" -type Inst -highlight 3]
|
|
296
|
-
set rebuffer_count [select -name "rebuffer*" -type Inst -highlight 4] ;# red
|
|
297
|
-
set split_count [select -name "split*" -type Inst -highlight 5] ;# dark green
|
|
298
|
-
|
|
299
|
-
set select_count [expr {
|
|
300
|
-
$hold_count +
|
|
301
|
-
$input_count +
|
|
302
|
-
$output_count +
|
|
303
|
-
$repeater_count +
|
|
304
|
-
$fanout_count +
|
|
305
|
-
$load_slew_count +
|
|
306
|
-
$max_cap_count +
|
|
307
|
-
$max_length_count +
|
|
308
|
-
$wire_count +
|
|
309
|
-
$rebuffer_count +
|
|
310
|
-
$split_count
|
|
311
|
-
}]
|
|
312
|
-
|
|
313
|
-
if { $select_count == 0 } {
|
|
314
|
-
# Nothing selected
|
|
315
|
-
return
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
sc_save_image "optimizer" reports/images/${sc_design}.optimizer.png
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
proc sc_image_markers { } {
|
|
322
|
-
global sc_design
|
|
323
|
-
sc_image_setup_default
|
|
324
|
-
|
|
325
|
-
file mkdir reports/images/markers
|
|
326
|
-
foreach markerdb [[ord::get_db_block] getMarkerCategories] {
|
|
327
|
-
if { [$markerdb getMarkerCount] == 0 } {
|
|
328
|
-
continue
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
gui::select_marker_category $markerdb
|
|
332
|
-
|
|
333
|
-
sc_save_image \
|
|
334
|
-
"markers - [$markerdb getName]" \
|
|
335
|
-
reports/images/markers/${sc_design}.[$markerdb getName].png
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
gui::select_marker_category NULL
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
# Setup
|
|
342
|
-
file mkdir reports/images
|
|
343
|
-
gui::save_display_controls
|
|
344
|
-
sc_image_setup_default
|
|
345
|
-
|
|
346
|
-
# General images
|
|
347
|
-
sc_image_everything
|
|
348
|
-
sc_image_placement
|
|
349
|
-
sc_image_routing
|
|
350
|
-
|
|
351
|
-
# Markers
|
|
352
|
-
sc_image_markers
|
|
353
|
-
|
|
354
|
-
# Heatmaps
|
|
355
|
-
if { [sc_cfg_tool_task_check_in_list placement_density var reports] } {
|
|
356
|
-
sc_image_placement_density
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
if { [sc_cfg_tool_task_check_in_list routing_congestion var reports] } {
|
|
360
|
-
sc_image_estimated_routing_congestion
|
|
361
|
-
sc_image_routing_congestion
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
if { [sc_cfg_tool_task_check_in_list power var reports] } {
|
|
365
|
-
if { [sc_cfg_tool_task_check_in_list power_density var reports] } {
|
|
366
|
-
sc_image_power_density
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
if { [sc_cfg_tool_task_check_in_list ir_drop var reports] } {
|
|
370
|
-
foreach net [sc_psm_check_nets] {
|
|
371
|
-
foreach corner $sc_scenarios {
|
|
372
|
-
sc_image_irdrop $net $corner
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
# Clocks
|
|
379
|
-
if { [sc_cfg_tool_task_check_in_list clock_placement var reports] } {
|
|
380
|
-
sc_image_clocks
|
|
381
|
-
}
|
|
382
|
-
if { [sc_cfg_tool_task_check_in_list clock_trees var reports] } {
|
|
383
|
-
sc_image_clocktree
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
# Optimizations
|
|
387
|
-
if { [sc_cfg_tool_task_check_in_list optimization_placement var reports] } {
|
|
388
|
-
sc_image_optimizer
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
# Restore
|
|
392
|
-
sc_image_clear_selection
|
|
393
|
-
gui::restore_display_controls
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
'''
|
|
2
|
-
Yosys is a framework for RTL synthesis that takes synthesizable
|
|
3
|
-
Verilog-2005 design and converts it to BLIF, EDIF, BTOR, SMT,
|
|
4
|
-
Verilog netlist etc. The tool supports logical synthesis and
|
|
5
|
-
tech mapping to ASIC standard cell libraries, FPGA architectures.
|
|
6
|
-
In addition it has built in formal methods for property and
|
|
7
|
-
equivalence checking.
|
|
8
|
-
|
|
9
|
-
Documentation: https://yosyshq.readthedocs.io/projects/yosys/en/latest/
|
|
10
|
-
|
|
11
|
-
Sources: https://github.com/YosysHQ/yosys
|
|
12
|
-
|
|
13
|
-
Installation: https://github.com/YosysHQ/yosys
|
|
14
|
-
'''
|
|
15
|
-
|
|
16
|
-
import re
|
|
17
|
-
import json
|
|
18
|
-
from siliconcompiler import sc_open
|
|
19
|
-
from siliconcompiler.tools._common import get_tool_task, record_metric
|
|
20
|
-
from siliconcompiler.targets import asap7_demo
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
######################################################################
|
|
24
|
-
# Make Docs
|
|
25
|
-
######################################################################
|
|
26
|
-
def make_docs(chip):
|
|
27
|
-
chip.use(asap7_demo)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
################################
|
|
31
|
-
# Setup Tool (pre executable)
|
|
32
|
-
################################
|
|
33
|
-
def setup(chip):
|
|
34
|
-
''' Tool specific function to run before step execution
|
|
35
|
-
'''
|
|
36
|
-
|
|
37
|
-
# If the 'lock' bit is set, don't reconfigure.
|
|
38
|
-
tool = 'yosys'
|
|
39
|
-
refdir = 'tools/' + tool
|
|
40
|
-
step = chip.get('arg', 'step')
|
|
41
|
-
index = chip.get('arg', 'index')
|
|
42
|
-
_, task = get_tool_task(chip, step, index)
|
|
43
|
-
|
|
44
|
-
# Standard Setup
|
|
45
|
-
chip.set('tool', tool, 'exe', 'yosys')
|
|
46
|
-
chip.set('tool', tool, 'vswitch', '--version')
|
|
47
|
-
chip.set('tool', tool, 'version', '>=0.41', clobber=False)
|
|
48
|
-
chip.set('tool', tool, 'format', 'tcl', clobber=False)
|
|
49
|
-
|
|
50
|
-
# Task Setup
|
|
51
|
-
# common to all
|
|
52
|
-
option = []
|
|
53
|
-
if chip.get('option', 'breakpoint', step=step, index=index):
|
|
54
|
-
option.append('-C')
|
|
55
|
-
option.append('-c')
|
|
56
|
-
chip.set('tool', tool, 'task', task, 'option', option, step=step, index=index, clobber=False)
|
|
57
|
-
chip.set('tool', tool, 'task', task, 'refdir', refdir, step=step, index=index,
|
|
58
|
-
package='siliconcompiler', clobber=False)
|
|
59
|
-
chip.set('tool', tool, 'task', task, 'regex', 'warnings', "Warning:",
|
|
60
|
-
step=step, index=index, clobber=False)
|
|
61
|
-
chip.set('tool', tool, 'task', task, 'regex', 'errors', "^ERROR",
|
|
62
|
-
step=step, index=index, clobber=False)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
################################
|
|
66
|
-
# Version Check
|
|
67
|
-
################################
|
|
68
|
-
def parse_version(stdout):
|
|
69
|
-
# Yosys 0.9+3672 (git sha1 014c7e26, gcc 7.5.0-3ubuntu1~18.04 -fPIC -Os)
|
|
70
|
-
return stdout.split()[1]
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
def normalize_version(version):
|
|
74
|
-
# Replace '+', which represents a "local version label", with '-', which is
|
|
75
|
-
# an "implicit post release number".
|
|
76
|
-
return version.replace('+', '-')
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
##################################################
|
|
102
|
-
def syn_post_process(chip):
|
|
103
|
-
''' Tool specific function to run after step execution
|
|
104
|
-
'''
|
|
105
|
-
|
|
106
|
-
step = chip.get('arg', 'step')
|
|
107
|
-
index = chip.get('arg', 'index')
|
|
108
|
-
|
|
109
|
-
with sc_open("reports/stat.json") as f:
|
|
110
|
-
metrics = json.load(f)
|
|
111
|
-
if "design" in metrics:
|
|
112
|
-
metrics = metrics["design"]
|
|
113
|
-
|
|
114
|
-
if "area" in metrics:
|
|
115
|
-
record_metric(chip, step, index, 'cellarea',
|
|
116
|
-
float(metrics["area"]),
|
|
117
|
-
"reports/stat.json",
|
|
118
|
-
source_unit='um^2')
|
|
119
|
-
if "num_cells" in metrics:
|
|
120
|
-
record_metric(chip, step, index, 'cells',
|
|
121
|
-
metrics["num_cells"],
|
|
122
|
-
"reports/stat.json")
|
|
123
|
-
if "num_wire_bits" in metrics:
|
|
124
|
-
record_metric(chip, step, index, 'nets',
|
|
125
|
-
metrics["num_wire_bits"],
|
|
126
|
-
"reports/stat.json")
|
|
127
|
-
if "num_port_bits" in metrics:
|
|
128
|
-
record_metric(chip, step, index, 'pins',
|
|
129
|
-
metrics["num_port_bits"],
|
|
130
|
-
"reports/stat.json")
|
|
131
|
-
|
|
132
|
-
registers = None
|
|
133
|
-
with sc_open(f"{step}.log") as f:
|
|
134
|
-
for line in f:
|
|
135
|
-
line_registers = re.findall(r"^\s*mapped ([0-9]+) \$_DFF.*", line)
|
|
136
|
-
if line_registers:
|
|
137
|
-
if registers is None:
|
|
138
|
-
registers = 0
|
|
139
|
-
registers += int(line_registers[0])
|
|
140
|
-
if registers is not None:
|
|
141
|
-
record_metric(chip, step, index, 'registers', registers, f"{step}.log")
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
##################################################
|
|
145
|
-
if __name__ == "__main__":
|
|
146
|
-
|
|
147
|
-
chip = make_docs()
|
|
148
|
-
chip.write_manifest("yosys.json")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|