cocotb 1.9.2__cp311-cp311-win32.whl → 2.0.0b1__cp311-cp311-win32.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.
Potentially problematic release.
This version of cocotb might be problematic. Click here for more details.
- cocotb/{ANSI.py → _ANSI.py} +5 -25
- cocotb/__init__.py +76 -332
- cocotb/_base_triggers.py +513 -0
- cocotb/_bridge.py +187 -0
- cocotb/_decorators.py +515 -0
- cocotb/_deprecation.py +3 -3
- cocotb/_exceptions.py +7 -0
- cocotb/_extended_awaitables.py +419 -0
- cocotb/_gpi_triggers.py +382 -0
- cocotb/_init.py +295 -0
- cocotb/_outcomes.py +54 -0
- cocotb/_profiling.py +46 -0
- cocotb/_py_compat.py +100 -29
- cocotb/_scheduler.py +454 -0
- cocotb/_test.py +245 -0
- cocotb/_test_factory.py +309 -0
- cocotb/_test_functions.py +42 -0
- cocotb/_typing.py +7 -0
- cocotb/_utils.py +296 -0
- cocotb/_version.py +3 -7
- cocotb/_xunit_reporter.py +66 -0
- cocotb/clock.py +271 -108
- cocotb/handle.py +1342 -795
- cocotb/libs/cocotb.dll +0 -0
- cocotb/libs/cocotb.exp +0 -0
- cocotb/libs/cocotb.lib +0 -0
- cocotb/libs/cocotbfli_modelsim.dll +0 -0
- cocotb/libs/cocotbfli_modelsim.exp +0 -0
- cocotb/libs/cocotbfli_modelsim.lib +0 -0
- cocotb/libs/cocotbutils.dll +0 -0
- cocotb/libs/cocotbutils.exp +0 -0
- cocotb/libs/cocotbutils.lib +0 -0
- cocotb/libs/cocotbvhpi_aldec.dll +0 -0
- cocotb/libs/cocotbvhpi_aldec.exp +0 -0
- cocotb/libs/cocotbvhpi_aldec.lib +0 -0
- cocotb/libs/cocotbvhpi_modelsim.dll +0 -0
- cocotb/libs/cocotbvhpi_modelsim.exp +0 -0
- cocotb/libs/cocotbvhpi_modelsim.lib +0 -0
- cocotb/libs/cocotbvpi_aldec.dll +0 -0
- cocotb/libs/cocotbvpi_aldec.exp +0 -0
- cocotb/libs/cocotbvpi_aldec.lib +0 -0
- cocotb/libs/cocotbvpi_ghdl.dll +0 -0
- cocotb/libs/cocotbvpi_ghdl.exp +0 -0
- cocotb/libs/cocotbvpi_ghdl.lib +0 -0
- cocotb/libs/cocotbvpi_icarus.exp +0 -0
- cocotb/libs/cocotbvpi_icarus.lib +0 -0
- cocotb/libs/cocotbvpi_icarus.vpl +0 -0
- cocotb/libs/cocotbvpi_modelsim.dll +0 -0
- cocotb/libs/cocotbvpi_modelsim.exp +0 -0
- cocotb/libs/cocotbvpi_modelsim.lib +0 -0
- cocotb/libs/embed.dll +0 -0
- cocotb/libs/embed.exp +0 -0
- cocotb/libs/embed.lib +0 -0
- cocotb/libs/gpi.dll +0 -0
- cocotb/libs/gpi.exp +0 -0
- cocotb/libs/gpi.lib +0 -0
- cocotb/libs/gpilog.dll +0 -0
- cocotb/libs/gpilog.exp +0 -0
- cocotb/libs/gpilog.lib +0 -0
- cocotb/libs/pygpilog.dll +0 -0
- cocotb/libs/pygpilog.exp +0 -0
- cocotb/libs/pygpilog.lib +0 -0
- cocotb/{log.py → logging.py} +105 -110
- cocotb/queue.py +103 -57
- cocotb/regression.py +667 -712
- cocotb/result.py +17 -188
- cocotb/share/def/aldec.exp +0 -0
- cocotb/share/def/aldec.lib +0 -0
- cocotb/share/def/ghdl.exp +0 -0
- cocotb/share/def/ghdl.lib +0 -0
- cocotb/share/def/icarus.exp +0 -0
- cocotb/share/def/icarus.lib +0 -0
- cocotb/share/def/modelsim.def +1 -0
- cocotb/share/def/modelsim.exp +0 -0
- cocotb/share/def/modelsim.lib +0 -0
- cocotb/share/include/cocotb_utils.h +6 -29
- cocotb/share/include/embed.h +5 -28
- cocotb/share/include/gpi.h +137 -92
- cocotb/share/include/gpi_logging.h +221 -142
- cocotb/share/include/py_gpi_logging.h +7 -4
- cocotb/share/include/vpi_user_ext.h +4 -26
- cocotb/share/lib/verilator/verilator.cpp +59 -54
- cocotb/simulator.cp311-win32.exp +0 -0
- cocotb/simulator.cp311-win32.lib +0 -0
- cocotb/simulator.cp311-win32.pyd +0 -0
- cocotb/simulator.pyi +107 -0
- cocotb/task.py +434 -212
- cocotb/triggers.py +55 -1092
- cocotb/types/__init__.py +25 -47
- cocotb/types/_abstract_array.py +151 -0
- cocotb/types/_array.py +264 -0
- cocotb/types/_logic.py +296 -0
- cocotb/types/_logic_array.py +834 -0
- cocotb/types/{range.py → _range.py} +36 -44
- cocotb/types/_resolve.py +76 -0
- cocotb/utils.py +119 -587
- cocotb-2.0.0b1.dist-info/METADATA +60 -0
- cocotb-2.0.0b1.dist-info/RECORD +143 -0
- {cocotb-1.9.2.dist-info → cocotb-2.0.0b1.dist-info}/WHEEL +1 -1
- cocotb-2.0.0b1.dist-info/entry_points.txt +2 -0
- {cocotb-1.9.2.dist-info → cocotb-2.0.0b1.dist-info}/top_level.txt +1 -0
- cocotb_tools/__init__.py +0 -0
- cocotb_tools/_coverage.py +33 -0
- cocotb_tools/_vendor/__init__.py +3 -0
- cocotb_tools/check_results.py +65 -0
- cocotb_tools/combine_results.py +152 -0
- cocotb_tools/config.py +241 -0
- {cocotb → cocotb_tools}/ipython_support.py +29 -22
- cocotb_tools/makefiles/Makefile.deprecations +27 -0
- {cocotb/share → cocotb_tools}/makefiles/Makefile.inc +82 -54
- {cocotb/share → cocotb_tools}/makefiles/Makefile.sim +8 -33
- {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.activehdl +9 -16
- cocotb_tools/makefiles/simulators/Makefile.cvc +61 -0
- cocotb_tools/makefiles/simulators/Makefile.dsim +39 -0
- {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.ghdl +13 -42
- cocotb_tools/makefiles/simulators/Makefile.icarus +80 -0
- cocotb_tools/makefiles/simulators/Makefile.ius +93 -0
- cocotb_tools/makefiles/simulators/Makefile.modelsim +9 -0
- cocotb_tools/makefiles/simulators/Makefile.nvc +60 -0
- cocotb_tools/makefiles/simulators/Makefile.questa +29 -0
- cocotb/share/makefiles/simulators/Makefile.questa → cocotb_tools/makefiles/simulators/Makefile.questa-compat +26 -54
- cocotb_tools/makefiles/simulators/Makefile.questa-qisqrun +149 -0
- {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.riviera +17 -56
- cocotb_tools/makefiles/simulators/Makefile.vcs +65 -0
- {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.verilator +15 -22
- {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.xcelium +20 -52
- cocotb_tools/py.typed +0 -0
- {cocotb → cocotb_tools}/runner.py +794 -361
- cocotb/_sim_versions.py → cocotb_tools/sim_versions.py +16 -21
- pygpi/entry.py +34 -17
- pygpi/py.typed +0 -0
- cocotb/binary.py +0 -858
- cocotb/config.py +0 -289
- cocotb/decorators.py +0 -332
- cocotb/memdebug.py +0 -35
- cocotb/outcomes.py +0 -56
- cocotb/scheduler.py +0 -1099
- cocotb/share/makefiles/Makefile.deprecations +0 -12
- cocotb/share/makefiles/simulators/Makefile.cvc +0 -94
- cocotb/share/makefiles/simulators/Makefile.icarus +0 -111
- cocotb/share/makefiles/simulators/Makefile.ius +0 -125
- cocotb/share/makefiles/simulators/Makefile.modelsim +0 -32
- cocotb/share/makefiles/simulators/Makefile.nvc +0 -64
- cocotb/share/makefiles/simulators/Makefile.vcs +0 -98
- cocotb/types/array.py +0 -309
- cocotb/types/logic.py +0 -292
- cocotb/types/logic_array.py +0 -298
- cocotb/wavedrom.py +0 -199
- cocotb/xunit_reporter.py +0 -80
- cocotb-1.9.2.dist-info/METADATA +0 -168
- cocotb-1.9.2.dist-info/RECORD +0 -121
- cocotb-1.9.2.dist-info/entry_points.txt +0 -2
- /cocotb/{_vendor/__init__.py → py.typed} +0 -0
- {cocotb-1.9.2.dist-info → cocotb-2.0.0b1.dist-info/licenses}/LICENSE +0 -0
- {cocotb → cocotb_tools}/_vendor/distutils_version.py +0 -0
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
# Licensed under the Revised BSD License, see LICENSE for details.
|
|
3
3
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
4
4
|
|
|
5
|
+
# type: ignore # distutils is untyped, so there's little reason to check this file
|
|
6
|
+
|
|
5
7
|
"""
|
|
6
8
|
Classes to compare simulation versions.
|
|
7
9
|
|
|
@@ -11,7 +13,7 @@ These are for cocotb-internal use only.
|
|
|
11
13
|
These classes silently allow comparing versions of different simulators.
|
|
12
14
|
"""
|
|
13
15
|
|
|
14
|
-
from
|
|
16
|
+
from cocotb_tools._vendor.distutils_version import LooseVersion
|
|
15
17
|
|
|
16
18
|
|
|
17
19
|
class ActivehdlVersion(LooseVersion):
|
|
@@ -21,25 +23,21 @@ class ActivehdlVersion(LooseVersion):
|
|
|
21
23
|
ActivehdlVersion("10.5a.12.6914") > ActivehdlVersion("10.5.216.6767")
|
|
22
24
|
"""
|
|
23
25
|
|
|
24
|
-
pass
|
|
25
|
-
|
|
26
26
|
|
|
27
27
|
class CvcVersion(LooseVersion):
|
|
28
28
|
"""Version numbering class for Tachyon DA CVC.
|
|
29
29
|
|
|
30
30
|
Example:
|
|
31
|
-
>>> CvcVersion(
|
|
31
|
+
>>> CvcVersion(
|
|
32
|
+
... "OSS_CVC_7.00b-x86_64-rhel6x of 07/07/14 (Linux-elf)"
|
|
33
|
+
... ) > CvcVersion("OSS_CVC_7.00a-x86_64-rhel6x of 07/07/14 (Linux-elf)")
|
|
32
34
|
True
|
|
33
35
|
"""
|
|
34
36
|
|
|
35
|
-
pass
|
|
36
|
-
|
|
37
37
|
|
|
38
38
|
class GhdlVersion(LooseVersion):
|
|
39
39
|
"""Version numbering class for GHDL."""
|
|
40
40
|
|
|
41
|
-
pass
|
|
42
|
-
|
|
43
41
|
|
|
44
42
|
class IcarusVersion(LooseVersion):
|
|
45
43
|
"""Version numbering class for Icarus Verilog.
|
|
@@ -51,14 +49,10 @@ class IcarusVersion(LooseVersion):
|
|
|
51
49
|
True
|
|
52
50
|
"""
|
|
53
51
|
|
|
54
|
-
pass
|
|
55
|
-
|
|
56
52
|
|
|
57
53
|
class ModelsimVersion(LooseVersion):
|
|
58
54
|
"""Version numbering class for Mentor ModelSim."""
|
|
59
55
|
|
|
60
|
-
pass
|
|
61
|
-
|
|
62
56
|
|
|
63
57
|
class QuestaVersion(LooseVersion):
|
|
64
58
|
"""Version numbering class for Mentor Questa.
|
|
@@ -96,8 +90,6 @@ class RivieraVersion(LooseVersion):
|
|
|
96
90
|
True
|
|
97
91
|
"""
|
|
98
92
|
|
|
99
|
-
pass
|
|
100
|
-
|
|
101
93
|
|
|
102
94
|
class VcsVersion(LooseVersion):
|
|
103
95
|
"""Version numbering class for Synopsys VCS.
|
|
@@ -107,8 +99,6 @@ class VcsVersion(LooseVersion):
|
|
|
107
99
|
True
|
|
108
100
|
"""
|
|
109
101
|
|
|
110
|
-
pass
|
|
111
|
-
|
|
112
102
|
|
|
113
103
|
class VerilatorVersion(LooseVersion):
|
|
114
104
|
"""Version numbering class for Verilator.
|
|
@@ -118,8 +108,6 @@ class VerilatorVersion(LooseVersion):
|
|
|
118
108
|
True
|
|
119
109
|
"""
|
|
120
110
|
|
|
121
|
-
pass
|
|
122
|
-
|
|
123
111
|
|
|
124
112
|
class XceliumVersion(LooseVersion):
|
|
125
113
|
"""Version numbering class for Cadence Xcelium.
|
|
@@ -131,8 +119,6 @@ class XceliumVersion(LooseVersion):
|
|
|
131
119
|
True
|
|
132
120
|
"""
|
|
133
121
|
|
|
134
|
-
pass
|
|
135
|
-
|
|
136
122
|
|
|
137
123
|
class IusVersion(XceliumVersion): # inherit everything from Xcelium
|
|
138
124
|
"""Version numbering class for Cadence IUS.
|
|
@@ -142,4 +128,13 @@ class IusVersion(XceliumVersion): # inherit everything from Xcelium
|
|
|
142
128
|
True
|
|
143
129
|
"""
|
|
144
130
|
|
|
145
|
-
|
|
131
|
+
|
|
132
|
+
class NvcVersion(LooseVersion):
|
|
133
|
+
"""Version numbering class for NVC."""
|
|
134
|
+
|
|
135
|
+
@classmethod
|
|
136
|
+
def from_commandline(cls, cmdline):
|
|
137
|
+
firstline = cmdline.split("\n")[0]
|
|
138
|
+
sim, version, *version_extra = firstline.strip().split(" ")
|
|
139
|
+
assert sim == "nvc"
|
|
140
|
+
return cls(version)
|
pygpi/entry.py
CHANGED
|
@@ -1,26 +1,43 @@
|
|
|
1
1
|
import importlib
|
|
2
2
|
import os
|
|
3
3
|
from functools import reduce
|
|
4
|
-
from
|
|
5
|
-
from typing import Callable, Tuple
|
|
4
|
+
from typing import Any, Callable, List, Tuple, cast
|
|
6
5
|
|
|
7
6
|
|
|
8
|
-
def load_entry() ->
|
|
9
|
-
"""Gather entry point information by parsing :envvar:`
|
|
7
|
+
def load_entry(argv: List[str]) -> None:
|
|
8
|
+
"""Gather entry point information by parsing :envvar:`PYGPI_USERS`."""
|
|
9
|
+
|
|
10
10
|
entry_point_str = os.environ.get(
|
|
11
|
-
"
|
|
11
|
+
"PYGPI_USERS",
|
|
12
|
+
",".join(
|
|
13
|
+
(
|
|
14
|
+
"cocotb_tools._coverage:start_cocotb_library_coverage",
|
|
15
|
+
"cocotb.logging:_init",
|
|
16
|
+
"cocotb.logging:_setup_formatter",
|
|
17
|
+
"cocotb._init:init_package_from_simulation",
|
|
18
|
+
"cocotb._init:run_regression",
|
|
19
|
+
)
|
|
20
|
+
),
|
|
12
21
|
)
|
|
22
|
+
|
|
23
|
+
# Parse the entry point string of the form "module:func,module:func,...".
|
|
24
|
+
# Any failure prevents any entry points from being loaded.
|
|
25
|
+
entry_points: List[Tuple[str, str]] = []
|
|
13
26
|
try:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
entry_func = reduce(getattr, entry_func_str.split("."), entry_module)
|
|
27
|
+
entry_points_str = entry_point_str.split(",")
|
|
28
|
+
for entry_point_str in entry_points_str:
|
|
29
|
+
entry_module_str, entry_func_str = entry_point_str.split(":")
|
|
30
|
+
# TODO maybe some basic validation of the module and function names.
|
|
31
|
+
# WITHOUT IMPORTING THEM.
|
|
32
|
+
entry_points.append((entry_module_str, entry_func_str))
|
|
21
33
|
except Exception as e:
|
|
22
|
-
raise RuntimeError(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
raise RuntimeError(f"Failure to parse PYGPI_USERS ('{entry_point_str}')") from e
|
|
35
|
+
|
|
36
|
+
# Run all entry points.
|
|
37
|
+
# Expect failure to stop the loading of any additional entry points.
|
|
38
|
+
for entry_module_str, entry_func_str in entry_points:
|
|
39
|
+
entry_module = importlib.import_module(entry_module_str)
|
|
40
|
+
entry_func: Callable[[List[str]], object] = reduce(
|
|
41
|
+
getattr, entry_func_str.split("."), cast("Any", entry_module)
|
|
42
|
+
)
|
|
43
|
+
entry_func(argv)
|
pygpi/py.typed
ADDED
|
File without changes
|