siliconcompiler 0.32.3__py3-none-any.whl → 0.33.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 (154) hide show
  1. siliconcompiler/__init__.py +19 -2
  2. siliconcompiler/_metadata.py +1 -1
  3. siliconcompiler/apps/sc.py +2 -2
  4. siliconcompiler/apps/sc_install.py +3 -3
  5. siliconcompiler/apps/sc_issue.py +1 -1
  6. siliconcompiler/apps/sc_remote.py +4 -4
  7. siliconcompiler/apps/sc_show.py +2 -2
  8. siliconcompiler/apps/utils/replay.py +5 -3
  9. siliconcompiler/asic.py +120 -0
  10. siliconcompiler/checklist.py +150 -0
  11. siliconcompiler/core.py +267 -289
  12. siliconcompiler/flowgraph.py +803 -515
  13. siliconcompiler/fpga.py +84 -0
  14. siliconcompiler/metric.py +420 -0
  15. siliconcompiler/optimizer/vizier.py +2 -3
  16. siliconcompiler/package/__init__.py +29 -6
  17. siliconcompiler/pdk.py +415 -0
  18. siliconcompiler/record.py +449 -0
  19. siliconcompiler/remote/client.py +6 -3
  20. siliconcompiler/remote/schema.py +116 -112
  21. siliconcompiler/remote/server.py +3 -5
  22. siliconcompiler/report/dashboard/cli/__init__.py +13 -722
  23. siliconcompiler/report/dashboard/cli/board.py +895 -0
  24. siliconcompiler/report/dashboard/web/__init__.py +10 -10
  25. siliconcompiler/report/dashboard/web/components/__init__.py +5 -4
  26. siliconcompiler/report/dashboard/web/components/flowgraph.py +3 -3
  27. siliconcompiler/report/dashboard/web/components/graph.py +6 -3
  28. siliconcompiler/report/dashboard/web/state.py +1 -1
  29. siliconcompiler/report/dashboard/web/utils/__init__.py +4 -3
  30. siliconcompiler/report/html_report.py +2 -3
  31. siliconcompiler/report/report.py +13 -7
  32. siliconcompiler/report/summary_image.py +1 -1
  33. siliconcompiler/report/summary_table.py +3 -3
  34. siliconcompiler/report/utils.py +11 -10
  35. siliconcompiler/scheduler/__init__.py +145 -280
  36. siliconcompiler/scheduler/run_node.py +2 -1
  37. siliconcompiler/scheduler/send_messages.py +4 -4
  38. siliconcompiler/scheduler/slurm.py +2 -2
  39. siliconcompiler/schema/__init__.py +19 -2
  40. siliconcompiler/schema/baseschema.py +493 -0
  41. siliconcompiler/schema/cmdlineschema.py +250 -0
  42. siliconcompiler/{sphinx_ext → schema/docs}/__init__.py +3 -1
  43. siliconcompiler/{sphinx_ext → schema/docs}/dynamicgen.py +63 -81
  44. siliconcompiler/{sphinx_ext → schema/docs}/schemagen.py +73 -85
  45. siliconcompiler/{sphinx_ext → schema/docs}/utils.py +12 -13
  46. siliconcompiler/schema/editableschema.py +136 -0
  47. siliconcompiler/schema/journalingschema.py +238 -0
  48. siliconcompiler/schema/namedschema.py +41 -0
  49. siliconcompiler/schema/packageschema.py +101 -0
  50. siliconcompiler/schema/parameter.py +791 -0
  51. siliconcompiler/schema/parametertype.py +323 -0
  52. siliconcompiler/schema/parametervalue.py +736 -0
  53. siliconcompiler/schema/safeschema.py +37 -0
  54. siliconcompiler/schema/schema_cfg.py +109 -1789
  55. siliconcompiler/schema/utils.py +5 -68
  56. siliconcompiler/schema_obj.py +119 -0
  57. siliconcompiler/tool.py +1308 -0
  58. siliconcompiler/tools/_common/__init__.py +6 -10
  59. siliconcompiler/tools/_common/sdc/sc_constraints.sdc +1 -1
  60. siliconcompiler/tools/bluespec/convert.py +7 -7
  61. siliconcompiler/tools/builtin/_common.py +1 -1
  62. siliconcompiler/tools/builtin/concatenate.py +2 -2
  63. siliconcompiler/tools/builtin/minimum.py +1 -1
  64. siliconcompiler/tools/builtin/mux.py +2 -1
  65. siliconcompiler/tools/builtin/nop.py +1 -1
  66. siliconcompiler/tools/builtin/verify.py +6 -4
  67. siliconcompiler/tools/chisel/convert.py +4 -4
  68. siliconcompiler/tools/genfasm/bitstream.py +3 -3
  69. siliconcompiler/tools/ghdl/convert.py +1 -1
  70. siliconcompiler/tools/icarus/compile.py +4 -4
  71. siliconcompiler/tools/icepack/bitstream.py +6 -1
  72. siliconcompiler/tools/klayout/convert_drc_db.py +5 -0
  73. siliconcompiler/tools/klayout/klayout_export.py +0 -1
  74. siliconcompiler/tools/klayout/klayout_utils.py +3 -10
  75. siliconcompiler/tools/nextpnr/apr.py +6 -1
  76. siliconcompiler/tools/nextpnr/nextpnr.py +4 -4
  77. siliconcompiler/tools/openroad/_apr.py +13 -0
  78. siliconcompiler/tools/openroad/rdlroute.py +3 -3
  79. siliconcompiler/tools/openroad/scripts/apr/postamble.tcl +1 -1
  80. siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +5 -5
  81. siliconcompiler/tools/openroad/scripts/apr/sc_antenna_repair.tcl +2 -2
  82. siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +2 -2
  83. siliconcompiler/tools/openroad/scripts/apr/sc_detailed_placement.tcl +2 -2
  84. siliconcompiler/tools/openroad/scripts/apr/sc_detailed_route.tcl +2 -2
  85. siliconcompiler/tools/openroad/scripts/apr/sc_endcap_tapcell_insertion.tcl +2 -2
  86. siliconcompiler/tools/openroad/scripts/apr/sc_fillercell_insertion.tcl +2 -2
  87. siliconcompiler/tools/openroad/scripts/apr/sc_fillmetal_insertion.tcl +2 -2
  88. siliconcompiler/tools/openroad/scripts/apr/sc_global_placement.tcl +2 -2
  89. siliconcompiler/tools/openroad/scripts/apr/sc_global_route.tcl +2 -2
  90. siliconcompiler/tools/openroad/scripts/apr/sc_init_floorplan.tcl +2 -2
  91. siliconcompiler/tools/openroad/scripts/apr/sc_macro_placement.tcl +3 -3
  92. siliconcompiler/tools/openroad/scripts/apr/sc_metrics.tcl +2 -2
  93. siliconcompiler/tools/openroad/scripts/apr/sc_pin_placement.tcl +2 -2
  94. siliconcompiler/tools/openroad/scripts/apr/sc_power_grid.tcl +2 -2
  95. siliconcompiler/tools/openroad/scripts/apr/sc_repair_design.tcl +2 -2
  96. siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +2 -2
  97. siliconcompiler/tools/openroad/scripts/apr/sc_write_data.tcl +2 -2
  98. siliconcompiler/tools/openroad/scripts/common/procs.tcl +57 -1
  99. siliconcompiler/tools/openroad/scripts/common/screenshot.tcl +2 -2
  100. siliconcompiler/tools/openroad/scripts/common/write_images.tcl +28 -3
  101. siliconcompiler/tools/openroad/scripts/sc_rcx.tcl +1 -1
  102. siliconcompiler/tools/openroad/scripts/sc_rdlroute.tcl +3 -3
  103. siliconcompiler/tools/openroad/scripts/sc_show.tcl +6 -6
  104. siliconcompiler/tools/slang/__init__.py +10 -10
  105. siliconcompiler/tools/surelog/parse.py +4 -4
  106. siliconcompiler/tools/sv2v/convert.py +20 -3
  107. siliconcompiler/tools/verilator/compile.py +2 -2
  108. siliconcompiler/tools/verilator/verilator.py +3 -3
  109. siliconcompiler/tools/vpr/place.py +1 -1
  110. siliconcompiler/tools/vpr/route.py +4 -4
  111. siliconcompiler/tools/vpr/screenshot.py +1 -1
  112. siliconcompiler/tools/vpr/show.py +5 -5
  113. siliconcompiler/tools/vpr/vpr.py +24 -24
  114. siliconcompiler/tools/xdm/convert.py +2 -2
  115. siliconcompiler/tools/xyce/simulate.py +1 -1
  116. siliconcompiler/tools/yosys/sc_synth_asic.tcl +74 -68
  117. siliconcompiler/tools/yosys/syn_asic.py +2 -2
  118. siliconcompiler/toolscripts/_tools.json +7 -7
  119. siliconcompiler/toolscripts/ubuntu22/install-vpr.sh +0 -2
  120. siliconcompiler/toolscripts/ubuntu24/install-vpr.sh +0 -2
  121. siliconcompiler/utils/__init__.py +8 -112
  122. siliconcompiler/utils/flowgraph.py +339 -0
  123. siliconcompiler/{issue.py → utils/issue.py} +4 -3
  124. siliconcompiler/utils/logging.py +1 -2
  125. {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.0.dist-info}/METADATA +9 -8
  126. {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.0.dist-info}/RECORD +151 -134
  127. {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.0.dist-info}/WHEEL +1 -1
  128. {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.0.dist-info}/entry_points.txt +8 -8
  129. siliconcompiler/schema/schema_obj.py +0 -1936
  130. siliconcompiler/toolscripts/ubuntu20/install-vpr.sh +0 -29
  131. siliconcompiler/toolscripts/ubuntu20/install-yosys-parmys.sh +0 -61
  132. /siliconcompiler/{templates → data/templates}/__init__.py +0 -0
  133. /siliconcompiler/{templates → data/templates}/email/__init__.py +0 -0
  134. /siliconcompiler/{templates → data/templates}/email/general.j2 +0 -0
  135. /siliconcompiler/{templates → data/templates}/email/summary.j2 +0 -0
  136. /siliconcompiler/{templates → data/templates}/issue/README.txt +0 -0
  137. /siliconcompiler/{templates → data/templates}/issue/__init__.py +0 -0
  138. /siliconcompiler/{templates → data/templates}/issue/run.sh +0 -0
  139. /siliconcompiler/{templates → data/templates}/replay/replay.py.j2 +0 -0
  140. /siliconcompiler/{templates → data/templates}/replay/replay.sh.j2 +0 -0
  141. /siliconcompiler/{templates → data/templates}/replay/requirements.txt +0 -0
  142. /siliconcompiler/{templates → data/templates}/replay/setup.sh +0 -0
  143. /siliconcompiler/{templates → data/templates}/report/__init__.py +0 -0
  144. /siliconcompiler/{templates → data/templates}/report/bootstrap.min.css +0 -0
  145. /siliconcompiler/{templates → data/templates}/report/bootstrap.min.js +0 -0
  146. /siliconcompiler/{templates → data/templates}/report/bootstrap_LICENSE.md +0 -0
  147. /siliconcompiler/{templates → data/templates}/report/sc_report.j2 +0 -0
  148. /siliconcompiler/{templates → data/templates}/slurm/__init__.py +0 -0
  149. /siliconcompiler/{templates → data/templates}/slurm/run.sh +0 -0
  150. /siliconcompiler/{templates → data/templates}/tcl/__init__.py +0 -0
  151. /siliconcompiler/{templates → data/templates}/tcl/manifest.tcl.j2 +0 -0
  152. /siliconcompiler/{units.py → utils/units.py} +0 -0
  153. {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.0.dist-info}/licenses/LICENSE +0 -0
  154. {siliconcompiler-0.32.3.dist-info → siliconcompiler-0.33.0.dist-info}/top_level.txt +0 -0
@@ -103,15 +103,15 @@ def runtime_options(chip):
103
103
 
104
104
  device_code = chip.get('fpga', part_name, 'var', 'vpr_device_code')
105
105
 
106
- options.append(f"--device {device_code[0]}")
106
+ options.extend(["--device", device_code[0]])
107
107
 
108
108
  # Medium-term solution: VPR performs hash digest checks that
109
109
  # fail if file paths are changed between steps. We wish to
110
110
  # disable the digest checks to work around this
111
- options.append("--verify_file_digests off")
111
+ options.extend(["--verify_file_digests", "off"])
112
112
 
113
- options.append(f"--write_block_usage {__block_file}")
114
- options.append("--outfile_prefix outputs/")
113
+ options.extend(["--write_block_usage", __block_file])
114
+ options.extend(["--outfile_prefix", "outputs/"])
115
115
 
116
116
  if chip.valid('fpga', part_name, 'file', 'archfile') and \
117
117
  chip.get('fpga', part_name, 'file', 'archfile'):
@@ -133,25 +133,25 @@ def runtime_options(chip):
133
133
  "Only one architecture XML file can be passed to VPR", chip=chip)
134
134
 
135
135
  threads = chip.get('tool', tool, 'task', task, 'threads', step=step, index=index)
136
- options.append(f"--num_workers {threads}")
136
+ options.extend(["--num_workers", threads])
137
137
 
138
138
  # For most architectures, constant nets need to be routed
139
139
  # like regular nets to be functionally correct (however inefficient
140
140
  # that might be...); these two options help control that
141
- options.append('--constant_net_method route')
142
- options.append('--const_gen_inference none')
141
+ options.extend(['--constant_net_method', 'route'])
142
+ options.extend(['--const_gen_inference', 'none'])
143
143
 
144
144
  # If we allow VPR to sweep dangling primary I/Os and logic blocks
145
145
  # it can interfere with circuit debugging; so disable that
146
- options.append('--sweep_dangling_primary_ios off')
146
+ options.extend(['--sweep_dangling_primary_ios', 'off'])
147
147
  # If you don't sweep dangling primary I/Os, but sweeping nets
148
148
  # VPR can crash:
149
- options.append('--sweep_dangling_nets off')
149
+ options.extend(['--sweep_dangling_nets', 'off'])
150
150
  # If you don't sweep dangling nets then the timing engine requires
151
151
  # you to set an option allowing dangling nodes
152
- options.append('--allow_dangling_combinational_nodes on')
153
- options.append('--sweep_constant_primary_outputs off')
154
- options.append('--sweep_dangling_blocks off')
152
+ options.extend(['--allow_dangling_combinational_nodes', 'on'])
153
+ options.extend(['--sweep_constant_primary_outputs', 'off'])
154
+ options.extend(['--sweep_dangling_blocks', 'off'])
155
155
 
156
156
  # Explicitly specify the clock modeling type in the part driver
157
157
  # to avoid ambiguity and future-proof against new VPR clock models
@@ -163,11 +163,11 @@ def runtime_options(chip):
163
163
  # When dedicated networks are used, tell VPR to use the two-stage router,
164
164
  # otherwise not.
165
165
  if (selected_clock_model == 'ideal'):
166
- options.append(f'--clock_modeling {selected_clock_model}')
166
+ options.extend(['--clock_modeling', selected_clock_model])
167
167
  elif (selected_clock_model == 'route'):
168
- options.append(f'--clock_modeling {selected_clock_model}')
168
+ options.extend(['--clock_modeling', selected_clock_model])
169
169
  elif (selected_clock_model == 'dedicated_network'):
170
- options.append(f'--clock_modeling {selected_clock_model}')
170
+ options.extend(['--clock_modeling', selected_clock_model])
171
171
  options.append('--two_stage_clock_routing')
172
172
  else:
173
173
  raise SiliconCompilerError(
@@ -181,24 +181,24 @@ def runtime_options(chip):
181
181
  file_not_found_msg="SDC file not found")
182
182
 
183
183
  if sdc_file:
184
- sdc_arg = f"--sdc_file {sdc_file}"
185
- options.append(sdc_arg)
184
+ options.append("--sdc_file")
185
+ options.append(sdc_file)
186
186
 
187
187
  report_type = chip.get('tool', tool, 'task', task, 'var', 'timing_report_type',
188
188
  step=step, index=index)[0]
189
- options.append(f'--timing_report_detail {report_type}')
189
+ options.extend(['--timing_report_detail', report_type])
190
190
  report_paths = chip.get('tool', tool, 'task', task, 'var', 'timing_paths',
191
191
  step=step, index=index)[0]
192
- options.append(f'--timing_report_npaths {report_paths}')
192
+ options.extend(['--timing_report_npaths', report_paths])
193
193
  else:
194
- options.append("--timing_analysis off")
194
+ options.extend(["--timing_analysis", "off"])
195
195
 
196
196
  # Per the scheme implemented in the placement pre-process step,
197
197
  # if a constraints file exists it will always be in the auto_constraints()
198
198
  # location:
199
199
  if (os.path.isfile(auto_constraints())):
200
- pin_constraint_arg = f"--read_vpr_constraints {auto_constraints()}"
201
- options.append(pin_constraint_arg)
200
+ options.append("--read_vpr_constraints")
201
+ options.append(auto_constraints())
202
202
 
203
203
  # Routing graph XML:
204
204
  rr_graph = find_single_file(chip, 'fpga', part_name, 'file', 'graphfile',
@@ -208,7 +208,7 @@ def runtime_options(chip):
208
208
  chip.logger.info("No VPR RR graph file specified")
209
209
  chip.logger.info("Routing architecture will come from architecture XML file")
210
210
  else:
211
- options.append("--read_rr_graph " + rr_graph)
211
+ options.extend(["--read_rr_graph", rr_graph])
212
212
 
213
213
  # ***NOTE: For real FPGA chips you need to specify the routing channel
214
214
  # width explicitly. VPR requires an explicit routing channel
@@ -222,7 +222,7 @@ def runtime_options(chip):
222
222
  if (len(num_routing_channels) == 0):
223
223
  raise SiliconCompilerError("Number of routing channels not specified", chip=chip)
224
224
  elif (len(num_routing_channels) == 1):
225
- options.append("--route_chan_width " + num_routing_channels[0])
225
+ options.extend(["--route_chan_width", num_routing_channels[0]])
226
226
  elif (len(num_routing_channels) > 1):
227
227
  raise SiliconCompilerError(
228
228
  "Only one routing channel width argument can be passed to VPR", chip=chip)
@@ -24,9 +24,9 @@ def setup(chip):
24
24
 
25
25
  chip.add('tool', tool, 'task', task, 'option', '--auto',
26
26
  step=step, index=index)
27
- chip.add('tool', tool, 'task', task, 'option', '--source_file_format hspice',
27
+ chip.add('tool', tool, 'task', task, 'option', ['--source_file_format', 'hspice'],
28
28
  step=step, index=index)
29
- chip.add('tool', tool, 'task', task, 'option', f'--dir_out outputs/{design}.xyce',
29
+ chip.add('tool', tool, 'task', task, 'option', ['--dir_out', f'outputs/{design}.xyce'],
30
30
  step=step, index=index)
31
31
 
32
32
  chip.set('tool', 'xdm', 'task', 'convert', 'var', 'rename', 'true',
@@ -48,7 +48,7 @@ def setup(chip):
48
48
  step=step, index=index) == ['true']:
49
49
  chip.add('tool', tool, 'task', task, 'output', f'{design}.raw',
50
50
  step=step, index=index)
51
- chip.add('tool', tool, 'task', task, 'option', f'-r outputs/{design}.raw',
51
+ chip.add('tool', tool, 'task', task, 'option', ['-r', f'outputs/{design}.raw'],
52
52
  step=step, index=index)
53
53
 
54
54
 
@@ -32,18 +32,83 @@ set sc_pdk [sc_cfg_get option pdk]
32
32
 
33
33
  source "$sc_refdir/procs.tcl"
34
34
 
35
+ ####################
36
+ # DESIGNER's CHOICE
37
+ ####################
38
+
39
+ set sc_logiclibs [sc_get_asic_libraries logic]
40
+ set sc_macrolibs [sc_get_asic_libraries macro]
41
+
42
+ set sc_libraries [sc_cfg_tool_task_get {file} synthesis_libraries]
43
+ if { [sc_cfg_tool_task_exists {file} synthesis_libraries_macros] } {
44
+ set sc_macro_libraries \
45
+ [sc_cfg_tool_task_get {file} synthesis_libraries_macros]
46
+ } else {
47
+ set sc_macro_libraries []
48
+ }
49
+ set sc_mainlib [lindex $sc_logiclibs 0]
50
+
51
+ set sc_abc_constraints \
52
+ [lindex [sc_cfg_tool_task_get {file} abc_constraint_file] 0]
53
+
54
+ set sc_blackboxes []
55
+ foreach lib $sc_macrolibs {
56
+ if { [sc_cfg_exists library $lib output blackbox verilog] } {
57
+ foreach lib_f [sc_cfg_get library $lib output blackbox verilog] {
58
+ lappend sc_blackboxes $lib_f
59
+ }
60
+ }
61
+ }
62
+
63
+ set sc_memory_libmap_files ""
64
+ if { [sc_cfg_tool_task_exists file memory_libmap] } {
65
+ set sc_memory_libmap_files [sc_cfg_tool_task_get file memory_libmap]
66
+ }
67
+
68
+ set sc_memory_techmap_files ""
69
+ if { [sc_cfg_tool_task_exists file memory_techmap] } {
70
+ set sc_memory_techmap_files [sc_cfg_tool_task_get file memory_techmap]
71
+ }
72
+
73
+ ########################################################
74
+ # Read Libraries
75
+ ########################################################
76
+
77
+ foreach lib_file "$sc_libraries $sc_macro_libraries" {
78
+ yosys read_liberty -setattr liberty_cell -lib $lib_file
79
+ }
80
+ foreach bb_file $sc_blackboxes {
81
+ yosys log "Reading blackbox model file: $bb_file"
82
+ yosys read_verilog -setattr blackbox -sv $bb_file
83
+ }
84
+
85
+ # Before working on the design, we mask out any module supplied via
86
+ # `blackbox_modules`. This allows synthesis of parts of the design without having
87
+ # to modify the input RTL.
88
+ if { [sc_cfg_tool_task_exists var blackbox_modules] } {
89
+ foreach bb [sc_cfg_tool_task_get var blackbox_modules] {
90
+ foreach module [get_modules $bb] {
91
+ yosys log "Blackboxing module: $module"
92
+ yosys blackbox $module
93
+ }
94
+ }
95
+ }
96
+
35
97
  ########################################################
36
98
  # Design Inputs
37
99
  ########################################################
38
100
 
39
101
  set input_verilog "inputs/$sc_design.v"
40
102
  if { ![file exists $input_verilog] } {
41
- set input_verilog []
42
- if { [sc_cfg_exists input rtl systemverilog] } {
43
- lappend input_verilog {*}[sc_cfg_get input rtl systemverilog]
44
- }
45
- if { [sc_cfg_exists input rtl verilog] } {
46
- lappend input_verilog {*}[sc_cfg_get input rtl verilog]
103
+ set input_verilog "inputs/$sc_design.sv"
104
+ if { ![file exists $input_verilog] } {
105
+ set input_verilog []
106
+ if { [sc_cfg_exists input rtl systemverilog] } {
107
+ lappend input_verilog {*}[sc_cfg_get input rtl systemverilog]
108
+ }
109
+ if { [sc_cfg_exists input rtl verilog] } {
110
+ lappend input_verilog {*}[sc_cfg_get input rtl verilog]
111
+ }
47
112
  }
48
113
  }
49
114
 
@@ -63,9 +128,12 @@ if { [lindex [sc_cfg_tool_task_get var use_slang] 0] == "true" && [sc_load_plugi
63
128
  yosys read_slang \
64
129
  -D SYNTHESIS \
65
130
  --keep-hierarchy \
131
+ --ignore-assertions \
132
+ --allow-use-before-declare \
66
133
  --top $sc_design \
67
134
  {*}$slang_params \
68
135
  {*}$input_verilog
136
+ yosys setattr -unset init
69
137
  } else {
70
138
  # Use -noblackbox to correctly interpret empty modules as empty,
71
139
  # actual black boxes are read in later
@@ -119,44 +187,6 @@ proc get_modules { { find "*" } } {
119
187
  return [lsort $modules]
120
188
  }
121
189
 
122
- ####################
123
- # DESIGNER's CHOICE
124
- ####################
125
-
126
- set sc_logiclibs [sc_get_asic_libraries logic]
127
- set sc_macrolibs [sc_get_asic_libraries macro]
128
-
129
- set sc_libraries [sc_cfg_tool_task_get {file} synthesis_libraries]
130
- if { [sc_cfg_tool_task_exists {file} synthesis_libraries_macros] } {
131
- set sc_macro_libraries \
132
- [sc_cfg_tool_task_get {file} synthesis_libraries_macros]
133
- } else {
134
- set sc_macro_libraries []
135
- }
136
- set sc_mainlib [lindex $sc_logiclibs 0]
137
-
138
- set sc_abc_constraints \
139
- [lindex [sc_cfg_tool_task_get {file} abc_constraint_file] 0]
140
-
141
- set sc_blackboxes []
142
- foreach lib $sc_macrolibs {
143
- if { [sc_cfg_exists library $lib output blackbox verilog] } {
144
- foreach lib_f [sc_cfg_get library $lib output blackbox verilog] {
145
- lappend sc_blackboxes $lib_f
146
- }
147
- }
148
- }
149
-
150
- set sc_memory_libmap_files ""
151
- if { [sc_cfg_tool_task_exists file memory_libmap] } {
152
- set sc_memory_libmap_files [sc_cfg_tool_task_get file memory_libmap]
153
- }
154
-
155
- set sc_memory_techmap_files ""
156
- if { [sc_cfg_tool_task_exists file memory_techmap] } {
157
- set sc_memory_techmap_files [sc_cfg_tool_task_get file memory_techmap]
158
- }
159
-
160
190
  #########################
161
191
  # Schema helper functions
162
192
  #########################
@@ -209,34 +239,10 @@ proc get_buffer_cell { } {
209
239
  return "$cell $in $out"
210
240
  }
211
241
 
212
- ########################################################
213
- # Read Libraries
214
- ########################################################
215
-
216
- foreach lib_file "$sc_libraries $sc_macro_libraries" {
217
- yosys read_liberty -setattr liberty_cell -lib $lib_file
218
- }
219
- foreach bb_file $sc_blackboxes {
220
- yosys log "Reading blackbox model file: $bb_file"
221
- yosys read_verilog -setattr blackbox -sv $bb_file
222
- }
223
-
224
242
  ########################################################
225
243
  # Synthesis
226
244
  ########################################################
227
245
 
228
- # Before working on the design, we mask out any module supplied via
229
- # `blackbox_modules`. This allows synthesis of parts of the design without having
230
- # to modify the input RTL.
231
- if { [sc_cfg_tool_task_exists var blackbox_modules] } {
232
- foreach bb [sc_cfg_tool_task_get var blackbox_modules] {
233
- foreach module [get_modules $bb] {
234
- yosys log "Blackboxing module: $module"
235
- yosys blackbox $module
236
- }
237
- }
238
- }
239
-
240
246
  # Although the `synth` command also runs `hierarchy`, we run it here without the
241
247
  # `-check` flag first in order to resolve parameters before looking for missing
242
248
  # modules. This works around the fact that Surelog doesn't pickle modules that
@@ -36,6 +36,8 @@ def setup(chip):
36
36
  # Input/output requirements.
37
37
  if f'{design}.v' in input_provides(chip, step, index):
38
38
  chip.set('tool', tool, 'task', task, 'input', design + '.v', step=step, index=index)
39
+ elif f'{design}.sv' in input_provides(chip, step, index):
40
+ chip.set('tool', tool, 'task', task, 'input', design + '.sv', step=step, index=index)
39
41
  else:
40
42
  added = False
41
43
  added |= add_require_input(chip, 'input', 'rtl', 'systemverilog',
@@ -565,8 +567,6 @@ def _generate_cell_area_report(chip):
565
567
  area = info["area"]
566
568
 
567
569
  for cell, inst_count in info["num_cells_by_type"].items():
568
- # print(module, cell, inst_count)
569
-
570
570
  cell_area, cell_count = get_area_count(cell)
571
571
 
572
572
  count += cell_count * inst_count
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "openroad": {
3
3
  "git-url": "https://github.com/The-OpenROAD-Project/OpenROAD.git",
4
- "git-commit": "e78e29127134a0b95ebcd5661895c6dc4651e641",
4
+ "git-commit": "ce617810e4dc11b3cdb5a267ef3454788f81aaf0",
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": "109bc9ab5e35b830db9569f741db09e468704e6b",
20
+ "git-commit": "b32eed9a849381172a5d3208cc7798a8a11c4c9b",
21
21
  "auto-update": true
22
22
  },
23
23
  "netgen": {
@@ -41,7 +41,7 @@
41
41
  "auto-update": false
42
42
  },
43
43
  "klayout": {
44
- "version": "0.30.0",
44
+ "version": "0.30.1",
45
45
  "git-url": "https://github.com/KLayout/klayout.git",
46
46
  "docker-skip": true,
47
47
  "auto-update": true,
@@ -71,7 +71,7 @@
71
71
  },
72
72
  "vpr": {
73
73
  "git-url": "https://github.com/verilog-to-routing/vtr-verilog-to-routing.git",
74
- "git-commit": "2a4e92181280a235315621253d1dc9eb8826bc53",
74
+ "git-commit": "c606a21d9ab5db53fb382a7dd79a0703c887108c",
75
75
  "auto-update": false
76
76
  },
77
77
  "icepack": {
@@ -96,7 +96,7 @@
96
96
  },
97
97
  "yosys": {
98
98
  "git-url": "https://github.com/YosysHQ/yosys.git",
99
- "git-commit": "v0.52",
99
+ "git-commit": "v0.53",
100
100
  "version-prefix": "",
101
101
  "auto-update": true
102
102
  },
@@ -144,7 +144,7 @@
144
144
  },
145
145
  "yosys-slang": {
146
146
  "git-url": "https://github.com/povik/yosys-slang.git",
147
- "git-commit": "a95ef24f0307230ae25ea6f2216d2fe8b8ece0be",
147
+ "git-commit": "7d4959430442ac1d7e3bf7b3e55d648293a5ac7b",
148
148
  "docker-depends": "yosys",
149
149
  "auto-update": true
150
150
  },
@@ -156,7 +156,7 @@
156
156
  },
157
157
  "yosys-parmys": {
158
158
  "git-url": "https://github.com/verilog-to-routing/vtr-verilog-to-routing.git",
159
- "git-commit": "2a4e92181280a235315621253d1dc9eb8826bc53",
159
+ "git-commit": "c606a21d9ab5db53fb382a7dd79a0703c887108c",
160
160
  "docker-depends": [
161
161
  "yosys",
162
162
  "vpr"
@@ -17,8 +17,6 @@ git submodule update --init --recursive
17
17
 
18
18
  ./install_apt_packages.sh
19
19
 
20
- sudo apt-get install -y libtbb-dev
21
-
22
20
  args=
23
21
  if [ ! -z ${PREFIX} ]; then
24
22
  args="-DCMAKE_INSTALL_PREFIX=$PREFIX"
@@ -17,8 +17,6 @@ git submodule update --init --recursive
17
17
 
18
18
  ./install_apt_packages.sh
19
19
 
20
- sudo apt-get install -y libtbb-dev
21
-
22
20
  args=
23
21
  if [ ! -z ${PREFIX} ]; then
24
22
  args="-DCMAKE_INSTALL_PREFIX=$PREFIX"
@@ -1,11 +1,11 @@
1
1
  import contextlib
2
- import hashlib
3
2
  import os
4
3
  import re
5
4
  import psutil
6
5
  import shutil
7
- from pathlib import Path, PurePosixPath
6
+ from pathlib import Path
8
7
  from jinja2 import Environment, FileSystemLoader
8
+ from siliconcompiler.schema.parametervalue import PathNodeValue
9
9
 
10
10
  import sys
11
11
  if sys.version_info < (3, 10):
@@ -231,7 +231,9 @@ def sc_open(path, *args, **kwargs):
231
231
  def get_file_template(path,
232
232
  root=os.path.join(
233
233
  os.path.dirname(
234
- os.path.dirname(os.path.abspath(__file__))), 'templates')):
234
+ os.path.dirname(os.path.abspath(__file__))),
235
+ 'data',
236
+ 'templates')):
235
237
  if os.path.isabs(path):
236
238
  root = os.path.dirname(path)
237
239
  path = os.path.basename(path)
@@ -325,31 +327,6 @@ def grep(chip, args, line):
325
327
  return line
326
328
 
327
329
 
328
- #######################################
329
- def _resolve_env_vars(chip, filepath, step, index):
330
- if not filepath:
331
- return None
332
-
333
- env_save = os.environ.copy()
334
-
335
- os.environ.update(get_env_vars(chip, step, index))
336
- resolved_path = os.path.expandvars(filepath)
337
-
338
- os.environ.clear()
339
- os.environ.update(env_save)
340
-
341
- resolved_path = os.path.expanduser(resolved_path)
342
-
343
- # variables that don't exist in environment get ignored by `expandvars`,
344
- # but we can do our own error checking to ensure this doesn't result in
345
- # silent bugs
346
- envvars = re.findall(r'\$\{?(\w+)\}?', resolved_path)
347
- for var in envvars:
348
- chip.logger.warning(f'Variable {var} in {filepath} not defined in environment')
349
-
350
- return resolved_path
351
-
352
-
353
330
  #######################################
354
331
  def get_env_vars(chip, step, index):
355
332
  '''
@@ -373,69 +350,6 @@ def get_env_vars(chip, step, index):
373
350
  return schema_env
374
351
 
375
352
 
376
- ###########################################################################
377
- def find_sc_file(chip, filename, missing_ok=False, search_paths=None, step=None, index=None):
378
- """
379
- Returns the absolute path for the filename provided.
380
-
381
- Searches the for the filename provided and returns the absolute path.
382
- If no valid absolute path is found during the search, None is returned.
383
-
384
- Shell variables ('$' followed by strings consisting of numbers,
385
- underscores, and digits) are replaced with the variable value.
386
-
387
- Args:
388
- filename (str): Relative or absolute filename.
389
- missing_ok (bool): If False, error out if no valid absolute path
390
- found, rather than returning None.
391
- search_paths (list): List of directories to search under instead of
392
- the defaults.
393
- step (str): Step name
394
- index (str): Index
395
-
396
- Returns:
397
- Returns absolute path of 'filename' if found, otherwise returns
398
- None.
399
-
400
- Examples:
401
- >>> chip._find_sc_file('flows/asicflow.py')
402
- Returns the absolute path based on the sc installation directory.
403
-
404
- """
405
-
406
- if not filename:
407
- return None
408
-
409
- # Replacing environment variables
410
- filename = _resolve_env_vars(chip, filename, step, index)
411
-
412
- # If we have an absolute path, pass-through here
413
- if os.path.isabs(filename) and os.path.exists(filename):
414
- return filename
415
-
416
- # Otherwise, search relative to search_paths
417
- if search_paths is None:
418
- search_paths = [chip.cwd]
419
-
420
- searchdirs = ', '.join([str(p) for p in search_paths])
421
- chip.logger.debug(f"Searching for file {filename} in {searchdirs}")
422
-
423
- result = None
424
- for searchdir in search_paths:
425
- if not os.path.isabs(searchdir):
426
- searchdir = os.path.join(chip.cwd, searchdir)
427
-
428
- abspath = os.path.abspath(os.path.join(searchdir, filename))
429
- if os.path.exists(abspath):
430
- result = abspath
431
- break
432
-
433
- if result is None and not missing_ok:
434
- chip.error(f"File {filename} was not found")
435
-
436
- return result
437
-
438
-
439
353
  def get_plugins(system, name=None):
440
354
  '''
441
355
  Search for python modules with a specific function
@@ -470,32 +384,14 @@ def truncate_text(text, width):
470
384
  return text
471
385
 
472
386
 
473
- def get_hashed_filename(path, package=None, hash=hashlib.sha1):
387
+ def get_hashed_filename(path, package=None):
474
388
  '''
475
389
  Utility to map collected file to an unambiguous name based on its path.
476
390
 
477
391
  The mapping looks like:
478
- path/to/file.ext => file_<hash('path/to/file')>.ext
392
+ path/to/file.ext => file_<hash('path/to')>.ext
479
393
  '''
480
- path = PurePosixPath(path)
481
- ext = ''.join(path.suffixes)
482
-
483
- # strip off all file suffixes to get just the bare name
484
- barepath = path
485
- while barepath.suffix:
486
- barepath = PurePosixPath(barepath.stem)
487
- filename = str(barepath.parts[-1])
488
-
489
- if not package:
490
- package = ''
491
- else:
492
- package = f'{package}:'
493
-
494
- path_to_hash = f'{package}{str(path)}'
495
-
496
- pathhash = hash(path_to_hash.encode('utf-8')).hexdigest()
497
-
498
- return f'{filename}_{pathhash}{ext}'
394
+ return PathNodeValue.generate_hashed_path(path, package)
499
395
 
500
396
 
501
397
  def get_cores(chip, physical=False):