siliconcompiler 0.27.0__py3-none-any.whl → 0.28.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 (87) hide show
  1. siliconcompiler/_metadata.py +1 -1
  2. siliconcompiler/core.py +9 -1
  3. siliconcompiler/data/RobotoMono/__init__.py +0 -0
  4. siliconcompiler/data/__init__.py +0 -0
  5. siliconcompiler/flows/generate_openroad_rcx.py +1 -1
  6. siliconcompiler/remote/server_schema/__init__.py +0 -0
  7. siliconcompiler/remote/server_schema/requests/__init__.py +0 -0
  8. siliconcompiler/remote/server_schema/responses/__init__.py +0 -0
  9. siliconcompiler/scheduler/__init__.py +6 -4
  10. siliconcompiler/scheduler/validation/__init__.py +0 -0
  11. siliconcompiler/schema/schema_cfg.py +351 -281
  12. siliconcompiler/schema/schema_obj.py +5 -3
  13. siliconcompiler/sphinx_ext/dynamicgen.py +35 -15
  14. siliconcompiler/sphinx_ext/schemagen.py +4 -1
  15. siliconcompiler/templates/__init__.py +0 -0
  16. siliconcompiler/templates/email/__init__.py +0 -0
  17. siliconcompiler/templates/issue/__init__.py +0 -0
  18. siliconcompiler/templates/report/__init__.py +0 -0
  19. siliconcompiler/templates/slurm/__init__.py +0 -0
  20. siliconcompiler/templates/tcl/__init__.py +0 -0
  21. siliconcompiler/tools/_common/sdc/__init__.py +0 -0
  22. siliconcompiler/tools/_common/tcl/__init__.py +0 -0
  23. siliconcompiler/tools/_common/tcl/sc_pin_constraints.tcl +1 -2
  24. siliconcompiler/tools/bambu/__init__.py +0 -0
  25. siliconcompiler/tools/bluespec/__init__.py +0 -0
  26. siliconcompiler/tools/builtin/__init__.py +0 -0
  27. siliconcompiler/tools/builtin/concatenate.py +16 -0
  28. siliconcompiler/tools/chisel/__init__.py +0 -0
  29. siliconcompiler/tools/execute/__init__.py +0 -0
  30. siliconcompiler/tools/genfasm/__init__.py +0 -0
  31. siliconcompiler/tools/ghdl/__init__.py +0 -0
  32. siliconcompiler/tools/icarus/__init__.py +0 -0
  33. siliconcompiler/tools/icepack/__init__.py +0 -0
  34. siliconcompiler/tools/klayout/__init__.py +0 -0
  35. siliconcompiler/tools/klayout/klayout.py +1 -0
  36. siliconcompiler/tools/magic/__init__.py +0 -0
  37. siliconcompiler/tools/magic/sc_drc.tcl +5 -5
  38. siliconcompiler/tools/magic/sc_extspice.tcl +3 -3
  39. siliconcompiler/tools/magic/sc_magic.tcl +2 -2
  40. siliconcompiler/tools/montage/__init__.py +0 -0
  41. siliconcompiler/tools/netgen/__init__.py +0 -0
  42. siliconcompiler/tools/netgen/sc_lvs.tcl +3 -3
  43. siliconcompiler/tools/nextpnr/__init__.py +0 -0
  44. siliconcompiler/tools/openfpgaloader/__init__.py +0 -0
  45. siliconcompiler/tools/openroad/scripts/__init__.py +0 -0
  46. siliconcompiler/tools/openroad/scripts/sc_apr.tcl +36 -34
  47. siliconcompiler/tools/openroad/scripts/sc_cts.tcl +0 -1
  48. siliconcompiler/tools/openroad/scripts/sc_dfm.tcl +4 -2
  49. siliconcompiler/tools/openroad/scripts/sc_export.tcl +4 -2
  50. siliconcompiler/tools/openroad/scripts/sc_floorplan.tcl +29 -33
  51. siliconcompiler/tools/openroad/scripts/sc_metrics.tcl +4 -2
  52. siliconcompiler/tools/openroad/scripts/sc_physyn.tcl +0 -1
  53. siliconcompiler/tools/openroad/scripts/sc_procs.tcl +12 -6
  54. siliconcompiler/tools/openroad/scripts/sc_rcx.tcl +9 -9
  55. siliconcompiler/tools/openroad/scripts/sc_route.tcl +8 -4
  56. siliconcompiler/tools/openroad/scripts/sc_screenshot.tcl +5 -3
  57. siliconcompiler/tools/openroad/scripts/sc_write_images.tcl +27 -25
  58. siliconcompiler/tools/openroad/templates/__init__.py +0 -0
  59. siliconcompiler/tools/opensta/scripts/__init__.py +0 -0
  60. siliconcompiler/tools/opensta/scripts/sc_procs.tcl +0 -1
  61. siliconcompiler/tools/surelog/templates/__init__.py +0 -0
  62. siliconcompiler/tools/sv2v/__init__.py +0 -0
  63. siliconcompiler/tools/template/__init__.py +0 -0
  64. siliconcompiler/tools/verilator/__init__.py +0 -0
  65. siliconcompiler/tools/verilator/compile.py +1 -4
  66. siliconcompiler/tools/verilator/verilator.py +1 -2
  67. siliconcompiler/tools/vivado/scripts/__init__.py +0 -0
  68. siliconcompiler/tools/vivado/scripts/sc_run.tcl +7 -8
  69. siliconcompiler/tools/vivado/vivado.py +1 -1
  70. siliconcompiler/tools/vpr/__init__.py +0 -0
  71. siliconcompiler/tools/vpr/place.py +20 -6
  72. siliconcompiler/tools/vpr/vpr.py +1 -1
  73. siliconcompiler/tools/xyce/__init__.py +0 -0
  74. siliconcompiler/tools/yosys/__init__.py +0 -0
  75. siliconcompiler/tools/yosys/sc_lec.tcl +7 -7
  76. siliconcompiler/tools/yosys/sc_syn.tcl +9 -9
  77. siliconcompiler/tools/yosys/syn_asic.tcl +21 -13
  78. siliconcompiler/tools/yosys/syn_fpga.tcl +20 -17
  79. siliconcompiler/tools/yosys/techmaps/__init__.py +0 -0
  80. siliconcompiler/tools/yosys/templates/__init__.py +0 -0
  81. siliconcompiler/use.py +2 -1
  82. {siliconcompiler-0.27.0.dist-info → siliconcompiler-0.28.0.dist-info}/METADATA +8 -7
  83. {siliconcompiler-0.27.0.dist-info → siliconcompiler-0.28.0.dist-info}/RECORD +87 -45
  84. {siliconcompiler-0.27.0.dist-info → siliconcompiler-0.28.0.dist-info}/WHEEL +1 -1
  85. {siliconcompiler-0.27.0.dist-info → siliconcompiler-0.28.0.dist-info}/LICENSE +0 -0
  86. {siliconcompiler-0.27.0.dist-info → siliconcompiler-0.28.0.dist-info}/entry_points.txt +0 -0
  87. {siliconcompiler-0.27.0.dist-info → siliconcompiler-0.28.0.dist-info}/top_level.txt +0 -0
@@ -608,7 +608,7 @@ class Schema:
608
608
 
609
609
  See :meth:`~siliconcompiler.core.Chip.getkeys` for detailed documentation.
610
610
  """
611
- cfg = self.__search(*keypath, job=job)
611
+ cfg = self.__search(*keypath, job=job, use_default=False)
612
612
  keys = list(cfg.keys())
613
613
 
614
614
  if 'default' in keys:
@@ -946,7 +946,7 @@ class Schema:
946
946
 
947
947
  return None
948
948
 
949
- def __search(self, *keypath, insert_defaults=False, job=None):
949
+ def __search(self, *keypath, insert_defaults=False, use_default=True, job=None):
950
950
  if job is not None:
951
951
  cfg = self.cfg['history'][job]
952
952
  else:
@@ -965,8 +965,10 @@ class Schema:
965
965
  if insert_defaults:
966
966
  cfg[key] = copy.deepcopy(cfg['default'])
967
967
  cfg = cfg[key]
968
- else:
968
+ elif use_default:
969
969
  cfg = cfg['default']
970
+ else:
971
+ raise ValueError(f'Invalid keypath {keypath}: unexpected key: {key}')
970
972
  else:
971
973
  raise ValueError(f'Invalid keypath {keypath}: unexpected key: {key}')
972
974
 
@@ -197,7 +197,7 @@ class DynamicGen(SphinxDirective):
197
197
  chips = self.configure_chip_for_docs(module)
198
198
  except Exception as e:
199
199
  print("Failed:", e)
200
- return None
200
+ # raise e
201
201
 
202
202
  if not chips:
203
203
  return None
@@ -274,7 +274,7 @@ class DynamicGen(SphinxDirective):
274
274
  directory.'''
275
275
  modules = []
276
276
  for importer, modname, _ in pkgutil.iter_modules([module_dir]):
277
- module = importer.find_module(modname).load_module(modname)
277
+ module = importer.find_spec(modname).loader.load_module(modname)
278
278
  modules.append((module, modname))
279
279
 
280
280
  return modules
@@ -399,7 +399,7 @@ class DynamicGen(SphinxDirective):
399
399
  if docs_chip and docs_configured:
400
400
  return docs_chip
401
401
 
402
- return self._handle_setup(module)
402
+ return self._handle_setup(chip, module)
403
403
 
404
404
  def get_ref_prefix(self):
405
405
  return self.REF_PREFIX
@@ -635,7 +635,7 @@ class ToolGen(DynamicGen):
635
635
  if toolmodule:
636
636
  return chip
637
637
  else:
638
- return self._handle_setup(module)
638
+ return self._handle_setup(chip, module)
639
639
 
640
640
  def display_config(self, chip, modname):
641
641
  '''Display config under `eda, <modname>` in a single table.'''
@@ -726,7 +726,7 @@ class ToolGen(DynamicGen):
726
726
  s += p
727
727
 
728
728
  try:
729
- task_setup()
729
+ task_setup(chip)
730
730
 
731
731
  config = build_section("Configuration", self.get_configuration_ref_key(toolname,
732
732
  taskname))
@@ -738,8 +738,7 @@ class ToolGen(DynamicGen):
738
738
  [toolname, taskname, 'params'],
739
739
  s)
740
740
  except Exception as e:
741
- print('Failed to document task, Chip object probably not configured correctly.')
742
- print(e)
741
+ print(f'Failed to document task, Chip object probably not configured correctly: {e}')
743
742
  return None
744
743
 
745
744
  return s
@@ -791,6 +790,15 @@ class ToolGen(DynamicGen):
791
790
  self._document_free_params(cfg, 'var', key_path + ['var'], reference_prefix, s)
792
791
  self._document_free_params(cfg, 'file', key_path + ['file'], reference_prefix, s)
793
792
 
793
+ def _handle_setup(self, chip, module):
794
+ setup = self.get_setup_method(module)
795
+ if not setup:
796
+ return None
797
+
798
+ setup(chip)
799
+
800
+ return chip
801
+
794
802
 
795
803
  class TargetGen(DynamicGen):
796
804
  PATH = 'targets'
@@ -816,20 +824,23 @@ class TargetGen(DynamicGen):
816
824
  def display_config(self, chip, modname):
817
825
  sections = []
818
826
 
819
- flow_section = self.build_module_list(chip, 'Flows', 'flows', modname, FlowGen.REF_PREFIX)
820
- if flow_section is not None:
821
- sections.append(flow_section)
822
-
823
- pdk_section = self.build_module_list(chip, 'PDK', 'pdks', modname, PDKGen.REF_PREFIX)
827
+ pdk_section = self.build_module_list(
828
+ chip, 'Included PDK', 'pdks', modname, PDKGen.REF_PREFIX)
824
829
  if pdk_section is not None:
825
830
  sections.append(pdk_section)
826
831
 
827
- libs_section = self.build_module_list(chip, 'Libraries', 'libs', modname, LibGen.REF_PREFIX)
832
+ libs_section = self.build_module_list(
833
+ chip, 'Included libraries', 'libs', modname, LibGen.REF_PREFIX)
828
834
  if libs_section is not None:
829
835
  sections.append(libs_section)
830
836
 
831
- checklist_section = self.build_module_list(chip, 'Checklists', 'checklists', modname,
832
- ChecklistGen.REF_PREFIX)
837
+ flow_section = self.build_module_list(
838
+ chip, 'Included flows', 'flows', modname, FlowGen.REF_PREFIX)
839
+ if flow_section is not None:
840
+ sections.append(flow_section)
841
+
842
+ checklist_section = self.build_module_list(
843
+ chip, 'Included checklists', 'checklists', modname, ChecklistGen.REF_PREFIX)
833
844
  if checklist_section is not None:
834
845
  sections.append(checklist_section)
835
846
 
@@ -847,6 +858,15 @@ class TargetGen(DynamicGen):
847
858
 
848
859
  return sections
849
860
 
861
+ def _handle_setup(self, chip, module):
862
+ setup = self.get_setup_method(module)
863
+ if not setup:
864
+ return None
865
+
866
+ setup(chip)
867
+
868
+ return chip
869
+
850
870
 
851
871
  class AppGen(DynamicGen):
852
872
  PATH = 'apps'
@@ -77,7 +77,9 @@ class SchemaGen(SphinxDirective):
77
77
  if key == 'default':
78
78
  for n in self.process_schema(schema['default'], parents=parents):
79
79
  sections.append(n)
80
- elif key not in ('history', 'library'):
80
+ else:
81
+ if not parents and key in ('history', 'library'):
82
+ continue
81
83
  section_key = 'param-' + '-'.join(parents + [key])
82
84
  section = build_section_with_target(key, section_key, self.state.document)
83
85
  for n in self.process_schema(schema[key], parents=parents + [key]):
@@ -165,6 +167,7 @@ class CategoryGroupTable(SphinxDirective):
165
167
  "record": "Compilation history tracking",
166
168
  "package": "Packaging manifest",
167
169
  "datasheet": "Design interface specifications",
170
+ "schematic": "Schematic specifications",
168
171
 
169
172
  # Nothing to document
170
173
  "library": "",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -3,12 +3,11 @@ proc sc_collect_pin_constraints { \
3
3
  ordered_pins_arg \
4
4
  sc_side_layer_func \
5
5
  { print_func puts } } {
6
-
7
6
  upvar 1 $placement_pins_arg placement_pins
8
7
  upvar 1 $ordered_pins_arg ordered_pins
9
8
 
10
9
  set pin_order [dict create]
11
- set placement_pins [list ]
10
+ set placement_pins [list]
12
11
 
13
12
  dict for {name params} [sc_cfg_get constraint pin] {
14
13
  set order [dict get $params order]
File without changes
File without changes
File without changes
@@ -4,6 +4,22 @@ from siliconcompiler import sc_open, SiliconCompilerError
4
4
  from siliconcompiler import utils
5
5
  from siliconcompiler.tools._common import input_provides, input_file_node_name, get_tool_task
6
6
  from siliconcompiler import flowgraph
7
+ from siliconcompiler import scheduler
8
+
9
+
10
+ def make_docs(chip):
11
+ from siliconcompiler.flows._common import _make_docs
12
+ _make_docs(chip)
13
+ chip.set('option', 'flow', 'asicflow')
14
+
15
+ for step, index in flowgraph._get_flowgraph_entry_nodes(chip, 'asicflow'):
16
+ scheduler._setup_node(chip, step, index)
17
+
18
+ chip.set('arg', 'step', 'combine')
19
+ chip.set('arg', 'index', '0')
20
+ setup(chip)
21
+
22
+ return chip
7
23
 
8
24
 
9
25
  def setup(chip):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -82,6 +82,7 @@ def setup(chip, mode="batch"):
82
82
 
83
83
  chip.set('tool', tool, 'task', task, 'refdir', refdir, step=step, index=index,
84
84
  package='siliconcompiler', clobber=clobber)
85
+ chip.set('tool', tool, 'task', task, 'threads', 1, step=step, index=index, clobber=clobber)
85
86
 
86
87
  if chip.get('option', 'nodisplay'):
87
88
  # Tells QT to use the offscreen platform if nodisplay is used
File without changes
@@ -15,13 +15,13 @@
15
15
 
16
16
  source ./sc_manifest.tcl
17
17
 
18
- set sc_step [sc_cfg_get arg step]
19
- set sc_index [sc_cfg_get arg index]
20
- set sc_task $sc_step
18
+ set sc_step [sc_cfg_get arg step]
19
+ set sc_index [sc_cfg_get arg index]
20
+ set sc_task $sc_step
21
21
 
22
- set sc_design [sc_top]
22
+ set sc_design [sc_top]
23
23
  set sc_macrolibs [sc_get_asic_libraries macro]
24
- set sc_stackup [sc_cfg_get option stackup]
24
+ set sc_stackup [sc_cfg_get option stackup]
25
25
 
26
26
  if { [sc_cfg_tool_task_exists var exclude] } {
27
27
  set sc_exclude [sc_cfg_tool_task_get var exclude]
@@ -1,8 +1,8 @@
1
1
  source ./sc_manifest.tcl
2
2
 
3
- set sc_step [sc_cfg_get arg step]
4
- set sc_index [sc_cfg_get arg index]
5
- set sc_task $sc_step
3
+ set sc_step [sc_cfg_get arg step]
4
+ set sc_index [sc_cfg_get arg index]
5
+ set sc_task $sc_step
6
6
 
7
7
  set sc_design [sc_top]
8
8
  set sc_logiclibs [sc_get_asic_libraries logic]
@@ -36,8 +36,8 @@ if { $sc_pdk == "skywater130" } {
36
36
  cif istyle sky130(vendor)
37
37
  }
38
38
 
39
- set mydir [file dirname [file normalize [info script]]]
40
- set sc_step [sc_cfg_get arg step]
39
+ set mydir [file dirname [file normalize [info script]]]
40
+ set sc_step [sc_cfg_get arg step]
41
41
 
42
42
  if { [catch { source "$mydir/sc_${sc_step}.tcl" } err] } {
43
43
  puts $err
File without changes
File without changes
@@ -1,8 +1,8 @@
1
1
  source ./sc_manifest.tcl
2
2
 
3
- set sc_step [sc_cfg_get arg step]
4
- set sc_index [sc_cfg_get arg index]
5
- set sc_task $sc_step
3
+ set sc_step [sc_cfg_get arg step]
4
+ set sc_index [sc_cfg_get arg index]
5
+ set sc_task $sc_step
6
6
 
7
7
  set sc_design [sc_top]
8
8
  set sc_macrolibs [sc_get_asic_libraries macro]
File without changes
File without changes
File without changes
@@ -19,7 +19,7 @@ proc sc_get_layer_name { name } {
19
19
  if { [string length $name] == 0 } {
20
20
  return ""
21
21
  }
22
- if { [ string is integer $name ] } {
22
+ if { [string is integer $name] } {
23
23
  set layer [[ord::get_db_tech] findRoutingLayer $name]
24
24
  if { $layer == "NULL" } {
25
25
  utl::error FLW 1 "$name is not a valid routing layer."
@@ -35,8 +35,10 @@ proc has_tie_cell { type } {
35
35
  upvar sc_tool sc_tool
36
36
 
37
37
  set library_vars [sc_cfg_get library $sc_mainlib option {var}]
38
- return [expr { [dict exists $library_vars openroad_tie${type}_cell] && \
39
- [dict exists $library_vars openroad_tie${type}_port] }]
38
+ return [expr {
39
+ [dict exists $library_vars openroad_tie${type}_cell] &&
40
+ [dict exists $library_vars openroad_tie${type}_port]
41
+ }]
40
42
  }
41
43
 
42
44
  proc get_tie_cell { type } {
@@ -54,46 +56,46 @@ proc get_tie_cell { type } {
54
56
  # Schema Adapter
55
57
  ###############################
56
58
 
57
- set sc_tool openroad
58
- set sc_step [sc_cfg_get arg step]
59
- set sc_index [sc_cfg_get arg index]
60
- set sc_flow [sc_cfg_get option flow]
61
- set sc_task [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index task]
59
+ set sc_tool openroad
60
+ set sc_step [sc_cfg_get arg step]
61
+ set sc_index [sc_cfg_get arg index]
62
+ set sc_flow [sc_cfg_get option flow]
63
+ set sc_task [sc_cfg_get flowgraph $sc_flow $sc_step $sc_index task]
62
64
 
63
- set sc_refdir [sc_cfg_tool_task_get refdir ]
65
+ set sc_refdir [sc_cfg_tool_task_get refdir]
64
66
 
65
67
  # Design
66
- set sc_design [sc_top]
67
- set sc_optmode [sc_cfg_get option optmode]
68
- set sc_pdk [sc_cfg_get option pdk]
69
- set sc_stackup [sc_cfg_get option stackup]
68
+ set sc_design [sc_top]
69
+ set sc_optmode [sc_cfg_get option optmode]
70
+ set sc_pdk [sc_cfg_get option pdk]
71
+ set sc_stackup [sc_cfg_get option stackup]
70
72
 
71
73
  # APR Parameters
72
- set sc_targetlibs [sc_get_asic_libraries logic]
73
- set sc_mainlib [lindex $sc_targetlibs 0]
74
- set sc_delaymodel [sc_cfg_get asic delaymodel]
75
- set sc_pdk_vars [sc_cfg_get pdk $sc_pdk {var} $sc_tool]
76
- set sc_hpinmetal [dict get $sc_pdk_vars pin_layer_horizontal $sc_stackup]
77
- set sc_vpinmetal [dict get $sc_pdk_vars pin_layer_vertical $sc_stackup]
78
- set sc_rc_signal [lindex [dict get $sc_pdk_vars rclayer_signal $sc_stackup] 0]
79
- set sc_rc_clk [lindex [dict get $sc_pdk_vars rclayer_clock $sc_stackup] 0]
80
- set sc_minmetal [sc_cfg_get pdk $sc_pdk minlayer $sc_stackup]
81
- set sc_maxmetal [sc_cfg_get pdk $sc_pdk maxlayer $sc_stackup]
74
+ set sc_targetlibs [sc_get_asic_libraries logic]
75
+ set sc_mainlib [lindex $sc_targetlibs 0]
76
+ set sc_delaymodel [sc_cfg_get asic delaymodel]
77
+ set sc_pdk_vars [sc_cfg_get pdk $sc_pdk {var} $sc_tool]
78
+ set sc_hpinmetal [dict get $sc_pdk_vars pin_layer_horizontal $sc_stackup]
79
+ set sc_vpinmetal [dict get $sc_pdk_vars pin_layer_vertical $sc_stackup]
80
+ set sc_rc_signal [lindex [dict get $sc_pdk_vars rclayer_signal $sc_stackup] 0]
81
+ set sc_rc_clk [lindex [dict get $sc_pdk_vars rclayer_clock $sc_stackup] 0]
82
+ set sc_minmetal [sc_cfg_get pdk $sc_pdk minlayer $sc_stackup]
83
+ set sc_maxmetal [sc_cfg_get pdk $sc_pdk maxlayer $sc_stackup]
82
84
  set sc_aspectratio [sc_cfg_get constraint aspectratio]
83
- set sc_density [sc_cfg_get constraint density]
84
- set sc_scenarios [dict keys [sc_cfg_get constraint timing]]
85
+ set sc_density [sc_cfg_get constraint density]
86
+ set sc_scenarios [dict keys [sc_cfg_get constraint timing]]
85
87
 
86
88
  # Library
87
89
  set sc_libtype [sc_cfg_get library $sc_mainlib asic libarch]
88
90
  # TODO: handle multiple sites properly
89
- set sc_site [lindex [sc_cfg_get library $sc_mainlib asic site $sc_libtype] 0]
90
- set sc_filler [sc_cfg_get library $sc_mainlib asic cells filler]
91
- set sc_dontuse [sc_cfg_get library $sc_mainlib asic cells dontuse]
92
- set sc_clkbuf [lindex [sc_cfg_tool_task_get {var} cts_clock_buffer] 0]
93
- set sc_filler [sc_cfg_get library $sc_mainlib asic cells filler]
94
- set sc_tap [sc_cfg_get library $sc_mainlib asic cells tap]
95
- set sc_endcap [sc_cfg_get library $sc_mainlib asic cells endcap]
96
- set sc_pex_corners [sc_cfg_tool_task_get {var} pex_corners]
91
+ set sc_site [lindex [sc_cfg_get library $sc_mainlib asic site $sc_libtype] 0]
92
+ set sc_filler [sc_cfg_get library $sc_mainlib asic cells filler]
93
+ set sc_dontuse [sc_cfg_get library $sc_mainlib asic cells dontuse]
94
+ set sc_clkbuf [lindex [sc_cfg_tool_task_get {var} cts_clock_buffer] 0]
95
+ set sc_filler [sc_cfg_get library $sc_mainlib asic cells filler]
96
+ set sc_tap [sc_cfg_get library $sc_mainlib asic cells tap]
97
+ set sc_endcap [sc_cfg_get library $sc_mainlib asic cells endcap]
98
+ set sc_pex_corners [sc_cfg_tool_task_get {var} pex_corners]
97
99
  set sc_power_corner [lindex [sc_cfg_tool_task_get {var} power_corner] 0]
98
100
 
99
101
  # PDK Design Rules
@@ -394,7 +396,7 @@ if { $sc_task != "floorplan" } {
394
396
 
395
397
  # Adjust routing track density
396
398
  foreach layer [[ord::get_db_tech] getLayers] {
397
- if { [ $layer getRoutingLevel ] == 0 } {
399
+ if { [$layer getRoutingLevel] == 0 } {
398
400
  continue
399
401
  }
400
402
 
@@ -4,7 +4,6 @@
4
4
  #######################################
5
5
 
6
6
  if { [llength [all_clocks]] > 0 } {
7
-
8
7
  # Clone clock tree inverters next to register loads
9
8
  # so cts does not try to buffer the inverted clocks.
10
9
  repair_clock_inverters
@@ -9,8 +9,10 @@ foreach obstruction [[ord::get_db_block] getObstructions] {
9
9
  }
10
10
  utl::info FLW 1 "Deleted $removed_obs routing obstructions"
11
11
 
12
- if { $openroad_fin_add_fill == "true" && \
13
- [sc_cfg_exists pdk $sc_pdk aprtech openroad $sc_stackup $sc_libtype fill] } {
12
+ if {
13
+ $openroad_fin_add_fill == "true" &&
14
+ [sc_cfg_exists pdk $sc_pdk aprtech openroad $sc_stackup $sc_libtype fill]
15
+ } {
14
16
  set sc_fillrules \
15
17
  [lindex [sc_cfg_get pdk $sc_pdk aprtech openroad $sc_stackup $sc_libtype fill] 0]
16
18
  density_fill -rules $sc_fillrules
@@ -3,8 +3,10 @@
3
3
  ###########################
4
4
 
5
5
  set lef_args []
6
- if { [lindex [sc_cfg_tool_task_get {var} ord_abstract_lef_bloat_layers] 0] \
7
- == "true" } {
6
+ if {
7
+ [lindex [sc_cfg_tool_task_get {var} ord_abstract_lef_bloat_layers] 0]
8
+ == "true"
9
+ } {
8
10
  lappend lef_args "-bloat_occupied_layers"
9
11
  } else {
10
12
  lappend lef_args \
@@ -23,12 +23,14 @@ if { [sc_cfg_exists input asic floorplan] } {
23
23
  read_def -floorplan_initialize $def
24
24
  } else {
25
25
  #NOTE: assuming a two tuple value as lower left, upper right
26
- set sc_diearea [sc_cfg_get constraint outline]
27
- set sc_corearea [sc_cfg_get constraint corearea]
28
- if { $sc_diearea != "" && \
29
- $sc_corearea != "" } {
26
+ set sc_diearea [sc_cfg_get constraint outline]
27
+ set sc_corearea [sc_cfg_get constraint corearea]
28
+ if {
29
+ $sc_diearea != "" &&
30
+ $sc_corearea != ""
31
+ } {
30
32
  # Use die and core sizes
31
- set sc_diesize "[lindex $sc_diearea 0] [lindex $sc_diearea 1]"
33
+ set sc_diesize "[lindex $sc_diearea 0] [lindex $sc_diearea 1]"
32
34
  set sc_coresize "[lindex $sc_corearea 0] [lindex $sc_corearea 1]"
33
35
 
34
36
  initialize_floorplan -die_area $sc_diesize \
@@ -61,8 +63,10 @@ if { [sc_cfg_exists library $sc_mainlib option file openroad_tracks] } {
61
63
  }
62
64
 
63
65
  set do_automatic_pins 1
64
- if { [sc_cfg_tool_task_exists file padring] && \
65
- [llength [sc_cfg_tool_task_get file padring]] > 0 } {
66
+ if {
67
+ [sc_cfg_tool_task_exists file padring] &&
68
+ [llength [sc_cfg_tool_task_get file padring]] > 0
69
+ } {
66
70
  set do_automatic_pins 0
67
71
 
68
72
  ###########################
@@ -208,7 +212,7 @@ if { [sc_cfg_exists constraint component] } {
208
212
  }
209
213
 
210
214
  set site_height [$site getHeight]
211
- set site_width [$site getWidth]
215
+ set site_width [$site getWidth]
212
216
  if { $y_grid == 0 } {
213
217
  set y_grid $site_height
214
218
  } elseif { $y_grid > $site_height } {
@@ -237,11 +241,11 @@ if { [sc_cfg_exists constraint component] } {
237
241
  dict for {name params} [sc_cfg_get constraint component] {
238
242
  set location [dict get $params placement]
239
243
  set rotation [dict get $params rotation]
240
- if { [llength $rotation] == 0 } {
241
- set rotation 0
244
+ if { [string match "*MZ*" $rotation] } {
245
+ utl::error FLW 1 "Z mirroring is not supported in OpenROAD"
242
246
  }
243
- set rotation [expr { int($rotation) }]
244
- set flip [dict get $params flip]
247
+ set rotation [string map {"_" ""} $rotation]
248
+
245
249
  if { [dict exists $params partname] } {
246
250
  set cell [dict get $params partname]
247
251
  } else {
@@ -251,14 +255,7 @@ if { [sc_cfg_exists constraint component] } {
251
255
  utl::warn FLW 1 "Halo is not supported in OpenROAD"
252
256
  }
253
257
 
254
- set transform_r [odb::dbTransform]
255
- $transform_r setOrient "R${rotation}"
256
- set transform_f [odb::dbTransform]
257
- if { $flip == "true" } {
258
- $transform_f setOrient [odb::dbTransform "MY"]
259
- }
260
- set transform_final [odb::dbTransform]
261
- odb::dbTransform_concat $transform_r $transform_f $transform_final
258
+ set transform [odb::dbTransform $rotation]
262
259
 
263
260
  set inst [[ord::get_db_block] findInst $name]
264
261
  if { $inst == "NULL" } {
@@ -275,16 +272,11 @@ if { [sc_cfg_exists constraint component] } {
275
272
  }
276
273
  }
277
274
  set master [$inst getMaster]
278
- set height [ord::dbu_to_microns [$master getHeight]]
279
- set width [ord::dbu_to_microns [$master getWidth]]
280
-
281
- set x_loc [expr { [lindex $location 0] - $width / 2 }]
282
- set y_loc [expr { [lindex $location 1] - $height / 2 }]
283
275
 
284
- set x_loc [expr { round($x_loc / $x_grid) * $x_grid }]
285
- set y_loc [expr { round($y_loc / $y_grid) * $y_grid }]
276
+ set x_loc [expr { round([lindex $location 0] / $x_grid) * $x_grid }]
277
+ set y_loc [expr { round([lindex $location 1] / $y_grid) * $y_grid }]
286
278
 
287
- $inst setOrient [$transform_final getOrient]
279
+ $inst setOrient [$rotation getOrient]
288
280
  $inst setLocation [ord::microns_to_dbu $x_loc] [ord::microns_to_dbu $y_loc]
289
281
  $inst setPlacementStatus FIRM
290
282
  }
@@ -302,8 +294,10 @@ if { $do_automatic_pins } {
302
294
  # since we get an error otherwise.
303
295
  if { [sc_design_has_unplaced_macros] } {
304
296
  if { $openroad_rtlmp_enable == "true" } {
305
- set halo_max [expr { max([lindex $openroad_mpl_macro_place_halo 0], \
306
- [lindex $openroad_mpl_macro_place_halo 1]) }]
297
+ set halo_max [expr {
298
+ max([lindex $openroad_mpl_macro_place_halo 0],
299
+ [lindex $openroad_mpl_macro_place_halo 1])
300
+ }]
307
301
 
308
302
  set rtlmp_args []
309
303
  if { $openroad_rtlmp_min_instances != "" } {
@@ -370,9 +364,11 @@ if { [sc_cfg_tool_task_exists {file} ifp_tapcell] } {
370
364
  # Power Network
371
365
  ###########################
372
366
 
373
- if { $openroad_pdn_enable == "true" && \
374
- [sc_cfg_tool_task_exists {file} pdn_config] && \
375
- [llength [sc_cfg_tool_task_get {file} pdn_config]] > 0 } {
367
+ if {
368
+ $openroad_pdn_enable == "true" &&
369
+ [sc_cfg_tool_task_exists {file} pdn_config] &&
370
+ [llength [sc_cfg_tool_task_get {file} pdn_config]] > 0
371
+ } {
376
372
  set pdn_files []
377
373
  foreach pdnconfig [sc_cfg_tool_task_get {file} pdn_config] {
378
374
  if { [lsearch -exact $pdn_files $pdnconfig] != -1 } {
@@ -59,8 +59,10 @@ if { [sc_cfg_tool_task_check_in_list unconstrained var reports] } {
59
59
  > reports/timing/unconstrained.topN.rpt
60
60
  }
61
61
 
62
- if { [sc_cfg_tool_task_check_in_list clock_skew var reports] && \
63
- [llength [all_clocks]] > 0 } {
62
+ if {
63
+ [sc_cfg_tool_task_check_in_list clock_skew var reports] &&
64
+ [llength [all_clocks]] > 0
65
+ } {
64
66
  puts "$PREFIX clock_skew"
65
67
  report_clock_skew -setup -digits 4 > reports/timing/skew.setup.rpt
66
68
  sc_display_report reports/timing/skew.setup.rpt
@@ -1,4 +1,3 @@
1
-
2
1
  # while (not good enough):
3
2
  # global placement
4
3
  # estimate parasitics