opencos-eda 0.3.9__py3-none-any.whl → 0.3.11__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.
- opencos/commands/deps_help.py +89 -120
- opencos/commands/export.py +7 -2
- opencos/commands/multi.py +3 -3
- opencos/commands/sim.py +14 -16
- opencos/commands/synth.py +1 -2
- opencos/commands/upload.py +192 -4
- opencos/commands/waves.py +8 -8
- opencos/deps/deps_commands.py +6 -6
- opencos/deps/deps_file.py +82 -79
- opencos/deps/deps_processor.py +129 -50
- opencos/docs/Architecture.md +45 -0
- opencos/docs/ConnectingApps.md +29 -0
- opencos/docs/DEPS.md +199 -0
- opencos/docs/Debug.md +77 -0
- opencos/docs/DirectoryStructure.md +22 -0
- opencos/docs/Installation.md +117 -0
- opencos/docs/OcVivadoTcl.md +63 -0
- opencos/docs/OpenQuestions.md +7 -0
- opencos/docs/README.md +13 -0
- opencos/docs/RtlCodingStyle.md +54 -0
- opencos/docs/eda.md +147 -0
- opencos/docs/oc_cli.md +135 -0
- opencos/eda.py +175 -41
- opencos/eda_base.py +180 -50
- opencos/eda_config.py +62 -16
- opencos/eda_config_defaults.yml +21 -4
- opencos/eda_deps_bash_completion.bash +37 -15
- opencos/files.py +26 -1
- opencos/tools/cocotb.py +5 -5
- opencos/tools/invio.py +2 -2
- opencos/tools/invio_yosys.py +2 -1
- opencos/tools/iverilog.py +3 -3
- opencos/tools/quartus.py +113 -115
- opencos/tools/questa_common.py +3 -4
- opencos/tools/riviera.py +3 -3
- opencos/tools/slang.py +11 -7
- opencos/tools/slang_yosys.py +1 -0
- opencos/tools/surelog.py +4 -3
- opencos/tools/verilator.py +5 -4
- opencos/tools/vivado.py +307 -176
- opencos/tools/yosys.py +4 -4
- opencos/util.py +6 -3
- opencos/utils/dict_helpers.py +31 -0
- opencos/utils/markup_helpers.py +2 -2
- opencos/utils/str_helpers.py +7 -0
- opencos/utils/subprocess_helpers.py +3 -3
- opencos/utils/vscode_helper.py +2 -2
- opencos/utils/vsim_helper.py +58 -22
- {opencos_eda-0.3.9.dist-info → opencos_eda-0.3.11.dist-info}/METADATA +1 -1
- opencos_eda-0.3.11.dist-info/RECORD +94 -0
- {opencos_eda-0.3.9.dist-info → opencos_eda-0.3.11.dist-info}/entry_points.txt +1 -0
- opencos/tests/__init__.py +0 -0
- opencos/tests/custom_config.yml +0 -13
- opencos/tests/deps_files/command_order/DEPS.yml +0 -44
- opencos/tests/deps_files/error_msgs/DEPS.yml +0 -55
- opencos/tests/deps_files/iverilog_test/DEPS.yml +0 -4
- opencos/tests/deps_files/no_deps_here/DEPS.yml +0 -0
- opencos/tests/deps_files/non_sv_reqs/DEPS.yml +0 -50
- opencos/tests/deps_files/tags_with_tools/DEPS.yml +0 -54
- opencos/tests/deps_files/test_err_fatal/DEPS.yml +0 -4
- opencos/tests/helpers.py +0 -354
- opencos/tests/test_build.py +0 -12
- opencos/tests/test_deps_helpers.py +0 -207
- opencos/tests/test_deps_schema.py +0 -30
- opencos/tests/test_eda.py +0 -921
- opencos/tests/test_eda_elab.py +0 -110
- opencos/tests/test_eda_synth.py +0 -150
- opencos/tests/test_oc_cli.py +0 -25
- opencos/tests/test_tools.py +0 -404
- opencos_eda-0.3.9.dist-info/RECORD +0 -99
- {opencos_eda-0.3.9.dist-info → opencos_eda-0.3.11.dist-info}/WHEEL +0 -0
- {opencos_eda-0.3.9.dist-info → opencos_eda-0.3.11.dist-info}/licenses/LICENSE +0 -0
- {opencos_eda-0.3.9.dist-info → opencos_eda-0.3.11.dist-info}/licenses/LICENSE.spdx +0 -0
- {opencos_eda-0.3.9.dist-info → opencos_eda-0.3.11.dist-info}/top_level.txt +0 -0
opencos/tools/yosys.py
CHANGED
|
@@ -6,12 +6,12 @@ Contains classes for ToolYosys
|
|
|
6
6
|
# pylint: disable=R0801 # (calling functions with same arguments)
|
|
7
7
|
|
|
8
8
|
import os
|
|
9
|
-
import shutil
|
|
10
9
|
import subprocess
|
|
11
10
|
|
|
12
11
|
from opencos import util, eda_config
|
|
13
|
-
from opencos.eda_base import Tool, get_eda_exec
|
|
14
12
|
from opencos.commands import CommandSynth, CommandLec
|
|
13
|
+
from opencos.eda_base import Tool, get_eda_exec
|
|
14
|
+
from opencos.files import safe_shutil_which
|
|
15
15
|
from opencos.utils.markup_helpers import yaml_safe_load
|
|
16
16
|
|
|
17
17
|
|
|
@@ -52,7 +52,7 @@ class ToolYosys(Tool):
|
|
|
52
52
|
if self._VERSION:
|
|
53
53
|
return self._VERSION
|
|
54
54
|
|
|
55
|
-
path =
|
|
55
|
+
path = safe_shutil_which(self._EXE)
|
|
56
56
|
if not path:
|
|
57
57
|
self.error(f'"{self._EXE}" not in path or not installed, see {self._URL}')
|
|
58
58
|
else:
|
|
@@ -62,7 +62,7 @@ class ToolYosys(Tool):
|
|
|
62
62
|
# where standalone 'sta' is. Even though Yosys has 'sta' internally, Yosys does
|
|
63
63
|
# not fully support timing constraints or .sdc files, so we have to run 'sta'
|
|
64
64
|
# standalone.
|
|
65
|
-
sta_path =
|
|
65
|
+
sta_path = safe_shutil_which('sta')
|
|
66
66
|
if sta_path:
|
|
67
67
|
util.debug(f'Also located "sta" via {sta_path}')
|
|
68
68
|
self.sta_exe = sta_path
|
opencos/util.py
CHANGED
|
@@ -20,6 +20,7 @@ from importlib import import_module
|
|
|
20
20
|
from dotenv import load_dotenv
|
|
21
21
|
from supports_color import supportsColor
|
|
22
22
|
|
|
23
|
+
from opencos.files import safe_shutil_which
|
|
23
24
|
from opencos.utils import status_constants
|
|
24
25
|
from opencos.utils.str_helpers import strip_ansi_color
|
|
25
26
|
|
|
@@ -57,6 +58,8 @@ class Colors:
|
|
|
57
58
|
cyan = "\x1b[36m"
|
|
58
59
|
foreground = "\x1B[39m"
|
|
59
60
|
bold = "\x1B[1m"
|
|
61
|
+
bred = "\x1B[1m\x1B[31m"
|
|
62
|
+
bgreen = "\x1B[1m\x1B[32m"
|
|
60
63
|
byellow = "\x1B[1m\x1B[33m"
|
|
61
64
|
bcyan = "\x1B[1m\x1b[36m"
|
|
62
65
|
normal = "\x1B[0m"
|
|
@@ -1033,7 +1036,7 @@ def import_class_from_string(full_class_name: str) -> None:
|
|
|
1033
1036
|
module = import_module(module_path)
|
|
1034
1037
|
return getattr(module, class_name)
|
|
1035
1038
|
except Exception as e:
|
|
1036
|
-
|
|
1039
|
+
error(f"Error importing class {full_class_name=}: {e}")
|
|
1037
1040
|
return None
|
|
1038
1041
|
|
|
1039
1042
|
|
|
@@ -1073,7 +1076,7 @@ def write_shell_command_file(
|
|
|
1073
1076
|
'''
|
|
1074
1077
|
|
|
1075
1078
|
# command_lists should be a list-of-lists.
|
|
1076
|
-
bash_path =
|
|
1079
|
+
bash_path = safe_shutil_which('bash')
|
|
1077
1080
|
assert isinstance(command_lists, list), f'{command_lists=}'
|
|
1078
1081
|
fullpath = os.path.join(dirpath, filename)
|
|
1079
1082
|
with open(fullpath, 'w', encoding='utf-8') as f:
|
|
@@ -1089,7 +1092,7 @@ def write_shell_command_file(
|
|
|
1089
1092
|
# Note the | tee foo.log will ruin bash error codes, so if we're bash is
|
|
1090
1093
|
# available, we'll check that ${PIPESTATUS} is 0 to percolate the
|
|
1091
1094
|
# a non-zero on the first command (sim.exe).
|
|
1092
|
-
if
|
|
1095
|
+
if safe_shutil_which('bash'):
|
|
1093
1096
|
clist.append(f'2>&1 | tee {tee_fpath}' + ' && test ${PIPESTATUS} -eq 0')
|
|
1094
1097
|
else:
|
|
1095
1098
|
clist.append(f'2>&1 | tee {tee_fpath}')
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'''opencos.utils.dict_helpers -- Various dict helpers functions'''
|
|
2
|
+
|
|
3
|
+
def dict_diff(d1: dict, d2: dict) -> dict:
|
|
4
|
+
'''Returns dict of added/removed/changed keys in d1 vs d2.
|
|
5
|
+
|
|
6
|
+
If an empty dict is returned then there were no differences'''
|
|
7
|
+
|
|
8
|
+
diff = {
|
|
9
|
+
'added': {},
|
|
10
|
+
'removed': {},
|
|
11
|
+
'changed': {},
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
# Keys added to d2
|
|
15
|
+
for key in d2.keys() - d1.keys():
|
|
16
|
+
diff['added'][key] = d2[key]
|
|
17
|
+
|
|
18
|
+
# Keys removed from d1
|
|
19
|
+
for key in d1.keys() - d2.keys():
|
|
20
|
+
diff['removed'][key] = d1[key]
|
|
21
|
+
|
|
22
|
+
# Keys present in both
|
|
23
|
+
for key in d1.keys() & d2.keys():
|
|
24
|
+
if d1[key] != d2[key]:
|
|
25
|
+
diff['changed'][key] = f'{d1[key]} --> {d2[key]}'
|
|
26
|
+
|
|
27
|
+
for key in ('added', 'removed', 'changed'):
|
|
28
|
+
if not diff[key]:
|
|
29
|
+
del diff[key]
|
|
30
|
+
|
|
31
|
+
return diff
|
opencos/utils/markup_helpers.py
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import json
|
|
4
4
|
import os
|
|
5
5
|
import re
|
|
6
|
-
import shutil
|
|
7
6
|
import subprocess
|
|
8
7
|
|
|
9
8
|
import yaml
|
|
10
9
|
|
|
10
|
+
from opencos.files import safe_shutil_which
|
|
11
11
|
from opencos.util import debug, error, info, warning
|
|
12
12
|
|
|
13
13
|
|
|
@@ -67,7 +67,7 @@ def yaml_safe_load(filepath: str, only_root_line_numbers:bool = False) -> dict:
|
|
|
67
67
|
|
|
68
68
|
# if yamllint is installed, then use it to get all errors in the .yml|.yaml
|
|
69
69
|
# file, instead of the single exception.
|
|
70
|
-
if
|
|
70
|
+
if safe_shutil_which('yamllint'):
|
|
71
71
|
try:
|
|
72
72
|
sp_out = subprocess.run(
|
|
73
73
|
f'yamllint -d relaxed --no-warnings {filepath}'.split(),
|
opencos/utils/str_helpers.py
CHANGED
|
@@ -203,3 +203,10 @@ def strip_ansi_color(text: str) -> str:
|
|
|
203
203
|
'''Strip ANSI color characters from str'''
|
|
204
204
|
ansi_escape = re.compile(r'\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])')
|
|
205
205
|
return ansi_escape.sub('', text)
|
|
206
|
+
|
|
207
|
+
def get_shorter_path_str_rel_vs_abs(rel_path: str) -> str:
|
|
208
|
+
'''Returns the shorter of relative path (input arg) vs abspath (converted)'''
|
|
209
|
+
apath = os.path.abspath(rel_path)
|
|
210
|
+
if len(apath) < len(rel_path):
|
|
211
|
+
return apath
|
|
212
|
+
return rel_path
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
''' opencos.utils.subprocess_helpers -- wrappers for subprocess to support background/tee'''
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
|
-
import shutil
|
|
5
4
|
import subprocess
|
|
6
5
|
import sys
|
|
7
6
|
|
|
8
7
|
import psutil
|
|
9
8
|
from opencos import util
|
|
9
|
+
from opencos.files import safe_shutil_which
|
|
10
10
|
from opencos.util import debug, error, info, warning, progname, global_log
|
|
11
11
|
from opencos.utils.str_helpers import strip_ansi_color
|
|
12
12
|
|
|
@@ -30,7 +30,7 @@ def subprocess_run(
|
|
|
30
30
|
if work_dir:
|
|
31
31
|
proc_kwargs['cwd'] = work_dir
|
|
32
32
|
|
|
33
|
-
bash_exec =
|
|
33
|
+
bash_exec = safe_shutil_which('bash')
|
|
34
34
|
if shell and bash_exec and not IS_WINDOWS:
|
|
35
35
|
proc_kwargs.update({'executable': bash_exec})
|
|
36
36
|
|
|
@@ -75,7 +75,7 @@ def subprocess_run_background( # pylint: disable=too-many-branches
|
|
|
75
75
|
if work_dir:
|
|
76
76
|
proc_kwargs['cwd'] = work_dir
|
|
77
77
|
|
|
78
|
-
bash_exec =
|
|
78
|
+
bash_exec = safe_shutil_which('bash')
|
|
79
79
|
if shell and bash_exec and not IS_WINDOWS:
|
|
80
80
|
# Note - windows powershell will end up calling: /bin/bash /c, which won't work
|
|
81
81
|
proc_kwargs.update({'executable': bash_exec})
|
opencos/utils/vscode_helper.py
CHANGED
|
@@ -7,12 +7,12 @@ Instead, eda.py can call this once, and then query if the VScode extension exist
|
|
|
7
7
|
running opencos.eda.auto_tool_setup(..)
|
|
8
8
|
'''
|
|
9
9
|
|
|
10
|
-
import shutil
|
|
11
10
|
import subprocess
|
|
12
11
|
|
|
12
|
+
from opencos.files import safe_shutil_which
|
|
13
13
|
from opencos.util import debug
|
|
14
14
|
|
|
15
|
-
vscode_path =
|
|
15
|
+
vscode_path = safe_shutil_which('code')
|
|
16
16
|
|
|
17
17
|
INIT_HAS_RUN = False # pylint: disable=invalid-name
|
|
18
18
|
EXTENSIONS = {} # dict of {name: version} for VScode extensions of name
|
opencos/utils/vsim_helper.py
CHANGED
|
@@ -5,57 +5,93 @@ Instead, eda.py can call this once, and then query if this tool exists when runn
|
|
|
5
5
|
opencos.eda.auto_tool_setup(..)
|
|
6
6
|
'''
|
|
7
7
|
|
|
8
|
-
import
|
|
8
|
+
import os
|
|
9
9
|
import subprocess
|
|
10
10
|
|
|
11
|
+
from opencos.files import safe_shutil_which
|
|
11
12
|
from opencos.util import debug
|
|
12
13
|
|
|
13
14
|
INIT_HAS_RUN = False # pylint: disable=invalid-name
|
|
14
|
-
|
|
15
|
-
'riviera':
|
|
16
|
-
'modelsim_ase':
|
|
17
|
-
'questa' :
|
|
18
|
-
'
|
|
15
|
+
TOOL_PATH = {
|
|
16
|
+
'riviera': None,
|
|
17
|
+
'modelsim_ase': None,
|
|
18
|
+
'questa' : None,
|
|
19
|
+
'questa_fe' : None,
|
|
20
|
+
'questa_fse': None
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
def found() -> str:
|
|
22
24
|
'''Returns the found tool, or blank str'''
|
|
23
|
-
for k,v in
|
|
25
|
+
for k,v in TOOL_PATH.items():
|
|
24
26
|
if k and v:
|
|
25
27
|
return k
|
|
26
28
|
return ''
|
|
27
29
|
|
|
28
|
-
def
|
|
29
|
-
'''
|
|
30
|
-
global INIT_HAS_RUN # pylint: disable=global-statement
|
|
31
|
-
|
|
32
|
-
if INIT_HAS_RUN:
|
|
33
|
-
return
|
|
30
|
+
def init_get_version(dirpath: str) -> None:
|
|
31
|
+
'''Runs vsim -version using vsim_path, updates TOOL_PATH'''
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
vsim_path = safe_shutil_which(os.path.join(dirpath, 'vsim'))
|
|
34
|
+
if not os.access(vsim_path, os.X_OK):
|
|
35
|
+
debug(f'{vsim_path} is not executable')
|
|
36
|
+
vsim_path = ''
|
|
37
37
|
|
|
38
38
|
if not vsim_path:
|
|
39
|
-
return
|
|
39
|
+
return # didn't find a valid vsim exe in dirpath (Windows names included)
|
|
40
40
|
|
|
41
41
|
proc = None
|
|
42
42
|
try:
|
|
43
43
|
proc = subprocess.run([vsim_path, '-version'], capture_output=True, check=False)
|
|
44
44
|
except Exception as e:
|
|
45
|
-
debug(f'
|
|
45
|
+
debug(f'{vsim_path} -version: exception {e}')
|
|
46
46
|
|
|
47
47
|
if proc is None or proc.returncode != 0:
|
|
48
|
+
debug(f'{vsim_path} returncode non-zero: {proc=}')
|
|
48
49
|
return
|
|
49
50
|
|
|
50
51
|
stdout_str_lower = proc.stdout.decode('utf-8', errors='replace').lower()
|
|
52
|
+
dirpath = os.path.abspath(dirpath)
|
|
53
|
+
settool = None
|
|
51
54
|
|
|
52
55
|
if all(x in stdout_str_lower for x in ('starter', 'modelsim', 'fpga')):
|
|
53
|
-
|
|
56
|
+
settool = 'modelsim_ase'
|
|
54
57
|
elif all(x in stdout_str_lower for x in ('starter', 'questa', 'fpga')):
|
|
55
|
-
|
|
58
|
+
settool = 'questa_fse'
|
|
56
59
|
elif all(x in stdout_str_lower for x in ('questa', 'fpga')):
|
|
57
|
-
|
|
60
|
+
settool = 'questa_fe'
|
|
58
61
|
elif all(x in stdout_str_lower for x in ('riviera', 'aldec')):
|
|
59
|
-
|
|
62
|
+
settool = 'riviera'
|
|
60
63
|
elif 'questa' in stdout_str_lower:
|
|
61
|
-
|
|
64
|
+
settool = 'questa'
|
|
65
|
+
|
|
66
|
+
debug(f'{vsim_path=} {settool=} from version')
|
|
67
|
+
|
|
68
|
+
if settool:
|
|
69
|
+
TOOL_PATH[settool] = vsim_path
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def init() -> None:
|
|
73
|
+
'''Sets INIT_HAS_RUN=True (only runs once) and updates TOOL_PATH[tool]'''
|
|
74
|
+
global INIT_HAS_RUN # pylint: disable=global-statement
|
|
75
|
+
|
|
76
|
+
if INIT_HAS_RUN:
|
|
77
|
+
return
|
|
78
|
+
|
|
79
|
+
INIT_HAS_RUN = True
|
|
80
|
+
vsim_path = safe_shutil_which('vsim') # It might be vsim.EXE in Windows.
|
|
81
|
+
debug(f'vsim_helper: found vsim executable {vsim_path}')
|
|
82
|
+
|
|
83
|
+
if not vsim_path:
|
|
84
|
+
return
|
|
85
|
+
|
|
86
|
+
path_env = os.environ.get('PATH', '')
|
|
87
|
+
paths = path_env.split(':')
|
|
88
|
+
|
|
89
|
+
for path in paths:
|
|
90
|
+
if not os.path.isdir(path):
|
|
91
|
+
continue
|
|
92
|
+
files = os.listdir(path)
|
|
93
|
+
if any(x in files for x in ('vsim', 'vsim.exe', 'vsim.bat')):
|
|
94
|
+
debug(f'vsim_helper: found in PATH: vsim executable {vsim_path} in {path}')
|
|
95
|
+
init_get_version(dirpath=path)
|
|
96
|
+
|
|
97
|
+
debug(f'vsim_helper: {TOOL_PATH=}')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: opencos-eda
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.11
|
|
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,94 @@
|
|
|
1
|
+
opencos/__init__.py,sha256=RwJA9oc1uUlvNX7v5zoqwjnSRNq2NZwRlHqtS-ICJkI,122
|
|
2
|
+
opencos/_version.py,sha256=KaWIjS0c08g-C0fgYY1kXwSPqhOFxaq5pYEeoZhOR_I,617
|
|
3
|
+
opencos/_waves_pkg.sv,sha256=TL5YT9lT-fn2FD54MbVVZROmZ7vtW3ScA_rM2eRzKmU,2068
|
|
4
|
+
opencos/deps_schema.py,sha256=fx1_IJhsDYkUciwwCPTXHP6ftFjTsPVjO4xg12twIjw,17384
|
|
5
|
+
opencos/eda.py,sha256=_JjXPDSGrA0NuG6G5db_CaO6LW0FzDLkTYLKO6hxJG4,32890
|
|
6
|
+
opencos/eda_base.py,sha256=EUFucwgTJoZQHSvaU_8TdUTkeKACjUGDa_E0jgX3V40,122953
|
|
7
|
+
opencos/eda_config.py,sha256=7BffQwsOdexDvRs4cd8LuJe1A590oLkewWQlk4de37k,16176
|
|
8
|
+
opencos/eda_config_defaults.yml,sha256=ZXGGl321eso14LezVYp5cDiAtY3GE6eRqzj6mGHJgUs,17713
|
|
9
|
+
opencos/eda_config_max_verilator_waivers.yml,sha256=lTAU4IOEbUWVlPzuer1YYhIyxpPINeA4EJqcRIT-Ymk,840
|
|
10
|
+
opencos/eda_config_reduced.yml,sha256=cQ9jY4J7EvAbeHTiP6bvpDSVJAYiitjLZPSxxLKIEbk,1440
|
|
11
|
+
opencos/eda_deps_bash_completion.bash,sha256=o1yZvGUQSbN-AYq95sDTzMFw7gNHCUSlv9tASEHnACA,2763
|
|
12
|
+
opencos/eda_deps_sanitize.py,sha256=SQjvrte9Hv9JesRY0wljvbdC6pAmLCikI-Wdzzy-D04,1939
|
|
13
|
+
opencos/eda_extract_targets.py,sha256=POlxZfqf2dNH2nc1CEw5B_53vSHAicSTkpU9_-2_6Zw,2851
|
|
14
|
+
opencos/eda_tool_helper.py,sha256=Xm6nr9XweCjueWFLkrH5U3nK96JGeeh86f2GCPhwY-o,3108
|
|
15
|
+
opencos/export_helper.py,sha256=zDkvsUS6FVrpXl1UTy53QG3CuhYp5FFplI9rRzAE2g8,25395
|
|
16
|
+
opencos/export_json_convert.py,sha256=tSIMbLFtc_Fo66EhFovMii1v_qJYyFZJrPNnoPdW7L0,4182
|
|
17
|
+
opencos/files.py,sha256=-vHrddbFrwxEHU47VzeyLOU93q8XSXAmPiopClfV-bs,2296
|
|
18
|
+
opencos/names.py,sha256=Y2aJ5wgpbNIJ-_P5xUXnHMv_h-zMOX2Rt6iLuduqC1Q,1213
|
|
19
|
+
opencos/peakrdl_cleanup.py,sha256=vHNGtalTrIVP335PhRjPt9RhoccgpK1HJAi-E4M8Kc8,736
|
|
20
|
+
opencos/seed.py,sha256=IL9Yg-r9SLSRseMVWaEHmuw2_DNi_eyut11EafoNTsU,942
|
|
21
|
+
opencos/util.py,sha256=yrQl9lAKIBW-gkgPOtt_ihUwMDcac4M_IpJ5DIwLlGw,44567
|
|
22
|
+
opencos/commands/__init__.py,sha256=oOOQmn5_jHAMSOfA3swJJ7mdoyHsJA0lJwKPTudlTns,1125
|
|
23
|
+
opencos/commands/build.py,sha256=mvJYxk5J15k0Cr8R7oIdIIdsEtWV3gE-LnPweVwtSDo,1487
|
|
24
|
+
opencos/commands/deps_help.py,sha256=rWRro9UZCy8FjNgjDdCt5MMrC5KV7Pj6KDsV2xa5fSI,8178
|
|
25
|
+
opencos/commands/elab.py,sha256=m6Gk03wSzX8UkcmReooK7turF7LpqO0IcdOZwJ8XiyI,1596
|
|
26
|
+
opencos/commands/export.py,sha256=bV4JCuihccbbnE_3qWVvlGtrdKWNVjo1hwOq4ax2dxA,3773
|
|
27
|
+
opencos/commands/flist.py,sha256=u66Xy5U5Xgk3LZ-GdCDUcwwA2U2LyZF3FpB9qWiIZMQ,9110
|
|
28
|
+
opencos/commands/lec.py,sha256=7uziNSeGhZrDEbfS4dt3qVp-z2122hx2kqPH15PqIgQ,4091
|
|
29
|
+
opencos/commands/lint.py,sha256=piPb0l0zE3sAtNJkFQ-oNpuHxnaV_RNXkXtEj_9mwGs,1594
|
|
30
|
+
opencos/commands/multi.py,sha256=Jewht_Q7ObpwRluxKITapMzd1Q8s5OB9DXobm47e70g,27554
|
|
31
|
+
opencos/commands/open.py,sha256=XckvKUNwvc5KHbYGV-eQ2i0WG4X-yckroDaMC610MB4,804
|
|
32
|
+
opencos/commands/proj.py,sha256=cExW9ZZkw6nkpVyNfeQzJADzmPtbYgBgWml82tqO6jY,1158
|
|
33
|
+
opencos/commands/shell.py,sha256=upHpFs8Gdtzi-boVXwsC-QzEsnvtoZNMAu4oN10kdxw,7801
|
|
34
|
+
opencos/commands/sim.py,sha256=nGeQOaKauWRz-uyLvjbSmP0nYRp56MSVgKATDRgURiI,24005
|
|
35
|
+
opencos/commands/sweep.py,sha256=ni4XFgnFF8HLXtwPhETyLWfvc2kgtm4bcxFcKzUhkf0,9343
|
|
36
|
+
opencos/commands/synth.py,sha256=Qs6FP9Ge_gp9TH3EFzVXKFlrrqrMwIbr38VYVlZvmeA,4557
|
|
37
|
+
opencos/commands/targets.py,sha256=_jRNhm2Fqj0fmMvTw6Ba39DCsRHf_r_uZCy_R064kpA,1472
|
|
38
|
+
opencos/commands/upload.py,sha256=DuF360dWcagNEdvBC6649vn3gRWtUDVlqxjB-WMx6uk,7972
|
|
39
|
+
opencos/commands/waves.py,sha256=JtSpZsqZN-p6_N_YVDi4wDXaXvUqqUtOKlKrEaPhQPU,7762
|
|
40
|
+
opencos/deps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
|
+
opencos/deps/defaults.py,sha256=Z6mIVJEV0zQ9rC-HkQFMBFAkixjqKS1TATPSc27wOeA,1502
|
|
42
|
+
opencos/deps/deps_commands.py,sha256=p6jgZXQFu8kJ5M3YqqKZwrdnRC0EAMm-8oqhKvm_gBE,16665
|
|
43
|
+
opencos/deps/deps_file.py,sha256=Yw70fkRcpk16MJVG1jnAGPv4ATZG4aZYQz-nWuTO9CQ,17014
|
|
44
|
+
opencos/deps/deps_processor.py,sha256=fSzVonVuocJDinNGOgs4jizF9yjllSdc11QW7Aj8LzQ,46662
|
|
45
|
+
opencos/docs/Architecture.md,sha256=8zLj19-gzwyHe2ahO7fw6It1pYkpnOtfSD8ciocN_hM,4072
|
|
46
|
+
opencos/docs/ConnectingApps.md,sha256=xfAJoSa7rx6-aZ8edTugRxKLwZwapR36xjds9CZBYDw,2698
|
|
47
|
+
opencos/docs/DEPS.md,sha256=_krXM1seIXDEIDJtz9O9JMGYUvtadYTtjCxLaHCRmns,7803
|
|
48
|
+
opencos/docs/Debug.md,sha256=uknfajFhLTXJkkpKJDaxnminilxz1kv6mSYAmdks5B4,4300
|
|
49
|
+
opencos/docs/DirectoryStructure.md,sha256=HKzzaYwpmzXdHj09vhudiJpEBPM6OPujZrMASItVxVQ,499
|
|
50
|
+
opencos/docs/Installation.md,sha256=EPdtShrmkL9VzG_bTia7_rVUwD863--QQhgorfc-f28,3529
|
|
51
|
+
opencos/docs/OcVivadoTcl.md,sha256=1VMKoBG3pl_3cEGXFUJWHsAinUvFrPItevkgFF2IQvo,4330
|
|
52
|
+
opencos/docs/OpenQuestions.md,sha256=IFWQxnRVBctA69dgzSbUT9SrXnLYL0gV0Uq3WjI0ZA8,513
|
|
53
|
+
opencos/docs/README.md,sha256=uQjmlfjQV443XQnP2jRuh4hI8eDAK5w2SwnnOkzeQVg,354
|
|
54
|
+
opencos/docs/RtlCodingStyle.md,sha256=_p0WN5qA8sU22dlDVcPSMOhfY1kneHb84ogZiAfCW3Y,1549
|
|
55
|
+
opencos/docs/eda.md,sha256=oojlC9u81Aex_YR93GqzowwkrmLG1pRwvJzrrfgE0GA,5476
|
|
56
|
+
opencos/docs/oc_cli.md,sha256=KcJXAFqZLxPE40KzJT4Vu-XnqnVcUUmNYyIOfQqbifA,6446
|
|
57
|
+
opencos/hw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
58
|
+
opencos/hw/oc_cli.py,sha256=U1JGlshLZhtd0LgndZFBZVltAj_HemdhbjO_Zo8ZuVM,132252
|
|
59
|
+
opencos/hw/pcie.py,sha256=VUJljaZJYgScAAx5yn7F6GoA8K9eTcw24otYZbkMpYs,3035
|
|
60
|
+
opencos/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
61
|
+
opencos/tools/cocotb.py,sha256=iJOloM7K2v-UihrQ5donx_QnTgeyGbHuq0XXHmPGH0o,20549
|
|
62
|
+
opencos/tools/invio.py,sha256=o3kjHxz1Ufy2pkLqlXuPU2U2a4zh7ERK5ohODd9UoM0,3299
|
|
63
|
+
opencos/tools/invio_helpers.py,sha256=86WOGmSf4m_lEqBtK3DLjWqI0jnqAWzBEBRYfBUGiSY,8804
|
|
64
|
+
opencos/tools/invio_yosys.py,sha256=zPVX5Bv-mR4zaUZiH0QqGF4Vbm_LXAf75mDW6ywse5c,6026
|
|
65
|
+
opencos/tools/iverilog.py,sha256=eNJaftD0xSdkedDro0yj_yG2S930HT1BLyiJOj0X3Ew,6593
|
|
66
|
+
opencos/tools/modelsim_ase.py,sha256=2QYxaHNsDghnimvIJmkpo_M6w2oZyiyvmak0a5jh4cM,2620
|
|
67
|
+
opencos/tools/quartus.py,sha256=HZRQVzmMBndsB7e-6r-8sVtylHzQdHlabFhJMOxgrk4,29971
|
|
68
|
+
opencos/tools/questa.py,sha256=oPZUM_OeDhIef0x1HicKUwLwxi0t31Jf1fekNh3IM9Y,2423
|
|
69
|
+
opencos/tools/questa_common.py,sha256=rIWZctKS0MXfBAWvJhcETcpYU7ilh-EAGPXCCA63L30,18921
|
|
70
|
+
opencos/tools/questa_fe.py,sha256=fRyi0-WFzp1RN7TGSZ7VTk4LFmxHkpy8BMKE3CxTmMg,2524
|
|
71
|
+
opencos/tools/questa_fse.py,sha256=cH9vxpwa1pi0A9hVPWc_IqYMByaviYlccxQOTpZBC1A,2486
|
|
72
|
+
opencos/tools/riviera.py,sha256=qx1-sRrme33VtEzzJNd_O_p6ju-p9twJ_TJLMlQCTHw,15719
|
|
73
|
+
opencos/tools/slang.py,sha256=UUgfqSjgaVFetGDWHeccUhc8bJvn6GAE3XNhFBpX2R8,9566
|
|
74
|
+
opencos/tools/slang_yosys.py,sha256=dgKw-v_KzvMK6bab8bkwcx5J8Azxb6P0RJ6CuvTQHUk,10298
|
|
75
|
+
opencos/tools/surelog.py,sha256=dCHbYReuxptBDxdfecCLeUI6EZ7CLzLzLT4FB6yxONQ,6556
|
|
76
|
+
opencos/tools/tabbycad_yosys.py,sha256=2LePPgYXBVdsy7YcffPIWN-I0B7queLQ_f_pme2SCGw,7803
|
|
77
|
+
opencos/tools/verilator.py,sha256=OwrGL5WAAaqrAcDEKjWYA_tBXKTieLaDlmq1veEMRfc,25038
|
|
78
|
+
opencos/tools/vivado.py,sha256=jTaevCgczmg-fDy5l_nEZDZsEZn9vUAF-zpEjEZ-sxQ,47344
|
|
79
|
+
opencos/tools/yosys.py,sha256=_oo-I1DYoRwn8uQhf0QHMtPbMBu3xem4mxaG_CEHk5k,28330
|
|
80
|
+
opencos/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
81
|
+
opencos/utils/dict_helpers.py,sha256=xCdfE8SE-D6hNu5dG_d46A2g6au6h1h7SFpzYmeyRtA,810
|
|
82
|
+
opencos/utils/markup_helpers.py,sha256=F_Emh2kT2gETYf7C-Jy5yJjsiHiPUtBpQzONsCka6Eo,4604
|
|
83
|
+
opencos/utils/status_constants.py,sha256=na6YsqlsCwIYzTXWE14dPadUYRNTrOS6YTXHCer2NbA,635
|
|
84
|
+
opencos/utils/str_helpers.py,sha256=TsQxLpHyNCPAfy4nd7CX0e3Cch9yZgkOjR9KwMK5tCA,6931
|
|
85
|
+
opencos/utils/subprocess_helpers.py,sha256=Wqqs8FKm3XIjmD9GUYM-HWVJH7TxWJJA37A07J4fQ4w,6619
|
|
86
|
+
opencos/utils/vscode_helper.py,sha256=8epyEeYfXONwiSoc5KZjUfKc8vgLryct8yckJYie88U,1398
|
|
87
|
+
opencos/utils/vsim_helper.py,sha256=-TJK4Dh8LZ4DCM8GrS9Wka4HE_WMGG_aKwTZtKBrEOE,2994
|
|
88
|
+
opencos_eda-0.3.11.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
|
|
89
|
+
opencos_eda-0.3.11.dist-info/licenses/LICENSE.spdx,sha256=8gn1610RMP6eFgT3Hm6q9VKXt0RvdTItL_oxMo72jII,189
|
|
90
|
+
opencos_eda-0.3.11.dist-info/METADATA,sha256=3XyFh33pZxt7MsVy_QuaUqNvMN8lPbYtc3oBdMYwfNw,1209
|
|
91
|
+
opencos_eda-0.3.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
92
|
+
opencos_eda-0.3.11.dist-info/entry_points.txt,sha256=QOlMZnQeqqwOzIaeKBcY_WlMR3idmOAEbGFh2dXlqJw,290
|
|
93
|
+
opencos_eda-0.3.11.dist-info/top_level.txt,sha256=J4JDP-LpRyJqPNeh9bSjx6yrLz2Mk0h6un6YLmtqql4,8
|
|
94
|
+
opencos_eda-0.3.11.dist-info/RECORD,,
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
eda = opencos.eda:main_cli
|
|
3
3
|
eda_deps_sanitize = opencos.eda_deps_sanitize:main
|
|
4
4
|
eda_deps_schema = opencos.deps_schema:main
|
|
5
|
+
eda_show_autocomplete = opencos.eda:main_show_autocomplete_instructions
|
|
5
6
|
eda_targets = opencos.eda_extract_targets:main
|
|
6
7
|
oc_cli = opencos.hw.oc_cli:main
|
opencos/tests/__init__.py
DELETED
|
File without changes
|
opencos/tests/custom_config.yml
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# called by test_eda.py
|
|
2
|
-
|
|
3
|
-
defines: { }
|
|
4
|
-
|
|
5
|
-
dep_command_enables:
|
|
6
|
-
# Values overriden to false:
|
|
7
|
-
shell: false
|
|
8
|
-
var_subst_args: false
|
|
9
|
-
var_subst_os_env: false
|
|
10
|
-
|
|
11
|
-
# Values overriden to false:
|
|
12
|
-
deps_legacy_supported: false
|
|
13
|
-
deps_subprocess_shell: false
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
target_echo_hi:
|
|
3
|
-
# no 'deps', just 'commands'
|
|
4
|
-
commands:
|
|
5
|
-
- shell: echo "hi"
|
|
6
|
-
|
|
7
|
-
target_echo_hi_bye:
|
|
8
|
-
# 'commands' in 'deps':
|
|
9
|
-
deps:
|
|
10
|
-
- target_echo_hi
|
|
11
|
-
- foo.sv
|
|
12
|
-
- commands:
|
|
13
|
-
- shell: echo "bye"
|
|
14
|
-
tee: custom_tee_echo_bye.log # In this test, we'll also confirm manual log names.
|
|
15
|
-
|
|
16
|
-
# If this was not ordered, we'd get "hi" (first traversed) followed by "bye"
|
|
17
|
-
|
|
18
|
-
target_test:
|
|
19
|
-
deps: target_echo_hi_bye
|
|
20
|
-
top: foo
|
|
21
|
-
|
|
22
|
-
target_test_with_post_tool_commands:
|
|
23
|
-
deps:
|
|
24
|
-
# In this test, we want to put a new command in the front of the ordered "deps" list,
|
|
25
|
-
# but with run-after-tool=true, so it should run after any of the normal pre-compile
|
|
26
|
-
# shell commands.
|
|
27
|
-
- commands:
|
|
28
|
-
- shell: echo "final goodbye"
|
|
29
|
-
run-after-tool: true
|
|
30
|
-
- target_echo_hi_bye
|
|
31
|
-
top: foo
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
test_run_from_work_dir:
|
|
35
|
-
deps:
|
|
36
|
-
- commands:
|
|
37
|
-
- shell: echo "pwd=$PWD"
|
|
38
|
-
run-from-work-dir: true
|
|
39
|
-
|
|
40
|
-
test_run_from_work_dir_false:
|
|
41
|
-
deps:
|
|
42
|
-
- commands:
|
|
43
|
-
- shell: echo "pwd=$PWD"
|
|
44
|
-
run-from-work-dir: false
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# We will run elab targets on this file
|
|
2
|
-
|
|
3
|
-
# Good targets
|
|
4
|
-
foo: |
|
|
5
|
-
foo.sv
|
|
6
|
-
|
|
7
|
-
foo2:
|
|
8
|
-
- foo2.sv
|
|
9
|
-
|
|
10
|
-
target_good2:
|
|
11
|
-
top: foo
|
|
12
|
-
deps: foo.sv
|
|
13
|
-
|
|
14
|
-
target_good3:
|
|
15
|
-
top: foo2
|
|
16
|
-
deps:
|
|
17
|
-
- foo2.sv
|
|
18
|
-
|
|
19
|
-
# Bad targets - missing filename in DEPS.yml (we also have to cover missing filename from command-line)
|
|
20
|
-
target_bad0: |
|
|
21
|
-
target_bad0.sv
|
|
22
|
-
missing0.sv
|
|
23
|
-
|
|
24
|
-
target_bad1:
|
|
25
|
-
- target_bad1.sv
|
|
26
|
-
- missing1.sv
|
|
27
|
-
|
|
28
|
-
target_bad2:
|
|
29
|
-
deps: |
|
|
30
|
-
foo.sv
|
|
31
|
-
missing2.sv
|
|
32
|
-
|
|
33
|
-
target_bad3:
|
|
34
|
-
deps:
|
|
35
|
-
- foo.sv
|
|
36
|
-
- missing3.sv
|
|
37
|
-
|
|
38
|
-
# Bad targets - missing target.
|
|
39
|
-
target_bad4: |
|
|
40
|
-
foo.sv
|
|
41
|
-
missing_target4
|
|
42
|
-
|
|
43
|
-
target_bad5:
|
|
44
|
-
- foo.sv
|
|
45
|
-
- missing_target5
|
|
46
|
-
|
|
47
|
-
target_bad6:
|
|
48
|
-
deps: |
|
|
49
|
-
foo.sv
|
|
50
|
-
missing_target6
|
|
51
|
-
|
|
52
|
-
target_bad7:
|
|
53
|
-
deps:
|
|
54
|
-
- foo.sv
|
|
55
|
-
- missing_target7
|
|
File without changes
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# Non .sv, .v, .vhd, .cpp files can go directly in the
|
|
3
|
-
# 'deps', for example .mem, .pcap files:
|
|
4
|
-
foo_test:
|
|
5
|
-
deps:
|
|
6
|
-
- foo.sv
|
|
7
|
-
- some_mem.mem
|
|
8
|
-
top: foo
|
|
9
|
-
|
|
10
|
-
# These can also go in 'reqs':
|
|
11
|
-
foo_test2:
|
|
12
|
-
deps:
|
|
13
|
-
- foo.sv
|
|
14
|
-
reqs:
|
|
15
|
-
- some_mem.mem
|
|
16
|
-
top: foo
|
|
17
|
-
|
|
18
|
-
# Included files can also go this route. For example,
|
|
19
|
-
# +incdir+. is always present, so you can call included files with reqs and not incdirs
|
|
20
|
-
foo_test3:
|
|
21
|
-
deps:
|
|
22
|
-
- foo_with_include.sv
|
|
23
|
-
reqs:
|
|
24
|
-
- foo_include.svh # checked for file existence, no incdirs, defaulting to incdir=.
|
|
25
|
-
- some_mem.mem
|
|
26
|
-
top: foo_with_include
|
|
27
|
-
|
|
28
|
-
# You can still include files without reqs
|
|
29
|
-
foo_test4:
|
|
30
|
-
deps:
|
|
31
|
-
- foo_with_include.sv
|
|
32
|
-
incdirs: . # pick up foo_include.svh this way, omit from reqs.
|
|
33
|
-
reqs:
|
|
34
|
-
- some_mem.mem
|
|
35
|
-
top: foo_with_include
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
should_fail_foo_test5:
|
|
40
|
-
deps:
|
|
41
|
-
- foo.sv
|
|
42
|
-
reqs:
|
|
43
|
-
- some_mem.mem2 # This file doesn't exist
|
|
44
|
-
top: foo
|
|
45
|
-
|
|
46
|
-
should_fail_foo_test6:
|
|
47
|
-
deps:
|
|
48
|
-
- foo.sv
|
|
49
|
-
- some_mem.mem2 # This file doesn't exist
|
|
50
|
-
top: foo
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
target_for_foo_sv:
|
|
3
|
-
deps: foo.sv
|
|
4
|
-
tags:
|
|
5
|
-
some-made-up-tag-name:
|
|
6
|
-
# We'll test this with Verilator, and it should stop before simulation (only compile)
|
|
7
|
-
# We'll also test with Vivado, which shouldn't hit this 'with-tools' list, and the
|
|
8
|
-
# entire simulation should run. We'll confirm in the eda stdout/stderr outputs
|
|
9
|
-
with-tools: verilator
|
|
10
|
-
args: --lint-only
|
|
11
|
-
|
|
12
|
-
target_test:
|
|
13
|
-
deps: target_for_foo_sv
|
|
14
|
-
top: foo
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
target_with_replace_config_tools_test:
|
|
18
|
-
deps: foo.sv
|
|
19
|
-
top: foo
|
|
20
|
-
tags:
|
|
21
|
-
verilator_replace_waviers: # default uses replacement strategy on lists
|
|
22
|
-
with-tools: verilator
|
|
23
|
-
replace-config-tools:
|
|
24
|
-
verilator:
|
|
25
|
-
compile-waivers: [ ] # pytest to confirm all waivers removed.
|
|
26
|
-
|
|
27
|
-
target_with_additive_config_tools_test:
|
|
28
|
-
deps: foo.sv
|
|
29
|
-
top: foo
|
|
30
|
-
tags:
|
|
31
|
-
verilator_append_waviers:
|
|
32
|
-
with-tools: verilator
|
|
33
|
-
additive-config-tools: # Uses additive strategy for lists
|
|
34
|
-
verilator:
|
|
35
|
-
compile-waivers: # pytest to confirm these waivers were added, others not removed.
|
|
36
|
-
- style
|
|
37
|
-
- fatal
|
|
38
|
-
|
|
39
|
-
target_foo_sv_add_incdirs:
|
|
40
|
-
deps: foo.sv
|
|
41
|
-
top: foo
|
|
42
|
-
tags:
|
|
43
|
-
made-up-tagname-incdirs:
|
|
44
|
-
with-tools: verilator
|
|
45
|
-
incdirs: .
|
|
46
|
-
|
|
47
|
-
target_foo_sv_add_defines:
|
|
48
|
-
deps: foo.sv
|
|
49
|
-
top: foo
|
|
50
|
-
tags:
|
|
51
|
-
made-up-tagname-defines:
|
|
52
|
-
with-tools: verilator
|
|
53
|
-
defines:
|
|
54
|
-
FOO_SV: 3000
|