siliconcompiler 0.29.0__py3-none-any.whl → 0.29.2__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.
Files changed (104) hide show
  1. siliconcompiler/_metadata.py +1 -1
  2. siliconcompiler/apps/__init__.py +26 -0
  3. siliconcompiler/apps/sc_install.py +1 -1
  4. siliconcompiler/apps/utils/replay.py +96 -38
  5. siliconcompiler/checklists/__init__.py +12 -0
  6. siliconcompiler/core.py +85 -15
  7. siliconcompiler/flows/__init__.py +34 -0
  8. siliconcompiler/flows/showflow.py +1 -1
  9. siliconcompiler/libs/__init__.py +5 -0
  10. siliconcompiler/optimizer/__init__.py +199 -0
  11. siliconcompiler/optimizer/vizier.py +259 -0
  12. siliconcompiler/pdks/__init__.py +5 -0
  13. siliconcompiler/scheduler/__init__.py +67 -49
  14. siliconcompiler/scheduler/send_messages.py +1 -1
  15. siliconcompiler/schema/schema_cfg.py +2 -2
  16. siliconcompiler/schema/schema_obj.py +13 -10
  17. siliconcompiler/schema/utils.py +2 -0
  18. siliconcompiler/sphinx_ext/__init__.py +85 -0
  19. siliconcompiler/sphinx_ext/dynamicgen.py +17 -33
  20. siliconcompiler/sphinx_ext/schemagen.py +3 -2
  21. siliconcompiler/targets/__init__.py +26 -0
  22. siliconcompiler/templates/replay/replay.py.j2 +62 -0
  23. siliconcompiler/templates/replay/requirements.txt +2 -1
  24. siliconcompiler/templates/replay/setup.sh +119 -6
  25. siliconcompiler/tools/__init__.py +62 -0
  26. siliconcompiler/tools/_common/asic.py +77 -6
  27. siliconcompiler/tools/_common/tcl/sc_pin_constraints.tcl +2 -2
  28. siliconcompiler/tools/ghdl/ghdl.py +1 -2
  29. siliconcompiler/tools/gtkwave/__init__.py +39 -0
  30. siliconcompiler/tools/gtkwave/scripts/sc_show.tcl +34 -0
  31. siliconcompiler/tools/gtkwave/show.py +70 -0
  32. siliconcompiler/tools/icarus/compile.py +4 -0
  33. siliconcompiler/tools/klayout/convert_drc_db.py +1 -1
  34. siliconcompiler/tools/klayout/drc.py +1 -1
  35. siliconcompiler/tools/klayout/export.py +8 -1
  36. siliconcompiler/tools/klayout/klayout.py +2 -2
  37. siliconcompiler/tools/klayout/klayout_convert_drc_db.py +2 -2
  38. siliconcompiler/tools/klayout/klayout_export.py +7 -5
  39. siliconcompiler/tools/klayout/klayout_operations.py +4 -3
  40. siliconcompiler/tools/klayout/klayout_show.py +3 -2
  41. siliconcompiler/tools/klayout/klayout_utils.py +1 -1
  42. siliconcompiler/tools/klayout/operations.py +8 -0
  43. siliconcompiler/tools/klayout/screenshot.py +6 -1
  44. siliconcompiler/tools/klayout/show.py +8 -1
  45. siliconcompiler/tools/magic/magic.py +1 -1
  46. siliconcompiler/tools/openroad/__init__.py +1 -1
  47. siliconcompiler/tools/openroad/_apr.py +11 -2
  48. siliconcompiler/tools/openroad/global_placement.py +23 -2
  49. siliconcompiler/tools/openroad/init_floorplan.py +1 -1
  50. siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +1 -1
  51. siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +4 -0
  52. siliconcompiler/tools/openroad/scripts/apr/sc_global_placement.tcl +64 -1
  53. siliconcompiler/tools/openroad/scripts/apr/sc_repair_design.tcl +4 -0
  54. siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +8 -2
  55. siliconcompiler/tools/openroad/scripts/common/procs.tcl +88 -0
  56. siliconcompiler/tools/openroad/scripts/common/reports.tcl +1 -1
  57. siliconcompiler/tools/openroad/scripts/common/write_images.tcl +10 -1
  58. siliconcompiler/tools/openroad/scripts/sc_show.tcl +5 -0
  59. siliconcompiler/tools/opensta/__init__.py +1 -1
  60. siliconcompiler/tools/opensta/check_library.py +27 -0
  61. siliconcompiler/tools/opensta/scripts/sc_check_library.tcl +255 -0
  62. siliconcompiler/tools/opensta/scripts/sc_timing.tcl +1 -1
  63. siliconcompiler/tools/sv2v/sv2v.py +1 -2
  64. siliconcompiler/tools/verilator/compile.py +11 -0
  65. siliconcompiler/tools/verilator/verilator.py +7 -8
  66. siliconcompiler/tools/vivado/vivado.py +1 -1
  67. siliconcompiler/tools/yosys/__init__.py +149 -0
  68. siliconcompiler/tools/yosys/lec.py +22 -9
  69. siliconcompiler/tools/yosys/sc_lec.tcl +94 -49
  70. siliconcompiler/tools/yosys/sc_syn.tcl +1 -0
  71. siliconcompiler/tools/yosys/screenshot.py +2 -2
  72. siliconcompiler/tools/yosys/syn_asic.py +98 -74
  73. siliconcompiler/tools/yosys/syn_asic.tcl +31 -6
  74. siliconcompiler/tools/yosys/syn_fpga.py +2 -3
  75. siliconcompiler/tools/yosys/syn_fpga.tcl +0 -1
  76. siliconcompiler/toolscripts/_tools.json +8 -3
  77. siliconcompiler/toolscripts/rhel9/install-gtkwave.sh +40 -0
  78. siliconcompiler/toolscripts/ubuntu20/install-gtkwave.sh +28 -0
  79. siliconcompiler/toolscripts/ubuntu22/install-gtkwave.sh +28 -0
  80. siliconcompiler/toolscripts/ubuntu22/install-slang.sh +0 -0
  81. siliconcompiler/toolscripts/ubuntu24/install-gtkwave.sh +29 -0
  82. siliconcompiler/utils/__init__.py +7 -3
  83. siliconcompiler/utils/showtools.py +3 -0
  84. {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.2.dist-info}/METADATA +14 -11
  85. {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.2.dist-info}/RECORD +88 -91
  86. {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.2.dist-info}/WHEEL +1 -1
  87. {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.2.dist-info}/entry_points.txt +13 -0
  88. siliconcompiler/libs/asap7sc7p5t.py +0 -8
  89. siliconcompiler/libs/gf180mcu.py +0 -8
  90. siliconcompiler/libs/interposer.py +0 -8
  91. siliconcompiler/libs/nangate45.py +0 -8
  92. siliconcompiler/libs/sg13g2_stdcell.py +0 -8
  93. siliconcompiler/libs/sky130hd.py +0 -8
  94. siliconcompiler/libs/sky130io.py +0 -8
  95. siliconcompiler/pdks/asap7.py +0 -8
  96. siliconcompiler/pdks/freepdk45.py +0 -8
  97. siliconcompiler/pdks/gf180.py +0 -8
  98. siliconcompiler/pdks/ihp130.py +0 -8
  99. siliconcompiler/pdks/interposer.py +0 -8
  100. siliconcompiler/pdks/skywater130.py +0 -8
  101. siliconcompiler/templates/replay/run.py.j2 +0 -22
  102. siliconcompiler/tools/yosys/yosys.py +0 -148
  103. {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.2.dist-info}/LICENSE +0 -0
  104. {siliconcompiler-0.29.0.dist-info → siliconcompiler-0.29.2.dist-info}/top_level.txt +0 -0
@@ -300,6 +300,23 @@ proc sc_bterm_has_placed_io { net } {
300
300
  return false
301
301
  }
302
302
 
303
+ ###########################
304
+ # Get nets with unplaced bterms
305
+ ###########################
306
+
307
+ proc sc_get_unplaced_io_nets { } {
308
+ set nets []
309
+ foreach bterm [[ord::get_db_block] getBTerms] {
310
+ if {
311
+ [$bterm getFirstPinPlacementStatus] == "UNPLACED" ||
312
+ [$bterm getFirstPinPlacementStatus] == "NONE"
313
+ } {
314
+ lappend nets [$bterm getNet]
315
+ }
316
+ }
317
+ return $nets
318
+ }
319
+
303
320
  ###########################
304
321
  # Find nets regex
305
322
  ###########################
@@ -673,3 +690,74 @@ proc sc_check_version { min_required } {
673
690
 
674
691
  return [expr { [lindex $version 1] >= $min_required }]
675
692
  }
693
+
694
+ proc sc_set_gui_title { } {
695
+ if { ![sc_check_version 17650] } {
696
+ return
697
+ }
698
+
699
+ global sc_tool
700
+ global sc_task
701
+
702
+ set step [sc_cfg_get arg step]
703
+ set index [sc_cfg_get arg index]
704
+ set job [sc_cfg_get option jobname]
705
+ if { [sc_cfg_exists "tool" $sc_tool "task" $sc_task "var" "show_step"] } {
706
+ set step [sc_cfg_get "tool" $sc_tool "task" $sc_task "var" "show_step"]
707
+ }
708
+ if { [sc_cfg_exists "tool" $sc_tool "task" $sc_task "var" "show_index"] } {
709
+ set index [sc_cfg_get "tool" $sc_tool "task" $sc_task "var" "show_index"]
710
+ }
711
+ if { [sc_cfg_exists "tool" $sc_tool "task" $sc_task "var" "show_job"] } {
712
+ set job [sc_cfg_get "tool" $sc_tool "task" $sc_task "var" "show_job"]
713
+ }
714
+
715
+ set title "OpenROAD - ${job} / ${step}${index}"
716
+ gui::set_title $title
717
+ }
718
+
719
+ proc sc_set_dont_use { args } {
720
+ sta::parse_key_args "sc_set_dont_use" args \
721
+ keys {-report} \
722
+ flags {-hold -clock -multibit -scanchain}
723
+
724
+ sta::check_argc_eq0 "sc_set_dont_use" $args
725
+
726
+ global sc_mainlib
727
+
728
+ if { [sc_check_version 18171] } {
729
+ reset_dont_use
730
+ }
731
+
732
+ set_dont_use [sc_cfg_get library $sc_mainlib asic cells dontuse]
733
+
734
+ set clk_groups "clkbuf clkgate clklogic"
735
+ foreach group $clk_groups {
736
+ set_dont_use [sc_cfg_get library $sc_mainlib asic cells $group]
737
+ }
738
+ set_dont_use [sc_cfg_get library $sc_mainlib asic cells hold]
739
+
740
+ if { [info exists flags(-hold)] } {
741
+ unset_dont_use [sc_cfg_get library $sc_mainlib asic cells hold]
742
+ }
743
+ if { [info exists flags(-clock)] } {
744
+ foreach group $clk_groups {
745
+ unset_dont_use [sc_cfg_get library $sc_mainlib asic cells $group]
746
+ }
747
+ }
748
+ if { [info exists flags(-clock)] } {
749
+ foreach group $clk_groups {
750
+ unset_dont_use [sc_cfg_get library $sc_mainlib asic cells $group]
751
+ }
752
+ }
753
+ if { [info exists flags(-multibit)] } {
754
+ unset_dont_use [sc_cfg_tool_task_get var multibit_ff_cells]
755
+ }
756
+ if { [info exists flags(-scanchain)] } {
757
+ unset_dont_use [sc_cfg_tool_task_get var scan_chain_cells]
758
+ }
759
+
760
+ if { [info exists keys(-report)] } {
761
+ tee -file reports/$keys(-report).rpt {report_dont_use}
762
+ }
763
+ }
@@ -7,7 +7,7 @@ file mkdir reports/timing
7
7
  file mkdir reports/power
8
8
  file mkdir reports/markers
9
9
 
10
- set fields "{capacitance slew input_pins nets fanout}"
10
+ set fields "{capacitance slew input_pins hierarcial_pins net fanout}"
11
11
  set sta_top_n_paths [lindex [sc_cfg_tool_task_get var sta_top_n_paths] 0]
12
12
  set PREFIX "SC_METRIC:"
13
13
 
@@ -93,6 +93,10 @@ proc sc_image_everything { } {
93
93
  }
94
94
 
95
95
  proc sc_image_irdrop { net corner } {
96
+ if { ![sc_cfg_tool_task_check_in_list power var reports] } {
97
+ return
98
+ }
99
+
96
100
  if { ![sc_has_placed_instances] || [sc_has_unplaced_instances] } {
97
101
  return
98
102
  }
@@ -107,7 +111,12 @@ proc sc_image_irdrop { net corner } {
107
111
  foreach msg $msgs {
108
112
  suppress_message PSM $msg
109
113
  }
110
- set failed [catch { analyze_power_grid -net $net -corner $corner -source_type STRAPS } err]
114
+ set analyze_args []
115
+ lappend analyze_args -source_type STRAPS
116
+ if { [sc_check_version 18074] } {
117
+ lappend analyze_args -allow_reuse
118
+ }
119
+ set failed [catch { analyze_power_grid -net $net -corner $corner {*}$analyze_args } err]
111
120
  foreach msg $msgs {
112
121
  unsuppress_message PSM $msg
113
122
  }
@@ -28,6 +28,11 @@ source -echo "$sc_refdir/common/debugging.tcl"
28
28
 
29
29
  source "$sc_refdir/common/procs.tcl"
30
30
 
31
+ ###############################
32
+ # Setup GUI title early
33
+ ###############################
34
+ sc_set_gui_title
35
+
31
36
  ###############################
32
37
  # Design information
33
38
  ###############################
@@ -12,13 +12,13 @@ import os
12
12
  from siliconcompiler.tools.openroad._apr import get_library_timing_keypaths
13
13
  from siliconcompiler.tools._common import get_tool_task
14
14
  from siliconcompiler.tools._common.asic import get_libraries
15
- from siliconcompiler.targets import asap7_demo
16
15
 
17
16
 
18
17
  ####################################################################
19
18
  # Make Docs
20
19
  ####################################################################
21
20
  def make_docs(chip):
21
+ from siliconcompiler.targets import asap7_demo
22
22
  chip.use(asap7_demo)
23
23
 
24
24
 
@@ -0,0 +1,27 @@
1
+ from siliconcompiler.tools.opensta import setup as tool_setup
2
+ from siliconcompiler.tools.opensta import runtime_options as tool_runtime_options
3
+ from siliconcompiler.tools._common import get_tool_task
4
+
5
+
6
+ def setup(chip):
7
+ '''
8
+ Check setup information about the timing libraries.
9
+ '''
10
+ step = chip.get('arg', 'step')
11
+ index = chip.get('arg', 'index')
12
+ tool, task = get_tool_task(chip, step, index)
13
+
14
+ tool_setup(chip)
15
+
16
+ chip.set('tool', tool, 'task', task, 'script', 'sc_check_library.tcl',
17
+ step=step, index=index, clobber=False)
18
+
19
+ chip.set('tool', tool, 'task', task, 'threads', 1,
20
+ step=step, index=index)
21
+
22
+
23
+ ################################
24
+ # Runtime options
25
+ ################################
26
+ def runtime_options(chip):
27
+ return tool_runtime_options(chip)
@@ -0,0 +1,255 @@
1
+ ###############################
2
+ # Reading SC Schema
3
+ ###############################
4
+
5
+ source ./sc_manifest.tcl > /dev/null
6
+
7
+ ##############################
8
+ # Schema Adapter
9
+ ###############################
10
+
11
+ set sc_tool opensta
12
+ set sc_step [sc_cfg_get arg step]
13
+ set sc_index [sc_cfg_get arg index]
14
+ set sc_flow [sc_cfg_get option flow]
15
+ set sc_task [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index task]
16
+
17
+ set sc_refdir [sc_cfg_tool_task_get refdir]
18
+
19
+ # Design
20
+ set sc_design [sc_top]
21
+
22
+ # APR Parameters
23
+ set sc_targetlibs [sc_get_asic_libraries logic]
24
+ set sc_delaymodel [sc_cfg_get asic delaymodel]
25
+ set sc_scenarios [dict keys [sc_cfg_get constraint timing]]
26
+
27
+ ###############################
28
+ # Optional
29
+ ###############################
30
+
31
+ # MACROS
32
+ set sc_macrolibs [sc_get_asic_libraries macro]
33
+
34
+ ###############################
35
+ # Read Files
36
+ ###############################
37
+
38
+ # Read Liberty
39
+ puts "Defining timing corners: $sc_scenarios"
40
+ define_corners {*}$sc_scenarios
41
+ foreach lib "$sc_targetlibs $sc_macrolibs" {
42
+ #Liberty
43
+ foreach corner $sc_scenarios {
44
+ foreach libcorner [sc_cfg_get constraint timing $corner libcorner] {
45
+ if { [sc_cfg_exists library $lib output $libcorner $sc_delaymodel] } {
46
+ foreach lib_file [sc_cfg_get library $lib output $libcorner $sc_delaymodel] {
47
+ puts "Reading liberty file for ${corner} ($libcorner): ${lib_file}"
48
+ read_liberty -corner $corner $lib_file
49
+ }
50
+ break
51
+ }
52
+ }
53
+ }
54
+ }
55
+
56
+ proc assert_glob { str } {
57
+ if { [string first "*" $str] != -1 } {
58
+ puts "\[ERROR] Regex detected: $str"
59
+ }
60
+ }
61
+
62
+ # Check cells
63
+ # check for globbing and report list if globs are detected
64
+ # check each cell
65
+ foreach lib $sc_targetlibs {
66
+ dict for {cell_type cells} [sc_cfg_get library $lib asic cells] {
67
+ if { [llength $cells] == 0 } {
68
+ continue
69
+ }
70
+
71
+ puts "Checking: $lib / asic / cells / $cell_type"
72
+
73
+ foreach cell $cells {
74
+ puts " $cell:"
75
+
76
+ if { $cell_type != "dontuse" } {
77
+ assert_glob $cell
78
+ }
79
+ set libcells [get_lib_cells $cell]
80
+ foreach libcell $libcells {
81
+ puts " [get_full_name $libcell]"
82
+ }
83
+ }
84
+ }
85
+ }
86
+
87
+ # Check yosys setup
88
+ # yosys_driver_cell
89
+ foreach lib $sc_targetlibs {
90
+ puts "Checking $lib yosys_driver_cell"
91
+ assert_glob [sc_cfg_get library $lib option var yosys_driver_cell]
92
+ if { [get_lib_cells [sc_cfg_get library $lib option var yosys_driver_cell]] == 0 } {
93
+ puts "\[ERROR] missing"
94
+ }
95
+ }
96
+ # yosys_buffer_cell
97
+ foreach lib $sc_targetlibs {
98
+ puts "Checking $lib yosys_buffer_cell"
99
+ assert_glob [sc_cfg_get library $lib option var yosys_buffer_cell]
100
+ if { [get_lib_cells [sc_cfg_get library $lib option var yosys_buffer_cell]] == 0 } {
101
+ puts "\[ERROR] missing"
102
+ }
103
+ }
104
+ # yosys_buffer_input
105
+ foreach lib $sc_targetlibs {
106
+ puts "Checking $lib yosys_buffer_input"
107
+ assert_glob [sc_cfg_get library $lib option var yosys_buffer_input]
108
+ set cellname [sc_cfg_get library $lib option var yosys_buffer_cell]
109
+ set pins [get_lib_pins $cellname/[sc_cfg_get library $lib option var yosys_buffer_input]]
110
+ if { [llength $pins] != [llength [sta::corners]] } {
111
+ puts "\[ERROR] mismatch"
112
+ }
113
+ foreach pin $pins {
114
+ if { [get_property $pin direction] != "input" } {
115
+ puts "\[ERROR] [get_full_name $pin] incorrect direction"
116
+ }
117
+ }
118
+ }
119
+ # yosys_buffer_output
120
+ foreach lib $sc_targetlibs {
121
+ puts "Checking $lib yosys_buffer_output"
122
+ assert_glob [sc_cfg_get library $lib option var yosys_buffer_output]
123
+ set cellname [sc_cfg_get library $lib option var yosys_buffer_cell]
124
+ set pins [get_lib_pins $cellname/[sc_cfg_get library $lib option var yosys_buffer_output]]
125
+ if { [llength $pins] != [llength [sta::corners]] } {
126
+ puts "\[ERROR] mismatch"
127
+ }
128
+ foreach pin $pins {
129
+ if { [get_property $pin direction] != "output" } {
130
+ puts "\[ERROR] [get_full_name $pin] incorrect direction"
131
+ }
132
+ }
133
+ }
134
+ # yosys_tiehigh_cell
135
+ foreach lib $sc_targetlibs {
136
+ puts "Checking $lib yosys_tiehigh_cell"
137
+ assert_glob [sc_cfg_get library $lib option var yosys_tiehigh_cell]
138
+ if { [get_lib_cells [sc_cfg_get library $lib option var yosys_tiehigh_cell]] == 0 } {
139
+ puts "\[ERROR] missing"
140
+ }
141
+ }
142
+ # yosys_tiehigh_port
143
+ foreach lib $sc_targetlibs {
144
+ puts "Checking $lib yosys_tiehigh_port"
145
+ assert_glob [sc_cfg_get library $lib option var yosys_tiehigh_port]
146
+ set cellname [sc_cfg_get library $lib option var yosys_tiehigh_cell]
147
+ set pins [get_lib_pins $cellname/[sc_cfg_get library $lib option var yosys_tiehigh_port]]
148
+ if { [llength $pins] != [llength [sta::corners]] } {
149
+ puts "\[ERROR] mismatch"
150
+ }
151
+ foreach pin $pins {
152
+ if { [get_property $pin direction] != "output" } {
153
+ puts "\[ERROR] [get_full_name $pin] incorrect direction"
154
+ }
155
+ }
156
+ }
157
+ # yosys_tielow_cell
158
+ foreach lib $sc_targetlibs {
159
+ puts "Checking $lib yosys_tielow_cell"
160
+ assert_glob [sc_cfg_get library $lib option var yosys_tielow_cell]
161
+ if { [get_lib_cells [sc_cfg_get library $lib option var yosys_tielow_cell]] == 0 } {
162
+ puts "\[ERROR] missing"
163
+ }
164
+ }
165
+ # yosys_tielow_port
166
+ foreach lib $sc_targetlibs {
167
+ puts "Checking $lib yosys_tielow_port"
168
+ assert_glob [sc_cfg_get library $lib option var yosys_tielow_port]
169
+ set cellname [sc_cfg_get library $lib option var yosys_tielow_cell]
170
+ set pins [get_lib_pins $cellname/[sc_cfg_get library $lib option var yosys_tielow_port]]
171
+ if { [llength $pins] != [llength [sta::corners]] } {
172
+ puts "\[ERROR] mismatch"
173
+ }
174
+ foreach pin $pins {
175
+ if { [get_property $pin direction] != "output" } {
176
+ puts "\[ERROR] [get_full_name $pin] incorrect direction"
177
+ }
178
+ }
179
+ }
180
+ # yosys_abc_constraint_load
181
+ foreach lib $sc_targetlibs {
182
+ set cap 0.0
183
+ puts "Checking $lib yosys_abc_constraint_load"
184
+ set cellname [sc_cfg_get library $lib option var yosys_buffer_cell]
185
+ set pins [get_lib_pins $cellname/[sc_cfg_get library $lib option var yosys_buffer_input]]
186
+ foreach pin $pins {
187
+ set cap [expr { max($cap, [get_property $pin capacitance]) }]
188
+ }
189
+ set lib_cap [sc_cfg_get library $lib option var yosys_abc_constraint_load]
190
+ set cap [expr { 4 * $cap }]
191
+ set cap "[format "%.3f" $cap][sta::unit_scaled_suffix capacitance]"
192
+
193
+ if { $lib_cap != $cap } {
194
+ puts "\[ERROR] mismatch, should be $cap, not $lib_cap"
195
+ }
196
+ }
197
+
198
+ # yosys_abc_clock_multiplier
199
+ foreach lib $sc_targetlibs {
200
+ puts "Checking $lib yosys_abc_clock_multiplier"
201
+ set ps_convert [expr { round(1.0 / [sta::time_sta_ui 1e-12]) }]
202
+ set convert [sc_cfg_get library $lib option var yosys_abc_clock_multiplier]
203
+ if { $convert != $ps_convert } {
204
+ puts "\[ERROR] incorrect multiplier: should be $ps_convert, not $convert"
205
+ }
206
+ }
207
+
208
+ # Check openroad setup
209
+ # openroad_tiehigh_cell
210
+ foreach lib $sc_targetlibs {
211
+ puts "Checking $lib openroad_tiehigh_cell"
212
+ assert_glob [sc_cfg_get library $lib option var openroad_tiehigh_cell]
213
+ if { [get_lib_cells [sc_cfg_get library $lib option var openroad_tiehigh_cell]] == 0 } {
214
+ puts "\[ERROR] missing"
215
+ }
216
+ }
217
+ # openroad_tiehigh_port
218
+ foreach lib $sc_targetlibs {
219
+ puts "Checking $lib openroad_tiehigh_port"
220
+ assert_glob [sc_cfg_get library $lib option var openroad_tiehigh_port]
221
+ set cellname [sc_cfg_get library $lib option var openroad_tiehigh_cell]
222
+ set pins [get_lib_pins $cellname/[sc_cfg_get library $lib option var openroad_tiehigh_port]]
223
+ if { [llength $pins] != [llength [sta::corners]] } {
224
+ puts "\[ERROR] mismatch"
225
+ }
226
+ foreach pin $pins {
227
+ if { [get_property $pin direction] != "output" } {
228
+ puts "\[ERROR] [get_full_name $pin] incorrect direction"
229
+ }
230
+ }
231
+ }
232
+
233
+ # openroad_tielow_cell
234
+ foreach lib $sc_targetlibs {
235
+ puts "Checking $lib openroad_tielow_cell"
236
+ assert_glob [sc_cfg_get library $lib option var openroad_tielow_cell]
237
+ if { [get_lib_cells [sc_cfg_get library $lib option var openroad_tielow_cell]] == 0 } {
238
+ puts "\[ERROR] missing"
239
+ }
240
+ }
241
+ # openroad_tielow_port
242
+ foreach lib $sc_targetlibs {
243
+ puts "Checking $lib openroad_tielow_port"
244
+ assert_glob [sc_cfg_get library $lib option var openroad_tielow_port]
245
+ set cellname [sc_cfg_get library $lib option var openroad_tielow_cell]
246
+ set pins [get_lib_pins $cellname/[sc_cfg_get library $lib option var openroad_tielow_port]]
247
+ if { [llength $pins] != [llength [sta::corners]] } {
248
+ puts "\[ERROR] mismatch"
249
+ }
250
+ foreach pin $pins {
251
+ if { [get_property $pin direction] != "output" } {
252
+ puts "\[ERROR] [get_full_name $pin] incorrect direction"
253
+ }
254
+ }
255
+ }
@@ -128,7 +128,7 @@ source "$sc_refdir/sc_procs.tcl"
128
128
 
129
129
  set opensta_top_n_paths [lindex [sc_cfg_tool_task_get var top_n_paths] 0]
130
130
 
131
- set fields "{capacitance slew input_pins nets fanout}"
131
+ set fields "{capacitance slew input_pins hierarcial_pins net fanout}"
132
132
  set PREFIX "SC_METRIC:"
133
133
 
134
134
  puts "$PREFIX timeunit"
@@ -14,13 +14,12 @@ Sources: https://github.com/zachjs/sv2v
14
14
  Installation: https://github.com/zachjs/sv2v
15
15
  '''
16
16
 
17
- from siliconcompiler.tools.sv2v import convert
18
-
19
17
 
20
18
  ####################################################################
21
19
  # Make Docs
22
20
  ####################################################################
23
21
  def make_docs(chip):
22
+ from siliconcompiler.tools.sv2v import convert
24
23
  convert.setup(chip)
25
24
  return chip
26
25
 
@@ -97,6 +97,12 @@ def setup(chip):
97
97
  "'vcd' or 'fst'. Defaults to 'vcd'.",
98
98
  field='help')
99
99
 
100
+ chip.set('tool', tool, 'task', task, 'var', 'initialize_random',
101
+ 'true/false, when true registers will reset with a random value.',
102
+ field='help')
103
+ chip.set('tool', tool, 'task', task, 'var', 'initialize_random', False,
104
+ step=step, index=index, clobber=False)
105
+
100
106
 
101
107
  def runtime_options(chip):
102
108
  tool = 'verilator'
@@ -107,6 +113,11 @@ def runtime_options(chip):
107
113
 
108
114
  cmdlist = runtime_options_tool(chip)
109
115
 
116
+ random_init = chip.get('tool', tool, 'task', task, 'var',
117
+ 'initialize_random', step=step, index=index)
118
+ if random_init == ['true']:
119
+ cmdlist.extend(['--x-assign', 'unique'])
120
+
110
121
  cmdlist.extend(['--exe', '--build'])
111
122
 
112
123
  threads = chip.get('tool', tool, 'task', task, 'threads', step=step, index=index)
@@ -32,13 +32,13 @@ from siliconcompiler.tools._common import (
32
32
  get_tool_task,
33
33
  input_provides
34
34
  )
35
- from siliconcompiler.targets import freepdk45_demo
36
35
 
37
36
 
38
37
  ####################################################################
39
38
  # Make Docs
40
39
  ####################################################################
41
40
  def make_docs(chip):
41
+ from siliconcompiler.targets import freepdk45_demo
42
42
  chip.use(freepdk45_demo)
43
43
 
44
44
 
@@ -71,15 +71,13 @@ def setup(chip):
71
71
  chip.set('tool', tool, 'task', task, 'file', 'config',
72
72
  'Verilator configuration file',
73
73
  field='help')
74
- if chip.get('tool', tool, 'task', task, 'file', 'config', step=step, index=index):
75
- chip.add('tool', tool, 'task', task, 'require',
76
- ','.join(['tool', tool, 'task', task, 'file', 'config']),
77
- step=step, index=index)
74
+ add_require_input(chip, 'tool', tool, 'task', task, 'file', 'config')
75
+ add_require_input(chip, 'option', 'file', 'verilator_config')
78
76
 
79
77
  chip.set('tool', tool, 'task', task, 'var', 'enable_assert',
80
78
  'true/false, when true assertions are enabled in Verilator.',
81
79
  field='help')
82
- chip.set('tool', tool, 'task', task, 'var', 'enable_assert', 'false',
80
+ chip.set('tool', tool, 'task', task, 'var', 'enable_assert', False,
83
81
  step=step, index=index, clobber=False)
84
82
 
85
83
  if chip.get('tool', tool, 'task', task, 'var', 'enable_assert', step=step, index=index):
@@ -132,8 +130,9 @@ def runtime_options(chip):
132
130
  cmdlist.append(libext_option)
133
131
 
134
132
  # Verilator docs recommend this file comes first in CLI arguments
135
- for value in chip.find_files('tool', tool, 'task', task, 'file', 'config',
136
- step=step, index=index):
133
+ for value in get_input_files(chip, 'tool', tool, 'task', task, 'file', 'config'):
134
+ cmdlist.append(value)
135
+ for value in get_input_files(chip, 'option', 'file', 'verilator_config'):
137
136
  cmdlist.append(value)
138
137
 
139
138
  for param, value in frontend_opts['param']:
@@ -10,10 +10,10 @@ import os
10
10
  import re
11
11
  from siliconcompiler import sc_open
12
12
  from siliconcompiler.tools._common import record_metric
13
- from siliconcompiler.targets import fpgaflow_demo
14
13
 
15
14
 
16
15
  def make_docs(chip):
16
+ from siliconcompiler.targets import fpgaflow_demo
17
17
  chip.set('fpga', 'partname', 'ice40up5k-sg48')
18
18
  chip.use(fpgaflow_demo)
19
19