siliconcompiler 0.26.5__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/__init__.py +24 -0
- siliconcompiler/__main__.py +12 -0
- siliconcompiler/_common.py +49 -0
- siliconcompiler/_metadata.py +36 -0
- siliconcompiler/apps/__init__.py +0 -0
- siliconcompiler/apps/_common.py +76 -0
- siliconcompiler/apps/sc.py +92 -0
- siliconcompiler/apps/sc_dashboard.py +94 -0
- siliconcompiler/apps/sc_issue.py +178 -0
- siliconcompiler/apps/sc_remote.py +199 -0
- siliconcompiler/apps/sc_server.py +39 -0
- siliconcompiler/apps/sc_show.py +142 -0
- siliconcompiler/apps/smake.py +232 -0
- siliconcompiler/checklists/__init__.py +0 -0
- siliconcompiler/checklists/oh_tapeout.py +41 -0
- siliconcompiler/core.py +3221 -0
- siliconcompiler/data/RobotoMono/LICENSE.txt +202 -0
- siliconcompiler/data/RobotoMono/RobotoMono-Regular.ttf +0 -0
- siliconcompiler/data/heartbeat.v +18 -0
- siliconcompiler/data/logo.png +0 -0
- siliconcompiler/flowgraph.py +570 -0
- siliconcompiler/flows/__init__.py +0 -0
- siliconcompiler/flows/_common.py +67 -0
- siliconcompiler/flows/asicflow.py +180 -0
- siliconcompiler/flows/asictopflow.py +38 -0
- siliconcompiler/flows/dvflow.py +86 -0
- siliconcompiler/flows/fpgaflow.py +202 -0
- siliconcompiler/flows/generate_openroad_rcx.py +66 -0
- siliconcompiler/flows/lintflow.py +35 -0
- siliconcompiler/flows/screenshotflow.py +51 -0
- siliconcompiler/flows/showflow.py +59 -0
- siliconcompiler/flows/signoffflow.py +53 -0
- siliconcompiler/flows/synflow.py +128 -0
- siliconcompiler/fpgas/__init__.py +0 -0
- siliconcompiler/fpgas/lattice_ice40.py +42 -0
- siliconcompiler/fpgas/vpr_example.py +109 -0
- siliconcompiler/issue.py +300 -0
- siliconcompiler/libs/__init__.py +0 -0
- siliconcompiler/libs/asap7sc7p5t.py +8 -0
- siliconcompiler/libs/gf180mcu.py +8 -0
- siliconcompiler/libs/nangate45.py +8 -0
- siliconcompiler/libs/sky130hd.py +8 -0
- siliconcompiler/libs/sky130io.py +8 -0
- siliconcompiler/package.py +412 -0
- siliconcompiler/pdks/__init__.py +0 -0
- siliconcompiler/pdks/asap7.py +8 -0
- siliconcompiler/pdks/freepdk45.py +8 -0
- siliconcompiler/pdks/gf180.py +8 -0
- siliconcompiler/pdks/skywater130.py +8 -0
- siliconcompiler/remote/__init__.py +36 -0
- siliconcompiler/remote/client.py +891 -0
- siliconcompiler/remote/schema.py +106 -0
- siliconcompiler/remote/server.py +507 -0
- siliconcompiler/remote/server_schema/requests/cancel_job.json +51 -0
- siliconcompiler/remote/server_schema/requests/check_progress.json +61 -0
- siliconcompiler/remote/server_schema/requests/check_server.json +38 -0
- siliconcompiler/remote/server_schema/requests/delete_job.json +51 -0
- siliconcompiler/remote/server_schema/requests/get_results.json +48 -0
- siliconcompiler/remote/server_schema/requests/remote_run.json +40 -0
- siliconcompiler/remote/server_schema/responses/cancel_job.json +18 -0
- siliconcompiler/remote/server_schema/responses/check_progress.json +30 -0
- siliconcompiler/remote/server_schema/responses/check_server.json +32 -0
- siliconcompiler/remote/server_schema/responses/delete_job.json +18 -0
- siliconcompiler/remote/server_schema/responses/get_results.json +21 -0
- siliconcompiler/remote/server_schema/responses/remote_run.json +25 -0
- siliconcompiler/report/__init__.py +13 -0
- siliconcompiler/report/html_report.py +74 -0
- siliconcompiler/report/report.py +355 -0
- siliconcompiler/report/streamlit_report.py +137 -0
- siliconcompiler/report/streamlit_viewer.py +944 -0
- siliconcompiler/report/summary_image.py +117 -0
- siliconcompiler/report/summary_table.py +105 -0
- siliconcompiler/report/utils.py +163 -0
- siliconcompiler/scheduler/__init__.py +2092 -0
- siliconcompiler/scheduler/docker_runner.py +253 -0
- siliconcompiler/scheduler/run_node.py +138 -0
- siliconcompiler/scheduler/send_messages.py +178 -0
- siliconcompiler/scheduler/slurm.py +208 -0
- siliconcompiler/scheduler/validation/email_credentials.json +54 -0
- siliconcompiler/schema/__init__.py +7 -0
- siliconcompiler/schema/schema_cfg.py +4014 -0
- siliconcompiler/schema/schema_obj.py +1841 -0
- siliconcompiler/schema/utils.py +93 -0
- siliconcompiler/sphinx_ext/__init__.py +0 -0
- siliconcompiler/sphinx_ext/dynamicgen.py +1006 -0
- siliconcompiler/sphinx_ext/schemagen.py +221 -0
- siliconcompiler/sphinx_ext/utils.py +166 -0
- siliconcompiler/targets/__init__.py +0 -0
- siliconcompiler/targets/asap7_demo.py +68 -0
- siliconcompiler/targets/asic_demo.py +38 -0
- siliconcompiler/targets/fpgaflow_demo.py +47 -0
- siliconcompiler/targets/freepdk45_demo.py +59 -0
- siliconcompiler/targets/gf180_demo.py +77 -0
- siliconcompiler/targets/skywater130_demo.py +70 -0
- siliconcompiler/templates/email/general.j2 +66 -0
- siliconcompiler/templates/email/summary.j2 +43 -0
- siliconcompiler/templates/issue/README.txt +26 -0
- siliconcompiler/templates/issue/run.sh +6 -0
- siliconcompiler/templates/report/bootstrap.min.css +7 -0
- siliconcompiler/templates/report/bootstrap.min.js +7 -0
- siliconcompiler/templates/report/bootstrap_LICENSE.md +24 -0
- siliconcompiler/templates/report/sc_report.j2 +427 -0
- siliconcompiler/templates/slurm/run.sh +9 -0
- siliconcompiler/templates/tcl/manifest.tcl.j2 +137 -0
- siliconcompiler/tools/__init__.py +0 -0
- siliconcompiler/tools/_common/__init__.py +432 -0
- siliconcompiler/tools/_common/asic.py +115 -0
- siliconcompiler/tools/_common/sdc/sc_constraints.sdc +76 -0
- siliconcompiler/tools/_common/tcl/sc_pin_constraints.tcl +63 -0
- siliconcompiler/tools/bambu/bambu.py +32 -0
- siliconcompiler/tools/bambu/convert.py +77 -0
- siliconcompiler/tools/bluespec/bluespec.py +40 -0
- siliconcompiler/tools/bluespec/convert.py +103 -0
- siliconcompiler/tools/builtin/_common.py +155 -0
- siliconcompiler/tools/builtin/builtin.py +26 -0
- siliconcompiler/tools/builtin/concatenate.py +85 -0
- siliconcompiler/tools/builtin/join.py +27 -0
- siliconcompiler/tools/builtin/maximum.py +46 -0
- siliconcompiler/tools/builtin/minimum.py +57 -0
- siliconcompiler/tools/builtin/mux.py +70 -0
- siliconcompiler/tools/builtin/nop.py +38 -0
- siliconcompiler/tools/builtin/verify.py +83 -0
- siliconcompiler/tools/chisel/SCDriver.scala +10 -0
- siliconcompiler/tools/chisel/build.sbt +27 -0
- siliconcompiler/tools/chisel/chisel.py +37 -0
- siliconcompiler/tools/chisel/convert.py +140 -0
- siliconcompiler/tools/execute/exec_input.py +41 -0
- siliconcompiler/tools/execute/execute.py +17 -0
- siliconcompiler/tools/genfasm/bitstream.py +61 -0
- siliconcompiler/tools/genfasm/genfasm.py +40 -0
- siliconcompiler/tools/ghdl/convert.py +87 -0
- siliconcompiler/tools/ghdl/ghdl.py +41 -0
- siliconcompiler/tools/icarus/compile.py +87 -0
- siliconcompiler/tools/icarus/icarus.py +36 -0
- siliconcompiler/tools/icepack/bitstream.py +20 -0
- siliconcompiler/tools/icepack/icepack.py +43 -0
- siliconcompiler/tools/klayout/export.py +117 -0
- siliconcompiler/tools/klayout/klayout.py +119 -0
- siliconcompiler/tools/klayout/klayout_export.py +205 -0
- siliconcompiler/tools/klayout/klayout_operations.py +363 -0
- siliconcompiler/tools/klayout/klayout_show.py +242 -0
- siliconcompiler/tools/klayout/klayout_utils.py +176 -0
- siliconcompiler/tools/klayout/operations.py +194 -0
- siliconcompiler/tools/klayout/screenshot.py +98 -0
- siliconcompiler/tools/klayout/show.py +101 -0
- siliconcompiler/tools/magic/drc.py +49 -0
- siliconcompiler/tools/magic/extspice.py +19 -0
- siliconcompiler/tools/magic/magic.py +85 -0
- siliconcompiler/tools/magic/sc_drc.tcl +96 -0
- siliconcompiler/tools/magic/sc_extspice.tcl +54 -0
- siliconcompiler/tools/magic/sc_magic.tcl +47 -0
- siliconcompiler/tools/montage/montage.py +30 -0
- siliconcompiler/tools/montage/tile.py +66 -0
- siliconcompiler/tools/netgen/count_lvs.py +132 -0
- siliconcompiler/tools/netgen/lvs.py +90 -0
- siliconcompiler/tools/netgen/netgen.py +36 -0
- siliconcompiler/tools/netgen/sc_lvs.tcl +46 -0
- siliconcompiler/tools/nextpnr/apr.py +24 -0
- siliconcompiler/tools/nextpnr/nextpnr.py +59 -0
- siliconcompiler/tools/openfpgaloader/openfpgaloader.py +39 -0
- siliconcompiler/tools/openroad/__init__.py +0 -0
- siliconcompiler/tools/openroad/cts.py +45 -0
- siliconcompiler/tools/openroad/dfm.py +66 -0
- siliconcompiler/tools/openroad/export.py +131 -0
- siliconcompiler/tools/openroad/floorplan.py +70 -0
- siliconcompiler/tools/openroad/openroad.py +977 -0
- siliconcompiler/tools/openroad/physyn.py +27 -0
- siliconcompiler/tools/openroad/place.py +41 -0
- siliconcompiler/tools/openroad/rcx_bench.py +95 -0
- siliconcompiler/tools/openroad/rcx_extract.py +34 -0
- siliconcompiler/tools/openroad/route.py +45 -0
- siliconcompiler/tools/openroad/screenshot.py +60 -0
- siliconcompiler/tools/openroad/scripts/sc_apr.tcl +499 -0
- siliconcompiler/tools/openroad/scripts/sc_cts.tcl +64 -0
- siliconcompiler/tools/openroad/scripts/sc_dfm.tcl +20 -0
- siliconcompiler/tools/openroad/scripts/sc_export.tcl +98 -0
- siliconcompiler/tools/openroad/scripts/sc_floorplan.tcl +413 -0
- siliconcompiler/tools/openroad/scripts/sc_metrics.tcl +158 -0
- siliconcompiler/tools/openroad/scripts/sc_physyn.tcl +7 -0
- siliconcompiler/tools/openroad/scripts/sc_place.tcl +84 -0
- siliconcompiler/tools/openroad/scripts/sc_procs.tcl +423 -0
- siliconcompiler/tools/openroad/scripts/sc_rcx.tcl +63 -0
- siliconcompiler/tools/openroad/scripts/sc_rcx_bench.tcl +20 -0
- siliconcompiler/tools/openroad/scripts/sc_rcx_extract.tcl +12 -0
- siliconcompiler/tools/openroad/scripts/sc_route.tcl +133 -0
- siliconcompiler/tools/openroad/scripts/sc_screenshot.tcl +21 -0
- siliconcompiler/tools/openroad/scripts/sc_write.tcl +5 -0
- siliconcompiler/tools/openroad/scripts/sc_write_images.tcl +361 -0
- siliconcompiler/tools/openroad/show.py +94 -0
- siliconcompiler/tools/openroad/templates/pex.tcl +8 -0
- siliconcompiler/tools/opensta/__init__.py +101 -0
- siliconcompiler/tools/opensta/report_libraries.py +28 -0
- siliconcompiler/tools/opensta/scripts/sc_procs.tcl +47 -0
- siliconcompiler/tools/opensta/scripts/sc_report_libraries.tcl +74 -0
- siliconcompiler/tools/opensta/scripts/sc_timing.tcl +268 -0
- siliconcompiler/tools/opensta/timing.py +214 -0
- siliconcompiler/tools/slang/__init__.py +49 -0
- siliconcompiler/tools/slang/lint.py +101 -0
- siliconcompiler/tools/surelog/__init__.py +123 -0
- siliconcompiler/tools/surelog/parse.py +183 -0
- siliconcompiler/tools/surelog/templates/output.v +7 -0
- siliconcompiler/tools/sv2v/convert.py +46 -0
- siliconcompiler/tools/sv2v/sv2v.py +37 -0
- siliconcompiler/tools/template/template.py +125 -0
- siliconcompiler/tools/verilator/compile.py +139 -0
- siliconcompiler/tools/verilator/lint.py +19 -0
- siliconcompiler/tools/verilator/parse.py +27 -0
- siliconcompiler/tools/verilator/verilator.py +172 -0
- siliconcompiler/tools/vivado/__init__.py +7 -0
- siliconcompiler/tools/vivado/bitstream.py +21 -0
- siliconcompiler/tools/vivado/place.py +21 -0
- siliconcompiler/tools/vivado/route.py +21 -0
- siliconcompiler/tools/vivado/scripts/sc_bitstream.tcl +6 -0
- siliconcompiler/tools/vivado/scripts/sc_place.tcl +2 -0
- siliconcompiler/tools/vivado/scripts/sc_route.tcl +4 -0
- siliconcompiler/tools/vivado/scripts/sc_run.tcl +45 -0
- siliconcompiler/tools/vivado/scripts/sc_syn_fpga.tcl +25 -0
- siliconcompiler/tools/vivado/syn_fpga.py +20 -0
- siliconcompiler/tools/vivado/vivado.py +147 -0
- siliconcompiler/tools/vpr/_json_constraint.py +63 -0
- siliconcompiler/tools/vpr/_xml_constraint.py +109 -0
- siliconcompiler/tools/vpr/place.py +137 -0
- siliconcompiler/tools/vpr/route.py +124 -0
- siliconcompiler/tools/vpr/screenshot.py +54 -0
- siliconcompiler/tools/vpr/show.py +88 -0
- siliconcompiler/tools/vpr/vpr.py +357 -0
- siliconcompiler/tools/xyce/xyce.py +36 -0
- siliconcompiler/tools/yosys/lec.py +56 -0
- siliconcompiler/tools/yosys/prepareLib.py +59 -0
- siliconcompiler/tools/yosys/sc_lec.tcl +84 -0
- siliconcompiler/tools/yosys/sc_syn.tcl +79 -0
- siliconcompiler/tools/yosys/syn_asic.py +565 -0
- siliconcompiler/tools/yosys/syn_asic.tcl +377 -0
- siliconcompiler/tools/yosys/syn_asic_fpga_shared.tcl +31 -0
- siliconcompiler/tools/yosys/syn_fpga.py +146 -0
- siliconcompiler/tools/yosys/syn_fpga.tcl +233 -0
- siliconcompiler/tools/yosys/syn_strategies.tcl +81 -0
- siliconcompiler/tools/yosys/techmaps/lcu_kogge_stone.v +39 -0
- siliconcompiler/tools/yosys/templates/abc.const +2 -0
- siliconcompiler/tools/yosys/yosys.py +147 -0
- siliconcompiler/units.py +259 -0
- siliconcompiler/use.py +177 -0
- siliconcompiler/utils/__init__.py +423 -0
- siliconcompiler/utils/asic.py +158 -0
- siliconcompiler/utils/showtools.py +25 -0
- siliconcompiler-0.26.5.dist-info/LICENSE +190 -0
- siliconcompiler-0.26.5.dist-info/METADATA +195 -0
- siliconcompiler-0.26.5.dist-info/RECORD +251 -0
- siliconcompiler-0.26.5.dist-info/WHEEL +5 -0
- siliconcompiler-0.26.5.dist-info/entry_points.txt +12 -0
- siliconcompiler-0.26.5.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,361 @@
|
|
|
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 } err
|
|
165
|
+
unsuppress_message GRT 10
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
proc sc_image_power_density {} {
|
|
169
|
+
if { ![sc_has_placed_instances] } {
|
|
170
|
+
return
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
sc_image_setup_default
|
|
174
|
+
|
|
175
|
+
file mkdir reports/images/heatmap/power_density
|
|
176
|
+
|
|
177
|
+
foreach corner [sta::corners] {
|
|
178
|
+
set corner_name [$corner name]
|
|
179
|
+
|
|
180
|
+
gui::set_heatmap Power Corner $corner_name
|
|
181
|
+
gui::set_heatmap Power rebuild
|
|
182
|
+
|
|
183
|
+
sc_image_heatmap "Power Density" \
|
|
184
|
+
"Power" \
|
|
185
|
+
"power_density/${corner_name}.png" \
|
|
186
|
+
"power density for $corner_name"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
proc sc_image_placement_density {} {
|
|
191
|
+
if { ![sc_has_placed_instances] } {
|
|
192
|
+
return
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
sc_image_setup_default
|
|
196
|
+
|
|
197
|
+
sc_image_heatmap "Placement Density" \
|
|
198
|
+
"Placement" \
|
|
199
|
+
"placement_density.png" \
|
|
200
|
+
"placement density"
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
proc sc_image_clocks {} {
|
|
204
|
+
if { ![sc_has_placed_instances] } {
|
|
205
|
+
return
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
global sc_design
|
|
209
|
+
sc_image_setup_default
|
|
210
|
+
|
|
211
|
+
# The clock view: all clock nets and buffers
|
|
212
|
+
gui::set_display_controls "Layers/*" visible true
|
|
213
|
+
gui::set_display_controls "Nets/*" visible false
|
|
214
|
+
gui::set_display_controls "Nets/Clock" visible true
|
|
215
|
+
gui::set_display_controls "Instances/*" visible false
|
|
216
|
+
gui::set_display_controls "Instances/StdCells/Clock tree/*" visible true
|
|
217
|
+
if { [select -name "clk*" -type Inst] == 0 } {
|
|
218
|
+
# Nothing selected
|
|
219
|
+
return
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
sc_save_image "clocks" reports/images/${sc_design}.clocks.png
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
proc sc_image_clocktree {} {
|
|
226
|
+
gui::show_widget "Clock Tree Viewer"
|
|
227
|
+
global sc_scenarios
|
|
228
|
+
|
|
229
|
+
set clock_state []
|
|
230
|
+
foreach clock [all_clocks] {
|
|
231
|
+
lappend clock_state $clock [$clock is_propagated]
|
|
232
|
+
}
|
|
233
|
+
set_propagated_clock [all_clocks]
|
|
234
|
+
|
|
235
|
+
foreach clock [get_clocks *] {
|
|
236
|
+
if { [llength [get_property $clock sources]] == 0 } {
|
|
237
|
+
# Skip virtual clocks
|
|
238
|
+
continue
|
|
239
|
+
}
|
|
240
|
+
file mkdir reports/images/clocktree
|
|
241
|
+
|
|
242
|
+
set clock_name [get_name $clock]
|
|
243
|
+
foreach corner $sc_scenarios {
|
|
244
|
+
set path reports/images/clocktree/${clock_name}.${corner}.png
|
|
245
|
+
utl::info FLW 1 "Saving $clock_name clock tree for $corner in $path"
|
|
246
|
+
save_clocktree_image $path \
|
|
247
|
+
-clock $clock_name \
|
|
248
|
+
-width 1024 \
|
|
249
|
+
-height 1024 \
|
|
250
|
+
-corner $corner
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
foreach {clock state} $clock_state {
|
|
255
|
+
if { $state } {
|
|
256
|
+
set_propagated_clock $clock
|
|
257
|
+
} else {
|
|
258
|
+
unset_propagated_clock $clock
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
gui::hide_widget "Clock Tree Viewer"
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
proc sc_image_optimizer {} {
|
|
266
|
+
global sc_design
|
|
267
|
+
sc_image_setup_default
|
|
268
|
+
|
|
269
|
+
# The resizer view: all instances created by the resizer grouped
|
|
270
|
+
gui::set_display_controls "Layers/*" visible false
|
|
271
|
+
gui::set_display_controls "Instances/*" visible true
|
|
272
|
+
gui::set_display_controls "Instances/Physical/*" visible false
|
|
273
|
+
|
|
274
|
+
set hold_count [select -name "hold*" -type Inst -highlight 0] ;# green
|
|
275
|
+
set input_count [select -name "input*" -type Inst -highlight 1] ;# yellow
|
|
276
|
+
set output_count [select -name "output*" -type Inst -highlight 1]
|
|
277
|
+
set repeater_count [select -name "repeater*" -type Inst -highlight 3] ;# magenta
|
|
278
|
+
set fanout_count [select -name "fanout*" -type Inst -highlight 3]
|
|
279
|
+
set load_slew_count [select -name "load_slew*" -type Inst -highlight 3]
|
|
280
|
+
set max_cap_count [select -name "max_cap*" -type Inst -highlight 3]
|
|
281
|
+
set max_length_count [select -name "max_length*" -type Inst -highlight 3]
|
|
282
|
+
set wire_count [select -name "wire*" -type Inst -highlight 3]
|
|
283
|
+
set rebuffer_count [select -name "rebuffer*" -type Inst -highlight 4] ;# red
|
|
284
|
+
set split_count [select -name "split*" -type Inst -highlight 5] ;# dark green
|
|
285
|
+
|
|
286
|
+
set select_count [expr { \
|
|
287
|
+
$hold_count + \
|
|
288
|
+
$input_count + \
|
|
289
|
+
$output_count + \
|
|
290
|
+
$repeater_count + \
|
|
291
|
+
$fanout_count + \
|
|
292
|
+
$load_slew_count + \
|
|
293
|
+
$max_cap_count + \
|
|
294
|
+
$max_length_count + \
|
|
295
|
+
$wire_count + \
|
|
296
|
+
$rebuffer_count + \
|
|
297
|
+
$split_count }]
|
|
298
|
+
|
|
299
|
+
if { $select_count == 0 } {
|
|
300
|
+
# Nothing selected
|
|
301
|
+
return
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
sc_save_image "optimizer" reports/images/${sc_design}.optimizer.png
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
# Setup
|
|
308
|
+
file mkdir reports/images
|
|
309
|
+
gui::save_display_controls
|
|
310
|
+
sc_image_setup_default
|
|
311
|
+
|
|
312
|
+
if { [file exists reports/${sc_design}_drc.rpt] } {
|
|
313
|
+
# Show the drc markers (if any)
|
|
314
|
+
gui::load_drc reports/${sc_design}_drc.rpt
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
# General images
|
|
318
|
+
sc_image_everything
|
|
319
|
+
sc_image_placement
|
|
320
|
+
sc_image_routing
|
|
321
|
+
|
|
322
|
+
# Heatmaps
|
|
323
|
+
if { [sc_cfg_tool_task_check_in_list placement_density var reports] } {
|
|
324
|
+
sc_image_placement_density
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
if { [sc_cfg_tool_task_check_in_list routing_congestion var reports] } {
|
|
328
|
+
sc_image_estimated_routing_congestion
|
|
329
|
+
sc_image_routing_congestion
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
if { [sc_cfg_tool_task_check_in_list power var reports] } {
|
|
333
|
+
if { [sc_cfg_tool_task_check_in_list power_density var reports] } {
|
|
334
|
+
sc_image_power_density
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
if { [sc_cfg_tool_task_check_in_list ir_drop var reports] } {
|
|
338
|
+
foreach net [sc_psm_check_nets] {
|
|
339
|
+
foreach corner $sc_scenarios {
|
|
340
|
+
sc_image_irdrop $net $corner
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
# Clocks
|
|
347
|
+
if { [sc_cfg_tool_task_check_in_list clock_placement var reports] } {
|
|
348
|
+
sc_image_clocks
|
|
349
|
+
}
|
|
350
|
+
if { [sc_cfg_tool_task_check_in_list clock_trees var reports] } {
|
|
351
|
+
sc_image_clocktree
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
# Optimizations
|
|
355
|
+
if { [sc_cfg_tool_task_check_in_list optimization_placement var reports] } {
|
|
356
|
+
sc_image_optimizer
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
# Restore
|
|
360
|
+
sc_image_clear_selection
|
|
361
|
+
gui::restore_display_controls
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import shutil
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
from siliconcompiler.tools.openroad import openroad
|
|
5
|
+
from siliconcompiler.tools.openroad.openroad import setup as setup_tool
|
|
6
|
+
from siliconcompiler.tools.openroad.openroad import build_pex_corners
|
|
7
|
+
from siliconcompiler.tools.openroad.openroad import pre_process as or_pre_process
|
|
8
|
+
from siliconcompiler.tools._common import find_incoming_ext, input_provides, get_tool_task
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
####################################################################
|
|
12
|
+
# Make Docs
|
|
13
|
+
####################################################################
|
|
14
|
+
def make_docs(chip):
|
|
15
|
+
openroad.make_docs(chip)
|
|
16
|
+
chip.set('tool', 'openroad', 'task', 'show', 'var', 'show_filepath', '<path>')
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def setup(chip):
|
|
20
|
+
'''
|
|
21
|
+
Show a design in openroad
|
|
22
|
+
'''
|
|
23
|
+
|
|
24
|
+
# Generic tool setup.
|
|
25
|
+
setup_tool(chip)
|
|
26
|
+
|
|
27
|
+
generic_show_setup(chip, 'show', False)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def generic_show_setup(chip, task, exit):
|
|
31
|
+
tool = 'openroad'
|
|
32
|
+
design = chip.top()
|
|
33
|
+
step = chip.get('arg', 'step')
|
|
34
|
+
index = chip.get('arg', 'index')
|
|
35
|
+
|
|
36
|
+
option = "-no_init -gui"
|
|
37
|
+
|
|
38
|
+
chip.set('tool', tool, 'task', task, 'var', 'show_exit', "true" if exit else "false",
|
|
39
|
+
step=step, index=index, clobber=False)
|
|
40
|
+
if chip.valid('tool', tool, 'task', task, 'var', 'show_filepath'):
|
|
41
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
42
|
+
",".join(['tool', tool, 'task', task, 'var', 'show_filepath']),
|
|
43
|
+
step=step, index=index)
|
|
44
|
+
else:
|
|
45
|
+
incoming_ext = find_incoming_ext(chip, ('odb', 'def'), 'def')
|
|
46
|
+
chip.set('tool', tool, 'task', task, 'var', 'show_filetype', incoming_ext,
|
|
47
|
+
step=step, index=index)
|
|
48
|
+
chip.add('tool', tool, 'task', task, 'input', f'{design}.{incoming_ext}',
|
|
49
|
+
step=step, index=index)
|
|
50
|
+
if f'{design}.sdc' in input_provides(chip, step, index):
|
|
51
|
+
chip.add('tool', tool, 'task', task, 'input', f'{design}.sdc',
|
|
52
|
+
step=step, index=index)
|
|
53
|
+
|
|
54
|
+
# Add to option string.
|
|
55
|
+
cur_options = ' '.join(chip.get('tool', tool, 'task', task, 'option', step=step, index=index))
|
|
56
|
+
new_options = f'{cur_options} {option}'
|
|
57
|
+
chip.set('tool', tool, 'task', task, 'option', new_options,
|
|
58
|
+
step=step, index=index, clobber=True)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def pre_process(chip):
|
|
62
|
+
or_pre_process(chip)
|
|
63
|
+
copy_show_files(chip)
|
|
64
|
+
build_pex_corners(chip)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def copy_show_files(chip):
|
|
68
|
+
|
|
69
|
+
tool = 'openroad'
|
|
70
|
+
step = chip.get('arg', 'step')
|
|
71
|
+
index = chip.get('arg', 'index')
|
|
72
|
+
_, task = get_tool_task(chip, step, index)
|
|
73
|
+
|
|
74
|
+
if chip.valid('tool', tool, 'task', task, 'var', 'show_filepath'):
|
|
75
|
+
show_file = chip.get('tool', tool, 'task', task, 'var', 'show_filepath',
|
|
76
|
+
step=step, index=index)[0]
|
|
77
|
+
show_type = chip.get('tool', tool, 'task', task, 'var', 'show_filetype',
|
|
78
|
+
step=step, index=index)[0]
|
|
79
|
+
show_job = chip.get('tool', tool, 'task', task, 'var', 'show_job',
|
|
80
|
+
step=step, index=index)
|
|
81
|
+
show_step = chip.get('tool', tool, 'task', task, 'var', 'show_step',
|
|
82
|
+
step=step, index=index)
|
|
83
|
+
show_index = chip.get('tool', tool, 'task', task, 'var', 'show_index',
|
|
84
|
+
step=step, index=index)
|
|
85
|
+
|
|
86
|
+
# copy source in to keep sc_apr.tcl simple
|
|
87
|
+
dst_file = f"inputs/{chip.top()}.{show_type}"
|
|
88
|
+
shutil.copy2(show_file, dst_file)
|
|
89
|
+
if show_job and show_step and show_index:
|
|
90
|
+
sdc_file = chip.find_result('sdc', show_step[0],
|
|
91
|
+
jobname=show_job[0],
|
|
92
|
+
index=show_index[0])
|
|
93
|
+
if sdc_file and os.path.exists(sdc_file):
|
|
94
|
+
shutil.copy2(sdc_file, f"inputs/{chip.top()}.sdc")
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
################################################################
|
|
2
|
+
# Constraint "{{ constraint }}" -> PEX corner "{{ pexcorner }}"
|
|
3
|
+
# Source file: {{ source }}
|
|
4
|
+
################################################################
|
|
5
|
+
|
|
6
|
+
{{ pex }}
|
|
7
|
+
|
|
8
|
+
################################################################
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'''
|
|
2
|
+
OpenSTA is a gate level static timing verifier.
|
|
3
|
+
|
|
4
|
+
Documentation: https://github.com/The-OpenROAD-Project/OpenSTA/blob/master/doc/OpenSTA.pdf
|
|
5
|
+
|
|
6
|
+
Sources: https://github.com/The-OpenROAD-Project/OpenSTA
|
|
7
|
+
|
|
8
|
+
Installation: https://github.com/The-OpenROAD-Project/OpenSTA (also installed with OpenROAD)
|
|
9
|
+
'''
|
|
10
|
+
|
|
11
|
+
import os
|
|
12
|
+
from siliconcompiler.tools.openroad.openroad import get_library_timing_keypaths
|
|
13
|
+
from siliconcompiler.tools._common import get_tool_task
|
|
14
|
+
from siliconcompiler.tools._common.asic import get_libraries
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
####################################################################
|
|
18
|
+
# Make Docs
|
|
19
|
+
####################################################################
|
|
20
|
+
def make_docs(chip):
|
|
21
|
+
chip.load_target("asap7_demo")
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
################################
|
|
25
|
+
# Setup Tool (pre executable)
|
|
26
|
+
################################
|
|
27
|
+
def setup(chip):
|
|
28
|
+
step = chip.get('arg', 'step')
|
|
29
|
+
index = chip.get('arg', 'index')
|
|
30
|
+
tool, task = get_tool_task(chip, step, index)
|
|
31
|
+
|
|
32
|
+
chip.set('tool', tool, 'exe', 'sta')
|
|
33
|
+
chip.set('tool', tool, 'vswitch', '-version')
|
|
34
|
+
chip.set('tool', tool, 'version', '>=v2.5.0', clobber=False)
|
|
35
|
+
chip.set('tool', tool, 'format', 'tcl')
|
|
36
|
+
|
|
37
|
+
targetlibs = get_libraries(chip, 'logic')
|
|
38
|
+
macrolibs = get_libraries(chip, 'macro')
|
|
39
|
+
delaymodel = chip.get('asic', 'delaymodel', step=step, index=index)
|
|
40
|
+
|
|
41
|
+
# Input/Output requirements for default asicflow steps
|
|
42
|
+
chip.set('tool', tool, 'task', task, 'refdir', 'tools/opensta/scripts',
|
|
43
|
+
step=step, index=index,
|
|
44
|
+
package='siliconcompiler', clobber=False)
|
|
45
|
+
chip.set('tool', tool, 'task', task, 'threads', os.cpu_count(),
|
|
46
|
+
step=step, index=index, clobber=False)
|
|
47
|
+
|
|
48
|
+
if delaymodel != 'nldm':
|
|
49
|
+
chip.logger.error(f'{delaymodel} delay model is not supported by {tool}, only nldm')
|
|
50
|
+
|
|
51
|
+
if targetlibs:
|
|
52
|
+
# Note: only one footprint supported in mainlib
|
|
53
|
+
chip.add('tool', tool, 'task', task, 'require',
|
|
54
|
+
",".join(['asic', 'logiclib']),
|
|
55
|
+
step=step, index=index)
|
|
56
|
+
|
|
57
|
+
for lib in targetlibs:
|
|
58
|
+
for timing_key in get_library_timing_keypaths(chip, lib).values():
|
|
59
|
+
chip.add('tool', tool, 'task', task, 'require', ",".join(timing_key),
|
|
60
|
+
step=step, index=index)
|
|
61
|
+
for lib in macrolibs:
|
|
62
|
+
for timing_key in get_library_timing_keypaths(chip, lib).values():
|
|
63
|
+
if chip.valid(*timing_key):
|
|
64
|
+
chip.add('tool', tool, 'task', task, 'require', ",".join(timing_key),
|
|
65
|
+
step=step, index=index)
|
|
66
|
+
else:
|
|
67
|
+
chip.error('logiclib parameters required for OpenSTA.')
|
|
68
|
+
|
|
69
|
+
# basic warning and error grep check on logfile
|
|
70
|
+
chip.set('tool', tool, 'task', task, 'regex', 'warnings', r'^\[WARNING|^Warning',
|
|
71
|
+
step=step, index=index, clobber=False)
|
|
72
|
+
chip.set('tool', tool, 'task', task, 'regex', 'errors', r'^\[ERROR',
|
|
73
|
+
step=step, index=index, clobber=False)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
################################
|
|
77
|
+
# Version Check
|
|
78
|
+
################################
|
|
79
|
+
def parse_version(stdout):
|
|
80
|
+
return stdout.strip()
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
################################
|
|
84
|
+
# Runtime options
|
|
85
|
+
################################
|
|
86
|
+
def runtime_options(chip):
|
|
87
|
+
step = chip.get('arg', 'step')
|
|
88
|
+
index = chip.get('arg', 'index')
|
|
89
|
+
|
|
90
|
+
# exit automatically in batch mode and not breakpoint
|
|
91
|
+
option = []
|
|
92
|
+
if not chip.get('option', 'breakpoint', step=step, index=index):
|
|
93
|
+
option.append("-exit")
|
|
94
|
+
|
|
95
|
+
tool, task = get_tool_task(chip, step, index)
|
|
96
|
+
option.extend([
|
|
97
|
+
'-threads',
|
|
98
|
+
str(chip.get('tool', tool, 'task', task, 'threads', step=step, index=index))
|
|
99
|
+
])
|
|
100
|
+
|
|
101
|
+
return option
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from siliconcompiler.tools.opensta import setup as tool_setup
|
|
3
|
+
from siliconcompiler.tools.opensta import runtime_options as tool_runtime_options
|
|
4
|
+
from siliconcompiler.tools._common import get_tool_task
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def setup(chip):
|
|
8
|
+
'''
|
|
9
|
+
Report information about the timing libraries.
|
|
10
|
+
'''
|
|
11
|
+
step = chip.get('arg', 'step')
|
|
12
|
+
index = chip.get('arg', 'index')
|
|
13
|
+
tool, task = get_tool_task(chip, step, index)
|
|
14
|
+
|
|
15
|
+
tool_setup(chip)
|
|
16
|
+
|
|
17
|
+
chip.set('tool', tool, 'task', task, 'script', 'sc_report_libraries.tcl',
|
|
18
|
+
step=step, index=index, clobber=False)
|
|
19
|
+
|
|
20
|
+
chip.set('tool', tool, 'task', task, 'threads', os.cpu_count(),
|
|
21
|
+
step=step, index=index)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
################################
|
|
25
|
+
# Runtime options
|
|
26
|
+
################################
|
|
27
|
+
def runtime_options(chip):
|
|
28
|
+
return tool_runtime_options(chip)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
###########################
|
|
3
|
+
# Count the logic depth of the critical path
|
|
4
|
+
###########################
|
|
5
|
+
|
|
6
|
+
proc sc_count_logic_depth {} {
|
|
7
|
+
set count 0
|
|
8
|
+
set paths [find_timing_paths -sort_by_slack]
|
|
9
|
+
if { [llength $paths] == 0 } {
|
|
10
|
+
return 0
|
|
11
|
+
}
|
|
12
|
+
set path_ref [[lindex $paths 0] path]
|
|
13
|
+
set pins [$path_ref pins]
|
|
14
|
+
foreach pin $pins {
|
|
15
|
+
if { [$pin is_driver] } {
|
|
16
|
+
incr count
|
|
17
|
+
}
|
|
18
|
+
set vertex [lindex [$pin vertices] 0]
|
|
19
|
+
# Stop at clock vertex
|
|
20
|
+
if { [$vertex is_clock] } {
|
|
21
|
+
break
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
# Subtract 1 to account for initial launch
|
|
25
|
+
return [expr { $count - 1 }]
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
proc sc_design_area {} {
|
|
29
|
+
set area 0
|
|
30
|
+
foreach inst [get_cells -hierarchical *] {
|
|
31
|
+
set lib_cell [$inst liberty_cell]
|
|
32
|
+
if { $lib_cell != "NULL" } {
|
|
33
|
+
set area [expr { $area + [get_property $lib_cell area] }]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return $area
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
proc sc_display_report {report} {
|
|
40
|
+
if { ![file exists $report] } {
|
|
41
|
+
return
|
|
42
|
+
}
|
|
43
|
+
set fid [open $report r]
|
|
44
|
+
set report_content [read $fid]
|
|
45
|
+
close $fid
|
|
46
|
+
puts $report_content
|
|
47
|
+
}
|