siliconcompiler 0.26.0__cp310-cp310-win_amd64.whl → 0.26.2__cp310-cp310-win_amd64.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.
@@ -1,5 +1,5 @@
1
1
  # Version number following semver standard.
2
- version = '0.26.0'
2
+ version = '0.26.2'
3
3
 
4
4
  # Default server address for remote runs, if unspecified.
5
5
  default_server = 'https://server.siliconcompiler.com'
@@ -0,0 +1,192 @@
1
+ # Copyright 2023 Silicon Compiler Authors. All Rights Reserved.
2
+ import argparse
3
+ import sys
4
+ import os
5
+ import importlib
6
+ from inspect import getmembers, isfunction, getfullargspec
7
+ from siliconcompiler._metadata import version
8
+ from siliconcompiler.schema import utils
9
+
10
+
11
+ __default_source_file = "make.py"
12
+
13
+
14
+ def __process_file(path):
15
+ if not os.path.exists(path):
16
+ return {}, None, None
17
+ mod_name = 'scmake'
18
+ spec = importlib.util.spec_from_file_location(mod_name, path)
19
+ make = importlib.util.module_from_spec(spec)
20
+ sys.modules[mod_name] = make
21
+ syspath = sys.path.copy()
22
+ sys.path.insert(0, os.getcwd())
23
+ spec.loader.exec_module(make)
24
+ sys.path = syspath
25
+
26
+ args = {}
27
+ for name, func in getmembers(make, isfunction):
28
+ if name.startswith('_'):
29
+ continue
30
+
31
+ # generate doc
32
+ docstring = utils.trim(func.__doc__)
33
+ if not docstring:
34
+ docstring = f"run \"{name}\""
35
+ short_help = docstring.splitlines()[0]
36
+
37
+ func_spec = getfullargspec(func)
38
+
39
+ func_args = {}
40
+ for arg in func_spec.args:
41
+ arg_type = str
42
+ if arg in func_spec.annotations:
43
+ arg_type = func_spec.annotations[arg]
44
+ func_args[arg] = arg_type
45
+
46
+ args[name] = {
47
+ "function": func,
48
+ "help": short_help,
49
+ "full_help": docstring,
50
+ "args": func_args
51
+ }
52
+
53
+ if args:
54
+ default_arg = list(args.keys())[0]
55
+ else:
56
+ default_arg = None
57
+
58
+ default_arg = getattr(make, '__scdefault', default_arg)
59
+
60
+ module_help = utils.trim(make.__doc__)
61
+
62
+ return args, default_arg, module_help
63
+
64
+
65
+ def main():
66
+ progname = "smake"
67
+ description = f"""-----------------------------------------------------------
68
+ SC app that provides an Makefile like interface to python
69
+ configuration files. This utility app will analyze a file
70
+ "{__default_source_file}" or the file specified with --file to determine
71
+ the available targets.
72
+
73
+ To view the help, use:
74
+ smake --help
75
+
76
+ or view the help for a specific target:
77
+ smake --help <target>
78
+
79
+ To run a target, use:
80
+ smake <target>
81
+
82
+ or run a target from a file other than "{__default_source_file}":
83
+ smake --file <file> <target>
84
+
85
+ or run a target in a different directory:
86
+ smake --directory <directory> <target>
87
+
88
+ To run a target with supported arguments, use:
89
+ smake <target> --flow asicflow
90
+ -----------------------------------------------------------"""
91
+
92
+ # handle source file identification before arg parse
93
+ source_file = __default_source_file
94
+ file_args = ('--file', '-f')
95
+ for file_arg in file_args:
96
+ if file_arg in sys.argv:
97
+ source_file_idx = sys.argv.index(file_arg) + 1
98
+ if source_file_idx < len(sys.argv):
99
+ source_file = sys.argv[source_file_idx]
100
+ else:
101
+ source_file = None
102
+ break
103
+
104
+ # handle directory identification before arg parse
105
+ source_dir = os.getcwd()
106
+ dir_args = ('--directory', '-C')
107
+ for file_arg in dir_args:
108
+ if file_arg in sys.argv:
109
+ source_dir_idx = sys.argv.index(file_arg) + 1
110
+ if source_dir_idx < len(sys.argv):
111
+ source_dir = sys.argv[source_dir_idx]
112
+ else:
113
+ source_dir = None
114
+ break
115
+
116
+ if source_dir:
117
+ if not os.path.isdir(source_dir):
118
+ print(f"Unable to change directory to {source_dir}")
119
+ return 1
120
+
121
+ os.chdir(source_dir)
122
+
123
+ make_args = {}
124
+ default_arg = None
125
+ module_help = None
126
+ if source_file:
127
+ make_args, default_arg, module_help = __process_file(source_file)
128
+
129
+ if module_help:
130
+ description += \
131
+ f"\n\n{module_help}\n\n-----------------------------------------------------------"
132
+
133
+ parser = argparse.ArgumentParser(
134
+ progname,
135
+ description=description,
136
+ formatter_class=argparse.RawDescriptionHelpFormatter)
137
+
138
+ parser.add_argument(
139
+ *file_args,
140
+ metavar='<file>',
141
+ help=f'Use file as makefile, default is {__default_source_file}')
142
+
143
+ parser.add_argument(
144
+ *dir_args,
145
+ metavar='<directory>',
146
+ help='Change to directory <directory> before reading the makefile.')
147
+
148
+ parser.add_argument(
149
+ '--version', '-v',
150
+ action='version',
151
+ version=version)
152
+
153
+ targetparsers = parser.add_subparsers(
154
+ dest='target',
155
+ metavar='<target>',
156
+ help='Target to execute')
157
+
158
+ for arg, info in make_args.items():
159
+ subparse = targetparsers.add_parser(
160
+ arg,
161
+ description=info['full_help'],
162
+ help=info['help'])
163
+
164
+ for subarg, subarg_type in info['args'].items():
165
+ subparse.add_argument(
166
+ f'--{subarg}',
167
+ dest=f'sub_{subarg}',
168
+ metavar=f'<{subarg}>',
169
+ type=subarg_type)
170
+
171
+ args = parser.parse_args()
172
+ target = args.target
173
+ if not target:
174
+ target = default_arg
175
+
176
+ if not os.path.isfile(source_file):
177
+ print(f"Unable to load {source_file}")
178
+ return 1
179
+
180
+ call_args = {}
181
+ args_vars = vars(args)
182
+ for arg in make_args[target]["args"]:
183
+ if f'sub_{arg}' in args_vars and args_vars[f'sub_{arg}'] is not None:
184
+ call_args[arg] = args_vars[f'sub_{arg}']
185
+ make_args[target]["function"](**call_args)
186
+
187
+ return 0
188
+
189
+
190
+ #########################
191
+ if __name__ == "__main__":
192
+ sys.exit(main())
siliconcompiler/core.py CHANGED
@@ -2054,6 +2054,59 @@ class Chip:
2054
2054
  except graphviz.ExecutableNotFound as e:
2055
2055
  self.logger.error(f'Unable to save flowgraph: {e}')
2056
2056
 
2057
+ ########################################################################
2058
+ def swap_library(self, org_library, new_library, step=None, index=None):
2059
+ '''
2060
+ Recursively changes a library in ['option', 'library'] from a previous
2061
+ value to a new value. If the library is not present then nothing is
2062
+ changed. If the new library is None, the original library will be removed.
2063
+
2064
+ Args:
2065
+ org_library (str): Name of old library
2066
+ new_library (str): Name of new library
2067
+ step(str): Step to change, if not specified, all steps will be modified
2068
+ index (str): Index to change, if not specified, all indexes will be modified
2069
+
2070
+ Examples:
2071
+ >>> chip.swap_library('lambdalib_iolib', 'lambdalib_sky130iolib')
2072
+ Changes from the lambdalib_iolib to lambdalib_sky130iolib.
2073
+ '''
2074
+ all_libraries = self.getkeys('library')
2075
+
2076
+ def swap(*key):
2077
+ if step is not None:
2078
+ r_step = step
2079
+ r_index = index
2080
+ if r_index is None:
2081
+ r_index = Schema.GLOBAL_KEY
2082
+
2083
+ val = self.get(*key, step=r_step, index=r_index)
2084
+ if new_library is None:
2085
+ self.set(*key, [v for v in val if v != org_library],
2086
+ step=r_step, index=r_index)
2087
+ else:
2088
+ self.set(*key,
2089
+ list(map(lambda x: x.replace(org_library, new_library), val)),
2090
+ step=r_step, index=r_index)
2091
+ else:
2092
+ for val, r_step, r_index in self.schema._getvals(*key):
2093
+ if r_step is None:
2094
+ r_step = Schema.GLOBAL_KEY
2095
+ if r_index is None:
2096
+ r_index = Schema.GLOBAL_KEY
2097
+
2098
+ if new_library is None:
2099
+ self.set(*key, [v for v in val if v != org_library],
2100
+ step=r_step, index=r_index)
2101
+ else:
2102
+ self.set(*key,
2103
+ list(map(lambda x: x.replace(org_library, new_library), val)),
2104
+ step=r_step, index=r_index)
2105
+
2106
+ swap('option', 'library')
2107
+ for lib in all_libraries:
2108
+ swap('library', lib, 'option', 'library')
2109
+
2057
2110
  ########################################################################
2058
2111
  def collect(self, directory=None, verbose=True, whitelist=None):
2059
2112
  '''
@@ -13,9 +13,7 @@ import multiprocessing
13
13
  from siliconcompiler import utils, SiliconCompilerError
14
14
  from siliconcompiler import NodeStatus as SCNodeStatus
15
15
  from siliconcompiler._metadata import default_server
16
- from siliconcompiler.schema import Schema
17
- from siliconcompiler.scheduler import _setup_node, _runtask, _executenode, clean_node_dir
18
- from siliconcompiler.flowgraph import _get_flowgraph_entry_nodes, nodes_to_execute
16
+ from siliconcompiler.flowgraph import nodes_to_execute
19
17
  from siliconcompiler.remote import JobStatus
20
18
 
21
19
  # Step name to use while logging
@@ -59,6 +57,10 @@ def get_base_url(chip):
59
57
  return remote_protocol + remote_host
60
58
 
61
59
 
60
+ def get_remote_manifest(chip):
61
+ return f'{chip.getworkdir()}/sc_remote.pkg.json'
62
+
63
+
62
64
  ###################################
63
65
  def __post(chip, url, post_action, success_action, error_action=None):
64
66
  '''
@@ -128,75 +130,10 @@ def __build_post_params(chip, verbose, job_name=None, job_hash=None):
128
130
 
129
131
 
130
132
  ###################################
131
- def _remote_preprocess(chip, remote_nodelist):
133
+ def _remote_preprocess(chip):
132
134
  '''
133
135
  Helper method to run a local import stage for remote jobs.
134
136
  '''
135
- preset_step = chip.get('arg', 'step')
136
- preset_index = chip.get('arg', 'index')
137
-
138
- # Fetch a list of 'import' steps, and make sure they're all at the start of the flow.
139
- flow = chip.get('option', 'flow')
140
- entry_nodes = _get_flowgraph_entry_nodes(chip, flow)
141
- if any([node not in remote_nodelist for node in entry_nodes]) or (len(remote_nodelist) == 1):
142
- chip.logger.error('Remote flows must be organized such that the starting task(s) are run '
143
- 'before all other steps, and at least one other task is included.')
144
- chip.logger.error('Full nodelist: '
145
- f'{", ".join([f"{step}{index}" for step, index in remote_nodelist])}')
146
- chip.logger.error('Starting nodes: '
147
- f'{", ".join([f"{step}{index}" for step, index in entry_nodes])}')
148
- raise SiliconCompilerError('Remote setup invalid', chip=chip)
149
-
150
- # Setup up tools for all local functions
151
- for local_step, index in entry_nodes.copy():
152
- if not _setup_node(chip, local_step, index):
153
- entry_nodes.remove((local_step, index))
154
-
155
- # Setup up tools for all local functions
156
- for local_step, index in entry_nodes:
157
- # Need to set step/index to only run this node locally
158
- chip.set('arg', 'step', local_step)
159
- chip.set('arg', 'index', index)
160
-
161
- if chip.get('option', 'clean') or \
162
- chip.get('record', 'status', step=local_step, index=index) != SCNodeStatus.SUCCESS:
163
- # Run the actual import step locally with multiprocess as _runtask must
164
- # be run in a separate thread.
165
- # We can pass in an empty 'status' dictionary, since _runtask() will
166
- # only look up a step's dependencies in this dictionary, and the first
167
- # step should have none.
168
- clean_node_dir(chip, local_step, index)
169
-
170
- run_task = multiprocessor.Process(target=_runtask,
171
- args=(chip,
172
- flow,
173
- local_step,
174
- index,
175
- _executenode))
176
- run_task.start()
177
- run_task.join()
178
- ftask = f'{local_step}{index}'
179
- if run_task.exitcode != 0:
180
- # A 'None' or nonzero value indicates that the Process target failed.
181
- raise SiliconCompilerError(
182
- f"Could not start remote job: local setup task {ftask} failed.",
183
- chip=chip)
184
- manifest = os.path.join(chip.getworkdir(step=local_step, index=index),
185
- 'outputs',
186
- f'{chip.design}.pkg.json')
187
- if os.path.exists(manifest):
188
- chip.schema.read_journal(manifest)
189
- else:
190
- raise SiliconCompilerError(
191
- f"Output manifest is missing from {ftask}.",
192
- chip=chip)
193
-
194
- # Read in manifest
195
- manifest = os.path.join(chip.getworkdir(step=local_step, index=index),
196
- 'outputs',
197
- f'{chip.design}.pkg.json')
198
- if os.path.exists(manifest):
199
- chip.schema.read_journal(manifest)
200
137
 
201
138
  # Ensure packages with python sources are copied
202
139
  for key in chip.allkeys():
@@ -219,10 +156,6 @@ def _remote_preprocess(chip, remote_nodelist):
219
156
  cfg = get_remote_config(chip, False)
220
157
  chip.collect(whitelist=cfg.setdefault('directory_whitelist', []))
221
158
 
222
- # Recover step/index
223
- chip.set('arg', 'step', preset_step)
224
- chip.set('arg', 'index', preset_index)
225
-
226
159
 
227
160
  ###################################
228
161
  def _log_truncated_stats(chip, status, nodes_with_status, nodes_to_print):
@@ -366,7 +299,7 @@ def remote_process(chip):
366
299
  raise SiliconCompilerError('Cannot pass [arg,index] parameter into remote flow.', chip=chip)
367
300
  # Only run the pre-process step if the job doesn't already have a remote ID.
368
301
  if not remote_resume:
369
- _remote_preprocess(chip, nodes_to_execute(chip, chip.get('option', 'flow')))
302
+ _remote_preprocess(chip)
370
303
 
371
304
  # Run the job on the remote server, and wait for it to finish.
372
305
  # Set logger to indicate remote run
@@ -410,13 +343,9 @@ def remote_run_loop(chip, check_interval):
410
343
  try:
411
344
  __remote_run_loop(chip, check_interval)
412
345
  except KeyboardInterrupt:
413
- entry_step, entry_index = \
414
- _get_flowgraph_entry_nodes(chip, chip.get('option', 'flow'))[0]
415
- entry_manifest = os.path.join(chip.getworkdir(step=entry_step, index=entry_index),
416
- 'outputs',
417
- f'{chip.design}.pkg.json')
418
- reconnect_cmd = f'sc-remote -cfg {entry_manifest} -reconnect'
419
- cancel_cmd = f'sc-remote -cfg {entry_manifest} -cancel'
346
+ manifest_path = get_remote_manifest(chip)
347
+ reconnect_cmd = f'sc-remote -cfg {manifest_path} -reconnect'
348
+ cancel_cmd = f'sc-remote -cfg {manifest_path} -cancel'
420
349
  chip.logger.info('Disconnecting from remote job')
421
350
  chip.logger.info(f'To reconnect to this job use: {reconnect_cmd}')
422
351
  chip.logger.info(f'To cancel this job use: {cancel_cmd}')
@@ -500,30 +429,6 @@ def check_progress(chip):
500
429
  return [], True
501
430
 
502
431
 
503
- ###################################
504
- def _update_entry_manifests(chip):
505
- '''
506
- Helper method to update locally-run manifests to include remote job ID.
507
- '''
508
-
509
- flow = chip.get('option', 'flow')
510
- jobid = chip.get('record', 'remoteid')
511
- design = chip.get('design')
512
-
513
- entry_nodes = _get_flowgraph_entry_nodes(chip, flow)
514
- for step, index in entry_nodes:
515
- manifest_path = os.path.join(chip.getworkdir(step=step, index=index),
516
- 'outputs',
517
- f'{design}.pkg.json')
518
-
519
- if not os.path.exists(manifest_path):
520
- continue
521
- tmp_schema = Schema(manifest=manifest_path)
522
- tmp_schema.set('record', 'remoteid', jobid)
523
- with open(manifest_path, 'w') as new_manifest:
524
- tmp_schema.write_json(new_manifest)
525
-
526
-
527
432
  ###################################
528
433
  def _request_remote_run(chip):
529
434
  '''
@@ -580,7 +485,10 @@ def _request_remote_run(chip):
580
485
  if 'message' in resp and resp['message']:
581
486
  chip.logger.info(resp['message'])
582
487
  chip.set('record', 'remoteid', resp['job_hash'])
583
- _update_entry_manifests(chip)
488
+
489
+ manifest = get_remote_manifest(chip)
490
+ chip.write_manifest(manifest)
491
+
584
492
  chip.logger.info(f"Your job's reference ID is: {resp['job_hash']}")
585
493
 
586
494
  return remote_status['progress_interval']
@@ -59,7 +59,7 @@ def get_flowgraph_nodes(chip, step, index):
59
59
  if value is not None:
60
60
  if key == 'inputnode':
61
61
  value = ", ".join([f'{step}{index}' for step, index in value])
62
- nodes[key] = value
62
+ nodes[key] = str(value)
63
63
  return nodes
64
64
 
65
65
 
@@ -11,7 +11,7 @@ try:
11
11
  except ImportError:
12
12
  from siliconcompiler.schema.utils import trim
13
13
 
14
- SCHEMA_VERSION = '0.44.2'
14
+ SCHEMA_VERSION = '0.44.3'
15
15
 
16
16
  #############################################################################
17
17
  # PARAM DEFINITION
@@ -1273,12 +1273,21 @@ def schema_datasheet(cfg, name='default', mode='default'):
1273
1273
 
1274
1274
  scparam(cfg, ['datasheet', 'package', name, 'netname', name],
1275
1275
  sctype='str',
1276
- shorthelp="Datasheet: package pin netname",
1276
+ shorthelp="Datasheet: package pin net name",
1277
1277
  switch="-datasheet_package_netname 'name name <str>'",
1278
1278
  example=[
1279
1279
  "cli: -datasheet_package_netname 'abcd B1 VDD'",
1280
1280
  "api: chip.set('datasheet', 'package', 'abcd', 'netname', 'B1', 'VDD')"],
1281
- schelp="""Datsheet: Net name connected to package pin.""")
1281
+ schelp="""Datsheet: Device net connected to the pin.""")
1282
+
1283
+ scparam(cfg, ['datasheet', 'package', name, 'portname', name],
1284
+ sctype='str',
1285
+ shorthelp="Datasheet: package pin port name",
1286
+ switch="-datasheet_package_portname 'name name <str>'",
1287
+ example=[
1288
+ "cli: -datasheet_package_portname 'abcd B1 VDD'",
1289
+ "api: chip.set('datasheet', 'package', 'abcd', 'portname', 'B1', 'VDD')"],
1290
+ schelp="""Datsheet: Device port connected to the pin.""")
1282
1291
 
1283
1292
  ######################
1284
1293
  # Pin Specifications
@@ -1737,6 +1746,7 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1737
1746
  scparam(cfg, ['tool', tool, 'task', task, 'file', key],
1738
1747
  sctype='[file]',
1739
1748
  pernode='optional',
1749
+ copy=True,
1740
1750
  shorthelp="Task: setup files",
1741
1751
  switch="-tool_task_file 'tool task key <file>'",
1742
1752
  example=[
@@ -1752,6 +1762,7 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1752
1762
  scparam(cfg, ['tool', tool, 'task', task, 'dir', key],
1753
1763
  sctype='[dir]',
1754
1764
  pernode='optional',
1765
+ copy=True,
1755
1766
  shorthelp="Task: setup directories",
1756
1767
  switch="-tool_task_dir 'tool task key <dir>'",
1757
1768
  example=[
@@ -1912,6 +1923,7 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1912
1923
  scparam(cfg, ['tool', tool, 'task', task, 'prescript'],
1913
1924
  sctype='[file]',
1914
1925
  pernode='optional',
1926
+ copy=True,
1915
1927
  shorthelp="Task: pre-step script",
1916
1928
  switch="-tool_task_prescript 'tool task <file>'",
1917
1929
  example=[
@@ -1927,6 +1939,7 @@ def schema_task(cfg, tool='default', task='default', step='default', index='defa
1927
1939
  scparam(cfg, ['tool', tool, 'task', task, 'postscript'],
1928
1940
  sctype='[file]',
1929
1941
  pernode='optional',
1942
+ copy=True,
1930
1943
  shorthelp="Task: post-step script",
1931
1944
  switch="-tool_task_postscript 'tool task <file>'",
1932
1945
  example=[
@@ -2640,6 +2653,7 @@ def schema_option(cfg):
2640
2653
  scparam(cfg, ['option', 'file', key],
2641
2654
  sctype='[file]',
2642
2655
  scope='job',
2656
+ copy=True,
2643
2657
  shorthelp="Custom files",
2644
2658
  switch="-file 'key <file>'",
2645
2659
  example=[
@@ -2654,6 +2668,7 @@ def schema_option(cfg):
2654
2668
  scparam(cfg, ['option', 'dir', key],
2655
2669
  sctype='[dir]',
2656
2670
  scope='job',
2671
+ copy=True,
2657
2672
  shorthelp="Custom directories",
2658
2673
  switch="-dir 'key <dir>'",
2659
2674
  example=[
@@ -2876,6 +2891,7 @@ def schema_option(cfg):
2876
2891
  scparam(cfg, ['option', 'idir'],
2877
2892
  sctype='[dir]',
2878
2893
  shorthelp="Design search paths",
2894
+ copy=True,
2879
2895
  switch=['+incdir+<dir>',
2880
2896
  '-I <dir>',
2881
2897
  '-idir <dir>'],
@@ -2891,6 +2907,7 @@ def schema_option(cfg):
2891
2907
  scparam(cfg, ['option', 'ydir'],
2892
2908
  sctype='[dir]',
2893
2909
  shorthelp="Design module search paths",
2910
+ copy=True,
2894
2911
  switch=['-y <dir>',
2895
2912
  '-ydir <dir>'],
2896
2913
  example=[
@@ -2905,6 +2922,7 @@ def schema_option(cfg):
2905
2922
  scparam(cfg, ['option', 'vlib'],
2906
2923
  sctype='[file]',
2907
2924
  shorthelp="Design libraries",
2925
+ copy=True,
2908
2926
  switch=['-v <file>',
2909
2927
  '-vlib <file>'],
2910
2928
  example=["cli: -v './mylib.v'",
@@ -68,9 +68,10 @@ if { [sc_cfg_tool_task_exists file padring] && \
68
68
  ###########################
69
69
  # Generate pad ring
70
70
  ###########################
71
- set padring_file [lindex [sc_cfg_tool_task_get {file} padring] 0]
72
- puts "Sourcing padring configuration: ${padring_file}"
73
- source $padring_file
71
+ foreach padring_file [sc_cfg_tool_task_get {file} padring] {
72
+ puts "Sourcing padring configuration: ${padring_file}"
73
+ source $padring_file
74
+ }
74
75
 
75
76
  if { [sc_design_has_unplaced_pads] } {
76
77
  foreach inst [[ord::get_db_block] getInsts] {
@@ -34,7 +34,7 @@ proc sc_global_placement_density {} {
34
34
 
35
35
  # Final selection
36
36
  set or_uniform_zero_adjusted_density \
37
- [expr { $or_uniform_density + $or_adjust_density_adder }]
37
+ [expr { min($or_uniform_density + $or_adjust_density_adder, 1.0) }]
38
38
 
39
39
  if { $selected_density < $or_uniform_density } {
40
40
  utl::warn FLW 1 "Using computed density of ([format %0.3f $or_uniform_zero_adjusted_density])\
siliconcompiler/use.py CHANGED
@@ -5,10 +5,50 @@ from siliconcompiler import Chip
5
5
 
6
6
  class PackageChip(Chip):
7
7
  def __init__(self, chip, name, package=None):
8
- self.__package = package
8
+ # Start with None as init setting will not depend on package
9
+ self.__package = None
10
+
9
11
  super().__init__(name)
10
12
  self.logger = chip.logger
11
13
 
14
+ path = None
15
+ ref = None
16
+ if isinstance(package, (tuple, list)):
17
+ if len(package) == 3:
18
+ package, path, ref = package
19
+ elif len(package) == 2:
20
+ package, path = package
21
+ else:
22
+ raise ValueError(f"{package} should be a 2 or 3 item tuple or list.")
23
+ elif isinstance(package, dict):
24
+ if len(package) == 1:
25
+ info = list(package.values())[0]
26
+ if "path" not in info:
27
+ raise ValueError(f"{package} should contain a path key.")
28
+ path = info["path"]
29
+ if "ref" in info:
30
+ ref = info["ref"]
31
+
32
+ package = list(package.keys())[0]
33
+ else:
34
+ raise ValueError(f"{package} cannot contain multiple packages.")
35
+ elif isinstance(package, str):
36
+ pass
37
+ else:
38
+ if package is not None:
39
+ raise ValueError(f"{package} is not supported.")
40
+
41
+ if path:
42
+ self.register_source(package, path, ref=ref)
43
+
44
+ self.__package = package
45
+
46
+ # Clear all copy flags since these are libraries, pdks, fpga, etc.
47
+ for key in self.allkeys():
48
+ sc_type = self.get(*key, field='type')
49
+ if 'file' in sc_type or 'dir' in sc_type:
50
+ self.set(*key, False, field='copy')
51
+
12
52
  def add(self, *args, field='value', step=None, index=None, package=None):
13
53
  if not package:
14
54
  package = self.__package
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: siliconcompiler
3
- Version: 0.26.0
3
+ Version: 0.26.2
4
4
  Summary: A compiler framework that automates translation from source code to silicon.
5
5
  Home-page: https://siliconcompiler.com
6
6
  Author: Andreas Olofsson
@@ -13,46 +13,46 @@ Project-URL: Forum, https://github.com/siliconcompiler/siliconcompiler/discussio
13
13
  Requires-Python: >=3.8
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
- Requires-Dist: aiohttp ==3.9.5
17
- Requires-Dist: requests ==2.32.3
18
- Requires-Dist: PyYAML ==6.0.1
19
- Requires-Dist: pandas >=1.1.5
20
- Requires-Dist: Jinja2 >=2.11.3
21
- Requires-Dist: graphviz ==0.20.3
22
- Requires-Dist: distro ==1.9.0
23
- Requires-Dist: packaging <24,>=21.3
24
- Requires-Dist: psutil >=5.8.0
25
- Requires-Dist: Pillow ==10.4.0
26
- Requires-Dist: GitPython ==3.1.43
27
- Requires-Dist: lambdapdk >=0.1.25
28
- Requires-Dist: PyGithub ==2.3.0
29
- Requires-Dist: urllib3 >=1.26.0
30
- Requires-Dist: fasteners ==0.19
31
- Requires-Dist: fastjsonschema ==2.20.0
32
- Requires-Dist: docker ==7.1.0
33
- Requires-Dist: streamlit ==1.36.0
34
- Requires-Dist: streamlit-agraph ==0.0.45
35
- Requires-Dist: streamlit-tree-select ==0.0.5
36
- Requires-Dist: streamlit-javascript ==0.1.5
37
- Requires-Dist: importlib-metadata ; python_version < "3.10"
16
+ Requires-Dist: aiohttp==3.10.3
17
+ Requires-Dist: requests==2.32.3
18
+ Requires-Dist: PyYAML==6.0.2
19
+ Requires-Dist: pandas>=1.1.5
20
+ Requires-Dist: Jinja2>=2.11.3
21
+ Requires-Dist: graphviz==0.20.3
22
+ Requires-Dist: distro==1.9.0
23
+ Requires-Dist: packaging<24,>=21.3
24
+ Requires-Dist: psutil>=5.8.0
25
+ Requires-Dist: Pillow==10.4.0
26
+ Requires-Dist: GitPython==3.1.43
27
+ Requires-Dist: lambdapdk>=0.1.25
28
+ Requires-Dist: PyGithub==2.3.0
29
+ Requires-Dist: urllib3>=1.26.0
30
+ Requires-Dist: fasteners==0.19
31
+ Requires-Dist: fastjsonschema==2.20.0
32
+ Requires-Dist: docker==7.1.0
33
+ Requires-Dist: streamlit==1.37.1
34
+ Requires-Dist: streamlit-agraph==0.0.45
35
+ Requires-Dist: streamlit-tree-select==0.0.5
36
+ Requires-Dist: streamlit-javascript==0.1.5
37
+ Requires-Dist: importlib-metadata; python_version < "3.10"
38
38
  Provides-Extra: docs
39
- Requires-Dist: Sphinx ==7.4.7 ; extra == 'docs'
40
- Requires-Dist: pip-licenses ==4.5.1 ; extra == 'docs'
41
- Requires-Dist: pydata-sphinx-theme ==0.15.4 ; extra == 'docs'
42
- Requires-Dist: sc-leflib >=0.2.0 ; extra == 'docs'
39
+ Requires-Dist: Sphinx==8.0.2; extra == "docs"
40
+ Requires-Dist: pip-licenses==5.0.0; extra == "docs"
41
+ Requires-Dist: pydata-sphinx-theme==0.15.4; extra == "docs"
42
+ Requires-Dist: sc-leflib>=0.2.0; extra == "docs"
43
43
  Provides-Extra: examples
44
- Requires-Dist: migen ==0.9.2 ; extra == 'examples'
45
- Requires-Dist: lambdalib ==0.2.6 ; extra == 'examples'
44
+ Requires-Dist: migen==0.9.2; extra == "examples"
45
+ Requires-Dist: lambdalib==0.2.9; extra == "examples"
46
46
  Provides-Extra: test
47
- Requires-Dist: pytest ==8.3.1 ; extra == 'test'
48
- Requires-Dist: pytest-xdist ==3.6.1 ; extra == 'test'
49
- Requires-Dist: pytest-timeout ==2.3.1 ; extra == 'test'
50
- Requires-Dist: pytest-asyncio ==0.23.8 ; extra == 'test'
51
- Requires-Dist: pytest-cov ==5.0.0 ; extra == 'test'
52
- Requires-Dist: PyVirtualDisplay ==3.0 ; extra == 'test'
53
- Requires-Dist: flake8 ==7.1.0 ; extra == 'test'
54
- Requires-Dist: tclint ==0.3.2 ; extra == 'test'
55
- Requires-Dist: codespell ==2.3.0 ; extra == 'test'
47
+ Requires-Dist: pytest==8.3.2; extra == "test"
48
+ Requires-Dist: pytest-xdist==3.6.1; extra == "test"
49
+ Requires-Dist: pytest-timeout==2.3.1; extra == "test"
50
+ Requires-Dist: pytest-asyncio==0.23.8; extra == "test"
51
+ Requires-Dist: pytest-cov==5.0.0; extra == "test"
52
+ Requires-Dist: PyVirtualDisplay==3.0; extra == "test"
53
+ Requires-Dist: flake8==7.1.1; extra == "test"
54
+ Requires-Dist: tclint==0.3.2; extra == "test"
55
+ Requires-Dist: codespell==2.3.0; extra == "test"
56
56
 
57
57
  ![SiliconCompiler](https://raw.githubusercontent.com/siliconcompiler/siliconcompiler/main/docs/_images/sc_logo_with_text.png)
58
58
 
@@ -1,13 +1,13 @@
1
1
  siliconcompiler/__init__.py,sha256=5T-mWDc05v0FEdwg2btphrAb_W7XaXUmKrRSxuSMNUQ,535
2
2
  siliconcompiler/__main__.py,sha256=x5bzv4spw66iQOldUM-iCWw2j5NxXkkkC_Wd2hGAAgo,182
3
3
  siliconcompiler/_common.py,sha256=27VU0PqZkD6-qz20brjzj-Z8cpDt0oyE6ZA6wARZvrk,1283
4
- siliconcompiler/_metadata.py,sha256=OgH4k7oWlXuww125I7lBFRv2wW9PXSWEUTlGGhSQmUs,1300
5
- siliconcompiler/core.py,sha256=W6RLfIsqO3EZ3sp_z-1V-rYEl7nY1m_oWznOh0jkeSY,126482
4
+ siliconcompiler/_metadata.py,sha256=5iZ0pjqLzkXPlr1gUJdCplJcnKsEV2H2WFx6X6P9-e4,1300
5
+ siliconcompiler/core.py,sha256=fnA9eJ7BAuPLuugRglbmjSM38OXIWzrYJDmaEeEjC8U,128904
6
6
  siliconcompiler/flowgraph.py,sha256=aQh0VO7LVwGNJbWZcBIgzGRv_pDH72_ilMQtK906Rqk,22502
7
7
  siliconcompiler/issue.py,sha256=jrQnDKY9G-k-KF61XkhPyLSDmOSBoWA2GHRxB4auKNA,11223
8
8
  siliconcompiler/package.py,sha256=Z2FqMRq8mtvmF6d_hyDOZN8DOZ8gu7zABDMWOfUGu-M,14463
9
9
  siliconcompiler/units.py,sha256=dYn185TzusMtBd69RFKhNlCky2td5jC__AJdPjqXELU,6069
10
- siliconcompiler/use.py,sha256=3U4cbbSWdLCObg5FeRIHpkYhqIMaHRYwu6rI6nWXjWE,4131
10
+ siliconcompiler/use.py,sha256=InIDvKtlr3iwo8w3hVxzATjTyN8JQGzelZbs5tioMqo,5630
11
11
  siliconcompiler/apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  siliconcompiler/apps/_common.py,sha256=368PjPwz0yw4baJOXPOhkgVq0uP_G77j5C6ei_eIaPs,2565
13
13
  siliconcompiler/apps/sc.py,sha256=2LT0rvky_3SRpsvbmZ68asAvGdagIIEW7fwMoCqVpUE,2876
@@ -16,6 +16,7 @@ siliconcompiler/apps/sc_issue.py,sha256=BJSj9kgwvtJQCsudjiuHfPguLpZR1QAuQRTyxfEA
16
16
  siliconcompiler/apps/sc_remote.py,sha256=9m6g79STJG784NqzMHyxoPzexZ7ihZaYxxxLlg7cnQk,7522
17
17
  siliconcompiler/apps/sc_server.py,sha256=aeW9wldn_qO6yyv9j5drx2wv0KMk8f6s9XSZgPCerhY,933
18
18
  siliconcompiler/apps/sc_show.py,sha256=ykP-yUOViD64DRb2jR-E-v4cI6OOCw57XdWYLze-yBM,4702
19
+ siliconcompiler/apps/smake.py,sha256=uN8COdCcvlpRp-TBA2oqC5t4-ISg7YB5XWOBXC_r6Vw,5663
19
20
  siliconcompiler/checklists/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
21
  siliconcompiler/checklists/oh_tapeout.py,sha256=ZJsCktTZ9uX94IQEWwxt9gBKGeXXsWQKXg0rM9fpKc0,1492
21
22
  siliconcompiler/data/heartbeat.v,sha256=1hOB1OhZOEF7f8WKTzOYgYtkdVL6yNI4Ou4fmVuApPU,438
@@ -49,7 +50,7 @@ siliconcompiler/pdks/freepdk45.py,sha256=fl8iQQBf90qGkzBvTwxasiGR55wQwYJjTs5ht9d
49
50
  siliconcompiler/pdks/gf180.py,sha256=_CvEiHsd8VNHasH_SHdwJiSsO56o7pB6aLWm92U_WVY,211
50
51
  siliconcompiler/pdks/skywater130.py,sha256=ml5bGW6h7-aaYprmBPy4pjj4sfT0Qi2hVTcdwTy-OkY,212
51
52
  siliconcompiler/remote/__init__.py,sha256=RFKWKDF1qK928_-8-1nmANyGwkmgUJYh39CLj_HshUc,846
52
- siliconcompiler/remote/client.py,sha256=501HqtnMPGzQJW2PuSdFA5D9A8GBnb-6sXMm5XcWF8Y,36597
53
+ siliconcompiler/remote/client.py,sha256=S9hmFI2qoAdvjMqBRN8EJ_4GAO0bkYZRoP670Q5ZG8g,31811
53
54
  siliconcompiler/remote/schema.py,sha256=kK1C6nvbpRrOJu61qnZKGxrar2LXg8G9JNBFTxQmWow,3941
54
55
  siliconcompiler/remote/server.py,sha256=2jw0DJISpgnhxKlMaGYBuC6YnCuaJLmGRZJAanTGQ5A,20013
55
56
  siliconcompiler/remote/server_schema/requests/cancel_job.json,sha256=D6obnSDKrf8wEmc1unX_SliR6lzLn8rvYJoiAtCJPGo,1521
@@ -66,7 +67,7 @@ siliconcompiler/remote/server_schema/responses/get_results.json,sha256=86jz_z3o8
66
67
  siliconcompiler/remote/server_schema/responses/remote_run.json,sha256=qOX3lAsm--aMqUNq3jCnspoyl4y-sv9xH64TeCMCKrg,500
67
68
  siliconcompiler/report/__init__.py,sha256=jdPkZx3csEPoWA_fJcdr5mSu5WOhrrGgcc1iot9fR1A,408
68
69
  siliconcompiler/report/html_report.py,sha256=82THDLkGhvOmnwgHnjgm958CfGdagCBdmJlSpyKn0FM,2672
69
- siliconcompiler/report/report.py,sha256=GjBkzYKRVjslIWEnWTNiyReXK2rSIkHe7leg8UBmqwo,13932
70
+ siliconcompiler/report/report.py,sha256=8kMGjsRoqELFtGjujfUFhmyrhjKYwA1EEznI8k5ivlk,13937
70
71
  siliconcompiler/report/streamlit_report.py,sha256=GUwHgeMVOuETz8ZvYsEYv-uIDcV8KdLQX4xKJFS2a0M,4179
71
72
  siliconcompiler/report/streamlit_viewer.py,sha256=WbwcEf2t1gQihUnxnefwlAXKThwcNd4iQmeC8uDRY5c,41965
72
73
  siliconcompiler/report/summary_image.py,sha256=r8GbFJgD0ZLfYFFl8nmUhsh87wWP7evCljWWHx7_L8U,3687
@@ -79,7 +80,7 @@ siliconcompiler/scheduler/send_messages.py,sha256=ZVO6923-EJWUMlDOOpLEhaSrsKtP-d
79
80
  siliconcompiler/scheduler/slurm.py,sha256=IaglZSvrHOqEDT46ZcJ19gXpJxiMm7AAO7EvVdrauZc,7305
80
81
  siliconcompiler/scheduler/validation/email_credentials.json,sha256=rJHUmTS0YyQVCeZpJI1D4WgxsXRHigZTJ6xToITziuo,1800
81
82
  siliconcompiler/schema/__init__.py,sha256=5MfwK7me_exH7qjcInSUSesM0kiGIx8FXQDj4Br2QAQ,127
82
- siliconcompiler/schema/schema_cfg.py,sha256=7Ct8mKKZlgyM2OgtajgBnLcbAxzwBnQYDM81O0k5BzI,182877
83
+ siliconcompiler/schema/schema_cfg.py,sha256=BXN-79sgYwA-pQLc7PlYwlQIA92jmvWNQWsGYC-pAV8,183570
83
84
  siliconcompiler/schema/schema_obj.py,sha256=R3rrGNgoyNakMmQ2HDW9XJwfar3WMKVyqWrClr38jR8,74403
84
85
  siliconcompiler/schema/utils.py,sha256=KKWtwOkXcDjaxs2f4yIuE6JCFZaapGjdLG4dQLYmH08,4111
85
86
  siliconcompiler/sphinx_ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -176,11 +177,11 @@ siliconcompiler/tools/openroad/scripts/sc_apr.tcl,sha256=5EkGsBOId_oJxGh0lWmKwLo
176
177
  siliconcompiler/tools/openroad/scripts/sc_cts.tcl,sha256=e6zEyNQYmecrtmdcsfY4oVKcb_3faez5tWG-B7E_ZNk,1858
177
178
  siliconcompiler/tools/openroad/scripts/sc_dfm.tcl,sha256=kGYuqJ1XN1YVmrOcuZaBuRVbSradTzEEVG-uzaGomG4,610
178
179
  siliconcompiler/tools/openroad/scripts/sc_export.tcl,sha256=I76JByDu2O21SVDwyYEkF0T6beJ7927M6wAhHfGJZKg,2932
179
- siliconcompiler/tools/openroad/scripts/sc_floorplan.tcl,sha256=xVMzZXXHK3HIa96CotfH9xCle2YfxZuokz9k-8dCow4,12595
180
+ siliconcompiler/tools/openroad/scripts/sc_floorplan.tcl,sha256=PfaaeSs76jN3s_oBZImywIWivsOOKoDpnGYNnCedyQA,12599
180
181
  siliconcompiler/tools/openroad/scripts/sc_metrics.tcl,sha256=F7E8BnLnmboJ6NgVnf10oTsSKC6Xz7GkB8x4svwAqKU,5342
181
182
  siliconcompiler/tools/openroad/scripts/sc_physyn.tcl,sha256=33eOYL9NDPjKYP32PfeubowpXJSFOeoF54-5N11y9t0,123
182
183
  siliconcompiler/tools/openroad/scripts/sc_place.tcl,sha256=CCptIPLLsOfjIBpZI-Ci31nwVVttDunr4fxCDaEB6rI,2021
183
- siliconcompiler/tools/openroad/scripts/sc_procs.tcl,sha256=AS5VVeDj7TYs3zfAGgStyc2TwPlJr17xtwT9vWi_Z_Y,11273
184
+ siliconcompiler/tools/openroad/scripts/sc_procs.tcl,sha256=8ocDhvL6_pJ3YjIAYcBJR7crBhmzeJnplDE_RvQfGKk,11283
184
185
  siliconcompiler/tools/openroad/scripts/sc_rcx.tcl,sha256=cywjFaYnEM3wz5APNcvaqTdZ_0DkcncOuqaTBtBOEDc,1602
185
186
  siliconcompiler/tools/openroad/scripts/sc_rcx_bench.tcl,sha256=tm1_H4vqr9E5p04F0RhJWLTIBOgRnkoKRzQMGNciKxA,702
186
187
  siliconcompiler/tools/openroad/scripts/sc_rcx_extract.tcl,sha256=3R1GVf7veivFzOKPmrwwc4Zg-fVEJbwtncHtCZDx7Dc,501
@@ -199,7 +200,7 @@ siliconcompiler/tools/slang/__init__.py,sha256=BMJjbTWCumTBbshaTc5Wgjcl3kxPiPjwc
199
200
  siliconcompiler/tools/slang/lint.py,sha256=eNe82gmZgCMvLEKQJHagyP1yNWRQ23agBE3n709-Lz4,3080
200
201
  siliconcompiler/tools/surelog/parse.py,sha256=i7mU6xIWrSfuTb9ov1ZSJKipyyhvlGFFmKf8y--Qrns,6208
201
202
  siliconcompiler/tools/surelog/surelog.py,sha256=PlkIjrFGq1t8U2gxFSKPouDmcnS6LE1oTZDrXtVJh7M,5034
202
- siliconcompiler/tools/surelog/bin/surelog.exe,sha256=VI94VJEO7otEVa76cIARSe11K-t6nQ6m4RRKld8pAf4,6422016
203
+ siliconcompiler/tools/surelog/bin/surelog.exe,sha256=E9dQKPPpKWlfUo1Z41k1DXf7rjQHo6NrVe6tPc1GtJQ,6422528
203
204
  siliconcompiler/tools/surelog/templates/output.v,sha256=NE9iQW-IEx0wanJSpbZQjRt-Qq2oIx78JOzlsBcd0Is,213
204
205
  siliconcompiler/tools/sv2v/convert.py,sha256=PG1cYSUil2sZDGh8Eb0dCvsTMnW7o2nUewv2LA23DCw,1837
205
206
  siliconcompiler/tools/sv2v/sv2v.py,sha256=AuMHqm109GJhz6oqvDyyrO9ICGI8FiDXKzBsdMFvDa0,1078
@@ -243,9 +244,9 @@ siliconcompiler/tools/yosys/templates/abc.const,sha256=2Ea7eZz2eHzar3RLf_l2Nb9dn
243
244
  siliconcompiler/utils/__init__.py,sha256=b3mhPeBb8HIqU-8w23h2IMLSxuDrXm53e5iSeqZrkDI,13168
244
245
  siliconcompiler/utils/asic.py,sha256=knq-raDWs1FKtfqkUbLOecdSwXezlmqb8gk9QPZWdqY,5144
245
246
  siliconcompiler/utils/showtools.py,sha256=kNaw97U6tV_MwLvWb1dme_k9E6dQVqnTT6y2zzMcXJk,1158
246
- siliconcompiler-0.26.0.dist-info/LICENSE,sha256=UJh7mqgsPZN3gg37jhwYnrtCUs1m19vkIA6Px7jAOPY,10956
247
- siliconcompiler-0.26.0.dist-info/METADATA,sha256=KAd29bPV4uUiaBagiWyd8UQpjfkWUQ8RBuShJI5ErGg,9663
248
- siliconcompiler-0.26.0.dist-info/WHEEL,sha256=fsW6--WFfuzX2scefE6JfcSZ5dXg5h59u8lqlpL5uuo,101
249
- siliconcompiler-0.26.0.dist-info/entry_points.txt,sha256=Q2sa6SsP2rjHz9oFuNyfeksaxl5Duccn_mV0fHN8pfQ,411
250
- siliconcompiler-0.26.0.dist-info/top_level.txt,sha256=H8TOYhnEUZAV1RJTa8JRtjLIebwHzkQUhA2wkNU2O6M,16
251
- siliconcompiler-0.26.0.dist-info/RECORD,,
247
+ siliconcompiler-0.26.2.dist-info/LICENSE,sha256=UJh7mqgsPZN3gg37jhwYnrtCUs1m19vkIA6Px7jAOPY,10956
248
+ siliconcompiler-0.26.2.dist-info/METADATA,sha256=zoV0fR6QfnbD-XCUjw5X6Zh4NcDFihCz8wJtARm2Fpk,9612
249
+ siliconcompiler-0.26.2.dist-info/WHEEL,sha256=pGsu4t7B5YlAgeTgrGvlgz-71Y4F1ROPOGN6ScsP598,101
250
+ siliconcompiler-0.26.2.dist-info/entry_points.txt,sha256=M3cpZxvqanXhVU9CuLTRDzBdDKmKz-t0p4DT57TyysU,451
251
+ siliconcompiler-0.26.2.dist-info/top_level.txt,sha256=H8TOYhnEUZAV1RJTa8JRtjLIebwHzkQUhA2wkNU2O6M,16
252
+ siliconcompiler-0.26.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (72.1.0)
2
+ Generator: setuptools (72.2.0)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp310-cp310-win_amd64
5
5
 
@@ -6,6 +6,7 @@ sc-remote = siliconcompiler.apps.sc_remote:main
6
6
  sc-server = siliconcompiler.apps.sc_server:main
7
7
  sc-show = siliconcompiler.apps.sc_show:main
8
8
  siliconcompiler = siliconcompiler.apps.sc:main
9
+ smake = siliconcompiler.apps.smake:main
9
10
 
10
11
  [siliconcompiler.show]
11
12
  scsetup = siliconcompiler.utils.showtools:setup