siliconcompiler 0.35.4__py3-none-any.whl → 0.36.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.
Files changed (89) hide show
  1. siliconcompiler/_metadata.py +1 -1
  2. siliconcompiler/constraints/__init__.py +4 -1
  3. siliconcompiler/constraints/asic_timing.py +230 -38
  4. siliconcompiler/constraints/fpga_timing.py +209 -14
  5. siliconcompiler/constraints/timing_mode.py +82 -0
  6. siliconcompiler/data/templates/tcl/manifest.tcl.j2 +0 -6
  7. siliconcompiler/flowgraph.py +95 -42
  8. siliconcompiler/flows/generate_openroad_rcx.py +2 -2
  9. siliconcompiler/flows/highresscreenshotflow.py +37 -0
  10. siliconcompiler/library.py +2 -1
  11. siliconcompiler/package/__init__.py +39 -45
  12. siliconcompiler/project.py +4 -1
  13. siliconcompiler/scheduler/scheduler.py +64 -35
  14. siliconcompiler/scheduler/schedulernode.py +5 -2
  15. siliconcompiler/scheduler/slurm.py +7 -6
  16. siliconcompiler/scheduler/taskscheduler.py +19 -16
  17. siliconcompiler/schema/_metadata.py +1 -1
  18. siliconcompiler/schema/namedschema.py +2 -4
  19. siliconcompiler/schema_support/cmdlineschema.py +0 -3
  20. siliconcompiler/schema_support/dependencyschema.py +0 -6
  21. siliconcompiler/schema_support/record.py +4 -3
  22. siliconcompiler/tool.py +58 -27
  23. siliconcompiler/tools/_common/tcl/sc_schema_access.tcl +0 -6
  24. siliconcompiler/tools/chisel/convert.py +44 -0
  25. siliconcompiler/tools/ghdl/convert.py +37 -2
  26. siliconcompiler/tools/icarus/compile.py +14 -0
  27. siliconcompiler/tools/keplerformal/__init__.py +7 -0
  28. siliconcompiler/tools/keplerformal/lec.py +112 -0
  29. siliconcompiler/tools/klayout/drc.py +14 -0
  30. siliconcompiler/tools/klayout/export.py +40 -0
  31. siliconcompiler/tools/klayout/operations.py +40 -0
  32. siliconcompiler/tools/klayout/screenshot.py +66 -1
  33. siliconcompiler/tools/klayout/scripts/klayout_export.py +10 -40
  34. siliconcompiler/tools/klayout/scripts/klayout_show.py +4 -4
  35. siliconcompiler/tools/klayout/scripts/klayout_utils.py +13 -1
  36. siliconcompiler/tools/montage/tile.py +26 -12
  37. siliconcompiler/tools/openroad/__init__.py +11 -0
  38. siliconcompiler/tools/openroad/_apr.py +780 -11
  39. siliconcompiler/tools/openroad/antenna_repair.py +26 -0
  40. siliconcompiler/tools/openroad/fillmetal_insertion.py +14 -0
  41. siliconcompiler/tools/openroad/global_placement.py +67 -0
  42. siliconcompiler/tools/openroad/global_route.py +15 -0
  43. siliconcompiler/tools/openroad/init_floorplan.py +19 -2
  44. siliconcompiler/tools/openroad/macro_placement.py +252 -0
  45. siliconcompiler/tools/openroad/power_grid.py +43 -0
  46. siliconcompiler/tools/openroad/power_grid_analysis.py +1 -1
  47. siliconcompiler/tools/openroad/rcx_bench.py +28 -0
  48. siliconcompiler/tools/openroad/rcx_extract.py +14 -0
  49. siliconcompiler/tools/openroad/rdlroute.py +14 -0
  50. siliconcompiler/tools/openroad/repair_design.py +41 -0
  51. siliconcompiler/tools/openroad/repair_timing.py +54 -0
  52. siliconcompiler/tools/openroad/screenshot.py +31 -1
  53. siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +8 -0
  54. siliconcompiler/tools/openroad/scripts/apr/sc_init_floorplan.tcl +54 -15
  55. siliconcompiler/tools/openroad/scripts/apr/sc_irdrop.tcl +6 -4
  56. siliconcompiler/tools/openroad/scripts/apr/sc_write_data.tcl +4 -4
  57. siliconcompiler/tools/openroad/scripts/common/procs.tcl +14 -5
  58. siliconcompiler/tools/openroad/scripts/common/read_liberty.tcl +2 -2
  59. siliconcompiler/tools/openroad/scripts/common/reports.tcl +6 -3
  60. siliconcompiler/tools/openroad/scripts/common/screenshot.tcl +1 -1
  61. siliconcompiler/tools/openroad/scripts/common/write_data_physical.tcl +8 -0
  62. siliconcompiler/tools/openroad/scripts/common/write_images.tcl +16 -12
  63. siliconcompiler/tools/openroad/scripts/sc_rdlroute.tcl +3 -1
  64. siliconcompiler/tools/openroad/write_data.py +78 -2
  65. siliconcompiler/tools/opensta/scripts/sc_check_library.tcl +2 -2
  66. siliconcompiler/tools/opensta/scripts/sc_report_libraries.tcl +2 -2
  67. siliconcompiler/tools/opensta/scripts/sc_timing.tcl +12 -14
  68. siliconcompiler/tools/opensta/timing.py +42 -3
  69. siliconcompiler/tools/slang/elaborate.py +16 -1
  70. siliconcompiler/tools/surelog/parse.py +54 -0
  71. siliconcompiler/tools/verilator/compile.py +120 -0
  72. siliconcompiler/tools/vivado/syn_fpga.py +27 -0
  73. siliconcompiler/tools/vpr/route.py +40 -0
  74. siliconcompiler/tools/xdm/convert.py +14 -0
  75. siliconcompiler/tools/xyce/simulate.py +26 -0
  76. siliconcompiler/tools/yosys/lec_asic.py +13 -0
  77. siliconcompiler/tools/yosys/syn_asic.py +332 -3
  78. siliconcompiler/tools/yosys/syn_fpga.py +32 -0
  79. siliconcompiler/toolscripts/_tools.json +9 -4
  80. siliconcompiler/toolscripts/ubuntu22/install-keplerformal.sh +72 -0
  81. siliconcompiler/toolscripts/ubuntu24/install-keplerformal.sh +72 -0
  82. siliconcompiler/utils/multiprocessing.py +11 -0
  83. siliconcompiler/utils/settings.py +70 -49
  84. {siliconcompiler-0.35.4.dist-info → siliconcompiler-0.36.1.dist-info}/METADATA +4 -4
  85. {siliconcompiler-0.35.4.dist-info → siliconcompiler-0.36.1.dist-info}/RECORD +89 -83
  86. {siliconcompiler-0.35.4.dist-info → siliconcompiler-0.36.1.dist-info}/WHEEL +0 -0
  87. {siliconcompiler-0.35.4.dist-info → siliconcompiler-0.36.1.dist-info}/entry_points.txt +0 -0
  88. {siliconcompiler-0.35.4.dist-info → siliconcompiler-0.36.1.dist-info}/licenses/LICENSE +0 -0
  89. {siliconcompiler-0.35.4.dist-info → siliconcompiler-0.36.1.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,5 @@
1
+ from typing import Optional, Union
2
+
1
3
  from siliconcompiler.tools.openroad._apr import APRTask
2
4
  from siliconcompiler.tools.openroad._apr import OpenROADSTAParameter, OpenROADRSZDRVParameter
3
5
 
@@ -20,6 +22,45 @@ class RepairDesignTask(APRTask, OpenROADSTAParameter, OpenROADRSZDRVParameter):
20
22
  "true/false, when true enables adding buffers to the output ports",
21
23
  defvalue=False)
22
24
 
25
+ def set_openroad_tieseparation(self, separation: float,
26
+ step: Optional[str] = None,
27
+ index: Optional[Union[int, str]] = None):
28
+ """
29
+ Sets the maximum distance between tie high/low cells.
30
+
31
+ Args:
32
+ separation (float): The separation distance in microns.
33
+ step (str, optional): The specific step to apply this configuration to.
34
+ index (str, optional): The specific index to apply this configuration to.
35
+ """
36
+ self.set("var", "ifp_tie_separation", separation, step=step, index=index)
37
+
38
+ def set_openroad_bufferinputs(self, enable: bool,
39
+ step: Optional[str] = None,
40
+ index: Optional[Union[int, str]] = None):
41
+ """
42
+ Enables or disables adding buffers to the input ports.
43
+
44
+ Args:
45
+ enable (bool): True to enable, False to disable.
46
+ step (str, optional): The specific step to apply this configuration to.
47
+ index (str, optional): The specific index to apply this configuration to.
48
+ """
49
+ self.set("var", "rsz_buffer_inputs", enable, step=step, index=index)
50
+
51
+ def set_openroad_bufferoutputs(self, enable: bool,
52
+ step: Optional[str] = None,
53
+ index: Optional[Union[int, str]] = None):
54
+ """
55
+ Enables or disables adding buffers to the output ports.
56
+
57
+ Args:
58
+ enable (bool): True to enable, False to disable.
59
+ step (str, optional): The specific step to apply this configuration to.
60
+ index (str, optional): The specific index to apply this configuration to.
61
+ """
62
+ self.set("var", "rsz_buffer_outputs", enable, step=step, index=index)
63
+
23
64
  def task(self):
24
65
  return "repair_design"
25
66
 
@@ -1,3 +1,5 @@
1
+ from typing import Optional, Union
2
+
1
3
  from siliconcompiler.tools.openroad._apr import APRTask
2
4
  from siliconcompiler.tools.openroad._apr import OpenROADSTAParameter, OpenROADDPLParameter, \
3
5
  OpenROADRSZDRVParameter, OpenROADRSZTimingParameter, OpenROADFillCellsParameter
@@ -21,6 +23,58 @@ class RepairTimingTask(APRTask, OpenROADSTAParameter, OpenROADDPLParameter,
21
23
  self.add_parameter("rsz_skip_recover_power", "bool", "skip power recovery",
22
24
  defvalue=False)
23
25
 
26
+ def set_openroad_skipdrvrepair(self, skip: bool,
27
+ step: Optional[str] = None,
28
+ index: Optional[Union[int, str]] = None):
29
+ """
30
+ Enables or disables skipping design rule violation repair.
31
+
32
+ Args:
33
+ skip (bool): True to skip repair, False to perform it.
34
+ step (str, optional): The specific step to apply this configuration to.
35
+ index (str, optional): The specific index to apply this configuration to.
36
+ """
37
+ self.set("var", "rsz_skip_drv_repair", skip, step=step, index=index)
38
+
39
+ def set_openroad_skipsetuprepair(self, skip: bool,
40
+ step: Optional[str] = None,
41
+ index: Optional[Union[int, str]] = None):
42
+ """
43
+ Enables or disables skipping setup timing repair.
44
+
45
+ Args:
46
+ skip (bool): True to skip repair, False to perform it.
47
+ step (str, optional): The specific step to apply this configuration to.
48
+ index (str, optional): The specific index to apply this configuration to.
49
+ """
50
+ self.set("var", "rsz_skip_setup_repair", skip, step=step, index=index)
51
+
52
+ def set_openroad_skipholdrepair(self, skip: bool,
53
+ step: Optional[str] = None,
54
+ index: Optional[Union[int, str]] = None):
55
+ """
56
+ Enables or disables skipping hold timing repair.
57
+
58
+ Args:
59
+ skip (bool): True to skip repair, False to perform it.
60
+ step (str, optional): The specific step to apply this configuration to.
61
+ index (str, optional): The specific index to apply this configuration to.
62
+ """
63
+ self.set("var", "rsz_skip_hold_repair", skip, step=step, index=index)
64
+
65
+ def set_openroad_skiprecoverpower(self, skip: bool,
66
+ step: Optional[str] = None,
67
+ index: Optional[Union[int, str]] = None):
68
+ """
69
+ Enables or disables skipping power recovery.
70
+
71
+ Args:
72
+ skip (bool): True to skip recovery, False to perform it.
73
+ step (str, optional): The specific step to apply this configuration to.
74
+ index (str, optional): The specific index to apply this configuration to.
75
+ """
76
+ self.set("var", "rsz_skip_recover_power", skip, step=step, index=index)
77
+
24
78
  def task(self):
25
79
  return "repair_timing"
26
80
 
@@ -1,3 +1,5 @@
1
+ from typing import Optional, Union
2
+
1
3
  from siliconcompiler import ScreenshotTask
2
4
  from siliconcompiler.tools.openroad.show import ShowTask
3
5
 
@@ -9,10 +11,38 @@ class ScreenshotTask(ScreenshotTask, ShowTask):
9
11
  def __init__(self):
10
12
  super().__init__()
11
13
 
12
- self.add_parameter("show_vertical_resolution", "int", "blah", defvalue=1024)
14
+ self.add_parameter("show_vertical_resolution", "int",
15
+ "Vertical resolution of the screenshot image",
16
+ defvalue=1024)
13
17
  self.add_parameter("include_report_images", "bool",
14
18
  "true/false, include the images in reports/", defvalue=False)
15
19
 
20
+ def set_openroad_verticalresolution(self, value: int,
21
+ step: Optional[str] = None,
22
+ index: Optional[Union[int, str]] = None):
23
+ """
24
+ Set the vertical resolution for OpenROAD screenshots.
25
+
26
+ Args:
27
+ value (int): The vertical resolution in pixels.
28
+ step (Optional[str]): The step in the flow where this setting applies.
29
+ index (Optional[Union[int, str]]): The index for multiple runs or configurations.
30
+ """
31
+ self.set("var", "show_vertical_resolution", value, step=step, index=index)
32
+
33
+ def set_openroad_includereportimages(self, value: bool,
34
+ step: Optional[str] = None,
35
+ index: Optional[Union[int, str]] = None):
36
+ """
37
+ Set whether to include report images in the output.
38
+
39
+ Args:
40
+ value (bool): Whether to include report images.
41
+ step (Optional[str]): The step in the flow where this setting applies.
42
+ index (Optional[Union[int, str]]): The index for multiple runs or configurations.
43
+ """
44
+ self.set("var", "include_report_images", value, step=step, index=index)
45
+
16
46
  def setup(self):
17
47
  super().setup()
18
48
 
@@ -92,3 +92,11 @@ tee -file reports/global_connections.start.rpt {report_global_connect}
92
92
  if { [sc_cfg_tool_task_check_in_list report_buffers var reports] && [sc_check_version 23264] } {
93
93
  tee -quiet -file reports/report_buffers.rpt {report_buffers -filtered}
94
94
  }
95
+ tee -quiet -file reports/report_units.rpt {report_units}
96
+
97
+ tee -quiet -file reports/report_layer_rc.rpt {report_layer_rc}
98
+ foreach corner [sta::corners] {
99
+ set corner_name [$corner name]
100
+ tee -quiet -append -file reports/report_layer_rc.rpt "puts \"Corner: $corner_name\""
101
+ tee -quiet -append -file reports/report_layer_rc.rpt "report_layer_rc -corner $corner_name"
102
+ }
@@ -149,7 +149,7 @@ set sc_hpinmetal [sc_get_layer_name [sc_cfg_tool_task_get var pin_layer_horizont
149
149
  set sc_vpinmetal [sc_get_layer_name [sc_cfg_tool_task_get var pin_layer_vertical]]
150
150
 
151
151
  if { [sc_cfg_exists constraint pin] } {
152
- source "[sc_cfg_tool_task_get file sc_pin_constraint]"
152
+ source [sc_cfg_tool_task_get var sc_pin_constraints_tcl]
153
153
 
154
154
  proc sc_pin_print { arg } { utl::warn FLW 1 $arg }
155
155
  proc sc_pin_layer_select { pin } {
@@ -299,6 +299,8 @@ if { [sc_cfg_exists constraint component] } {
299
299
  set x_grid [ord::dbu_to_microns $x_grid]
300
300
  set y_grid [ord::dbu_to_microns $y_grid]
301
301
 
302
+ set sc_placed_insts []
303
+
302
304
  dict for {name params} [sc_cfg_get constraint component] {
303
305
  set location [dict get $params placement]
304
306
  set rotation [sc_convert_rotation [dict get $params rotation]]
@@ -308,11 +310,27 @@ if { [sc_cfg_exists constraint component] } {
308
310
  } else {
309
311
  set cell ""
310
312
  }
313
+ set halo {}
311
314
  if { [llength [dict get $params halo]] != 0 } {
312
- utl::warn FLW 1 "Halo is not supported in OpenROAD"
315
+ if { [llength [dict get $params halo]] == 2 } {
316
+ set halo [dict get $params halo]
317
+ } else {
318
+ utl::warn FLW 1 "Halo must be a list of 2 elements"
319
+ }
313
320
  }
314
321
 
315
- set inst [[ord::get_db_block] findInst $name]
322
+ set stainst [get_cells -quiet $name]
323
+ if { $stainst != {} } {
324
+ if { [llength $stainst] > 1 } {
325
+ utl::error FLW 1 "Multiple cells found for instance $name"
326
+ }
327
+ set inst [sta::sta_to_db_inst $stainst]
328
+ } else {
329
+ set inst "NULL"
330
+ }
331
+ if { $inst == "NULL" } {
332
+ set inst [[ord::get_db_block] findInst $name]
333
+ }
316
334
  if { $inst == "NULL" } {
317
335
  utl::warn FLW 1 "Could not find instance: $name"
318
336
 
@@ -324,23 +342,44 @@ if { [sc_cfg_exists constraint component] } {
324
342
  set cell ""
325
343
  }
326
344
 
327
- set x_loc [expr { round([lindex $location 0] / $x_grid) * $x_grid }]
328
- set y_loc [expr { round([lindex $location 1] / $y_grid) * $y_grid }]
345
+ if { $inst != "NULL" } {
346
+ set name [$inst getName]
347
+ }
348
+
349
+ if { [llength $location] == 2 } {
350
+ # Only place if location is specified
351
+ set x_loc [expr { round([lindex $location 0] / $x_grid) * $x_grid }]
352
+ set y_loc [expr { round([lindex $location 1] / $y_grid) * $y_grid }]
353
+
354
+ set place_inst_args []
355
+ if { $cell != "" } {
356
+ lappend place_inst_args -cell $cell
357
+ }
329
358
 
330
- set place_inst_args []
331
- if { $cell != "" } {
332
- lappend place_inst_args -cell $cell
359
+ place_inst \
360
+ -name $name \
361
+ -origin "$x_loc $y_loc" \
362
+ -orient $rotation \
363
+ -status FIRM \
364
+ {*}$place_inst_args
333
365
  }
334
366
 
335
- place_inst \
336
- -name $name \
337
- -location "$x_loc $y_loc" \
338
- -orient $rotation \
339
- -status FIRM \
340
- {*}$place_inst_args
367
+ if { $halo != {} } {
368
+ set inst [[ord::get_db_block] findInst $name]
369
+ set halo_box [$inst getHalo]
370
+ if { $halo_box != "NULL" } {
371
+ odb::dbBox_destroy $halo_box
372
+ }
373
+ odb::dbBox_create $inst \
374
+ [ord::microns_to_dbu [lindex $halo 0]] \
375
+ [ord::microns_to_dbu [lindex $halo 1]] \
376
+ [ord::microns_to_dbu [lindex $halo 0]] \
377
+ [ord::microns_to_dbu [lindex $halo 1]]
378
+ }
379
+ lappend sc_placed_insts $name
341
380
  }
342
381
 
343
- sc_print_macro_information
382
+ sc_print_macro_information $sc_placed_insts
344
383
  }
345
384
 
346
385
  if { [sc_check_version 23008] } {
@@ -89,7 +89,8 @@ foreach net $nets {
89
89
  foreach corner $sc_scenarios {
90
90
  analyze_power_grid -net $net -corner $corner -allow_reuse
91
91
 
92
- save_animated_gif -start "reports/${net}/${corner}.gif"
92
+ set gif [save_animated_gif -start "reports/${net}/${corner}.gif"]
93
+ set gif_log [save_animated_gif -start "reports/${net}/${corner}_log.gif"]
93
94
 
94
95
  foreach layer [[ord::get_db_tech] getLayers] {
95
96
  if { [$layer getRoutingLevel] == 0 } {
@@ -123,7 +124,7 @@ foreach net $nets {
123
124
  sc_save_image \
124
125
  "IR drop for $net on $layer_name for $corner heatmap" \
125
126
  reports/${net}/${corner}.${layer_name}.png \
126
- true
127
+ $gif
127
128
 
128
129
  gui::set_heatmap IRDrop LogScale 1
129
130
  gui::set_heatmap IRDrop rebuild
@@ -131,7 +132,7 @@ foreach net $nets {
131
132
  sc_save_image \
132
133
  "IR drop for $net on $layer_name for $corner heatmap" \
133
134
  reports/${net}/${corner}.${layer_name}_log.png \
134
- false
135
+ $gif_log
135
136
 
136
137
  gui::set_display_controls "Heat Maps/IR Drop" visible false
137
138
 
@@ -139,7 +140,8 @@ foreach net $nets {
139
140
  gui::delete_label $label
140
141
  }
141
142
  }
142
- save_animated_gif -end
143
+ save_animated_gif -end -key $gif
144
+ save_animated_gif -end -key $gif_log
143
145
  }
144
146
  }
145
147
 
@@ -60,7 +60,7 @@ if { [sc_cfg_tool_task_get var write_spef] } {
60
60
  if { [sc_cfg_tool_task_get var use_spef] } {
61
61
  set lib_pex [dict create]
62
62
  foreach scenario $sc_scenarios {
63
- set pexcorner [sc_cfg_get constraint timing $scenario pexcorner]
63
+ set pexcorner [sc_cfg_get constraint timing scenario $scenario pexcorner]
64
64
 
65
65
  dict set lib_pex $scenario $pexcorner
66
66
  }
@@ -107,11 +107,11 @@ foreach corner $sc_scenarios {
107
107
  ###############################
108
108
 
109
109
  foreach corner $sc_scenarios {
110
- if { [sc_cfg_exists constraint timing $corner voltage] } {
111
- foreach net [dict keys [sc_cfg_get constraint timing $corner voltage]] {
110
+ if { [sc_cfg_exists constraint timing scenario $corner voltage] } {
111
+ foreach net [dict keys [sc_cfg_get constraint timing scenario $corner voltage]] {
112
112
  set_pdnsim_net_voltage -corner $corner \
113
113
  -net $net \
114
- -voltage [sc_cfg_get constraint timing $corner voltage $net]
114
+ -voltage [sc_cfg_get constraint timing scenario $corner voltage $net]
115
115
  }
116
116
  }
117
117
  }
@@ -238,10 +238,10 @@ proc sc_design_has_unplaced_macros { } {
238
238
  # Print macros placement
239
239
  ###########################
240
240
 
241
- proc sc_print_macro_information { } {
241
+ proc sc_print_macro_information { { insts [] } } {
242
242
  set print_header "true"
243
243
  foreach inst [[ord::get_db_block] getInsts] {
244
- if { [$inst isBlock] } {
244
+ if { [$inst isBlock] || [lsearch -exact $insts [$inst getName]] != -1 } {
245
245
  set master [$inst getMaster]
246
246
  set status [$inst getPlacementStatus]
247
247
 
@@ -388,17 +388,22 @@ proc sc_psm_check_nets { } {
388
388
  # Save an image
389
389
  ###########################
390
390
 
391
- proc sc_save_image { title path { gif false } { pixels 1000 } } {
391
+ proc sc_save_image { title path { gif -1 } { pixels 1000 } } {
392
392
  utl::info FLW 1 "Saving \"$title\" to $path"
393
393
 
394
394
  save_image -resolution [sc_image_resolution $pixels] \
395
395
  -area [sc_image_area] \
396
396
  $path
397
397
 
398
- if { $gif } {
398
+ if { $gif >= 0 } {
399
+ set gif_args []
400
+ if { [sc_check_version 26866] } {
401
+ lappend gif_args -key $gif
402
+ }
399
403
  save_animated_gif -add \
400
404
  -resolution [sc_image_resolution $pixels] \
401
- -area [sc_image_area]
405
+ -area [sc_image_area] \
406
+ {*}$gif_args
402
407
  }
403
408
  }
404
409
 
@@ -458,6 +463,10 @@ proc sc_image_setup_default { } {
458
463
  gui::set_display_controls "Nets/*" visible true
459
464
  gui::set_display_controls "Instances/*" visible true
460
465
  gui::set_display_controls "Shape Types/*" visible true
466
+ if { [llength [[ord::get_db_block] getBTerms]] > 10000 } {
467
+ # Avoid performance issues with too many IOs
468
+ gui::set_display_controls "Shape Types/Pins" visible false
469
+ }
461
470
  gui::set_display_controls "Misc/Instances/*" visible true
462
471
  gui::set_display_controls "Misc/Instances/Pin Names" visible false
463
472
  gui::set_display_controls "Misc/Scale bar" visible true
@@ -1,4 +1,4 @@
1
- set sc_scenarios [dict keys [sc_cfg_get constraint timing]]
1
+ set sc_scenarios [dict keys [sc_cfg_get constraint timing scenario]]
2
2
  set sc_delaymodel [sc_cfg_get asic delaymodel]
3
3
 
4
4
  # Read Liberty
@@ -7,7 +7,7 @@ define_corners {*}$sc_scenarios
7
7
  foreach corner $sc_scenarios {
8
8
  foreach lib $sc_logiclibs {
9
9
  set lib_filesets []
10
- foreach libcorner [sc_cfg_get constraint timing $corner libcorner] {
10
+ foreach libcorner [sc_cfg_get constraint timing scenario $corner libcorner] {
11
11
  if { [sc_cfg_exists library $lib asic libcornerfileset $libcorner $sc_delaymodel] } {
12
12
  lappend lib_filesets \
13
13
  {*}[sc_cfg_get library $lib asic libcornerfileset $libcorner $sc_delaymodel]
@@ -84,13 +84,16 @@ if { [sc_cfg_tool_task_check_in_list drv_violations var reports] } {
84
84
  }
85
85
 
86
86
  puts "$PREFIX floating nets"
87
- tee -file reports/floating_nets.rpt \
87
+ puts "Reporting floating nets: reports/floating_nets.rpt"
88
+ tee -quiet -file reports/floating_nets.rpt \
88
89
  "report_floating_nets -verbose"
89
90
  if { [sc_check_version 19048] } {
90
91
  puts "$PREFIX overdriven nets"
91
- tee -file reports/overdriven_nets.rpt \
92
+ puts "Reporting overdriven nets: reports/overdriven_nets.rpt"
93
+ tee -quiet -file reports/overdriven_nets.rpt \
92
94
  "report_overdriven_nets -verbose"
93
- tee -file reports/overdriven_nets_with_parallel.rpt \
95
+ puts "Reporting overdriven nets: reports/overdriven_nets_with_parallel.rpt"
96
+ tee -quiet -file reports/overdriven_nets_with_parallel.rpt \
94
97
  "report_overdriven_nets -include_parallel_driven -verbose"
95
98
  }
96
99
 
@@ -5,7 +5,7 @@ sc_image_setup_default
5
5
  sc_save_image \
6
6
  "screenshot" \
7
7
  "outputs/${sc_topmodule}.png" \
8
- false \
8
+ -1 \
9
9
  [sc_cfg_tool_task_get var show_vertical_resolution]
10
10
 
11
11
  gui::restore_display_controls
@@ -1,3 +1,11 @@
1
1
  write_db "outputs/${sc_topmodule}.odb"
2
2
  write_def "outputs/${sc_topmodule}.def"
3
3
  write_verilog -include_pwr_gnd "outputs/${sc_topmodule}.vg"
4
+
5
+ set remove_cells []
6
+ foreach lib [sc_cfg_get asic asiclib] {
7
+ foreach celltype "decap tie filler tap endcap antenna physicalonly" {
8
+ lappend remove_cells {*}[sc_cfg_get library $lib asic cells $celltype]
9
+ }
10
+ }
11
+ write_verilog -remove_cells $remove_cells "outputs/${sc_topmodule}.lec.vg"
@@ -1,6 +1,6 @@
1
1
  # Adopted from https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/3f9740e6b3643835e918d78ae1d377d65af0f0fb/flow/scripts/save_images.tcl
2
2
 
3
- proc sc_image_heatmap { name ident image_name title { gif false } { allow_bin_adjust 1 } } {
3
+ proc sc_image_heatmap { name ident image_name title { gif -1 } { allow_bin_adjust 1 } } {
4
4
  lassign [sc_cfg_tool_task_get var ord_heatmap_bins] ord_heatmap_bins_x ord_heatmap_bins_y
5
5
 
6
6
  file mkdir reports/images/heatmap
@@ -124,12 +124,12 @@ proc sc_image_irdrop { net corner } {
124
124
  return
125
125
  }
126
126
 
127
- set gif false
127
+ set gif -1
128
128
  if { [sc_check_version 21574] } {
129
- set gif true
130
- }
131
- if { $gif } {
132
- save_animated_gif -start "reports/images/heatmap/irdrop/${net}.${corner}.gif"
129
+ set gif [save_animated_gif -start "reports/images/heatmap/irdrop/${net}.${corner}.gif"]
130
+ if { $gif == "" } {
131
+ set gif 0
132
+ }
133
133
  }
134
134
  foreach layer [[ord::get_db_tech] getLayers] {
135
135
  if { [$layer getRoutingLevel] == 0 } {
@@ -160,8 +160,12 @@ proc sc_image_irdrop { net corner } {
160
160
  gui::delete_label $label
161
161
  }
162
162
  }
163
- if { $gif } {
164
- save_animated_gif -end
163
+ if { $gif >= 0 } {
164
+ if { [sc_check_version 26866] } {
165
+ save_animated_gif -end -key $gif
166
+ } else {
167
+ save_animated_gif -end
168
+ }
165
169
  }
166
170
  }
167
171
 
@@ -176,7 +180,7 @@ proc sc_image_routing_congestion { } {
176
180
  "Routing" \
177
181
  "routing_congestion.png" \
178
182
  "routing congestion" \
179
- 0 \
183
+ -1 \
180
184
  0
181
185
  }
182
186
 
@@ -194,7 +198,7 @@ proc sc_image_estimated_routing_congestion { } {
194
198
  "RUDY" \
195
199
  "estimated_routing_congestion.png" \
196
200
  "estimated routing congestion" \
197
- 0 \
201
+ -1 \
198
202
  0
199
203
  } err
200
204
  unsuppress_message GRT 10
@@ -342,7 +346,7 @@ proc sc_image_timing_histograms { } {
342
346
 
343
347
  if { [sc_cfg_tool_task_check_in_list setup var reports] } {
344
348
  set path reports/images/timing/setup.histogram.png
345
- utl::info FLW 1 "Saving setup timing histogram to $path"
349
+ utl::info FLW 1 "Saving \"setup timing histogram\" to $path"
346
350
  save_histogram_image $path \
347
351
  -mode setup \
348
352
  -width 500 \
@@ -350,7 +354,7 @@ proc sc_image_timing_histograms { } {
350
354
  }
351
355
  if { [sc_cfg_tool_task_check_in_list hold var reports] } {
352
356
  set path reports/images/timing/hold.histogram.png
353
- utl::info FLW 1 "Saving hold timing histogram to $path"
357
+ utl::info FLW 1 "Saving \"hold timing histogram\" to $path"
354
358
  save_histogram_image $path \
355
359
  -mode hold \
356
360
  -width 500 \
@@ -149,5 +149,7 @@ utl::pop_metrics_stage
149
149
  ###############################
150
150
 
151
151
  utl::push_metrics_stage "sc__write__{}"
152
- source "$sc_refdir/common/write_data_physical.tcl"
152
+ write_db "outputs/${sc_topmodule}.odb"
153
+ write_def "outputs/${sc_topmodule}.def"
154
+ write_verilog -include_pwr_gnd "outputs/${sc_topmodule}.vg"
153
155
  utl::pop_metrics_stage
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from siliconcompiler.tools.openroad._apr import APRTask
2
4
  from siliconcompiler.tools.openroad._apr import OpenROADSTAParameter, OpenROADPSMParameter
3
5
 
@@ -32,6 +34,80 @@ class WriteViewsTask(APRTask, OpenROADSTAParameter, OpenROADPSMParameter):
32
34
 
33
35
  self.add_parameter("pex_corners", "{str}", "set of pex corners to perform extraction on")
34
36
 
37
+ def set_openroad_abstractlefbloatlayers(self, enable: bool,
38
+ step: Optional[str] = None,
39
+ index: Optional[str] = None):
40
+ """
41
+ Enables or disables filling all layers when writing the abstract LEF.
42
+
43
+ Args:
44
+ enable (bool): True to enable, False to disable.
45
+ step (str, optional): The specific step to apply this configuration to.
46
+ index (str, optional): The specific index to apply this configuration to.
47
+ """
48
+ self.set("var", "ord_abstract_lef_bloat_layers", enable, step=step, index=index)
49
+
50
+ def set_openroad_abstractlefbloatfactor(self, factor: int,
51
+ step: Optional[str] = None,
52
+ index: Optional[str] = None):
53
+ """
54
+ Sets the bloat factor to apply when writing the abstract LEF.
55
+
56
+ Args:
57
+ factor (int): The bloat factor.
58
+ step (str, optional): The specific step to apply this configuration to.
59
+ index (str, optional): The specific index to apply this configuration to.
60
+ """
61
+ self.set("var", "ord_abstract_lef_bloat_factor", factor, step=step, index=index)
62
+
63
+ def set_openroad_writecdl(self, enable: bool,
64
+ step: Optional[str] = None, index: Optional[str] = None):
65
+ """
66
+ Enables or disables writing the CDL file.
67
+
68
+ Args:
69
+ enable (bool): True to enable, False to disable.
70
+ step (str, optional): The specific step to apply this configuration to.
71
+ index (str, optional): The specific index to apply this configuration to.
72
+ """
73
+ self.set("var", "write_cdl", enable, step=step, index=index)
74
+
75
+ def set_openroad_writespef(self, enable: bool,
76
+ step: Optional[str] = None, index: Optional[str] = None):
77
+ """
78
+ Enables or disables writing the SPEF file.
79
+
80
+ Args:
81
+ enable (bool): True to enable, False to disable.
82
+ step (str, optional): The specific step to apply this configuration to.
83
+ index (str, optional): The specific index to apply this configuration to.
84
+ """
85
+ self.set("var", "write_spef", enable, step=step, index=index)
86
+
87
+ def set_openroad_writeliberty(self, enable: bool,
88
+ step: Optional[str] = None, index: Optional[str] = None):
89
+ """
90
+ Enables or disables writing the Liberty timing model.
91
+
92
+ Args:
93
+ enable (bool): True to enable, False to disable.
94
+ step (str, optional): The specific step to apply this configuration to.
95
+ index (str, optional): The specific index to apply this configuration to.
96
+ """
97
+ self.set("var", "write_liberty", enable, step=step, index=index)
98
+
99
+ def set_openroad_writesdf(self, enable: bool,
100
+ step: Optional[str] = None, index: Optional[str] = None):
101
+ """
102
+ Enables or disables writing the SDF timing model.
103
+
104
+ Args:
105
+ enable (bool): True to enable, False to disable.
106
+ step (str, optional): The specific step to apply this configuration to.
107
+ index (str, optional): The specific index to apply this configuration to.
108
+ """
109
+ self.set("var", "write_sdf", enable, step=step, index=index)
110
+
35
111
  def task(self):
36
112
  return "write_data"
37
113
 
@@ -74,10 +150,10 @@ class WriteViewsTask(APRTask, OpenROADSTAParameter, OpenROADPSMParameter):
74
150
  for corner in self.get("var", "pex_corners"):
75
151
  self.add_output_file(ext=f"{corner}.spef")
76
152
  if self.get("var", "write_liberty"):
77
- for corner in self.project.getkeys("constraint", "timing"):
153
+ for corner in self.project.getkeys("constraint", "timing", "scenario"):
78
154
  self.add_output_file(ext=f"{corner}.lib")
79
155
  if self.get("var", "write_sdf"):
80
- for corner in self.project.getkeys("constraint", "timing"):
156
+ for corner in self.project.getkeys("constraint", "timing", "scenario"):
81
157
  self.add_output_file(ext=f"{corner}.sdf")
82
158
 
83
159
  self.add_required_key("var", "ord_abstract_lef_bloat_layers")
@@ -22,7 +22,7 @@ set sc_design [sc_top]
22
22
  # APR Parameters
23
23
  set sc_targetlibs [sc_get_asic_libraries logic]
24
24
  set sc_delaymodel [sc_cfg_get asic delaymodel]
25
- set sc_scenarios [dict keys [sc_cfg_get constraint timing]]
25
+ set sc_scenarios [dict keys [sc_cfg_get constraint timing scenario]]
26
26
 
27
27
  ###############################
28
28
  # Optional
@@ -41,7 +41,7 @@ define_corners {*}$sc_scenarios
41
41
  foreach lib "$sc_targetlibs $sc_macrolibs" {
42
42
  #Liberty
43
43
  foreach corner $sc_scenarios {
44
- foreach libcorner [sc_cfg_get constraint timing $corner libcorner] {
44
+ foreach libcorner [sc_cfg_get constraint timing scenario $corner libcorner] {
45
45
  if { [sc_cfg_exists library $lib output $libcorner $sc_delaymodel] } {
46
46
  foreach lib_file [sc_cfg_get library $lib output $libcorner $sc_delaymodel] {
47
47
  puts "Reading liberty file for ${corner} ($libcorner): ${lib_file}"