siliconcompiler 0.33.2__py3-none-any.whl → 0.34.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 (49) hide show
  1. siliconcompiler/__init__.py +2 -0
  2. siliconcompiler/_metadata.py +1 -1
  3. siliconcompiler/apps/sc_issue.py +5 -3
  4. siliconcompiler/apps/sc_remote.py +0 -17
  5. siliconcompiler/checklist.py +1 -1
  6. siliconcompiler/core.py +34 -47
  7. siliconcompiler/dependencyschema.py +392 -0
  8. siliconcompiler/design.py +664 -0
  9. siliconcompiler/flowgraph.py +32 -1
  10. siliconcompiler/package/__init__.py +383 -223
  11. siliconcompiler/package/git.py +75 -77
  12. siliconcompiler/package/github.py +70 -97
  13. siliconcompiler/package/https.py +77 -93
  14. siliconcompiler/packageschema.py +260 -0
  15. siliconcompiler/pdk.py +2 -2
  16. siliconcompiler/remote/client.py +15 -3
  17. siliconcompiler/report/dashboard/cli/board.py +1 -1
  18. siliconcompiler/scheduler/__init__.py +3 -1382
  19. siliconcompiler/scheduler/docker.py +268 -0
  20. siliconcompiler/scheduler/run_node.py +10 -16
  21. siliconcompiler/scheduler/scheduler.py +308 -0
  22. siliconcompiler/scheduler/schedulernode.py +934 -0
  23. siliconcompiler/scheduler/slurm.py +147 -163
  24. siliconcompiler/scheduler/taskscheduler.py +39 -52
  25. siliconcompiler/schema/__init__.py +3 -3
  26. siliconcompiler/schema/baseschema.py +234 -10
  27. siliconcompiler/schema/editableschema.py +4 -0
  28. siliconcompiler/schema/journal.py +210 -0
  29. siliconcompiler/schema/namedschema.py +31 -2
  30. siliconcompiler/schema/parameter.py +14 -1
  31. siliconcompiler/schema/parametervalue.py +1 -34
  32. siliconcompiler/schema/schema_cfg.py +210 -349
  33. siliconcompiler/tool.py +61 -20
  34. siliconcompiler/tools/builtin/concatenate.py +2 -2
  35. siliconcompiler/tools/builtin/verify.py +1 -2
  36. siliconcompiler/tools/openroad/scripts/common/procs.tcl +27 -25
  37. siliconcompiler/tools/vpr/route.py +69 -0
  38. siliconcompiler/toolscripts/_tools.json +4 -4
  39. siliconcompiler/utils/__init__.py +2 -23
  40. siliconcompiler/utils/flowgraph.py +5 -5
  41. siliconcompiler/utils/logging.py +2 -1
  42. {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.0.dist-info}/METADATA +4 -3
  43. {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.0.dist-info}/RECORD +47 -42
  44. siliconcompiler/scheduler/docker_runner.py +0 -254
  45. siliconcompiler/schema/journalingschema.py +0 -242
  46. {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.0.dist-info}/WHEEL +0 -0
  47. {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.0.dist-info}/entry_points.txt +0 -0
  48. {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.0.dist-info}/licenses/LICENSE +0 -0
  49. {siliconcompiler-0.33.2.dist-info → siliconcompiler-0.34.0.dist-info}/top_level.txt +0 -0
@@ -110,7 +110,9 @@ def schema_cfg(schema):
110
110
  cfg = schema_constraint(cfg)
111
111
 
112
112
  # Options
113
- cfg = schema_option(cfg)
113
+ cfg = schema_option_frontend(cfg)
114
+ cfg = schema_option_runtime(cfg)
115
+ cfg = schema_option_other(cfg)
114
116
  cfg = schema_arg(cfg)
115
117
 
116
118
  # Technology configuration
@@ -212,7 +214,7 @@ def schema_fpga(cfg):
212
214
  ###############################################################################
213
215
  def schema_pdk(cfg):
214
216
  from siliconcompiler.pdk import PDKSchema
215
- cfg.insert("pdk", "default", PDKSchema())
217
+ cfg.insert("pdk", "default", PDKSchema(None))
216
218
  return cfg
217
219
 
218
220
 
@@ -1016,7 +1018,7 @@ def schema_datasheet(cfg):
1016
1018
  ###############################################################################
1017
1019
  def schema_flowgraph(cfg):
1018
1020
  from siliconcompiler.flowgraph import FlowgraphSchema
1019
- cfg.insert("flowgraph", "default", FlowgraphSchema())
1021
+ cfg.insert("flowgraph", "default", FlowgraphSchema(None))
1020
1022
  return cfg
1021
1023
 
1022
1024
 
@@ -1086,10 +1088,111 @@ def schema_record(cfg):
1086
1088
  ###########################################################################
1087
1089
  # Run Options
1088
1090
  ###########################################################################
1089
- def schema_option(cfg):
1091
+ def schema_option_other(cfg):
1090
1092
  ''' Technology agnostic run time options
1091
1093
  '''
1092
1094
 
1095
+ # Compilation
1096
+ scparam(cfg, ['option', 'pdk'],
1097
+ sctype='str',
1098
+ scope=Scope.JOB,
1099
+ shorthelp="Option: PDK target",
1100
+ switch="-pdk <str>",
1101
+ example=["cli: -pdk freepdk45",
1102
+ "api: chip.set('option', 'pdk', 'freepdk45')"],
1103
+ schelp="""
1104
+ Target PDK used during compilation.""")
1105
+
1106
+ scparam(cfg, ['option', 'stackup'],
1107
+ sctype='str',
1108
+ scope=Scope.JOB,
1109
+ shorthelp="Option: stackup target",
1110
+ switch="-stackup <str>",
1111
+ example=["cli: -stackup 2MA4MB2MC",
1112
+ "api: chip.set('option', 'stackup', '2MA4MB2MC')"],
1113
+ schelp="""
1114
+ Target stackup used during compilation. The stackup is required
1115
+ parameter for PDKs with multiple metal stackups.""")
1116
+
1117
+ scparam(cfg, ['option', 'cfg'],
1118
+ sctype='[file]',
1119
+ scope=Scope.JOB,
1120
+ shorthelp="Option: configuration manifest",
1121
+ switch="-cfg <file>",
1122
+ example=["cli: -cfg mypdk.json",
1123
+ "api: chip.set('option', 'cfg', 'mypdk.json')"],
1124
+ schelp="""
1125
+ List of filepaths to JSON formatted schema configuration
1126
+ manifests. The files are read in automatically when using the
1127
+ 'sc' command line application. In Python programs, JSON manifests
1128
+ can be merged into the current working manifest using the
1129
+ :meth:`Chip.read_manifest()` method.""")
1130
+
1131
+ key = 'default'
1132
+ scparam(cfg, ['option', 'env', key],
1133
+ sctype='str',
1134
+ scope=Scope.JOB,
1135
+ shorthelp="Option: environment variables",
1136
+ switch="-env 'key <str>'",
1137
+ example=[
1138
+ "cli: -env 'PDK_HOME /disk/mypdk'",
1139
+ "api: chip.set('option', 'env', 'PDK_HOME', '/disk/mypdk')"],
1140
+ schelp="""
1141
+ Certain tools and reference flows require global environment
1142
+ variables to be set. These variables can be managed externally or
1143
+ specified through the env variable.""")
1144
+
1145
+ scparam(cfg, ['option', 'var', key],
1146
+ sctype='[str]',
1147
+ scope=Scope.JOB,
1148
+ shorthelp="Option: custom variables",
1149
+ switch="-var 'key <str>'",
1150
+ example=[
1151
+ "cli: -var 'openroad_place_density 0.4'",
1152
+ "api: chip.set('option', 'var', 'openroad_place_density', '0.4')"],
1153
+ schelp="""
1154
+ List of key/value strings specified. Certain tools and
1155
+ reference flows require special parameters, this
1156
+ should only be used for specifying variables that are
1157
+ not directly supported by the SiliconCompiler schema.""")
1158
+
1159
+ scparam(cfg, ['option', 'file', key],
1160
+ sctype='[file]',
1161
+ scope=Scope.JOB,
1162
+ copy=True,
1163
+ shorthelp="Option: custom files",
1164
+ switch="-file 'key <file>'",
1165
+ example=[
1166
+ "cli: -file 'openroad_tapcell ./tapcell.tcl'",
1167
+ "api: chip.set('option', 'file', 'openroad_tapcell', './tapcell.tcl')"],
1168
+ schelp="""
1169
+ List of named files specified. Certain tools and
1170
+ reference flows require special parameters, this
1171
+ parameter should only be used for specifying files that are
1172
+ not directly supported by the schema.""")
1173
+
1174
+ scparam(cfg, ['option', 'dir', key],
1175
+ sctype='[dir]',
1176
+ scope=Scope.JOB,
1177
+ copy=True,
1178
+ shorthelp="Option: custom directories",
1179
+ switch="-dir 'key <dir>'",
1180
+ example=[
1181
+ "cli: -dir 'openroad_tapcell ./tapcell.tcl'",
1182
+ "api: chip.set('option', 'dir', 'openroad_files', './openroad_support/')"],
1183
+ schelp="""
1184
+ List of named directories specified. Certain tools and
1185
+ reference flows require special parameters, this
1186
+ parameter should only be used for specifying directories that are
1187
+ not directly supported by the schema.""")
1188
+
1189
+ return cfg
1190
+
1191
+
1192
+ def schema_option_runtime(cfg):
1193
+ ''' Runtime run time options
1194
+ '''
1195
+
1093
1196
  scparam(cfg, ['option', 'remote'],
1094
1197
  sctype='bool',
1095
1198
  scope=Scope.JOB,
@@ -1153,28 +1256,6 @@ def schema_option(cfg):
1153
1256
  If the parameter is undefined, nice will not be used. For more information see
1154
1257
  `Unix 'nice' <https://en.wikipedia.org/wiki/Nice_(Unix)>`_.""")
1155
1258
 
1156
- # Compilation
1157
- scparam(cfg, ['option', 'pdk'],
1158
- sctype='str',
1159
- scope=Scope.JOB,
1160
- shorthelp="Option: PDK target",
1161
- switch="-pdk <str>",
1162
- example=["cli: -pdk freepdk45",
1163
- "api: chip.set('option', 'pdk', 'freepdk45')"],
1164
- schelp="""
1165
- Target PDK used during compilation.""")
1166
-
1167
- scparam(cfg, ['option', 'stackup'],
1168
- sctype='str',
1169
- scope=Scope.JOB,
1170
- shorthelp="Option: stackup target",
1171
- switch="-stackup <str>",
1172
- example=["cli: -stackup 2MA4MB2MC",
1173
- "api: chip.set('option', 'stackup', '2MA4MB2MC')"],
1174
- schelp="""
1175
- Target stackup used during compilation. The stackup is required
1176
- parameter for PDKs with multiple metal stackups.""")
1177
-
1178
1259
  scparam(cfg, ['option', 'flow'],
1179
1260
  sctype='str',
1180
1261
  scope=Scope.JOB,
@@ -1209,78 +1290,6 @@ def schema_option(cfg):
1209
1290
  (O99) = Experimental highest possible effort, may be unstable
1210
1291
  """)
1211
1292
 
1212
- scparam(cfg, ['option', 'cfg'],
1213
- sctype='[file]',
1214
- scope=Scope.JOB,
1215
- shorthelp="Option: configuration manifest",
1216
- switch="-cfg <file>",
1217
- example=["cli: -cfg mypdk.json",
1218
- "api: chip.set('option', 'cfg', 'mypdk.json')"],
1219
- schelp="""
1220
- List of filepaths to JSON formatted schema configuration
1221
- manifests. The files are read in automatically when using the
1222
- 'sc' command line application. In Python programs, JSON manifests
1223
- can be merged into the current working manifest using the
1224
- :meth:`Chip.read_manifest()` method.""")
1225
-
1226
- key = 'default'
1227
- scparam(cfg, ['option', 'env', key],
1228
- sctype='str',
1229
- scope=Scope.JOB,
1230
- shorthelp="Option: environment variables",
1231
- switch="-env 'key <str>'",
1232
- example=[
1233
- "cli: -env 'PDK_HOME /disk/mypdk'",
1234
- "api: chip.set('option', 'env', 'PDK_HOME', '/disk/mypdk')"],
1235
- schelp="""
1236
- Certain tools and reference flows require global environment
1237
- variables to be set. These variables can be managed externally or
1238
- specified through the env variable.""")
1239
-
1240
- scparam(cfg, ['option', 'var', key],
1241
- sctype='[str]',
1242
- scope=Scope.JOB,
1243
- shorthelp="Option: custom variables",
1244
- switch="-var 'key <str>'",
1245
- example=[
1246
- "cli: -var 'openroad_place_density 0.4'",
1247
- "api: chip.set('option', 'var', 'openroad_place_density', '0.4')"],
1248
- schelp="""
1249
- List of key/value strings specified. Certain tools and
1250
- reference flows require special parameters, this
1251
- should only be used for specifying variables that are
1252
- not directly supported by the SiliconCompiler schema.""")
1253
-
1254
- scparam(cfg, ['option', 'file', key],
1255
- sctype='[file]',
1256
- scope=Scope.JOB,
1257
- copy=True,
1258
- shorthelp="Option: custom files",
1259
- switch="-file 'key <file>'",
1260
- example=[
1261
- "cli: -file 'openroad_tapcell ./tapcell.tcl'",
1262
- "api: chip.set('option', 'file', 'openroad_tapcell', './tapcell.tcl')"],
1263
- schelp="""
1264
- List of named files specified. Certain tools and
1265
- reference flows require special parameters, this
1266
- parameter should only be used for specifying files that are
1267
- not directly supported by the schema.""")
1268
-
1269
- scparam(cfg, ['option', 'dir', key],
1270
- sctype='[dir]',
1271
- scope=Scope.JOB,
1272
- copy=True,
1273
- shorthelp="Option: custom directories",
1274
- switch="-dir 'key <dir>'",
1275
- example=[
1276
- "cli: -dir 'openroad_tapcell ./tapcell.tcl'",
1277
- "api: chip.set('option', 'dir', 'openroad_files', './openroad_support/')"],
1278
- schelp="""
1279
- List of named directories specified. Certain tools and
1280
- reference flows require special parameters, this
1281
- parameter should only be used for specifying directories that are
1282
- not directly supported by the schema.""")
1283
-
1284
1293
  scparam(cfg, ['option', 'loglevel'],
1285
1294
  sctype='<info,warning,error,critical,debug,quiet>',
1286
1295
  pernode=PerNode.OPTIONAL,
@@ -1374,18 +1383,6 @@ def schema_option(cfg):
1374
1383
  EDA tool. If the step is a command line tool, then the flow
1375
1384
  drops into a Python interpreter.""")
1376
1385
 
1377
- scparam(cfg, ['option', 'library'],
1378
- sctype='[str]',
1379
- scope=Scope.JOB,
1380
- pernode=PerNode.OPTIONAL,
1381
- shorthelp="Option: library list",
1382
- switch="-library <str>",
1383
- example=["cli: -library lambdalib_asap7",
1384
- "api: chip.set('option', 'library', 'lambdalib_asap7')"],
1385
- schelp="""
1386
- List of soft libraries to be linked in during import.""")
1387
-
1388
- # Booleans
1389
1386
  scparam(cfg, ['option', 'clean'],
1390
1387
  sctype='bool',
1391
1388
  scope=Scope.JOB,
@@ -1478,100 +1475,6 @@ def schema_option(cfg):
1478
1475
  being recorded in the manifest so only turn on this feature
1479
1476
  if you have control of the final manifest.""")
1480
1477
 
1481
- scparam(cfg, ['option', 'entrypoint'],
1482
- sctype='str',
1483
- pernode=PerNode.OPTIONAL,
1484
- shorthelp="Option: program entry point",
1485
- switch="-entrypoint <str>",
1486
- example=["cli: -entrypoint top",
1487
- "api: chip.set('option', 'entrypoint', 'top')"],
1488
- schelp="""Alternative entrypoint for compilation and
1489
- simulation. The default entry point is :keypath:`design`.""")
1490
-
1491
- scparam(cfg, ['option', 'idir'],
1492
- sctype='[dir]',
1493
- shorthelp="Option: design search paths",
1494
- copy=True,
1495
- switch=['+incdir+<dir>',
1496
- '-I <dir>',
1497
- '-idir <dir>'],
1498
- example=[
1499
- "cli: +incdir+./mylib",
1500
- "cli: -I ./mylib",
1501
- "cli: -idir ./mylib",
1502
- "api: chip.set('option', 'idir', './mylib')"],
1503
- schelp="""
1504
- Search paths to look for files included in the design using
1505
- the ```include`` statement.""")
1506
-
1507
- scparam(cfg, ['option', 'ydir'],
1508
- sctype='[dir]',
1509
- shorthelp="Option: design module search paths",
1510
- copy=True,
1511
- switch=['-y <dir>',
1512
- '-ydir <dir>'],
1513
- example=[
1514
- "cli: -y './mylib'",
1515
- "cli: -ydir './mylib'",
1516
- "api: chip.set('option', 'ydir', './mylib')"],
1517
- schelp="""
1518
- Search paths to look for verilog modules found in the the
1519
- source list. The import engine will look for modules inside
1520
- files with the specified :keypath:`option,libext` param suffix.""")
1521
-
1522
- scparam(cfg, ['option', 'vlib'],
1523
- sctype='[file]',
1524
- shorthelp="Option: design libraries",
1525
- copy=True,
1526
- switch=['-v <file>',
1527
- '-vlib <file>'],
1528
- example=["cli: -v './mylib.v'",
1529
- "cli: -vlib './mylib.v'",
1530
- "api: chip.set('option', 'vlib', './mylib.v')"],
1531
- schelp="""
1532
- List of library files to be read in. Modules found in the
1533
- libraries are not interpreted as root modules.""")
1534
-
1535
- scparam(cfg, ['option', 'define'],
1536
- sctype='[str]',
1537
- shorthelp="Option: design pre-processor symbol",
1538
- switch=["-D<str>",
1539
- "-define <str>"],
1540
- example=["cli: -DCFG_ASIC=1",
1541
- "cli: -define CFG_ASIC=1",
1542
- "api: chip.set('option', 'define', 'CFG_ASIC=1')"],
1543
- schelp="""Symbol definition for source preprocessor.""")
1544
-
1545
- scparam(cfg, ['option', 'libext'],
1546
- sctype='[str]',
1547
- shorthelp="Option: design file extensions",
1548
- switch=["+libext+<str>",
1549
- "-libext <str>"],
1550
- example=[
1551
- "cli: +libext+sv",
1552
- "cli: -libext sv",
1553
- "api: chip.set('option', 'libext', 'sv')"],
1554
- schelp="""
1555
- List of file extensions that should be used for finding modules.
1556
- For example, if :keypath:`option,ydir` is specified as ./lib", and '.v'
1557
- is specified as libext then the files ./lib/\\*.v ", will be searched for
1558
- module matches.""")
1559
-
1560
- name = 'default'
1561
- scparam(cfg, ['option', 'param', name],
1562
- sctype='str',
1563
- shorthelp="Option: design parameter",
1564
- switch="-param 'name <str>'",
1565
- example=[
1566
- "cli: -param 'N 64'",
1567
- "api: chip.set('option', 'param', 'N', '64')"],
1568
- schelp="""
1569
- Sets a top verilog level design module parameter. The value
1570
- is limited to basic data literals. The parameter override is
1571
- passed into tools such as Verilator and Yosys. The parameters
1572
- support Verilog integer literals (64'h4, 2'b0, 4) and strings.
1573
- Name of the top level module to compile.""")
1574
-
1575
1478
  scparam(cfg, ['option', 'continue'],
1576
1479
  sctype='bool',
1577
1480
  pernode=PerNode.OPTIONAL,
@@ -1754,175 +1657,133 @@ def schema_option(cfg):
1754
1657
  return cfg
1755
1658
 
1756
1659
 
1757
- ############################################
1758
- # Package information
1759
- ############################################
1760
- def schema_package(cfg):
1761
-
1762
- userid = 'default'
1660
+ def schema_option_frontend(cfg):
1661
+ ''' Frontend options
1662
+ '''
1763
1663
 
1764
- scparam(cfg, ['package', 'version'],
1765
- sctype='str',
1766
- scope=Scope.GLOBAL,
1767
- shorthelp="Package: version",
1768
- switch="-package_version <str>",
1769
- example=[
1770
- "cli: -package_version 1.0",
1771
- "api: chip.set('package', 'version', '1.0')"],
1772
- schelp="""Package version. Can be a branch, tag, commit hash,
1773
- or a semver compatible version.""")
1664
+ scparam(cfg, ['option', 'library'],
1665
+ sctype='[str]',
1666
+ scope=Scope.JOB,
1667
+ pernode=PerNode.OPTIONAL,
1668
+ shorthelp="Option: library list",
1669
+ switch="-library <str>",
1670
+ example=["cli: -library lambdalib_asap7",
1671
+ "api: chip.set('option', 'library', 'lambdalib_asap7')"],
1672
+ schelp="""
1673
+ List of soft libraries to be linked in during import.""")
1774
1674
 
1775
- scparam(cfg, ['package', 'description'],
1675
+ scparam(cfg, ['option', 'entrypoint'],
1776
1676
  sctype='str',
1777
- scope=Scope.GLOBAL,
1778
- shorthelp="Package: description",
1779
- switch="-package_description <str>",
1780
- example=[
1781
- "cli: -package_description 'Yet another cpu'",
1782
- "api: chip.set('package', 'description', 'Yet another cpu')"],
1783
- schelp="""Package short one line description for package
1784
- managers and summary reports.""")
1677
+ pernode=PerNode.OPTIONAL,
1678
+ shorthelp="Option: program entry point",
1679
+ switch="-entrypoint <str>",
1680
+ example=["cli: -entrypoint top",
1681
+ "api: chip.set('option', 'entrypoint', 'top')"],
1682
+ schelp="""Alternative entrypoint for compilation and
1683
+ simulation. The default entry point is :keypath:`design`.""")
1785
1684
 
1786
- scparam(cfg, ['package', 'keyword'],
1787
- sctype='str',
1788
- scope=Scope.GLOBAL,
1789
- shorthelp="Package: keyword",
1790
- switch="-package_keyword <str>",
1685
+ scparam(cfg, ['option', 'idir'],
1686
+ sctype='[dir]',
1687
+ shorthelp="Option: design search paths",
1688
+ copy=True,
1689
+ switch=['+incdir+<dir>',
1690
+ '-I <dir>',
1691
+ '-idir <dir>'],
1791
1692
  example=[
1792
- "cli: -package_keyword cpu",
1793
- "api: chip.set('package', 'keyword', 'cpu')"],
1794
- schelp="""Package keyword(s) used to characterize package.""")
1795
- scparam(cfg, ['package', 'doc', 'homepage'],
1796
- sctype='str',
1797
- scope=Scope.GLOBAL,
1798
- shorthelp="Package: documentation homepage",
1799
- switch="-package_doc_homepage <str>",
1800
- example=[
1801
- "cli: -package_doc_homepage index.html",
1802
- "api: chip.set('package', 'doc', 'homepage', 'index.html')"],
1803
- schelp="""
1804
- Package documentation homepage. Filepath to design docs homepage.
1805
- Complex designs can can include a long non standard list of
1806
- documents dependent. A single html entry point can be used to
1807
- present an organized documentation dashboard to the designer.""")
1808
-
1809
- doctypes = ['datasheet',
1810
- 'reference',
1811
- 'userguide',
1812
- 'quickstart',
1813
- 'releasenotes',
1814
- 'testplan',
1815
- 'signoff',
1816
- 'tutorial']
1817
-
1818
- for item in doctypes:
1819
- scparam(cfg, ['package', 'doc', item],
1820
- sctype='[file]',
1821
- scope=Scope.GLOBAL,
1822
- shorthelp=f"Package: {item} document",
1823
- switch=f"-package_doc_{item} <file>",
1824
- example=[
1825
- f"cli: -package_doc_{item} {item}.pdf",
1826
- f"api: chip.set('package', 'doc', '{item}', '{item}.pdf')"],
1827
- schelp=f"""Package list of {item} documents.""")
1693
+ "cli: +incdir+./mylib",
1694
+ "cli: -I ./mylib",
1695
+ "cli: -idir ./mylib",
1696
+ "api: chip.set('option', 'idir', './mylib')"],
1697
+ schelp="""
1698
+ Search paths to look for files included in the design using
1699
+ the ```include`` statement.""")
1828
1700
 
1829
- scparam(cfg, ['package', 'license'],
1830
- sctype='[str]',
1831
- scope=Scope.GLOBAL,
1832
- shorthelp="Package: license identifiers",
1833
- switch="-package_license <str>",
1701
+ scparam(cfg, ['option', 'ydir'],
1702
+ sctype='[dir]',
1703
+ shorthelp="Option: design module search paths",
1704
+ copy=True,
1705
+ switch=['-y <dir>',
1706
+ '-ydir <dir>'],
1834
1707
  example=[
1835
- "cli: -package_license 'Apache-2.0'",
1836
- "api: chip.set('package', 'license', 'Apache-2.0')"],
1837
- schelp="""Package list of SPDX license identifiers.""")
1708
+ "cli: -y './mylib'",
1709
+ "cli: -ydir './mylib'",
1710
+ "api: chip.set('option', 'ydir', './mylib')"],
1711
+ schelp="""
1712
+ Search paths to look for verilog modules found in the the
1713
+ source list. The import engine will look for modules inside
1714
+ files with the specified :keypath:`option,libext` param suffix.""")
1838
1715
 
1839
- scparam(cfg, ['package', 'licensefile'],
1716
+ scparam(cfg, ['option', 'vlib'],
1840
1717
  sctype='[file]',
1841
- scope=Scope.GLOBAL,
1842
- shorthelp="Package: license files",
1843
- switch="-package_licensefile <file>",
1844
- example=[
1845
- "cli: -package_licensefile './LICENSE'",
1846
- "api: chip.set('package', 'licensefile', './LICENSE')"],
1847
- schelp="""Package list of license files for to be
1848
- applied in cases when a SPDX identifier is not available.
1849
- (eg. proprietary licenses).""")
1718
+ shorthelp="Option: design libraries",
1719
+ copy=True,
1720
+ switch=['-v <file>',
1721
+ '-vlib <file>'],
1722
+ example=["cli: -v './mylib.v'",
1723
+ "cli: -vlib './mylib.v'",
1724
+ "api: chip.set('option', 'vlib', './mylib.v')"],
1725
+ schelp="""
1726
+ List of library files to be read in. Modules found in the
1727
+ libraries are not interpreted as root modules.""")
1850
1728
 
1851
- scparam(cfg, ['package', 'organization'],
1729
+ scparam(cfg, ['option', 'define'],
1852
1730
  sctype='[str]',
1853
- scope=Scope.GLOBAL,
1854
- shorthelp="Package: sponsoring organization",
1855
- switch="-package_organization <str>",
1856
- example=[
1857
- "cli: -package_organization 'humanity'",
1858
- "api: chip.set('package', 'organization', 'humanity')"],
1859
- schelp="""Package sponsoring organization. The field can be left
1860
- blank if not applicable.""")
1861
-
1862
- record = ['name',
1863
- 'email',
1864
- 'username',
1865
- 'location',
1866
- 'organization',
1867
- 'publickey']
1868
-
1869
- for item in record:
1870
- scparam(cfg, ['package', 'author', userid, item],
1871
- sctype='str',
1872
- scope=Scope.GLOBAL,
1873
- shorthelp=f"Package: author {item}",
1874
- switch=f"-package_author_{item} 'userid <str>'",
1875
- example=[
1876
- f"cli: -package_author_{item} 'wiley wiley@acme.com'",
1877
- f"api: chip.set('package', 'author', 'wiley', '{item}', 'wiley@acme.com')"],
1878
- schelp=f"""Package author {item} provided with full name as key and
1879
- {item} as value.""")
1880
-
1881
- source = 'default'
1731
+ shorthelp="Option: design pre-processor symbol",
1732
+ switch=["-D<str>",
1733
+ "-define <str>"],
1734
+ example=["cli: -DCFG_ASIC=1",
1735
+ "cli: -define CFG_ASIC=1",
1736
+ "api: chip.set('option', 'define', 'CFG_ASIC=1')"],
1737
+ schelp="""Symbol definition for source preprocessor.""")
1882
1738
 
1883
- scparam(cfg, ['package', 'source', source, 'path'],
1884
- sctype='str',
1885
- scope=Scope.GLOBAL,
1886
- shorthelp="Package: data source path",
1887
- switch="-package_source_path 'source <str>'",
1888
- example=[
1889
- "cli: -package_source_path "
1890
- "'freepdk45_data ssh://git@github.com/siliconcompiler/freepdk45/'",
1891
- "api: chip.set('package', 'source', "
1892
- "'freepdk45_data', 'path', 'ssh://git@github.com/siliconcompiler/freepdk45/')"],
1893
- schelp="""
1894
- Package data source path, allowed paths:
1895
-
1896
- * /path/on/network/drive
1897
- * file:///path/on/network/drive
1898
- * git+https://github.com/xyz/xyz
1899
- * git://github.com/xyz/xyz
1900
- * git+ssh://github.com/xyz/xyz
1901
- * ssh://github.com/xyz/xyz
1902
- * https://github.com/xyz/xyz/archive
1903
- * https://zeroasic.com/xyz.tar.gz
1904
- * python://siliconcompiler
1905
- """)
1739
+ scparam(cfg, ['option', 'libext'],
1740
+ sctype='[str]',
1741
+ shorthelp="Option: design file extensions",
1742
+ switch=["+libext+<str>",
1743
+ "-libext <str>"],
1744
+ example=[
1745
+ "cli: +libext+sv",
1746
+ "cli: -libext sv",
1747
+ "api: chip.set('option', 'libext', 'sv')"],
1748
+ schelp="""
1749
+ List of file extensions that should be used for finding modules.
1750
+ For example, if :keypath:`option,ydir` is specified as ./lib", and '.v'
1751
+ is specified as libext then the files ./lib/\\*.v ", will be searched for
1752
+ module matches.""")
1906
1753
 
1907
- scparam(cfg, ['package', 'source', source, 'ref'],
1754
+ name = 'default'
1755
+ scparam(cfg, ['option', 'param', name],
1908
1756
  sctype='str',
1909
- scope=Scope.GLOBAL,
1910
- shorthelp="Package: data source reference",
1911
- switch="-package_source_ref 'source <str>'",
1757
+ shorthelp="Option: design parameter",
1758
+ switch="-param 'name <str>'",
1912
1759
  example=[
1913
- "cli: -package_source_ref 'freepdk45_data 07ec4aa'",
1914
- "api: chip.set('package', 'source', 'freepdk45_data', 'ref', '07ec4aa')"],
1915
- schelp="""Package data source reference""")
1760
+ "cli: -param 'N 64'",
1761
+ "api: chip.set('option', 'param', 'N', '64')"],
1762
+ schelp="""
1763
+ Sets a top verilog level design module parameter. The value
1764
+ is limited to basic data literals. The parameter override is
1765
+ passed into tools such as Verilator and Yosys. The parameters
1766
+ support Verilog integer literals (64'h4, 2'b0, 4) and strings.
1767
+ Name of the top level module to compile.""")
1916
1768
 
1917
1769
  return cfg
1918
1770
 
1919
1771
 
1772
+ ############################################
1773
+ # Package information
1774
+ ############################################
1775
+ def schema_package(cfg):
1776
+ from siliconcompiler.packageschema import PackageSchema
1777
+ cfg.insert("package", PackageSchema())
1778
+ return cfg
1779
+
1780
+
1920
1781
  ############################################
1921
1782
  # Design Checklist
1922
1783
  ############################################
1923
1784
  def schema_checklist(cfg):
1924
1785
  from siliconcompiler.checklist import ChecklistSchema
1925
- cfg.insert("checklist", "default", ChecklistSchema())
1786
+ cfg.insert("checklist", "default", ChecklistSchema(None))
1926
1787
  return cfg
1927
1788
 
1928
1789