cocotb 2.0.0rc2__cp313-cp313-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.

Files changed (115) hide show
  1. cocotb/_ANSI.py +65 -0
  2. cocotb/__init__.py +125 -0
  3. cocotb/_base_triggers.py +515 -0
  4. cocotb/_bridge.py +186 -0
  5. cocotb/_decorators.py +515 -0
  6. cocotb/_deprecation.py +36 -0
  7. cocotb/_exceptions.py +7 -0
  8. cocotb/_extended_awaitables.py +419 -0
  9. cocotb/_gpi_triggers.py +385 -0
  10. cocotb/_init.py +301 -0
  11. cocotb/_outcomes.py +54 -0
  12. cocotb/_profiling.py +46 -0
  13. cocotb/_py_compat.py +148 -0
  14. cocotb/_scheduler.py +448 -0
  15. cocotb/_test.py +248 -0
  16. cocotb/_test_factory.py +312 -0
  17. cocotb/_test_functions.py +42 -0
  18. cocotb/_typing.py +7 -0
  19. cocotb/_utils.py +274 -0
  20. cocotb/_version.py +4 -0
  21. cocotb/_xunit_reporter.py +66 -0
  22. cocotb/clock.py +419 -0
  23. cocotb/debug.py +24 -0
  24. cocotb/handle.py +1752 -0
  25. cocotb/libs/libcocotb.so +0 -0
  26. cocotb/libs/libcocotbfli_modelsim.so +0 -0
  27. cocotb/libs/libcocotbutils.so +0 -0
  28. cocotb/libs/libcocotbvhpi_aldec.so +0 -0
  29. cocotb/libs/libcocotbvhpi_ius.so +0 -0
  30. cocotb/libs/libcocotbvhpi_modelsim.so +0 -0
  31. cocotb/libs/libcocotbvhpi_nvc.so +0 -0
  32. cocotb/libs/libcocotbvpi_aldec.so +0 -0
  33. cocotb/libs/libcocotbvpi_dsim.so +0 -0
  34. cocotb/libs/libcocotbvpi_ghdl.so +0 -0
  35. cocotb/libs/libcocotbvpi_icarus.vpl +0 -0
  36. cocotb/libs/libcocotbvpi_ius.so +0 -0
  37. cocotb/libs/libcocotbvpi_modelsim.so +0 -0
  38. cocotb/libs/libcocotbvpi_vcs.so +0 -0
  39. cocotb/libs/libcocotbvpi_verilator.so +0 -0
  40. cocotb/libs/libembed.so +0 -0
  41. cocotb/libs/libgpi.so +0 -0
  42. cocotb/libs/libgpilog.so +0 -0
  43. cocotb/libs/libpygpilog.so +0 -0
  44. cocotb/logging.py +424 -0
  45. cocotb/py.typed +0 -0
  46. cocotb/queue.py +225 -0
  47. cocotb/regression.py +896 -0
  48. cocotb/result.py +38 -0
  49. cocotb/share/def/.gitignore +2 -0
  50. cocotb/share/def/README.md +4 -0
  51. cocotb/share/def/aldec.def +61 -0
  52. cocotb/share/def/ghdl.def +43 -0
  53. cocotb/share/def/icarus.def +43 -0
  54. cocotb/share/def/modelsim.def +138 -0
  55. cocotb/share/include/cocotb_utils.h +70 -0
  56. cocotb/share/include/embed.h +33 -0
  57. cocotb/share/include/exports.h +20 -0
  58. cocotb/share/include/gpi.h +459 -0
  59. cocotb/share/include/gpi_logging.h +291 -0
  60. cocotb/share/include/py_gpi_logging.h +33 -0
  61. cocotb/share/include/vhpi_user_ext.h +26 -0
  62. cocotb/share/include/vpi_user_ext.h +33 -0
  63. cocotb/share/lib/verilator/verilator.cpp +209 -0
  64. cocotb/simtime.py +230 -0
  65. cocotb/simulator.cpython-313-darwin.so +0 -0
  66. cocotb/simulator.pyi +107 -0
  67. cocotb/task.py +590 -0
  68. cocotb/triggers.py +67 -0
  69. cocotb/types/__init__.py +31 -0
  70. cocotb/types/_abstract_array.py +151 -0
  71. cocotb/types/_array.py +295 -0
  72. cocotb/types/_indexing.py +17 -0
  73. cocotb/types/_logic.py +333 -0
  74. cocotb/types/_logic_array.py +868 -0
  75. cocotb/types/_range.py +197 -0
  76. cocotb/types/_resolve.py +76 -0
  77. cocotb/utils.py +110 -0
  78. cocotb-2.0.0rc2.dist-info/METADATA +60 -0
  79. cocotb-2.0.0rc2.dist-info/RECORD +115 -0
  80. cocotb-2.0.0rc2.dist-info/WHEEL +5 -0
  81. cocotb-2.0.0rc2.dist-info/entry_points.txt +2 -0
  82. cocotb-2.0.0rc2.dist-info/licenses/LICENSE +29 -0
  83. cocotb-2.0.0rc2.dist-info/top_level.txt +23 -0
  84. cocotb_tools/__init__.py +0 -0
  85. cocotb_tools/_coverage.py +33 -0
  86. cocotb_tools/_vendor/__init__.py +3 -0
  87. cocotb_tools/_vendor/distutils_version.py +346 -0
  88. cocotb_tools/check_results.py +65 -0
  89. cocotb_tools/combine_results.py +152 -0
  90. cocotb_tools/config.py +241 -0
  91. cocotb_tools/ipython_support.py +99 -0
  92. cocotb_tools/makefiles/Makefile.deprecations +27 -0
  93. cocotb_tools/makefiles/Makefile.inc +198 -0
  94. cocotb_tools/makefiles/Makefile.sim +96 -0
  95. cocotb_tools/makefiles/simulators/Makefile.activehdl +72 -0
  96. cocotb_tools/makefiles/simulators/Makefile.cvc +61 -0
  97. cocotb_tools/makefiles/simulators/Makefile.dsim +39 -0
  98. cocotb_tools/makefiles/simulators/Makefile.ghdl +84 -0
  99. cocotb_tools/makefiles/simulators/Makefile.icarus +80 -0
  100. cocotb_tools/makefiles/simulators/Makefile.ius +93 -0
  101. cocotb_tools/makefiles/simulators/Makefile.modelsim +9 -0
  102. cocotb_tools/makefiles/simulators/Makefile.nvc +60 -0
  103. cocotb_tools/makefiles/simulators/Makefile.questa +29 -0
  104. cocotb_tools/makefiles/simulators/Makefile.questa-compat +143 -0
  105. cocotb_tools/makefiles/simulators/Makefile.questa-qisqrun +149 -0
  106. cocotb_tools/makefiles/simulators/Makefile.riviera +144 -0
  107. cocotb_tools/makefiles/simulators/Makefile.vcs +65 -0
  108. cocotb_tools/makefiles/simulators/Makefile.verilator +79 -0
  109. cocotb_tools/makefiles/simulators/Makefile.xcelium +104 -0
  110. cocotb_tools/py.typed +0 -0
  111. cocotb_tools/runner.py +1868 -0
  112. cocotb_tools/sim_versions.py +140 -0
  113. pygpi/__init__.py +0 -0
  114. pygpi/entry.py +42 -0
  115. pygpi/py.typed +0 -0
@@ -0,0 +1,140 @@
1
+ # Copyright cocotb contributors
2
+ # Licensed under the Revised BSD License, see LICENSE for details.
3
+ # SPDX-License-Identifier: BSD-3-Clause
4
+
5
+ # type: ignore # distutils is untyped, so there's little reason to check this file
6
+
7
+ """
8
+ Classes to compare simulation versions.
9
+
10
+ These are for cocotb-internal use only.
11
+
12
+ .. warning::
13
+ These classes silently allow comparing versions of different simulators.
14
+ """
15
+
16
+ from cocotb_tools._vendor.distutils_version import LooseVersion
17
+
18
+
19
+ class ActivehdlVersion(LooseVersion):
20
+ """Version numbering class for Aldec Active-HDL.
21
+
22
+ NOTE: unsupported versions exist, e.g.
23
+ ActivehdlVersion("10.5a.12.6914") > ActivehdlVersion("10.5.216.6767")
24
+ """
25
+
26
+
27
+ class CvcVersion(LooseVersion):
28
+ """Version numbering class for Tachyon DA CVC.
29
+
30
+ Example:
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)")
34
+ True
35
+ """
36
+
37
+
38
+ class GhdlVersion(LooseVersion):
39
+ """Version numbering class for GHDL."""
40
+
41
+
42
+ class IcarusVersion(LooseVersion):
43
+ """Version numbering class for Icarus Verilog.
44
+
45
+ Example:
46
+ >>> IcarusVersion("11.0 (devel)") > IcarusVersion("10.3 (stable)")
47
+ True
48
+ >>> IcarusVersion("10.3 (stable)") <= IcarusVersion("10.3 (stable)")
49
+ True
50
+ """
51
+
52
+
53
+ class ModelsimVersion(LooseVersion):
54
+ """Version numbering class for Mentor ModelSim."""
55
+
56
+
57
+ class QuestaVersion(LooseVersion):
58
+ """Version numbering class for Mentor Questa.
59
+
60
+ Example:
61
+ >>> QuestaVersion("10.7c 2018.08") > QuestaVersion("10.7b 2018.06")
62
+ True
63
+ >>> QuestaVersion("2020.1 2020.01") > QuestaVersion("10.7c 2018.08")
64
+ True
65
+ >>> QuestaVersion("2020.1 2020.01") == QuestaVersion("2020.1")
66
+ True
67
+ >>> QuestaVersion("2023.1_2 2023.03") > QuestaVersion("2023.1_1")
68
+ True
69
+ """
70
+
71
+ def parse(self, vstring):
72
+ # A Questa version string, as returned by the simulator, consists of two
73
+ # space-separated parts. The first part is the actual version number,
74
+ # the second part seems to be the year and month of the initial release.
75
+ # We only need the first part, which is also used in public
76
+ # communication by Siemens.
77
+ try:
78
+ first_component = vstring.split(" ", 1)[0]
79
+ except IndexError:
80
+ first_component = vstring
81
+
82
+ super().parse(first_component)
83
+
84
+
85
+ class RivieraVersion(LooseVersion):
86
+ """Version numbering class for Aldec Riviera-PRO.
87
+
88
+ Example:
89
+ >>> RivieraVersion("2019.10.138.7537") == RivieraVersion("2019.10.138.7537")
90
+ True
91
+ """
92
+
93
+
94
+ class VcsVersion(LooseVersion):
95
+ """Version numbering class for Synopsys VCS.
96
+
97
+ Example:
98
+ >>> VcsVersion("Q-2020.03-1_Full64") > VcsVersion("K-2015.09_Full64")
99
+ True
100
+ """
101
+
102
+
103
+ class VerilatorVersion(LooseVersion):
104
+ """Version numbering class for Verilator.
105
+
106
+ Example:
107
+ >>> VerilatorVersion("4.032 2020-04-04") > VerilatorVersion("4.031 devel")
108
+ True
109
+ """
110
+
111
+
112
+ class XceliumVersion(LooseVersion):
113
+ """Version numbering class for Cadence Xcelium.
114
+
115
+ Example:
116
+ >>> XceliumVersion("20.06-g183") > XceliumVersion("20.03-s002")
117
+ True
118
+ >>> XceliumVersion("20.07-e501") > XceliumVersion("20.06-g183")
119
+ True
120
+ """
121
+
122
+
123
+ class IusVersion(XceliumVersion): # inherit everything from Xcelium
124
+ """Version numbering class for Cadence IUS.
125
+
126
+ Example:
127
+ >>> IusVersion("15.20-s050") > IusVersion("15.20-s049")
128
+ True
129
+ """
130
+
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/__init__.py ADDED
File without changes
pygpi/entry.py ADDED
@@ -0,0 +1,42 @@
1
+ import importlib
2
+ import operator
3
+ import os
4
+ from typing import Callable, List, Tuple
5
+
6
+
7
+ def load_entry(argv: List[str]) -> None:
8
+ """Gather entry point information by parsing :envvar:`PYGPI_USERS`."""
9
+
10
+ entry_point_str = os.environ.get(
11
+ "PYGPI_USERS",
12
+ ",".join(
13
+ (
14
+ "cocotb_tools._coverage:start_cocotb_library_coverage",
15
+ "cocotb.logging:_configure",
16
+ "cocotb._init:init_package_from_simulation",
17
+ "cocotb._init:run_regression",
18
+ )
19
+ ),
20
+ )
21
+
22
+ # Parse the entry point string of the form "module:func,module:func,...".
23
+ # Any failure prevents any entry points from being loaded.
24
+ entry_points: List[Tuple[str, str]] = []
25
+ try:
26
+ entry_points_str = entry_point_str.split(",")
27
+ for entry_point_str in entry_points_str:
28
+ entry_module_str, entry_func_str = entry_point_str.split(":")
29
+ # TODO maybe some basic validation of the module and function names.
30
+ # WITHOUT IMPORTING THEM.
31
+ entry_points.append((entry_module_str, entry_func_str))
32
+ except Exception as e:
33
+ raise RuntimeError(f"Failure to parse PYGPI_USERS ('{entry_point_str}')") from e
34
+
35
+ # Run all entry points.
36
+ # Expect failure to stop the loading of any additional entry points.
37
+ for entry_module_str, entry_func_str in entry_points:
38
+ entry_module = importlib.import_module(entry_module_str)
39
+ entry_func: Callable[[List[str]], object] = operator.attrgetter(entry_func_str)(
40
+ entry_module
41
+ )
42
+ entry_func(argv)
pygpi/py.typed ADDED
File without changes