cocotb 1.9.2__cp311-cp311-win_amd64.whl → 2.0.0rc2__cp311-cp311-win_amd64.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 (161) hide show
  1. cocotb/_ANSI.py +65 -0
  2. cocotb/__init__.py +81 -327
  3. cocotb/_base_triggers.py +515 -0
  4. cocotb/_bridge.py +186 -0
  5. cocotb/_decorators.py +515 -0
  6. cocotb/_deprecation.py +3 -3
  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 +114 -29
  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 +3 -7
  21. cocotb/_xunit_reporter.py +66 -0
  22. cocotb/clock.py +353 -108
  23. cocotb/debug.py +24 -0
  24. cocotb/handle.py +1370 -793
  25. cocotb/libs/cocotb.dll +0 -0
  26. cocotb/libs/cocotb.exp +0 -0
  27. cocotb/libs/cocotb.lib +0 -0
  28. cocotb/libs/cocotbfli_modelsim.dll +0 -0
  29. cocotb/libs/cocotbfli_modelsim.exp +0 -0
  30. cocotb/libs/cocotbfli_modelsim.lib +0 -0
  31. cocotb/libs/cocotbutils.dll +0 -0
  32. cocotb/libs/cocotbutils.exp +0 -0
  33. cocotb/libs/cocotbutils.lib +0 -0
  34. cocotb/libs/cocotbvhpi_aldec.dll +0 -0
  35. cocotb/libs/cocotbvhpi_aldec.exp +0 -0
  36. cocotb/libs/cocotbvhpi_aldec.lib +0 -0
  37. cocotb/libs/cocotbvhpi_modelsim.dll +0 -0
  38. cocotb/libs/cocotbvhpi_modelsim.exp +0 -0
  39. cocotb/libs/cocotbvhpi_modelsim.lib +0 -0
  40. cocotb/libs/cocotbvpi_aldec.dll +0 -0
  41. cocotb/libs/cocotbvpi_aldec.exp +0 -0
  42. cocotb/libs/cocotbvpi_aldec.lib +0 -0
  43. cocotb/libs/cocotbvpi_ghdl.dll +0 -0
  44. cocotb/libs/cocotbvpi_ghdl.exp +0 -0
  45. cocotb/libs/cocotbvpi_ghdl.lib +0 -0
  46. cocotb/libs/cocotbvpi_icarus.exp +0 -0
  47. cocotb/libs/cocotbvpi_icarus.lib +0 -0
  48. cocotb/libs/cocotbvpi_icarus.vpl +0 -0
  49. cocotb/libs/cocotbvpi_modelsim.dll +0 -0
  50. cocotb/libs/cocotbvpi_modelsim.exp +0 -0
  51. cocotb/libs/cocotbvpi_modelsim.lib +0 -0
  52. cocotb/libs/embed.dll +0 -0
  53. cocotb/libs/embed.exp +0 -0
  54. cocotb/libs/embed.lib +0 -0
  55. cocotb/libs/gpi.dll +0 -0
  56. cocotb/libs/gpi.exp +0 -0
  57. cocotb/libs/gpi.lib +0 -0
  58. cocotb/libs/gpilog.dll +0 -0
  59. cocotb/libs/gpilog.exp +0 -0
  60. cocotb/libs/gpilog.lib +0 -0
  61. cocotb/libs/pygpilog.dll +0 -0
  62. cocotb/libs/pygpilog.exp +0 -0
  63. cocotb/libs/pygpilog.lib +0 -0
  64. cocotb/logging.py +424 -0
  65. cocotb/queue.py +103 -57
  66. cocotb/regression.py +680 -717
  67. cocotb/result.py +17 -188
  68. cocotb/share/def/aldec.exp +0 -0
  69. cocotb/share/def/aldec.lib +0 -0
  70. cocotb/share/def/ghdl.exp +0 -0
  71. cocotb/share/def/ghdl.lib +0 -0
  72. cocotb/share/def/icarus.exp +0 -0
  73. cocotb/share/def/icarus.lib +0 -0
  74. cocotb/share/def/modelsim.def +1 -0
  75. cocotb/share/def/modelsim.exp +0 -0
  76. cocotb/share/def/modelsim.lib +0 -0
  77. cocotb/share/include/cocotb_utils.h +9 -32
  78. cocotb/share/include/embed.h +7 -30
  79. cocotb/share/include/gpi.h +331 -137
  80. cocotb/share/include/gpi_logging.h +221 -142
  81. cocotb/share/include/py_gpi_logging.h +8 -5
  82. cocotb/share/include/vpi_user_ext.h +4 -26
  83. cocotb/share/lib/verilator/verilator.cpp +80 -67
  84. cocotb/simtime.py +230 -0
  85. cocotb/simulator.cp311-win_amd64.exp +0 -0
  86. cocotb/simulator.cp311-win_amd64.lib +0 -0
  87. cocotb/simulator.cp311-win_amd64.pyd +0 -0
  88. cocotb/simulator.pyi +107 -0
  89. cocotb/task.py +478 -213
  90. cocotb/triggers.py +55 -1092
  91. cocotb/types/__init__.py +28 -47
  92. cocotb/types/_abstract_array.py +151 -0
  93. cocotb/types/_array.py +295 -0
  94. cocotb/types/_indexing.py +17 -0
  95. cocotb/types/_logic.py +333 -0
  96. cocotb/types/_logic_array.py +868 -0
  97. cocotb/types/{range.py → _range.py} +47 -48
  98. cocotb/types/_resolve.py +76 -0
  99. cocotb/utils.py +58 -646
  100. cocotb-2.0.0rc2.dist-info/METADATA +60 -0
  101. cocotb-2.0.0rc2.dist-info/RECORD +146 -0
  102. {cocotb-1.9.2.dist-info → cocotb-2.0.0rc2.dist-info}/WHEEL +1 -1
  103. cocotb-2.0.0rc2.dist-info/entry_points.txt +2 -0
  104. {cocotb-1.9.2.dist-info → cocotb-2.0.0rc2.dist-info/licenses}/LICENSE +1 -0
  105. {cocotb-1.9.2.dist-info → cocotb-2.0.0rc2.dist-info}/top_level.txt +1 -0
  106. cocotb_tools/__init__.py +0 -0
  107. cocotb_tools/_coverage.py +33 -0
  108. cocotb_tools/_vendor/__init__.py +3 -0
  109. cocotb_tools/check_results.py +65 -0
  110. cocotb_tools/combine_results.py +152 -0
  111. cocotb_tools/config.py +241 -0
  112. {cocotb → cocotb_tools}/ipython_support.py +29 -22
  113. cocotb_tools/makefiles/Makefile.deprecations +27 -0
  114. {cocotb/share → cocotb_tools}/makefiles/Makefile.inc +77 -55
  115. {cocotb/share → cocotb_tools}/makefiles/Makefile.sim +16 -33
  116. {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.activehdl +9 -16
  117. cocotb_tools/makefiles/simulators/Makefile.cvc +61 -0
  118. cocotb_tools/makefiles/simulators/Makefile.dsim +39 -0
  119. {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.ghdl +13 -42
  120. cocotb_tools/makefiles/simulators/Makefile.icarus +80 -0
  121. cocotb_tools/makefiles/simulators/Makefile.ius +93 -0
  122. cocotb_tools/makefiles/simulators/Makefile.modelsim +9 -0
  123. cocotb_tools/makefiles/simulators/Makefile.nvc +60 -0
  124. cocotb_tools/makefiles/simulators/Makefile.questa +29 -0
  125. cocotb/share/makefiles/simulators/Makefile.questa → cocotb_tools/makefiles/simulators/Makefile.questa-compat +26 -54
  126. cocotb_tools/makefiles/simulators/Makefile.questa-qisqrun +149 -0
  127. {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.riviera +17 -56
  128. cocotb_tools/makefiles/simulators/Makefile.vcs +65 -0
  129. {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.verilator +15 -22
  130. {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.xcelium +20 -52
  131. cocotb_tools/py.typed +0 -0
  132. cocotb_tools/runner.py +1868 -0
  133. cocotb/_sim_versions.py → cocotb_tools/sim_versions.py +16 -21
  134. pygpi/entry.py +34 -18
  135. pygpi/py.typed +0 -0
  136. cocotb/ANSI.py +0 -92
  137. cocotb/binary.py +0 -858
  138. cocotb/config.py +0 -289
  139. cocotb/decorators.py +0 -332
  140. cocotb/log.py +0 -303
  141. cocotb/memdebug.py +0 -35
  142. cocotb/outcomes.py +0 -56
  143. cocotb/runner.py +0 -1400
  144. cocotb/scheduler.py +0 -1099
  145. cocotb/share/makefiles/Makefile.deprecations +0 -12
  146. cocotb/share/makefiles/simulators/Makefile.cvc +0 -94
  147. cocotb/share/makefiles/simulators/Makefile.icarus +0 -111
  148. cocotb/share/makefiles/simulators/Makefile.ius +0 -125
  149. cocotb/share/makefiles/simulators/Makefile.modelsim +0 -32
  150. cocotb/share/makefiles/simulators/Makefile.nvc +0 -64
  151. cocotb/share/makefiles/simulators/Makefile.vcs +0 -98
  152. cocotb/types/array.py +0 -309
  153. cocotb/types/logic.py +0 -292
  154. cocotb/types/logic_array.py +0 -298
  155. cocotb/wavedrom.py +0 -199
  156. cocotb/xunit_reporter.py +0 -80
  157. cocotb-1.9.2.dist-info/METADATA +0 -168
  158. cocotb-1.9.2.dist-info/RECORD +0 -121
  159. cocotb-1.9.2.dist-info/entry_points.txt +0 -2
  160. /cocotb/{_vendor/__init__.py → py.typed} +0 -0
  161. {cocotb → cocotb_tools}/_vendor/distutils_version.py +0 -0
@@ -1,12 +0,0 @@
1
- # Copyright cocotb contributors
2
- # Licensed under the Revised BSD License, see LICENSE for details.
3
- # SPDX-License-Identifier: BSD-3-Clause
4
-
5
- ifdef VERILATOR_TRACE
6
- $(warning VERILATOR_TRACE is deprecated, see the "Simulator Support" section in the documentation.)
7
- endif
8
-
9
- ifeq ($(SIM_LOWERCASE),aldec)
10
- $(warning Using SIM=aldec is deprecated, please use SIM=riviera instead.)
11
- SIM_LOWERCASE := riviera
12
- endif
@@ -1,94 +0,0 @@
1
- ###############################################################################
2
- # Copyright (c) 2014 Potential Ventures Ltd
3
- # All rights reserved.
4
- #
5
- # Redistribution and use in source and binary forms, with or without
6
- # modification, are permitted provided that the following conditions are met:
7
- # * Redistributions of source code must retain the above copyright
8
- # notice, this list of conditions and the following disclaimer.
9
- # * Redistributions in binary form must reproduce the above copyright
10
- # notice, this list of conditions and the following disclaimer in the
11
- # documentation and/or other materials provided with the distribution.
12
- # * Neither the name of Potential Ventures Ltd, nor the
13
- # names of its contributors may be used to endorse or promote products
14
- # derived from this software without specific prior written permission.
15
- #
16
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
- # DISCLAIMED. IN NO EVENT SHALL POTENTIAL VENTURES LTD BE LIABLE FOR ANY
20
- # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
- # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22
- # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
- # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
- # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
- # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
- ###############################################################################
27
-
28
- include $(shell cocotb-config --makefiles)/Makefile.inc
29
-
30
- ifneq ($(VHDL_SOURCES),)
31
-
32
- $(COCOTB_RESULTS_FILE):
33
- @echo "Skipping simulation as VHDL is not supported on simulator=$(SIM)"
34
- debug: $(COCOTB_RESULTS_FILE)
35
- clean::
36
-
37
- else
38
-
39
- CMD_BIN := cvc64
40
-
41
- ifdef CVC_BIN_DIR
42
- CMD := $(shell :; command -v $(CVC_BIN_DIR)/$(CMD_BIN) 2>/dev/null)
43
- else
44
- # auto-detect bin dir from system path
45
- CMD := $(shell :; command -v $(CMD_BIN) 2>/dev/null)
46
- endif
47
-
48
- ifeq (, $(CMD))
49
- $(error Unable to locate command >$(CMD_BIN)<)
50
- else
51
- CVC_BIN_DIR := $(shell dirname $(CMD))
52
- export CVC_BIN_DIR
53
- endif
54
-
55
- #only interpreted mode works for the moment
56
- CVC_ITERP ?= 1
57
-
58
- ifeq ($(CVC_ITERP),1)
59
- CVC_ARGS += +interp
60
- endif
61
-
62
- # Compilation phase
63
- $(SIM_BUILD)/sim.vvp: $(VERILOG_SOURCES) $(CUSTOM_COMPILE_DEPS) | $(SIM_BUILD)
64
- MODULE=$(MODULE) \
65
- TESTCASE=$(TESTCASE) TOPLEVEL=$(TOPLEVEL) TOPLEVEL_LANG=$(TOPLEVEL_LANG) \
66
- $(CMD) $(CVC_ARGS) +acc+2 -o $(SIM_BUILD)/sim.vvp +define+COCOTB_SIM=1 +loadvpi=$(shell cocotb-config --lib-name-path vpi cvc):vlog_startup_routines_bootstrap $(COMPILE_ARGS) $(EXTRA_ARGS) $(VERILOG_SOURCES)
67
-
68
- # Execution phase
69
- ifeq ($(CVC_ITERP),1)
70
- $(COCOTB_RESULTS_FILE): $(SIM_BUILD)/sim.vvp
71
- else
72
- $(COCOTB_RESULTS_FILE): $(SIM_BUILD)/sim.vvp $(CUSTOM_SIM_DEPS)
73
- MODULE=$(MODULE) \
74
- TESTCASE=$(TESTCASE) TOPLEVEL=$(TOPLEVEL) TOPLEVEL_LANG=$(TOPLEVEL_LANG) \
75
- $(SIM_CMD_PREFIX) $(SIM_BUILD)/sim.vvp $(SIM_ARGS) $(EXTRA_ARGS) $(PLUSARGS) $(SIM_CMD_SUFFIX)
76
- endif
77
-
78
- # Execution phase
79
- ifeq ($(CVC_ITERP),1)
80
- debug: $(CUSTOM_SIM_DEPS)
81
- MODULE=$(MODULE) \
82
- TESTCASE=$(TESTCASE) TOPLEVEL=$(TOPLEVEL) TOPLEVEL_LANG=$(TOPLEVEL_LANG) \
83
- $(SIM_CMD_PREFIX) gdb --args $(CMD) $(CVC_ARGS) +acc+2 -o $(SIM_BUILD)/sim.vvp +define+COCOTB_SIM=1 +loadvpi=$(shell cocotb-config --lib-name-path vpi cvc):vlog_startup_routines_bootstrap $(COMPILE_ARGS) $(EXTRA_ARGS) $(VERILOG_SOURCES)
84
- else
85
- debug: $(SIM_BUILD)/sim.vvp $(CUSTOM_SIM_DEPS)
86
- MODULE=$(MODULE) \
87
- TESTCASE=$(TESTCASE) TOPLEVEL=$(TOPLEVEL) TOPLEVEL_LANG=$(TOPLEVEL_LANG) \
88
- gdb --args $(SIM_BUILD)/sim.vvp $(SIM_ARGS) $(EXTRA_ARGS) $(PLUSARGS)
89
- endif
90
-
91
-
92
- clean::
93
- $(RM) -r $(SIM_BUILD)
94
- endif
@@ -1,111 +0,0 @@
1
- ###############################################################################
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
- # * Redistributions of source code must retain the above copyright
9
- # notice, this list of conditions and the following disclaimer.
10
- # * Redistributions in binary form must reproduce the above copyright
11
- # notice, this list of conditions and the following disclaimer in the
12
- # documentation and/or other materials provided with the distribution.
13
- # * Neither the name of Potential Ventures Ltd,
14
- # SolarFlare Communications Inc nor the
15
- # names of its contributors may be used to endorse or promote products
16
- # derived from this software without specific prior written permission.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- # DISCLAIMED. IN NO EVENT SHALL POTENTIAL VENTURES LTD BE LIABLE FOR ANY
22
- # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
- # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
- # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
- # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
- # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
- # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
- ###############################################################################
29
-
30
- TOPLEVEL_LANG ?= verilog
31
-
32
- include $(shell cocotb-config --makefiles)/Makefile.inc
33
-
34
- ifneq ($(or $(filter-out $(TOPLEVEL_LANG),verilog),$(VHDL_SOURCES)),)
35
-
36
- $(COCOTB_RESULTS_FILE):
37
- @echo "Skipping simulation as only Verilog is supported on simulator=$(SIM)"
38
- debug: $(COCOTB_RESULTS_FILE)
39
- clean::
40
-
41
- else
42
-
43
- CMD_BIN := iverilog
44
-
45
- ifdef ICARUS_BIN_DIR
46
- CMD := $(shell :; command -v $(ICARUS_BIN_DIR)/$(CMD_BIN) 2>/dev/null)
47
- else
48
- # auto-detect bin dir from system path
49
- CMD := $(shell :; command -v $(CMD_BIN) 2>/dev/null)
50
- endif
51
-
52
- ifeq (, $(CMD))
53
- $(error Unable to locate command >$(CMD_BIN)<)
54
- else
55
- ICARUS_BIN_DIR := $(shell dirname $(CMD))
56
- export ICARUS_BIN_DIR
57
- endif
58
-
59
- ifdef TOPLEVEL
60
- TOPMODULE_ARG := -s $(TOPLEVEL)
61
- else
62
- TOPMODULE_ARG :=
63
- endif
64
-
65
- COMPILE_ARGS += -f $(SIM_BUILD)/cmds.f
66
-
67
- ifdef VERILOG_INCLUDE_DIRS
68
- COMPILE_ARGS += $(addprefix -I, $(VERILOG_INCLUDE_DIRS))
69
- endif
70
-
71
- # Compilation phase
72
-
73
- ifeq ($(WAVES), 1)
74
- VERILOG_SOURCES += $(SIM_BUILD)/cocotb_iverilog_dump.v
75
- COMPILE_ARGS += -s cocotb_iverilog_dump
76
- PLUSARGS += -fst
77
- endif
78
-
79
- $(SIM_BUILD)/sim.vvp: $(VERILOG_SOURCES) $(CUSTOM_COMPILE_DEPS) | $(SIM_BUILD)
80
- @echo "+timescale+$(COCOTB_HDL_TIMEUNIT)/$(COCOTB_HDL_TIMEPRECISION)" > $(SIM_BUILD)/cmds.f
81
- $(CMD) -o $(SIM_BUILD)/sim.vvp -D COCOTB_SIM=1 $(TOPMODULE_ARG) -g2012 $(COMPILE_ARGS) $(EXTRA_ARGS) $(VERILOG_SOURCES)
82
-
83
- $(SIM_BUILD)/cocotb_iverilog_dump.v: | $(SIM_BUILD)
84
- @echo 'module cocotb_iverilog_dump();' > $@
85
- @echo 'initial begin' >> $@
86
- @echo ' $$dumpfile("$(SIM_BUILD)/$(TOPLEVEL).fst");' >> $@
87
- @echo ' $$dumpvars(0, $(TOPLEVEL));' >> $@
88
- @echo 'end' >> $@
89
- @echo 'endmodule' >> $@
90
-
91
- # Execution phase
92
-
93
- $(COCOTB_RESULTS_FILE): $(SIM_BUILD)/sim.vvp $(CUSTOM_SIM_DEPS)
94
- $(RM) $(COCOTB_RESULTS_FILE)
95
-
96
- MODULE=$(MODULE) TESTCASE=$(TESTCASE) TOPLEVEL=$(TOPLEVEL) TOPLEVEL_LANG=$(TOPLEVEL_LANG) \
97
- $(SIM_CMD_PREFIX) $(ICARUS_BIN_DIR)/vvp -M $(shell cocotb-config --lib-dir) -m $(shell cocotb-config --lib-name vpi icarus) $(SIM_ARGS) $(EXTRA_ARGS) $(SIM_BUILD)/sim.vvp $(PLUSARGS) $(SIM_CMD_SUFFIX)
98
-
99
- $(call check_for_results_file)
100
-
101
- debug: $(SIM_BUILD)/sim.vvp $(CUSTOM_SIM_DEPS)
102
- $(RM) -r $(COCOTB_RESULTS_FILE)
103
-
104
- MODULE=$(MODULE) TESTCASE=$(TESTCASE) TOPLEVEL=$(TOPLEVEL) TOPLEVEL_LANG=$(TOPLEVEL_LANG) \
105
- $(SIM_CMD_PREFIX) gdb --args $(ICARUS_BIN_DIR)/vvp $(shell cocotb-config --lib-dir) -m $(shell cocotb-config --lib-name vpi icarus) $(SIM_BUILD)/sim.vvp $(SIM_ARGS) $(EXTRA_ARGS) $(PLUSARGS) $(SIM_CMD_SUFFIX)
106
-
107
- $(call check_for_results_file)
108
-
109
- clean::
110
- $(RM) -r $(SIM_BUILD)
111
- endif
@@ -1,125 +0,0 @@
1
- ###############################################################################
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
- # * Redistributions of source code must retain the above copyright
9
- # notice, this list of conditions and the following disclaimer.
10
- # * Redistributions in binary form must reproduce the above copyright
11
- # notice, this list of conditions and the following disclaimer in the
12
- # documentation and/or other materials provided with the distribution.
13
- # * Neither the name of Potential Ventures Ltd,
14
- # SolarFlare Communications Inc nor the
15
- # names of its contributors may be used to endorse or promote products
16
- # derived from this software without specific prior written permission.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- # DISCLAIMED. IN NO EVENT SHALL POTENTIAL VENTURES LTD BE LIABLE FOR ANY
22
- # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
- # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
- # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
- # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
- # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
- # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
- ###############################################################################
29
-
30
- # Common Makefile for Cadence Incisive
31
-
32
- include $(shell cocotb-config --makefiles)/Makefile.inc
33
-
34
- CMD_BIN := irun
35
-
36
- ifdef IUS_BIN_DIR
37
- CMD := $(shell :; command -v $(IUS_BIN_DIR)/$(CMD_BIN) 2>/dev/null)
38
- else
39
- # auto-detect bin dir from system path
40
- CMD := $(shell :; command -v $(CMD_BIN) 2>/dev/null)
41
- endif
42
-
43
- ifeq (, $(CMD))
44
- $(error Unable to locate command >$(CMD_BIN)<)
45
- else
46
- IUS_BIN_DIR := $(shell dirname $(CMD))
47
- export IUS_BIN_DIR
48
- endif
49
-
50
- ifdef VERILOG_INCLUDE_DIRS
51
- COMPILE_ARGS += $(addprefix +incdir+, $(VERILOG_INCLUDE_DIRS))
52
- endif
53
-
54
- EXTRA_ARGS += $(COMPILE_ARGS)
55
- EXTRA_ARGS += $(SIM_ARGS)
56
- EXTRA_ARGS += -licqueue
57
-
58
- ifeq ($(PYTHON_ARCH),64bit)
59
- EXTRA_ARGS += -64
60
- endif
61
-
62
- EXTRA_ARGS += -nclibdirpath $(SIM_BUILD)
63
- EXTRA_ARGS += -plinowarn
64
-
65
- ifeq ($(GUI),1)
66
- EXTRA_ARGS += -gui
67
- else
68
- EXTRA_ARGS +=
69
- endif
70
-
71
- # IUS errors out if multiple timescales are specified on the command line.
72
- ifneq (,$(findstring timescale,$(EXTRA_ARGS)))
73
- $(error Please use COCOTB_HDL_TIMEUNIT and COCOTB_HDL_TIMEPRECISION to specify timescale.)
74
- endif
75
-
76
- # Loading the VHPI library causes an error, so we always load the VPI library and supply
77
- # GPI_EXTRA=$(shell cocotb-config --lib-name-path vhpi ius) if needed.
78
-
79
- # Xcelium will use default vlog_startup_routines symbol only if vpi library name is libvpi.so
80
- GPI_ARGS = -loadvpi $(shell cocotb-config --lib-name-path vpi ius):vlog_startup_routines_bootstrap
81
-
82
- ifeq ($(TOPLEVEL_LANG),verilog)
83
- EXTRA_ARGS += -v93
84
- HDL_SOURCES = $(VERILOG_SOURCES)
85
- ROOT_LEVEL = $(TOPLEVEL)
86
- ifneq ($(VHDL_SOURCES),)
87
- HDL_SOURCES += $(VHDL_SOURCES)
88
- GPI_EXTRA = $(shell cocotb-config --lib-name-path vhpi ius):cocotbvhpi_entry_point
89
- endif
90
- else ifeq ($(TOPLEVEL_LANG),vhdl)
91
- GPI_EXTRA = $(shell cocotb-config --lib-name-path vhpi ius):cocotbvhpi_entry_point
92
- EXTRA_ARGS += -v93
93
- EXTRA_ARGS += -top $(TOPLEVEL)
94
- RTL_LIBRARY ?= $(TOPLEVEL)
95
- MAKE_LIB = -makelib $(RTL_LIBRARY)
96
- HDL_SOURCES = $(VHDL_SOURCES)
97
- ifneq ($(VERILOG_SOURCES),)
98
- HDL_SOURCES += $(VERILOG_SOURCES)
99
- endif
100
- else
101
- $(error A valid value (verilog or vhdl) was not provided for TOPLEVEL_LANG=$(TOPLEVEL_LANG))
102
- endif
103
-
104
- # Builds a list of arguments to support VHDL libraries specified in VHDL_SOURCES_*:
105
- LIBS := $(foreach LIB, $(VHDL_LIB_ORDER),-makelib $(LIB) $(VHDL_SOURCES_$(LIB)) -endlib)
106
-
107
- $(COCOTB_RESULTS_FILE): $(HDL_SOURCES) $(CUSTOM_COMPILE_DEPS) $(CUSTOM_SIM_DEPS) | $(SIM_BUILD)
108
- $(RM) $(COCOTB_RESULTS_FILE)
109
-
110
- # Make sure all libs in SOURCES_VHDL_* are mentioned in VHDL_LIB_ORDER and vice versa
111
- $(foreach LIB, $(VHDL_LIB_ORDER), $(check_vhdl_sources))
112
- $(foreach SOURCES_VAR, $(filter VHDL_SOURCES_%, $(.VARIABLES)), $(check_lib_order))
113
-
114
- set -o pipefail; \
115
- MODULE=$(MODULE) TESTCASE=$(TESTCASE) TOPLEVEL=$(TOPLEVEL) GPI_EXTRA=$(GPI_EXTRA) TOPLEVEL_LANG=$(TOPLEVEL_LANG) \
116
- $(SIM_CMD_PREFIX) $(CMD) -timescale $(COCOTB_HDL_TIMEUNIT)/$(COCOTB_HDL_TIMEPRECISION) \
117
- $(EXTRA_ARGS) $(GPI_ARGS) +access+rwc $(LIBS) $(MAKE_LIB) $(HDL_SOURCES) $(PLUSARGS) $(SIM_CMD_SUFFIX)
118
-
119
- $(call check_for_results_file)
120
-
121
- clean::
122
- $(RM) -r $(SIM_BUILD)
123
- $(RM) -r irun.*
124
- $(RM) -r ncsim.*
125
- $(RM) -r gdb_cmd_ncsim
@@ -1,32 +0,0 @@
1
- ###############################################################################
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
- # * Redistributions of source code must retain the above copyright
9
- # notice, this list of conditions and the following disclaimer.
10
- # * Redistributions in binary form must reproduce the above copyright
11
- # notice, this list of conditions and the following disclaimer in the
12
- # documentation and/or other materials provided with the distribution.
13
- # * Neither the name of Potential Ventures Ltd,
14
- # SolarFlare Communications Inc nor the
15
- # names of its contributors may be used to endorse or promote products
16
- # derived from this software without specific prior written permission.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- # DISCLAIMED. IN NO EVENT SHALL POTENTIAL VENTURES LTD BE LIABLE FOR ANY
22
- # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
- # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
- # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
- # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
- # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
- # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
- ###############################################################################
29
-
30
-
31
- # Identical to Questa
32
- include $(shell cocotb-config --makefiles)/simulators/Makefile.questa
@@ -1,64 +0,0 @@
1
- # Copyright cocotb contributors
2
- # Licensed under the Revised BSD License, see LICENSE for details.
3
- # SPDX-License-Identifier: BSD-3-Clause
4
-
5
- include $(shell cocotb-config --makefiles)/Makefile.inc
6
-
7
- ifneq ($(VERILOG_SOURCES),)
8
-
9
- $(COCOTB_RESULTS_FILE):
10
- @echo "Skipping simulation as Verilog is not supported on simulator=$(SIM)"
11
- clean::
12
-
13
- else
14
-
15
- CMD_BIN := nvc
16
-
17
- ifdef NVC_BIN_DIR
18
- CMD := $(shell :; command -v $(NVC_BIN_DIR)/$(CMD_BIN) 2>/dev/null)
19
- else
20
- # auto-detect bin dir from system path
21
- CMD := $(shell :; command -v $(CMD_BIN) 2>/dev/null)
22
- endif
23
-
24
- ifeq (, $(CMD))
25
- $(error "Unable to locate command >$(CMD_BIN)<")
26
- else
27
- NVC_BIN_DIR := $(shell dirname $(CMD))
28
- export NVC_BIN_DIR
29
- endif
30
-
31
- RTL_LIBRARY ?= work
32
-
33
- .PHONY: analyse
34
-
35
- # Split SIM_ARGS into those options that need to be passed to -e and
36
- # those that need to be passed to -r
37
- NVC_E_FILTER := -g% --cover --cover=%
38
-
39
- NVC_E_ARGS := $(filter $(NVC_E_FILTER),$(SIM_ARGS))
40
- NVC_R_ARGS := $(filter-out $(NVC_E_FILTER),$(SIM_ARGS))
41
-
42
- # Compilation phase
43
- analyse: $(VHDL_SOURCES) $(SIM_BUILD) $(CUSTOM_COMPILE_DEPS)
44
- # Make sure all libs in SOURCES_VHDL_* are mentioned in VHDL_LIB_ORDER and vice versa
45
- $(foreach LIB, $(VHDL_LIB_ORDER), $(check_vhdl_sources))
46
- $(foreach SOURCES_VAR, $(filter VHDL_SOURCES_%, $(.VARIABLES)), $(check_lib_order))
47
-
48
- $(foreach LIB_VAR,$(VHDL_LIB_ORDER), \
49
- $(CMD) $(EXTRA_ARGS) --work=$(LIB_VAR):$(SIM_BUILD)/$(LIB_VAR) -L $(SIM_BUILD) -a $(VHDL_SOURCES_$(LIB_VAR)) $(COMPILE_ARGS) && ) \
50
- $(CMD) $(EXTRA_ARGS) --work=$(RTL_LIBRARY):$(SIM_BUILD)/$(RTL_LIBRARY) -L $(SIM_BUILD) -a $(VHDL_SOURCES) $(COMPILE_ARGS)
51
-
52
- $(COCOTB_RESULTS_FILE): analyse $(CUSTOM_SIM_DEPS)
53
- $(RM) $(COCOTB_RESULTS_FILE)
54
-
55
- TESTCASE=$(TESTCASE) MODULE=$(MODULE) TOPLEVEL=$(TOPLEVEL) TOPLEVEL_LANG=$(TOPLEVEL_LANG) \
56
- $(SIM_CMD_PREFIX) $(CMD) $(EXTRA_ARGS) --work=$(RTL_LIBRARY):$(SIM_BUILD)/$(RTL_LIBRARY) -L $(SIM_BUILD) \
57
- -e $(TOPLEVEL) --no-save $(NVC_E_ARGS) \
58
- -r --load $(shell cocotb-config --lib-name-path vhpi nvc) $(TRACE) $(NVC_R_ARGS) $(PLUSARGS) $(SIM_CMD_SUFFIX)
59
-
60
- $(call check_for_results_file)
61
-
62
- clean::
63
- $(RM) -r $(SIM_BUILD)
64
- endif
@@ -1,98 +0,0 @@
1
- ###############################################################################
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
- # * Redistributions of source code must retain the above copyright
9
- # notice, this list of conditions and the following disclaimer.
10
- # * Redistributions in binary form must reproduce the above copyright
11
- # notice, this list of conditions and the following disclaimer in the
12
- # documentation and/or other materials provided with the distribution.
13
- # * Neither the name of Potential Ventures Ltd,
14
- # SolarFlare Communications Inc nor the
15
- # names of its contributors may be used to endorse or promote products
16
- # derived from this software without specific prior written permission.
17
- #
18
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
- # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- # DISCLAIMED. IN NO EVENT SHALL POTENTIAL VENTURES LTD BE LIABLE FOR ANY
22
- # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
- # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
- # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
- # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
- # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
- # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
- ###############################################################################
29
-
30
- include $(shell cocotb-config --makefiles)/Makefile.inc
31
-
32
- ifneq ($(VHDL_SOURCES),)
33
-
34
- $(COCOTB_RESULTS_FILE):
35
- @echo "Skipping simulation as VHDL is not supported on simulator=$(SIM)"
36
- clean::
37
-
38
- else
39
-
40
- CMD_BIN := vcs
41
-
42
- ifdef VCS_BIN_DIR
43
- CMD := $(shell :; command -v $(VCS_BIN_DIR)/$(CMD_BIN) 2>/dev/null)
44
- else
45
- # auto-detect bin dir from system path
46
- CMD := $(shell :; command -v $(CMD_BIN) 2>/dev/null)
47
- endif
48
-
49
- ifeq (, $(CMD))
50
- $(error Unable to locate command >$(CMD_BIN)<)
51
- else
52
- VCS_BIN_DIR := $(shell dirname $(CMD))
53
- export VCS_BIN_DIR
54
- endif
55
-
56
- ifdef VERILOG_INCLUDE_DIRS
57
- COMPILE_ARGS += $(addprefix +incdir+, $(VERILOG_INCLUDE_DIRS))
58
- endif
59
-
60
- ifeq ($(PYTHON_ARCH),64bit)
61
- EXTRA_ARGS += -full64
62
- endif
63
-
64
- ifeq ($(GUI),1)
65
- EXTRA_ARGS += -gui
66
- endif
67
-
68
- # TODO:
69
- # investigate +vpi+1 option which reduces memory requirements
70
-
71
- # Can't do this using an argument, we have to create a PLI table file
72
- # enabling write access to the design
73
- $(SIM_BUILD)/pli.tab : | $(SIM_BUILD)
74
- echo "acc+=rw,wn:*" > $@
75
-
76
- # Compilation phase
77
- $(SIM_BUILD)/simv: $(VERILOG_SOURCES) $(SIM_BUILD)/pli.tab $(CUSTOM_COMPILE_DEPS) | $(SIM_BUILD)
78
- cd $(SIM_BUILD) && \
79
- TOPLEVEL=$(TOPLEVEL) \
80
- $(CMD) -top $(TOPLEVEL) $(PLUSARGS) -debug_access+r+w-memcbk -debug_region+cell +vpi -P pli.tab +define+COCOTB_SIM=1 -sverilog \
81
- -timescale=$(COCOTB_HDL_TIMEUNIT)/$(COCOTB_HDL_TIMEPRECISION) \
82
- $(EXTRA_ARGS) -debug -load $(shell cocotb-config --lib-name-path vpi vcs) $(COMPILE_ARGS) $(VERILOG_SOURCES)
83
-
84
- # Execution phase
85
- $(COCOTB_RESULTS_FILE): $(SIM_BUILD)/simv $(CUSTOM_SIM_DEPS)
86
- $(RM) $(COCOTB_RESULTS_FILE)
87
-
88
- MODULE=$(MODULE) TESTCASE=$(TESTCASE) TOPLEVEL=$(TOPLEVEL) TOPLEVEL_LANG=$(TOPLEVEL_LANG) \
89
- $(SIM_CMD_PREFIX) $(SIM_BUILD)/simv +define+COCOTB_SIM=1 $(SIM_ARGS) $(EXTRA_ARGS) $(PLUSARGS) $(SIM_CMD_SUFFIX)
90
-
91
- $(call check_for_results_file)
92
-
93
- clean::
94
- $(RM) -r $(SIM_BUILD)
95
- $(RM) -r simv.daidir
96
- $(RM) -r cm.log
97
- $(RM) -r ucli.key
98
- endif