siliconcompiler 0.29.4__py3-none-any.whl → 0.31.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 (84) hide show
  1. siliconcompiler/_metadata.py +1 -1
  2. siliconcompiler/apps/sc.py +1 -1
  3. siliconcompiler/apps/sc_install.py +35 -3
  4. siliconcompiler/apps/sc_remote.py +1 -3
  5. siliconcompiler/core.py +38 -12
  6. siliconcompiler/flowgraph.py +11 -23
  7. siliconcompiler/package.py +1 -1
  8. siliconcompiler/remote/schema.py +9 -8
  9. siliconcompiler/report/report.py +4 -3
  10. siliconcompiler/scheduler/__init__.py +109 -104
  11. siliconcompiler/scheduler/docker_runner.py +1 -1
  12. siliconcompiler/scheduler/send_messages.py +1 -1
  13. siliconcompiler/schema/schema_cfg.py +478 -411
  14. siliconcompiler/schema/schema_obj.py +32 -18
  15. siliconcompiler/schema/utils.py +19 -0
  16. siliconcompiler/sphinx_ext/schemagen.py +3 -1
  17. siliconcompiler/templates/replay/replay.sh.j2 +92 -0
  18. siliconcompiler/tools/__init__.py +3 -1
  19. siliconcompiler/tools/_common/__init__.py +8 -2
  20. siliconcompiler/tools/_common/asic.py +1 -1
  21. siliconcompiler/tools/bluespec/__init__.py +35 -0
  22. siliconcompiler/tools/bluespec/convert.py +44 -5
  23. siliconcompiler/tools/graphviz/__init__.py +12 -0
  24. siliconcompiler/tools/graphviz/screenshot.py +48 -0
  25. siliconcompiler/tools/graphviz/show.py +20 -0
  26. siliconcompiler/tools/klayout/export.py +5 -0
  27. siliconcompiler/tools/klayout/klayout.py +18 -1
  28. siliconcompiler/tools/klayout/klayout_export.py +4 -1
  29. siliconcompiler/tools/klayout/klayout_operations.py +5 -2
  30. siliconcompiler/tools/klayout/klayout_utils.py +23 -0
  31. siliconcompiler/tools/klayout/operations.py +5 -0
  32. siliconcompiler/tools/magic/magic.py +1 -1
  33. siliconcompiler/tools/openroad/_apr.py +20 -3
  34. siliconcompiler/tools/openroad/antenna_repair.py +2 -1
  35. siliconcompiler/tools/openroad/clock_tree_synthesis.py +2 -1
  36. siliconcompiler/tools/openroad/detailed_placement.py +2 -1
  37. siliconcompiler/tools/openroad/detailed_route.py +8 -0
  38. siliconcompiler/tools/openroad/fillercell_insertion.py +2 -1
  39. siliconcompiler/tools/openroad/global_placement.py +2 -1
  40. siliconcompiler/tools/openroad/macro_placement.py +9 -0
  41. siliconcompiler/tools/openroad/pin_placement.py +2 -1
  42. siliconcompiler/tools/openroad/power_grid.py +6 -0
  43. siliconcompiler/tools/openroad/repair_design.py +2 -1
  44. siliconcompiler/tools/openroad/repair_timing.py +2 -1
  45. siliconcompiler/tools/openroad/scripts/apr/preamble.tcl +6 -0
  46. siliconcompiler/tools/openroad/scripts/apr/sc_clock_tree_synthesis.tcl +3 -0
  47. siliconcompiler/tools/openroad/scripts/apr/sc_detailed_route.tcl +10 -0
  48. siliconcompiler/tools/openroad/scripts/apr/sc_global_placement.tcl +1 -0
  49. siliconcompiler/tools/openroad/scripts/apr/sc_global_route.tcl +17 -5
  50. siliconcompiler/tools/openroad/scripts/apr/sc_macro_placement.tcl +14 -1
  51. siliconcompiler/tools/openroad/scripts/apr/sc_power_grid.tcl +54 -0
  52. siliconcompiler/tools/openroad/scripts/apr/sc_repair_design.tcl +1 -0
  53. siliconcompiler/tools/openroad/scripts/apr/sc_repair_timing.tcl +3 -0
  54. siliconcompiler/tools/openroad/scripts/common/procs.tcl +55 -17
  55. siliconcompiler/tools/openroad/scripts/common/reports.tcl +25 -3
  56. siliconcompiler/tools/openroad/scripts/common/write_images.tcl +28 -0
  57. siliconcompiler/tools/yosys/__init__.py +7 -0
  58. siliconcompiler/tools/yosys/sc_syn.tcl +33 -24
  59. siliconcompiler/tools/yosys/syn_asic.py +27 -0
  60. siliconcompiler/tools/yosys/syn_asic.tcl +27 -0
  61. siliconcompiler/toolscripts/_tools.json +16 -4
  62. siliconcompiler/toolscripts/rhel8/install-yosys-moosic.sh +17 -0
  63. siliconcompiler/toolscripts/rhel8/install-yosys-slang.sh +22 -0
  64. siliconcompiler/toolscripts/rhel9/install-openroad.sh +1 -1
  65. siliconcompiler/toolscripts/rhel9/install-yosys-moosic.sh +17 -0
  66. siliconcompiler/toolscripts/rhel9/install-yosys-slang.sh +22 -0
  67. siliconcompiler/toolscripts/ubuntu20/install-openroad.sh +1 -1
  68. siliconcompiler/toolscripts/ubuntu20/install-yosys-moosic.sh +17 -0
  69. siliconcompiler/toolscripts/ubuntu20/install-yosys-slang.sh +22 -0
  70. siliconcompiler/toolscripts/ubuntu22/install-openroad.sh +1 -1
  71. siliconcompiler/toolscripts/ubuntu22/install-yosys-moosic.sh +17 -0
  72. siliconcompiler/toolscripts/ubuntu22/install-yosys-slang.sh +22 -0
  73. siliconcompiler/toolscripts/ubuntu24/install-openroad.sh +1 -1
  74. siliconcompiler/toolscripts/ubuntu24/install-yosys-moosic.sh +17 -0
  75. siliconcompiler/toolscripts/ubuntu24/install-yosys-slang.sh +22 -0
  76. siliconcompiler/utils/__init__.py +44 -5
  77. siliconcompiler/utils/showtools.py +7 -0
  78. {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/METADATA +8 -8
  79. {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/RECORD +83 -70
  80. {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/WHEEL +1 -1
  81. siliconcompiler/tools/bluespec/bluespec.py +0 -40
  82. {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/LICENSE +0 -0
  83. {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/entry_points.txt +0 -0
  84. {siliconcompiler-0.29.4.dist-info → siliconcompiler-0.31.0.dist-info}/top_level.txt +0 -0
@@ -6,23 +6,22 @@ import json
6
6
  # (such as KLayout) directly importing the schema package. However, the fallback
7
7
  # allows running this script directly to generate defaults.json.
8
8
  try:
9
- from .utils import trim
9
+ from .utils import trim, Scope, PerNode
10
10
  except ImportError:
11
- from siliconcompiler.schema.utils import trim
11
+ from siliconcompiler.schema.utils import trim, Scope, PerNode
12
+
13
+ SCHEMA_VERSION = '0.50.0'
12
14
 
13
- SCHEMA_VERSION = '0.48.6'
14
15
 
15
16
  #############################################################################
16
17
  # PARAM DEFINITION
17
18
  #############################################################################
18
-
19
-
20
19
  def scparam(cfg,
21
20
  keypath,
22
21
  sctype=None,
23
22
  require=False,
24
23
  defvalue=None,
25
- scope='job',
24
+ scope=Scope.JOB,
26
25
  copy=False,
27
26
  lock=False,
28
27
  hashalgo='sha256',
@@ -34,7 +33,7 @@ def scparam(cfg,
34
33
  example=None,
35
34
  schelp=None,
36
35
  enum=None,
37
- pernode='never'):
36
+ pernode=PerNode.NEVER):
38
37
 
39
38
  # 1. descend keypath until done
40
39
  # 2. create key if missing
@@ -79,19 +78,19 @@ def scparam(cfg,
79
78
  defvalue = []
80
79
 
81
80
  # mandatory for all
82
- cfg['type'] = sctype
83
- cfg['scope'] = scope
84
- cfg['require'] = require
85
- cfg['lock'] = lock
81
+ cfg['type'] = str(sctype)
82
+ cfg['scope'] = Scope(scope).value
83
+ cfg['require'] = bool(require)
84
+ cfg['lock'] = bool(lock)
86
85
  if switch and not isinstance(switch, list):
87
86
  switch = [switch]
88
- cfg['switch'] = switch
89
- cfg['shorthelp'] = shorthelp
90
- cfg['example'] = example
91
- cfg['help'] = schelp
92
- cfg['notes'] = notes
87
+ cfg['switch'] = [str(s) for s in switch] if switch else None
88
+ cfg['shorthelp'] = str(shorthelp) if shorthelp else None
89
+ cfg['example'] = [str(e) for e in example] if example else None
90
+ cfg['help'] = str(schelp) if schelp else None
91
+ cfg['notes'] = str(notes) if notes else None
93
92
  # never, optional, required
94
- cfg['pernode'] = pernode
93
+ cfg['pernode'] = PerNode(pernode).value
95
94
  cfg['node'] = {}
96
95
  cfg['node']['default'] = {}
97
96
  cfg['node']['default']['default'] = {}
@@ -99,26 +98,22 @@ def scparam(cfg,
99
98
  cfg['node']['default']['default']['signature'] = signature
100
99
 
101
100
  if enum is not None:
102
- cfg['enum'] = enum
101
+ cfg['enum'] = [str(e) for e in enum]
103
102
 
104
103
  # unit for floats/ints
105
104
  if unit is not None:
106
- cfg['unit'] = unit
105
+ cfg['unit'] = str(unit)
106
+
107
+ if 'dir' in sctype or 'file' in sctype:
108
+ cfg['hashalgo'] = str(hashalgo)
109
+ cfg['copy'] = bool(copy)
110
+ cfg['node']['default']['default']['filehash'] = []
111
+ cfg['node']['default']['default']['package'] = []
107
112
 
108
113
  # file only values
109
114
  if 'file' in sctype:
110
- cfg['hashalgo'] = hashalgo
111
- cfg['copy'] = copy
112
115
  cfg['node']['default']['default']['date'] = []
113
116
  cfg['node']['default']['default']['author'] = []
114
- cfg['node']['default']['default']['filehash'] = []
115
- cfg['node']['default']['default']['package'] = []
116
-
117
- if 'dir' in sctype:
118
- cfg['hashalgo'] = hashalgo
119
- cfg['copy'] = copy
120
- cfg['node']['default']['default']['filehash'] = []
121
- cfg['node']['default']['default']['package'] = []
122
117
 
123
118
 
124
119
  #############################################################################
@@ -142,7 +137,7 @@ def schema_cfg():
142
137
 
143
138
  scparam(cfg, ['schemaversion'],
144
139
  sctype='str',
145
- scope='global',
140
+ scope=Scope.GLOBAL,
146
141
  defvalue=SCHEMA_VERSION,
147
142
  require=True,
148
143
  shorthelp="Schema version number",
@@ -154,7 +149,7 @@ def schema_cfg():
154
149
  # Design topmodule/entrypoint
155
150
  scparam(cfg, ['design'],
156
151
  sctype='str',
157
- scope='global',
152
+ scope=Scope.GLOBAL,
158
153
  require=True,
159
154
  shorthelp="Design top module name",
160
155
  switch="-design <str>",
@@ -173,7 +168,7 @@ def schema_cfg():
173
168
  for item, val in io.items():
174
169
  scparam(cfg, [item, fileset, filetype],
175
170
  sctype='[file]',
176
- pernode='optional',
171
+ pernode=PerNode.OPTIONAL,
177
172
  copy=val[1],
178
173
  shorthelp=f"{val[0]} files",
179
174
  switch=f"-{item} 'fileset filetype <file>'",
@@ -228,13 +223,13 @@ def schema_schematic(cfg, name='default'):
228
223
  ''' Schematic
229
224
  '''
230
225
 
231
- scparam(cfg, ['schematic', 'component', name, 'model'],
226
+ scparam(cfg, ['schematic', 'component', name, 'partname'],
232
227
  sctype='str',
233
228
  shorthelp="Schematic: component model",
234
- switch="-schematic_component_model 'name <str>'",
235
- example=["cli: -schematic_component_model 'B0 NAND2X1'",
236
- "api: chip.set('schematic', 'component', 'B0, 'model', 'NAND2X1')"],
237
- schelp="""Model of a component, specified on a per instance basis.""")
229
+ switch="-schematic_component_partname 'name <str>'",
230
+ example=["cli: -schematic_component_partname 'B0 NAND2X1'",
231
+ "api: chip.set('schematic', 'component', 'B0, 'partname', 'NAND2X1')"],
232
+ schelp="""Component part-name ("aka cell-name") specified on a per instance basis.""")
238
233
 
239
234
  scparam(cfg, ['schematic', 'pin', name, 'dir'],
240
235
  sctype='enum',
@@ -326,7 +321,7 @@ def schema_fpga(cfg):
326
321
 
327
322
  scparam(cfg, ['fpga', partname, 'file', key],
328
323
  sctype='[file]',
329
- scope='global',
324
+ scope=Scope.GLOBAL,
330
325
  shorthelp="FPGA: file",
331
326
  switch="-fpga_file 'partname key <file>'",
332
327
  example=["cli: -fpga_file 'fpga64k file archfile my_arch.xml'",
@@ -359,7 +354,7 @@ def schema_pdk(cfg, stackup='default'):
359
354
 
360
355
  scparam(cfg, ['pdk', pdkname, 'foundry'],
361
356
  sctype='str',
362
- scope='global',
357
+ scope=Scope.GLOBAL,
363
358
  shorthelp="PDK: foundry name",
364
359
  switch="-pdk_foundry 'pdkname <str>'",
365
360
  example=["cli: -pdk_foundry 'asap7 virtual'",
@@ -371,7 +366,7 @@ def schema_pdk(cfg, stackup='default'):
371
366
 
372
367
  scparam(cfg, ['pdk', pdkname, 'node'],
373
368
  sctype='float',
374
- scope='global',
369
+ scope=Scope.GLOBAL,
375
370
  unit='nm',
376
371
  shorthelp="PDK: process node",
377
372
  switch="-pdk_node 'pdkname <float>'",
@@ -386,7 +381,7 @@ def schema_pdk(cfg, stackup='default'):
386
381
 
387
382
  scparam(cfg, ['pdk', pdkname, 'version'],
388
383
  sctype='str',
389
- scope='global',
384
+ scope=Scope.GLOBAL,
390
385
  shorthelp="PDK: version",
391
386
  switch="-pdk_version 'pdkname <str>'",
392
387
  example=["cli: -pdk_version 'asap7 1.0'",
@@ -399,7 +394,7 @@ def schema_pdk(cfg, stackup='default'):
399
394
 
400
395
  scparam(cfg, ['pdk', pdkname, 'stackup'],
401
396
  sctype='[str]',
402
- scope='global',
397
+ scope=Scope.GLOBAL,
403
398
  shorthelp="PDK: metal stackups",
404
399
  switch="-pdk_stackup 'pdkname <str>'",
405
400
  example=["cli: -pdk_stackup 'asap7 2MA4MB2MC'",
@@ -419,7 +414,7 @@ def schema_pdk(cfg, stackup='default'):
419
414
 
420
415
  scparam(cfg, ['pdk', pdkname, 'minlayer', stackup],
421
416
  sctype='str',
422
- scope='global',
417
+ scope=Scope.GLOBAL,
423
418
  shorthelp="PDK: minimum routing layer",
424
419
  switch="-pdk_minlayer 'pdk stackup <str>'",
425
420
  example=[
@@ -431,7 +426,7 @@ def schema_pdk(cfg, stackup='default'):
431
426
 
432
427
  scparam(cfg, ['pdk', pdkname, 'maxlayer', stackup],
433
428
  sctype='str',
434
- scope='global',
429
+ scope=Scope.GLOBAL,
435
430
  shorthelp="PDK: maximum routing layer",
436
431
  switch="-pdk_maxlayer 'pdk stackup <str>'",
437
432
  example=[
@@ -443,7 +438,7 @@ def schema_pdk(cfg, stackup='default'):
443
438
 
444
439
  scparam(cfg, ['pdk', pdkname, 'wafersize'],
445
440
  sctype='float',
446
- scope='global',
441
+ scope=Scope.GLOBAL,
447
442
  unit='mm',
448
443
  shorthelp="PDK: wafer size",
449
444
  switch="-pdk_wafersize 'pdkname <float>'",
@@ -458,7 +453,7 @@ def schema_pdk(cfg, stackup='default'):
458
453
 
459
454
  scparam(cfg, ['pdk', pdkname, 'panelsize'],
460
455
  sctype='[(float,float)]',
461
- scope='global',
456
+ scope=Scope.GLOBAL,
462
457
  unit='mm',
463
458
  shorthelp="PDK: panel size",
464
459
  switch="-pdk_panelsize 'pdkname <(float,float)>'",
@@ -471,7 +466,7 @@ def schema_pdk(cfg, stackup='default'):
471
466
 
472
467
  scparam(cfg, ['pdk', pdkname, 'unitcost'],
473
468
  sctype='float',
474
- scope='global',
469
+ scope=Scope.GLOBAL,
475
470
  unit='USD',
476
471
  shorthelp="PDK: unit cost",
477
472
  switch="-pdk_unitcost 'pdkname <float>'",
@@ -483,7 +478,7 @@ def schema_pdk(cfg, stackup='default'):
483
478
 
484
479
  scparam(cfg, ['pdk', pdkname, 'd0'],
485
480
  sctype='float',
486
- scope='global',
481
+ scope=Scope.GLOBAL,
487
482
  shorthelp="PDK: process defect density",
488
483
  switch="-pdk_d0 'pdkname <float>'",
489
484
  example=["cli: -pdk_d0 'asap7 0.1'",
@@ -498,7 +493,7 @@ def schema_pdk(cfg, stackup='default'):
498
493
 
499
494
  scparam(cfg, ['pdk', pdkname, 'scribe'],
500
495
  sctype='(float,float)',
501
- scope='global',
496
+ scope=Scope.GLOBAL,
502
497
  unit='mm',
503
498
  shorthelp="PDK: horizontal scribe line width",
504
499
  switch="-pdk_scribe 'pdkname <(float,float)>'",
@@ -513,7 +508,7 @@ def schema_pdk(cfg, stackup='default'):
513
508
 
514
509
  scparam(cfg, ['pdk', pdkname, 'edgemargin'],
515
510
  sctype='float',
516
- scope='global',
511
+ scope=Scope.GLOBAL,
517
512
  unit='mm',
518
513
  shorthelp="PDK: wafer edge keep-out margin",
519
514
  switch="-pdk_edgemargin 'pdkname <float>'",
@@ -529,7 +524,7 @@ def schema_pdk(cfg, stackup='default'):
529
524
  simtype = 'default'
530
525
  scparam(cfg, ['pdk', pdkname, 'devmodel', tool, simtype, stackup],
531
526
  sctype='[file]',
532
- scope='global',
527
+ scope=Scope.GLOBAL,
533
528
  shorthelp="PDK: device models",
534
529
  switch="-pdk_devmodel 'pdkname tool simtype stackup <file>'",
535
530
  example=[
@@ -549,7 +544,7 @@ def schema_pdk(cfg, stackup='default'):
549
544
  corner = 'default'
550
545
  scparam(cfg, ['pdk', pdkname, 'pexmodel', tool, stackup, corner],
551
546
  sctype='[file]',
552
- scope='global',
547
+ scope=Scope.GLOBAL,
553
548
  shorthelp="PDK: parasitic TCAD models",
554
549
  switch="-pdk_pexmodel 'pdkname tool stackup corner <file>'",
555
550
  example=[
@@ -568,7 +563,7 @@ def schema_pdk(cfg, stackup='default'):
568
563
  dst = 'default'
569
564
  scparam(cfg, ['pdk', pdkname, 'layermap', tool, src, dst, stackup],
570
565
  sctype='[file]',
571
- scope='global',
566
+ scope=Scope.GLOBAL,
572
567
  shorthelp="PDK: layer map file",
573
568
  switch="-pdk_layermap 'pdkname tool src dst stackup <file>'",
574
569
  example=[
@@ -589,7 +584,7 @@ def schema_pdk(cfg, stackup='default'):
589
584
 
590
585
  scparam(cfg, ['pdk', pdkname, 'display', tool, stackup],
591
586
  sctype='[file]',
592
- scope='global',
587
+ scope=Scope.GLOBAL,
593
588
  shorthelp="PDK: display file",
594
589
  switch="-pdk_display 'pdkname tool stackup <file>'",
595
590
  example=[
@@ -604,7 +599,7 @@ def schema_pdk(cfg, stackup='default'):
604
599
  libarch = 'default'
605
600
  scparam(cfg, ['pdk', pdkname, 'aprtech', tool, stackup, libarch, filetype],
606
601
  sctype='[file]',
607
- scope='global',
602
+ scope=Scope.GLOBAL,
608
603
  shorthelp="PDK: APR technology files",
609
604
  switch="-pdk_aprtech 'pdkname tool stackup libarch filetype <file>'",
610
605
  example=[
@@ -628,7 +623,7 @@ def schema_pdk(cfg, stackup='default'):
628
623
  for item in checks:
629
624
  scparam(cfg, ['pdk', pdkname, item, 'runset', tool, stackup, name],
630
625
  sctype='[file]',
631
- scope='global',
626
+ scope=Scope.GLOBAL,
632
627
  shorthelp=f"PDK: {item.upper()} runset files",
633
628
  switch=f"-pdk_{item}_runset 'pdkname tool stackup name <file>'",
634
629
  example=[
@@ -639,7 +634,7 @@ def schema_pdk(cfg, stackup='default'):
639
634
 
640
635
  scparam(cfg, ['pdk', pdkname, item, 'waiver', tool, stackup, name],
641
636
  sctype='[file]',
642
- scope='global',
637
+ scope=Scope.GLOBAL,
643
638
  shorthelp=f"PDK: {item.upper()} waiver files",
644
639
  switch=f"-pdk_{item}_waiver 'pdkname tool stackup name <file>'",
645
640
  example=[
@@ -655,7 +650,7 @@ def schema_pdk(cfg, stackup='default'):
655
650
  key = 'default'
656
651
  scparam(cfg, ['pdk', pdkname, 'file', tool, key, stackup],
657
652
  sctype='[file]',
658
- scope='global',
653
+ scope=Scope.GLOBAL,
659
654
  shorthelp="PDK: custom file",
660
655
  switch="-pdk_file 'pdkname tool key stackup <file>'",
661
656
  example=[
@@ -668,7 +663,7 @@ def schema_pdk(cfg, stackup='default'):
668
663
 
669
664
  scparam(cfg, ['pdk', pdkname, 'dir', tool, key, stackup],
670
665
  sctype='[dir]',
671
- scope='global',
666
+ scope=Scope.GLOBAL,
672
667
  shorthelp="PDK: custom directory",
673
668
  switch="-pdk_dir 'pdkname tool key stackup <dir>'",
674
669
  example=[
@@ -682,7 +677,7 @@ def schema_pdk(cfg, stackup='default'):
682
677
 
683
678
  scparam(cfg, ['pdk', pdkname, 'var', tool, key, stackup],
684
679
  sctype='[str]',
685
- scope='global',
680
+ scope=Scope.GLOBAL,
686
681
  shorthelp="PDK: custom, variable",
687
682
  switch="-pdk_var 'pdkname tool stackup key <str>'",
688
683
  example=[
@@ -700,7 +695,7 @@ def schema_pdk(cfg, stackup='default'):
700
695
  doctype = 'default'
701
696
  scparam(cfg, ['pdk', pdkname, 'doc', doctype],
702
697
  sctype='[file]',
703
- scope='global',
698
+ scope=Scope.GLOBAL,
704
699
  shorthelp="PDK: documentation",
705
700
  switch="-pdk_doc 'pdkname doctype <file>'",
706
701
  example=["cli: -pdk_doc 'asap7 reference reference.pdf'",
@@ -713,7 +708,7 @@ def schema_pdk(cfg, stackup='default'):
713
708
  ###############################################################################
714
709
  # Datasheet ("specification/contract")
715
710
  ###############################################################################
716
- def schema_datasheet(cfg, name='default', mode='default'):
711
+ def schema_datasheet(cfg, partname='default', mode='default'):
717
712
 
718
713
  # Part type
719
714
  scparam(cfg, ['datasheet', 'type'],
@@ -901,7 +896,7 @@ def schema_datasheet(cfg, name='default', mode='default'):
901
896
  # IO
902
897
  ######################
903
898
 
904
- scparam(cfg, ['datasheet', 'io', name, 'arch'],
899
+ scparam(cfg, ['datasheet', 'io', partname, 'arch'],
905
900
  sctype='enum',
906
901
  enum=['spi', 'uart', 'i2c', 'pwm', 'qspi', 'sdio', 'can', 'jtag',
907
902
  'spdif', 'i2s',
@@ -919,7 +914,7 @@ def schema_datasheet(cfg, name='default', mode='default'):
919
914
  '10gbase-kr', '25gbase-kr', 'xfi', 'cei28g',
920
915
  'jesd204', 'cpri'],
921
916
  shorthelp="Datasheet: io standard",
922
- switch="-datasheet_io_arch 'name <str>'",
917
+ switch="-datasheet_io_arch 'partname <str>'",
923
918
  example=[
924
919
  "cli: -datasheet_io_arch 'pio spi'",
925
920
  "api: chip.set('datasheet', 'io', 'pio', 'arch', 'spi')"],
@@ -932,14 +927,14 @@ def schema_datasheet(cfg, name='default', mode='default'):
932
927
  }
933
928
 
934
929
  for i, v in metrics.items():
935
- scparam(cfg, ['datasheet', 'io', name, i],
930
+ scparam(cfg, ['datasheet', 'io', partname, i],
936
931
  unit=v[3],
937
932
  sctype=v[2],
938
933
  shorthelp=f"Datasheet: io {v[0]}",
939
- switch=f"-datasheet_io_{i} 'name <{v[2]}>'",
934
+ switch=f"-datasheet_io_{i} 'partname <{v[2]}>'",
940
935
  example=[
941
- f"cli: -datasheet_io_{i} 'name {v[1]}'",
942
- f"api: chip.set('datasheet', 'io', name, '{i}', {v[1]})"],
936
+ f"cli: -datasheet_io_{i} 'partname {v[1]}'",
937
+ f"api: chip.set('datasheet', 'io', partname, '{i}', {v[1]})"],
943
938
  schelp=f"""Datasheet: IO {v[1]} metrics specified on a per IO port basis.
944
939
  """)
945
940
 
@@ -947,31 +942,31 @@ def schema_datasheet(cfg, name='default', mode='default'):
947
942
  # Processor
948
943
  ######################
949
944
 
950
- scparam(cfg, ['datasheet', 'proc', name, 'arch'],
945
+ scparam(cfg, ['datasheet', 'proc', partname, 'arch'],
951
946
  sctype='str',
952
947
  shorthelp="Datasheet: processor architecture",
953
- switch="-datasheet_proc_arch 'name <str>'",
948
+ switch="-datasheet_proc_arch 'partname <str>'",
954
949
  example=[
955
950
  "cli: -datasheet_proc_arch '0 RV64GC'",
956
- "api: chip.set('datasheet', 'proc', name, 'arch', 'openfpga')"],
951
+ "api: chip.set('datasheet', 'proc', partname, 'arch', 'openfpga')"],
957
952
  schelp="""Processor architecture specified on a per core basis.""")
958
953
 
959
- scparam(cfg, ['datasheet', 'proc', name, 'features'],
954
+ scparam(cfg, ['datasheet', 'proc', partname, 'features'],
960
955
  sctype='[str]',
961
956
  shorthelp="Datasheet: processor features",
962
- switch="-datasheet_proc_features 'name <str>'",
957
+ switch="-datasheet_proc_features 'partname <str>'",
963
958
  example=[
964
959
  "cli: -datasheet_proc_features '0 SIMD'",
965
960
  "api: chip.set('datasheet','proc','cpu','features', 'SIMD')"],
966
961
  schelp="""List of maker specified processor features specified on a per core basis.""")
967
962
 
968
- scparam(cfg, ['datasheet', 'proc', name, 'datatypes'],
963
+ scparam(cfg, ['datasheet', 'proc', partname, 'datatypes'],
969
964
  sctype='[enum]',
970
965
  enum=['int4', 'int8', 'int16', 'int32', 'int64', 'int128',
971
966
  'uint4', 'uint8', 'uint16', 'uint32', 'uint64', 'uint128',
972
967
  'bfloat16', 'fp16', 'fp32', 'fp64', 'fp128'],
973
968
  shorthelp="Datasheet: processor datatypes",
974
- switch="-datasheet_proc_datatypes 'name <str>'",
969
+ switch="-datasheet_proc_datatypes 'partname <str>'",
975
970
  example=[
976
971
  "cli: -datasheet_proc_datatypes '0 int8'",
977
972
  "api: chip.set('datasheet', 'proc', 'cpu', 'datatypes', 'int8')"],
@@ -991,11 +986,11 @@ def schema_datasheet(cfg, name='default', mode='default'):
991
986
  'nvm': ['local non-volatile memory', 128, 'KB']}
992
987
 
993
988
  for i, v in metrics.items():
994
- scparam(cfg, ['datasheet', 'proc', name, i],
989
+ scparam(cfg, ['datasheet', 'proc', partname, i],
995
990
  unit=v[2],
996
991
  sctype='int',
997
992
  shorthelp=f"Datasheet: processor {v[0]}",
998
- switch=f"-datasheet_proc_{i} 'name <int>'",
993
+ switch=f"-datasheet_proc_{i} 'partname <int>'",
999
994
  example=[
1000
995
  f"cli: -datasheet_proc_{i} 'cpu {v[1]}'",
1001
996
  f"api: chip.set('datasheet', 'proc', 'cpu', '{i}', {v[1]})"],
@@ -1005,37 +1000,37 @@ def schema_datasheet(cfg, name='default', mode='default'):
1005
1000
  # Memory
1006
1001
  ######################
1007
1002
 
1008
- scparam(cfg, ['datasheet', 'memory', name, 'bits'],
1003
+ scparam(cfg, ['datasheet', 'memory', partname, 'bits'],
1009
1004
  sctype='int',
1010
1005
  shorthelp="Datasheet: memory total bits",
1011
- switch="-datasheet_memory_bits 'name <int>'",
1006
+ switch="-datasheet_memory_bits 'partname <int>'",
1012
1007
  example=[
1013
1008
  "cli: -datasheet_memory_bits 'm0 1024'",
1014
1009
  "api: chip.set('datasheet', 'memory', 'm0', 'bits', 1024)"],
1015
1010
  schelp="""Memory total number of bits specified on a per memory basis.""")
1016
1011
 
1017
- scparam(cfg, ['datasheet', 'memory', name, 'width'],
1012
+ scparam(cfg, ['datasheet', 'memory', partname, 'width'],
1018
1013
  sctype='int',
1019
1014
  shorthelp="Datasheet: memory width",
1020
- switch="-datasheet_memory_width 'name <int>'",
1015
+ switch="-datasheet_memory_width 'partname <int>'",
1021
1016
  example=[
1022
1017
  "cli: -datasheet_memory_width 'm0 16'",
1023
1018
  "api: chip.set('datasheet', 'memory', 'm0', 'width', 16)"],
1024
1019
  schelp="""Memory width specified on a per memory basis.""")
1025
1020
 
1026
- scparam(cfg, ['datasheet', 'memory', name, 'depth'],
1021
+ scparam(cfg, ['datasheet', 'memory', partname, 'depth'],
1027
1022
  sctype='int',
1028
1023
  shorthelp="Datasheet: memory depth",
1029
- switch="-datasheet_memory_depth 'name <int>'",
1024
+ switch="-datasheet_memory_depth 'partname <int>'",
1030
1025
  example=[
1031
1026
  "cli: -datasheet_memory_depth 'm0 128'",
1032
1027
  "api: chip.set('datasheet', 'memory', 'm0', 'depth', 128)"],
1033
1028
  schelp="""Memory depth specified on a per memory basis.""")
1034
1029
 
1035
- scparam(cfg, ['datasheet', 'memory', name, 'banks'],
1030
+ scparam(cfg, ['datasheet', 'memory', partname, 'banks'],
1036
1031
  sctype='int',
1037
1032
  shorthelp="Datasheet: memory banks",
1038
- switch="-datasheet_memory_banks 'name <int>'",
1033
+ switch="-datasheet_memory_banks 'partname <int>'",
1039
1034
  example=[
1040
1035
  "cli: -datasheet_memory_banks 'm0 4'",
1041
1036
  "api: chip.set('datasheet', 'memory', 'm0', 'banks', 4)"],
@@ -1056,14 +1051,14 @@ def schema_datasheet(cfg, name='default', mode='default'):
1056
1051
  }
1057
1052
 
1058
1053
  for i, v in metrics.items():
1059
- scparam(cfg, ['datasheet', 'memory', name, i],
1054
+ scparam(cfg, ['datasheet', 'memory', partname, i],
1060
1055
  unit=v[2],
1061
1056
  sctype='(float,float,float)',
1062
1057
  shorthelp=f"Datasheet: memory {v[0]}",
1063
- switch=f"-datasheet_memory_{i} 'name <(float,float,float)>'",
1058
+ switch=f"-datasheet_memory_{i} 'partname <(float,float,float)>'",
1064
1059
  example=[
1065
- f"cli: -datasheet_memory_{i} 'name {v[1]}'",
1066
- f"api: chip.set('datasheet', 'memory', name, '{i}', {v[1]})"],
1060
+ f"cli: -datasheet_memory_{i} 'partname {v[1]}'",
1061
+ f"api: chip.set('datasheet', 'memory', partname, '{i}', {v[1]})"],
1067
1062
  schelp=f"""Memory {v[1]} specified on a per memory basis.""")
1068
1063
 
1069
1064
  # Latency (cycles)
@@ -1074,24 +1069,24 @@ def schema_datasheet(cfg, name='default', mode='default'):
1074
1069
  }
1075
1070
 
1076
1071
  for i, v in metrics.items():
1077
- scparam(cfg, ['datasheet', 'memory', name, i],
1072
+ scparam(cfg, ['datasheet', 'memory', partname, i],
1078
1073
  unit=v[2],
1079
1074
  sctype='(int,int,int)',
1080
1075
  shorthelp=f"Datasheet: memory {v[0]}",
1081
- switch=f"-datasheet_memory_{i} 'name <(int,int,int)>'",
1076
+ switch=f"-datasheet_memory_{i} 'partname <(int,int,int)>'",
1082
1077
  example=[
1083
- f"cli: -datasheet_memory_{i} 'name {v[1]}'",
1084
- f"api: chip.set('datasheet', 'memory', name, '{i}', {v[1]})"],
1078
+ f"cli: -datasheet_memory_{i} 'partname {v[1]}'",
1079
+ f"api: chip.set('datasheet', 'memory', partname, '{i}', {v[1]})"],
1085
1080
  schelp=f"""Memory {v[1]} specified on a per memory basis.""")
1086
1081
 
1087
1082
  ######################
1088
1083
  # FPGA
1089
1084
  ######################
1090
1085
 
1091
- scparam(cfg, ['datasheet', 'fpga', name, 'arch'],
1086
+ scparam(cfg, ['datasheet', 'fpga', partname, 'arch'],
1092
1087
  sctype='str',
1093
1088
  shorthelp="Datasheet: fpga architecture",
1094
- switch="-datasheet_fpga_arch 'name <str>'",
1089
+ switch="-datasheet_fpga_arch 'partname <str>'",
1095
1090
  example=[
1096
1091
  "cli: -datasheet_fpga_arch 'i0 openfpga'",
1097
1092
  "api: chip.set('datasheet', 'fpga', 'i0', 'arch', 'openfpga')"],
@@ -1107,11 +1102,11 @@ def schema_datasheet(cfg, name='default', mode='default'):
1107
1102
  'blockram': ['block ram', 128, 'Kb']}
1108
1103
 
1109
1104
  for i, v in metrics.items():
1110
- scparam(cfg, ['datasheet', 'fpga', name, i],
1105
+ scparam(cfg, ['datasheet', 'fpga', partname, i],
1111
1106
  unit=v[2],
1112
1107
  sctype='int',
1113
1108
  shorthelp=f"Datasheet: fpga {v[0]}",
1114
- switch=f"-datasheet_fpga_{i} 'name <int>'",
1109
+ switch=f"-datasheet_fpga_{i} 'partname <int>'",
1115
1110
  example=[
1116
1111
  f"cli: -datasheet_fpga_{i} 'i0 {v[1]}'",
1117
1112
  f"api: chip.set('datasheet', 'fpga', 'i0', '{i}', {v[1]})"],
@@ -1121,19 +1116,19 @@ def schema_datasheet(cfg, name='default', mode='default'):
1121
1116
  # Analog
1122
1117
  ######################
1123
1118
 
1124
- scparam(cfg, ['datasheet', 'analog', name, 'arch'],
1119
+ scparam(cfg, ['datasheet', 'analog', partname, 'arch'],
1125
1120
  sctype='str',
1126
1121
  shorthelp="Datasheet: analog architecture",
1127
- switch="-datasheet_analog_arch 'name <str>'",
1122
+ switch="-datasheet_analog_arch 'partname <str>'",
1128
1123
  example=[
1129
1124
  "cli: -datasheet_analog_arch 'adc0 pipelined'",
1130
1125
  "api: chip.set('datasheet', 'analog', 'adc0', 'arch', 'pipelined')"],
1131
1126
  schelp="""Analog component architecture.""")
1132
1127
 
1133
- scparam(cfg, ['datasheet', 'analog', name, 'features'],
1128
+ scparam(cfg, ['datasheet', 'analog', partname, 'features'],
1134
1129
  sctype='[str]',
1135
1130
  shorthelp="Datasheet: analog features",
1136
- switch="-datasheet_analog_features 'name <str>'",
1131
+ switch="-datasheet_analog_features 'partname <str>'",
1137
1132
  example=[
1138
1133
  "cli: -datasheet_analog_features '0 differential input'",
1139
1134
  "api: chip.set('datasheet','analog','adc0','features', 'differential input')"],
@@ -1143,10 +1138,10 @@ def schema_datasheet(cfg, name='default', mode='default'):
1143
1138
  'channels': ['parallel channels', 8]}
1144
1139
 
1145
1140
  for i, v in metrics.items():
1146
- scparam(cfg, ['datasheet', 'analog', name, i],
1141
+ scparam(cfg, ['datasheet', 'analog', partname, i],
1147
1142
  sctype='int',
1148
1143
  shorthelp=f"Datasheet: analog {v[0]}",
1149
- switch=f"-datasheet_analog_{i} 'name <int>'",
1144
+ switch=f"-datasheet_analog_{i} 'partname <int>'",
1150
1145
  example=[
1151
1146
  f"cli: -datasheet_analog_{i} 'i0 {v[1]}'",
1152
1147
  f"api: chip.set('datasheet', 'analog', 'abc123', '{i}', {v[1]})"],
@@ -1185,11 +1180,11 @@ def schema_datasheet(cfg, name='default', mode='default'):
1185
1180
  }
1186
1181
 
1187
1182
  for i, v in metrics.items():
1188
- scparam(cfg, ['datasheet', 'analog', name, i],
1183
+ scparam(cfg, ['datasheet', 'analog', partname, i],
1189
1184
  unit=v[2],
1190
1185
  sctype='(float,float,float)',
1191
1186
  shorthelp=f"Datasheet: analog {v[0]}",
1192
- switch=f"-datasheet_analog_{i} 'name <(float,float,float)>'",
1187
+ switch=f"-datasheet_analog_{i} 'partname <(float,float,float)>'",
1193
1188
  example=[
1194
1189
  f"cli: -datasheet_analog_{i} 'i0 {v[1]}'",
1195
1190
  f"api: chip.set('datasheet', 'analog', 'abc123', '{i}', {v[1]})"],
@@ -1252,165 +1247,142 @@ def schema_datasheet(cfg, name='default', mode='default'):
1252
1247
  # Package Description
1253
1248
  #########################
1254
1249
 
1255
- scparam(cfg, ['datasheet', 'package', name, 'type'],
1250
+ scparam(cfg, ['datasheet', 'package', partname, 'type'],
1256
1251
  sctype='enum',
1257
1252
  enum=['bga', 'lga', 'csp', 'qfn', 'qfp', 'sop', 'die', 'wafer'],
1258
1253
  shorthelp="Datasheet: package type",
1259
- switch="-datasheet_package_type 'name <str>'",
1254
+ switch="-datasheet_package_type 'partname <str>'",
1260
1255
  example=[
1261
1256
  "cli: -datasheet_package_type 'abcd bga'",
1262
1257
  "api: chip.set('datasheet', 'package', 'abcd', 'type', 'bga')"],
1263
- schelp="""Package type specified on a named package basis.""")
1258
+ schelp="""Package type.""")
1264
1259
 
1265
- scparam(cfg, ['datasheet', 'package', name, 'footprint'],
1266
- sctype='str',
1260
+ scparam(cfg, ['datasheet', 'package', partname, 'footprint'],
1261
+ sctype='[file]',
1267
1262
  shorthelp="Datasheet: package footprint",
1268
- switch="-datasheet_package_footprint 'name <str>'",
1263
+ switch="-datasheet_package_footprint 'partname <file>'",
1269
1264
  example=[
1270
- "cli: -datasheet_package_footprint 'abcd soic8'",
1271
- "api: chip.set('datasheet', 'package', 'abcd', 'footprint', 'soic8')"],
1272
- schelp="""Package footprint name. The name of the footprint can be a standard
1273
- footprint name or a reference designator from a footprint library.""")
1265
+ "cli: -datasheet_package_footprint 'abcd ./soic8.kicad_mod'",
1266
+ "api: chip.set('datasheet', 'package', 'abcd', 'footprint', './soic8.kicad_mod')"],
1267
+ schelp="""Package footprint file. Supported 3D model file formats include:
1268
+
1269
+ * (KICAD_MOD) KiCad Standard Footprint Format
1270
+
1271
+ """)
1274
1272
 
1275
- scparam(cfg, ['datasheet', 'package', name, 'drawing'],
1273
+ scparam(cfg, ['datasheet', 'package', partname, '3dmodel'],
1276
1274
  sctype='[file]',
1277
- shorthelp="Datasheet: package drawing",
1278
- switch="-datasheet_package_drawing 'name <file>'",
1275
+ shorthelp="Datasheet: package 3D model",
1276
+ switch="-datasheet_package_3dmodel 'partname <file>'",
1279
1277
  example=[
1280
- "cli: -datasheet_package_drawing 'abcd p484.pdf'",
1281
- "api: chip.set('datasheet', 'package', 'abcd', 'drawing', 'p484.pdf')"],
1282
- schelp="""Mechanical package outline for documentation purposes.
1283
- Common file formats include PDF, DOC, SVG, and PNG.""")
1278
+ "cli: -datasheet_package_3dmodel 'abcd ./soic8.step'",
1279
+ "api: chip.set('datasheet', 'package', 'abcd', '3dmodel', './soic8.step')"],
1280
+ schelp="""Package 3D model file. Supported 3D model file formats include:
1284
1281
 
1285
- scparam(cfg, ['datasheet', 'package', name, 'pincount'],
1286
- sctype='int',
1287
- shorthelp="Datasheet: package total pincount",
1288
- switch="-datasheet_package_pincount 'name <int>'",
1289
- example=[
1290
- "cli: -datasheet_package_pincount 'abcd 484'",
1291
- "api: chip.set('datasheet', 'package', 'abcd', 'pincount', '484')"],
1292
- schelp="""Total number package pins of the named package.""")
1282
+ * (STEP) Standard for the Exchange of Product Data Format
1283
+ * (STL) Stereolithography Format
1284
+ * (WRL) Virtually Reality Modeling Language Format
1293
1285
 
1294
- scparam(cfg, ['datasheet', 'package', name, 'anchor'],
1295
- sctype='(float,float)',
1296
- defvalue=(0.0, 0.0),
1297
- unit='um',
1298
- shorthelp="Datasheeet: package anchor",
1299
- switch="-datasheet_package_anchor 'name <(float,float)>'",
1286
+ """)
1287
+
1288
+ scparam(cfg, ['datasheet', 'package', partname, 'drawing'],
1289
+ sctype='[file]',
1290
+ shorthelp="Datasheet: package drawing",
1291
+ switch="-datasheet_package_drawing 'partname <file>'",
1300
1292
  example=[
1301
- "cli: -datasheet_package_anchor 'i0 (3.0,3.0)'",
1302
- "api: chip.set('datasheet', 'package', 'i0', 'anchor', (3.0, 3.0))"],
1303
- schelp="""
1304
- Package anchor point with respect to the lower left corner of the package.
1305
- When placing a component on a substrate, the placement location specifies
1306
- the distance from the substrate origin to the anchor point of the placed
1307
- object.""")
1293
+ "cli: -datasheet_package_drawing 'abcd p484.pdf'",
1294
+ "api: chip.set('datasheet', 'package', 'abcd', 'drawing', 'p484.pdf')"],
1295
+ schelp="""Mechanical drawing for documentation purposes.
1296
+ Supported file formats include: PDF, DOC, SVG, and PNG.""")
1308
1297
 
1309
- # critical dimensions
1298
+ # key package metrics
1310
1299
  metrics = {'length': ['length', (4000, 4000, 4000), 'um'],
1311
1300
  'width': ['width', (4000, 4000, 4000), 'um'],
1312
1301
  'thickness': ['thickness', (900, 1000, 1100), 'um'],
1313
- 'pitch': ['pitch', (800, 850, 900), 'um']
1302
+ 'pinpitch': ['pin pitch', (800, 850, 900), 'um']
1314
1303
  }
1315
1304
 
1316
1305
  for i, v in metrics.items():
1317
- scparam(cfg, ['datasheet', 'package', name, i],
1306
+ scparam(cfg, ['datasheet', 'package', partname, i],
1318
1307
  unit=v[2],
1319
1308
  sctype='(float,float,float)',
1320
1309
  shorthelp=f"Datasheet: package {v[0]}",
1321
- switch=f"-datasheet_package_{i} 'name <(float,float,float)>'",
1310
+ switch=f"-datasheet_package_{i} 'partname <(float,float,float)>'",
1322
1311
  example=[
1323
1312
  f"cli: -datasheet_package_{i} 'abcd {v[1]}'",
1324
1313
  f"api: chip.set('datasheet', 'package', 'abcd', '{i}', {v[1]}"],
1325
- schelp=f"""Datasheet: package {v[0]}. Values are tuples of
1314
+ schelp=f"""Package {v[0]}. Values are tuples of
1326
1315
  (min, nominal, max).""")
1327
1316
 
1328
- # pinout diagram
1329
- pinnumber = 'default'
1330
- scparam(cfg, ['datasheet', 'package', name, 'pin', pinnumber, 'shape'],
1331
- sctype='enum',
1332
- enum=['circle', 'rectangle', 'square', 'octagon'],
1333
- shorthelp="Datasheet: package pin shape",
1334
- switch="-datasheet_package_pin_shape 'name pinnumber <str>'",
1317
+ # pin
1318
+ scparam(cfg, ['datasheet', 'package', partname, 'pincount'],
1319
+ sctype='int',
1320
+ shorthelp="Datasheet: package pin count",
1321
+ switch="-datasheet_package_pincount 'partname <int>'",
1335
1322
  example=[
1336
- "cli: -datasheet_package_pin_shape 'abcd B1 circle'",
1337
- "api: chip.set('datasheet', 'package', 'abcd', 'pin', 'B1', 'shape', 'circle')"],
1338
- schelp="""Datasheet: package pin shape specified on a per package
1339
- and per pin number basis.""")
1340
-
1341
- metrics = {'width': ['width', (200, 250, 300), 'um'],
1342
- 'length': ['length', (200, 250, 300), 'um']
1343
- }
1323
+ "cli: -datasheet_package_pincount 'abcd 484'",
1324
+ "api: chip.set('datasheet', 'package', 'abcd', 'pincount', '484')"],
1325
+ schelp="""Total number package pins.""")
1344
1326
 
1345
- for i, v in metrics.items():
1346
- scparam(cfg, ['datasheet', 'package', name, 'pin', pinnumber, i],
1347
- unit=v[2],
1348
- sctype='(float,float,float)',
1349
- shorthelp=f"Datasheet: package pin {v[0]}",
1350
- switch=f"-datasheet_package_pin_{i} 'name pinnumber <(float,float,float)>'",
1351
- example=[
1352
- f"cli: -datasheet_package_pin_{i} 'abcd B1 {v[1]}'",
1353
- f"api: chip.set('datasheet', 'package', 'abcd', 'pin', 'B1', '{i}', {v[1]}"],
1354
- schelp=f"""Datsheet: {v[0]} specified on a per package and per pin number
1355
- basis. Values are tuples of (min, nominal, max).""")
1327
+ number = 'default'
1328
+ scparam(cfg, ['datasheet', 'package', partname, 'pin', number, 'signal'],
1329
+ sctype='str',
1330
+ shorthelp="Datasheet: package pin signal map",
1331
+ switch="-datasheet_package_pin_signal 'partname number <str>'",
1332
+ example=[
1333
+ "cli: -datasheet_package_pin_signal 'abcd B1 clk'",
1334
+ "api: chip.set('datasheet', 'package', 'abcd', 'pin', 'B1', 'signal', 'clk')"],
1335
+ schelp="""Mapping between the package physical pin name ("1", "2", "A1", "B3", ...)
1336
+ and the corresponding device signal name ("VDD", "CLK", "NRST") found in the
1337
+ :keypath:`datasheet,pin`.""")
1356
1338
 
1357
- scparam(cfg, ['datasheet', 'package', name, 'pin', pinnumber, 'loc'],
1339
+ # anchor
1340
+ scparam(cfg, ['datasheet', 'package', partname, 'anchor'],
1358
1341
  sctype='(float,float)',
1342
+ defvalue=(0.0, 0.0),
1359
1343
  unit='um',
1360
- shorthelp="Datasheet: package pin location",
1361
- switch="-datasheet_package_pin_loc 'name pinnumber <(float,float)>'",
1344
+ shorthelp="Datasheet: package anchor",
1345
+ switch="-datasheet_package_anchor 'partname <(float,float)>'",
1362
1346
  example=[
1363
- "cli: -datasheet_package_pin_loc 'abcd B1 (500,500)'",
1364
- "api: chip.set('datasheet', 'package', 'abcd', 'pin', 'B1', 'loc', (500,500)"],
1365
- schelp="""Datsheet: Package pin location specified as an (x,y) tuple on a per
1366
- package and per pin number basis. Locations specify the center of the pin with
1367
- respect to the center of the package.""")
1368
-
1369
- scparam(cfg, ['datasheet', 'package', name, 'pin', pinnumber, 'name'],
1370
- sctype='str',
1371
- shorthelp="Datasheet: package pin name",
1372
- switch="-datasheet_package_pin_name 'name pinnumber <str>'",
1373
- example=[
1374
- "cli: -datasheet_package_pin_name 'abcd B1 clk'",
1375
- "api: chip.set('datasheet', 'package', 'abcd', 'pin', 'B1', 'name', 'clk')"],
1376
- schelp="""Datsheet: Package pin name specified on a per package and per pin
1377
- number basis. The pin number is generally an integer starting at '1' in the case of
1378
- packages like qfn, qfp and an array index ('A1', 'A2') in the case of array packages
1379
- like bgas. The pin name refers to the logical function assigned to the physical
1380
- pin number (e.g clk, vss, in). Details regarding the logical pin is stored in
1381
- the :keypath:`datasheet,pin`.""")
1347
+ "cli: -datasheet_package_anchor 'i0 (3.0, 3.0)'",
1348
+ "api: chip.set('datasheet', 'package', 'i0', 'anchor', (3.0, 3.0))"],
1349
+ schelp="""
1350
+ Package anchor point with respect to the lower left corner of the package.
1351
+ When placing a component on a substrate, the placement location specifies
1352
+ the distance from the substrate origin to the anchor point of the placed
1353
+ object.""")
1382
1354
 
1383
1355
  ######################
1384
1356
  # Pin Specifications
1385
1357
  ######################
1386
1358
 
1387
1359
  # Pin type
1388
- scparam(cfg, ['datasheet', 'pin', name, 'type', mode],
1360
+ scparam(cfg, ['datasheet', 'pin', partname, 'type', mode],
1389
1361
  sctype='enum',
1390
1362
  enum=['digital', 'analog', 'clock', 'supply', 'ground'],
1391
1363
  shorthelp="Datasheet: pin type",
1392
- switch="-datasheet_pin_type 'name mode <str>'",
1364
+ switch="-datasheet_pin_type 'partname mode <str>'",
1393
1365
  example=[
1394
1366
  "cli: -datasheet_pin_type 'vdd global supply'",
1395
1367
  "api: chip.set('datasheet', 'pin', 'vdd', 'type', 'global', 'supply')"],
1396
1368
  schelp="""Pin type specified on a per mode basis.""")
1397
1369
 
1398
1370
  # Pin direction
1399
- scparam(cfg, ['datasheet', 'pin', name, 'dir', mode],
1371
+ scparam(cfg, ['datasheet', 'pin', partname, 'dir', mode],
1400
1372
  sctype='enum',
1401
1373
  enum=['input', 'output', 'inout'],
1402
1374
  shorthelp="Datasheet: pin direction",
1403
- switch="-datasheet_pin_dir 'name mode <str>'",
1375
+ switch="-datasheet_pin_dir 'partname mode <str>'",
1404
1376
  example=[
1405
1377
  "cli: -datasheet_pin_dir 'clk global input'",
1406
1378
  "api: chip.set('datasheet', 'pin', 'clk', 'dir', 'global', 'input')"],
1407
1379
  schelp="""Pin direction specified on a per mode basis.""")
1408
1380
 
1409
1381
  # Pin complement (for differential pair)
1410
- scparam(cfg, ['datasheet', 'pin', name, 'complement', mode],
1382
+ scparam(cfg, ['datasheet', 'pin', partname, 'complement', mode],
1411
1383
  sctype='str',
1412
1384
  shorthelp="Datasheet: pin complement",
1413
- switch="-datasheet_pin_complement 'name mode <str>'",
1385
+ switch="-datasheet_pin_complement 'partname mode <str>'",
1414
1386
  example=[
1415
1387
  "cli: -datasheet_pin_complement 'ina global inb'",
1416
1388
  "api: chip.set('datasheet', 'pin', 'ina', 'complement', 'global', 'inb')"],
@@ -1418,31 +1390,31 @@ def schema_datasheet(cfg, name='default', mode='default'):
1418
1390
  signals.""")
1419
1391
 
1420
1392
  # Pin standard
1421
- scparam(cfg, ['datasheet', 'pin', name, 'standard', mode],
1393
+ scparam(cfg, ['datasheet', 'pin', partname, 'standard', mode],
1422
1394
  sctype='[str]',
1423
1395
  shorthelp="Datasheet: pin standard",
1424
- switch="-datasheet_pin_standard 'name mode <str>'",
1396
+ switch="-datasheet_pin_standard 'partname mode <str>'",
1425
1397
  example=[
1426
1398
  "cli: -datasheet_pin_standard 'clk def LVCMOS'",
1427
1399
  "api: chip.set('datasheet', 'pin', 'clk', 'standard', 'def', 'LVCMOS')"],
1428
1400
  schelp="""Pin electrical signaling standard (LVDS, LVCMOS, TTL, ...).""")
1429
1401
 
1430
1402
  # Pin interface map
1431
- scparam(cfg, ['datasheet', 'pin', name, 'interface', mode],
1403
+ scparam(cfg, ['datasheet', 'pin', partname, 'interface', mode],
1432
1404
  sctype='[str]',
1433
1405
  shorthelp="Datasheet: pin interface map",
1434
- switch="-datasheet_pin_interface 'name mode <str>'",
1406
+ switch="-datasheet_pin_interface 'partname mode <str>'",
1435
1407
  example=[
1436
1408
  "cli: -datasheet_pin_interface 'clk0 ddr4 CLKN'",
1437
1409
  "api: chip.set('datasheet', 'pin', 'clk0', 'interface', 'ddr4', 'CLKN')"],
1438
1410
  schelp="""Pin mapping to standardized interface names.""")
1439
1411
 
1440
1412
  # Pin reset value
1441
- scparam(cfg, ['datasheet', 'pin', name, 'resetvalue', mode],
1413
+ scparam(cfg, ['datasheet', 'pin', partname, 'resetvalue', mode],
1442
1414
  sctype='enum',
1443
1415
  enum=['weak1', 'weak0', 'strong0', 'strong1', 'highz'],
1444
1416
  shorthelp="Datasheet: pin reset value",
1445
- switch="-datasheet_pin_resetvalue 'name mode <str>'",
1417
+ switch="-datasheet_pin_resetvalue 'partname mode <str>'",
1446
1418
  example=[
1447
1419
  "cli: -datasheet_pin_resetvalue 'clk global weak1'",
1448
1420
  "api: chip.set('datasheet', 'pin', 'clk', 'resetvalue', 'global', 'weak1')"],
@@ -1493,7 +1465,7 @@ def schema_datasheet(cfg, name='default', mode='default'):
1493
1465
  }
1494
1466
 
1495
1467
  for item, val in metrics.items():
1496
- scparam(cfg, ['datasheet', 'pin', name, item, mode],
1468
+ scparam(cfg, ['datasheet', 'pin', partname, item, mode],
1497
1469
  unit=val[2],
1498
1470
  sctype='(float,float,float)',
1499
1471
  shorthelp=f"Datasheet: pin {val[0]}",
@@ -1516,7 +1488,7 @@ def schema_datasheet(cfg, name='default', mode='default'):
1516
1488
  relpin = 'default'
1517
1489
 
1518
1490
  for i, v in metrics.items():
1519
- scparam(cfg, ['datasheet', 'pin', name, i, mode, relpin],
1491
+ scparam(cfg, ['datasheet', 'pin', partname, i, mode, relpin],
1520
1492
  unit=v[2],
1521
1493
  sctype='(float,float,float)',
1522
1494
  shorthelp=f"Datasheet: pin {v[0]}",
@@ -1637,7 +1609,7 @@ def schema_tool(cfg, tool='default'):
1637
1609
 
1638
1610
  scparam(cfg, ['tool', tool, 'sbom', version],
1639
1611
  sctype='[file]',
1640
- pernode='optional',
1612
+ pernode=PerNode.OPTIONAL,
1641
1613
  shorthelp="Tool: software BOM",
1642
1614
  switch="-tool_sbom 'tool version <file>'",
1643
1615
  example=[
@@ -1652,7 +1624,7 @@ def schema_tool(cfg, tool='default'):
1652
1624
 
1653
1625
  scparam(cfg, ['tool', tool, 'path'],
1654
1626
  sctype='dir',
1655
- pernode='optional',
1627
+ pernode=PerNode.OPTIONAL,
1656
1628
  shorthelp="Tool: executable path",
1657
1629
  switch="-tool_path 'tool <dir>'",
1658
1630
  example=[
@@ -1689,7 +1661,7 @@ def schema_tool(cfg, tool='default'):
1689
1661
 
1690
1662
  scparam(cfg, ['tool', tool, 'version'],
1691
1663
  sctype='[str]',
1692
- pernode='optional',
1664
+ pernode=PerNode.OPTIONAL,
1693
1665
  shorthelp="Tool: version",
1694
1666
  switch="-tool_version 'tool <str>'",
1695
1667
  example=["cli: -tool_version 'openroad >=v2.0'",
@@ -1719,7 +1691,7 @@ def schema_tool(cfg, tool='default'):
1719
1691
  key = 'default'
1720
1692
  scparam(cfg, ['tool', tool, 'licenseserver', key],
1721
1693
  sctype='[str]',
1722
- pernode='optional',
1694
+ pernode=PerNode.OPTIONAL,
1723
1695
  shorthelp="Tool: license servers",
1724
1696
  switch="-tool_licenseserver 'name key <str>'",
1725
1697
  example=[
@@ -1742,7 +1714,7 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1742
1714
 
1743
1715
  scparam(cfg, ['tool', tool, 'task', task, 'warningoff'],
1744
1716
  sctype='[str]',
1745
- pernode='optional',
1717
+ pernode=PerNode.OPTIONAL,
1746
1718
  shorthelp="Task: warning filter",
1747
1719
  switch="-tool_task_warningoff 'tool task <str>'",
1748
1720
  example=[
@@ -1757,7 +1729,7 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1757
1729
 
1758
1730
  scparam(cfg, ['tool', tool, 'task', task, 'regex', suffix],
1759
1731
  sctype='[str]',
1760
- pernode='optional',
1732
+ pernode=PerNode.OPTIONAL,
1761
1733
  shorthelp="Task: regex filter",
1762
1734
  switch="-tool_task_regex 'tool task suffix <str>'",
1763
1735
  example=[
@@ -1793,7 +1765,7 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1793
1765
  # Configuration: cli-option, tcl var, env var, file
1794
1766
  scparam(cfg, ['tool', tool, 'task', task, 'option'],
1795
1767
  sctype='[str]',
1796
- pernode='optional',
1768
+ pernode=PerNode.OPTIONAL,
1797
1769
  shorthelp="Task: executable options",
1798
1770
  switch="-tool_task_option 'tool task <str>'",
1799
1771
  example=[
@@ -1807,7 +1779,7 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1807
1779
 
1808
1780
  scparam(cfg, ['tool', tool, 'task', task, 'var', key],
1809
1781
  sctype='[str]',
1810
- pernode='optional',
1782
+ pernode=PerNode.OPTIONAL,
1811
1783
  shorthelp="Task: script variables",
1812
1784
  switch="-tool_task_var 'tool task key <str>'",
1813
1785
  example=[
@@ -1820,7 +1792,7 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1820
1792
 
1821
1793
  scparam(cfg, ['tool', tool, 'task', task, 'env', key],
1822
1794
  sctype='str',
1823
- pernode='optional',
1795
+ pernode=PerNode.OPTIONAL,
1824
1796
  shorthelp="Task: environment variables",
1825
1797
  switch="-tool_task_env 'tool task env <str>'",
1826
1798
  example=[
@@ -1833,14 +1805,14 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1833
1805
 
1834
1806
  scparam(cfg, ['tool', tool, 'task', task, 'file', key],
1835
1807
  sctype='[file]',
1836
- pernode='optional',
1808
+ pernode=PerNode.OPTIONAL,
1837
1809
  copy=True,
1838
1810
  shorthelp="Task: custom setup files",
1839
1811
  switch="-tool_task_file 'tool task key <file>'",
1840
1812
  example=[
1841
1813
  "cli: -tool_task_file 'openroad floorplan macroplace macroplace.tcl'",
1842
1814
  "api: chip.set('tool', 'openroad', 'task', 'floorplan', 'file', 'macroplace', "
1843
- "'macroplace.tcl')"],
1815
+ "'macroplace.tcl')"],
1844
1816
  schelp="""
1845
1817
  Paths to user supplied files mapped to keys. Keys and filetypes must
1846
1818
  match what's expected by the task/reference script consuming the
@@ -1849,14 +1821,14 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1849
1821
 
1850
1822
  scparam(cfg, ['tool', tool, 'task', task, 'dir', key],
1851
1823
  sctype='[dir]',
1852
- pernode='optional',
1824
+ pernode=PerNode.OPTIONAL,
1853
1825
  copy=True,
1854
1826
  shorthelp="Task: custom setup directories",
1855
1827
  switch="-tool_task_dir 'tool task key <dir>'",
1856
1828
  example=[
1857
1829
  "cli: -tool_task_dir 'verilator compile cincludes include'",
1858
1830
  "api: chip.set('tool', 'verilator', 'task', 'compile', 'dir', 'cincludes', "
1859
- "'include')"],
1831
+ "'include')"],
1860
1832
  schelp="""
1861
1833
  Paths to user supplied directories mapped to keys. Keys must match
1862
1834
  what's expected by the task/reference script consuming the
@@ -1866,13 +1838,13 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1866
1838
  # Definitions of inputs, outputs, requirements
1867
1839
  scparam(cfg, ['tool', tool, 'task', task, 'input'],
1868
1840
  sctype='[file]',
1869
- pernode='required',
1841
+ pernode=PerNode.REQUIRED,
1870
1842
  shorthelp="Task: input files",
1871
1843
  switch="-tool_task_input 'tool task <file>'",
1872
1844
  example=[
1873
1845
  "cli: -tool_task_input 'openroad place place 0 oh_add.def'",
1874
1846
  "api: chip.set('tool', 'openroad', 'task', 'place', 'input', 'oh_add.def', "
1875
- "step='place', index='0')"],
1847
+ "step='place', index='0')"],
1876
1848
  schelp="""
1877
1849
  List of data files to be copied from previous flowgraph steps 'output'
1878
1850
  directory. The list of steps to copy files from is defined by the
@@ -1882,13 +1854,13 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1882
1854
 
1883
1855
  scparam(cfg, ['tool', tool, 'task', task, 'output'],
1884
1856
  sctype='[file]',
1885
- pernode='required',
1857
+ pernode=PerNode.REQUIRED,
1886
1858
  shorthelp="Task: output files",
1887
1859
  switch="-tool_task_output 'tool task <file>'",
1888
1860
  example=[
1889
1861
  "cli: -tool_task_output 'openroad place place 0 oh_add.def'",
1890
1862
  "api: chip.set('tool', 'openroad', 'task', 'place', 'output', 'oh_add.def', "
1891
- "step='place', index='0')"],
1863
+ "step='place', index='0')"],
1892
1864
  schelp="""
1893
1865
  List of data files written to the 'output' directory of the
1894
1866
  tool/task/step/index used in the keypath. All files must be available
@@ -1899,8 +1871,8 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1899
1871
  sctype='enum',
1900
1872
  enum=dest_enum,
1901
1873
  defvalue='log',
1902
- scope='job',
1903
- pernode='optional',
1874
+ scope=Scope.JOB,
1875
+ pernode=PerNode.OPTIONAL,
1904
1876
  shorthelp="Task: destination for stdout",
1905
1877
  switch="-tool_task_stdout_destination 'tool task <str>'",
1906
1878
  example=["cli: -tool_task_stdout_destination 'ghdl import log'",
@@ -1917,8 +1889,8 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1917
1889
  scparam(cfg, ['tool', tool, 'task', task, 'stdout', 'suffix'],
1918
1890
  sctype='str',
1919
1891
  defvalue='log',
1920
- scope='job',
1921
- pernode='optional',
1892
+ scope=Scope.JOB,
1893
+ pernode=PerNode.OPTIONAL,
1922
1894
  shorthelp="Task: file suffix for redirected stdout",
1923
1895
  switch="-tool_task_stdout_suffix 'tool task <str>'",
1924
1896
  example=["cli: -tool_task_stdout_suffix 'ghdl import log'",
@@ -1930,8 +1902,8 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1930
1902
  sctype='enum',
1931
1903
  enum=dest_enum,
1932
1904
  defvalue='log',
1933
- scope='job',
1934
- pernode='optional',
1905
+ scope=Scope.JOB,
1906
+ pernode=PerNode.OPTIONAL,
1935
1907
  shorthelp="Task: destination for stderr",
1936
1908
  switch="-tool_task_stderr_destination 'tool task <str>'",
1937
1909
  example=["cli: -tool_task_stderr_destination 'ghdl import log'",
@@ -1948,8 +1920,8 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1948
1920
  scparam(cfg, ['tool', tool, 'task', task, 'stderr', 'suffix'],
1949
1921
  sctype='str',
1950
1922
  defvalue='log',
1951
- scope='job',
1952
- pernode='optional',
1923
+ scope=Scope.JOB,
1924
+ pernode=PerNode.OPTIONAL,
1953
1925
  shorthelp="Task: file suffix for redirected stderr",
1954
1926
  switch="-tool_task_stderr_suffix 'tool task <str>'",
1955
1927
  example=["cli: -tool_task_stderr_suffix 'ghdl import log'",
@@ -1959,7 +1931,7 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1959
1931
 
1960
1932
  scparam(cfg, ['tool', tool, 'task', task, 'require'],
1961
1933
  sctype='[str]',
1962
- pernode='optional',
1934
+ pernode=PerNode.OPTIONAL,
1963
1935
  shorthelp="Task: parameter requirements",
1964
1936
  switch="-tool_task_require 'tool task <str>'",
1965
1937
  example=[
@@ -1973,20 +1945,20 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1973
1945
  metric = 'default'
1974
1946
  scparam(cfg, ['tool', tool, 'task', task, 'report', metric],
1975
1947
  sctype='[file]',
1976
- pernode='required',
1948
+ pernode=PerNode.REQUIRED,
1977
1949
  shorthelp="Task: metric report files",
1978
1950
  switch="-tool_task_report 'tool task metric <file>'",
1979
1951
  example=[
1980
1952
  "cli: -tool_task_report 'openroad place holdtns place 0 place.log'",
1981
1953
  "api: chip.set('tool', 'openroad', 'task', 'place', 'report', 'holdtns', "
1982
- "'place.log', step='place', index='0')"],
1954
+ "'place.log', step='place', index='0')"],
1983
1955
  schelp="""
1984
1956
  List of report files associated with a specific 'metric'. The file path
1985
1957
  specified is relative to the run directory of the current task.""")
1986
1958
 
1987
1959
  scparam(cfg, ['tool', tool, 'task', task, 'refdir'],
1988
1960
  sctype='[dir]',
1989
- pernode='optional',
1961
+ pernode=PerNode.OPTIONAL,
1990
1962
  shorthelp="Task: script directory",
1991
1963
  switch="-tool_task_refdir 'tool task <dir>'",
1992
1964
  example=[
@@ -1998,7 +1970,7 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1998
1970
 
1999
1971
  scparam(cfg, ['tool', tool, 'task', task, 'script'],
2000
1972
  sctype='[file]',
2001
- pernode='optional',
1973
+ pernode=PerNode.OPTIONAL,
2002
1974
  shorthelp="Task: entry script",
2003
1975
  switch="-tool_task_script 'tool task <file>'",
2004
1976
  example=[
@@ -2010,7 +1982,7 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
2010
1982
 
2011
1983
  scparam(cfg, ['tool', tool, 'task', task, 'prescript'],
2012
1984
  sctype='[file]',
2013
- pernode='optional',
1985
+ pernode=PerNode.OPTIONAL,
2014
1986
  copy=True,
2015
1987
  shorthelp="Task: pre-step script",
2016
1988
  switch="-tool_task_prescript 'tool task <file>'",
@@ -2026,7 +1998,7 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
2026
1998
 
2027
1999
  scparam(cfg, ['tool', tool, 'task', task, 'postscript'],
2028
2000
  sctype='[file]',
2029
- pernode='optional',
2001
+ pernode=PerNode.OPTIONAL,
2030
2002
  copy=True,
2031
2003
  shorthelp="Task: post-step script",
2032
2004
  switch="-tool_task_postscript 'tool task <file>'",
@@ -2042,7 +2014,7 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
2042
2014
 
2043
2015
  scparam(cfg, ['tool', tool, 'task', task, 'threads'],
2044
2016
  sctype='int',
2045
- pernode='optional',
2017
+ pernode=PerNode.OPTIONAL,
2046
2018
  shorthelp="Task: thread parallelism",
2047
2019
  switch="-tool_task_threads 'tool task <int>'",
2048
2020
  example=["cli: -tool_task_threads 'magic drc 64'",
@@ -2063,7 +2035,7 @@ def schema_arg(cfg):
2063
2035
 
2064
2036
  scparam(cfg, ['arg', 'step'],
2065
2037
  sctype='str',
2066
- scope='scratch',
2038
+ scope=Scope.SCRATCH,
2067
2039
  shorthelp="ARG: step argument",
2068
2040
  switch="-arg_step <str>",
2069
2041
  example=["cli: -arg_step 'route'",
@@ -2077,7 +2049,7 @@ def schema_arg(cfg):
2077
2049
 
2078
2050
  scparam(cfg, ['arg', 'index'],
2079
2051
  sctype='str',
2080
- scope='scratch',
2052
+ scope=Scope.SCRATCH,
2081
2053
  shorthelp="ARG: index argument",
2082
2054
  switch="-arg_index <str>",
2083
2055
  example=["cli: -arg_index 0",
@@ -2111,7 +2083,7 @@ def schema_metric(cfg, step='default', index='default'):
2111
2083
  example=[
2112
2084
  f"cli: -metric_{item} 'dfm 0 0'",
2113
2085
  f"api: chip.set('metric', '{item}', 0, step='dfm', index=0)"],
2114
- pernode='required',
2086
+ pernode=PerNode.REQUIRED,
2115
2087
  schelp=f"""Metric tracking the total number of {val} on a
2116
2088
  per step and index basis.""")
2117
2089
 
@@ -2123,7 +2095,7 @@ def schema_metric(cfg, step='default', index='default'):
2123
2095
  example=[
2124
2096
  "cli: -metric_coverage 'place 0 99.9'",
2125
2097
  "api: chip.set('metric', 'coverage', 99.9, step='place', index=0)"],
2126
- pernode='required',
2098
+ pernode=PerNode.REQUIRED,
2127
2099
  schelp="""
2128
2100
  Metric tracking the test coverage in the design expressed as a percentage
2129
2101
  with 100 meaning full coverage. The meaning of the metric depends on the
@@ -2138,7 +2110,7 @@ def schema_metric(cfg, step='default', index='default'):
2138
2110
  example=[
2139
2111
  "cli: -metric_security 'place 0 100'",
2140
2112
  "api: chip.set('metric', 'security', 100, step='place', index=0)"],
2141
- pernode='required',
2113
+ pernode=PerNode.REQUIRED,
2142
2114
  schelp="""
2143
2115
  Metric tracking the level of security (1/vulnerability) of the design.
2144
2116
  A completely secure design would have a score of 100. There is no
@@ -2158,7 +2130,7 @@ def schema_metric(cfg, step='default', index='default'):
2158
2130
  example=[
2159
2131
  f"cli: -metric_{item} 'place 0 100'",
2160
2132
  f"api: chip.set('metric', '{item}', 100, step='place', index=0)"],
2161
- pernode='required',
2133
+ pernode=PerNode.REQUIRED,
2162
2134
  schelp=f"""
2163
2135
  Metric tracking the total {val} used by the design as reported
2164
2136
  by the implementation tool. There is no standardized definition
@@ -2181,7 +2153,7 @@ def schema_metric(cfg, step='default', index='default'):
2181
2153
  example=[
2182
2154
  f"cli: -metric_{item} 'place 0 100.00'",
2183
2155
  f"api: chip.set('metric', '{item}', 100.00, step='place', index=0)"],
2184
- pernode='required',
2156
+ pernode=PerNode.REQUIRED,
2185
2157
  schelp=f"""
2186
2158
  Metric tracking the total {val} occupied by the design.""")
2187
2159
 
@@ -2193,7 +2165,7 @@ def schema_metric(cfg, step='default', index='default'):
2193
2165
  example=[
2194
2166
  "cli: -metric_utilization 'place 0 50.00'",
2195
2167
  "api: chip.set('metric', 'utilization', 50.00, step='place', index=0)"],
2196
- pernode='required',
2168
+ pernode=PerNode.REQUIRED,
2197
2169
  schelp="""
2198
2170
  Metric tracking the area utilization of the design calculated as
2199
2171
  100 * (cellarea/totalarea).""")
@@ -2205,7 +2177,7 @@ def schema_metric(cfg, step='default', index='default'):
2205
2177
  example=[
2206
2178
  "cli: -metric_logicdepth 'place 0 8'",
2207
2179
  "api: chip.set('metric', 'logicdepth', 8, step='place', index=0)"],
2208
- pernode='required',
2180
+ pernode=PerNode.REQUIRED,
2209
2181
  schelp="""
2210
2182
  Metric tracking the logic depth of the design. This is determined
2211
2183
  by the number of logic gates between the start of the critital timing
@@ -2225,7 +2197,7 @@ def schema_metric(cfg, step='default', index='default'):
2225
2197
  example=[
2226
2198
  f"cli: -metric_{item} 'place 0 0.01'",
2227
2199
  f"api: chip.set('metric', '{item}', 0.01, step='place', index=0)"],
2228
- pernode='required',
2200
+ pernode=PerNode.REQUIRED,
2229
2201
  schelp=f"""
2230
2202
  Metric tracking the {val} of the design specified on a per step
2231
2203
  and index basis. Power metric depend heavily on the method
@@ -2243,7 +2215,7 @@ def schema_metric(cfg, step='default', index='default'):
2243
2215
  example=[
2244
2216
  "cli: -metric_irdrop 'place 0 0.05'",
2245
2217
  "api: chip.set('metric', 'irdrop', 0.05, step='place', index=0)"],
2246
- pernode='required',
2218
+ pernode=PerNode.REQUIRED,
2247
2219
  schelp="""
2248
2220
  Metric tracking the peak IR drop in the design based on extracted
2249
2221
  power and ground rail parasitics, library power models, and
@@ -2262,7 +2234,7 @@ def schema_metric(cfg, step='default', index='default'):
2262
2234
  example=[
2263
2235
  f"cli: -metric_{item} 'place 0 10'",
2264
2236
  f"api: chip.set('metric', '{item}', 10, step='place', index=0)"],
2265
- pernode='required',
2237
+ pernode=PerNode.REQUIRED,
2266
2238
  schelp=f"""
2267
2239
  Metric tracking the total number of timing paths violating {val}
2268
2240
  constraints.""")
@@ -2285,7 +2257,7 @@ def schema_metric(cfg, step='default', index='default'):
2285
2257
  example=[
2286
2258
  f"cli: -metric_{item} 'place 0 0.01'",
2287
2259
  f"api: chip.set('metric', '{item}', 0.01, step='place', index=0)"],
2288
- pernode='required',
2260
+ pernode=PerNode.REQUIRED,
2289
2261
  schelp=f"""
2290
2262
  Metric tracking the {val} on a per step and index basis.""")
2291
2263
 
@@ -2300,7 +2272,7 @@ def schema_metric(cfg, step='default', index='default'):
2300
2272
  example=[
2301
2273
  f"cli: -metric_{item} 'place 0 100e6'",
2302
2274
  f"api: chip.set('metric', '{item}', 100e6, step='place', index=0)"],
2303
- pernode='required',
2275
+ pernode=PerNode.REQUIRED,
2304
2276
  schelp=f"""
2305
2277
  Metric tracking the {val} on a per step and index basis.""")
2306
2278
 
@@ -2322,7 +2294,7 @@ def schema_metric(cfg, step='default', index='default'):
2322
2294
  example=[
2323
2295
  f"cli: -metric_{item} 'place 0 100'",
2324
2296
  f"api: chip.set('metric', '{item}', 50, step='place', index=0)"],
2325
- pernode='required',
2297
+ pernode=PerNode.REQUIRED,
2326
2298
  schelp=f"""
2327
2299
  Metric tracking the total number of {val} in the design
2328
2300
  on a per step and index basis.""")
@@ -2336,7 +2308,7 @@ def schema_metric(cfg, step='default', index='default'):
2336
2308
  example=[
2337
2309
  f"cli: -metric_{item} 'place 0 100.0'",
2338
2310
  f"api: chip.set('metric', '{item}', 50.0, step='place', index=0)"],
2339
- pernode='required',
2311
+ pernode=PerNode.REQUIRED,
2340
2312
  schelp=f"""
2341
2313
  Metric tracking the total {item} of the design on a per step
2342
2314
  and index basis.""")
@@ -2349,7 +2321,7 @@ def schema_metric(cfg, step='default', index='default'):
2349
2321
  example=[
2350
2322
  f"cli: -metric_{item} 'place 0 0'",
2351
2323
  f"api: chip.set('metric', '{item}', 50, step='place', index=0)"],
2352
- pernode='required',
2324
+ pernode=PerNode.REQUIRED,
2353
2325
  schelp="""
2354
2326
  Metric tracking the total number of overflow tracks for the routing
2355
2327
  on per step and index basis. Any non-zero number suggests an over
@@ -2361,13 +2333,13 @@ def schema_metric(cfg, step='default', index='default'):
2361
2333
  scparam(cfg, ['metric', item],
2362
2334
  sctype='float',
2363
2335
  unit='B',
2364
- scope='job',
2336
+ scope=Scope.JOB,
2365
2337
  shorthelp=f"Metric: {item}",
2366
2338
  switch=f"-metric_{item} 'step index <float>'",
2367
2339
  example=[
2368
2340
  f"cli: -metric_{item} 'dfm 0 10e9'",
2369
2341
  f"api: chip.set('metric', '{item}', 10e9, step='dfm', index=0)"],
2370
- pernode='required',
2342
+ pernode=PerNode.REQUIRED,
2371
2343
  schelp="""
2372
2344
  Metric tracking total peak program memory footprint on a per
2373
2345
  step and index basis.""")
@@ -2381,7 +2353,7 @@ def schema_metric(cfg, step='default', index='default'):
2381
2353
  example=[
2382
2354
  f"cli: -metric_{item} 'dfm 0 10.0'",
2383
2355
  f"api: chip.set('metric', '{item}', 10.0, step='dfm', index=0)"],
2384
- pernode='required',
2356
+ pernode=PerNode.REQUIRED,
2385
2357
  schelp="""
2386
2358
  Metric tracking time spent by the EDA executable :keypath:`tool,<tool>,exe` on a
2387
2359
  per step and index basis. It does not include the SiliconCompiler
@@ -2397,7 +2369,7 @@ def schema_metric(cfg, step='default', index='default'):
2397
2369
  example=[
2398
2370
  f"cli: -metric_{item} 'dfm 0 10.0'",
2399
2371
  f"api: chip.set('metric', '{item}', 10.0, step='dfm', index=0)"],
2400
- pernode='required',
2372
+ pernode=PerNode.REQUIRED,
2401
2373
  schelp="""
2402
2374
  Metric tracking the total amount of time spent on a task from
2403
2375
  beginning to end, including data transfers and pre/post
@@ -2412,7 +2384,7 @@ def schema_metric(cfg, step='default', index='default'):
2412
2384
  example=[
2413
2385
  f"cli: -metric_{item} 'dfm 0 10.0'",
2414
2386
  f"api: chip.set('metric', '{item}', 10.0, step='dfm', index=0)"],
2415
- pernode='required',
2387
+ pernode=PerNode.REQUIRED,
2416
2388
  schelp="""
2417
2389
  Metric tracking the total amount of time spent from the beginning
2418
2390
  of the run up to and including the current step and index.""")
@@ -2505,7 +2477,7 @@ def schema_record(cfg, step='default', index='default'):
2505
2477
  example=[
2506
2478
  f"cli: -record_{item} 'dfm 0 {val[1]}'",
2507
2479
  f"api: chip.set('record', '{item}', '{val[1]}', step='dfm', index=0)"],
2508
- pernode='required',
2480
+ pernode=PerNode.REQUIRED,
2509
2481
  schelp=f'Record tracking the {val[0]} per step and index basis. {helpext}')
2510
2482
 
2511
2483
  scparam(cfg, ['record', 'toolexitcode'],
@@ -2515,7 +2487,7 @@ def schema_record(cfg, step='default', index='default'):
2515
2487
  example=[
2516
2488
  "cli: -record_toolexitcode 'dfm 0 0'",
2517
2489
  "api: chip.set('record', 'toolexitcode', 0, step='dfm', index=0)"],
2518
- pernode='required',
2490
+ pernode=PerNode.REQUIRED,
2519
2491
  schelp='Record tracking the tool exit code per step and index basis.')
2520
2492
 
2521
2493
  # Non-per-node records.
@@ -2540,7 +2512,7 @@ def schema_record(cfg, step='default', index='default'):
2540
2512
  # flowgraph status
2541
2513
  scparam(cfg, ['record', 'status'],
2542
2514
  sctype='enum',
2543
- pernode='required',
2515
+ pernode=PerNode.REQUIRED,
2544
2516
  enum=[ # keep in sync with NodeStatus
2545
2517
  "pending",
2546
2518
  "queued",
@@ -2559,7 +2531,7 @@ def schema_record(cfg, step='default', index='default'):
2559
2531
  # flowgraph select
2560
2532
  scparam(cfg, ['record', 'inputnode'],
2561
2533
  sctype='[(str,str)]',
2562
- pernode='required',
2534
+ pernode=PerNode.REQUIRED,
2563
2535
  shorthelp="Record: node inputs",
2564
2536
  switch="-record_inputnode 'step index <(str,str)>'",
2565
2537
  example=[
@@ -2581,7 +2553,7 @@ def schema_option(cfg):
2581
2553
 
2582
2554
  scparam(cfg, ['option', 'remote'],
2583
2555
  sctype='bool',
2584
- scope='job',
2556
+ scope=Scope.JOB,
2585
2557
  shorthelp="Option: enable remote processing",
2586
2558
  switch="-remote <bool>",
2587
2559
  example=[
@@ -2595,7 +2567,7 @@ def schema_option(cfg):
2595
2567
 
2596
2568
  scparam(cfg, ['option', 'credentials'],
2597
2569
  sctype='file',
2598
- scope='job',
2570
+ scope=Scope.JOB,
2599
2571
  shorthelp="Option: user credentials file",
2600
2572
  switch="-credentials <file>",
2601
2573
  example=[
@@ -2617,7 +2589,7 @@ def schema_option(cfg):
2617
2589
 
2618
2590
  scparam(cfg, ['option', 'cachedir'],
2619
2591
  sctype='file',
2620
- scope='job',
2592
+ scope=Scope.JOB,
2621
2593
  shorthelp="Option: user cache directory",
2622
2594
  switch="-cachedir <file>",
2623
2595
  example=[
@@ -2630,8 +2602,8 @@ def schema_option(cfg):
2630
2602
 
2631
2603
  scparam(cfg, ['option', 'nice'],
2632
2604
  sctype='int',
2633
- scope='job',
2634
- pernode='optional',
2605
+ scope=Scope.JOB,
2606
+ pernode=PerNode.OPTIONAL,
2635
2607
  shorthelp="Option: tool scheduling priority",
2636
2608
  switch="-nice <int>",
2637
2609
  example=[
@@ -2645,7 +2617,7 @@ def schema_option(cfg):
2645
2617
  # Compilation
2646
2618
  scparam(cfg, ['option', 'pdk'],
2647
2619
  sctype='str',
2648
- scope='job',
2620
+ scope=Scope.JOB,
2649
2621
  shorthelp="Option: PDK target",
2650
2622
  switch="-pdk <str>",
2651
2623
  example=["cli: -pdk freepdk45",
@@ -2655,7 +2627,7 @@ def schema_option(cfg):
2655
2627
 
2656
2628
  scparam(cfg, ['option', 'stackup'],
2657
2629
  sctype='str',
2658
- scope='job',
2630
+ scope=Scope.JOB,
2659
2631
  shorthelp="Option: stackup target",
2660
2632
  switch="-stackup <str>",
2661
2633
  example=["cli: -stackup 2MA4MB2MC",
@@ -2666,7 +2638,7 @@ def schema_option(cfg):
2666
2638
 
2667
2639
  scparam(cfg, ['option', 'flow'],
2668
2640
  sctype='str',
2669
- scope='job',
2641
+ scope=Scope.JOB,
2670
2642
  shorthelp="Option: flow target",
2671
2643
  switch="-flow <str>",
2672
2644
  example=["cli: -flow asicflow",
@@ -2677,8 +2649,8 @@ def schema_option(cfg):
2677
2649
 
2678
2650
  scparam(cfg, ['option', 'optmode'],
2679
2651
  sctype='str',
2680
- pernode='optional',
2681
- scope='job',
2652
+ pernode=PerNode.OPTIONAL,
2653
+ scope=Scope.JOB,
2682
2654
  defvalue='O0',
2683
2655
  shorthelp="Option: optimization mode",
2684
2656
  switch=["-O<str>",
@@ -2700,7 +2672,7 @@ def schema_option(cfg):
2700
2672
 
2701
2673
  scparam(cfg, ['option', 'cfg'],
2702
2674
  sctype='[file]',
2703
- scope='job',
2675
+ scope=Scope.JOB,
2704
2676
  shorthelp="Option: configuration manifest",
2705
2677
  switch="-cfg <file>",
2706
2678
  example=["cli: -cfg mypdk.json",
@@ -2715,7 +2687,7 @@ def schema_option(cfg):
2715
2687
  key = 'default'
2716
2688
  scparam(cfg, ['option', 'env', key],
2717
2689
  sctype='str',
2718
- scope='job',
2690
+ scope=Scope.JOB,
2719
2691
  shorthelp="Option: environment variables",
2720
2692
  switch="-env 'key <str>'",
2721
2693
  example=[
@@ -2728,7 +2700,7 @@ def schema_option(cfg):
2728
2700
 
2729
2701
  scparam(cfg, ['option', 'var', key],
2730
2702
  sctype='[str]',
2731
- scope='job',
2703
+ scope=Scope.JOB,
2732
2704
  shorthelp="Option: custom variables",
2733
2705
  switch="-var 'key <str>'",
2734
2706
  example=[
@@ -2742,7 +2714,7 @@ def schema_option(cfg):
2742
2714
 
2743
2715
  scparam(cfg, ['option', 'file', key],
2744
2716
  sctype='[file]',
2745
- scope='job',
2717
+ scope=Scope.JOB,
2746
2718
  copy=True,
2747
2719
  shorthelp="Option: custom files",
2748
2720
  switch="-file 'key <file>'",
@@ -2757,7 +2729,7 @@ def schema_option(cfg):
2757
2729
 
2758
2730
  scparam(cfg, ['option', 'dir', key],
2759
2731
  sctype='[dir]',
2760
- scope='job',
2732
+ scope=Scope.JOB,
2761
2733
  copy=True,
2762
2734
  shorthelp="Option: custom directories",
2763
2735
  switch="-dir 'key <dir>'",
@@ -2773,8 +2745,8 @@ def schema_option(cfg):
2773
2745
  scparam(cfg, ['option', 'loglevel'],
2774
2746
  sctype='enum',
2775
2747
  enum=["info", "warning", "error", "critical", "debug", "quiet"],
2776
- pernode='optional',
2777
- scope='job',
2748
+ pernode=PerNode.OPTIONAL,
2749
+ scope=Scope.JOB,
2778
2750
  defvalue='info',
2779
2751
  shorthelp="Option: logging level",
2780
2752
  switch="-loglevel <str>",
@@ -2786,7 +2758,7 @@ def schema_option(cfg):
2786
2758
 
2787
2759
  scparam(cfg, ['option', 'builddir'],
2788
2760
  sctype='dir',
2789
- scope='job',
2761
+ scope=Scope.JOB,
2790
2762
  defvalue='build',
2791
2763
  shorthelp="Option: build directory",
2792
2764
  switch="-builddir <dir>",
@@ -2800,7 +2772,7 @@ def schema_option(cfg):
2800
2772
 
2801
2773
  scparam(cfg, ['option', 'jobname'],
2802
2774
  sctype='str',
2803
- scope='job',
2775
+ scope=Scope.JOB,
2804
2776
  defvalue='job0',
2805
2777
  shorthelp="Option: job name",
2806
2778
  switch="-jobname <str>",
@@ -2815,7 +2787,7 @@ def schema_option(cfg):
2815
2787
 
2816
2788
  scparam(cfg, ['option', 'from'],
2817
2789
  sctype='[str]',
2818
- scope='job',
2790
+ scope=Scope.JOB,
2819
2791
  shorthelp="Option: starting step",
2820
2792
  switch="-from <str>",
2821
2793
  example=[
@@ -2827,7 +2799,7 @@ def schema_option(cfg):
2827
2799
 
2828
2800
  scparam(cfg, ['option', 'to'],
2829
2801
  sctype='[str]',
2830
- scope='job',
2802
+ scope=Scope.JOB,
2831
2803
  shorthelp="Option: ending step",
2832
2804
  switch="-to <str>",
2833
2805
  example=[
@@ -2839,7 +2811,7 @@ def schema_option(cfg):
2839
2811
 
2840
2812
  scparam(cfg, ['option', 'prune'],
2841
2813
  sctype='[(str,str)]',
2842
- scope='job',
2814
+ scope=Scope.JOB,
2843
2815
  shorthelp="Option: flowgraph pruning",
2844
2816
  switch="-prune 'node <(str,str)>'",
2845
2817
  example=[
@@ -2851,8 +2823,8 @@ def schema_option(cfg):
2851
2823
 
2852
2824
  scparam(cfg, ['option', 'breakpoint'],
2853
2825
  sctype='bool',
2854
- scope='job',
2855
- pernode='optional',
2826
+ scope=Scope.JOB,
2827
+ pernode=PerNode.OPTIONAL,
2856
2828
  shorthelp="Option: breakpoint list",
2857
2829
  switch="-breakpoint <bool>",
2858
2830
  example=[
@@ -2866,8 +2838,8 @@ def schema_option(cfg):
2866
2838
 
2867
2839
  scparam(cfg, ['option', 'library'],
2868
2840
  sctype='[str]',
2869
- scope='job',
2870
- pernode='optional',
2841
+ scope=Scope.JOB,
2842
+ pernode=PerNode.OPTIONAL,
2871
2843
  shorthelp="Option: library list",
2872
2844
  switch="-library <str>",
2873
2845
  example=["cli: -library lambdalib_asap7",
@@ -2878,7 +2850,7 @@ def schema_option(cfg):
2878
2850
  # Booleans
2879
2851
  scparam(cfg, ['option', 'clean'],
2880
2852
  sctype='bool',
2881
- scope='job',
2853
+ scope=Scope.JOB,
2882
2854
  shorthelp="Option: cleanup previous job",
2883
2855
  switch="-clean <bool>",
2884
2856
  example=["cli: -clean",
@@ -2891,7 +2863,7 @@ def schema_option(cfg):
2891
2863
 
2892
2864
  scparam(cfg, ['option', 'hash'],
2893
2865
  sctype='bool',
2894
- scope='job',
2866
+ scope=Scope.JOB,
2895
2867
  shorthelp="Option: file hashing",
2896
2868
  switch="-hash <bool>",
2897
2869
  example=["cli: -hash",
@@ -2903,7 +2875,7 @@ def schema_option(cfg):
2903
2875
 
2904
2876
  scparam(cfg, ['option', 'nodisplay'],
2905
2877
  sctype='bool',
2906
- scope='job',
2878
+ scope=Scope.JOB,
2907
2879
  shorthelp="Option: headless execution",
2908
2880
  switch="-nodisplay <bool>",
2909
2881
  example=["cli: -nodisplay",
@@ -2914,8 +2886,8 @@ def schema_option(cfg):
2914
2886
 
2915
2887
  scparam(cfg, ['option', 'quiet'],
2916
2888
  sctype='bool',
2917
- pernode='optional',
2918
- scope='job',
2889
+ pernode=PerNode.OPTIONAL,
2890
+ scope=Scope.JOB,
2919
2891
  shorthelp="Option: quiet execution",
2920
2892
  switch="-quiet <bool>",
2921
2893
  example=["cli: -quiet",
@@ -2927,7 +2899,7 @@ def schema_option(cfg):
2927
2899
 
2928
2900
  scparam(cfg, ['option', 'jobincr'],
2929
2901
  sctype='bool',
2930
- scope='job',
2902
+ scope=Scope.JOB,
2931
2903
  shorthelp="Option: autoincrement jobname",
2932
2904
  switch="-jobincr <bool>",
2933
2905
  example=["cli: -jobincr",
@@ -2941,9 +2913,9 @@ def schema_option(cfg):
2941
2913
 
2942
2914
  scparam(cfg, ['option', 'novercheck'],
2943
2915
  sctype='bool',
2944
- pernode='optional',
2916
+ pernode=PerNode.OPTIONAL,
2945
2917
  defvalue=False,
2946
- scope='job',
2918
+ scope=Scope.JOB,
2947
2919
  shorthelp="Option: disable version checking",
2948
2920
  switch="-novercheck <bool>",
2949
2921
  example=["cli: -novercheck",
@@ -2955,8 +2927,8 @@ def schema_option(cfg):
2955
2927
 
2956
2928
  scparam(cfg, ['option', 'track'],
2957
2929
  sctype='bool',
2958
- pernode='optional',
2959
- scope='job',
2930
+ pernode=PerNode.OPTIONAL,
2931
+ scope=Scope.JOB,
2960
2932
  shorthelp="Option: enable provenance tracking",
2961
2933
  switch="-track <bool>",
2962
2934
  example=["cli: -track",
@@ -2970,7 +2942,7 @@ def schema_option(cfg):
2970
2942
 
2971
2943
  scparam(cfg, ['option', 'entrypoint'],
2972
2944
  sctype='str',
2973
- pernode='optional',
2945
+ pernode=PerNode.OPTIONAL,
2974
2946
  shorthelp="Option: program entry point",
2975
2947
  switch="-entrypoint <str>",
2976
2948
  example=["cli: -entrypoint top",
@@ -3064,7 +3036,7 @@ def schema_option(cfg):
3064
3036
 
3065
3037
  scparam(cfg, ['option', 'continue'],
3066
3038
  sctype='bool',
3067
- pernode='optional',
3039
+ pernode=PerNode.OPTIONAL,
3068
3040
  shorthelp='Option: continue-on-error',
3069
3041
  switch='-continue <bool>',
3070
3042
  example=["cli: -continue",
@@ -3079,8 +3051,8 @@ def schema_option(cfg):
3079
3051
 
3080
3052
  scparam(cfg, ['option', 'timeout'],
3081
3053
  sctype='float',
3082
- pernode='optional',
3083
- scope='job',
3054
+ pernode=PerNode.OPTIONAL,
3055
+ scope=Scope.JOB,
3084
3056
  unit='s',
3085
3057
  shorthelp="Option: timeout value",
3086
3058
  switch="-timeout <float>",
@@ -3107,8 +3079,8 @@ def schema_option(cfg):
3107
3079
  scparam(cfg, ['option', 'scheduler', 'name'],
3108
3080
  sctype='enum',
3109
3081
  enum=["slurm", "lsf", "sge", "docker"],
3110
- scope='job',
3111
- pernode='optional',
3082
+ scope=Scope.JOB,
3083
+ pernode=PerNode.OPTIONAL,
3112
3084
  shorthelp="Option: scheduler platform",
3113
3085
  switch="-scheduler <str>",
3114
3086
  example=[
@@ -3119,14 +3091,14 @@ def schema_option(cfg):
3119
3091
  flowgraph steps. If the parameter is undefined, the steps are executed
3120
3092
  on the same machine that the SC was launched on. If 'slurm' is used,
3121
3093
  the host running the 'sc' command must be running a 'slurmctld' daemon
3122
- managing a Slurm cluster. Additionally, the build directory ('-dir')
3123
- must be located in shared storage which can be accessed by all hosts
3124
- in the cluster.""")
3094
+ managing a Slurm cluster. Additionally, the build directory
3095
+ (:keypath:`option,builddir`) must be located in shared storage which
3096
+ can be accessed by all hosts in the cluster.""")
3125
3097
 
3126
3098
  scparam(cfg, ['option', 'scheduler', 'cores'],
3127
3099
  sctype='int',
3128
- scope='job',
3129
- pernode='optional',
3100
+ scope=Scope.JOB,
3101
+ pernode=PerNode.OPTIONAL,
3130
3102
  shorthelp="Option: Scheduler core constraint",
3131
3103
  switch="-cores <int>",
3132
3104
  example=["cli: -cores 48",
@@ -3140,8 +3112,8 @@ def schema_option(cfg):
3140
3112
  scparam(cfg, ['option', 'scheduler', 'memory'],
3141
3113
  sctype='int',
3142
3114
  unit='MB',
3143
- scope='job',
3144
- pernode='optional',
3115
+ scope=Scope.JOB,
3116
+ pernode=PerNode.OPTIONAL,
3145
3117
  shorthelp="Option: scheduler memory constraint",
3146
3118
  switch="-memory <int>",
3147
3119
  example=["cli: -memory 8000",
@@ -3154,8 +3126,8 @@ def schema_option(cfg):
3154
3126
 
3155
3127
  scparam(cfg, ['option', 'scheduler', 'queue'],
3156
3128
  sctype='str',
3157
- scope='job',
3158
- pernode='optional',
3129
+ scope=Scope.JOB,
3130
+ pernode=PerNode.OPTIONAL,
3159
3131
  shorthelp="Option: scheduler queue",
3160
3132
  switch="-queue <str>",
3161
3133
  example=["cli: -queue nightrun",
@@ -3168,8 +3140,8 @@ def schema_option(cfg):
3168
3140
 
3169
3141
  scparam(cfg, ['option', 'scheduler', 'defer'],
3170
3142
  sctype='str',
3171
- scope='job',
3172
- pernode='optional',
3143
+ scope=Scope.JOB,
3144
+ pernode=PerNode.OPTIONAL,
3173
3145
  shorthelp="Option: scheduler start time",
3174
3146
  switch="-defer <str>",
3175
3147
  example=["cli: -defer 16:00",
@@ -3184,7 +3156,7 @@ def schema_option(cfg):
3184
3156
 
3185
3157
  scparam(cfg, ['option', 'scheduler', 'options'],
3186
3158
  sctype='[str]',
3187
- pernode='optional',
3159
+ pernode=PerNode.OPTIONAL,
3188
3160
  shorthelp="Option: scheduler arguments",
3189
3161
  switch="-scheduler_options <str>",
3190
3162
  example=[
@@ -3199,8 +3171,8 @@ def schema_option(cfg):
3199
3171
  scparam(cfg, ['option', 'scheduler', 'msgevent'],
3200
3172
  sctype='[enum]',
3201
3173
  enum=['all', 'summary', 'begin', 'end', 'timeout', 'fail'],
3202
- scope='job',
3203
- pernode='optional',
3174
+ scope=Scope.JOB,
3175
+ pernode=PerNode.OPTIONAL,
3204
3176
  shorthelp="Option: message event trigger",
3205
3177
  switch="-msgevent <str>",
3206
3178
  example=[
@@ -3221,8 +3193,8 @@ def schema_option(cfg):
3221
3193
 
3222
3194
  scparam(cfg, ['option', 'scheduler', 'msgcontact'],
3223
3195
  sctype='[str]',
3224
- scope='job',
3225
- pernode='optional',
3196
+ scope=Scope.JOB,
3197
+ pernode=PerNode.OPTIONAL,
3226
3198
  shorthelp="Option: message contact",
3227
3199
  switch="-msgcontact <str>",
3228
3200
  example=[
@@ -3255,7 +3227,7 @@ def schema_package(cfg):
3255
3227
 
3256
3228
  scparam(cfg, ['package', 'version'],
3257
3229
  sctype='str',
3258
- scope='global',
3230
+ scope=Scope.GLOBAL,
3259
3231
  shorthelp="Package: version",
3260
3232
  switch="-package_version <str>",
3261
3233
  example=[
@@ -3266,7 +3238,7 @@ def schema_package(cfg):
3266
3238
 
3267
3239
  scparam(cfg, ['package', 'description'],
3268
3240
  sctype='str',
3269
- scope='global',
3241
+ scope=Scope.GLOBAL,
3270
3242
  shorthelp="Package: description",
3271
3243
  switch="-package_description <str>",
3272
3244
  example=[
@@ -3277,7 +3249,7 @@ def schema_package(cfg):
3277
3249
 
3278
3250
  scparam(cfg, ['package', 'keyword'],
3279
3251
  sctype='str',
3280
- scope='global',
3252
+ scope=Scope.GLOBAL,
3281
3253
  shorthelp="Package: keyword",
3282
3254
  switch="-package_keyword <str>",
3283
3255
  example=[
@@ -3286,7 +3258,7 @@ def schema_package(cfg):
3286
3258
  schelp="""Package keyword(s) used to characterize package.""")
3287
3259
  scparam(cfg, ['package', 'doc', 'homepage'],
3288
3260
  sctype='str',
3289
- scope='global',
3261
+ scope=Scope.GLOBAL,
3290
3262
  shorthelp="Package: documentation homepage",
3291
3263
  switch="-package_doc_homepage <str>",
3292
3264
  example=[
@@ -3310,7 +3282,7 @@ def schema_package(cfg):
3310
3282
  for item in doctypes:
3311
3283
  scparam(cfg, ['package', 'doc', item],
3312
3284
  sctype='[file]',
3313
- scope='global',
3285
+ scope=Scope.GLOBAL,
3314
3286
  shorthelp=f"Package: {item} document",
3315
3287
  switch=f"-package_doc_{item} <file>",
3316
3288
  example=[
@@ -3320,7 +3292,7 @@ def schema_package(cfg):
3320
3292
 
3321
3293
  scparam(cfg, ['package', 'license'],
3322
3294
  sctype='[str]',
3323
- scope='global',
3295
+ scope=Scope.GLOBAL,
3324
3296
  shorthelp="Package: license identifiers",
3325
3297
  switch="-package_license <str>",
3326
3298
  example=[
@@ -3330,7 +3302,7 @@ def schema_package(cfg):
3330
3302
 
3331
3303
  scparam(cfg, ['package', 'licensefile'],
3332
3304
  sctype='[file]',
3333
- scope='global',
3305
+ scope=Scope.GLOBAL,
3334
3306
  shorthelp="Package: license files",
3335
3307
  switch="-package_licensefile <file>",
3336
3308
  example=[
@@ -3342,7 +3314,7 @@ def schema_package(cfg):
3342
3314
 
3343
3315
  scparam(cfg, ['package', 'organization'],
3344
3316
  sctype='[str]',
3345
- scope='global',
3317
+ scope=Scope.GLOBAL,
3346
3318
  shorthelp="Package: sponsoring organization",
3347
3319
  switch="-package_organization <str>",
3348
3320
  example=[
@@ -3361,7 +3333,7 @@ def schema_package(cfg):
3361
3333
  for item in record:
3362
3334
  scparam(cfg, ['package', 'author', userid, item],
3363
3335
  sctype='str',
3364
- scope='global',
3336
+ scope=Scope.GLOBAL,
3365
3337
  shorthelp=f"Package: author {item}",
3366
3338
  switch=f"-package_author_{item} 'userid <str>'",
3367
3339
  example=[
@@ -3374,7 +3346,7 @@ def schema_package(cfg):
3374
3346
 
3375
3347
  scparam(cfg, ['package', 'source', source, 'path'],
3376
3348
  sctype='str',
3377
- scope='global',
3349
+ scope=Scope.GLOBAL,
3378
3350
  shorthelp="Package: data source path",
3379
3351
  switch="-package_source_path 'source <str>'",
3380
3352
  example=[
@@ -3398,7 +3370,7 @@ def schema_package(cfg):
3398
3370
 
3399
3371
  scparam(cfg, ['package', 'source', source, 'ref'],
3400
3372
  sctype='str',
3401
- scope='global',
3373
+ scope=Scope.GLOBAL,
3402
3374
  shorthelp="Package: data source reference",
3403
3375
  switch="-package_source_ref 'source <str>'",
3404
3376
  example=[
@@ -3420,7 +3392,7 @@ def schema_checklist(cfg):
3420
3392
 
3421
3393
  scparam(cfg, ['checklist', standard, item, 'description'],
3422
3394
  sctype='str',
3423
- scope='global',
3395
+ scope=Scope.GLOBAL,
3424
3396
  shorthelp="Checklist: item description",
3425
3397
  switch="-checklist_description 'standard item <str>'",
3426
3398
  example=[
@@ -3431,7 +3403,7 @@ def schema_checklist(cfg):
3431
3403
 
3432
3404
  scparam(cfg, ['checklist', standard, item, 'requirement'],
3433
3405
  sctype='str',
3434
- scope='global',
3406
+ scope=Scope.GLOBAL,
3435
3407
  shorthelp="Checklist: item requirement",
3436
3408
  switch="-checklist_requirement 'standard item <str>'",
3437
3409
  example=[
@@ -3443,7 +3415,7 @@ def schema_checklist(cfg):
3443
3415
 
3444
3416
  scparam(cfg, ['checklist', standard, item, 'dataformat'],
3445
3417
  sctype='str',
3446
- scope='global',
3418
+ scope=Scope.GLOBAL,
3447
3419
  shorthelp="Checklist: item data format",
3448
3420
  switch="-checklist_dataformat 'standard item <str>'",
3449
3421
  example=[
@@ -3455,7 +3427,7 @@ def schema_checklist(cfg):
3455
3427
 
3456
3428
  scparam(cfg, ['checklist', standard, item, 'rationale'],
3457
3429
  sctype='[str]',
3458
- scope='global',
3430
+ scope=Scope.GLOBAL,
3459
3431
  shorthelp="Checklist: item rational",
3460
3432
  switch="-checklist_rationale 'standard item <str>'",
3461
3433
  example=[
@@ -3468,7 +3440,7 @@ def schema_checklist(cfg):
3468
3440
 
3469
3441
  scparam(cfg, ['checklist', standard, item, 'criteria'],
3470
3442
  sctype='[str]',
3471
- scope='global',
3443
+ scope=Scope.GLOBAL,
3472
3444
  shorthelp="Checklist: item criteria",
3473
3445
  switch="-checklist_criteria 'standard item <str>'",
3474
3446
  example=[
@@ -3482,7 +3454,7 @@ def schema_checklist(cfg):
3482
3454
 
3483
3455
  scparam(cfg, ['checklist', standard, item, 'task'],
3484
3456
  sctype='[(str,str,str)]',
3485
- scope='global',
3457
+ scope=Scope.GLOBAL,
3486
3458
  shorthelp="Checklist: item task",
3487
3459
  switch="-checklist_task 'standard item <(str,str,str)>'",
3488
3460
  example=[
@@ -3495,7 +3467,7 @@ def schema_checklist(cfg):
3495
3467
 
3496
3468
  scparam(cfg, ['checklist', standard, item, 'report'],
3497
3469
  sctype='[file]',
3498
- scope='global',
3470
+ scope=Scope.GLOBAL,
3499
3471
  shorthelp="Checklist: item report",
3500
3472
  switch="-checklist_report 'standard item <file>'",
3501
3473
  example=[
@@ -3507,7 +3479,7 @@ def schema_checklist(cfg):
3507
3479
 
3508
3480
  scparam(cfg, ['checklist', standard, item, 'waiver', metric],
3509
3481
  sctype='[file]',
3510
- scope='global',
3482
+ scope=Scope.GLOBAL,
3511
3483
  shorthelp="Checklist: item metric waivers",
3512
3484
  switch="-checklist_waiver 'standard item metric <file>'",
3513
3485
  example=[
@@ -3519,7 +3491,7 @@ def schema_checklist(cfg):
3519
3491
 
3520
3492
  scparam(cfg, ['checklist', standard, item, 'ok'],
3521
3493
  sctype='bool',
3522
- scope='global',
3494
+ scope=Scope.GLOBAL,
3523
3495
  shorthelp="Checklist: item ok",
3524
3496
  switch="-checklist_ok 'standard item <bool>'",
3525
3497
  example=[
@@ -3541,8 +3513,8 @@ def schema_asic(cfg):
3541
3513
 
3542
3514
  scparam(cfg, ['asic', 'logiclib'],
3543
3515
  sctype='[str]',
3544
- scope='job',
3545
- pernode='optional',
3516
+ scope=Scope.JOB,
3517
+ pernode=PerNode.OPTIONAL,
3546
3518
  shorthelp="ASIC: logic libraries",
3547
3519
  switch="-asic_logiclib <str>",
3548
3520
  example=["cli: -asic_logiclib nangate45",
@@ -3553,8 +3525,8 @@ def schema_asic(cfg):
3553
3525
 
3554
3526
  scparam(cfg, ['asic', 'macrolib'],
3555
3527
  sctype='[str]',
3556
- scope='job',
3557
- pernode='optional',
3528
+ scope=Scope.JOB,
3529
+ pernode=PerNode.OPTIONAL,
3558
3530
  shorthelp="ASIC: macro libraries",
3559
3531
  switch="-asic_macrolib <str>",
3560
3532
  example=["cli: -asic_macrolib sram64x1024",
@@ -3566,8 +3538,8 @@ def schema_asic(cfg):
3566
3538
 
3567
3539
  scparam(cfg, ['asic', 'delaymodel'],
3568
3540
  sctype='str',
3569
- scope='job',
3570
- pernode='optional',
3541
+ scope=Scope.JOB,
3542
+ pernode=PerNode.OPTIONAL,
3571
3543
  shorthelp="ASIC: delay model",
3572
3544
  switch="-asic_delaymodel <str>",
3573
3545
  example=["cli: -asic_delaymodel ccs",
@@ -3593,7 +3565,7 @@ def schema_asic(cfg):
3593
3565
  for item in names:
3594
3566
  scparam(cfg, ['asic', 'cells', item],
3595
3567
  sctype='[str]',
3596
- pernode='optional',
3568
+ pernode=PerNode.OPTIONAL,
3597
3569
  shorthelp=f"ASIC: {item} cell list",
3598
3570
  switch=f"-asic_cells_{item} '<str>'",
3599
3571
  example=[
@@ -3607,7 +3579,7 @@ def schema_asic(cfg):
3607
3579
 
3608
3580
  scparam(cfg, ['asic', 'libarch'],
3609
3581
  sctype='str',
3610
- pernode='optional',
3582
+ pernode=PerNode.OPTIONAL,
3611
3583
  shorthelp="ASIC: library architecture",
3612
3584
  switch="-asic_libarch '<str>'",
3613
3585
  example=[
@@ -3621,7 +3593,7 @@ def schema_asic(cfg):
3621
3593
  libarch = 'default'
3622
3594
  scparam(cfg, ['asic', 'site', libarch],
3623
3595
  sctype='[str]',
3624
- pernode='optional',
3596
+ pernode=PerNode.OPTIONAL,
3625
3597
  shorthelp="ASIC: library sites",
3626
3598
  switch="-asic_site 'libarch <str>'",
3627
3599
  example=[
@@ -3645,9 +3617,9 @@ def schema_constraint(cfg):
3645
3617
  pin = 'default'
3646
3618
  scparam(cfg, ['constraint', 'timing', scenario, 'voltage', pin],
3647
3619
  sctype='float',
3648
- pernode='optional',
3620
+ pernode=PerNode.OPTIONAL,
3649
3621
  unit='V',
3650
- scope='job',
3622
+ scope=Scope.JOB,
3651
3623
  shorthelp="Constraint: pin voltage level",
3652
3624
  switch="-constraint_timing_voltage 'scenario pin <float>'",
3653
3625
  example=["cli: -constraint_timing_voltage 'worst VDD 0.9'",
@@ -3656,9 +3628,9 @@ def schema_constraint(cfg):
3656
3628
 
3657
3629
  scparam(cfg, ['constraint', 'timing', scenario, 'temperature'],
3658
3630
  sctype='float',
3659
- pernode='optional',
3631
+ pernode=PerNode.OPTIONAL,
3660
3632
  unit='C',
3661
- scope='job',
3633
+ scope=Scope.JOB,
3662
3634
  shorthelp="Constraint: temperature",
3663
3635
  switch="-constraint_timing_temperature 'scenario <float>'",
3664
3636
  example=["cli: -constraint_timing_temperature 'worst 125'",
@@ -3667,8 +3639,8 @@ def schema_constraint(cfg):
3667
3639
 
3668
3640
  scparam(cfg, ['constraint', 'timing', scenario, 'libcorner'],
3669
3641
  sctype='[str]',
3670
- pernode='optional',
3671
- scope='job',
3642
+ pernode=PerNode.OPTIONAL,
3643
+ scope=Scope.JOB,
3672
3644
  shorthelp="Constraint: library corner",
3673
3645
  switch="-constraint_timing_libcorner 'scenario <str>'",
3674
3646
  example=["cli: -constraint_timing_libcorner 'worst ttt'",
@@ -3678,8 +3650,8 @@ def schema_constraint(cfg):
3678
3650
 
3679
3651
  scparam(cfg, ['constraint', 'timing', scenario, 'pexcorner'],
3680
3652
  sctype='str',
3681
- pernode='optional',
3682
- scope='job',
3653
+ pernode=PerNode.OPTIONAL,
3654
+ scope=Scope.JOB,
3683
3655
  shorthelp="Constraint: pex corner",
3684
3656
  switch="-constraint_timing_pexcorner 'scenario <str>'",
3685
3657
  example=["cli: -constraint_timing_pexcorner 'worst max'",
@@ -3689,8 +3661,8 @@ def schema_constraint(cfg):
3689
3661
 
3690
3662
  scparam(cfg, ['constraint', 'timing', scenario, 'opcond'],
3691
3663
  sctype='str',
3692
- pernode='optional',
3693
- scope='job',
3664
+ pernode=PerNode.OPTIONAL,
3665
+ scope=Scope.JOB,
3694
3666
  shorthelp="Constraint: operating condition",
3695
3667
  switch="-constraint_timing_opcond 'scenario <str>'",
3696
3668
  example=["cli: -constraint_timing_opcond 'worst typical_1.0'",
@@ -3701,8 +3673,8 @@ def schema_constraint(cfg):
3701
3673
 
3702
3674
  scparam(cfg, ['constraint', 'timing', scenario, 'mode'],
3703
3675
  sctype='str',
3704
- pernode='optional',
3705
- scope='job',
3676
+ pernode=PerNode.OPTIONAL,
3677
+ scope=Scope.JOB,
3706
3678
  shorthelp="Constraint: operating mode",
3707
3679
  switch="-constraint_timing_mode 'scenario <str>'",
3708
3680
  example=["cli: -constraint_timing_mode 'worst test'",
@@ -3712,8 +3684,8 @@ def schema_constraint(cfg):
3712
3684
 
3713
3685
  scparam(cfg, ['constraint', 'timing', scenario, 'file'],
3714
3686
  sctype='[file]',
3715
- pernode='optional',
3716
- scope='job',
3687
+ pernode=PerNode.OPTIONAL,
3688
+ scope=Scope.JOB,
3717
3689
  copy=True,
3718
3690
  shorthelp="Constraint: SDC files",
3719
3691
  switch="-constraint_timing_file 'scenario <file>'",
@@ -3727,8 +3699,8 @@ def schema_constraint(cfg):
3727
3699
 
3728
3700
  scparam(cfg, ['constraint', 'timing', scenario, 'check'],
3729
3701
  sctype='[str]',
3730
- pernode='optional',
3731
- scope='job',
3702
+ pernode=PerNode.OPTIONAL,
3703
+ scope=Scope.JOB,
3732
3704
  shorthelp="Constraint: timing checks",
3733
3705
  switch="-constraint_timing_check 'scenario <str>'",
3734
3706
  example=[
@@ -3747,7 +3719,7 @@ def schema_constraint(cfg):
3747
3719
 
3748
3720
  scparam(cfg, ['constraint', 'component', inst, 'placement'],
3749
3721
  sctype='(float,float)',
3750
- pernode='optional',
3722
+ pernode=PerNode.OPTIONAL,
3751
3723
  unit='um',
3752
3724
  shorthelp="Constraint: component placement",
3753
3725
  switch="-constraint_component_placement 'inst <(float,float)>'",
@@ -3762,20 +3734,21 @@ def schema_constraint(cfg):
3762
3734
 
3763
3735
  scparam(cfg, ['constraint', 'component', inst, 'partname'],
3764
3736
  sctype='str',
3765
- pernode='optional',
3737
+ pernode=PerNode.OPTIONAL,
3766
3738
  shorthelp="Constraint: component part name",
3767
3739
  switch="-constraint_component_partname 'inst <str>'",
3768
3740
  example=[
3769
3741
  "cli: -constraint_component_partname 'i0 filler_x1'",
3770
3742
  "api: chip.set('constraint', 'component', 'i0', 'partname', 'filler_x1')"],
3771
3743
  schelp="""
3772
- Part name of the instance. The parameter is required for instances
3773
- that are not contained within the design netlist (ie. physical only cells).
3774
- """)
3744
+ Name of the model, type, or variant of the placed component. In the chip
3745
+ design domain, 'partname' is synonymous to 'cellname' or 'cell'. The
3746
+ 'partname' is required for instances that are not represented within
3747
+ the design netlist (ie. physical only cells).""")
3775
3748
 
3776
3749
  scparam(cfg, ['constraint', 'component', inst, 'halo'],
3777
3750
  sctype='(float,float)',
3778
- pernode='optional',
3751
+ pernode=PerNode.OPTIONAL,
3779
3752
  unit='um',
3780
3753
  shorthelp="Constraint: component halo",
3781
3754
  switch="-constraint_component_halo 'inst <(float,float)>'",
@@ -3784,10 +3757,11 @@ def schema_constraint(cfg):
3784
3757
  "api: chip.set('constraint', 'component', 'i0', 'halo', (1, 1))"],
3785
3758
  schelp="""
3786
3759
  Placement keepout halo around the named component, specified as a
3787
- (horizontal, vertical) tuple represented in microns.""")
3760
+ (horizontal, vertical) tuple.""")
3788
3761
 
3789
3762
  scparam(cfg, ['constraint', 'component', inst, 'rotation'],
3790
3763
  sctype='enum',
3764
+ pernode=PerNode.OPTIONAL,
3791
3765
  defvalue='R0',
3792
3766
  enum=['R0', 'R90', 'R180', 'R270',
3793
3767
  'MX', 'MX_R90', 'MX_R180', 'MX_R270',
@@ -3795,7 +3769,6 @@ def schema_constraint(cfg):
3795
3769
  'MZ', 'MZ_R90', 'MZ_R180', 'MZ_R270',
3796
3770
  'MZ_MX', 'MZ_MX_R90', 'MZ_MX_R180', 'MZ_MX_R270',
3797
3771
  'MZ_MY', 'MZ_MY_R90', 'MZ_MY_R180', 'MZ_MY_R270'],
3798
- pernode='optional',
3799
3772
  shorthelp="Constraint: component rotation",
3800
3773
  switch="-constraint_component_rotation 'inst <str>'",
3801
3774
  example=[
@@ -3829,11 +3802,54 @@ def schema_constraint(cfg):
3829
3802
  * ``MZ_MX_R270``, ``MZ_MY_R90``: Reverse metal stack, flip on x-axis and rotate 270 deg ccw
3830
3803
  """)
3831
3804
 
3805
+ scparam(cfg, ['constraint', 'component', inst, 'substrate'],
3806
+ sctype='str',
3807
+ pernode=PerNode.OPTIONAL,
3808
+ shorthelp="Constraint: component substrate",
3809
+ switch="-constraint_component_substrate 'inst <str>'",
3810
+ example=[
3811
+ "cli: -constraint_component_substrate 'i0 pcb0'",
3812
+ "api: chip.set('constraint', 'component', 'i0', 'substrate', 'pcb0')"],
3813
+ schelp="""
3814
+ Name of physical substrates instance that components are placed upon.
3815
+ Any flat surface can serve as a substrate (eg. wafers, dies, panels, PCBs,
3816
+ substrates, interposers).""")
3817
+
3818
+ scparam(cfg, ['constraint', 'component', inst, 'side'],
3819
+ sctype='enum',
3820
+ enum=['left', 'right', 'front', 'back', 'top', 'bottom'],
3821
+ pernode=PerNode.OPTIONAL,
3822
+ shorthelp="Constraint: component side",
3823
+ switch="-constraint_component_side 'inst <str>'",
3824
+ example=[
3825
+ "cli: -constraint_component_side 'i0 top'",
3826
+ "api: chip.set('constraint', 'component', 'i0', 'side', 'top')"],
3827
+ schelp="""
3828
+ Side of the substrate where the component should be placed. The `side`
3829
+ is defined with respect to a viewer looking sideways at an object.
3830
+ Top is towards the sky, front is the side closest to the viewer, and
3831
+ right is right. The maximum number of sides per substrate is six""")
3832
+
3833
+ scparam(cfg, ['constraint', 'component', inst, 'zheight'],
3834
+ sctype='float',
3835
+ pernode=PerNode.OPTIONAL,
3836
+ unit='um',
3837
+ shorthelp="Constraint: component placement zheight",
3838
+ switch="-constraint_component_zheight 'inst <float>'",
3839
+ example=[
3840
+ "cli: -constraint_component_zheight 'i0 100.0'",
3841
+ "api: chip.set('constraint', 'component', 'i0', 'zheight', 100.0)"],
3842
+ schelp="""
3843
+ Height above the substrate for component placement. The space
3844
+ between the component and substrate is occupied by material,
3845
+ supporting scaffolding, and electrical connections (eg. bumps,
3846
+ vias, pillars).""")
3847
+
3832
3848
  # PINS
3833
3849
  name = 'default'
3834
3850
  scparam(cfg, ['constraint', 'pin', name, 'placement'],
3835
3851
  sctype='(float,float)',
3836
- pernode='optional',
3852
+ pernode=PerNode.OPTIONAL,
3837
3853
  unit='um',
3838
3854
  shorthelp="Constraint: pin placement",
3839
3855
  switch="-constraint_pin_placement 'name <(float,float)>'",
@@ -3848,22 +3864,74 @@ def schema_constraint(cfg):
3848
3864
  may adjust sizes to meet competing goals such as manufacturing design
3849
3865
  rules and grid placement guidelines.""")
3850
3866
 
3867
+ scparam(cfg, ['constraint', 'pin', name, 'width'],
3868
+ sctype='float',
3869
+ unit='um',
3870
+ pernode=PerNode.OPTIONAL,
3871
+ shorthelp="Constraint: pin width",
3872
+ switch="-constraint_pin_width 'name <float>'",
3873
+ example=[
3874
+ "cli: -constraint_pin_width 'nreset 1.0'",
3875
+ "api: chip.set('constraint', 'pin', 'nreset', 'width', 1.0)"],
3876
+ schelp="""
3877
+ Pin width constraint. Package pin width is the lateral
3878
+ (side-to-side) thickness of a pin on a physical component.
3879
+ This parameter represents goal/intent, not an exact
3880
+ specification. The layout system may adjust dimensions to meet
3881
+ competing goals such as manufacturing design rules and grid placement
3882
+ guidelines.""")
3883
+
3884
+ scparam(cfg, ['constraint', 'pin', name, 'length'],
3885
+ sctype='float',
3886
+ unit='um',
3887
+ pernode=PerNode.OPTIONAL,
3888
+ shorthelp="Constraint: pin length",
3889
+ switch="-constraint_pin_length 'name <float>'",
3890
+ example=[
3891
+ "cli: -constraint_pin_length 'nreset 1.0'",
3892
+ "api: chip.set('constraint', 'pin', 'nreset', 'length', 1.0)"],
3893
+ schelp="""
3894
+ Pin length constraint. Package pin length refers to the
3895
+ length of the electrical pins extending out from (or into)
3896
+ a component. This parameter represents goal/intent, not an exact
3897
+ specification. The layout system may adjust dimensions to meet
3898
+ competing goals such as manufacturing design rules and grid placement
3899
+ guidelines.""")
3900
+
3901
+ scparam(cfg, ['constraint', 'pin', name, 'shape'],
3902
+ sctype='enum',
3903
+ enum=['circle', 'rectangle', 'square',
3904
+ 'hexagon', 'octagon', 'oval', 'pill', 'polygon'],
3905
+ pernode=PerNode.OPTIONAL,
3906
+ shorthelp="Constraint: pin shape",
3907
+ switch="-constraint_pin_shape 'name <str>'",
3908
+ example=[
3909
+ "cli: -constraint_pin_shape 'nreset circle'",
3910
+ "api: chip.set('constraint', 'pin', 'nreset', 'shape', 'circle')"],
3911
+ schelp="""
3912
+ Pin shape constraint specified on a per pin basis. In 3D design systems,
3913
+ the pin shape represents the cross section of the pin in the direction
3914
+ orthogonal to the signal flow direction. The 'pill' (aka stadium) shape,
3915
+ is rectangle with semicircles at a pair of opposite sides. The other
3916
+ pin shapes represent common geometric shape definitions.""")
3917
+
3851
3918
  scparam(cfg, ['constraint', 'pin', name, 'layer'],
3852
3919
  sctype='str',
3853
- pernode='optional',
3920
+ pernode=PerNode.OPTIONAL,
3854
3921
  shorthelp="Constraint: pin layer",
3855
3922
  switch="-constraint_pin_layer 'name <str>'",
3856
3923
  example=[
3857
3924
  "cli: -constraint_pin_layer 'nreset m4'",
3858
3925
  "api: chip.set('constraint', 'pin', 'nreset', 'layer', 'm4')"],
3859
3926
  schelp="""
3860
- Pin metal layer specified based on the SC standard layer stack
3861
- starting with m1 as the lowest routing layer and ending
3862
- with m<n> as the highest routing layer.""")
3927
+ Pin metal layer constraint specified on a per pin basis.
3928
+ Metal names should either be the PDK specific metal stack name or
3929
+ an integer with '1' being the lowest routing layer.
3930
+ The wildcard character '*' is supported for pin names.""")
3863
3931
 
3864
3932
  scparam(cfg, ['constraint', 'pin', name, 'side'],
3865
3933
  sctype='int',
3866
- pernode='optional',
3934
+ pernode=PerNode.OPTIONAL,
3867
3935
  shorthelp="Constraint: pin side",
3868
3936
  switch="-constraint_pin_side 'name <int>'",
3869
3937
  example=[
@@ -3879,7 +3947,7 @@ def schema_constraint(cfg):
3879
3947
 
3880
3948
  scparam(cfg, ['constraint', 'pin', name, 'order'],
3881
3949
  sctype='int',
3882
- pernode='optional',
3950
+ pernode=PerNode.OPTIONAL,
3883
3951
  shorthelp="Constraint: pin order",
3884
3952
  switch="-constraint_pin_order 'name <int>'",
3885
3953
  example=[
@@ -3895,7 +3963,7 @@ def schema_constraint(cfg):
3895
3963
  # NETS
3896
3964
  scparam(cfg, ['constraint', 'net', name, 'maxlength'],
3897
3965
  sctype='float',
3898
- pernode='optional',
3966
+ pernode=PerNode.OPTIONAL,
3899
3967
  unit='um',
3900
3968
  shorthelp="Constraint: net max length",
3901
3969
  switch="-constraint_net_maxlength 'name <float>'",
@@ -3903,12 +3971,12 @@ def schema_constraint(cfg):
3903
3971
  "cli: -constraint_net_maxlength 'nreset 1000'",
3904
3972
  "api: chip.set('constraint', 'net', 'nreset', 'maxlength', '1000')"],
3905
3973
  schelp="""
3906
- Maximum total length of a net, specified in microns.
3907
- Wildcards ('*') can be used for net names.""")
3974
+ Maximum total length of a net. Wildcards ('*') can be used for
3975
+ net names.""")
3908
3976
 
3909
3977
  scparam(cfg, ['constraint', 'net', name, 'maxresistance'],
3910
3978
  sctype='float',
3911
- pernode='optional',
3979
+ pernode=PerNode.OPTIONAL,
3912
3980
  unit='ohm',
3913
3981
  shorthelp="Constraint: net max resistance",
3914
3982
  switch="-constraint_net_maxresistance 'name <float>'",
@@ -3921,7 +3989,7 @@ def schema_constraint(cfg):
3921
3989
 
3922
3990
  scparam(cfg, ['constraint', 'net', name, 'ndr'],
3923
3991
  sctype='(float,float)',
3924
- pernode='optional',
3992
+ pernode=PerNode.OPTIONAL,
3925
3993
  unit='um',
3926
3994
  shorthelp="Constraint: net routing rule",
3927
3995
  switch="-constraint_net_ndr 'name <(float,float)>'",
@@ -3930,13 +3998,12 @@ def schema_constraint(cfg):
3930
3998
  "api: chip.set('constraint', 'net', 'nreset', 'ndr', (0.4, 0.4))"],
3931
3999
  schelp="""
3932
4000
  Definitions of non-default routing rule specified on a per
3933
- net basis. Constraints are entered as a (width, space) tuples
3934
- specified in microns. Wildcards ('*') can be used
3935
- for net names.""")
4001
+ net basis. Constraints are entered as a (width, space) tuples.
4002
+ Wildcards ('*') can be used for net names.""")
3936
4003
 
3937
4004
  scparam(cfg, ['constraint', 'net', name, 'minlayer'],
3938
4005
  sctype='str',
3939
- pernode='optional',
4006
+ pernode=PerNode.OPTIONAL,
3940
4007
  shorthelp="Constraint: net minimum routing layer",
3941
4008
  switch="-constraint_net_minlayer 'name <str>'",
3942
4009
  example=[
@@ -3950,7 +4017,7 @@ def schema_constraint(cfg):
3950
4017
 
3951
4018
  scparam(cfg, ['constraint', 'net', name, 'maxlayer'],
3952
4019
  sctype='str',
3953
- pernode='optional',
4020
+ pernode=PerNode.OPTIONAL,
3954
4021
  shorthelp="Constraint: net maximum routing layer",
3955
4022
  switch="-constraint_net_maxlayer 'name <str>'",
3956
4023
  example=[
@@ -3964,7 +4031,7 @@ def schema_constraint(cfg):
3964
4031
 
3965
4032
  scparam(cfg, ['constraint', 'net', name, 'shield'],
3966
4033
  sctype='str',
3967
- pernode='optional',
4034
+ pernode=PerNode.OPTIONAL,
3968
4035
  shorthelp="Constraint: net shielding",
3969
4036
  switch="-constraint_net_shield 'name <str>'",
3970
4037
  example=[
@@ -3976,7 +4043,7 @@ def schema_constraint(cfg):
3976
4043
 
3977
4044
  scparam(cfg, ['constraint', 'net', name, 'match'],
3978
4045
  sctype='[str]',
3979
- pernode='optional',
4046
+ pernode=PerNode.OPTIONAL,
3980
4047
  shorthelp="Constraint: net matched routing",
3981
4048
  switch="-constraint_net_match 'name <str>'",
3982
4049
  example=[
@@ -3989,7 +4056,7 @@ def schema_constraint(cfg):
3989
4056
 
3990
4057
  scparam(cfg, ['constraint', 'net', name, 'diffpair'],
3991
4058
  sctype='str',
3992
- pernode='optional',
4059
+ pernode=PerNode.OPTIONAL,
3993
4060
  shorthelp="Constraint: net diffpair",
3994
4061
  switch="-constraint_net_diffpair 'name <str>'",
3995
4062
  example=[
@@ -4001,7 +4068,7 @@ def schema_constraint(cfg):
4001
4068
 
4002
4069
  scparam(cfg, ['constraint', 'net', name, 'sympair'],
4003
4070
  sctype='str',
4004
- pernode='optional',
4071
+ pernode=PerNode.OPTIONAL,
4005
4072
  shorthelp="Constraint: net sympair",
4006
4073
  switch="-constraint_net_sympair 'name <str>'",
4007
4074
  example=[
@@ -4015,9 +4082,9 @@ def schema_constraint(cfg):
4015
4082
  # AREA
4016
4083
  scparam(cfg, ['constraint', 'outline'],
4017
4084
  sctype='[(float,float)]',
4018
- pernode='optional',
4085
+ pernode=PerNode.OPTIONAL,
4019
4086
  unit='um',
4020
- scope='job',
4087
+ scope=Scope.JOB,
4021
4088
  shorthelp="Constraint: layout outline",
4022
4089
  switch="-constraint_outline <(float,float)>",
4023
4090
  example=["cli: -constraint_outline '(0,0)'",
@@ -4029,9 +4096,9 @@ def schema_constraint(cfg):
4029
4096
 
4030
4097
  scparam(cfg, ['constraint', 'corearea'],
4031
4098
  sctype='[(float,float)]',
4032
- pernode='optional',
4099
+ pernode=PerNode.OPTIONAL,
4033
4100
  unit='um',
4034
- scope='job',
4101
+ scope=Scope.JOB,
4035
4102
  shorthelp="Constraint: layout core area",
4036
4103
  switch="-constraint_corearea <(float,float)>",
4037
4104
  example=["cli: -constraint_corearea '(0,0)'",
@@ -4043,9 +4110,9 @@ def schema_constraint(cfg):
4043
4110
 
4044
4111
  scparam(cfg, ['constraint', 'coremargin'],
4045
4112
  sctype='float',
4046
- pernode='optional',
4113
+ pernode=PerNode.OPTIONAL,
4047
4114
  unit='um',
4048
- scope='job',
4115
+ scope=Scope.JOB,
4049
4116
  shorthelp="Constraint: layout core margin",
4050
4117
  switch="-constraint_coremargin <float>",
4051
4118
  example=["cli: -constraint_coremargin 1",
@@ -4056,8 +4123,8 @@ def schema_constraint(cfg):
4056
4123
 
4057
4124
  scparam(cfg, ['constraint', 'density'],
4058
4125
  sctype='float',
4059
- pernode='optional',
4060
- scope='job',
4126
+ pernode=PerNode.OPTIONAL,
4127
+ scope=Scope.JOB,
4061
4128
  shorthelp="Constraint: layout density",
4062
4129
  switch="-constraint_density <float>",
4063
4130
  example=["cli: -constraint_density 30",
@@ -4071,9 +4138,9 @@ def schema_constraint(cfg):
4071
4138
 
4072
4139
  scparam(cfg, ['constraint', 'aspectratio'],
4073
4140
  sctype='float',
4074
- pernode='optional',
4141
+ pernode=PerNode.OPTIONAL,
4075
4142
  defvalue='1.0',
4076
- scope='job',
4143
+ scope=Scope.JOB,
4077
4144
  shorthelp="Constraint: layout aspect ratio",
4078
4145
  switch="-constraint_aspectratio <float>",
4079
4146
  example=["cli: -constraint_aspectratio 2.0",