Closed AIAFammy closed 4 years ago
@AIAFammy that looks pretty strange indeed... A few possible actions that may help to find the issue:
@mciepluc Thanks for your answer.
I install Icarus verilog by sudo apt-get install verilog
, and the version is 0.9.7
First, I install the official cocotb version 1.3.1, and I modified the clock period from 100 to 1000 and 10000. But the output still not correct. To make sure the clock period is modified correctly, the line I modified is: https://github.com/mciepluc/cocotb-coverage/blob/master/examples/fifo/tests/test_fifo.py#L93
And then I install Icarus Verilog version 10.3 by clone the source. But the FIFO example gets the following output:
make results.xml
make[1]: Entering directory `/home/user/cocotb-coverage-master/examples/fifo/tests'
PYTHONPATH=/home/user/cocotb-coverage-master/examples/fifo/tests/build/libs/x86_64:/home/user/cocotb-coverage-master/examples/fifo/tests:/home/user/.conda/envs/py36/lib/python3.6/site-packages: LD_LIBRARY_PATH=/home/user/cocotb-coverage-master/examples/fifo/tests/build/libs/x86_64::/home/user/.conda/envs/py36/lib:/home/user/.conda/envs/py36/lib:/home/user/.conda/envs/py36/lib:/home/user/.conda/envs/py36/lib MODULE=test_fifo \
TESTCASE= TOPLEVEL=fifo_mem TOPLEVEL_LANG=verilog COCOTB_SIM=1 \
/usr/local/bin/vvp -M /home/user/cocotb-coverage-master/examples/fifo/tests/build/libs/x86_64 -m gpivpi sim_build/sim.vvp
-.--ns INFO cocotb.gpi gpi_embed.c:78 in set_program_name_in_venv Did not detect Python virtual environment. Using system-wide Python interpreter
-.--ns INFO cocotb.gpi GpiCommon.cpp:104 in gpi_print_registered_impl VPI registered
Error: VVP input file 9.7 can not be run with run time version 10.3 (stable)
make[1]: *** [results.xml] Error 1
make[1]: Leaving directory `/home/user/cocotb-coverage-master/examples/fifo/tests'
make: *** [sim] Error 2
Error: VVP input file 9.7 can not be run with run time version 10.3 (stable) I can't find any information about this error, it seems like something cannot support Icarus 10.3.
Thanks.
@AIAFammy you have probably not cleaned your directory that still contains a build done by iverilog 0.9.7
@mciepluc Thanks for your instant response.
I sudo removed the 0.9.7 iverilog, and still got the same error. Then I found that the problem is cocotb-coverage/examples/fifo/tests/sim_build
.
After removed the old build and make, it seems to be work very well!
make results.xml
make[1]: Entering directory `/home/user/cocotb-coverage-master/examples/fifo/tests'
mkdir -p sim_build
/usr/local/bin/iverilog -o sim_build/sim.vvp -D COCOTB_SIM=1 -s fifo_mem -g2012 /home/user/cocotb-coverage-master/examples/fifo/tests/../hdl/fifo.v
/home/user/cocotb-coverage-master/examples/fifo/tests/../hdl/fifo.v:46: warning: extra digits given for sized binary constant.
/home/user/cocotb-coverage-master/examples/fifo/tests/../hdl/fifo.v:48: warning: extra digits given for sized binary constant.
/home/user/cocotb-coverage-master/examples/fifo/tests/../hdl/fifo.v:107: warning: extra digits given for sized binary constant.
/home/user/cocotb-coverage-master/examples/fifo/tests/../hdl/fifo.v:109: warning: extra digits given for sized binary constant.
PYTHONPATH=/home/user/cocotb-coverage-master/examples/fifo/tests/build/libs/x86_64:/home/user/cocotb-coverage-master/examples/fifo/tests:/home/user/.conda/envs/py36/lib/python3.6/site-packages: LD_LIBRARY_PATH=/home/user/cocotb-coverage-master/examples/fifo/tests/build/libs/x86_64::/home/user/.conda/envs/py36/lib:/home/user/.conda/envs/py36/lib:/home/user/.conda/envs/py36/lib:/home/user/.conda/envs/py36/lib MODULE=test_fifo \
TESTCASE= TOPLEVEL=fifo_mem TOPLEVEL_LANG=verilog COCOTB_SIM=1 \
/usr/local/bin/vvp -M /home/user/cocotb-coverage-master/examples/fifo/tests/build/libs/x86_64 -m gpivpi sim_build/sim.vvp
-.--ns INFO cocotb.gpi gpi_embed.c:78 in set_program_name_in_venv Did not detect Python virtual environment. Using system-wide Python interpreter
-.--ns INFO cocotb.gpi GpiCommon.cpp:104 in gpi_print_registered_impl VPI registered
0.00ns INFO cocotb.gpi gpi_embed.c:340 in embed_sim_init Running on Icarus Verilog version 10.3 (stable)
0.00ns INFO cocotb.gpi gpi_embed.c:341 in embed_sim_init Python interpreter initialized and cocotb loaded!
0.00ns INFO cocotb __init__.py:138 in _initialise_testbench Running tests with cocotb v1.3.1 from /home/user/.conda/envs/py36/lib/python3.6/site-packages
0.00ns INFO cocotb __init__.py:155 in _initialise_testbench Seeding Python random module with 1590153908
0.00ns INFO cocotb.regression regression.py:190 in initialise Found test test_fifo.fifo_test
0.00ns INFO cocotb.regression regression.py:348 in execute Running test 1/1: fifo_test
0.00ns INFO ..otb.test.fifo_test.0x2b7829f061d0 decorators.py:253 in _advance Starting test: "fifo_test"
Description: FIFO Test
2150000000000.00ns INFO cocotb.test test_fifo.py:153 in fifo_test Data written to fifo: C3
2350000000000.00ns INFO cocotb.test test_fifo.py:146 in fifo_test Data read from fifo: C3
2550000000000.00ns INFO cocotb.test test_fifo.py:148 in fifo_test Data NOT read, fifo EMPTY!
2750000000000.00ns INFO cocotb.test test_fifo.py:153 in fifo_test Data written to fifo: D7
2950000000000.00ns INFO cocotb.test test_fifo.py:146 in fifo_test Data read from fifo: D7
3150000000000.00ns INFO cocotb.test test_fifo.py:148 in fifo_test Data NOT read, fifo EMPTY!
3350000000000.00ns INFO cocotb.test test_fifo.py:148 in fifo_test Data NOT read, fifo EMPTY!
3550000000000.00ns INFO cocotb.test test_fifo.py:153 in fifo_test Data written to fifo: 46
3750000000000.00ns INFO cocotb.test test_fifo.py:146 in fifo_test Data read from fifo: 46
3950000000000.00ns INFO cocotb.test test_fifo.py:148 in fifo_test Data NOT read, fifo EMPTY!
3950000000000.00ns INFO cocotb.test coverage.py:95 in report_coverage top : <cocotb_coverage.coverage.CoverItem object at 0x2b782a0fa2e8>, coverage=22, size=32
3950000000000.00ns INFO cocotb.test coverage.py:95 in report_coverage top.fifo_empty : <cocotb_coverage.coverage.CoverPoint object at 0x2b782a0fa320>, coverage=2, size=2
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN True : 7
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN False : 3
3950000000000.00ns INFO cocotb.test coverage.py:95 in report_coverage top.fifo_full : <cocotb_coverage.coverage.CoverPoint object at 0x2b782a0fa438>, coverage=1, size=2
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN True : 0
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN False : 10
3950000000000.00ns INFO cocotb.test coverage.py:95 in report_coverage top.fifo_overflow : <cocotb_coverage.coverage.CoverPoint object at 0x2b782a0fa6a0>, coverage=1, size=2
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN True : 0
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN False : 10
3950000000000.00ns INFO cocotb.test coverage.py:95 in report_coverage top.fifo_threshold : <cocotb_coverage.coverage.CoverPoint object at 0x2b782a0fa630>, coverage=1, size=2
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN True : 0
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN False : 10
3950000000000.00ns INFO cocotb.test coverage.py:95 in report_coverage top.fifo_underflow : <cocotb_coverage.coverage.CoverPoint object at 0x2b782a0fa7b8>, coverage=2, size=2
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN True : 3
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN False : 7
3950000000000.00ns INFO cocotb.test coverage.py:95 in report_coverage top.rw : <cocotb_coverage.coverage.CoverPoint object at 0x2b782a0e23c8>, coverage=2, size=2
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN True : 7
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN False : 3
3950000000000.00ns INFO cocotb.test coverage.py:95 in report_coverage top.rwXempty : <cocotb_coverage.coverage.CoverCross object at 0x2b782a0fa710>, coverage=3, size=4
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (True, True) : 4
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (True, False) : 3
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (False, True) : 3
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (False, False) : 0
3950000000000.00ns INFO cocotb.test coverage.py:95 in report_coverage top.rwXfull : <cocotb_coverage.coverage.CoverCross object at 0x2b782a0fa828>, coverage=2, size=4
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (True, True) : 0
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (True, False) : 7
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (False, True) : 0
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (False, False) : 3
3950000000000.00ns INFO cocotb.test coverage.py:95 in report_coverage top.rwXoverflow : <cocotb_coverage.coverage.CoverCross object at 0x2b782a0fa978>, coverage=2, size=4
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (True, True) : 0
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (True, False) : 7
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (False, True) : 0
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (False, False) : 3
3950000000000.00ns INFO cocotb.test coverage.py:95 in report_coverage top.rwXthreshold : <cocotb_coverage.coverage.CoverCross object at 0x2b782a0fa860>, coverage=2, size=4
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (True, True) : 0
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (True, False) : 7
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (False, True) : 0
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (False, False) : 3
3950000000000.00ns INFO cocotb.test coverage.py:95 in report_coverage top.rwXunderflow : <cocotb_coverage.coverage.CoverCross object at 0x2b782a0fa198>, coverage=4, size=4
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (True, True) : 1
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (True, False) : 6
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (False, True) : 2
3950000000000.00ns INFO cocotb.test coverage.py:100 in report_coverage BIN (False, False) : 1
3951000000000.00ns INFO cocotb.regression regression.py:288 in handle_result Test Passed: fifo_test
3951000000000.00ns INFO cocotb.regression regression.py:213 in tear_down Passed 1 tests (0 skipped)
3951000000000.00ns INFO cocotb.regression regression.py:400 in _log_test_summary *****************************************************************************
** TEST PASS/FAIL SIM TIME(NS) REAL TIME(S) RATIO(NS/S) **
*****************************************************************************
** test_fifo.fifo_test PASS 3951000000000.00 0.08 50981046662728.88 **
*****************************************************************************
3951000000000.00ns INFO cocotb.regression regression.py:417 in _log_sim_summary *************************************************************************************
** ERRORS : 0 **
*************************************************************************************
** SIM TIME : 3951000000000.00 NS **
** REAL TIME : 0.10 S **
** SIM / REAL TIME : 39942767661478.09 NS/S **
*************************************************************************************
3951000000000.00ns INFO cocotb.regression regression.py:222 in tear_down Shutting down...
Thanks for your help!
Hi, I have installed cocotb, cocotb-coverage, iverilog, and icarus successfully, and also the fifo example can run without error by "make SIM=icarus". But the result seems to be something wrong.
The output below run by 10 random operations. I expect that "read" after "write" should read the data in fifo successfully, but it always shows "Data NOT read, fifo EMPTY!".
The output below run by 10 "read" operations. I expect that fifo_underflow bin should be True, but instead always False.
Package versions as below: cocotb 1.4.0.dev0 cocotb-coverage 1.0.0
Many thanks for your help!