cocotb 1.9.2__tar.gz → 2.0.0rc2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cocotb might be problematic. Click here for more details.
- {cocotb-1.9.2 → cocotb-2.0.0rc2}/LICENSE +1 -0
- cocotb-2.0.0rc2/MANIFEST.in +5 -0
- cocotb-2.0.0rc2/PKG-INFO +60 -0
- cocotb-2.0.0rc2/README.md +17 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2}/cocotb_build_libs.py +58 -50
- cocotb-2.0.0rc2/pyproject.toml +203 -0
- cocotb-2.0.0rc2/setup.cfg +4 -0
- cocotb-2.0.0rc2/setup.py +131 -0
- cocotb-2.0.0rc2/src/cocotb/_ANSI.py +65 -0
- cocotb-2.0.0rc2/src/cocotb/__init__.py +125 -0
- cocotb-2.0.0rc2/src/cocotb/_base_triggers.py +515 -0
- cocotb-2.0.0rc2/src/cocotb/_bridge.py +186 -0
- cocotb-2.0.0rc2/src/cocotb/_decorators.py +515 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/_deprecation.py +3 -3
- cocotb-2.0.0rc2/src/cocotb/_exceptions.py +7 -0
- cocotb-2.0.0rc2/src/cocotb/_extended_awaitables.py +419 -0
- cocotb-2.0.0rc2/src/cocotb/_gpi_triggers.py +385 -0
- cocotb-2.0.0rc2/src/cocotb/_init.py +301 -0
- cocotb-2.0.0rc2/src/cocotb/_outcomes.py +54 -0
- cocotb-2.0.0rc2/src/cocotb/_profiling.py +46 -0
- cocotb-2.0.0rc2/src/cocotb/_py_compat.py +148 -0
- cocotb-2.0.0rc2/src/cocotb/_scheduler.py +448 -0
- cocotb-2.0.0rc2/src/cocotb/_test.py +248 -0
- cocotb-2.0.0rc2/src/cocotb/_test_factory.py +312 -0
- cocotb-2.0.0rc2/src/cocotb/_test_functions.py +42 -0
- cocotb-2.0.0rc2/src/cocotb/_typing.py +7 -0
- cocotb-2.0.0rc2/src/cocotb/_utils.py +274 -0
- cocotb-2.0.0rc2/src/cocotb/_version.py +4 -0
- cocotb-2.0.0rc2/src/cocotb/_xunit_reporter.py +66 -0
- cocotb-2.0.0rc2/src/cocotb/clock.py +419 -0
- cocotb-2.0.0rc2/src/cocotb/debug.py +24 -0
- cocotb-2.0.0rc2/src/cocotb/handle.py +1752 -0
- cocotb-2.0.0rc2/src/cocotb/logging.py +424 -0
- cocotb-2.0.0rc2/src/cocotb/queue.py +225 -0
- cocotb-2.0.0rc2/src/cocotb/regression.py +896 -0
- cocotb-2.0.0rc2/src/cocotb/result.py +38 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/def/modelsim.def +1 -0
- cocotb-2.0.0rc2/src/cocotb/share/include/cocotb_utils.h +70 -0
- cocotb-2.0.0rc2/src/cocotb/share/include/embed.h +33 -0
- cocotb-2.0.0rc2/src/cocotb/share/include/gpi.h +459 -0
- cocotb-2.0.0rc2/src/cocotb/share/include/gpi_logging.h +291 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/include/py_gpi_logging.h +8 -5
- cocotb-2.0.0rc2/src/cocotb/share/include/vpi_user_ext.h +33 -0
- cocotb-2.0.0rc2/src/cocotb/share/lib/embed/gpi_embed.cpp +307 -0
- cocotb-2.0.0rc2/src/cocotb/share/lib/fli/FliCbHdl.cpp +191 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/lib/fli/FliImpl.cpp +166 -160
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/lib/fli/FliImpl.h +167 -147
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/lib/fli/FliObjHdl.cpp +49 -59
- cocotb-2.0.0rc2/src/cocotb/share/lib/gpi/GpiCbHdl.cpp +55 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/lib/gpi/GpiCommon.cpp +106 -60
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/lib/gpi/gpi_priv.h +66 -88
- cocotb-2.0.0rc2/src/cocotb/share/lib/gpi_log/gpi_logging.cpp +197 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/lib/py_gpi_log/py_gpi_logging.cpp +55 -54
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/lib/simulator/simulatormodule.cpp +461 -232
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/lib/utils/cocotb_utils.cpp +5 -28
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/lib/verilator/verilator.cpp +80 -67
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/lib/vhpi/VhpiCbHdl.cpp +200 -182
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/lib/vhpi/VhpiImpl.cpp +242 -175
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/lib/vhpi/VhpiImpl.h +106 -110
- cocotb-2.0.0rc2/src/cocotb/share/lib/vpi/VpiCbHdl.cpp +253 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/lib/vpi/VpiImpl.cpp +234 -158
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/lib/vpi/VpiImpl.h +132 -113
- cocotb-2.0.0rc2/src/cocotb/share/lib/vpi/VpiIterator.cpp +378 -0
- cocotb-2.0.0rc2/src/cocotb/share/lib/vpi/VpiObj.cpp +115 -0
- cocotb-2.0.0rc2/src/cocotb/share/lib/vpi/VpiSignal.cpp +240 -0
- cocotb-2.0.0rc2/src/cocotb/simtime.py +230 -0
- cocotb-2.0.0rc2/src/cocotb/simulator.pyi +107 -0
- cocotb-2.0.0rc2/src/cocotb/task.py +590 -0
- cocotb-2.0.0rc2/src/cocotb/triggers.py +67 -0
- cocotb-2.0.0rc2/src/cocotb/types/__init__.py +31 -0
- cocotb-2.0.0rc2/src/cocotb/types/_abstract_array.py +151 -0
- cocotb-2.0.0rc2/src/cocotb/types/_array.py +295 -0
- cocotb-2.0.0rc2/src/cocotb/types/_indexing.py +17 -0
- cocotb-2.0.0rc2/src/cocotb/types/_logic.py +333 -0
- cocotb-2.0.0rc2/src/cocotb/types/_logic_array.py +868 -0
- cocotb-1.9.2/cocotb/types/range.py → cocotb-2.0.0rc2/src/cocotb/types/_range.py +47 -48
- cocotb-2.0.0rc2/src/cocotb/types/_resolve.py +76 -0
- cocotb-2.0.0rc2/src/cocotb/utils.py +110 -0
- cocotb-2.0.0rc2/src/cocotb.egg-info/PKG-INFO +60 -0
- cocotb-2.0.0rc2/src/cocotb.egg-info/SOURCES.txt +134 -0
- cocotb-2.0.0rc2/src/cocotb.egg-info/entry_points.txt +2 -0
- cocotb-2.0.0rc2/src/cocotb.egg-info/requires.txt +1 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb.egg-info/top_level.txt +2 -0
- cocotb-2.0.0rc2/src/cocotb_tools/_coverage.py +33 -0
- cocotb-2.0.0rc2/src/cocotb_tools/_vendor/__init__.py +3 -0
- cocotb-2.0.0rc2/src/cocotb_tools/check_results.py +65 -0
- cocotb-2.0.0rc2/src/cocotb_tools/combine_results.py +152 -0
- cocotb-2.0.0rc2/src/cocotb_tools/config.py +241 -0
- {cocotb-1.9.2/cocotb → cocotb-2.0.0rc2/src/cocotb_tools}/ipython_support.py +29 -22
- cocotb-2.0.0rc2/src/cocotb_tools/makefiles/Makefile.deprecations +27 -0
- {cocotb-1.9.2/cocotb/share → cocotb-2.0.0rc2/src/cocotb_tools}/makefiles/Makefile.inc +77 -55
- {cocotb-1.9.2/cocotb/share → cocotb-2.0.0rc2/src/cocotb_tools}/makefiles/Makefile.sim +16 -33
- {cocotb-1.9.2/cocotb/share → cocotb-2.0.0rc2/src/cocotb_tools}/makefiles/simulators/Makefile.activehdl +9 -16
- cocotb-2.0.0rc2/src/cocotb_tools/makefiles/simulators/Makefile.cvc +61 -0
- cocotb-2.0.0rc2/src/cocotb_tools/makefiles/simulators/Makefile.dsim +39 -0
- {cocotb-1.9.2/cocotb/share → cocotb-2.0.0rc2/src/cocotb_tools}/makefiles/simulators/Makefile.ghdl +13 -42
- cocotb-2.0.0rc2/src/cocotb_tools/makefiles/simulators/Makefile.icarus +80 -0
- cocotb-2.0.0rc2/src/cocotb_tools/makefiles/simulators/Makefile.ius +93 -0
- cocotb-2.0.0rc2/src/cocotb_tools/makefiles/simulators/Makefile.modelsim +9 -0
- cocotb-2.0.0rc2/src/cocotb_tools/makefiles/simulators/Makefile.nvc +60 -0
- cocotb-2.0.0rc2/src/cocotb_tools/makefiles/simulators/Makefile.questa +29 -0
- cocotb-1.9.2/cocotb/share/makefiles/simulators/Makefile.questa → cocotb-2.0.0rc2/src/cocotb_tools/makefiles/simulators/Makefile.questa-compat +26 -54
- cocotb-2.0.0rc2/src/cocotb_tools/makefiles/simulators/Makefile.questa-qisqrun +149 -0
- {cocotb-1.9.2/cocotb/share → cocotb-2.0.0rc2/src/cocotb_tools}/makefiles/simulators/Makefile.riviera +17 -56
- cocotb-2.0.0rc2/src/cocotb_tools/makefiles/simulators/Makefile.vcs +65 -0
- {cocotb-1.9.2/cocotb/share → cocotb-2.0.0rc2/src/cocotb_tools}/makefiles/simulators/Makefile.verilator +15 -22
- {cocotb-1.9.2/cocotb/share → cocotb-2.0.0rc2/src/cocotb_tools}/makefiles/simulators/Makefile.xcelium +20 -52
- cocotb-2.0.0rc2/src/cocotb_tools/py.typed +0 -0
- {cocotb-1.9.2/cocotb → cocotb-2.0.0rc2/src/cocotb_tools}/runner.py +843 -375
- cocotb-1.9.2/cocotb/_sim_versions.py → cocotb-2.0.0rc2/src/cocotb_tools/sim_versions.py +16 -21
- cocotb-2.0.0rc2/src/pygpi/__init__.py +0 -0
- cocotb-2.0.0rc2/src/pygpi/entry.py +42 -0
- cocotb-2.0.0rc2/src/pygpi/py.typed +0 -0
- cocotb-1.9.2/MANIFEST.in +0 -5
- cocotb-1.9.2/PKG-INFO +0 -168
- cocotb-1.9.2/README.md +0 -136
- cocotb-1.9.2/cocotb/ANSI.py +0 -92
- cocotb-1.9.2/cocotb/__init__.py +0 -371
- cocotb-1.9.2/cocotb/_py_compat.py +0 -63
- cocotb-1.9.2/cocotb/_version.py +0 -8
- cocotb-1.9.2/cocotb/binary.py +0 -858
- cocotb-1.9.2/cocotb/clock.py +0 -174
- cocotb-1.9.2/cocotb/config.py +0 -289
- cocotb-1.9.2/cocotb/decorators.py +0 -332
- cocotb-1.9.2/cocotb/handle.py +0 -1175
- cocotb-1.9.2/cocotb/log.py +0 -303
- cocotb-1.9.2/cocotb/memdebug.py +0 -35
- cocotb-1.9.2/cocotb/outcomes.py +0 -56
- cocotb-1.9.2/cocotb/queue.py +0 -179
- cocotb-1.9.2/cocotb/regression.py +0 -933
- cocotb-1.9.2/cocotb/result.py +0 -209
- cocotb-1.9.2/cocotb/scheduler.py +0 -1099
- cocotb-1.9.2/cocotb/share/include/cocotb_utils.h +0 -93
- cocotb-1.9.2/cocotb/share/include/embed.h +0 -56
- cocotb-1.9.2/cocotb/share/include/gpi.h +0 -265
- cocotb-1.9.2/cocotb/share/include/gpi_logging.h +0 -212
- cocotb-1.9.2/cocotb/share/include/vpi_user_ext.h +0 -55
- cocotb-1.9.2/cocotb/share/lib/embed/gpi_embed.cpp +0 -335
- cocotb-1.9.2/cocotb/share/lib/fli/FliCbHdl.cpp +0 -232
- cocotb-1.9.2/cocotb/share/lib/gpi/GpiCbHdl.cpp +0 -129
- cocotb-1.9.2/cocotb/share/lib/gpi_log/gpi_logging.cpp +0 -186
- cocotb-1.9.2/cocotb/share/lib/vpi/VpiCbHdl.cpp +0 -895
- cocotb-1.9.2/cocotb/share/makefiles/Makefile.deprecations +0 -12
- cocotb-1.9.2/cocotb/share/makefiles/simulators/Makefile.cvc +0 -94
- cocotb-1.9.2/cocotb/share/makefiles/simulators/Makefile.icarus +0 -111
- cocotb-1.9.2/cocotb/share/makefiles/simulators/Makefile.ius +0 -125
- cocotb-1.9.2/cocotb/share/makefiles/simulators/Makefile.modelsim +0 -32
- cocotb-1.9.2/cocotb/share/makefiles/simulators/Makefile.nvc +0 -64
- cocotb-1.9.2/cocotb/share/makefiles/simulators/Makefile.vcs +0 -98
- cocotb-1.9.2/cocotb/task.py +0 -325
- cocotb-1.9.2/cocotb/triggers.py +0 -1104
- cocotb-1.9.2/cocotb/types/__init__.py +0 -50
- cocotb-1.9.2/cocotb/types/array.py +0 -309
- cocotb-1.9.2/cocotb/types/logic.py +0 -292
- cocotb-1.9.2/cocotb/types/logic_array.py +0 -298
- cocotb-1.9.2/cocotb/utils.py +0 -698
- cocotb-1.9.2/cocotb/wavedrom.py +0 -199
- cocotb-1.9.2/cocotb/xunit_reporter.py +0 -80
- cocotb-1.9.2/cocotb.egg-info/PKG-INFO +0 -168
- cocotb-1.9.2/cocotb.egg-info/SOURCES.txt +0 -107
- cocotb-1.9.2/cocotb.egg-info/entry_points.txt +0 -2
- cocotb-1.9.2/cocotb.egg-info/requires.txt +0 -4
- cocotb-1.9.2/pygpi/entry.py +0 -26
- cocotb-1.9.2/pyproject.toml +0 -71
- cocotb-1.9.2/setup.cfg +0 -45
- cocotb-1.9.2/setup.py +0 -143
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/_vendor/README.md +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/_vendor/fli/acc_user.h +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/_vendor/fli/acc_vhdl.h +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/_vendor/fli/mti.h +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/_vendor/tcl/license.terms +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/_vendor/tcl/tcl.h +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/_vendor/tcl/tclDecls.h +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/_vendor/tcl/tclPlatDecls.h +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/_vendor/vhpi/vhpi_user.h +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/_vendor/vpi/sv_vpi_user.h +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/_vendor/vpi/vpi_user.h +0 -0
- /cocotb-1.9.2/cocotb/_vendor/__init__.py → /cocotb-2.0.0rc2/src/cocotb/py.typed +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/def/.gitignore +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/def/README.md +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/def/aldec.def +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/def/ghdl.def +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/def/icarus.def +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/include/exports.h +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/include/vhpi_user_ext.h +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb/share/lib/embed/embed.cpp +0 -0
- {cocotb-1.9.2 → cocotb-2.0.0rc2/src}/cocotb.egg-info/dependency_links.txt +0 -0
- {cocotb-1.9.2/pygpi → cocotb-2.0.0rc2/src/cocotb_tools}/__init__.py +0 -0
- {cocotb-1.9.2/cocotb → cocotb-2.0.0rc2/src/cocotb_tools}/_vendor/distutils_version.py +0 -0
cocotb-2.0.0rc2/PKG-INFO
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
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
|
+
Dynamic: author
|
|
30
|
+
Dynamic: classifier
|
|
31
|
+
Dynamic: description
|
|
32
|
+
Dynamic: description-content-type
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: license
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
Dynamic: maintainer
|
|
37
|
+
Dynamic: maintainer-email
|
|
38
|
+
Dynamic: platform
|
|
39
|
+
Dynamic: project-url
|
|
40
|
+
Dynamic: requires-dist
|
|
41
|
+
Dynamic: requires-python
|
|
42
|
+
Dynamic: summary
|
|
43
|
+
|
|
44
|
+
**cocotb** is a framework empowering users to write VHDL and Verilog testbenches in Python.
|
|
45
|
+
|
|
46
|
+
[](https://docs.cocotb.org/en/stable/)
|
|
47
|
+
[](https://github.com/cocotb/cocotb/actions/workflows/build-test-dev.yml)
|
|
48
|
+
[](https://pypi.org/project/cocotb/)
|
|
49
|
+
[](https://gitpod.io/#https://github.com/cocotb/cocotb)
|
|
50
|
+
[](https://codecov.io/gh/cocotb/cocotb)
|
|
51
|
+
|
|
52
|
+
* Check out the [tutorial](https://docs.cocotb.org/en/stable/quickstart.html)
|
|
53
|
+
* Read the [docs](https://docs.cocotb.org/en/stable/)
|
|
54
|
+
* Find more info in the [wiki](https://github.com/cocotb/cocotb/wiki)
|
|
55
|
+
* Discover [useful extensions](https://github.com/cocotb/cocotb/wiki/Further-Resources#utility-libraries-and-frameworks)
|
|
56
|
+
* Join the discussion in the [Gitter chat room](https://gitter.im/cocotb/Lobby)
|
|
57
|
+
* [Ask a question](https://github.com/cocotb/cocotb/discussions)
|
|
58
|
+
* [Raise a bug / request an enhancement](https://github.com/cocotb/cocotb/issues/new)
|
|
59
|
+
|
|
60
|
+
**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,17 @@
|
|
|
1
|
+
**cocotb** is a framework empowering users to write VHDL and Verilog testbenches in Python.
|
|
2
|
+
|
|
3
|
+
[](https://docs.cocotb.org/en/stable/)
|
|
4
|
+
[](https://github.com/cocotb/cocotb/actions/workflows/build-test-dev.yml)
|
|
5
|
+
[](https://pypi.org/project/cocotb/)
|
|
6
|
+
[](https://gitpod.io/#https://github.com/cocotb/cocotb)
|
|
7
|
+
[](https://codecov.io/gh/cocotb/cocotb)
|
|
8
|
+
|
|
9
|
+
* Check out the [tutorial](https://docs.cocotb.org/en/stable/quickstart.html)
|
|
10
|
+
* Read the [docs](https://docs.cocotb.org/en/stable/)
|
|
11
|
+
* Find more info in the [wiki](https://github.com/cocotb/cocotb/wiki)
|
|
12
|
+
* Discover [useful extensions](https://github.com/cocotb/cocotb/wiki/Further-Resources#utility-libraries-and-frameworks)
|
|
13
|
+
* Join the discussion in the [Gitter chat room](https://gitter.im/cocotb/Lobby)
|
|
14
|
+
* [Ask a question](https://github.com/cocotb/cocotb/discussions)
|
|
15
|
+
* [Raise a bug / request an enhancement](https://github.com/cocotb/cocotb/issues/new)
|
|
16
|
+
|
|
17
|
+
**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.**
|
|
@@ -18,7 +18,7 @@ from setuptools.command.build_ext import build_ext as _build_ext
|
|
|
18
18
|
|
|
19
19
|
logger = logging.getLogger(__name__)
|
|
20
20
|
cocotb_share_dir = os.path.abspath(
|
|
21
|
-
os.path.join(os.path.dirname(__file__), "cocotb", "share")
|
|
21
|
+
os.path.join(os.path.dirname(__file__), "src", "cocotb", "share")
|
|
22
22
|
)
|
|
23
23
|
_base_warns = [
|
|
24
24
|
"-Wall",
|
|
@@ -32,13 +32,15 @@ _base_warns = [
|
|
|
32
32
|
# (See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36750.) This flag can be
|
|
33
33
|
# removed once we require later GCC versions.
|
|
34
34
|
"-Wno-missing-field-initializers",
|
|
35
|
+
"-Werror=shadow",
|
|
35
36
|
]
|
|
36
|
-
_ccx_warns = _base_warns
|
|
37
|
+
_ccx_warns = [*_base_warns, "-Wnon-virtual-dtor", "-Woverloaded-virtual"]
|
|
37
38
|
_extra_cxx_compile_args = [
|
|
38
39
|
"-std=c++11",
|
|
39
40
|
"-fvisibility=hidden",
|
|
40
41
|
"-fvisibility-inlines-hidden",
|
|
41
|
-
|
|
42
|
+
*_ccx_warns,
|
|
43
|
+
]
|
|
42
44
|
if os.name != "nt":
|
|
43
45
|
_extra_cxx_compile_args += ["-flto"]
|
|
44
46
|
|
|
@@ -83,9 +85,8 @@ def create_sxs_assembly_manifest(
|
|
|
83
85
|
)
|
|
84
86
|
|
|
85
87
|
if not dependency_only:
|
|
86
|
-
manifest_body = (
|
|
87
|
-
|
|
88
|
-
"""\
|
|
88
|
+
manifest_body = textwrap.dedent(
|
|
89
|
+
"""\
|
|
89
90
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
90
91
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
|
91
92
|
<assemblyIdentity name="%s" version="1.0.0.0" type="win32" processorArchitecture="%s" />
|
|
@@ -93,26 +94,21 @@ def create_sxs_assembly_manifest(
|
|
|
93
94
|
%s
|
|
94
95
|
</assembly>
|
|
95
96
|
"""
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
textwrap.indent("".join(dependencies), " ").strip(),
|
|
102
|
-
)
|
|
97
|
+
) % (
|
|
98
|
+
name,
|
|
99
|
+
architecture,
|
|
100
|
+
filename,
|
|
101
|
+
textwrap.indent("".join(dependencies), " ").strip(),
|
|
103
102
|
)
|
|
104
103
|
else:
|
|
105
|
-
manifest_body = (
|
|
106
|
-
|
|
107
|
-
"""\
|
|
104
|
+
manifest_body = textwrap.dedent(
|
|
105
|
+
"""\
|
|
108
106
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
109
107
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
|
110
108
|
%s
|
|
111
109
|
</assembly>
|
|
112
110
|
"""
|
|
113
|
-
|
|
114
|
-
% (textwrap.indent("".join(dependencies), " ").strip())
|
|
115
|
-
)
|
|
111
|
+
) % (textwrap.indent("".join(dependencies), " ").strip())
|
|
116
112
|
|
|
117
113
|
return manifest_body
|
|
118
114
|
|
|
@@ -156,7 +152,7 @@ def create_rc_file(rc_filename, name, filename, libraries, runtime_libraries):
|
|
|
156
152
|
|
|
157
153
|
# Escape double quotes and put every line between double quotes for embedding into rc file
|
|
158
154
|
manifest = manifest.replace('"', '""')
|
|
159
|
-
manifest = "\n".join(['"
|
|
155
|
+
manifest = "\n".join([f'"{x}\\r\\n"' for x in manifest.splitlines()])
|
|
160
156
|
|
|
161
157
|
rc_body = (
|
|
162
158
|
textwrap.dedent(
|
|
@@ -182,7 +178,7 @@ def create_rc_file(rc_filename, name, filename, libraries, runtime_libraries):
|
|
|
182
178
|
|
|
183
179
|
# Escape double quotes and put every line between double quotes for embedding into rc file
|
|
184
180
|
manifest = manifest.replace('"', '""')
|
|
185
|
-
manifest = "\n".join(['"
|
|
181
|
+
manifest = "\n".join([f'"{x}\\r\\n"' for x in manifest.splitlines()])
|
|
186
182
|
|
|
187
183
|
rc_body += (
|
|
188
184
|
textwrap.dedent(
|
|
@@ -218,7 +214,7 @@ class build_ext(_build_ext):
|
|
|
218
214
|
if self.compiler is None:
|
|
219
215
|
return get_default_compiler() == "msvc"
|
|
220
216
|
else:
|
|
221
|
-
return
|
|
217
|
+
return getattr(self.compiler, "compiler_type", None) == "msvc"
|
|
222
218
|
|
|
223
219
|
def run(self):
|
|
224
220
|
if os.name == "nt":
|
|
@@ -237,7 +233,7 @@ class build_ext(_build_ext):
|
|
|
237
233
|
|
|
238
234
|
# Setuptools defaults to activate automatic manifest generation for msvc,
|
|
239
235
|
# disable it here as we manually generate it to also support mingw on windows
|
|
240
|
-
for
|
|
236
|
+
for k, ldflags in self.compiler._ldflags.items():
|
|
241
237
|
self.compiler._ldflags[k] = [
|
|
242
238
|
x for x in ldflags if not x.startswith("/MANIFEST")
|
|
243
239
|
] + ["/MANIFEST:NO"]
|
|
@@ -317,7 +313,7 @@ class build_ext(_build_ext):
|
|
|
317
313
|
]
|
|
318
314
|
if install_name is not None:
|
|
319
315
|
ext.extra_link_args += [
|
|
320
|
-
"-Wl,-install_name,@rpath
|
|
316
|
+
f"-Wl,-install_name,@rpath/{install_name}.so"
|
|
321
317
|
]
|
|
322
318
|
|
|
323
319
|
if sys.platform == "linux":
|
|
@@ -329,7 +325,7 @@ class build_ext(_build_ext):
|
|
|
329
325
|
# /path/to/libcocotbvhpi_modelsim.so)."
|
|
330
326
|
ext.extra_link_args += ["-static-libstdc++"]
|
|
331
327
|
|
|
332
|
-
ext.extra_link_args += ["-Wl,-rpath
|
|
328
|
+
ext.extra_link_args += [f"-Wl,-rpath,{rpath}" for rpath in rpaths]
|
|
333
329
|
|
|
334
330
|
# vpi_user.h and vhpi_user.h require that WIN32 is defined
|
|
335
331
|
if os.name == "nt":
|
|
@@ -364,13 +360,13 @@ class build_ext(_build_ext):
|
|
|
364
360
|
filename = _build_ext.get_ext_filename(self, ext_name)
|
|
365
361
|
|
|
366
362
|
# for the simulator python extension library, leaving suffix in place
|
|
367
|
-
if
|
|
363
|
+
if os.path.split(ext_name)[-1] == "simulator":
|
|
368
364
|
return filename
|
|
369
365
|
|
|
370
366
|
head, tail = os.path.split(filename)
|
|
371
367
|
tail_split = tail.split(".")
|
|
372
368
|
|
|
373
|
-
# mingw on msys2 uses `-` as
|
|
369
|
+
# mingw on msys2 uses `-` as separator
|
|
374
370
|
tail_split = tail_split[0].split("-")
|
|
375
371
|
|
|
376
372
|
# strip lib prefix if msvc is used
|
|
@@ -436,7 +432,8 @@ class build_ext(_build_ext):
|
|
|
436
432
|
"/def:" + os.path.join(def_dir, sim + ".def"),
|
|
437
433
|
"/out:" + os.path.join(def_dir, sim + ".lib"),
|
|
438
434
|
"/machine:" + ("X64" if sys.maxsize > 2**32 else "X86"),
|
|
439
|
-
]
|
|
435
|
+
],
|
|
436
|
+
check=True,
|
|
440
437
|
)
|
|
441
438
|
else:
|
|
442
439
|
subprocess.run(
|
|
@@ -446,7 +443,8 @@ class build_ext(_build_ext):
|
|
|
446
443
|
os.path.join(def_dir, sim + ".def"),
|
|
447
444
|
"-l",
|
|
448
445
|
os.path.join(def_dir, "lib" + sim + ".a"),
|
|
449
|
-
]
|
|
446
|
+
],
|
|
447
|
+
check=True,
|
|
450
448
|
)
|
|
451
449
|
|
|
452
450
|
|
|
@@ -491,7 +489,6 @@ def _get_common_lib_ext(include_dirs, share_lib_dir):
|
|
|
491
489
|
Defines common libraries.
|
|
492
490
|
|
|
493
491
|
All libraries go into the same directory to enable loading without modifying the library path (e.g. LD_LIBRARY_PATH).
|
|
494
|
-
In Makefile `LIB_DIR` (s) is used to point to this directory.
|
|
495
492
|
"""
|
|
496
493
|
|
|
497
494
|
#
|
|
@@ -505,7 +502,7 @@ def _get_common_lib_ext(include_dirs, share_lib_dir):
|
|
|
505
502
|
libcocotbutils_libraries.append("dl") # dlopen, dlerror, dlsym
|
|
506
503
|
libcocotbutils = Extension(
|
|
507
504
|
os.path.join("cocotb", "libs", "libcocotbutils"),
|
|
508
|
-
define_macros=[("COCOTBUTILS_EXPORTS", "")
|
|
505
|
+
define_macros=[("COCOTBUTILS_EXPORTS", ""), *_extra_defines],
|
|
509
506
|
include_dirs=include_dirs,
|
|
510
507
|
libraries=libcocotbutils_libraries,
|
|
511
508
|
sources=libcocotbutils_sources,
|
|
@@ -523,7 +520,7 @@ def _get_common_lib_ext(include_dirs, share_lib_dir):
|
|
|
523
520
|
libgpilog_sources += ["libgpilog.rc"]
|
|
524
521
|
libgpilog = Extension(
|
|
525
522
|
os.path.join("cocotb", "libs", "libgpilog"),
|
|
526
|
-
define_macros=[("GPILOG_EXPORTS", "")
|
|
523
|
+
define_macros=[("GPILOG_EXPORTS", ""), *_extra_defines],
|
|
527
524
|
include_dirs=include_dirs,
|
|
528
525
|
sources=libgpilog_sources,
|
|
529
526
|
)
|
|
@@ -538,7 +535,7 @@ def _get_common_lib_ext(include_dirs, share_lib_dir):
|
|
|
538
535
|
libpygpilog_sources += ["libpygpilog.rc"]
|
|
539
536
|
libpygpilog = Extension(
|
|
540
537
|
os.path.join("cocotb", "libs", "libpygpilog"),
|
|
541
|
-
define_macros=[("PYGPILOG_EXPORTS", "")
|
|
538
|
+
define_macros=[("PYGPILOG_EXPORTS", ""), *_extra_defines],
|
|
542
539
|
include_dirs=include_dirs,
|
|
543
540
|
libraries=["gpilog"],
|
|
544
541
|
sources=libpygpilog_sources,
|
|
@@ -552,8 +549,11 @@ def _get_common_lib_ext(include_dirs, share_lib_dir):
|
|
|
552
549
|
libembed_sources += ["libembed.rc"]
|
|
553
550
|
libembed = Extension(
|
|
554
551
|
os.path.join("cocotb", "libs", "libembed"),
|
|
555
|
-
define_macros=[
|
|
556
|
-
|
|
552
|
+
define_macros=[
|
|
553
|
+
("COCOTB_EMBED_EXPORTS", ""),
|
|
554
|
+
("PYTHON_LIB", _get_python_lib()),
|
|
555
|
+
*_extra_defines,
|
|
556
|
+
],
|
|
557
557
|
include_dirs=include_dirs,
|
|
558
558
|
libraries=["gpilog", "cocotbutils"],
|
|
559
559
|
sources=libembed_sources,
|
|
@@ -569,7 +569,7 @@ def _get_common_lib_ext(include_dirs, share_lib_dir):
|
|
|
569
569
|
os.path.join("cocotb", "libs", "libcocotb"),
|
|
570
570
|
define_macros=_extra_defines,
|
|
571
571
|
include_dirs=include_dirs,
|
|
572
|
-
libraries=["gpilog", "cocotbutils", "pygpilog"],
|
|
572
|
+
libraries=["gpilog", "cocotbutils", "pygpilog", "gpi"],
|
|
573
573
|
sources=libcocotb_sources,
|
|
574
574
|
)
|
|
575
575
|
|
|
@@ -588,8 +588,8 @@ def _get_common_lib_ext(include_dirs, share_lib_dir):
|
|
|
588
588
|
("GPI_EXPORTS", ""),
|
|
589
589
|
("LIB_EXT", _get_lib_ext_name()),
|
|
590
590
|
("SINGLETON_HANDLES", ""),
|
|
591
|
-
|
|
592
|
-
|
|
591
|
+
*_extra_defines,
|
|
592
|
+
],
|
|
593
593
|
include_dirs=include_dirs,
|
|
594
594
|
libraries=["cocotbutils", "gpilog", "embed"],
|
|
595
595
|
sources=libgpi_sources,
|
|
@@ -625,16 +625,17 @@ def _get_vpi_lib_ext(
|
|
|
625
625
|
libcocotbvpi_sources = [
|
|
626
626
|
os.path.join(share_lib_dir, "vpi", "VpiImpl.cpp"),
|
|
627
627
|
os.path.join(share_lib_dir, "vpi", "VpiCbHdl.cpp"),
|
|
628
|
+
os.path.join(share_lib_dir, "vpi", "VpiObj.cpp"),
|
|
629
|
+
os.path.join(share_lib_dir, "vpi", "VpiIterator.cpp"),
|
|
630
|
+
os.path.join(share_lib_dir, "vpi", "VpiSignal.cpp"),
|
|
628
631
|
]
|
|
629
632
|
if os.name == "nt":
|
|
630
633
|
libcocotbvpi_sources += [lib_name + ".rc"]
|
|
631
634
|
libcocotbvpi = Extension(
|
|
632
635
|
os.path.join("cocotb", "libs", lib_name),
|
|
633
|
-
define_macros=[("COCOTBVPI_EXPORTS", ""), (
|
|
634
|
-
+ [(sim_define, "")]
|
|
635
|
-
+ _extra_defines,
|
|
636
|
+
define_macros=[("COCOTBVPI_EXPORTS", ""), (sim_define, ""), *_extra_defines],
|
|
636
637
|
include_dirs=include_dirs,
|
|
637
|
-
libraries=["gpi", "gpilog"
|
|
638
|
+
libraries=["gpi", "gpilog", *extra_lib],
|
|
638
639
|
library_dirs=extra_lib_dir,
|
|
639
640
|
sources=libcocotbvpi_sources,
|
|
640
641
|
)
|
|
@@ -655,10 +656,8 @@ def _get_vhpi_lib_ext(
|
|
|
655
656
|
libcocotbvhpi = Extension(
|
|
656
657
|
os.path.join("cocotb", "libs", lib_name),
|
|
657
658
|
include_dirs=include_dirs,
|
|
658
|
-
define_macros=[("COCOTBVHPI_EXPORTS", ""), ("
|
|
659
|
-
|
|
660
|
-
+ _extra_defines,
|
|
661
|
-
libraries=["gpi", "gpilog"] + extra_lib,
|
|
659
|
+
define_macros=[("COCOTBVHPI_EXPORTS", ""), (sim_define, ""), *_extra_defines],
|
|
660
|
+
libraries=["gpi", "gpilog", *extra_lib],
|
|
662
661
|
library_dirs=extra_lib_dir,
|
|
663
662
|
sources=libcocotbvhpi_sources,
|
|
664
663
|
)
|
|
@@ -667,7 +666,6 @@ def _get_vhpi_lib_ext(
|
|
|
667
666
|
|
|
668
667
|
|
|
669
668
|
def get_ext():
|
|
670
|
-
|
|
671
669
|
cfg_vars = distutils.sysconfig.get_config_vars()
|
|
672
670
|
|
|
673
671
|
if sys.platform == "darwin":
|
|
@@ -677,7 +675,7 @@ def get_ext():
|
|
|
677
675
|
share_lib_dir = os.path.relpath(os.path.join(cocotb_share_dir, "lib"))
|
|
678
676
|
include_dirs = [
|
|
679
677
|
os.path.relpath(os.path.join(cocotb_share_dir, "include")),
|
|
680
|
-
os.path.relpath(os.path.join(os.path.dirname(__file__), "cocotb")),
|
|
678
|
+
os.path.relpath(os.path.join(os.path.dirname(__file__), "src", "cocotb")),
|
|
681
679
|
]
|
|
682
680
|
|
|
683
681
|
ext = []
|
|
@@ -736,9 +734,9 @@ def get_ext():
|
|
|
736
734
|
fli_sources += [lib_name + ".rc"]
|
|
737
735
|
fli_ext = Extension(
|
|
738
736
|
os.path.join("cocotb", "libs", lib_name),
|
|
739
|
-
define_macros=[("COCOTBFLI_EXPORTS", "")
|
|
737
|
+
define_macros=[("COCOTBFLI_EXPORTS", ""), *_extra_defines],
|
|
740
738
|
include_dirs=include_dirs,
|
|
741
|
-
libraries=["gpi", "gpilog"
|
|
739
|
+
libraries=["gpi", "gpilog", *modelsim_extra_lib],
|
|
742
740
|
sources=fli_sources,
|
|
743
741
|
)
|
|
744
742
|
|
|
@@ -831,4 +829,14 @@ def get_ext():
|
|
|
831
829
|
)
|
|
832
830
|
ext.append(nvc_vhpi_ext)
|
|
833
831
|
|
|
832
|
+
#
|
|
833
|
+
# DSim
|
|
834
|
+
#
|
|
835
|
+
if os.name == "posix":
|
|
836
|
+
logger.info("Compiling libraries for DSim")
|
|
837
|
+
dsim_vpi_ext = _get_vpi_lib_ext(
|
|
838
|
+
include_dirs=include_dirs, share_lib_dir=share_lib_dir, sim_define="DSim"
|
|
839
|
+
)
|
|
840
|
+
ext.append(dsim_vpi_ext)
|
|
841
|
+
|
|
834
842
|
return ext
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[tool.towncrier]
|
|
6
|
+
package = "cocotb"
|
|
7
|
+
directory = "docs/source/newsfragments"
|
|
8
|
+
filename = "docs/source/release_notes.rst"
|
|
9
|
+
issue_format = ":pr:`{issue}`"
|
|
10
|
+
# The first underline is used for the version/date header,
|
|
11
|
+
# the second underline for the subcategories (like 'Features')
|
|
12
|
+
underlines = ["=", "-"]
|
|
13
|
+
all_bullets = false
|
|
14
|
+
|
|
15
|
+
[[tool.towncrier.type]]
|
|
16
|
+
directory = "feature"
|
|
17
|
+
name = "Features"
|
|
18
|
+
showcontent = true
|
|
19
|
+
|
|
20
|
+
[[tool.towncrier.type]]
|
|
21
|
+
directory = "bugfix"
|
|
22
|
+
name = "Bugfixes"
|
|
23
|
+
showcontent = true
|
|
24
|
+
|
|
25
|
+
[[tool.towncrier.type]]
|
|
26
|
+
directory = "doc"
|
|
27
|
+
name = "Improved Documentation"
|
|
28
|
+
showcontent = true
|
|
29
|
+
|
|
30
|
+
[[tool.towncrier.type]]
|
|
31
|
+
directory = "removal"
|
|
32
|
+
name = "Deprecations and Removals"
|
|
33
|
+
showcontent = true
|
|
34
|
+
|
|
35
|
+
[[tool.towncrier.type]]
|
|
36
|
+
directory = "change"
|
|
37
|
+
name = "Changes"
|
|
38
|
+
showcontent = true
|
|
39
|
+
|
|
40
|
+
[tool.ruff]
|
|
41
|
+
extend-exclude = [
|
|
42
|
+
"docs/source/conf.py",
|
|
43
|
+
"makefiles",
|
|
44
|
+
"venv",
|
|
45
|
+
"_vendor",
|
|
46
|
+
".nox/",
|
|
47
|
+
]
|
|
48
|
+
target-version = "py37"
|
|
49
|
+
|
|
50
|
+
[tool.ruff.format]
|
|
51
|
+
docstring-code-format = true
|
|
52
|
+
|
|
53
|
+
[tool.ruff.lint]
|
|
54
|
+
extend-select = [
|
|
55
|
+
"I", # isort
|
|
56
|
+
"UP", # pyupgrade
|
|
57
|
+
"PL", # pylint
|
|
58
|
+
"E", # pycodestyle errors
|
|
59
|
+
"W", # pycodestyle warnings
|
|
60
|
+
"F", # pyflakes
|
|
61
|
+
"C4", # flake8-comprehension
|
|
62
|
+
"LOG", # flake8-logging
|
|
63
|
+
"G", # flake8-logging-format
|
|
64
|
+
"ISC", # implicit string concat
|
|
65
|
+
"TC", # flake8-typechecking
|
|
66
|
+
"SIM103", # return the condition directly
|
|
67
|
+
"SIM300", # yoda conditions
|
|
68
|
+
"RUF100", # unused noqa
|
|
69
|
+
"RUF101", # redirected noqa
|
|
70
|
+
"RUF010", # explicit type conversion in f-string
|
|
71
|
+
"RUF005", # collection literal concatenation
|
|
72
|
+
"RUF022", # unsorted __all__
|
|
73
|
+
"PERF101", # unnecessary list cast
|
|
74
|
+
"PERF102", # unnecessary dict.items()
|
|
75
|
+
"B007", # unused loop variable
|
|
76
|
+
"PYI030", # unnecessary literal union
|
|
77
|
+
]
|
|
78
|
+
ignore = [
|
|
79
|
+
"E741", # ambiguous variable name (preference)
|
|
80
|
+
"E501", # line too long (preference)
|
|
81
|
+
"PLR0912", # Too many branches (>12) (preference)
|
|
82
|
+
"PLR0913", # Too many arguments to function call (>5) (preference)
|
|
83
|
+
"PLR0915", # Too many statements (>50) (preference)
|
|
84
|
+
"PLR2004", # Magic value used in comparison (preference)
|
|
85
|
+
"PLW0603", # Using the global statement (preference)
|
|
86
|
+
"PLR0911", # Too many return statements (preference)
|
|
87
|
+
"PLW1641", # __eq__ without __hash__ (mypy compatibility)
|
|
88
|
+
]
|
|
89
|
+
|
|
90
|
+
[tool.ruff.lint.per-file-ignores]
|
|
91
|
+
# necessary because of how file is included into documentation
|
|
92
|
+
"examples/doc_examples/quickstart/test_my_design.py" = [
|
|
93
|
+
"E402",
|
|
94
|
+
"F811",
|
|
95
|
+
]
|
|
96
|
+
|
|
97
|
+
[tool.ruff.lint.isort]
|
|
98
|
+
known-first-party = [
|
|
99
|
+
"cocotb",
|
|
100
|
+
"cocotb_tools",
|
|
101
|
+
"pygpi",
|
|
102
|
+
]
|
|
103
|
+
known-third-party = [
|
|
104
|
+
"pytest",
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
[tool.cibuildwheel]
|
|
108
|
+
# Build for supported platforms only.
|
|
109
|
+
# Even though we only support 64 bit operating systems, we still support 32 bit
|
|
110
|
+
# userspace applications (Python and simulators) on Windows and Linux.
|
|
111
|
+
#
|
|
112
|
+
# - CPython on Linux i686 and x86_64 with glibc
|
|
113
|
+
# - CPython on Windows i686 and x86_64
|
|
114
|
+
# - CPython on macOS x86_64
|
|
115
|
+
build = "cp*-manylinux_x86_64 cp*-manylinux_i686 cp*-win_amd64 cp*-win32 cp*-macosx_x86_64 cp*-macosx_arm64"
|
|
116
|
+
|
|
117
|
+
# Build with optimizations and debugging
|
|
118
|
+
# -O2 Enables reasonable optimizations. -O3 is unnecessary with the virtual-call-heavy code in the GPI and may bloat binary size.
|
|
119
|
+
# -g Generate standard debugging info.
|
|
120
|
+
# -flto Enable LTO which can reduce binary size and improve inlining.
|
|
121
|
+
environment = {CFLAGS = "-O2 -g -flto", CPPFLAGS = "-O2 -g -flto", LDFLAGS = "-O2 -g -flto"}
|
|
122
|
+
|
|
123
|
+
# By default, build on manylinux2014 for compatibility with CentOS/RHEL 7+ (once
|
|
124
|
+
# the user updates Python) and Ubuntu 20.04+ (with system Python).
|
|
125
|
+
manylinux-x86_64-image = "manylinux2014"
|
|
126
|
+
manylinux-i686-image = "manylinux2014"
|
|
127
|
+
|
|
128
|
+
# Build with optimizations and debugging (Windows)
|
|
129
|
+
# /O2 Enables reasonable optimizations.
|
|
130
|
+
# /Z7 Enables debugging and places info in the binary (/Zi puts debug info in a different file).
|
|
131
|
+
# /Zo Improves debugging when optimizations are also enabled.
|
|
132
|
+
# /LTCG Enables LTO which can reduce binary size and improve inlining.
|
|
133
|
+
[tool.cibuildwheel.windows]
|
|
134
|
+
environment = {CL = "/O2 /Z7 /Zo /LTCG"}
|
|
135
|
+
|
|
136
|
+
[[tool.cibuildwheel.overrides]]
|
|
137
|
+
# Build CPython 3.6 wheels on manylinux1 to support Ubuntu 18.04, CentOS/RHEL 7
|
|
138
|
+
# and CentOS/RHEL 8 with their default Python 3.6/pip 9 installation.
|
|
139
|
+
select = "cp36-*"
|
|
140
|
+
manylinux-x86_64-image = "manylinux1"
|
|
141
|
+
manylinux-i686-image = "manylinux1"
|
|
142
|
+
|
|
143
|
+
[tool.pytest.ini_options]
|
|
144
|
+
# Note: Do *not* add files within the cocotb/ tree here. Add them to the
|
|
145
|
+
# noxfile instead.
|
|
146
|
+
testpaths = [
|
|
147
|
+
"tests/pytest",
|
|
148
|
+
]
|
|
149
|
+
|
|
150
|
+
# Ensure that all markers used in pytests are declared (in here).
|
|
151
|
+
addopts = "--strict-markers"
|
|
152
|
+
|
|
153
|
+
markers = [
|
|
154
|
+
"simulator_required: mark tests as needing a simulator",
|
|
155
|
+
"compile: the compile step in runner-based tests",
|
|
156
|
+
]
|
|
157
|
+
# log_cli = true
|
|
158
|
+
# log_cli_level = DEBUG
|
|
159
|
+
|
|
160
|
+
[tool.coverage.paths]
|
|
161
|
+
source = [
|
|
162
|
+
"src/cocotb/",
|
|
163
|
+
".nox/**/cocotb/",
|
|
164
|
+
]
|
|
165
|
+
|
|
166
|
+
[tool.coverage.report]
|
|
167
|
+
omit = [
|
|
168
|
+
"*/cocotb_tools/*",
|
|
169
|
+
"*/_vendor/*",
|
|
170
|
+
]
|
|
171
|
+
exclude_also = [
|
|
172
|
+
"@(typing\\.)?overload",
|
|
173
|
+
]
|
|
174
|
+
|
|
175
|
+
[tool.codespell]
|
|
176
|
+
ignore-words-list = [
|
|
177
|
+
"AFE",
|
|
178
|
+
"Synopsys",
|
|
179
|
+
"afe",
|
|
180
|
+
"afile",
|
|
181
|
+
"alog",
|
|
182
|
+
"ccompiler",
|
|
183
|
+
"datas",
|
|
184
|
+
"implementors",
|
|
185
|
+
"inout",
|
|
186
|
+
"nam",
|
|
187
|
+
"sting",
|
|
188
|
+
"synopsys",
|
|
189
|
+
]
|
|
190
|
+
|
|
191
|
+
[tool.mypy]
|
|
192
|
+
packages = ["cocotb", "pygpi"]
|
|
193
|
+
modules = ["noxfile"]
|
|
194
|
+
disallow_untyped_defs = true
|
|
195
|
+
disallow_any_unimported = true
|
|
196
|
+
disallow_untyped_calls = true
|
|
197
|
+
disallow_untyped_decorators = true
|
|
198
|
+
no_implicit_optional = true
|
|
199
|
+
warn_redundant_casts = true
|
|
200
|
+
warn_unused_ignores = true
|
|
201
|
+
implicit_reexport = false
|
|
202
|
+
show_error_codes = true
|
|
203
|
+
pretty = true
|