siliconcompiler 0.30.0__py3-none-any.whl → 0.31.0__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 (69) hide show
  1. siliconcompiler/_metadata.py +1 -1
  2. siliconcompiler/apps/sc_install.py +7 -3
  3. siliconcompiler/apps/sc_remote.py +1 -3
  4. siliconcompiler/core.py +23 -8
  5. siliconcompiler/flowgraph.py +11 -23
  6. siliconcompiler/package.py +1 -1
  7. siliconcompiler/remote/schema.py +9 -8
  8. siliconcompiler/report/report.py +4 -3
  9. siliconcompiler/scheduler/__init__.py +109 -104
  10. siliconcompiler/scheduler/docker_runner.py +1 -1
  11. siliconcompiler/scheduler/send_messages.py +1 -1
  12. siliconcompiler/schema/schema_cfg.py +367 -357
  13. siliconcompiler/schema/schema_obj.py +32 -18
  14. siliconcompiler/schema/utils.py +19 -0
  15. siliconcompiler/sphinx_ext/schemagen.py +3 -1
  16. siliconcompiler/templates/replay/replay.sh.j2 +92 -0
  17. siliconcompiler/tools/_common/__init__.py +8 -2
  18. siliconcompiler/tools/_common/asic.py +1 -1
  19. siliconcompiler/tools/klayout/export.py +5 -0
  20. siliconcompiler/tools/klayout/klayout.py +18 -1
  21. siliconcompiler/tools/klayout/klayout_export.py +4 -1
  22. siliconcompiler/tools/klayout/klayout_operations.py +5 -2
  23. siliconcompiler/tools/klayout/klayout_utils.py +23 -0
  24. siliconcompiler/tools/klayout/operations.py +5 -0
  25. siliconcompiler/tools/magic/magic.py +1 -1
  26. siliconcompiler/tools/openroad/_apr.py +14 -3
  27. siliconcompiler/tools/openroad/antenna_repair.py +2 -1
  28. siliconcompiler/tools/openroad/clock_tree_synthesis.py +2 -1
  29. siliconcompiler/tools/openroad/detailed_placement.py +2 -1
  30. siliconcompiler/tools/openroad/detailed_route.py +8 -0
  31. siliconcompiler/tools/openroad/fillercell_insertion.py +2 -1
  32. siliconcompiler/tools/openroad/global_placement.py +2 -1
  33. siliconcompiler/tools/openroad/pin_placement.py +2 -1
  34. siliconcompiler/tools/openroad/repair_design.py +2 -1
  35. siliconcompiler/tools/openroad/repair_timing.py +2 -1
  36. siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +6 -0
  37. siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +1 -0
  38. siliconcompiler/tools/openroad/scripts/apr/sc_detailed_route.tcl +8 -0
  39. siliconcompiler/tools/openroad/scripts/apr/sc_global_placement.tcl +1 -0
  40. siliconcompiler/tools/openroad/scripts/apr/sc_global_route.tcl +2 -0
  41. siliconcompiler/tools/openroad/scripts/apr/sc_macro_placement.tcl +5 -0
  42. siliconcompiler/tools/openroad/scripts/apr/sc_power_grid.tcl +1 -0
  43. siliconcompiler/tools/openroad/scripts/apr/sc_repair_design.tcl +1 -0
  44. siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +3 -0
  45. siliconcompiler/tools/openroad/scripts/common/procs.tcl +29 -12
  46. siliconcompiler/tools/openroad/scripts/common/reports.tcl +15 -0
  47. siliconcompiler/tools/openroad/scripts/common/write_images.tcl +28 -0
  48. siliconcompiler/tools/yosys/__init__.py +7 -0
  49. siliconcompiler/tools/yosys/sc_syn.tcl +33 -24
  50. siliconcompiler/tools/yosys/syn_asic.py +27 -0
  51. siliconcompiler/tools/yosys/syn_asic.tcl +27 -0
  52. siliconcompiler/toolscripts/_tools.json +14 -2
  53. siliconcompiler/toolscripts/rhel8/install-yosys-moosic.sh +17 -0
  54. siliconcompiler/toolscripts/rhel8/install-yosys-slang.sh +22 -0
  55. siliconcompiler/toolscripts/rhel9/install-yosys-moosic.sh +17 -0
  56. siliconcompiler/toolscripts/rhel9/install-yosys-slang.sh +22 -0
  57. siliconcompiler/toolscripts/ubuntu20/install-yosys-moosic.sh +17 -0
  58. siliconcompiler/toolscripts/ubuntu20/install-yosys-slang.sh +22 -0
  59. siliconcompiler/toolscripts/ubuntu22/install-yosys-moosic.sh +17 -0
  60. siliconcompiler/toolscripts/ubuntu22/install-yosys-slang.sh +22 -0
  61. siliconcompiler/toolscripts/ubuntu24/install-yosys-moosic.sh +17 -0
  62. siliconcompiler/toolscripts/ubuntu24/install-yosys-slang.sh +22 -0
  63. siliconcompiler/utils/__init__.py +33 -5
  64. {siliconcompiler-0.30.0.dist-info → siliconcompiler-0.31.0.dist-info}/METADATA +7 -7
  65. {siliconcompiler-0.30.0.dist-info → siliconcompiler-0.31.0.dist-info}/RECORD +69 -58
  66. {siliconcompiler-0.30.0.dist-info → siliconcompiler-0.31.0.dist-info}/WHEEL +1 -1
  67. {siliconcompiler-0.30.0.dist-info → siliconcompiler-0.31.0.dist-info}/LICENSE +0 -0
  68. {siliconcompiler-0.30.0.dist-info → siliconcompiler-0.31.0.dist-info}/entry_points.txt +0 -0
  69. {siliconcompiler-0.30.0.dist-info → siliconcompiler-0.31.0.dist-info}/top_level.txt +0 -0
@@ -36,6 +36,7 @@ if { [llength [all_clocks]] > 0 } {
36
36
 
37
37
  set cts_distance_between_buffers \
38
38
  [lindex [sc_cfg_tool_task_get var cts_distance_between_buffers] 0]
39
+ sc_report_args -command clock_tree_synthesis -args $sc_cts_arguments
39
40
  clock_tree_synthesis \
40
41
  -sink_clustering_enable \
41
42
  -sink_clustering_size [lindex [sc_cfg_tool_task_get var cts_cluster_size] 0] \
@@ -40,12 +40,20 @@ set drt_repair_pdn_vias \
40
40
  if { $drt_repair_pdn_vias != "" } {
41
41
  lappend drt_arguments "-repair_pdn_vias" $drt_repair_pdn_vias
42
42
  }
43
+ set drt_end_iteration [lindex [sc_cfg_tool_task_get {var} drt_end_iteration] 0]
44
+ if { $drt_end_iteration != "" } {
45
+ lappend drt_arguments "-droute_end_iter" $drt_end_iteration
46
+ }
47
+ lappend drt_arguments \
48
+ -drc_report_iter_step \
49
+ [lindex [sc_cfg_tool_task_get {var} drt_report_interval] 0]
43
50
 
44
51
  set sc_minmetal [sc_cfg_get pdk $sc_pdk minlayer $sc_stackup]
45
52
  set sc_minmetal [sc_get_layer_name $sc_minmetal]
46
53
  set sc_maxmetal [sc_cfg_get pdk $sc_pdk maxlayer $sc_stackup]
47
54
  set sc_maxmetal [sc_get_layer_name $sc_maxmetal]
48
55
 
56
+ sc_report_args -command detailed_route -args $drt_arguments
49
57
  detailed_route \
50
58
  -save_guide_updates \
51
59
  -output_drc "reports/${sc_design}_drc.rpt" \
@@ -41,6 +41,7 @@ if { [lindex [sc_cfg_tool_task_get var enable_scan_chains] 0] == "true" } {
41
41
  [lindex [sc_cfg_tool_task_get var scan_enable_port_pattern] 0]
42
42
  }
43
43
 
44
+ sc_report_args -command set_dft_config -args $dft_args
44
45
  set_dft_config -clock_mixing clock_mix {*}$dft_args
45
46
  tee -file reports/scan_chain_config.rpt {report_dft_config}
46
47
  scan_replace
@@ -29,6 +29,7 @@ if { [lindex [sc_cfg_tool_task_get {var} grt_use_pin_access] 0] == "true" } {
29
29
  [lindex [sc_cfg_tool_task_get {var} drt_process_node] 0]
30
30
  }
31
31
 
32
+ sc_report_args -command pin_access -args $pin_access_args
32
33
  pin_access \
33
34
  -bottom_routing_layer $sc_minmetal \
34
35
  -top_routing_layer $sc_maxmetal \
@@ -47,6 +48,7 @@ if { [lindex [sc_cfg_tool_task_get {var} grt_allow_overflow] 0] == "true" } {
47
48
  lappend sc_grt_arguments "-allow_overflow"
48
49
  }
49
50
 
51
+ sc_report_args -command global_route -args $sc_grt_arguments
50
52
  if {
51
53
  [catch {
52
54
  global_route -guide_file "reports/route.guide" \
@@ -85,6 +85,10 @@ if { [sc_design_has_unplaced_macros] } {
85
85
  if { $rtlmp_guidance_weight != "" } {
86
86
  lappend rtlmp_args -guidance_weight $rtlmp_guidance_weight
87
87
  }
88
+ set rtlmp_boundary_weight [lindex [sc_cfg_tool_task_get var rtlmp_boundary_weight] 0]
89
+ if { $rtlmp_boundary_weight != "" } {
90
+ lappend rtlmp_args -boundary_weight $rtlmp_boundary_weight
91
+ }
88
92
  set rtlmp_fence_weight [lindex [sc_cfg_tool_task_get var rtlmp_fence_weight] 0]
89
93
  if { $rtlmp_fence_weight != "" } {
90
94
  lappend rtlmp_args -fence_weight $rtlmp_fence_weight
@@ -98,6 +102,7 @@ if { [sc_design_has_unplaced_macros] } {
98
102
  lappend rtlmp_args -blockage_weight $rtlmp_blockage_weight
99
103
  }
100
104
 
105
+ sc_report_args -command rtl_macro_placer -args $rtlmp_args
101
106
  rtl_macro_placer \
102
107
  -report_directory reports/rtlmp \
103
108
  -halo_width $halo_x \
@@ -99,6 +99,7 @@ foreach net [sc_psm_check_nets] {
99
99
  lappend check_args -dont_require_terminals
100
100
  }
101
101
 
102
+ sc_report_args -command check_power_grid -args $check_args
102
103
  check_power_grid \
103
104
  -floorplanning \
104
105
  -error_file "reports/power_grid_${net}.rpt" \
@@ -41,6 +41,7 @@ if { $rsz_slew_margin != "false" } {
41
41
  lappend repair_design_args "-slew_margin" $rsz_slew_margin
42
42
  }
43
43
 
44
+ sc_report_args -command repair_design -args $repair_design_args
44
45
  repair_design \
45
46
  -verbose \
46
47
  {*}$repair_design_args
@@ -40,6 +40,7 @@ if { [lindex [sc_cfg_tool_task_get var rsz_skip_setup_repair] 0] != "true" } {
40
40
 
41
41
  estimate_parasitics -placement
42
42
 
43
+ sc_report_args -command repair_timing -args $repair_timing_args
43
44
  repair_timing \
44
45
  -setup \
45
46
  -verbose \
@@ -64,6 +65,7 @@ if { [lindex [sc_cfg_tool_task_get var rsz_skip_hold_repair] 0] != "true" } {
64
65
  # Enable hold cells
65
66
  sc_set_dont_use -hold -scanchain -multibit -report dont_use.repair_timing.hold
66
67
 
68
+ sc_report_args -command repair_timing -args $repair_timing_args
67
69
  repair_timing \
68
70
  -hold \
69
71
  -verbose \
@@ -88,6 +90,7 @@ if { [lindex [sc_cfg_tool_task_get var rsz_skip_recover_power] 0] != "true" } {
88
90
  # Enable cells
89
91
  sc_set_dont_use -hold -scanchain -multibit -report dont_use.repair_timing.power
90
92
 
93
+ sc_report_args -command repair_timing -args $repair_timing_args
91
94
  repair_timing \
92
95
  -recover_power $rsz_recover_power \
93
96
  -verbose \
@@ -86,6 +86,7 @@ proc sc_global_placement { args } {
86
86
 
87
87
  set density [sc_global_placement_density]
88
88
 
89
+ sc_report_args -command global_placement -args $gpl_args
89
90
  global_placement {*}$gpl_args \
90
91
  -density $density \
91
92
  -pad_left $gpl_padding \
@@ -110,6 +111,7 @@ proc sc_detailed_placement { } {
110
111
  lappend dpl_args "-disallow_one_site_gaps"
111
112
  }
112
113
 
114
+ sc_report_args -command detailed_placement -args $dpl_args
113
115
  detailed_placement \
114
116
  -max_displacement $dpl_max_displacement \
115
117
  {*}$dpl_args
@@ -126,15 +128,6 @@ proc sc_pin_placement { args } {
126
128
  flags {-random}
127
129
  sta::check_argc_eq0 "sc_pin_placement" $args
128
130
 
129
- global sc_pdk
130
- global sc_stackup
131
- global sc_tool
132
-
133
- set sc_hpinmetal [sc_cfg_get pdk $sc_pdk {var} $sc_tool pin_layer_horizontal $sc_stackup]
134
- set sc_hpinmetal [sc_get_layer_name $sc_hpinmetal]
135
- set sc_vpinmetal [sc_cfg_get pdk $sc_pdk {var} $sc_tool pin_layer_vertical $sc_stackup]
136
- set sc_vpinmetal [sc_get_layer_name $sc_vpinmetal]
137
-
138
131
  if { [sc_cfg_tool_task_exists var pin_thickness_h] } {
139
132
  set h_mult [lindex [sc_cfg_tool_task_get var pin_thickness_h] 0]
140
133
  set_pin_thick_multiplier -hor_multiplier $h_mult
@@ -155,9 +148,19 @@ proc sc_pin_placement { args } {
155
148
  lappend ppl_args "-random"
156
149
  }
157
150
 
158
- place_pins -hor_layers $sc_hpinmetal \
159
- -ver_layers $sc_vpinmetal \
160
- {*}[sc_cfg_tool_task_get {var} ppl_arguments] \
151
+ lappend ppl_args {*}[sc_cfg_tool_task_get {var} ppl_arguments]
152
+
153
+ global sc_pdk
154
+ global sc_stackup
155
+ global sc_tool
156
+
157
+ set sc_hpinmetal [sc_cfg_get pdk $sc_pdk {var} $sc_tool pin_layer_horizontal $sc_stackup]
158
+ set sc_vpinmetal [sc_cfg_get pdk $sc_pdk {var} $sc_tool pin_layer_vertical $sc_stackup]
159
+
160
+ sc_report_args -command place_pins -args $ppl_args
161
+ place_pins \
162
+ -hor_layers [sc_get_layer_name $sc_hpinmetal] \
163
+ -ver_layers [sc_get_layer_name $sc_vpinmetal] \
161
164
  {*}$ppl_args
162
165
  }
163
166
 
@@ -783,3 +786,17 @@ proc sc_setup_detailed_route { } {
783
786
  detailed_route_set_unidirectional_layer $layer
784
787
  }
785
788
  }
789
+
790
+ proc sc_report_args { args } {
791
+ sta::parse_key_args "sc_report_args" args \
792
+ keys {-command -args} \
793
+ flags {}
794
+
795
+ sta::check_argc_eq0 "sc_report_args" $args
796
+
797
+ if { [llength $keys(-args)] == 0 } {
798
+ return
799
+ }
800
+
801
+ puts "$keys(-command) siliconcompiler arguments: $keys(-args)"
802
+ }
@@ -100,6 +100,17 @@ if { [sc_cfg_tool_task_check_in_list fmax var reports] } {
100
100
  puts "$clk_name fmax = [format %.2f [expr { $fmax / 1e6 }]] MHz"
101
101
  set fmax_metric [expr { max($fmax_metric, $fmax) }]
102
102
  }
103
+ if { $fmax_metric == 0 } {
104
+ # attempt to compute based on combinatorial path
105
+ set max_path [find_timing_paths -unconstrained -path_delay max]
106
+ set max_path_delay [$max_path data_arrival_time]
107
+ set min_path [find_timing_paths -unconstrained -path_delay min]
108
+ set min_path_delay [$min_path data_arrival_time]
109
+ set path_delay [expr { $max_path_delay - min(0, $min_path_delay) }]
110
+ if { $path_delay > 0 } {
111
+ set fmax_metric [expr { 1.0 / $path_delay }]
112
+ }
113
+ }
103
114
  if { $fmax_metric > 0 } {
104
115
  utl::metric_float "timing__fmax" $fmax_metric
105
116
  }
@@ -169,6 +180,10 @@ foreach markerdb [[ord::get_db_block] getMarkerCategories] {
169
180
  continue
170
181
  }
171
182
 
183
+ if { [lsearch -exact $sc_starting_markers [$markerdb getName]] != -1 } {
184
+ continue
185
+ }
186
+
172
187
  $markerdb writeTR "reports/markers/${sc_design}.[$markerdb getName].rpt"
173
188
  $markerdb writeJSON "reports/markers/${sc_design}.[$markerdb getName].json"
174
189
  }
@@ -210,6 +210,24 @@ proc sc_image_placement_density { } {
210
210
  "placement density"
211
211
  }
212
212
 
213
+ proc sc_image_module_view { } {
214
+ if { ![sc_has_placed_instances] } {
215
+ return
216
+ }
217
+
218
+ if { [llength [[ord::get_db_block] getModInsts]] < 1 } {
219
+ return
220
+ }
221
+
222
+ global sc_design
223
+ sc_image_setup_default
224
+
225
+ gui::set_display_controls "Misc/Module view" visible true
226
+ gui::set_display_controls "Nets/*" visible false
227
+
228
+ sc_save_image "module view" reports/images/${sc_design}.modules.png
229
+ }
230
+
213
231
  proc sc_image_clocks { } {
214
232
  if { ![sc_has_placed_instances] } {
215
233
  return
@@ -333,12 +351,18 @@ proc sc_image_markers { } {
333
351
  global sc_design
334
352
  sc_image_setup_default
335
353
 
354
+ global sc_starting_markers
355
+
336
356
  file mkdir reports/images/markers
337
357
  foreach markerdb [[ord::get_db_block] getMarkerCategories] {
338
358
  if { [$markerdb getMarkerCount] == 0 } {
339
359
  continue
340
360
  }
341
361
 
362
+ if { [lsearch -exact $sc_starting_markers [$markerdb getName]] != -1 } {
363
+ continue
364
+ }
365
+
342
366
  gui::select_marker_category $markerdb
343
367
 
344
368
  sc_save_image \
@@ -359,6 +383,10 @@ sc_image_everything
359
383
  sc_image_placement
360
384
  sc_image_routing
361
385
 
386
+ if { [sc_cfg_tool_task_check_in_list module_view var reports] } {
387
+ sc_image_module_view
388
+ }
389
+
362
390
  # Markers
363
391
  sc_image_markers
364
392
 
@@ -98,6 +98,13 @@ def syn_setup(chip):
98
98
  chip.set('tool', tool, 'task', task, 'output', design + '.vg', step=step, index=index)
99
99
  chip.add('tool', tool, 'task', task, 'output', design + '.netlist.json', step=step, index=index)
100
100
 
101
+ chip.set('tool', tool, 'task', task, 'var', 'use_slang', False,
102
+ step=step, index=index,
103
+ clobber=False)
104
+ chip.set('tool', tool, 'task', task, 'var', 'use_slang',
105
+ 'true/false, if true will attempt to use the slang frontend',
106
+ field='help')
107
+
101
108
 
102
109
  ##################################################
103
110
  def syn_post_process(chip):
@@ -39,32 +39,41 @@ source "$sc_refdir/procs.tcl"
39
39
  # TODO: the original OpenFPGA synth script used read_verilog with -nolatches. Is
40
40
  # that a flag we might want here?
41
41
 
42
- # If UHDM, ilang, or Verilog inputs exist, read them in (this allows mixed
43
- # inputs in designs). UHDM requires a version of Yosys built with this support.
44
-
45
- if { [file exists "inputs/$sc_design.uhdm"] } {
46
- set input_uhdm "inputs/$sc_design.uhdm"
47
- yosys read_uhdm $input_uhdm
48
- }
49
- if { [file exists "inputs/$sc_design.ilang"] } {
50
- set input_ilang "inputs/$sc_design.ilang"
51
- yosys read_ilang $input_ilang
52
- }
53
-
54
- if { [file exists "inputs/$sc_design.v"] } {
55
- set input_verilog "inputs/$sc_design.v"
56
- # Use -noblackbox to correctly interpret empty modules as empty,
57
- # actual black boxes are read in later
58
- # https://github.com/YosysHQ/yosys/issues/1468
59
- yosys read_verilog -noblackbox -sv $input_verilog
42
+ set input_verilog "inputs/$sc_design.v"
43
+ if { [file exists $input_verilog] } {
44
+ if { [lindex [sc_cfg_tool_task_get var use_slang] 0] == "true" && [sc_load_plugin slang] } {
45
+ # This needs some reordering of loaded to ensure blackboxes are handled
46
+ # before this
47
+ set slang_params []
48
+ if { [sc_cfg_exists option param] } {
49
+ dict for {key value} [sc_cfg_get option param] {
50
+ if { ![string is integer $value] } {
51
+ set value [concat \"$value\"]
52
+ }
53
+
54
+ lappend slang_params -G "${key}=${value}"
55
+ }
56
+ }
57
+ yosys read_slang \
58
+ -D SYNTHESIS \
59
+ --keep-hierarchy \
60
+ --top $sc_design \
61
+ {*}$slang_params \
62
+ $input_verilog
63
+ } else {
64
+ # Use -noblackbox to correctly interpret empty modules as empty,
65
+ # actual black boxes are read in later
66
+ # https://github.com/YosysHQ/yosys/issues/1468
67
+ yosys read_verilog -noblackbox -sv $input_verilog
68
+
69
+ ########################################################
70
+ # Override top level parameters
71
+ ########################################################
72
+
73
+ sc_apply_params
74
+ }
60
75
  }
61
76
 
62
- ########################################################
63
- # Override top level parameters
64
- ########################################################
65
-
66
- sc_apply_params
67
-
68
77
  ########################################################
69
78
  # Synthesis based on mode
70
79
  ########################################################
@@ -217,6 +217,33 @@ def setup_asic(chip):
217
217
  chip.set('tool', tool, 'task', task, 'file', 'synth_extra_map',
218
218
  'Files used in synthesis to perform additional techmapping', field='help')
219
219
 
220
+ chip.set('tool', tool, 'task', task, 'var', 'lock_design', False,
221
+ step=step, index=index,
222
+ clobber=False)
223
+ chip.set('tool', tool, 'task', task, 'var', 'lock_design',
224
+ 'true/false, if true will attempt to lock the design with moosic',
225
+ field='help')
226
+ chip.add('tool', tool, 'task', task, 'require',
227
+ ",".join(['tool', tool, 'task', task, 'var', 'lock_design']),
228
+ step=step, index=index)
229
+ chip.set('tool', tool, 'task', task, 'var', 'lock_design_key',
230
+ 'lock locking key',
231
+ field='help')
232
+ chip.set('tool', tool, 'task', task, 'var', 'lock_design_port', 'moosic_key',
233
+ step=step, index=index,
234
+ clobber=False)
235
+ chip.set('tool', tool, 'task', task, 'var', 'lock_design_port',
236
+ 'lock locking port name',
237
+ field='help')
238
+ if chip.get('tool', tool, 'task', task, 'var', 'lock_design', step=step, index=index)[0] == \
239
+ 'true':
240
+ chip.add('tool', tool, 'task', task, 'require',
241
+ ",".join(['tool', tool, 'task', task, 'var', 'lock_design_key']),
242
+ step=step, index=index)
243
+ chip.add('tool', tool, 'task', task, 'require',
244
+ ",".join(['tool', tool, 'task', task, 'var', 'lock_design_port']),
245
+ step=step, index=index)
246
+
220
247
 
221
248
  ################################
222
249
  # mark cells dont use and format liberty files for yosys and abc
@@ -217,6 +217,33 @@ if { !$flatten_design && [lindex [sc_cfg_tool_task_get var auto_flatten] 0] == "
217
217
  # Finish synthesis
218
218
  yosys synth {*}$synth_args -top $sc_design -run fine:check
219
219
 
220
+ # Logic locking
221
+ if { [lindex [sc_cfg_tool_task_get var lock_design] 0] == "true" } {
222
+ if { [sc_load_plugin moosic] } {
223
+ # moosic cannot handle hierarchy
224
+ foreach module [get_modules "*"] {
225
+ yosys select -module $module
226
+ yosys setattr -mod -unset keep_hierarchy
227
+ yosys select -clear
228
+ }
229
+ yosys flatten
230
+ yosys opt -fast
231
+
232
+ set ll_port [lindex [sc_cfg_tool_task_get var lock_design_port] 0]
233
+ set ll_key [lindex [sc_cfg_tool_task_get var lock_design_key] 0]
234
+ set ll_bits [expr { 4 * [string length $ll_key] }]
235
+ yosys select -module $sc_design
236
+ yosys logic_locking \
237
+ -nb-locked $ll_bits \
238
+ -key $ll_key \
239
+ -port-name $ll_port
240
+ yosys tee -o reports/logic_locking.rpt {ll_show}
241
+ yosys select -clear
242
+ } else {
243
+ puts "ERROR: unable to load moosic"
244
+ }
245
+ }
246
+
220
247
  # https://github.com/hdl/bazel_rules_hdl/blob/4cca75f32a3869a57c0635bc7426a696a15ec143/synthesis/synth.tcl#L54C1-L58C26
221
248
  # Remove $print cells. These cells represent Verilog $display() tasks.
222
249
  # Some place and route tools cannot handle these in the output Verilog,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "openroad": {
3
3
  "git-url": "https://github.com/The-OpenROAD-Project/OpenROAD.git",
4
- "git-commit": "3258b30e2c47d695ff2bb6c14a23c6779ed130bb",
4
+ "git-commit": "6e6fccbbe0ffbe683a51de3ecac2a24958a53fa1",
5
5
  "docker-cmds": [
6
6
  "# Remove OR-Tools files",
7
7
  "RUN rm -f $SC_PREFIX/Makefile $SC_PREFIX/README.md",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "sv2v": {
47
47
  "git-url": "https://github.com/zachjs/sv2v.git",
48
- "git-commit": "4ec99fcffd2c533c4a2c74ad6f56278f2672f05d",
48
+ "git-commit": "5d5723f65dd4501d17004736d7d048bea7ef2339",
49
49
  "auto-update": true
50
50
  },
51
51
  "verilator": {
@@ -136,5 +136,17 @@
136
136
  "git-commit": "v3.3.116",
137
137
  "git-url": "https://github.com/gtkwave/gtkwave.git",
138
138
  "auto-update": false
139
+ },
140
+ "yosys-slang": {
141
+ "git-url": "https://github.com/povik/yosys-slang.git",
142
+ "git-commit": "0adba99ea43331235506b9b154c78a401f4fe9b6",
143
+ "docker-depends": "yosys",
144
+ "auto-update": true
145
+ },
146
+ "yosys-moosic": {
147
+ "git-url": "https://github.com/gadfort/moosic-yosys-plugin.git",
148
+ "git-commit": "5dd1d8a60d0cc7228be856350bb90faad24dae9e",
149
+ "docker-depends": "yosys",
150
+ "auto-update": true
139
151
  }
140
152
  }
@@ -0,0 +1,17 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ # Get directory of script
6
+ src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
+
8
+ mkdir -p deps
9
+ cd deps
10
+
11
+ git clone $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-url) yosys-moosic
12
+ cd yosys-moosic
13
+ git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
14
+
15
+ make -j$(nproc)
16
+ sudo PATH="$PATH" make install
17
+ cd -
@@ -0,0 +1,22 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ # Get directory of script
6
+ src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
+
8
+ mkdir -p deps
9
+ cd deps
10
+
11
+ python3 -m venv .yosys-slang --clear
12
+ . .yosys-slang/bin/activate
13
+ python3 -m pip install cmake
14
+
15
+ git clone $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-url) yosys-slang
16
+ cd yosys-slang
17
+ git checkout $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-commit)
18
+ git submodule update --init --recursive
19
+
20
+ make -j$(nproc)
21
+ sudo PATH="$PATH" make install
22
+ cd -
@@ -0,0 +1,17 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ # Get directory of script
6
+ src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
+
8
+ mkdir -p deps
9
+ cd deps
10
+
11
+ git clone $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-url) yosys-moosic
12
+ cd yosys-moosic
13
+ git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
14
+
15
+ make -j$(nproc)
16
+ sudo PATH="$PATH" make install
17
+ cd -
@@ -0,0 +1,22 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ # Get directory of script
6
+ src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
+
8
+ mkdir -p deps
9
+ cd deps
10
+
11
+ python3 -m venv .yosys-slang --clear
12
+ . .yosys-slang/bin/activate
13
+ python3 -m pip install cmake
14
+
15
+ git clone $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-url) yosys-slang
16
+ cd yosys-slang
17
+ git checkout $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-commit)
18
+ git submodule update --init --recursive
19
+
20
+ make -j$(nproc)
21
+ sudo PATH="$PATH" make install
22
+ cd -
@@ -0,0 +1,17 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ # Get directory of script
6
+ src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
+
8
+ mkdir -p deps
9
+ cd deps
10
+
11
+ git clone $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-url) yosys-moosic
12
+ cd yosys-moosic
13
+ git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
14
+
15
+ make -j$(nproc)
16
+ sudo PATH="$PATH" make install
17
+ cd -
@@ -0,0 +1,22 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ # Get directory of script
6
+ src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
+
8
+ mkdir -p deps
9
+ cd deps
10
+
11
+ python3 -m venv .yosys-slang --clear
12
+ . .yosys-slang/bin/activate
13
+ python3 -m pip install cmake
14
+
15
+ git clone $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-url) yosys-slang
16
+ cd yosys-slang
17
+ git checkout $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-commit)
18
+ git submodule update --init --recursive
19
+
20
+ make -j$(nproc)
21
+ sudo PATH="$PATH" make install
22
+ cd -
@@ -0,0 +1,17 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ # Get directory of script
6
+ src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
+
8
+ mkdir -p deps
9
+ cd deps
10
+
11
+ git clone $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-url) yosys-moosic
12
+ cd yosys-moosic
13
+ git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
14
+
15
+ make -j$(nproc)
16
+ sudo PATH="$PATH" make install
17
+ cd -
@@ -0,0 +1,22 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ # Get directory of script
6
+ src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
+
8
+ mkdir -p deps
9
+ cd deps
10
+
11
+ python3 -m venv .yosys-slang --clear
12
+ . .yosys-slang/bin/activate
13
+ python3 -m pip install cmake
14
+
15
+ git clone $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-url) yosys-slang
16
+ cd yosys-slang
17
+ git checkout $(python3 ${src_path}/_tools.py --tool yosys-slang --field git-commit)
18
+ git submodule update --init --recursive
19
+
20
+ make -j$(nproc)
21
+ sudo PATH="$PATH" make install
22
+ cd -
@@ -0,0 +1,17 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ # Get directory of script
6
+ src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
+
8
+ mkdir -p deps
9
+ cd deps
10
+
11
+ git clone $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-url) yosys-moosic
12
+ cd yosys-moosic
13
+ git checkout $(python3 ${src_path}/_tools.py --tool yosys-moosic --field git-commit)
14
+
15
+ make -j$(nproc)
16
+ sudo PATH="$PATH" make install
17
+ cd -