cocotb 2.0.0rc2__cp38-cp38-macosx_11_0_arm64.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 +65 -0
- cocotb/__init__.py +125 -0
- cocotb/_base_triggers.py +515 -0
- cocotb/_bridge.py +186 -0
- cocotb/_decorators.py +515 -0
- cocotb/_deprecation.py +36 -0
- cocotb/_exceptions.py +7 -0
- cocotb/_extended_awaitables.py +419 -0
- cocotb/_gpi_triggers.py +385 -0
- cocotb/_init.py +301 -0
- cocotb/_outcomes.py +54 -0
- cocotb/_profiling.py +46 -0
- cocotb/_py_compat.py +148 -0
- cocotb/_scheduler.py +448 -0
- cocotb/_test.py +248 -0
- cocotb/_test_factory.py +312 -0
- cocotb/_test_functions.py +42 -0
- cocotb/_typing.py +7 -0
- cocotb/_utils.py +274 -0
- cocotb/_version.py +4 -0
- cocotb/_xunit_reporter.py +66 -0
- cocotb/clock.py +419 -0
- cocotb/debug.py +24 -0
- cocotb/handle.py +1752 -0
- cocotb/libs/libcocotb.so +0 -0
- cocotb/libs/libcocotbfli_modelsim.so +0 -0
- cocotb/libs/libcocotbutils.so +0 -0
- cocotb/libs/libcocotbvhpi_aldec.so +0 -0
- cocotb/libs/libcocotbvhpi_ius.so +0 -0
- cocotb/libs/libcocotbvhpi_modelsim.so +0 -0
- cocotb/libs/libcocotbvhpi_nvc.so +0 -0
- cocotb/libs/libcocotbvpi_aldec.so +0 -0
- cocotb/libs/libcocotbvpi_dsim.so +0 -0
- cocotb/libs/libcocotbvpi_ghdl.so +0 -0
- cocotb/libs/libcocotbvpi_icarus.vpl +0 -0
- cocotb/libs/libcocotbvpi_ius.so +0 -0
- cocotb/libs/libcocotbvpi_modelsim.so +0 -0
- cocotb/libs/libcocotbvpi_vcs.so +0 -0
- cocotb/libs/libcocotbvpi_verilator.so +0 -0
- cocotb/libs/libembed.so +0 -0
- cocotb/libs/libgpi.so +0 -0
- cocotb/libs/libgpilog.so +0 -0
- cocotb/libs/libpygpilog.so +0 -0
- cocotb/logging.py +424 -0
- cocotb/py.typed +0 -0
- cocotb/queue.py +225 -0
- cocotb/regression.py +896 -0
- cocotb/result.py +38 -0
- cocotb/share/def/.gitignore +2 -0
- cocotb/share/def/README.md +4 -0
- cocotb/share/def/aldec.def +61 -0
- cocotb/share/def/ghdl.def +43 -0
- cocotb/share/def/icarus.def +43 -0
- cocotb/share/def/modelsim.def +138 -0
- cocotb/share/include/cocotb_utils.h +70 -0
- cocotb/share/include/embed.h +33 -0
- cocotb/share/include/exports.h +20 -0
- cocotb/share/include/gpi.h +459 -0
- cocotb/share/include/gpi_logging.h +291 -0
- cocotb/share/include/py_gpi_logging.h +33 -0
- cocotb/share/include/vhpi_user_ext.h +26 -0
- cocotb/share/include/vpi_user_ext.h +33 -0
- cocotb/share/lib/verilator/verilator.cpp +209 -0
- cocotb/simtime.py +230 -0
- cocotb/simulator.cpython-38-darwin.so +0 -0
- cocotb/simulator.pyi +107 -0
- cocotb/task.py +590 -0
- cocotb/triggers.py +67 -0
- cocotb/types/__init__.py +31 -0
- cocotb/types/_abstract_array.py +151 -0
- cocotb/types/_array.py +295 -0
- cocotb/types/_indexing.py +17 -0
- cocotb/types/_logic.py +333 -0
- cocotb/types/_logic_array.py +868 -0
- cocotb/types/_range.py +197 -0
- cocotb/types/_resolve.py +76 -0
- cocotb/utils.py +110 -0
- cocotb-2.0.0rc2.dist-info/LICENSE +29 -0
- cocotb-2.0.0rc2.dist-info/METADATA +46 -0
- cocotb-2.0.0rc2.dist-info/RECORD +115 -0
- cocotb-2.0.0rc2.dist-info/WHEEL +5 -0
- cocotb-2.0.0rc2.dist-info/entry_points.txt +2 -0
- cocotb-2.0.0rc2.dist-info/top_level.txt +23 -0
- cocotb_tools/__init__.py +0 -0
- cocotb_tools/_coverage.py +33 -0
- cocotb_tools/_vendor/__init__.py +3 -0
- cocotb_tools/_vendor/distutils_version.py +346 -0
- cocotb_tools/check_results.py +65 -0
- cocotb_tools/combine_results.py +152 -0
- cocotb_tools/config.py +241 -0
- cocotb_tools/ipython_support.py +99 -0
- cocotb_tools/makefiles/Makefile.deprecations +27 -0
- cocotb_tools/makefiles/Makefile.inc +198 -0
- cocotb_tools/makefiles/Makefile.sim +96 -0
- cocotb_tools/makefiles/simulators/Makefile.activehdl +72 -0
- cocotb_tools/makefiles/simulators/Makefile.cvc +61 -0
- cocotb_tools/makefiles/simulators/Makefile.dsim +39 -0
- cocotb_tools/makefiles/simulators/Makefile.ghdl +84 -0
- 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_tools/makefiles/simulators/Makefile.questa-compat +143 -0
- cocotb_tools/makefiles/simulators/Makefile.questa-qisqrun +149 -0
- cocotb_tools/makefiles/simulators/Makefile.riviera +144 -0
- cocotb_tools/makefiles/simulators/Makefile.vcs +65 -0
- cocotb_tools/makefiles/simulators/Makefile.verilator +79 -0
- cocotb_tools/makefiles/simulators/Makefile.xcelium +104 -0
- cocotb_tools/py.typed +0 -0
- cocotb_tools/runner.py +1868 -0
- cocotb_tools/sim_versions.py +140 -0
- pygpi/__init__.py +0 -0
- pygpi/entry.py +42 -0
- pygpi/py.typed +0 -0
cocotb/types/_range.py
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Copyright cocotb contributors
|
|
2
|
+
# Licensed under the Revised BSD License, see LICENSE for details.
|
|
3
|
+
# SPDX-License-Identifier: BSD-3-Clause
|
|
4
|
+
import copy
|
|
5
|
+
from functools import lru_cache
|
|
6
|
+
from typing import Any, Dict, Iterator, Sequence, Union, overload
|
|
7
|
+
|
|
8
|
+
from cocotb._utils import cached_method
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class Range(Sequence[int]):
|
|
12
|
+
r"""
|
|
13
|
+
Variant of :class:`range` with inclusive right bound.
|
|
14
|
+
|
|
15
|
+
In Python, :class:`range` and :class:`slice` have a non-inclusive right bound.
|
|
16
|
+
In both Verilog and VHDL, ranges and arrays have an inclusive right bound.
|
|
17
|
+
This type mimics Python's :class:`range` type, but implements HDL-like inclusive right bounds,
|
|
18
|
+
using the names :attr:`left` and :attr:`right` as replacements for ``start`` and ``stop`` to
|
|
19
|
+
match VHDL.
|
|
20
|
+
Range directionality can be specified using ``'to'`` or ``'downto'`` between the
|
|
21
|
+
left and right bounds.
|
|
22
|
+
Not specifying directionality will cause the directionality to be inferred.
|
|
23
|
+
|
|
24
|
+
.. code-block:: pycon3
|
|
25
|
+
|
|
26
|
+
>>> r = Range(-2, 3)
|
|
27
|
+
>>> r.left, r.right, len(r)
|
|
28
|
+
(-2, 3, 6)
|
|
29
|
+
|
|
30
|
+
>>> s = Range(8, "downto", 1)
|
|
31
|
+
>>> s.left, s.right, len(s)
|
|
32
|
+
(8, 1, 8)
|
|
33
|
+
|
|
34
|
+
:meth:`from_range` and :meth:`to_range` can be used to convert from and to :class:`range`.
|
|
35
|
+
|
|
36
|
+
.. code-block:: pycon3
|
|
37
|
+
|
|
38
|
+
>>> r = Range(-2, 3)
|
|
39
|
+
>>> r.to_range()
|
|
40
|
+
range(-2, 4)
|
|
41
|
+
|
|
42
|
+
:class:`Range` supports "null" ranges as seen in VHDL.
|
|
43
|
+
"null" ranges occur when a left bound cannot reach a right bound with the given direction.
|
|
44
|
+
They have a length of ``0``, but the :attr:`left`, :attr:`right`, and :attr:`direction` values remain as given.
|
|
45
|
+
|
|
46
|
+
.. code-block:: pycon3
|
|
47
|
+
|
|
48
|
+
>>> r = Range(1, "to", 0) # no way to count from 1 'to' 0
|
|
49
|
+
>>> r.left, r.direction, r.right
|
|
50
|
+
(1, 'to', 0)
|
|
51
|
+
>>> len(r)
|
|
52
|
+
0
|
|
53
|
+
|
|
54
|
+
.. note::
|
|
55
|
+
This is only possible when specifying the direction.
|
|
56
|
+
|
|
57
|
+
Ranges also support all the features of :class:`range` including, but not limited to:
|
|
58
|
+
|
|
59
|
+
- ``value in range`` to see if a value is in the range,
|
|
60
|
+
- ``range.index(value)`` to see what position in the range the value is,
|
|
61
|
+
|
|
62
|
+
The typical use case of this type is in conjunction with :class:`~cocotb.types.Array`.
|
|
63
|
+
|
|
64
|
+
Args:
|
|
65
|
+
left: Leftmost bound of range.
|
|
66
|
+
direction: ``'to'`` if values are ascending, ``'downto'`` if descending.
|
|
67
|
+
right: Rightmost bound of range (inclusive).
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
@overload
|
|
71
|
+
def __init__(self, left: int, direction: int) -> None: ...
|
|
72
|
+
|
|
73
|
+
@overload
|
|
74
|
+
def __init__(self, left: int, direction: str, right: int) -> None: ...
|
|
75
|
+
|
|
76
|
+
@overload
|
|
77
|
+
def __init__(self, left: int, *, right: int) -> None: ...
|
|
78
|
+
|
|
79
|
+
def __init__(
|
|
80
|
+
self,
|
|
81
|
+
left: int,
|
|
82
|
+
direction: Union[int, str, None] = None,
|
|
83
|
+
right: Union[int, None] = None,
|
|
84
|
+
) -> None:
|
|
85
|
+
start = left
|
|
86
|
+
stop: int
|
|
87
|
+
step: int
|
|
88
|
+
if isinstance(direction, int) and right is None:
|
|
89
|
+
step = _guess_step(left, direction)
|
|
90
|
+
stop = direction + step
|
|
91
|
+
elif isinstance(direction, str) and isinstance(right, int):
|
|
92
|
+
step = _direction_to_step(direction)
|
|
93
|
+
stop = right + step
|
|
94
|
+
elif direction is None and isinstance(right, int):
|
|
95
|
+
step = _guess_step(left, right)
|
|
96
|
+
stop = right + step
|
|
97
|
+
else:
|
|
98
|
+
raise TypeError("invalid arguments")
|
|
99
|
+
self._range = range(start, stop, step)
|
|
100
|
+
|
|
101
|
+
@classmethod
|
|
102
|
+
def from_range(cls, range: range) -> "Range":
|
|
103
|
+
"""Convert :class:`range` to :class:`Range`."""
|
|
104
|
+
return cls(
|
|
105
|
+
left=range.start,
|
|
106
|
+
direction=_step_to_direction(range.step),
|
|
107
|
+
right=(range.stop - range.step),
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
def to_range(self) -> range:
|
|
111
|
+
"""Convert Range to :class:`range`."""
|
|
112
|
+
return self._range
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def left(self) -> int:
|
|
116
|
+
"""Leftmost value in a Range."""
|
|
117
|
+
return self._range.start
|
|
118
|
+
|
|
119
|
+
@property
|
|
120
|
+
def direction(self) -> str:
|
|
121
|
+
"""``'to'`` if Range is ascending, ``'downto'`` otherwise."""
|
|
122
|
+
return _step_to_direction(self._range.step)
|
|
123
|
+
|
|
124
|
+
@property
|
|
125
|
+
def right(self) -> int:
|
|
126
|
+
"""Rightmost value in a Range."""
|
|
127
|
+
return self._range.stop - self._range.step
|
|
128
|
+
|
|
129
|
+
def __len__(self) -> int:
|
|
130
|
+
return len(self._range)
|
|
131
|
+
|
|
132
|
+
@overload
|
|
133
|
+
def __getitem__(self, item: int) -> int: ...
|
|
134
|
+
|
|
135
|
+
@overload
|
|
136
|
+
def __getitem__(self, item: slice) -> "Range": ...
|
|
137
|
+
|
|
138
|
+
def __getitem__(self, item: Union[int, slice]) -> Union[int, "Range"]:
|
|
139
|
+
if isinstance(item, int):
|
|
140
|
+
return self._range[item]
|
|
141
|
+
elif isinstance(item, slice):
|
|
142
|
+
return type(self).from_range(self._range[item])
|
|
143
|
+
raise TypeError(
|
|
144
|
+
f"indices must be integers or slices, not {type(item).__name__}"
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
def __contains__(self, item: object) -> bool:
|
|
148
|
+
return item in self._range
|
|
149
|
+
|
|
150
|
+
def __iter__(self) -> Iterator[int]:
|
|
151
|
+
return iter(self._range)
|
|
152
|
+
|
|
153
|
+
def __reversed__(self) -> Iterator[int]:
|
|
154
|
+
return reversed(self._range)
|
|
155
|
+
|
|
156
|
+
def __eq__(self, other: object) -> bool:
|
|
157
|
+
if isinstance(other, type(self)):
|
|
158
|
+
return self._range == other._range
|
|
159
|
+
return NotImplemented # must not be in a type narrowing context to be ignored properly
|
|
160
|
+
|
|
161
|
+
def __hash__(self) -> int:
|
|
162
|
+
return hash(self._range)
|
|
163
|
+
|
|
164
|
+
def __repr__(self) -> str:
|
|
165
|
+
return f"{type(self).__qualname__}({self.left!r}, {self.direction!r}, {self.right!r})"
|
|
166
|
+
|
|
167
|
+
index = cached_method(Sequence.index)
|
|
168
|
+
|
|
169
|
+
def __copy__(self) -> "Range":
|
|
170
|
+
return Range.from_range(self._range)
|
|
171
|
+
|
|
172
|
+
def __deepcopy__(self, memo: Dict[int, Any]) -> "Range":
|
|
173
|
+
return Range.from_range(copy.deepcopy(self._range, memo=memo))
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
def _guess_step(left: int, right: int) -> int:
|
|
177
|
+
if left <= right:
|
|
178
|
+
return 1
|
|
179
|
+
return -1
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
@lru_cache(maxsize=None)
|
|
183
|
+
def _direction_to_step(direction: str) -> int:
|
|
184
|
+
direction = direction.lower()
|
|
185
|
+
if direction == "to":
|
|
186
|
+
return 1
|
|
187
|
+
elif direction == "downto":
|
|
188
|
+
return -1
|
|
189
|
+
raise ValueError("direction must be 'to' or 'downto'")
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
def _step_to_direction(step: int) -> str:
|
|
193
|
+
if step == 1:
|
|
194
|
+
return "to"
|
|
195
|
+
elif step == -1:
|
|
196
|
+
return "downto"
|
|
197
|
+
raise ValueError("step must be 1 or -1")
|
cocotb/types/_resolve.py
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Copyright cocotb contributors
|
|
2
|
+
# Licensed under the Revised BSD License, see LICENSE for details.
|
|
3
|
+
# SPDX-License-Identifier: BSD-3-Clause
|
|
4
|
+
import os
|
|
5
|
+
from functools import lru_cache
|
|
6
|
+
from random import getrandbits
|
|
7
|
+
from typing import Callable, Dict, Union
|
|
8
|
+
|
|
9
|
+
from cocotb._py_compat import Final, Literal, TypeAlias
|
|
10
|
+
|
|
11
|
+
ResolverLiteral: TypeAlias = Literal["weak", "zeros", "ones", "random"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
_ord_0 = ord("0")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class _random_resolve_table(Dict[int, int]):
|
|
18
|
+
def __init__(self) -> None:
|
|
19
|
+
self[ord("0")] = ord("0")
|
|
20
|
+
self[ord("1")] = ord("1")
|
|
21
|
+
self[ord("L")] = ord("0")
|
|
22
|
+
self[ord("H")] = ord("1")
|
|
23
|
+
|
|
24
|
+
def __missing__(self, _: str) -> int:
|
|
25
|
+
return getrandbits(1) + _ord_0
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
_resolve_tables: Dict[str, Dict[int, int]] = {
|
|
29
|
+
"error": {},
|
|
30
|
+
"weak": str.maketrans("LHW", "01X"),
|
|
31
|
+
"zeros": str.maketrans("LHUXZW-", "0100000"),
|
|
32
|
+
"ones": str.maketrans("LHUXZW-", "0111111"),
|
|
33
|
+
"random": _random_resolve_table(),
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
_VALID_RESOLVERS = ("error", "weak", "zeros", "ones", "random")
|
|
37
|
+
_VALID_RESOLVERS_ERR_MSG = (
|
|
38
|
+
"Valid values are 'error', 'weak', 'zeros', 'ones', or 'random'"
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@lru_cache(maxsize=None)
|
|
43
|
+
def get_str_resolver(resolver: ResolverLiteral) -> Callable[[str], str]:
|
|
44
|
+
if resolver not in _VALID_RESOLVERS:
|
|
45
|
+
raise ValueError(f"Invalid resolver: {resolver!r}. {_VALID_RESOLVERS_ERR_MSG}")
|
|
46
|
+
|
|
47
|
+
resolve_table = _resolve_tables[resolver]
|
|
48
|
+
|
|
49
|
+
def resolve_func(value: str) -> str:
|
|
50
|
+
return value.translate(resolve_table)
|
|
51
|
+
|
|
52
|
+
return resolve_func
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def _init() -> Union[Callable[[str], str], None]:
|
|
56
|
+
_envvar = os.getenv("COCOTB_RESOLVE_X", None)
|
|
57
|
+
|
|
58
|
+
# no resolver
|
|
59
|
+
if _envvar is None:
|
|
60
|
+
return None
|
|
61
|
+
|
|
62
|
+
# backwards compatibility
|
|
63
|
+
resolver = _envvar.strip().lower()
|
|
64
|
+
if resolver == "value_error":
|
|
65
|
+
resolver = "error"
|
|
66
|
+
|
|
67
|
+
# get resolver
|
|
68
|
+
try:
|
|
69
|
+
return get_str_resolver(resolver)
|
|
70
|
+
except ValueError:
|
|
71
|
+
raise ValueError(
|
|
72
|
+
f"Invalid COCOTB_RESOLVE_X value: {_envvar!r}. {_VALID_RESOLVERS_ERR_MSG}"
|
|
73
|
+
) from None
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
RESOLVE_X: Final = _init()
|
cocotb/utils.py
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Copyright cocotb contributors
|
|
2
|
+
# Copyright (c) 2013 Potential Ventures Ltd
|
|
3
|
+
# Copyright (c) 2013 SolarFlare Communications Inc
|
|
4
|
+
# Licensed under the Revised BSD License, see LICENSE for details.
|
|
5
|
+
# SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
|
|
7
|
+
"""Tools for dealing with simulated time."""
|
|
8
|
+
|
|
9
|
+
import warnings
|
|
10
|
+
from decimal import Decimal
|
|
11
|
+
from fractions import Fraction
|
|
12
|
+
from typing import Union
|
|
13
|
+
|
|
14
|
+
from cocotb._typing import RoundMode, TimeUnit
|
|
15
|
+
from cocotb.simtime import (
|
|
16
|
+
_get_sim_steps,
|
|
17
|
+
_get_time_from_sim_steps,
|
|
18
|
+
get_sim_time,
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
__all__ = (
|
|
22
|
+
"get_sim_steps",
|
|
23
|
+
"get_sim_time",
|
|
24
|
+
"get_time_from_sim_steps",
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def get_time_from_sim_steps(
|
|
29
|
+
steps: int,
|
|
30
|
+
unit: Union[TimeUnit, None] = None,
|
|
31
|
+
*,
|
|
32
|
+
units: None = None,
|
|
33
|
+
) -> float:
|
|
34
|
+
"""Calculate simulation time in the specified *unit* from the *steps* based
|
|
35
|
+
on the simulator precision.
|
|
36
|
+
|
|
37
|
+
Args:
|
|
38
|
+
steps: Number of simulation steps.
|
|
39
|
+
unit: String specifying the unit of the result
|
|
40
|
+
(one of ``'fs'``, ``'ps'``, ``'ns'``, ``'us'``, ``'ms'``, ``'sec'``).
|
|
41
|
+
|
|
42
|
+
.. versionchanged:: 2.0
|
|
43
|
+
Renamed from ``units``.
|
|
44
|
+
|
|
45
|
+
Raises:
|
|
46
|
+
ValueError: If *unit* is not a valid unit.
|
|
47
|
+
|
|
48
|
+
Returns:
|
|
49
|
+
The simulation time in the specified unit.
|
|
50
|
+
"""
|
|
51
|
+
if units is not None:
|
|
52
|
+
warnings.warn(
|
|
53
|
+
"The 'units' argument has been renamed to 'unit'.",
|
|
54
|
+
DeprecationWarning,
|
|
55
|
+
stacklevel=2,
|
|
56
|
+
)
|
|
57
|
+
unit = units
|
|
58
|
+
if unit is None:
|
|
59
|
+
raise TypeError("Missing required argument 'unit'")
|
|
60
|
+
return _get_time_from_sim_steps(steps, unit)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def get_sim_steps(
|
|
64
|
+
time: Union[float, Fraction, Decimal],
|
|
65
|
+
unit: TimeUnit = "step",
|
|
66
|
+
*,
|
|
67
|
+
round_mode: RoundMode = "error",
|
|
68
|
+
units: None = None,
|
|
69
|
+
) -> int:
|
|
70
|
+
"""Calculates the number of simulation time steps for a given amount of *time*.
|
|
71
|
+
|
|
72
|
+
When *round_mode* is ``"error"``, a :exc:`ValueError` is thrown if the value cannot
|
|
73
|
+
be accurately represented in terms of simulator time steps.
|
|
74
|
+
When *round_mode* is ``"round"``, ``"ceil"``, or ``"floor"``, the corresponding
|
|
75
|
+
rounding function from the standard library will be used to round to a simulator
|
|
76
|
+
time step.
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
time: The value to convert to simulation time steps.
|
|
80
|
+
unit: String specifying the unit of the result
|
|
81
|
+
(one of ``'step'``, ``'fs'``, ``'ps'``, ``'ns'``, ``'us'``, ``'ms'``, ``'sec'``).
|
|
82
|
+
``'step'`` means *time* is already in simulation time steps.
|
|
83
|
+
|
|
84
|
+
.. versionchanged:: 2.0
|
|
85
|
+
Renamed from ``units``.
|
|
86
|
+
|
|
87
|
+
round_mode: String specifying how to handle time values that sit between time steps
|
|
88
|
+
(one of ``'error'``, ``'round'``, ``'ceil'``, ``'floor'``).
|
|
89
|
+
|
|
90
|
+
Returns:
|
|
91
|
+
The number of simulation time steps.
|
|
92
|
+
|
|
93
|
+
Raises:
|
|
94
|
+
ValueError: if the value cannot be represented accurately in terms of simulator
|
|
95
|
+
time steps when *round_mode* is ``"error"``.
|
|
96
|
+
|
|
97
|
+
.. versionchanged:: 1.5
|
|
98
|
+
Support ``'step'`` as the *unit* argument to mean "simulator time step".
|
|
99
|
+
|
|
100
|
+
.. versionchanged:: 1.6
|
|
101
|
+
Support rounding modes.
|
|
102
|
+
"""
|
|
103
|
+
if units is not None:
|
|
104
|
+
warnings.warn(
|
|
105
|
+
"The 'units' argument has been renamed to 'unit'.",
|
|
106
|
+
DeprecationWarning,
|
|
107
|
+
stacklevel=2,
|
|
108
|
+
)
|
|
109
|
+
unit = units
|
|
110
|
+
return _get_sim_steps(time, unit, round_mode=round_mode)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Copyright cocotb contributors
|
|
2
|
+
Copyright (c) 2013 Potential Ventures Ltd
|
|
3
|
+
Copyright (c) 2013 SolarFlare Communications Inc
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
21
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
22
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL POTENTIAL VENTURES LTD BE LIABLE FOR ANY
|
|
24
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
25
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
26
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
27
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
29
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: cocotb
|
|
3
|
+
Version: 2.0.0rc2
|
|
4
|
+
Summary: cocotb is a coroutine based cosimulation library for writing VHDL and Verilog testbenches in Python.
|
|
5
|
+
Home-page: https://www.cocotb.org
|
|
6
|
+
Author: Chris Higgs, Stuart Hodgson
|
|
7
|
+
Maintainer: cocotb contributors
|
|
8
|
+
Maintainer-email: cocotb@lists.librecores.org
|
|
9
|
+
License: BSD-3-Clause
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/cocotb/cocotb/issues
|
|
11
|
+
Project-URL: Source Code, https://github.com/cocotb/cocotb
|
|
12
|
+
Project-URL: Documentation, https://docs.cocotb.org
|
|
13
|
+
Platform: any
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
|
|
24
|
+
Classifier: Framework :: cocotb
|
|
25
|
+
Requires-Python: >=3.6.2
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: find-libpython
|
|
29
|
+
|
|
30
|
+
**cocotb** is a framework empowering users to write VHDL and Verilog testbenches in Python.
|
|
31
|
+
|
|
32
|
+
[](https://docs.cocotb.org/en/stable/)
|
|
33
|
+
[](https://github.com/cocotb/cocotb/actions/workflows/build-test-dev.yml)
|
|
34
|
+
[](https://pypi.org/project/cocotb/)
|
|
35
|
+
[](https://gitpod.io/#https://github.com/cocotb/cocotb)
|
|
36
|
+
[](https://codecov.io/gh/cocotb/cocotb)
|
|
37
|
+
|
|
38
|
+
* Check out the [tutorial](https://docs.cocotb.org/en/stable/quickstart.html)
|
|
39
|
+
* Read the [docs](https://docs.cocotb.org/en/stable/)
|
|
40
|
+
* Find more info in the [wiki](https://github.com/cocotb/cocotb/wiki)
|
|
41
|
+
* Discover [useful extensions](https://github.com/cocotb/cocotb/wiki/Further-Resources#utility-libraries-and-frameworks)
|
|
42
|
+
* Join the discussion in the [Gitter chat room](https://gitter.im/cocotb/Lobby)
|
|
43
|
+
* [Ask a question](https://github.com/cocotb/cocotb/discussions)
|
|
44
|
+
* [Raise a bug / request an enhancement](https://github.com/cocotb/cocotb/issues/new)
|
|
45
|
+
|
|
46
|
+
**Note: The current `master` branch of the cocotb repository is expected to be released as cocotb 2.0, which contains API-breaking changes from previous 1.x releases.**
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
cocotb_tools/runner.py,sha256=oOn0iH3BUzUeLuru3BOdv5VwD4AtUi_FdvmwDTfgzbQ,68487
|
|
2
|
+
cocotb_tools/config.py,sha256=jZXY5XtzC9ICYfjEkI9lbgTHxbf3RZjjYkqF-UN5EPE,7704
|
|
3
|
+
cocotb_tools/_coverage.py,sha256=6V5TUse5vCvr9H0CtEnc0-ad6gBB6YaDMYjTIBa98UY,1232
|
|
4
|
+
cocotb_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
cocotb_tools/combine_results.py,sha256=FX66q8E5PRlXK2y4INCx8f76o_MzWFVv2OdrdZ3og6E,5138
|
|
6
|
+
cocotb_tools/check_results.py,sha256=gMRCuwGfQa7jugtP9XhYf6Gna-2cI21s5iorhZxJUOQ,1704
|
|
7
|
+
cocotb_tools/ipython_support.py,sha256=5NG-GGNirzLBdbAb4JptNI_LrERyLFzRxllulURMIVQ,3345
|
|
8
|
+
cocotb_tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
+
cocotb_tools/sim_versions.py,sha256=K4OCJxtB3PKOKp3W3KAkJ8aeDWJme1E1yLC1IVBLDt4,3867
|
|
10
|
+
cocotb_tools/_vendor/__init__.py,sha256=kI58h_LZ9ejZK8qEueoQvE8UzymFGjChCzay-Wt6TRo,139
|
|
11
|
+
cocotb_tools/_vendor/distutils_version.py,sha256=sJSPH4U0N8A-kDlLnWk6rmYVcp0FQ5asmDr43NLkBuk,12839
|
|
12
|
+
cocotb_tools/makefiles/Makefile.deprecations,sha256=W8RYG1T7n9ZVVp8IvYCjYGq6ig_mj2gxPedSu-ljZsY,859
|
|
13
|
+
cocotb_tools/makefiles/Makefile.sim,sha256=aAKS_e8askZWKA9aIDHmcp2ak_MGK--v4rCFyq_wjEg,4075
|
|
14
|
+
cocotb_tools/makefiles/Makefile.inc,sha256=tRVGQHCwiVeUIR7RhLeAQRgHA9-8IKVuE_ESwO6wAcA,5248
|
|
15
|
+
cocotb_tools/makefiles/simulators/Makefile.ius,sha256=8P03JbHLWDQerLsZnicy1WCTp22lKFjNcX1U_YmBxPE,3572
|
|
16
|
+
cocotb_tools/makefiles/simulators/Makefile.modelsim,sha256=xCWHoXb-7I-bTAeE0zhDWDzxvz-RPODgQNOKKdrUx4A,346
|
|
17
|
+
cocotb_tools/makefiles/simulators/Makefile.activehdl,sha256=cQnGZbL6p_3mTVhkRQLWH37gTdlxLbbFYutEjilzNCY,2996
|
|
18
|
+
cocotb_tools/makefiles/simulators/Makefile.vcs,sha256=K4kt1aimNdmmrDUbG4l4Ls8ze9wlJMId4uAXquxRdYE,2154
|
|
19
|
+
cocotb_tools/makefiles/simulators/Makefile.ghdl,sha256=KFs3YfvWYfM73xb-Z_OVqqPVxPWMsEb0GdwuQD5J884,3368
|
|
20
|
+
cocotb_tools/makefiles/simulators/Makefile.questa-compat,sha256=ecTFYzUukVE67gSSgU8Bbka4nE_HSkigDkzCYaGarp0,5022
|
|
21
|
+
cocotb_tools/makefiles/simulators/Makefile.xcelium,sha256=kVHSShdV2vMFALxkFICv5MK0my3MwQrUKUuo8XC9tV4,4250
|
|
22
|
+
cocotb_tools/makefiles/simulators/Makefile.cvc,sha256=VCAZULDjFNBnQAtTZu55DbdLmB9kNn8b95c_dicDcSI,2907
|
|
23
|
+
cocotb_tools/makefiles/simulators/Makefile.verilator,sha256=9s4Te2XXBkKCtxTsQLFDmIZoDYbeTmoVu8mGJIgYpus,2751
|
|
24
|
+
cocotb_tools/makefiles/simulators/Makefile.questa-qisqrun,sha256=YiNY0VjJGU917Dr6RrdVj-buhbZjpH41excY3gW9-38,4868
|
|
25
|
+
cocotb_tools/makefiles/simulators/Makefile.riviera,sha256=C6oSLiHmkaldkOKYgBrh96eUc9TmMStshMb6rifry3g,5351
|
|
26
|
+
cocotb_tools/makefiles/simulators/Makefile.dsim,sha256=AujnzS87sisd5Eu3uHd7YrX-ZCm6NVjGy8FDEGRPe-4,1480
|
|
27
|
+
cocotb_tools/makefiles/simulators/Makefile.nvc,sha256=Z_cy_JDQXtyhpTbT18ythSg6lzacBgqaGHQKIWhos5w,2583
|
|
28
|
+
cocotb_tools/makefiles/simulators/Makefile.icarus,sha256=aJVtnEjcnwP8SDK9oOL1QDmAx3VquzRUUfh78AmpKYc,3128
|
|
29
|
+
cocotb_tools/makefiles/simulators/Makefile.questa,sha256=wAYh5BZ_YrEcQ7Um_hrODGqGdCCdtvu4RiP2NzHguxk,1475
|
|
30
|
+
pygpi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
31
|
+
pygpi/entry.py,sha256=lZ0nzVOiCEe-tkTPPlFdsPFbZ7IjRNpkzb-S7aBpPsQ,1602
|
|
32
|
+
pygpi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
33
|
+
cocotb-2.0.0rc2.dist-info/RECORD,,
|
|
34
|
+
cocotb-2.0.0rc2.dist-info/LICENSE,sha256=3pQtzDdAnzc7kmHa4cYCYCxW-JEg5YsLNVM1I014DQc,1572
|
|
35
|
+
cocotb-2.0.0rc2.dist-info/WHEEL,sha256=9FabR3Kab7Nb3lO5nBQWtZc544XJ0hYCmiQC2RH2bHM,107
|
|
36
|
+
cocotb-2.0.0rc2.dist-info/entry_points.txt,sha256=LQ3GHF3csyQTVmUZ1aLtd2y5DG1GgYUHZ_xntnGO5jg,59
|
|
37
|
+
cocotb-2.0.0rc2.dist-info/top_level.txt,sha256=DUaHMCeoMJZtkA8WahEqpzgXh33dut-fl59_VTNJDQ8,589
|
|
38
|
+
cocotb-2.0.0rc2.dist-info/METADATA,sha256=u0G9kBiTHmYhVuIjToasYCh2O6j-z3R4Q5-I-7s1Lu0,2706
|
|
39
|
+
cocotb/queue.py,sha256=QKXfcX1mQvhQuWu8FmkE-l31RHJmlAX42lFOx0AJRXQ,6473
|
|
40
|
+
cocotb/logging.py,sha256=wFgLqo_IKtmTSJv2vfppKNSfJ5AO7vjLuy4pLgV2-48,13823
|
|
41
|
+
cocotb/task.py,sha256=SJ64dcJM1ZSgSXAuJm5sWUpwrprsaxjXcLD5_U4KOqk,20486
|
|
42
|
+
cocotb/regression.py,sha256=OJQ-atiN2f_KR_zcV4OyPg6VR8sPdhhkJOpFYtDKuzA,28890
|
|
43
|
+
cocotb/_ANSI.py,sha256=A9Fsnyr0W0j1uNI5MfBElYsL4w2mOtawi2tgCW0ucM0,2207
|
|
44
|
+
cocotb/_typing.py,sha256=uZE2arMidGJHzge2XLM3Y5c5P2g5HlXZKy0tpA7Y38k,330
|
|
45
|
+
cocotb/triggers.py,sha256=6d2RbtiH_DguFhwEB8Q2sflhFuOqoUP0P_v0R3uYSMs,1383
|
|
46
|
+
cocotb/_init.py,sha256=_QQTlNtv0gx02eeIdFeIxc7tNu2zCRK60LiHHFGG_pw,10380
|
|
47
|
+
cocotb/_version.py,sha256=Y6b7AsgjECtxmYwwqWxmznZKrre_DkW1bIT7pe6ymr8,94
|
|
48
|
+
cocotb/handle.py,sha256=LdoGKEOB22HWfbSItr-Nerl6apJhEMwcjfneEdIefDA,61097
|
|
49
|
+
cocotb/simulator.cpython-38-darwin.so,sha256=roefOfjTVC_4EJptR2gGFQjJbZGehBClHCeom1bWvwA,101888
|
|
50
|
+
cocotb/simulator.pyi,sha256=rwupT4ntKgWeX0zOoEcTZaM-Vi6DV1oK2e6kGK0zM-Q,3707
|
|
51
|
+
cocotb/_deprecation.py,sha256=E2tXHQX2ut_dBxtc5ZaOEYr2XiV5CQjHjKg2uevehJ8,1228
|
|
52
|
+
cocotb/clock.py,sha256=jHKaod5i-mWu37eHJXyaaowBEpoBe8641FPj73oFnM0,13916
|
|
53
|
+
cocotb/_py_compat.py,sha256=PuGB-uxwQ6SDTdnjeDQJ6lYSJ6kZTkPBVbu1Hc_AqqA,3732
|
|
54
|
+
cocotb/_extended_awaitables.py,sha256=wB-AS569LpH9nd9rdh6GEh3_RuhEw9ymvbKh0dwyEOM,13489
|
|
55
|
+
cocotb/__init__.py,sha256=9DEyZWNi3NiMj2Bja0nLm05gzdLCaLZb0HXW0OtbzpY,3129
|
|
56
|
+
cocotb/_test_functions.py,sha256=XbTyMU0IH0CsBFTXZA6KY_QMR_PJd-fqo5V9ZjXEI4Q,1122
|
|
57
|
+
cocotb/result.py,sha256=t5lDNUw7zoQUR4lHo5kpPHkFT8lO0ahltjdibuu6dYU,1165
|
|
58
|
+
cocotb/_test.py,sha256=kHtMxaUz1hf732evDTDQKE-KOiGX4s-b_SfcBfxZf8U,8191
|
|
59
|
+
cocotb/_scheduler.py,sha256=UgJVN0zZDmqst15lU98FTPeF8Dg5_bTHMOQrVX-11mg,19903
|
|
60
|
+
cocotb/_bridge.py,sha256=lKXCuW5lYR7699cY0QTinUXBWCp7-Ak3wX_cg8aaEME,6010
|
|
61
|
+
cocotb/utils.py,sha256=xw4EsggUj4qhuyLnfOqEkjs45wUhvKNIU11uCwjwy8E,3381
|
|
62
|
+
cocotb/_decorators.py,sha256=r1pwTIBp-HhUySgOrdv1nl9R3L-nGCMbWxVizk2yt-g,17401
|
|
63
|
+
cocotb/_profiling.py,sha256=N9TJy0ogJmZJRSkDpsBjlFjQQhNDy1ALiBbTVhu597M,1106
|
|
64
|
+
cocotb/debug.py,sha256=Ew1M3cyzKc7L8NTCVg_tiudsJ_VqM1saVHx5ueZOxvo,792
|
|
65
|
+
cocotb/_gpi_triggers.py,sha256=qkMNueQfX6kEfIaVMKuAHE2YFfPpyQ_mnlf9FRGm29w,13182
|
|
66
|
+
cocotb/_outcomes.py,sha256=cqdWrO4Wn3qRwldBxjOWlry7IzuTDYv680JEG99ahSg,1311
|
|
67
|
+
cocotb/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
68
|
+
cocotb/simtime.py,sha256=ppu8Pb727egxaValQk_xK1YuqgItD9qN9qERmb9Z_Xc,6438
|
|
69
|
+
cocotb/_base_triggers.py,sha256=VOPjHK_90wKuZOv66uhwJ8w0QOdMhSKgmb8T4IHMxZU,15568
|
|
70
|
+
cocotb/_xunit_reporter.py,sha256=D-MP0-Astp8GqaBUbuk20avffKQL_Rm1fvODD3joLuI,2450
|
|
71
|
+
cocotb/_exceptions.py,sha256=nzg3WI8e3qT1e7VX9CnapO82nrKtZNGMLtuXWHY5n9o,250
|
|
72
|
+
cocotb/_test_factory.py,sha256=1SWfvBJgDP8LBdrn0O8nWu1Nmt0UYKNejfxStThZl3E,11615
|
|
73
|
+
cocotb/_utils.py,sha256=vLfVqq0wRfJnZhUIApNJZXYUucu8GAofRBiiFgNm5cY,8207
|
|
74
|
+
cocotb/types/_logic_array.py,sha256=oup-vsxkiV-hMWUBPS81vOPfSxzjb1WKh9BzoCQz31U,32761
|
|
75
|
+
cocotb/types/_logic.py,sha256=HoOu54y8z8NaqX7YtI77F2sS8rbw1a0_uEltF2OwEzw,11032
|
|
76
|
+
cocotb/types/_resolve.py,sha256=C7zNId5GQDwUxRxw6GFMN_DnafxXZyTi0p1DzolTL0o,2053
|
|
77
|
+
cocotb/types/_range.py,sha256=rrmS2OffYx9xc8Zn4U56ZmcJkiwdDaMRCGm_RLn-BwA,6224
|
|
78
|
+
cocotb/types/__init__.py,sha256=d9lzrU3Mn8e3Ori-2DDEU80oYQyfk8hKA7xCF3UOrJs,926
|
|
79
|
+
cocotb/types/_abstract_array.py,sha256=3k1TZl9ntb9NQpdgFlfA85i2-CWcqZGmkq0MKqUycHM,3908
|
|
80
|
+
cocotb/types/_array.py,sha256=0JBm3JqcnSvWKHhUoUNIkOIecSPhIegOhERqDjuebrk,10876
|
|
81
|
+
cocotb/types/_indexing.py,sha256=gUE72jkS1ARO-ChlIz9nn-MYPwmx5LihuxIasTLbAU8,526
|
|
82
|
+
cocotb/libs/libcocotbvpi_aldec.so,sha256=moW6QI4ug5Jdv8VLFx5xu7KMzGT3wivAu-MMKfB8OiI,124080
|
|
83
|
+
cocotb/libs/libcocotb.so,sha256=2oqZudpFUXw2nqB18Yk35n6sdi6WBBPAp6VY_42ChXQ,72608
|
|
84
|
+
cocotb/libs/libgpi.so,sha256=-JG0EyfMD-eirIzbMYZggC_9ehwtPN2ipFbwP8HASRQ,101456
|
|
85
|
+
cocotb/libs/libcocotbvpi_icarus.vpl,sha256=Ugxb61RjYx8woeQ2cYCJMLYdjwbX-ueYqgjMWFW90JY,124080
|
|
86
|
+
cocotb/libs/libcocotbvpi_verilator.so,sha256=R6wjtTPAPM9gRT_d4g0u3Z1hnKs5yJXYGfwo2oRplkk,124080
|
|
87
|
+
cocotb/libs/libcocotbutils.so,sha256=wVgFOgNb2_IPDiInytk1fb5WJrmEaAJJadL_Nz0MJ88,68640
|
|
88
|
+
cocotb/libs/libcocotbvhpi_nvc.so,sha256=u78DLqClSaOThGuXacLseZzPfDahVVglDXfZxoxtSFI,124704
|
|
89
|
+
cocotb/libs/libcocotbvhpi_modelsim.so,sha256=PwU_5M8EgWTFBQY_cHsojoRolZkvxgBh-cZRkD7lPsU,124704
|
|
90
|
+
cocotb/libs/libcocotbvpi_dsim.so,sha256=BE8P4F045Sw_dR57BCx_swp-DY_L3ohWywxoz6vYhQ8,124080
|
|
91
|
+
cocotb/libs/libcocotbvhpi_ius.so,sha256=awDSumnF-2D4TLYIYq-s94qLgr3mEkeAOYri7GV4GR4,124704
|
|
92
|
+
cocotb/libs/libcocotbvpi_vcs.so,sha256=TNqE6lZ3j1BZb4cOffewIyLLlZgIFUA3M07p8Ofddrw,124080
|
|
93
|
+
cocotb/libs/libpygpilog.so,sha256=THFdB6-J3822Fr2MuRewoCcci6SVt_DjhjT6RUUMY_0,74400
|
|
94
|
+
cocotb/libs/libcocotbvpi_ghdl.so,sha256=HeuqYHw65lFRmTEpn2P5uW4C06U9WItlypkxahd1p44,124080
|
|
95
|
+
cocotb/libs/libembed.so,sha256=rrlbR6s9kR4Q_3w1Q_Tdx9np4TGQ3koh6cswz0xTk8E,69040
|
|
96
|
+
cocotb/libs/libcocotbfli_modelsim.so,sha256=rhT4n16455eaj7H88jlDBU7ldtVjw-ZCaSERymr30S0,154096
|
|
97
|
+
cocotb/libs/libgpilog.so,sha256=rIH6sb4O3H4uL84YP9MlqGQo5c5N7LAkallKPxBbGzs,54208
|
|
98
|
+
cocotb/libs/libcocotbvpi_ius.so,sha256=7IUT6HeYKZlC9XN9HbTy6E6tlTn9_cPW61U9Zkj92oA,124080
|
|
99
|
+
cocotb/libs/libcocotbvhpi_aldec.so,sha256=brdLIbeZiU6YjmdfLOscbyBGr_almuj0NjKl-ljatXo,124704
|
|
100
|
+
cocotb/libs/libcocotbvpi_modelsim.so,sha256=sCbIUNjFNwi1xShJ8sZOYoXH0HNygL7tsMEeM3kOJqA,124080
|
|
101
|
+
cocotb/share/def/icarus.def,sha256=HkplSgynTbyVSY4tHmK3bgqWdQKG42LzbkR-4CjhW_M,655
|
|
102
|
+
cocotb/share/def/README.md,sha256=Y6LZM38BseXAURHcgcM4MUPJuJ-UUgPjXIpg9P9fEiA,376
|
|
103
|
+
cocotb/share/def/aldec.def,sha256=4IOhz9LD4c-jNtP4OH6SXjXmo2C8hGwt_Ll7MBxbk2I,930
|
|
104
|
+
cocotb/share/def/ghdl.def,sha256=6Ms8xLFjCCnL7_F_tZx2DOeHCAmI5Pqym2_wfV9SXso,662
|
|
105
|
+
cocotb/share/def/.gitignore,sha256=8esJ3SRQwSrq7hqrco6wqpuAwmbOFRtkaJdndujviKY,44
|
|
106
|
+
cocotb/share/def/modelsim.def,sha256=QSU3L5yPLEd570wblP5H2jSAZp9XNQDrAXiozPVzs64,2264
|
|
107
|
+
cocotb/share/include/py_gpi_logging.h,sha256=4oU9BHCunpltXat6-b9ik2zsh4vWFAT2ebTR_D9C7eg,689
|
|
108
|
+
cocotb/share/include/embed.h,sha256=DviLTSyKMd-38i9VRFXEgM-1W_-igAhhpRIhiyHQTzY,861
|
|
109
|
+
cocotb/share/include/exports.h,sha256=g9W56sF9imgH2Lj0WMJ-KYQxvaDkEDlbWk6SMQBEus8,657
|
|
110
|
+
cocotb/share/include/vpi_user_ext.h,sha256=FlSdT5hEfhwzt7VQUISnnQA3_siq4dNr_aMozlhPOxE,937
|
|
111
|
+
cocotb/share/include/cocotb_utils.h,sha256=jTunfxXAm4ciuYVuKwEKBQNe7fIQwB0ju9D4ezZuPAw,2407
|
|
112
|
+
cocotb/share/include/vhpi_user_ext.h,sha256=Pa8_2UZwEkv-eo4AHxd9LfwJ6fYaKF41X90hnYU5aYg,628
|
|
113
|
+
cocotb/share/include/gpi.h,sha256=iiel6ZZ4YdNEF9pjgq-4flvJTe4oqZv5lGkpkA4bFGM,15117
|
|
114
|
+
cocotb/share/include/gpi_logging.h,sha256=YqQhMyypYjIBAPAwba2kkJOCVmLpii3uoVainQpjEpg,13269
|
|
115
|
+
cocotb/share/lib/verilator/verilator.cpp,sha256=Asz8evrVHtBA4l-NvuV8m_y1xueWVZIQvgtseFTnQYM,6075
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
cocotb
|
|
2
|
+
cocotb/libs/libcocotb
|
|
3
|
+
cocotb/libs/libcocotbfli_modelsim
|
|
4
|
+
cocotb/libs/libcocotbutils
|
|
5
|
+
cocotb/libs/libcocotbvhpi_aldec
|
|
6
|
+
cocotb/libs/libcocotbvhpi_ius
|
|
7
|
+
cocotb/libs/libcocotbvhpi_modelsim
|
|
8
|
+
cocotb/libs/libcocotbvhpi_nvc
|
|
9
|
+
cocotb/libs/libcocotbvpi_aldec
|
|
10
|
+
cocotb/libs/libcocotbvpi_dsim
|
|
11
|
+
cocotb/libs/libcocotbvpi_ghdl
|
|
12
|
+
cocotb/libs/libcocotbvpi_icarus
|
|
13
|
+
cocotb/libs/libcocotbvpi_ius
|
|
14
|
+
cocotb/libs/libcocotbvpi_modelsim
|
|
15
|
+
cocotb/libs/libcocotbvpi_vcs
|
|
16
|
+
cocotb/libs/libcocotbvpi_verilator
|
|
17
|
+
cocotb/libs/libembed
|
|
18
|
+
cocotb/libs/libgpi
|
|
19
|
+
cocotb/libs/libgpilog
|
|
20
|
+
cocotb/libs/libpygpilog
|
|
21
|
+
cocotb/simulator
|
|
22
|
+
cocotb_tools
|
|
23
|
+
pygpi
|
cocotb_tools/__init__.py
ADDED
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Copyright cocotb contributors
|
|
2
|
+
# Licensed under the Revised BSD License, see LICENSE for details.
|
|
3
|
+
# SPDX-License-Identifier: BSD-3-Clause
|
|
4
|
+
import os
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def start_cocotb_library_coverage(_: object) -> None: # pragma: no cover
|
|
8
|
+
if "COCOTB_LIBRARY_COVERAGE" not in os.environ:
|
|
9
|
+
return
|
|
10
|
+
try:
|
|
11
|
+
import coverage # noqa: PLC0415
|
|
12
|
+
except (ImportError, ModuleNotFoundError):
|
|
13
|
+
raise RuntimeError(
|
|
14
|
+
"cocotb library coverage collection requested but coverage package not available. Install it using `pip install coverage`."
|
|
15
|
+
) from None
|
|
16
|
+
else:
|
|
17
|
+
library_coverage = coverage.coverage(
|
|
18
|
+
data_file=".coverage.cocotb",
|
|
19
|
+
config_file=False,
|
|
20
|
+
branch=True,
|
|
21
|
+
source=["cocotb"],
|
|
22
|
+
)
|
|
23
|
+
library_coverage.start()
|
|
24
|
+
|
|
25
|
+
def stop_library_coverage() -> None:
|
|
26
|
+
library_coverage.stop()
|
|
27
|
+
library_coverage.save() # pragma: no cover
|
|
28
|
+
|
|
29
|
+
# This must come after `library_coverage.start()` to ensure coverage is being
|
|
30
|
+
# collected on the cocotb library before importing from it.
|
|
31
|
+
from cocotb._init import _register_shutdown_callback # noqa: PLC0415
|
|
32
|
+
|
|
33
|
+
_register_shutdown_callback(stop_library_coverage)
|