siliconcompiler 0.28.3__py3-none-any.whl → 0.28.5__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 (86) hide show
  1. siliconcompiler/_metadata.py +1 -1
  2. siliconcompiler/apps/_common.py +88 -56
  3. siliconcompiler/apps/sc.py +33 -14
  4. siliconcompiler/apps/sc_dashboard.py +17 -10
  5. siliconcompiler/apps/sc_show.py +17 -15
  6. siliconcompiler/core.py +95 -55
  7. siliconcompiler/flows/drcflow.py +13 -0
  8. siliconcompiler/flows/interposerflow.py +17 -0
  9. siliconcompiler/fpgas/vpr_example.py +8 -0
  10. siliconcompiler/libs/interposer.py +8 -0
  11. siliconcompiler/package.py +3 -2
  12. siliconcompiler/pdks/interposer.py +8 -0
  13. siliconcompiler/remote/schema.py +11 -1
  14. siliconcompiler/remote/server.py +7 -2
  15. siliconcompiler/report/dashboard/__init__.py +9 -0
  16. siliconcompiler/report/dashboard/components/__init__.py +13 -1
  17. siliconcompiler/report/dashboard/layouts/vertical_flowgraph.py +4 -3
  18. siliconcompiler/report/dashboard/layouts/vertical_flowgraph_node_tab.py +4 -1
  19. siliconcompiler/report/dashboard/layouts/vertical_flowgraph_sac_tabs.py +4 -1
  20. siliconcompiler/report/dashboard/state.py +3 -1
  21. siliconcompiler/report/summary_table.py +1 -2
  22. siliconcompiler/report/utils.py +1 -2
  23. siliconcompiler/scheduler/__init__.py +95 -0
  24. siliconcompiler/schema/schema_cfg.py +15 -3
  25. siliconcompiler/schema/schema_obj.py +51 -1
  26. siliconcompiler/sphinx_ext/dynamicgen.py +6 -0
  27. siliconcompiler/targets/interposer_demo.py +56 -0
  28. siliconcompiler/templates/tcl/manifest.tcl.j2 +2 -0
  29. siliconcompiler/tools/_common/__init__.py +44 -6
  30. siliconcompiler/tools/_common/asic.py +79 -23
  31. siliconcompiler/tools/genfasm/genfasm.py +7 -0
  32. siliconcompiler/tools/ghdl/convert.py +7 -0
  33. siliconcompiler/tools/klayout/convert_drc_db.py +60 -0
  34. siliconcompiler/tools/klayout/drc.py +156 -0
  35. siliconcompiler/tools/klayout/export.py +9 -4
  36. siliconcompiler/tools/klayout/klayout.py +0 -1
  37. siliconcompiler/tools/klayout/klayout_convert_drc_db.py +182 -0
  38. siliconcompiler/tools/klayout/klayout_export.py +3 -0
  39. siliconcompiler/tools/klayout/klayout_utils.py +8 -2
  40. siliconcompiler/tools/klayout/operations.py +2 -0
  41. siliconcompiler/tools/klayout/screenshot.py +2 -0
  42. siliconcompiler/tools/klayout/show.py +4 -4
  43. siliconcompiler/tools/magic/drc.py +21 -0
  44. siliconcompiler/tools/magic/extspice.py +21 -0
  45. siliconcompiler/tools/magic/magic.py +29 -0
  46. siliconcompiler/tools/magic/sc_drc.tcl +2 -12
  47. siliconcompiler/tools/magic/sc_extspice.tcl +3 -15
  48. siliconcompiler/tools/openroad/metrics.py +45 -0
  49. siliconcompiler/tools/openroad/openroad.py +47 -2
  50. siliconcompiler/tools/openroad/rdlroute.py +97 -0
  51. siliconcompiler/tools/openroad/scripts/sc_apr.tcl +16 -1
  52. siliconcompiler/tools/openroad/scripts/sc_floorplan.tcl +55 -9
  53. siliconcompiler/tools/openroad/scripts/sc_metrics.tcl +0 -159
  54. siliconcompiler/tools/openroad/scripts/sc_procs.tcl +3 -1
  55. siliconcompiler/tools/openroad/scripts/sc_rdlroute.tcl +184 -0
  56. siliconcompiler/tools/openroad/scripts/sc_report.tcl +170 -0
  57. siliconcompiler/tools/openroad/scripts/sc_route.tcl +8 -2
  58. siliconcompiler/tools/openroad/scripts/sc_screenshot.tcl +0 -5
  59. siliconcompiler/tools/openroad/scripts/sc_write_images.tcl +36 -6
  60. siliconcompiler/tools/opensta/scripts/sc_report_libraries.tcl +11 -1
  61. siliconcompiler/tools/surelog/__init__.py +12 -0
  62. siliconcompiler/tools/verilator/compile.py +27 -0
  63. siliconcompiler/tools/verilator/verilator.py +9 -0
  64. siliconcompiler/tools/vpr/vpr.py +18 -0
  65. siliconcompiler/tools/xyce/__init__.py +1 -1
  66. siliconcompiler/tools/yosys/{syn_asic_fpga_shared.tcl → procs.tcl} +23 -0
  67. siliconcompiler/tools/yosys/sc_screenshot.tcl +104 -0
  68. siliconcompiler/tools/yosys/sc_syn.tcl +7 -9
  69. siliconcompiler/tools/yosys/screenshot.py +153 -0
  70. siliconcompiler/tools/yosys/syn_asic.py +3 -0
  71. siliconcompiler/tools/yosys/syn_asic.tcl +1 -3
  72. siliconcompiler/tools/yosys/syn_fpga.tcl +3 -2
  73. siliconcompiler/toolscripts/_tools.json +5 -6
  74. siliconcompiler/toolscripts/rhel8/install-xyce.sh +4 -5
  75. siliconcompiler/toolscripts/rhel9/install-xyce.sh +4 -5
  76. siliconcompiler/toolscripts/ubuntu20/install-xyce.sh +5 -5
  77. siliconcompiler/toolscripts/ubuntu22/install-xyce.sh +2 -2
  78. siliconcompiler/toolscripts/ubuntu24/install-xyce.sh +2 -2
  79. siliconcompiler/utils/__init__.py +30 -1
  80. siliconcompiler/utils/showtools.py +4 -0
  81. {siliconcompiler-0.28.3.dist-info → siliconcompiler-0.28.5.dist-info}/METADATA +18 -5
  82. {siliconcompiler-0.28.3.dist-info → siliconcompiler-0.28.5.dist-info}/RECORD +86 -72
  83. {siliconcompiler-0.28.3.dist-info → siliconcompiler-0.28.5.dist-info}/WHEEL +1 -1
  84. {siliconcompiler-0.28.3.dist-info → siliconcompiler-0.28.5.dist-info}/LICENSE +0 -0
  85. {siliconcompiler-0.28.3.dist-info → siliconcompiler-0.28.5.dist-info}/entry_points.txt +0 -0
  86. {siliconcompiler-0.28.3.dist-info → siliconcompiler-0.28.5.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,182 @@
1
+ # KLayout script to export an OpenROAD marker DB from a DRC db
2
+ #
3
+ # Based on:
4
+ # https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/master/flow/util/convertDrc.py
5
+
6
+ import pya
7
+ import glob
8
+ import json
9
+ import os
10
+ import sys
11
+
12
+
13
+ def convert_drc(view, path):
14
+ rdb_id = view.create_rdb(os.path.basename(path))
15
+ rdb = view.rdb(rdb_id)
16
+ print(f"[INFO] reading {path}")
17
+ rdb.load(path)
18
+
19
+ source = os.path.abspath(path)
20
+
21
+ ordb = {
22
+ "source": source,
23
+ "description": "KLayout DRC conversion",
24
+ "category": {}
25
+ }
26
+
27
+ for category in rdb.each_category():
28
+ if category.num_items() == 0:
29
+ # ignore categories with no data
30
+ continue
31
+
32
+ ordb_category = {
33
+ "description": category.description,
34
+ "source": source,
35
+ "violations": []
36
+ }
37
+ ordb["category"][category.name()] = ordb_category
38
+
39
+ for item in rdb.each_item_per_category(category.rdb_id()):
40
+ violation = {
41
+ "visited": item.is_visited(),
42
+ "visible": True,
43
+ "waived": "waived" in item.tags_str
44
+ }
45
+
46
+ ordb_category["violations"].append(violation)
47
+
48
+ shapes = []
49
+ violation["shape"] = shapes
50
+
51
+ text = []
52
+
53
+ for value in item.each_value():
54
+ if value.is_box():
55
+ shapes.append({
56
+ "type": "box",
57
+ "points": [{
58
+ "x": value.box().left,
59
+ "y": value.box().bottom
60
+ }, {
61
+ "x": value.box().right,
62
+ "y": value.box().top
63
+ }]
64
+ })
65
+ elif value.is_edge():
66
+ shapes.append({
67
+ "type": "line",
68
+ "points": [{
69
+ "x": value.edge().p1.x,
70
+ "y": value.edge().p1.y
71
+ }, {
72
+ "x": value.edge().p2.x,
73
+ "y": value.edge().p2.y
74
+ }]
75
+ })
76
+ elif value.is_edge_pair():
77
+ edge1 = value.edge_pair().first
78
+ edge2 = value.edge_pair().second
79
+
80
+ shapes.append({
81
+ "type": "line",
82
+ "points": [{
83
+ "x": edge1.p1.x,
84
+ "y": edge1.p1.y
85
+ }, {
86
+ "x": edge1.p2.x,
87
+ "y": edge1.p2.y
88
+ }]
89
+ })
90
+ shapes.append({
91
+ "type": "line",
92
+ "points": [{
93
+ "x": edge2.p1.x,
94
+ "y": edge2.p1.y
95
+ }, {
96
+ "x": edge2.p2.x,
97
+ "y": edge2.p2.y
98
+ }]
99
+ })
100
+ elif value.is_polygon():
101
+ points = []
102
+ for edge in value.polygon().each_edge():
103
+ points.append({
104
+ "x": edge.p1.x,
105
+ "y": edge.p1.y
106
+ })
107
+ points.append({
108
+ "x": edge.p2.x,
109
+ "y": edge.p2.y
110
+ })
111
+ shapes.append({
112
+ "type": "polygon",
113
+ "points": points
114
+ })
115
+ elif value.is_path():
116
+ points = []
117
+ for edge in value.path().polygon().each_edge():
118
+ points.append({
119
+ "x": edge.p1.x,
120
+ "y": edge.p1.y
121
+ })
122
+ points.append({
123
+ "x": edge.p2.x,
124
+ "y": edge.p2.y
125
+ })
126
+ shapes.append({
127
+ "type": "polygon",
128
+ "points": points
129
+ })
130
+ elif value.is_text():
131
+ text.append(value.text())
132
+ elif value.is_string():
133
+ text.append(value.string())
134
+ else:
135
+ print("[WARN] Unknown violation shape:", value)
136
+
137
+ comment = ""
138
+ if hasattr(item, 'comment'):
139
+ comment = item.comment
140
+ if text:
141
+ if comment:
142
+ comment += ": "
143
+ comment += ", ".join(text)
144
+
145
+ if comment:
146
+ violation["comment"] = comment
147
+
148
+ return ordb
149
+
150
+
151
+ def main():
152
+ # SC_ROOT provided by CLI
153
+ sys.path.append(SC_ROOT) # noqa: F821
154
+
155
+ from tools.klayout.klayout_utils import get_schema
156
+
157
+ schema = get_schema(manifest='sc_manifest.json')
158
+
159
+ design = schema.get('design')
160
+
161
+ app = pya.Application.instance()
162
+ win = app.main_window()
163
+
164
+ # Create a dummy view to use for loading
165
+ cell_view = win.create_layout(0)
166
+ layout_view = cell_view.view()
167
+
168
+ ordb = {}
169
+ for file in glob.glob(f'inputs/{design}*.lyrdb') + glob.glob('inputs/{design}*.ascii'):
170
+ name = os.path.basename(file)
171
+
172
+ ordb[name] = convert_drc(layout_view, file)
173
+
174
+ with open(f"outputs/{design}.json", "w") as outfile:
175
+ json.dump(
176
+ ordb,
177
+ outfile,
178
+ indent=2)
179
+
180
+
181
+ if __name__ == '__main__':
182
+ main()
@@ -61,6 +61,9 @@ def gds_export(design_name, in_def, in_files, out_file, tech, allow_missing, con
61
61
  for cell in def_cells:
62
62
  print(f" [INFO] DEF cell: {cell}")
63
63
 
64
+ if f"{design_name}_DEF_FILL" in def_cells:
65
+ def_cells.remove(f"{design_name}_DEF_FILL")
66
+
64
67
  # Load in the gds to merge
65
68
  print("[INFO] Merging GDS/OAS files...")
66
69
  for fil in in_files:
@@ -31,8 +31,14 @@ def technology(design, schema):
31
31
  sc_stackup = schema.get('option', 'stackup')
32
32
  else:
33
33
  sc_stackup = schema.get('pdk', sc_pdk, 'stackup')[0]
34
- sc_mainlib = schema.get('asic', 'logiclib', step=sc_step, index=sc_index)[0]
35
- sc_libtype = schema.get('library', sc_mainlib, 'asic', 'libarch', step=sc_step, index=sc_index)
34
+
35
+ logiclibs = schema.get('asic', 'logiclib', step=sc_step, index=sc_index)
36
+ if not logiclibs:
37
+ sc_libtype = schema.get('option', 'var', 'klayout_libtype')[0]
38
+ else:
39
+ sc_mainlib = logiclibs[0]
40
+ sc_libtype = schema.get('library', sc_mainlib, 'asic', 'libarch',
41
+ step=sc_step, index=sc_index)
36
42
 
37
43
  sc_libs = []
38
44
  sc_libs += get_libraries(schema, 'logic')
@@ -109,6 +109,8 @@ def setup(chip):
109
109
  _, task = get_tool_task(chip, step, index)
110
110
  clobber = False
111
111
 
112
+ chip.set('tool', tool, 'task', task, 'threads', 1, step=step, index=index, clobber=clobber)
113
+
112
114
  script = 'klayout_operations.py'
113
115
  option = ['-z', '-nc', '-rx', '-r']
114
116
  chip.set('tool', tool, 'task', task, 'script', script, step=step, index=index, clobber=clobber)
@@ -24,6 +24,8 @@ def setup(chip):
24
24
  _, task = get_tool_task(chip, step, index)
25
25
  clobber = False
26
26
 
27
+ chip.set('tool', tool, 'task', task, 'threads', 1, step=step, index=index, clobber=clobber)
28
+
27
29
  setup_gui_screenshot(chip)
28
30
 
29
31
  option = ['-nc', '-z', '-rm']
@@ -73,12 +73,12 @@ def setup(chip):
73
73
 
74
74
  step = chip.get('arg', 'step')
75
75
  index = chip.get('arg', 'index')
76
- _, task = get_tool_task(chip, step, index)
76
+ tool, task = get_tool_task(chip, step, index)
77
+ clobber = False
77
78
 
78
- general_gui_setup(chip, task, False)
79
+ chip.set('tool', tool, 'task', task, 'threads', 1, step=step, index=index, clobber=clobber)
79
80
 
80
- tool = 'klayout'
81
- clobber = False
81
+ general_gui_setup(chip, task, False)
82
82
 
83
83
  option = ['-nc', '-rm']
84
84
  chip.set('tool', tool, 'task', task, 'option', option, step=step, index=index, clobber=clobber)
@@ -1,8 +1,10 @@
1
1
  import re
2
2
 
3
3
  from siliconcompiler.tools.magic.magic import setup as setup_tool
4
+ from siliconcompiler.tools.magic.magic import process_file
4
5
  from siliconcompiler import sc_open
5
6
  from siliconcompiler.tools._common import get_tool_task, record_metric
7
+ from siliconcompiler.tools._common.asic import get_mainlib, get_libraries
6
8
 
7
9
 
8
10
  def setup(chip):
@@ -22,6 +24,25 @@ def setup(chip):
22
24
  chip.set('tool', tool, 'task', task, 'output', f'{design}.drc.mag', step=step, index=index)
23
25
 
24
26
 
27
+ def pre_process(chip):
28
+ step = chip.get('arg', 'step')
29
+ index = chip.get('arg', 'index')
30
+ tool, task = get_tool_task(chip, step, index)
31
+
32
+ pdk = chip.get('option', 'pdk')
33
+ stackup = chip.get('option', 'stackup')
34
+ mainlib = get_mainlib(chip)
35
+ libtype = chip.get('library', mainlib, 'asic', 'libarch', step=step, index=index)
36
+ process_file('lef', chip, 'pdk', pdk, 'aprtech', 'magic', stackup, libtype, 'lef')
37
+
38
+ for lib in get_libraries(chip, 'logic'):
39
+ process_file('lef', chip, 'library', lib, 'output', stackup, 'lef')
40
+
41
+ for lib in get_libraries(chip, 'macro'):
42
+ if lib in chip.get('tool', tool, 'task', task, 'var', 'exclude', step=step, index=index):
43
+ process_file('lef', chip, 'library', lib, 'output', stackup, 'lef')
44
+
45
+
25
46
  ################################
26
47
  # Post_process (post executable)
27
48
  ################################
@@ -1,5 +1,7 @@
1
1
  from siliconcompiler.tools.magic.magic import setup as setup_tool
2
+ from siliconcompiler.tools.magic.magic import process_file
2
3
  from siliconcompiler.tools._common import get_tool_task
4
+ from siliconcompiler.tools._common.asic import get_mainlib, get_libraries
3
5
 
4
6
 
5
7
  def setup(chip):
@@ -17,3 +19,22 @@ def setup(chip):
17
19
  design = chip.top()
18
20
 
19
21
  chip.add('tool', tool, 'task', task, 'output', f'{design}.spice', step=step, index=index)
22
+
23
+
24
+ def pre_process(chip):
25
+ step = chip.get('arg', 'step')
26
+ index = chip.get('arg', 'index')
27
+ tool, task = get_tool_task(chip, step, index)
28
+
29
+ pdk = chip.get('option', 'pdk')
30
+ stackup = chip.get('option', 'stackup')
31
+ mainlib = get_mainlib(chip)
32
+ libtype = chip.get('library', mainlib, 'asic', 'libarch', step=step, index=index)
33
+ process_file('lef', chip, 'pdk', pdk, 'aprtech', 'magic', stackup, libtype, 'lef')
34
+
35
+ for lib in get_libraries(chip, 'logic'):
36
+ process_file('lef', chip, 'library', lib, 'output', stackup, 'lef')
37
+
38
+ for lib in get_libraries(chip, 'macro'):
39
+ if lib in chip.get('tool', tool, 'task', task, 'var', 'exclude', step=step, index=index):
40
+ process_file('lef', chip, 'library', lib, 'output', stackup, 'lef')
@@ -9,9 +9,12 @@ Installation: https://github.com/RTimothyEdwards/magic
9
9
  Sources: https://github.com/RTimothyEdwards/magic
10
10
  '''
11
11
 
12
+ import gzip
13
+ import shutil
12
14
  import os
13
15
  from siliconcompiler.tools._common import input_provides, get_tool_task
14
16
  from siliconcompiler.targets import freepdk45_demo
17
+ from siliconcompiler import utils
15
18
 
16
19
 
17
20
  ####################################################################
@@ -79,6 +82,32 @@ def parse_version(stdout):
79
82
  return stdout.strip('\n')
80
83
 
81
84
 
85
+ def process_file(file_type, chip, *key):
86
+ step = chip.get('arg', 'step')
87
+ index = chip.get('arg', 'index')
88
+ tool, task = get_tool_task(chip, step, index)
89
+
90
+ if chip.get(*key, field='pernode') == 'never':
91
+ files = chip.find_files(*key)
92
+ else:
93
+ files = chip.find_files(*key, step=step, index=index)
94
+
95
+ for file in files:
96
+ if file.lower().endswith('.gz'):
97
+ new_file_name = f'inputs/sc_{utils.get_hashed_filename(file[:-3])}'
98
+
99
+ with gzip.open(file, 'rt', encoding="utf-8") as fin:
100
+ with open(new_file_name, 'w') as fout:
101
+ fout.write(fin.read().encode("ascii", "ignore").decode("ascii"))
102
+ else:
103
+ new_file_name = f'inputs/sc_{utils.get_hashed_filename(file)}'
104
+ shutil.copy(file, new_file_name)
105
+
106
+ chip.add('tool', tool, 'task', task, 'file', f'read_{file_type}',
107
+ os.path.join(chip.getworkdir(step=step, index=index), new_file_name),
108
+ step=step, index=index)
109
+
110
+
82
111
  ##################################################
83
112
  if __name__ == "__main__":
84
113
 
@@ -23,18 +23,8 @@ set sc_design [sc_top]
23
23
  set sc_macrolibs [sc_get_asic_libraries macro]
24
24
  set sc_stackup [sc_cfg_get option stackup]
25
25
 
26
- if { [sc_cfg_tool_task_exists var exclude] } {
27
- set sc_exclude [sc_cfg_tool_task_get var exclude]
28
- } else {
29
- set sc_exclude [list]
30
- }
31
-
32
- # Ignore specific libraries by reading their LEFs (causes magic to abstract them)
33
- foreach lib $sc_macrolibs {
34
- puts $lib
35
- if { [lsearch -exact $sc_exclude $lib] >= 0 } {
36
- lef read [sc_cfg_get library $lib output $sc_stackup lef]
37
- }
26
+ foreach sc_lef [sc_cfg_tool_task_get file read_lef] {
27
+ lef read $sc_lef
38
28
  }
39
29
 
40
30
  gds noduplicates true
@@ -14,21 +14,9 @@ set sc_techlef [sc_cfg_get pdk $sc_pdk aprtech magic $sc_stackup $sc_libtype lef
14
14
  set sc_liblef [sc_cfg_get library $sc_mainlib output $sc_stackup lef]
15
15
  set sc_macrolibs [sc_get_asic_libraries macro]
16
16
 
17
- if { [sc_cfg_tool_task_exists var exclude] } {
18
- set sc_exclude [sc_cfg_tool_task_get var exclude]
19
- } else {
20
- set sc_exclude [list]
21
- }
22
-
23
- lef read $sc_techlef
24
- lef read $sc_liblef
25
-
26
- # Ignore specific libraries by reading their LEFs (causes magic to abstract them)
27
- foreach lib $sc_macrolibs {
28
- puts $lib
29
- if { [lsearch -exact $sc_exclude $lib] >= 0 } {
30
- lef read [sc_cfg_get library $lib output $sc_stackup lef]
31
- }
17
+ foreach sc_lef [sc_cfg_tool_task_get file read_lef] {
18
+ puts "Reading LEF $sc_lef"
19
+ lef read $sc_lef
32
20
  }
33
21
 
34
22
  if { [file exists "inputs/$sc_design.gds"] } {
@@ -0,0 +1,45 @@
1
+
2
+ from siliconcompiler.tools.openroad.openroad import setup as setup_tool
3
+ from siliconcompiler.tools.openroad.openroad import build_pex_corners
4
+ from siliconcompiler.tools.openroad.openroad import post_process as or_post_process
5
+ from siliconcompiler.tools.openroad.openroad import pre_process as or_pre_process
6
+ from siliconcompiler.tools.openroad.openroad import _set_reports, set_pnr_inputs, set_pnr_outputs
7
+
8
+
9
+ def setup(chip):
10
+ '''
11
+ Extract metrics
12
+ '''
13
+
14
+ # Generic tool setup.
15
+ setup_tool(chip)
16
+
17
+ set_pnr_inputs(chip)
18
+ set_pnr_outputs(chip)
19
+
20
+ _set_reports(chip, [
21
+ 'setup',
22
+ 'hold',
23
+ 'unconstrained',
24
+ 'clock_skew',
25
+ 'power',
26
+ 'drv_violations',
27
+ 'fmax',
28
+
29
+ # Images
30
+ 'placement_density',
31
+ 'routing_congestion',
32
+ 'power_density',
33
+ 'clock_placement',
34
+ 'clock_trees',
35
+ 'optimization_placement'
36
+ ])
37
+
38
+
39
+ def pre_process(chip):
40
+ or_pre_process(chip)
41
+ build_pex_corners(chip)
42
+
43
+
44
+ def post_process(chip):
45
+ or_post_process(chip)
@@ -38,7 +38,7 @@ def setup_tool(chip, exit=True, clobber=True):
38
38
 
39
39
  chip.set('tool', tool, 'exe', tool)
40
40
  chip.set('tool', tool, 'vswitch', '-version')
41
- chip.set('tool', tool, 'version', '>=v2.0-13145', clobber=clobber)
41
+ chip.set('tool', tool, 'version', '>=v2.0-16580', clobber=clobber)
42
42
  chip.set('tool', tool, 'format', 'tcl', clobber=clobber)
43
43
 
44
44
  # exit automatically in batch mode and not breakpoint
@@ -274,7 +274,10 @@ def post_process(chip):
274
274
  "floating_nets.rpt",
275
275
  f"{chip.design}_antenna.rpt",
276
276
  f"{chip.design}_antenna_post_repair.rpt"],
277
- "drcs": [f"{chip.design}_drc.rpt"]
277
+ "drcs": [f"{chip.design}_drc.rpt",
278
+ f"markers/{chip.design}.drc.rpt",
279
+ f"markers/{chip.design}.drc.json",
280
+ f"images/markers/{chip.design}.drc.png"]
278
281
  }
279
282
  metric_reports["leakagepower"] = metric_reports["peakpower"]
280
283
 
@@ -323,6 +326,9 @@ def post_process(chip):
323
326
  ('vias', 'sc__step__route__vias', True, None),
324
327
  ('wirelength', 'sc__step__route__wirelength', True, 'distance'),
325
328
  ('cellarea', 'sc__metric__design__instance__area', True, 'area'),
329
+ ('stdcellarea', 'sc__metric__design__instance__area__stdcell', True, 'area'),
330
+ ('macroarea', 'sc__metric__design__instance__area__macros', True, 'area'),
331
+ ('padcellarea', 'sc__metric__design__instance__area__padcells', True, 'area'),
326
332
  ('totalarea', 'sc__metric__design__core__area', True, 'area'),
327
333
  ('utilization', 'sc__metric__design__instance__utilization', True, 100.0),
328
334
  ('setuptns', 'sc__metric__timing__setup__tns', has_timing, 'time'),
@@ -673,6 +679,10 @@ def _define_dpl_params(chip):
673
679
  default_value='false',
674
680
  schelp='true/false, disallow single site gaps in detail placement')
675
681
 
682
+ set_tool_task_var(chip, param_key='dpl_use_decap_fillers',
683
+ default_value='true',
684
+ schelp='true/false, use decap fillers along with non-decap fillers')
685
+
676
686
 
677
687
  def _define_cts_params(chip):
678
688
  step = chip.get('arg', 'step')
@@ -852,6 +862,41 @@ def _define_mpl_params(chip):
852
862
  schelp='minimum number of macros to use while clustering for macro placement')
853
863
  set_tool_task_var(chip, param_key='rtlmp_max_macros',
854
864
  schelp='maximum number of macros to use while clustering for macro placement')
865
+ set_tool_task_var(chip, param_key='rtlmp_max_levels',
866
+ schelp='maximum depth of physical hierarchical tree')
867
+ set_tool_task_var(chip, param_key='rtlmp_min_aspect_ratio',
868
+ schelp='Specifies the minimum aspect ratio of its width to height of a '
869
+ 'standard cell cluster')
870
+ set_tool_task_var(chip, param_key='rtlmp_fence',
871
+ schelp='Defines the global fence bounding box coordinates '
872
+ '(llx, lly, urx, ury)')
873
+ set_tool_task_var(chip, param_key='rtlmp_bus_planning',
874
+ schelp='Flag to enable bus planning')
875
+ set_tool_task_var(chip, param_key='rtlmp_target_dead_space',
876
+ schelp='Specifies the target dead space percentage, which influences '
877
+ 'the utilization of standard cell clusters')
878
+
879
+ set_tool_task_var(chip, param_key='rtlmp_area_weight',
880
+ schelp='Weight for the area of current floorplan')
881
+ set_tool_task_var(chip, param_key='rtlmp_outline_weight',
882
+ schelp='Weight for violating the fixed outline constraint, meaning that all '
883
+ 'clusters should be placed within the shape of their parent cluster')
884
+ set_tool_task_var(chip, param_key='rtlmp_wirelength_weight',
885
+ schelp='Weight for half-perimeter wirelength')
886
+ set_tool_task_var(chip, param_key='rtlmp_guidance_weight',
887
+ schelp='Weight for guidance cost or clusters being placed near specified '
888
+ 'regions if users provide such constraints')
889
+ set_tool_task_var(chip, param_key='rtlmp_fence_weight',
890
+ schelp='Weight for fence cost, or how far the macro is from zero '
891
+ 'fence violation')
892
+ set_tool_task_var(chip, param_key='rtlmp_blockage_weight',
893
+ schelp='Weight for the boundary, or how far the hard macro clusters are '
894
+ 'from boundaries')
895
+ set_tool_task_var(chip, param_key='rtlmp_notch_weight',
896
+ schelp='Weight for the notch, or the existence of dead space that cannot be '
897
+ 'used for placement & routing')
898
+ set_tool_task_var(chip, param_key='rtlmp_macro_blockage_weight',
899
+ schelp='Weight for macro blockage, or the overlapping instances of the macro')
855
900
 
856
901
 
857
902
  def _define_ord_params(chip):
@@ -0,0 +1,97 @@
1
+ import os
2
+
3
+ from siliconcompiler.tools._common import input_provides, get_tool_task
4
+ from siliconcompiler.tools._common.asic import set_tool_task_var
5
+ from siliconcompiler.tools.openroad.openroad import build_pex_corners
6
+ from siliconcompiler.tools.openroad.openroad import post_process as or_post_process
7
+
8
+
9
+ def setup(chip):
10
+ '''
11
+ Perform floorplanning, pin placements, macro placements and power grid generation
12
+ '''
13
+
14
+ # Generic tool setup.
15
+ # default tool settings, note, not additive!
16
+
17
+ tool = 'openroad'
18
+ script = 'sc_rdlroute.tcl'
19
+ refdir = os.path.join('tools', tool, 'scripts')
20
+
21
+ step = chip.get('arg', 'step')
22
+ index = chip.get('arg', 'index')
23
+ tool, task = get_tool_task(chip, step, index)
24
+
25
+ design = chip.top()
26
+
27
+ chip.set('tool', tool, 'exe', tool)
28
+ chip.set('tool', tool, 'vswitch', '-version')
29
+ chip.set('tool', tool, 'version', '>=v2.0-16839')
30
+ chip.set('tool', tool, 'format', 'tcl')
31
+
32
+ # exit automatically in batch mode and not breakpoint
33
+ option = ''
34
+ if exit and not chip.get('option', 'breakpoint', step=step, index=index):
35
+ option += " -exit"
36
+
37
+ option += " -metrics reports/metrics.json"
38
+ chip.set('tool', tool, 'task', task, 'option', option, step=step, index=index)
39
+
40
+ # Input/Output requirements for default asicflow steps
41
+
42
+ chip.set('tool', tool, 'task', task, 'refdir', refdir,
43
+ step=step, index=index,
44
+ package='siliconcompiler')
45
+ chip.set('tool', tool, 'task', task, 'script', script,
46
+ step=step, index=index)
47
+ chip.set('tool', tool, 'task', task, 'threads', os.cpu_count(),
48
+ step=step, index=index, clobber=False)
49
+
50
+ if chip.get('option', 'nodisplay'):
51
+ # Tells QT to use the offscreen platform if nodisplay is used
52
+ chip.set('tool', tool, 'task', task, 'env', 'QT_QPA_PLATFORM', 'offscreen',
53
+ step=step, index=index)
54
+
55
+ # basic warning and error grep check on logfile
56
+ chip.set('tool', tool, 'task', task, 'regex', 'warnings', r'^\[WARNING|^Warning',
57
+ step=step, index=index, clobber=False)
58
+ chip.set('tool', tool, 'task', task, 'regex', 'errors', r'^\[ERROR',
59
+ step=step, index=index, clobber=False)
60
+
61
+ chip.add('tool', tool, 'task', task, 'require',
62
+ 'option,var,openroad_libtype',
63
+ step=step, index=index)
64
+ chip.add('tool', tool, 'task', task, 'require',
65
+ ','.join(['tool', tool, 'task', task, 'file', 'rdlroute']),
66
+ step=step, index=index)
67
+ chip.set('tool', tool, 'task', task, 'file', 'rdlroute',
68
+ 'script to perform rdl route',
69
+ field='help')
70
+
71
+ set_tool_task_var(chip, param_key='fin_add_fill',
72
+ default_value='false',
73
+ schelp='true/false, when true enables adding fill, '
74
+ 'if enabled by the PDK, to the design',
75
+ skip='lib')
76
+
77
+ if f'{design}.v' in input_provides(chip, step, index):
78
+ chip.add('tool', tool, 'task', task, 'input', design + '.v', step=step, index=index)
79
+ elif f'{design}.vg' in input_provides(chip, step, index):
80
+ chip.add('tool', tool, 'task', task, 'input', design + '.vg', step=step, index=index)
81
+ else:
82
+ chip.add('tool', tool, 'task', task, 'require',
83
+ ','.join(['input', 'netlist', 'verilog']),
84
+ step=step, index=index)
85
+
86
+ chip.add('tool', tool, 'task', task, 'output', design + '.sdc', step=step, index=index)
87
+ chip.add('tool', tool, 'task', task, 'output', design + '.vg', step=step, index=index)
88
+ chip.add('tool', tool, 'task', task, 'output', design + '.def', step=step, index=index)
89
+ chip.add('tool', tool, 'task', task, 'output', design + '.odb', step=step, index=index)
90
+
91
+
92
+ def pre_process(chip):
93
+ build_pex_corners(chip)
94
+
95
+
96
+ def post_process(chip):
97
+ or_post_process(chip)