cocotb 1.9.2__cp313-cp313-win_amd64.whl → 2.0.0b1__cp313-cp313-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.
- cocotb/{ANSI.py → _ANSI.py} +5 -25
- cocotb/__init__.py +76 -332
- cocotb/_base_triggers.py +513 -0
- cocotb/_bridge.py +187 -0
- cocotb/_decorators.py +515 -0
- cocotb/_deprecation.py +3 -3
- cocotb/_exceptions.py +7 -0
- cocotb/_extended_awaitables.py +419 -0
- cocotb/_gpi_triggers.py +382 -0
- cocotb/_init.py +295 -0
- cocotb/_outcomes.py +54 -0
- cocotb/_profiling.py +46 -0
- cocotb/_py_compat.py +100 -29
- cocotb/_scheduler.py +454 -0
- cocotb/_test.py +245 -0
- cocotb/_test_factory.py +309 -0
- cocotb/_test_functions.py +42 -0
- cocotb/_typing.py +7 -0
- cocotb/_utils.py +296 -0
- cocotb/_version.py +3 -7
- cocotb/_xunit_reporter.py +66 -0
- cocotb/clock.py +271 -108
- cocotb/handle.py +1342 -795
- cocotb/libs/cocotb.dll +0 -0
- cocotb/libs/cocotb.exp +0 -0
- cocotb/libs/cocotb.lib +0 -0
- cocotb/libs/cocotbfli_modelsim.dll +0 -0
- cocotb/libs/cocotbfli_modelsim.exp +0 -0
- cocotb/libs/cocotbfli_modelsim.lib +0 -0
- cocotb/libs/cocotbutils.dll +0 -0
- cocotb/libs/cocotbutils.exp +0 -0
- cocotb/libs/cocotbutils.lib +0 -0
- cocotb/libs/cocotbvhpi_aldec.dll +0 -0
- cocotb/libs/cocotbvhpi_aldec.exp +0 -0
- cocotb/libs/cocotbvhpi_aldec.lib +0 -0
- cocotb/libs/cocotbvhpi_modelsim.dll +0 -0
- cocotb/libs/cocotbvhpi_modelsim.exp +0 -0
- cocotb/libs/cocotbvhpi_modelsim.lib +0 -0
- cocotb/libs/cocotbvpi_aldec.dll +0 -0
- cocotb/libs/cocotbvpi_aldec.exp +0 -0
- cocotb/libs/cocotbvpi_aldec.lib +0 -0
- cocotb/libs/cocotbvpi_ghdl.dll +0 -0
- cocotb/libs/cocotbvpi_ghdl.exp +0 -0
- cocotb/libs/cocotbvpi_ghdl.lib +0 -0
- cocotb/libs/cocotbvpi_icarus.exp +0 -0
- cocotb/libs/cocotbvpi_icarus.lib +0 -0
- cocotb/libs/cocotbvpi_icarus.vpl +0 -0
- cocotb/libs/cocotbvpi_modelsim.dll +0 -0
- cocotb/libs/cocotbvpi_modelsim.exp +0 -0
- cocotb/libs/cocotbvpi_modelsim.lib +0 -0
- cocotb/libs/embed.dll +0 -0
- cocotb/libs/embed.exp +0 -0
- cocotb/libs/embed.lib +0 -0
- cocotb/libs/gpi.dll +0 -0
- cocotb/libs/gpi.exp +0 -0
- cocotb/libs/gpi.lib +0 -0
- cocotb/libs/gpilog.dll +0 -0
- cocotb/libs/gpilog.exp +0 -0
- cocotb/libs/gpilog.lib +0 -0
- cocotb/libs/pygpilog.dll +0 -0
- cocotb/libs/pygpilog.exp +0 -0
- cocotb/libs/pygpilog.lib +0 -0
- cocotb/{log.py → logging.py} +105 -110
- cocotb/queue.py +103 -57
- cocotb/regression.py +667 -712
- cocotb/result.py +17 -188
- cocotb/share/def/aldec.exp +0 -0
- cocotb/share/def/aldec.lib +0 -0
- cocotb/share/def/ghdl.exp +0 -0
- cocotb/share/def/ghdl.lib +0 -0
- cocotb/share/def/icarus.exp +0 -0
- cocotb/share/def/icarus.lib +0 -0
- cocotb/share/def/modelsim.def +1 -0
- cocotb/share/def/modelsim.exp +0 -0
- cocotb/share/def/modelsim.lib +0 -0
- cocotb/share/include/cocotb_utils.h +6 -29
- cocotb/share/include/embed.h +5 -28
- cocotb/share/include/gpi.h +137 -92
- cocotb/share/include/gpi_logging.h +221 -142
- cocotb/share/include/py_gpi_logging.h +7 -4
- cocotb/share/include/vpi_user_ext.h +4 -26
- cocotb/share/lib/verilator/verilator.cpp +59 -54
- cocotb/simulator.cp313-win_amd64.exp +0 -0
- cocotb/simulator.cp313-win_amd64.lib +0 -0
- cocotb/simulator.cp313-win_amd64.pyd +0 -0
- cocotb/simulator.pyi +107 -0
- cocotb/task.py +434 -212
- cocotb/triggers.py +55 -1092
- cocotb/types/__init__.py +25 -47
- cocotb/types/_abstract_array.py +151 -0
- cocotb/types/_array.py +264 -0
- cocotb/types/_logic.py +296 -0
- cocotb/types/_logic_array.py +834 -0
- cocotb/types/{range.py → _range.py} +36 -44
- cocotb/types/_resolve.py +76 -0
- cocotb/utils.py +119 -587
- cocotb-2.0.0b1.dist-info/METADATA +60 -0
- cocotb-2.0.0b1.dist-info/RECORD +143 -0
- {cocotb-1.9.2.dist-info → cocotb-2.0.0b1.dist-info}/WHEEL +1 -1
- cocotb-2.0.0b1.dist-info/entry_points.txt +2 -0
- {cocotb-1.9.2.dist-info → cocotb-2.0.0b1.dist-info}/top_level.txt +1 -0
- cocotb_tools/__init__.py +0 -0
- cocotb_tools/_coverage.py +33 -0
- cocotb_tools/_vendor/__init__.py +3 -0
- cocotb_tools/check_results.py +65 -0
- cocotb_tools/combine_results.py +152 -0
- cocotb_tools/config.py +241 -0
- {cocotb → cocotb_tools}/ipython_support.py +29 -22
- cocotb_tools/makefiles/Makefile.deprecations +27 -0
- {cocotb/share → cocotb_tools}/makefiles/Makefile.inc +82 -54
- {cocotb/share → cocotb_tools}/makefiles/Makefile.sim +8 -33
- {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.activehdl +9 -16
- cocotb_tools/makefiles/simulators/Makefile.cvc +61 -0
- cocotb_tools/makefiles/simulators/Makefile.dsim +39 -0
- {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.ghdl +13 -42
- cocotb_tools/makefiles/simulators/Makefile.icarus +80 -0
- cocotb_tools/makefiles/simulators/Makefile.ius +93 -0
- cocotb_tools/makefiles/simulators/Makefile.modelsim +9 -0
- cocotb_tools/makefiles/simulators/Makefile.nvc +60 -0
- cocotb_tools/makefiles/simulators/Makefile.questa +29 -0
- cocotb/share/makefiles/simulators/Makefile.questa → cocotb_tools/makefiles/simulators/Makefile.questa-compat +26 -54
- cocotb_tools/makefiles/simulators/Makefile.questa-qisqrun +149 -0
- {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.riviera +17 -56
- cocotb_tools/makefiles/simulators/Makefile.vcs +65 -0
- {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.verilator +15 -22
- {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.xcelium +20 -52
- cocotb_tools/py.typed +0 -0
- {cocotb → cocotb_tools}/runner.py +794 -361
- cocotb/_sim_versions.py → cocotb_tools/sim_versions.py +16 -21
- pygpi/entry.py +34 -17
- pygpi/py.typed +0 -0
- cocotb/binary.py +0 -858
- cocotb/config.py +0 -289
- cocotb/decorators.py +0 -332
- cocotb/memdebug.py +0 -35
- cocotb/outcomes.py +0 -56
- cocotb/scheduler.py +0 -1099
- cocotb/share/makefiles/Makefile.deprecations +0 -12
- cocotb/share/makefiles/simulators/Makefile.cvc +0 -94
- cocotb/share/makefiles/simulators/Makefile.icarus +0 -111
- cocotb/share/makefiles/simulators/Makefile.ius +0 -125
- cocotb/share/makefiles/simulators/Makefile.modelsim +0 -32
- cocotb/share/makefiles/simulators/Makefile.nvc +0 -64
- cocotb/share/makefiles/simulators/Makefile.vcs +0 -98
- cocotb/types/array.py +0 -309
- cocotb/types/logic.py +0 -292
- cocotb/types/logic_array.py +0 -298
- cocotb/wavedrom.py +0 -199
- cocotb/xunit_reporter.py +0 -80
- cocotb-1.9.2.dist-info/METADATA +0 -168
- cocotb-1.9.2.dist-info/RECORD +0 -121
- cocotb-1.9.2.dist-info/entry_points.txt +0 -2
- /cocotb/{_vendor/__init__.py → py.typed} +0 -0
- {cocotb-1.9.2.dist-info → cocotb-2.0.0b1.dist-info/licenses}/LICENSE +0 -0
- {cocotb → cocotb_tools}/_vendor/distutils_version.py +0 -0
|
@@ -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
|