siliconcompiler 0.33.0__py3-none-any.whl → 0.33.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 (177) hide show
  1. siliconcompiler/_common.py +5 -0
  2. siliconcompiler/_metadata.py +1 -1
  3. siliconcompiler/apps/sc_install.py +7 -0
  4. siliconcompiler/apps/sc_remote.py +7 -2
  5. siliconcompiler/apps/utils/replay.py +5 -5
  6. siliconcompiler/core.py +38 -12
  7. siliconcompiler/data/templates/replay/replay.sh.j2 +18 -1
  8. siliconcompiler/metric.py +78 -0
  9. siliconcompiler/package/git.py +1 -1
  10. siliconcompiler/record.py +63 -7
  11. siliconcompiler/remote/client.py +57 -14
  12. siliconcompiler/remote/server.py +110 -60
  13. siliconcompiler/report/dashboard/cli/__init__.py +2 -0
  14. siliconcompiler/report/dashboard/cli/board.py +34 -31
  15. siliconcompiler/report/report.py +10 -5
  16. siliconcompiler/report/utils.py +12 -6
  17. siliconcompiler/scheduler/__init__.py +146 -976
  18. siliconcompiler/scheduler/run_node.py +12 -5
  19. siliconcompiler/scheduler/send_messages.py +9 -3
  20. siliconcompiler/scheduler/slurm.py +10 -43
  21. siliconcompiler/scheduler/taskscheduler.py +320 -0
  22. siliconcompiler/schema/baseschema.py +25 -4
  23. siliconcompiler/schema/journalingschema.py +4 -0
  24. siliconcompiler/schema/schema_cfg.py +3 -3
  25. siliconcompiler/tool.py +201 -32
  26. siliconcompiler/tools/_common/__init__.py +14 -11
  27. siliconcompiler/tools/_common/asic.py +5 -5
  28. siliconcompiler/tools/bluespec/convert.py +2 -1
  29. siliconcompiler/tools/builtin/_common.py +9 -2
  30. siliconcompiler/tools/builtin/concatenate.py +6 -2
  31. siliconcompiler/tools/builtin/minimum.py +7 -2
  32. siliconcompiler/tools/builtin/mux.py +7 -2
  33. siliconcompiler/tools/builtin/nop.py +7 -2
  34. siliconcompiler/tools/builtin/verify.py +7 -3
  35. siliconcompiler/tools/chisel/convert.py +10 -10
  36. siliconcompiler/tools/klayout/drc.py +2 -2
  37. siliconcompiler/tools/klayout/klayout_show.py +6 -6
  38. siliconcompiler/tools/klayout/klayout_utils.py +12 -12
  39. siliconcompiler/tools/netgen/count_lvs.py +2 -2
  40. siliconcompiler/tools/netgen/lvs.py +1 -1
  41. siliconcompiler/tools/openroad/_apr.py +2 -2
  42. siliconcompiler/tools/openroad/scripts/apr/sc_init_floorplan.tcl +1 -7
  43. siliconcompiler/tools/openroad/scripts/common/procs.tcl +18 -0
  44. siliconcompiler/tools/openroad/scripts/common/read_input_files.tcl +1 -7
  45. siliconcompiler/tools/opensta/scripts/sc_timing.tcl +10 -0
  46. siliconcompiler/tools/opensta/timing.py +11 -0
  47. siliconcompiler/tools/slang/__init__.py +6 -5
  48. siliconcompiler/tools/slang/elaborate.py +6 -6
  49. siliconcompiler/tools/slang/lint.py +1 -3
  50. siliconcompiler/tools/vpr/_xml_constraint.py +8 -8
  51. siliconcompiler/tools/yosys/prepareLib.py +2 -2
  52. siliconcompiler/tools/yosys/sc_synth_asic.tcl +43 -5
  53. siliconcompiler/tools/yosys/screenshot.py +1 -1
  54. siliconcompiler/tools/yosys/syn_asic.py +5 -5
  55. siliconcompiler/toolscripts/_tools.json +17 -10
  56. siliconcompiler/toolscripts/rhel8/install-chisel.sh +9 -2
  57. siliconcompiler/toolscripts/rhel8/install-icarus.sh +10 -3
  58. siliconcompiler/toolscripts/rhel8/install-klayout.sh +8 -1
  59. siliconcompiler/toolscripts/rhel8/install-magic.sh +9 -2
  60. siliconcompiler/toolscripts/rhel8/install-montage.sh +1 -1
  61. siliconcompiler/toolscripts/rhel8/install-netgen.sh +9 -2
  62. siliconcompiler/toolscripts/rhel8/install-slang.sh +11 -4
  63. siliconcompiler/toolscripts/rhel8/install-surelog.sh +9 -2
  64. siliconcompiler/toolscripts/rhel8/install-sv2v.sh +11 -4
  65. siliconcompiler/toolscripts/rhel8/install-verible.sh +11 -3
  66. siliconcompiler/toolscripts/rhel8/install-verilator.sh +10 -3
  67. siliconcompiler/toolscripts/rhel8/install-xyce.sh +15 -10
  68. siliconcompiler/toolscripts/rhel9/install-chisel.sh +9 -2
  69. siliconcompiler/toolscripts/rhel9/install-ghdl.sh +9 -2
  70. siliconcompiler/toolscripts/rhel9/install-gtkwave.sh +10 -3
  71. siliconcompiler/toolscripts/rhel9/install-icarus.sh +10 -3
  72. siliconcompiler/toolscripts/rhel9/install-klayout.sh +8 -1
  73. siliconcompiler/toolscripts/rhel9/install-magic.sh +9 -2
  74. siliconcompiler/toolscripts/rhel9/install-montage.sh +1 -1
  75. siliconcompiler/toolscripts/rhel9/install-netgen.sh +9 -2
  76. siliconcompiler/toolscripts/rhel9/install-openroad.sh +16 -3
  77. siliconcompiler/toolscripts/rhel9/install-opensta.sh +17 -5
  78. siliconcompiler/toolscripts/rhel9/install-slang.sh +11 -4
  79. siliconcompiler/toolscripts/rhel9/install-surelog.sh +9 -2
  80. siliconcompiler/toolscripts/rhel9/install-sv2v.sh +11 -4
  81. siliconcompiler/toolscripts/rhel9/install-verible.sh +11 -3
  82. siliconcompiler/toolscripts/rhel9/install-verilator.sh +10 -3
  83. siliconcompiler/toolscripts/rhel9/install-vpr.sh +9 -2
  84. siliconcompiler/toolscripts/rhel9/install-xdm.sh +10 -2
  85. siliconcompiler/toolscripts/rhel9/install-xyce.sh +15 -10
  86. siliconcompiler/toolscripts/rhel9/install-yosys-moosic.sh +9 -2
  87. siliconcompiler/toolscripts/rhel9/install-yosys-parmys.sh +10 -3
  88. siliconcompiler/toolscripts/rhel9/install-yosys-slang.sh +10 -2
  89. siliconcompiler/toolscripts/rhel9/install-yosys.sh +9 -2
  90. siliconcompiler/toolscripts/ubuntu20/install-bambu.sh +10 -2
  91. siliconcompiler/toolscripts/ubuntu20/install-bluespec.sh +10 -3
  92. siliconcompiler/toolscripts/ubuntu20/install-chisel.sh +9 -2
  93. siliconcompiler/toolscripts/ubuntu20/install-ghdl.sh +9 -2
  94. siliconcompiler/toolscripts/ubuntu20/install-gtkwave.sh +9 -2
  95. siliconcompiler/toolscripts/ubuntu20/install-icarus.sh +9 -2
  96. siliconcompiler/toolscripts/ubuntu20/install-icepack.sh +9 -2
  97. siliconcompiler/toolscripts/ubuntu20/install-klayout.sh +8 -1
  98. siliconcompiler/toolscripts/ubuntu20/install-magic.sh +9 -2
  99. siliconcompiler/toolscripts/ubuntu20/install-montage.sh +1 -1
  100. siliconcompiler/toolscripts/ubuntu20/install-netgen.sh +9 -2
  101. siliconcompiler/toolscripts/ubuntu20/install-nextpnr.sh +9 -2
  102. siliconcompiler/toolscripts/ubuntu20/install-openroad.sh +16 -3
  103. siliconcompiler/toolscripts/ubuntu20/install-opensta.sh +16 -5
  104. siliconcompiler/toolscripts/ubuntu20/install-slang.sh +11 -4
  105. siliconcompiler/toolscripts/ubuntu20/install-slurm.sh +9 -2
  106. siliconcompiler/toolscripts/ubuntu20/install-surelog.sh +10 -2
  107. siliconcompiler/toolscripts/ubuntu20/install-sv2v.sh +11 -4
  108. siliconcompiler/toolscripts/ubuntu20/install-verible.sh +11 -3
  109. siliconcompiler/toolscripts/ubuntu20/install-verilator.sh +9 -2
  110. siliconcompiler/toolscripts/ubuntu20/install-xdm.sh +10 -2
  111. siliconcompiler/toolscripts/ubuntu20/install-xyce.sh +13 -8
  112. siliconcompiler/toolscripts/ubuntu20/install-yosys-moosic.sh +9 -2
  113. siliconcompiler/toolscripts/ubuntu20/install-yosys.sh +9 -2
  114. siliconcompiler/toolscripts/ubuntu22/install-bambu.sh +10 -2
  115. siliconcompiler/toolscripts/ubuntu22/install-bluespec.sh +10 -3
  116. siliconcompiler/toolscripts/ubuntu22/install-chisel.sh +9 -2
  117. siliconcompiler/toolscripts/ubuntu22/install-ghdl.sh +9 -2
  118. siliconcompiler/toolscripts/ubuntu22/install-gtkwave.sh +9 -2
  119. siliconcompiler/toolscripts/ubuntu22/install-icarus.sh +9 -2
  120. siliconcompiler/toolscripts/ubuntu22/install-icepack.sh +9 -2
  121. siliconcompiler/toolscripts/ubuntu22/install-klayout.sh +12 -1
  122. siliconcompiler/toolscripts/ubuntu22/install-magic.sh +9 -2
  123. siliconcompiler/toolscripts/ubuntu22/install-montage.sh +1 -1
  124. siliconcompiler/toolscripts/ubuntu22/install-netgen.sh +9 -2
  125. siliconcompiler/toolscripts/ubuntu22/install-nextpnr.sh +9 -2
  126. siliconcompiler/toolscripts/ubuntu22/install-openroad.sh +16 -3
  127. siliconcompiler/toolscripts/ubuntu22/install-opensta.sh +17 -5
  128. siliconcompiler/toolscripts/ubuntu22/install-slang.sh +11 -4
  129. siliconcompiler/toolscripts/ubuntu22/install-slurm.sh +9 -2
  130. siliconcompiler/toolscripts/ubuntu22/install-surelog.sh +10 -2
  131. siliconcompiler/toolscripts/ubuntu22/install-sv2v.sh +11 -4
  132. siliconcompiler/toolscripts/ubuntu22/install-verible.sh +11 -3
  133. siliconcompiler/toolscripts/ubuntu22/install-verilator.sh +9 -2
  134. siliconcompiler/toolscripts/ubuntu22/install-vpr.sh +9 -2
  135. siliconcompiler/toolscripts/ubuntu22/install-xdm.sh +10 -2
  136. siliconcompiler/toolscripts/ubuntu22/install-xyce.sh +13 -8
  137. siliconcompiler/toolscripts/ubuntu22/install-yosys-moosic.sh +9 -2
  138. siliconcompiler/toolscripts/ubuntu22/install-yosys-parmys.sh +10 -3
  139. siliconcompiler/toolscripts/ubuntu22/install-yosys-slang.sh +10 -2
  140. siliconcompiler/toolscripts/ubuntu22/install-yosys.sh +9 -2
  141. siliconcompiler/toolscripts/ubuntu24/install-bambu.sh +12 -4
  142. siliconcompiler/toolscripts/ubuntu24/install-bluespec.sh +10 -3
  143. siliconcompiler/toolscripts/ubuntu24/install-chisel.sh +9 -2
  144. siliconcompiler/toolscripts/ubuntu24/install-ghdl.sh +9 -2
  145. siliconcompiler/toolscripts/ubuntu24/install-gtkwave.sh +9 -2
  146. siliconcompiler/toolscripts/ubuntu24/install-icarus.sh +9 -2
  147. siliconcompiler/toolscripts/ubuntu24/install-icepack.sh +9 -2
  148. siliconcompiler/toolscripts/ubuntu24/install-klayout.sh +12 -1
  149. siliconcompiler/toolscripts/ubuntu24/install-magic.sh +9 -2
  150. siliconcompiler/toolscripts/ubuntu24/install-montage.sh +1 -1
  151. siliconcompiler/toolscripts/ubuntu24/install-netgen.sh +9 -2
  152. siliconcompiler/toolscripts/ubuntu24/install-nextpnr.sh +9 -2
  153. siliconcompiler/toolscripts/ubuntu24/install-openroad.sh +16 -3
  154. siliconcompiler/toolscripts/ubuntu24/install-opensta.sh +17 -5
  155. siliconcompiler/toolscripts/ubuntu24/install-slang.sh +11 -4
  156. siliconcompiler/toolscripts/ubuntu24/install-slurm.sh +9 -2
  157. siliconcompiler/toolscripts/ubuntu24/install-surelog.sh +10 -2
  158. siliconcompiler/toolscripts/ubuntu24/install-sv2v.sh +11 -4
  159. siliconcompiler/toolscripts/ubuntu24/install-verible.sh +11 -3
  160. siliconcompiler/toolscripts/ubuntu24/install-verilator.sh +9 -2
  161. siliconcompiler/toolscripts/ubuntu24/install-vpr.sh +9 -2
  162. siliconcompiler/toolscripts/ubuntu24/install-xdm.sh +10 -2
  163. siliconcompiler/toolscripts/ubuntu24/install-xyce.sh +13 -8
  164. siliconcompiler/toolscripts/ubuntu24/install-yosys-moosic.sh +9 -2
  165. siliconcompiler/toolscripts/ubuntu24/install-yosys-parmys.sh +10 -3
  166. siliconcompiler/toolscripts/ubuntu24/install-yosys-slang.sh +10 -2
  167. siliconcompiler/toolscripts/ubuntu24/install-yosys.sh +9 -2
  168. siliconcompiler/utils/__init__.py +11 -0
  169. siliconcompiler/utils/flowgraph.py +6 -101
  170. siliconcompiler/utils/issue.py +15 -23
  171. siliconcompiler/utils/logging.py +2 -2
  172. {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.2.dist-info}/METADATA +6 -5
  173. {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.2.dist-info}/RECORD +177 -176
  174. {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.2.dist-info}/WHEEL +1 -1
  175. {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.2.dist-info}/entry_points.txt +0 -0
  176. {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.2.dist-info}/licenses/LICENSE +0 -0
  177. {siliconcompiler-0.33.0.dist-info → siliconcompiler-0.33.2.dist-info}/top_level.txt +0 -0
@@ -84,12 +84,12 @@ def technology(design, schema):
84
84
  lefs.extend(schema.get('library', lib, 'output', sc_stackup, 'lef',
85
85
  step=sc_step, index=sc_index))
86
86
 
87
- layoutOptions = tech.load_layout_options
87
+ layout_options = tech.load_layout_options
88
88
 
89
- layoutOptions.lefdef_config.macro_resolution_mode = 1
90
- layoutOptions.lefdef_config.via_cellname_prefix = "VIA_"
89
+ layout_options.lefdef_config.macro_resolution_mode = 1
90
+ layout_options.lefdef_config.via_cellname_prefix = "VIA_"
91
91
  pathed_files = set()
92
- for lef_file in layoutOptions.lefdef_config.lef_files:
92
+ for lef_file in layout_options.lefdef_config.lef_files:
93
93
  if foundry_lef and not os.path.isabs(lef_file):
94
94
  lef_file = os.path.join(os.path.dirname(foundry_lef), lef_file)
95
95
  lef_file = os.path.abspath(lef_file)
@@ -99,13 +99,13 @@ def technology(design, schema):
99
99
  for lef in lefs:
100
100
  pathed_files.add(os.path.abspath(lef))
101
101
 
102
- layoutOptions.lefdef_config.lef_files = list(pathed_files)
103
- layoutOptions.lefdef_config.read_lef_with_def = False
104
- layoutOptions.lefdef_config.dbu = tech.dbu
102
+ layout_options.lefdef_config.lef_files = list(pathed_files)
103
+ layout_options.lefdef_config.read_lef_with_def = False
104
+ layout_options.lefdef_config.dbu = tech.dbu
105
105
 
106
- layoutOptions.lefdef_config.produce_fills = True
106
+ layout_options.lefdef_config.produce_fills = True
107
107
 
108
- for lef_file in layoutOptions.lefdef_config.lef_files:
108
+ for lef_file in layout_options.lefdef_config.lef_files:
109
109
  print(f"[INFO] LEF file: {lef_file}")
110
110
 
111
111
  # Set layer properties
@@ -127,7 +127,7 @@ def technology(design, schema):
127
127
  print(f"[INFO] Layer properties: {layer_properties}")
128
128
 
129
129
  # Set layer map
130
- map_file = layoutOptions.lefdef_config.map_file
130
+ map_file = layout_options.lefdef_config.map_file
131
131
  if map_file:
132
132
  map_file = map_file[0]
133
133
  if not os.path.isabs(map_file):
@@ -141,10 +141,10 @@ def technology(design, schema):
141
141
  break
142
142
 
143
143
  if map_file and os.path.exists(map_file):
144
- layoutOptions.lefdef_config.map_file = map_file
144
+ layout_options.lefdef_config.map_file = map_file
145
145
  print(f"[INFO] Layer map: {map_file}")
146
146
 
147
- tech.load_layout_options = layoutOptions
147
+ tech.load_layout_options = layout_options
148
148
 
149
149
  return tech
150
150
 
@@ -34,7 +34,7 @@ import argparse
34
34
  from siliconcompiler import sc_open
35
35
 
36
36
 
37
- def count_LVS_failures(filename):
37
+ def count_lvs_failures(filename):
38
38
  with sc_open(filename) as cfile:
39
39
  lvsdata = json.load(cfile)
40
40
 
@@ -114,7 +114,7 @@ if __name__ == '__main__':
114
114
  parser = argparse.ArgumentParser(description='Parses netgen lvs')
115
115
  parser.add_argument('--file', '-f', required=True)
116
116
  args = parser.parse_args()
117
- failures = count_LVS_failures(args.file)
117
+ failures = count_lvs_failures(args.file)
118
118
  total = failures[0]
119
119
  if total > 0:
120
120
  failed = True
@@ -79,7 +79,7 @@ def post_process(chip):
79
79
  chip.logger.warning('No LVS report generated. Netgen may have encountered errors.')
80
80
  return
81
81
 
82
- lvs_failures = count_lvs.count_LVS_failures(lvs_report)
82
+ lvs_failures = count_lvs.count_lvs_failures(lvs_report)
83
83
 
84
84
  # We don't count top-level pin mismatches as errors b/c we seem to get
85
85
  # false positives for disconnected pins. Report them as warnings
@@ -402,7 +402,7 @@ def _generate_cell_area_report(design, ord_metrics):
402
402
  if stdcell_info_area:
403
403
  stdcellarea = sum(stdcell_info_area)
404
404
 
405
- cellarea_report.addCell(
405
+ cellarea_report.add_cell(
406
406
  name=cell_name,
407
407
  module=cell_type,
408
408
  cellarea=cellarea,
@@ -420,7 +420,7 @@ def _generate_cell_area_report(design, ord_metrics):
420
420
  process_cell(module)
421
421
 
422
422
  if cellarea_report.size() > 0:
423
- cellarea_report.writeReport("reports/hierarchical_cell_area.json")
423
+ cellarea_report.write_report("reports/hierarchical_cell_area.json")
424
424
 
425
425
 
426
426
  def define_tapcell_params(chip):
@@ -19,13 +19,7 @@ source "$sc_refdir/apr/preamble.tcl"
19
19
  # Setup Global Connections
20
20
  ###############################
21
21
 
22
- if { [sc_cfg_tool_task_exists {file} global_connect] } {
23
- foreach global_connect [sc_cfg_tool_task_get {file} global_connect] {
24
- puts "Sourcing global connect configuration: ${global_connect}"
25
- source $global_connect
26
- }
27
- }
28
- tee -file reports/global_connections.rpt {report_global_connect}
22
+ sc_global_connections
29
23
 
30
24
  ###############################
31
25
  # Initialize floorplan
@@ -874,3 +874,21 @@ proc sc_report_args { args } {
874
874
 
875
875
  puts "$keys(-command) siliconcompiler arguments: $keys(-args)"
876
876
  }
877
+
878
+ proc sc_global_connections { args } {
879
+ sta::check_argc_eq0 "sc_global_connections" $args
880
+
881
+ if { [sc_cfg_tool_task_exists {file} global_connect] } {
882
+ set global_connect_files []
883
+ foreach global_connect [sc_cfg_tool_task_get {file} global_connect] {
884
+ if { [lsearch -exact $global_connect_files $global_connect] != -1 } {
885
+ continue
886
+ }
887
+ puts "Loading global connect configuration: ${global_connect}"
888
+ source $global_connect
889
+
890
+ lappend global_connect_files $global_connect
891
+ }
892
+ }
893
+ tee -file reports/global_connections.rpt {report_global_connect}
894
+ }
@@ -50,11 +50,5 @@ if { [sc_has_input_files odb "input layout odb"] } {
50
50
  }
51
51
 
52
52
  # Handle global connect setup
53
- if { [sc_cfg_tool_task_exists {file} global_connect] } {
54
- foreach global_connect [sc_cfg_tool_task_get {file} global_connect] {
55
- puts "Loading global connect configuration: ${global_connect}"
56
- source $global_connect
57
- }
58
- }
59
- tee -file reports/global_connections.rpt {report_global_connect}
53
+ sc_global_connections
60
54
  }
@@ -150,6 +150,16 @@ foreach corner $sc_scenarios {
150
150
  }
151
151
  }
152
152
 
153
+ foreach corner $sc_scenarios {
154
+ set pex_corner [sc_cfg_get constraint timing $corner pexcorner]
155
+
156
+ set input_sdf_file "inputs/${sc_design}.${pex_corner}.sdf"
157
+ if { [file exists $input_sdf_file] } {
158
+ puts "Reading SDF ($corner): $input_sdf_file"
159
+ read_sdf -corner $corner $input_sdf_file
160
+ }
161
+ }
162
+
153
163
  ###############################
154
164
  # Report Metrics
155
165
  ###############################
@@ -70,6 +70,17 @@ def setup(chip):
70
70
  chip.add('tool', tool, 'task', task, 'require', f'constraint,timing,{scenario},file',
71
71
  step=step, index=index)
72
72
 
73
+ # Add the SPEF or SDF files as inputs if provided.
74
+ spef_files = [f for f in input_provides(chip, step, index) if f.endswith(".spef")]
75
+ sdf_files = [f for f in input_provides(chip, step, index) if f.endswith(".sdf")]
76
+ if spef_files and sdf_files:
77
+ # If both SPEF and SDF files are provided, only use the SPEF files.
78
+ chip.add('tool', tool, 'task', task, 'input', spef_files, step=step, index=index)
79
+ elif spef_files:
80
+ chip.add('tool', tool, 'task', task, 'input', spef_files, step=step, index=index)
81
+ elif sdf_files:
82
+ chip.add('tool', tool, 'task', task, 'input', sdf_files, step=step, index=index)
83
+
73
84
  add_common_file(chip, 'opensta_generic_sdc', 'sdc/sc_constraints.sdc')
74
85
 
75
86
 
@@ -11,6 +11,7 @@ Sources: https://github.com/MikePopoloski/slang
11
11
  Installation: https://sv-lang.com/building.html
12
12
  '''
13
13
  import os
14
+ import shlex
14
15
 
15
16
  try:
16
17
  import pyslang
@@ -121,7 +122,6 @@ def common_runtime_options(chip):
121
122
  ###############################
122
123
  # Set up user-provided parameters to ensure we elaborate the correct modules
123
124
  for param, value in opts['param']:
124
- value = value.replace('"', '\\"')
125
125
  options.extend(['-G', f'{param}={value}'])
126
126
 
127
127
  return options
@@ -133,11 +133,12 @@ def _get_driver(chip, options_func, ignored_diagnotics=None):
133
133
 
134
134
  options = options_func(chip)
135
135
 
136
- parseOpts = pyslang.CommandLineOptions()
137
- parseOpts.ignoreProgramName = True
138
- opts = " ".join(options)
136
+ parse_options = pyslang.CommandLineOptions()
137
+ parse_options.ignoreProgramName = True
138
+ opts = shlex.join(options)
139
+ chip.logger.info(f"runtime arguments: {opts}")
139
140
  code = 0
140
- if not driver.parseCommandLine(opts, parseOpts):
141
+ if not driver.parseCommandLine(opts, parse_options):
141
142
  code = 1
142
143
 
143
144
  if code == 0 and not driver.processOptions():
@@ -50,16 +50,16 @@ def __get_files(manager, tree):
50
50
  nodes = Queue(maxsize=0)
51
51
  nodes.put(tree.root)
52
52
 
53
- def procRange(range):
53
+ def proc_range(range):
54
54
  files.add(manager.getFileName(range.start))
55
55
  files.add(manager.getFileName(range.end))
56
56
 
57
57
  while not nodes.empty():
58
58
  node = nodes.get()
59
- procRange(node.sourceRange)
59
+ proc_range(node.sourceRange)
60
60
  for token in node:
61
61
  if isinstance(token, pyslang.Token):
62
- procRange(token.range)
62
+ proc_range(token.range)
63
63
  else:
64
64
  nodes.put(token)
65
65
 
@@ -103,7 +103,7 @@ def run(chip):
103
103
  add_source = chip.get('tool', tool, 'task', task, 'var', 'include_source_paths',
104
104
  step=step, index=index)[0] == 'true'
105
105
 
106
- def printFiles(out, files):
106
+ def print_files(out, files):
107
107
  for src_file in files:
108
108
  out.write(f'// File: {src_file}\n')
109
109
 
@@ -126,12 +126,12 @@ def run(chip):
126
126
 
127
127
  out.write("////////////////////////////////////////////////////////////////\n")
128
128
  out.write("// Start:\n")
129
- printFiles(out, files)
129
+ print_files(out, files)
130
130
 
131
131
  out.write(writer.print(tree).str() + '\n')
132
132
 
133
133
  out.write("// End:\n")
134
- printFiles(out, files)
134
+ print_files(out, files)
135
135
  out.write("////////////////////////////////////////////////////////////////\n")
136
136
 
137
137
  if ok:
@@ -37,9 +37,7 @@ def run(chip):
37
37
  def runtime_options(chip):
38
38
  options = slang.common_runtime_options(chip)
39
39
  options.extend([
40
- "--lint-only",
41
- "-Weverything",
42
- "-Werror"
40
+ "-Weverything"
43
41
  ])
44
42
 
45
43
  return options
@@ -1,4 +1,4 @@
1
- import xml.etree.ElementTree as ET
1
+ from xml.etree import ElementTree
2
2
  import xml.dom.minidom
3
3
 
4
4
 
@@ -10,7 +10,7 @@ def generate_vpr_constraints_xml_file(pin_map, filename):
10
10
 
11
11
  def generate_vpr_constraints_xml(pin_map):
12
12
 
13
- constraints_xml = ET.Element("vpr_constraints")
13
+ constraints_xml = ElementTree.Element("vpr_constraints")
14
14
 
15
15
  # Generate partition list section
16
16
  partition_list = generate_partition_list_xml(pin_map)
@@ -22,7 +22,7 @@ def generate_vpr_constraints_xml(pin_map):
22
22
 
23
23
  def generate_partition_list_xml(pin_map):
24
24
 
25
- partition_list = ET.Element("partition_list")
25
+ partition_list = ElementTree.Element("partition_list")
26
26
 
27
27
  # ***ASSUMPTION: pin map is a dictionary of block names
28
28
  # and tuples, where the tuples specify the
@@ -38,7 +38,7 @@ def generate_partition_list_xml(pin_map):
38
38
 
39
39
  def generate_partition_xml(pin, pin_region):
40
40
 
41
- partition = ET.Element("partition")
41
+ partition = ElementTree.Element("partition")
42
42
 
43
43
  partition_name = generate_partition_name(pin)
44
44
  partition.set("name", partition_name)
@@ -80,7 +80,7 @@ def generate_partition_name(pin):
80
80
 
81
81
  def generate_add_atom_xml(pin_name):
82
82
 
83
- atom_xml = ET.Element("add_atom")
83
+ atom_xml = ElementTree.Element("add_atom")
84
84
 
85
85
  atom_xml.set("name_pattern", str(pin_name))
86
86
 
@@ -89,7 +89,7 @@ def generate_add_atom_xml(pin_name):
89
89
 
90
90
  def generate_add_region_xml(x_low, x_high, y_low, y_high, subtile):
91
91
 
92
- region_xml = ET.Element("add_region")
92
+ region_xml = ElementTree.Element("add_region")
93
93
 
94
94
  region_xml.set("x_low", str(x_low))
95
95
  region_xml.set("y_low", str(y_low))
@@ -100,9 +100,9 @@ def generate_add_region_xml(x_low, x_high, y_low, y_high, subtile):
100
100
  return region_xml
101
101
 
102
102
 
103
- def write_vpr_constraints_xml_file(constraints: ET.Element, filename: str):
103
+ def write_vpr_constraints_xml_file(constraints: ElementTree.Element, filename: str):
104
104
 
105
- dom = xml.dom.minidom.parseString(ET.tostring(constraints))
105
+ dom = xml.dom.minidom.parseString(ElementTree.tostring(constraints))
106
106
  xml_string = dom.toprettyxml()
107
107
 
108
108
  with open(filename, 'w') as xfile:
@@ -6,7 +6,7 @@ import gzip
6
6
  import argparse # argument parsing
7
7
 
8
8
 
9
- def processLibertyFile(input_file, logger=None):
9
+ def process_liberty_file(input_file, logger=None):
10
10
  # Read input file
11
11
  if logger:
12
12
  logger.info(f"Opening file for replace: {input_file}")
@@ -56,4 +56,4 @@ if __name__ == "__main__":
56
56
  help='Output File')
57
57
  args = parser.parse_args()
58
58
 
59
- processLibertyFile(args.inputFile, args.outputFile, args.patterns)
59
+ process_liberty_file(args.inputFile, args.outputFile, args.patterns)
@@ -75,7 +75,9 @@ if { [sc_cfg_tool_task_exists file memory_techmap] } {
75
75
  ########################################################
76
76
 
77
77
  foreach lib_file "$sc_libraries $sc_macro_libraries" {
78
- yosys read_liberty -setattr liberty_cell -lib $lib_file
78
+ yosys read_liberty -overwrite -setattr liberty_cell -lib $lib_file
79
+ yosys read_liberty -overwrite -setattr liberty_cell \
80
+ -unit_delay -wb -ignore_miss_func -ignore_buses $lib_file
79
81
  }
80
82
  foreach bb_file $sc_blackboxes {
81
83
  yosys log "Reading blackbox model file: $bb_file"
@@ -118,10 +120,6 @@ if { [lindex [sc_cfg_tool_task_get var use_slang] 0] == "true" && [sc_load_plugi
118
120
  set slang_params []
119
121
  if { [sc_cfg_exists option param] } {
120
122
  dict for {key value} [sc_cfg_get option param] {
121
- if { ![string is integer $value] } {
122
- set value [concat \"$value\"]
123
- }
124
-
125
123
  lappend slang_params -G "${key}=${value}"
126
124
  }
127
125
  }
@@ -187,6 +185,45 @@ proc get_modules { { find "*" } } {
187
185
  return [lsort $modules]
188
186
  }
189
187
 
188
+ proc sc_annotate_gate_cost_equivalent { } {
189
+ yosys cellmatch -derive_luts =A:liberty_cell
190
+ # find a reference nand2 gate
191
+ set found_cell ""
192
+ set found_cell_area ""
193
+ # iterate over all cells with a nand2 signature
194
+ yosys echo off
195
+ set nand2_cells [yosys tee -q -s result.string select -list-mod =*/a:lut=4'b0111 %m]
196
+ yosys echo on
197
+ foreach cell $nand2_cells {
198
+ if { ![rtlil::has_attr -mod $cell area] } {
199
+ puts "WARNING: Cell $cell missing area information"
200
+ continue
201
+ }
202
+ set area [rtlil::get_attr -string -mod $cell area]
203
+ if { $found_cell == "" || $area < $found_cell_area } {
204
+ set found_cell $cell
205
+ set found_cell_area $area
206
+ }
207
+ }
208
+ if { $found_cell == "" } {
209
+ set found_cell_area 1
210
+ puts "WARNING: reference nand2 cell not found, using $found_cell_area as area"
211
+ } else {
212
+ puts "Using nand2 reference cell ($found_cell) with area: $found_cell_area"
213
+ }
214
+
215
+ # convert the area on all Liberty cells to a gate number equivalent
216
+ yosys echo off
217
+ set cells [yosys tee -q -s result.string select -list-mod =A:area =A:liberty_cell %i]
218
+ yosys echo on
219
+ foreach cell $cells {
220
+ set area [rtlil::get_attr -mod -string $cell area]
221
+ set gate_eq [expr { int(max(1, ceil($area / $found_cell_area))) }]
222
+ puts "Setting gate_cost_equivalent for $cell as $gate_eq"
223
+ rtlil::set_attr -mod -uint $cell gate_cost_equivalent $gate_eq
224
+ }
225
+ }
226
+
190
227
  #########################
191
228
  # Schema helper functions
192
229
  #########################
@@ -296,6 +333,7 @@ if { !$flatten_design && [lindex [sc_cfg_tool_task_get var auto_flatten] 0] == "
296
333
  set sc_hier_threshold \
297
334
  [lindex [sc_cfg_tool_task_get var hier_threshold] 0]
298
335
 
336
+ sc_annotate_gate_cost_equivalent
299
337
  yosys keep_hierarchy -min_cost $sc_hier_threshold
300
338
 
301
339
  yosys synth -flatten {*}$synth_args -top $sc_design -run coarse:fine
@@ -75,7 +75,7 @@ def prepare_asic_libraries(chip):
75
75
  lib_file_name = f'{lib_file_name_base}_{unique_ident}'
76
76
  unique_ident += 1
77
77
 
78
- lib_content[lib_file_name] = prepareLib.processLibertyFile(
78
+ lib_content[lib_file_name] = prepareLib.process_liberty_file(
79
79
  lib_file,
80
80
  logger=None if chip.get('option', 'quiet',
81
81
  step=step, index=index) else chip.logger)
@@ -2,7 +2,7 @@ from siliconcompiler.tools.yosys import synth_post_process, setup as tool_setup
2
2
  import os
3
3
  import json
4
4
  import re
5
- from siliconcompiler.tools.yosys.prepareLib import processLibertyFile
5
+ from siliconcompiler.tools.yosys.prepareLib import process_liberty_file
6
6
  from siliconcompiler import sc_open
7
7
  from siliconcompiler import utils
8
8
  from siliconcompiler.tools._common.asic import set_tool_task_var, get_libraries, get_mainlib, \
@@ -322,7 +322,7 @@ def prepare_synthesis_libraries(chip):
322
322
  lib_file_name = f'{lib_file_name_base}_{unique_ident}'
323
323
  unique_ident += 1
324
324
 
325
- lib_content[lib_file_name] = processLibertyFile(
325
+ lib_content[lib_file_name] = process_liberty_file(
326
326
  lib_file,
327
327
  logger=logger
328
328
  )
@@ -583,7 +583,7 @@ def _generate_cell_area_report(chip):
583
583
  cell_type = level_info["cells"][cell]["type"]
584
584
  if cell_type in modules:
585
585
  area, count = get_area_count(cell_type)
586
- cellarea_report.addCell(
586
+ cellarea_report.add_cell(
587
587
  name=f"{prefix}{cell}",
588
588
  module=cell_type,
589
589
  cellcount=count,
@@ -594,7 +594,7 @@ def _generate_cell_area_report(chip):
594
594
  area = 0.0
595
595
  if "area" in stat["design"]:
596
596
  area = stat["design"]["area"]
597
- cellarea_report.addCell(
597
+ cellarea_report.add_cell(
598
598
  name=design,
599
599
  module=design,
600
600
  cellarea=area,
@@ -604,4 +604,4 @@ def _generate_cell_area_report(chip):
604
604
  handle_heir(netlist["modules"][design], "")
605
605
 
606
606
  if cellarea_report.size() > 0:
607
- cellarea_report.writeReport("reports/hierarchical_cell_area.json")
607
+ cellarea_report.write_report("reports/hierarchical_cell_area.json")
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "openroad": {
3
3
  "git-url": "https://github.com/The-OpenROAD-Project/OpenROAD.git",
4
- "git-commit": "ce617810e4dc11b3cdb5a267ef3454788f81aaf0",
4
+ "git-commit": "cd121c095a6f77a501166e0961b2e93763c51b17",
5
5
  "docker-cmds": [
6
6
  "# Remove OR-Tools files",
7
7
  "RUN rm -f $SC_PREFIX/Makefile $SC_PREFIX/README.md",
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "opensta": {
19
19
  "git-url": "https://github.com/parallaxsw/OpenSTA.git",
20
- "git-commit": "b32eed9a849381172a5d3208cc7798a8a11c4c9b",
20
+ "git-commit": "0b59461bddb4ebc2228a20f17c9089be1f8c19da",
21
21
  "auto-update": true
22
22
  },
23
23
  "netgen": {
@@ -41,16 +41,21 @@
41
41
  "auto-update": false
42
42
  },
43
43
  "klayout": {
44
- "version": "0.30.1",
44
+ "version": "0.30.2",
45
45
  "git-url": "https://github.com/KLayout/klayout.git",
46
- "docker-skip": true,
47
46
  "auto-update": true,
48
47
  "run-version": "source version.sh && echo $KLAYOUT_VERSION",
49
- "release-notes": "https://www.klayout.de/development.html"
48
+ "release-notes": "https://www.klayout.de/development.html",
49
+ "docker-cmds": [
50
+ "RUN echo \"#!/bin/bash\" > $SC_PREFIX/install-klayout.sh",
51
+ "RUN echo \"sudo apt-get install -y $SC_PREFIX/klayout.deb\" >> $SC_PREFIX/install-klayout.sh",
52
+ "RUN echo \"sudo rm $SC_PREFIX/klayout.deb\" >> $SC_PREFIX/install-klayout.sh",
53
+ "RUN chmod +x $SC_PREFIX/install-klayout.sh"
54
+ ]
50
55
  },
51
56
  "sv2v": {
52
57
  "git-url": "https://github.com/zachjs/sv2v.git",
53
- "git-commit": "d30c7e7f4e9018b9d4a565207ff752460c81eeb4",
58
+ "git-commit": "380c2b978a54e459ac216c9e6b7f1a4e31573a0e",
54
59
  "auto-update": true
55
60
  },
56
61
  "verilator": {
@@ -101,8 +106,10 @@
101
106
  "auto-update": true
102
107
  },
103
108
  "xyce": {
104
- "version": "7.8",
105
- "auto-update": false
109
+ "git-url": "https://github.com/Xyce/Xyce.git",
110
+ "git-commit": "Release-7.9.0",
111
+ "version-prefix": "Release-",
112
+ "auto-update": true
106
113
  },
107
114
  "xdm": {
108
115
  "git-url": "https://github.com/Xyce/XDM.git",
@@ -133,7 +140,7 @@
133
140
  "auto-update": false
134
141
  },
135
142
  "slang": {
136
- "git-commit": "v8.0",
143
+ "git-commit": "v8.1",
137
144
  "git-url": "https://github.com/MikePopoloski/slang.git",
138
145
  "auto-update": true
139
146
  },
@@ -144,7 +151,7 @@
144
151
  },
145
152
  "yosys-slang": {
146
153
  "git-url": "https://github.com/povik/yosys-slang.git",
147
- "git-commit": "7d4959430442ac1d7e3bf7b3e55d648293a5ac7b",
154
+ "git-commit": "7da40107a513f0094d209ab3b0899f64e8dbeb0e",
148
155
  "docker-depends": "yosys",
149
156
  "auto-update": true
150
157
  },
@@ -1,10 +1,17 @@
1
1
  #!/bin/sh
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  # Get directory of script
6
6
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
7
 
8
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
9
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
10
+ SUDO_INSTALL=sudo
11
+ else
12
+ SUDO_INSTALL=""
13
+ fi
14
+
8
15
  sudo yum install -y wget
9
16
 
10
17
  mkdir -p deps
@@ -19,7 +26,7 @@ if [ ! -z ${PREFIX} ]; then
19
26
  args="-C $PREFIX --strip-components 1"
20
27
  fi
21
28
 
22
- tar xvf sbt.tgz $args
29
+ $SUDO_INSTALL tar xvf sbt.tgz $args
23
30
 
24
31
  cd -
25
32
 
@@ -1,10 +1,17 @@
1
1
  #!/bin/sh
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  # Get directory of script
6
6
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
7
 
8
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
9
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
10
+ SUDO_INSTALL=sudo
11
+ else
12
+ SUDO_INSTALL=""
13
+ fi
14
+
8
15
  sudo yum group install -y "Development Tools"
9
16
  sudo yum install -y wget git
10
17
 
@@ -21,7 +28,7 @@ tar xvf gperf-3.1.tar.gz
21
28
  cd gperf-3.1
22
29
  ./configure $args
23
30
  make -j$(nproc)
24
- sudo make install
31
+ $SUDO_INSTALL make install
25
32
  cd ..
26
33
 
27
34
  if [ ! -z ${PREFIX} ]; then
@@ -36,6 +43,6 @@ git checkout $(python3 ${src_path}/_tools.py --tool icarus --field git-commit)
36
43
  sh autoconf.sh
37
44
  ./configure $args
38
45
  make -j$(nproc)
39
- sudo make install
46
+ $SUDO_INSTALL make install
40
47
 
41
48
  cd -
@@ -1,10 +1,17 @@
1
1
  #!/bin/sh
2
2
 
3
- set -e
3
+ set -ex
4
4
 
5
5
  # Get directory of script
6
6
  src_path=$(cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P)/..
7
7
 
8
+ USE_SUDO_INSTALL="${USE_SUDO_INSTALL:-yes}"
9
+ if [ "${USE_SUDO_INSTALL:-yes}" = "yes" ]; then
10
+ SUDO_INSTALL=sudo
11
+ else
12
+ SUDO_INSTALL=""
13
+ fi
14
+
8
15
  sudo yum install -y wget
9
16
 
10
17
  mkdir -p deps