opencos-eda 0.2.47__tar.gz → 0.2.49__tar.gz
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.
- {opencos_eda-0.2.47/opencos_eda.egg-info → opencos_eda-0.2.49}/PKG-INFO +1 -1
- opencos_eda-0.2.49/opencos/__init__.py +6 -0
- opencos_eda-0.2.49/opencos/_version.py +19 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/flist.py +8 -7
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/multi.py +35 -18
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/sweep.py +9 -4
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/waves.py +1 -1
- opencos_eda-0.2.49/opencos/deps/defaults.py +69 -0
- opencos_eda-0.2.49/opencos/deps/deps_commands.py +419 -0
- opencos_eda-0.2.49/opencos/deps/deps_file.py +326 -0
- opencos_eda-0.2.49/opencos/deps/deps_processor.py +670 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/deps_schema.py +7 -8
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/eda.py +92 -67
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/eda_base.py +625 -332
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/eda_config.py +80 -14
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/eda_extract_targets.py +22 -14
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/eda_tool_helper.py +33 -7
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/export_helper.py +166 -86
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/export_json_convert.py +31 -23
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/files.py +2 -1
- {opencos_eda-0.2.47/opencos → opencos_eda-0.2.49/opencos/hw}/oc_cli.py +9 -4
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/names.py +0 -4
- opencos_eda-0.2.49/opencos/peakrdl_cleanup.py +26 -0
- opencos_eda-0.2.49/opencos/seed.py +36 -0
- opencos_eda-0.2.49/opencos/tests/deps_files/no_deps_here/DEPS.yml +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/helpers.py +27 -14
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/test_deps_helpers.py +35 -32
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/test_eda.py +47 -41
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/test_eda_elab.py +5 -3
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/test_eda_synth.py +1 -1
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/test_oc_cli.py +1 -1
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/test_tools.py +3 -2
- opencos_eda-0.2.49/opencos/tools/__init__.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tools/iverilog.py +2 -2
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tools/modelsim_ase.py +2 -2
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tools/riviera.py +1 -1
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tools/slang.py +1 -1
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tools/surelog.py +1 -1
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tools/verilator.py +1 -1
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tools/vivado.py +1 -1
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tools/yosys.py +4 -3
- opencos_eda-0.2.49/opencos/util.py +737 -0
- opencos_eda-0.2.49/opencos/utils/__init__.py +0 -0
- opencos_eda-0.2.49/opencos/utils/markup_helpers.py +98 -0
- opencos_eda-0.2.49/opencos/utils/str_helpers.py +111 -0
- opencos_eda-0.2.49/opencos/utils/subprocess_helpers.py +108 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49/opencos_eda.egg-info}/PKG-INFO +1 -1
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos_eda.egg-info/SOURCES.txt +12 -3
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos_eda.egg-info/entry_points.txt +1 -1
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/pyproject.toml +8 -3
- opencos_eda-0.2.47/opencos/__init__.py +0 -4
- opencos_eda-0.2.47/opencos/_version.py +0 -16
- opencos_eda-0.2.47/opencos/deps_helpers.py +0 -1346
- opencos_eda-0.2.47/opencos/peakrdl_cleanup.py +0 -20
- opencos_eda-0.2.47/opencos/seed.py +0 -28
- opencos_eda-0.2.47/opencos/util.py +0 -780
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/LICENSE +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/LICENSE.spdx +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/README.md +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/_waves_pkg.sv +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/__init__.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/build.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/elab.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/export.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/lec.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/open.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/proj.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/shell.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/sim.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/synth.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/targets.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/commands/upload.py +0 -0
- {opencos_eda-0.2.47/opencos/tests → opencos_eda-0.2.49/opencos/deps}/__init__.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/eda_config_defaults.yml +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/eda_config_max_verilator_waivers.yml +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/eda_config_reduced.yml +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/eda_deps_bash_completion.bash +0 -0
- {opencos_eda-0.2.47/opencos/tools → opencos_eda-0.2.49/opencos/hw}/__init__.py +0 -0
- {opencos_eda-0.2.47/opencos → opencos_eda-0.2.49/opencos/hw}/pcie.py +0 -0
- /opencos_eda-0.2.47/opencos/tests/deps_files/no_deps_here/DEPS.yml → /opencos_eda-0.2.49/opencos/tests/__init__.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/custom_config.yml +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/deps_files/command_order/DEPS.yml +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/deps_files/error_msgs/DEPS.yml +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/deps_files/iverilog_test/DEPS.yml +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/deps_files/non_sv_reqs/DEPS.yml +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/deps_files/tags_with_tools/DEPS.yml +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/deps_files/test_err_fatal/DEPS.yml +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/test_build.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tests/test_deps_schema.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tools/invio.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tools/invio_helpers.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tools/invio_yosys.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tools/questa.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tools/slang_yosys.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos/tools/tabbycad_yosys.py +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos_eda.egg-info/dependency_links.txt +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos_eda.egg-info/requires.txt +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/opencos_eda.egg-info/top_level.txt +0 -0
- {opencos_eda-0.2.47 → opencos_eda-0.2.49}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: opencos-eda
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.49
|
|
4
4
|
Summary: A simple Python package for wrapping RTL simuliatons and synthesis
|
|
5
5
|
Author-email: Simon Sabato <simon@cognichip.ai>, Drew Ranck <drew@cognichip.ai>
|
|
6
6
|
Project-URL: Homepage, https://github.com/cognichip/opencos
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
''' private helper package for `eda --version`'''
|
|
2
|
+
|
|
3
|
+
import sys
|
|
4
|
+
|
|
5
|
+
NAME = 'opencos-eda'
|
|
6
|
+
|
|
7
|
+
# Use standard library metadata module starting Python 3.8
|
|
8
|
+
if sys.version_info >= (3, 8):
|
|
9
|
+
|
|
10
|
+
from importlib import metadata
|
|
11
|
+
try:
|
|
12
|
+
VERSION = metadata.version(NAME)
|
|
13
|
+
except metadata.PackageNotFoundError:
|
|
14
|
+
# Handle case where the package is not installed (e.g., running from source checkout)
|
|
15
|
+
VERSION = "0.0.0"
|
|
16
|
+
|
|
17
|
+
else:
|
|
18
|
+
# This package only supports >= 3.8, so not doing the importlib_metadata method.
|
|
19
|
+
VERSION = "unknown" # Or raise an error, or handle differently
|
|
@@ -9,6 +9,7 @@ import os
|
|
|
9
9
|
|
|
10
10
|
from opencos import util
|
|
11
11
|
from opencos.eda_base import CommandDesign
|
|
12
|
+
from opencos.utils.str_helpers import strip_all_quotes
|
|
12
13
|
|
|
13
14
|
class CommandFList(CommandDesign):
|
|
14
15
|
'''Base class command handler for: eda flist ...'''
|
|
@@ -140,14 +141,14 @@ class CommandFList(CommandDesign):
|
|
|
140
141
|
if self.args['emit-non-sources']:
|
|
141
142
|
if self.files_non_source:
|
|
142
143
|
print('## reqs (non-source files that are dependencies):', file=fo)
|
|
143
|
-
prefix =
|
|
144
|
+
prefix = strip_all_quotes(self.args['prefix-non-sources'])
|
|
144
145
|
for f in self.files_non_source:
|
|
145
146
|
if self.args['emit-rel-path']:
|
|
146
147
|
f = os.path.relpath(f)
|
|
147
148
|
print('## ' + prefix + pq1 + f + pq2, file=fo)
|
|
148
149
|
|
|
149
150
|
if self.args['emit-define']:
|
|
150
|
-
prefix =
|
|
151
|
+
prefix = strip_all_quotes(self.args['prefix-define'])
|
|
151
152
|
for d, value in self.defines.items():
|
|
152
153
|
if value is None:
|
|
153
154
|
newline = prefix + d
|
|
@@ -176,31 +177,31 @@ class CommandFList(CommandDesign):
|
|
|
176
177
|
print(newline, file=fo)
|
|
177
178
|
|
|
178
179
|
if self.args['emit-incdir']:
|
|
179
|
-
prefix =
|
|
180
|
+
prefix = strip_all_quotes(self.args['prefix-incdir'])
|
|
180
181
|
for i in self.incdirs:
|
|
181
182
|
if self.args['emit-rel-path']:
|
|
182
183
|
i = os.path.relpath(i)
|
|
183
184
|
print(prefix + pq1 + i + pq2, file=fo)
|
|
184
185
|
if self.args['emit-v']:
|
|
185
|
-
prefix =
|
|
186
|
+
prefix = strip_all_quotes(self.args['prefix-v'])
|
|
186
187
|
for f in self.files_v:
|
|
187
188
|
if self.args['emit-rel-path']:
|
|
188
189
|
f = os.path.relpath(f)
|
|
189
190
|
print(prefix + pq1 + f + pq2, file=fo)
|
|
190
191
|
if self.args['emit-sv']:
|
|
191
|
-
prefix =
|
|
192
|
+
prefix = strip_all_quotes(self.args['prefix-sv'])
|
|
192
193
|
for f in self.files_sv:
|
|
193
194
|
if self.args['emit-rel-path']:
|
|
194
195
|
f = os.path.relpath(f)
|
|
195
196
|
print(prefix + pq1 + f + pq2, file=fo)
|
|
196
197
|
if self.args['emit-vhd']:
|
|
197
|
-
prefix =
|
|
198
|
+
prefix = strip_all_quotes(self.args['prefix-vhd'])
|
|
198
199
|
for f in self.files_vhd:
|
|
199
200
|
if self.args['emit-rel-path']:
|
|
200
201
|
f = os.path.relpath(f)
|
|
201
202
|
print(prefix + pq1 + f + pq2, file=fo)
|
|
202
203
|
if self.args['emit-cpp']:
|
|
203
|
-
prefix =
|
|
204
|
+
prefix = strip_all_quotes(self.args['prefix-cpp'])
|
|
204
205
|
for f in self.files_cpp:
|
|
205
206
|
if self.args['emit-rel-path']:
|
|
206
207
|
f = os.path.relpath(f)
|
|
@@ -9,10 +9,12 @@ import os
|
|
|
9
9
|
import shutil
|
|
10
10
|
from pathlib import Path
|
|
11
11
|
|
|
12
|
-
from opencos import util, eda_base,
|
|
12
|
+
from opencos import util, eda_base, eda_config, export_helper, \
|
|
13
13
|
eda_tool_helper
|
|
14
|
-
from opencos.deps_helpers import get_deps_markup_file, deps_markup_safe_load
|
|
15
14
|
from opencos.eda_base import CommandParallel, get_eda_exec
|
|
15
|
+
from opencos.deps.deps_file import get_deps_markup_file, deps_markup_safe_load, \
|
|
16
|
+
deps_data_get_all_targets, deps_list_target_sanitize
|
|
17
|
+
from opencos.utils.str_helpers import fnmatch_or_re, dep_str2list
|
|
16
18
|
|
|
17
19
|
class CommandMulti(CommandParallel):
|
|
18
20
|
'''eda.py command handler for: eda multi <command> <args,targets,target-globs,...>'''
|
|
@@ -68,7 +70,7 @@ class CommandMulti(CommandParallel):
|
|
|
68
70
|
return command, level
|
|
69
71
|
|
|
70
72
|
|
|
71
|
-
def resolve_path_and_target_patterns(
|
|
73
|
+
def resolve_path_and_target_patterns( # pylint: disable=too-many-locals
|
|
72
74
|
self, base_path: str, target: str, level: int = -1
|
|
73
75
|
) -> dict:
|
|
74
76
|
'''Returns a dict of: key = matching path, value = set of matched targets.
|
|
@@ -91,24 +93,38 @@ class CommandMulti(CommandParallel):
|
|
|
91
93
|
|
|
92
94
|
matching_targets_dict = {}
|
|
93
95
|
|
|
96
|
+
# Let's not glob.glob if the path_pattern and target_pattern are
|
|
97
|
+
# exact, aka if it does not have special characters for glob: * or ?
|
|
98
|
+
# for the target, we also support re, so: * + ?
|
|
99
|
+
if any(x in path_pattern for x in ['*', '?']):
|
|
100
|
+
paths_from_pattern = list(glob.glob(path_pattern, recursive=True))
|
|
101
|
+
else:
|
|
102
|
+
paths_from_pattern = [path_pattern]
|
|
103
|
+
|
|
104
|
+
target_pattern_needs_lookup = any(x in target_pattern for x in ['*', '?', '+'])
|
|
105
|
+
|
|
94
106
|
# resolve the path_pattern portion using glob.
|
|
95
107
|
# we'll have to check for DEPS markup files in path_pattern, to match the target_wildcard
|
|
96
108
|
# using fnmatch or re.
|
|
97
|
-
for path in
|
|
109
|
+
for path in paths_from_pattern:
|
|
98
110
|
|
|
99
111
|
if self.path_hidden_or_work_dir(path):
|
|
100
112
|
continue
|
|
101
113
|
|
|
102
|
-
deps_markup_file =
|
|
114
|
+
deps_markup_file = get_deps_markup_file(path)
|
|
103
115
|
if deps_markup_file:
|
|
104
|
-
data =
|
|
105
|
-
deps_targets =
|
|
116
|
+
data = deps_markup_safe_load(deps_markup_file)
|
|
117
|
+
deps_targets = deps_data_get_all_targets(data)
|
|
106
118
|
rel_path = os.path.relpath(path)
|
|
107
119
|
|
|
108
120
|
debug(f'in {rel_path=} looking for {target_pattern=} in {deps_targets=}')
|
|
109
121
|
|
|
110
122
|
for t in deps_targets:
|
|
111
|
-
if
|
|
123
|
+
if target_pattern_needs_lookup:
|
|
124
|
+
matched = fnmatch_or_re(pattern=target_pattern, string=t)
|
|
125
|
+
else:
|
|
126
|
+
matched = t == target_pattern
|
|
127
|
+
if matched:
|
|
112
128
|
if rel_path not in matching_targets_dict:
|
|
113
129
|
matching_targets_dict[rel_path] = set()
|
|
114
130
|
matching_targets_dict[rel_path].add(t)
|
|
@@ -162,14 +178,11 @@ class CommandMulti(CommandParallel):
|
|
|
162
178
|
all_multi_tools = self.multi_which_tools(command)
|
|
163
179
|
|
|
164
180
|
deps_file = get_deps_markup_file(base_path)
|
|
165
|
-
data =
|
|
181
|
+
data = {}
|
|
166
182
|
if self.config['deps_markup_supported'] and deps_file:
|
|
167
183
|
data = deps_markup_safe_load(deps_file)
|
|
168
184
|
|
|
169
|
-
|
|
170
|
-
data = {}
|
|
171
|
-
|
|
172
|
-
deps_targets = deps_helpers.deps_data_get_all_targets(data)
|
|
185
|
+
deps_targets = deps_data_get_all_targets(data)
|
|
173
186
|
deps_file_defaults = data.get('DEFAULTS', {})
|
|
174
187
|
|
|
175
188
|
# Loop through all the targets in DEPS.yml, skipping DEFAULTS
|
|
@@ -182,7 +195,7 @@ class CommandMulti(CommandParallel):
|
|
|
182
195
|
# Since we support a few schema flavors for a target (our
|
|
183
196
|
# 'target_node' key in a DEPS.yml file) santize the entry
|
|
184
197
|
# so it's a {} with a 'deps' key:
|
|
185
|
-
entry_sanitized =
|
|
198
|
+
entry_sanitized = deps_list_target_sanitize(
|
|
186
199
|
entry, target_node=target_node, deps_file=deps_file
|
|
187
200
|
)
|
|
188
201
|
|
|
@@ -215,8 +228,8 @@ class CommandMulti(CommandParallel):
|
|
|
215
228
|
|
|
216
229
|
commands = x.get('commands', [])
|
|
217
230
|
tools = x.get('tools', [])
|
|
218
|
-
ignore_commands_list =
|
|
219
|
-
ignore_tools_list =
|
|
231
|
+
ignore_commands_list = dep_str2list(commands)
|
|
232
|
+
ignore_tools_list = dep_str2list(tools)
|
|
220
233
|
|
|
221
234
|
debug(f"{ignore_tools_list=}, {ignore_commands_list=} {target_node=}")
|
|
222
235
|
debug(f"{command=} --> {all_multi_tools=}")
|
|
@@ -392,9 +405,13 @@ class CommandMulti(CommandParallel):
|
|
|
392
405
|
# Special case for 'multi' --export-jsonl, run reach child with --export-json
|
|
393
406
|
command_list.append('--export-json')
|
|
394
407
|
if tool and len(all_multi_tools) > 1:
|
|
395
|
-
|
|
408
|
+
jobname = f'{short_target}.{command}.{tool}'
|
|
396
409
|
else:
|
|
397
|
-
|
|
410
|
+
jobname = f'{short_target}.{command}'
|
|
411
|
+
command_list.append(f'--job-name={jobname}')
|
|
412
|
+
logfile = os.path.join(self.args['eda-dir'], f'eda.{jobname}.log')
|
|
413
|
+
command_list.append(f'--force-logfile={logfile}')
|
|
414
|
+
|
|
398
415
|
|
|
399
416
|
def append_jobs_from_targets(self, args:list):
|
|
400
417
|
'''Helper method in CommandMulti to apply 'args' (list) to all self.targets,
|
|
@@ -8,6 +8,7 @@ import re
|
|
|
8
8
|
|
|
9
9
|
from opencos import util
|
|
10
10
|
from opencos.eda_base import CommandDesign, CommandParallel, get_eda_exec, which_tool
|
|
11
|
+
from opencos.utils.str_helpers import strip_outer_quotes
|
|
11
12
|
|
|
12
13
|
class CommandSweep(CommandDesign, CommandParallel):
|
|
13
14
|
'''Command handler for: eda sweep ...'''
|
|
@@ -77,7 +78,7 @@ class CommandSweep(CommandDesign, CommandParallel):
|
|
|
77
78
|
|
|
78
79
|
for sweep_arg_value in self.args['sweep']:
|
|
79
80
|
# Deal with --sweep= args we already parsed, but haven't expanded yet.
|
|
80
|
-
sweep_arg_value =
|
|
81
|
+
sweep_arg_value = strip_outer_quotes(sweep_arg_value)
|
|
81
82
|
sweep_axis_list_entry = self._process_sweep_arg(sweep_arg_value=sweep_arg_value)
|
|
82
83
|
if sweep_axis_list_entry:
|
|
83
84
|
sweep_axis_list.append(sweep_axis_list_entry)
|
|
@@ -136,7 +137,7 @@ class CommandSweep(CommandDesign, CommandParallel):
|
|
|
136
137
|
Return value is {} or {'lhs': str, 'operator': str (+ or =), 'values': list}
|
|
137
138
|
'''
|
|
138
139
|
|
|
139
|
-
sweep_arg_value =
|
|
140
|
+
sweep_arg_value = strip_outer_quotes(sweep_arg_value)
|
|
140
141
|
|
|
141
142
|
util.debug(f'{sweep_arg_value=}')
|
|
142
143
|
# Try to match a sweep range expansion:
|
|
@@ -206,14 +207,18 @@ class CommandSweep(CommandDesign, CommandParallel):
|
|
|
206
207
|
snapshot_name = snapshot_name.replace(os.sep, '_') \
|
|
207
208
|
+ f'.{self.single_command}{sweep_string}'
|
|
208
209
|
eda_path = get_eda_exec('sweep')
|
|
210
|
+
logfile = os.path.join(self.args['eda-dir'], f'eda.{snapshot_name}.log')
|
|
209
211
|
self.jobs.append({
|
|
210
212
|
'name' : snapshot_name,
|
|
211
213
|
'index' : len(self.jobs),
|
|
212
214
|
'command': self.single_command,
|
|
213
215
|
'target': self.sweep_target,
|
|
214
216
|
'command_list' : (
|
|
215
|
-
[
|
|
216
|
-
|
|
217
|
+
[
|
|
218
|
+
eda_path, self.single_command, self.sweep_target,
|
|
219
|
+
f'--job-name={snapshot_name}',
|
|
220
|
+
f'--force-logfile={logfile}',
|
|
221
|
+
] + arg_tokens
|
|
217
222
|
)
|
|
218
223
|
})
|
|
219
224
|
return
|
|
@@ -143,7 +143,7 @@ class CommandWaves(CommandDesign):
|
|
|
143
143
|
else:
|
|
144
144
|
self.error(f"Don't know how to open {wave_file} without GtkWave in PATH")
|
|
145
145
|
elif wave_file.endswith('.vcd'):
|
|
146
|
-
if 'gtkwave' in self.config['tools_loaded'] and shutil.which('
|
|
146
|
+
if 'gtkwave' in self.config['tools_loaded'] and shutil.which('gtkwave'):
|
|
147
147
|
command_list = ['gtkwave', wave_file]
|
|
148
148
|
self.exec(os.path.dirname(wave_file), command_list)
|
|
149
149
|
elif self._vsim_available(from_tools=self.VSIM_VCD_TOOLS):
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
''' opencos.deps.defaults -- pymodule for defaults referenced by other modules here'''
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
DEPS_FILE_EXTS = set([
|
|
5
|
+
'.yml', '.yaml', '.toml', '.json',
|
|
6
|
+
# Treat no extension DEPS as YAML.
|
|
7
|
+
''
|
|
8
|
+
])
|
|
9
|
+
|
|
10
|
+
ROOT_TABLE_KEYS_NOT_TARGETS = set([
|
|
11
|
+
"DEFAULTS",
|
|
12
|
+
"METADATA",
|
|
13
|
+
])
|
|
14
|
+
|
|
15
|
+
KNOWN_EDA_COMMANDS = set([
|
|
16
|
+
"sim",
|
|
17
|
+
"elab",
|
|
18
|
+
"synth",
|
|
19
|
+
"flist",
|
|
20
|
+
"proj",
|
|
21
|
+
"multi",
|
|
22
|
+
"tools-multi",
|
|
23
|
+
"sweep",
|
|
24
|
+
"build",
|
|
25
|
+
"waves",
|
|
26
|
+
"upload",
|
|
27
|
+
"open",
|
|
28
|
+
"export",
|
|
29
|
+
])
|
|
30
|
+
|
|
31
|
+
SUPPORTED_TARGET_TABLE_KEYS = set([
|
|
32
|
+
'args',
|
|
33
|
+
'defines',
|
|
34
|
+
'incdirs',
|
|
35
|
+
'top',
|
|
36
|
+
'deps',
|
|
37
|
+
'reqs',
|
|
38
|
+
'multi',
|
|
39
|
+
'tags',
|
|
40
|
+
'commands'] + list(KNOWN_EDA_COMMANDS))
|
|
41
|
+
|
|
42
|
+
SUPPORTED_DEP_KEYS_BY_TYPE = {
|
|
43
|
+
dict: set(['commands']),
|
|
44
|
+
str: set(['*']),
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
SUPPORTED_TAG_KEYS = set([
|
|
48
|
+
'with-tools',
|
|
49
|
+
'with-args',
|
|
50
|
+
'args',
|
|
51
|
+
'deps',
|
|
52
|
+
'reqs',
|
|
53
|
+
'defines',
|
|
54
|
+
'incdirs',
|
|
55
|
+
'replace-config-tools',
|
|
56
|
+
'additive-config-tools',
|
|
57
|
+
])
|
|
58
|
+
|
|
59
|
+
SUPPORTED_COMMAND_KEYS = set([
|
|
60
|
+
'shell',
|
|
61
|
+
'work-dir-add-srcs', 'work-dir-add-sources',
|
|
62
|
+
'peakrdl',
|
|
63
|
+
'run-from-work-dir', # default True
|
|
64
|
+
'filepath-subst-target-dir', # default True
|
|
65
|
+
'dirpath-subst-target-dir', # default False
|
|
66
|
+
'var-subst-args',
|
|
67
|
+
'var-subst-os-env',
|
|
68
|
+
'tee',
|
|
69
|
+
])
|