wallento / cocotbext-wishbone Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
I'm trying to use cocomod-wishbone in my test project. My DUT has a wishbone slave interface with following signals name :
input [1:0] io_wbs_adr_i,
input [11:0] io_wbs_dat_i,
output [11:0] io_wbs_dat_o,
input io_wbs_we_i,
input io_wbs_stb_i,
output io_wbs_ack_o,
input io_wbs_cyc_i
Then I just want to simulate simple read/write from a master-intercon. But unfortunately names are not recognized by default name convention. And if I try to instanciate it like following :
self.wbs = WishboneMaster(self._dut, "io_wbs", self.clock, width=16)
I get error from python module :
AttributeError: MyModule contains no object named io_wbs_cyc
Hello, I'm testing the extension and I'm having problems when I call WishboneMaster, the error occurs in the init method of the Wishbone class and it is:
self.bus.cyc.setimmediatevalue(0)
AttributeError: 'NoneType' object has no attribute 'setimmediatevalue'
I'm testing a simple gpo with wishbone, and using the same default names of the extension, so I don't have to use the signals_dict.
Any clue?
Thanks in advance
There is a deprecation warning using cocotb 1.5.2.
If you use cocotb 1.6.0-rc1, this crate no longer works, complaining it can't find cocotb.drivers.BusDriver
.
[Same message on cocotb issue]
cocotbext-wishbone module is not enough known as we've seen in this issue message.
It could be great to include this project/module in «cocotb github organization» no ?
As explain in the cocotb documentation.
This package is not on pip, but the README says so - just upload it? :)
The read functional fails to get the last value returned in a sequence of reads. If you request a single address, no data will be returned, if you request n addresses, n-1 values will be returned. Simply replacing start_soon with fork fixes this issues, however, I know fork is deprecated.
This could potentially be fixed by changing cocotb.start_soon(self._read()) to await cocotb.start(self._read()). I wish I knew the difference I guess I should read up on that.
The version of this package on pip (0.2) seems to be too old to work with cocotb >= 1.6. The needed fix is already done in the git repo (#18), but not pushed to the package index, I assume.
...
/usr/local/lib/python3.9/dist-packages/attrdict/mapping.py:4: DeprecationWarning: Using or importing the ABCs from 'coll
ections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
from collections import Mapping
/usr/local/lib/python3.9/dist-packages/attrdict/mixins.py:5: DeprecationWarning: Using or importing the ABCs from 'colle
ctions' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
from collections import Mapping, MutableMapping, Sequence
0.00ns CRITICAL Failed to import module tb_wishbone: No module named 'cocotb.drivers'
0.00ns INFO MODULE variable was "tb_wishbone"
0.00ns INFO Traceback:
0.00ns INFO Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/cocotb/regression.py", line 175, in _discover_tests
module = _my_import(module_name)
File "/usr/local/lib/python3.9/dist-packages/cocotb/regression.py", line 69, in _my_import
mod = __import__(name)
File "/build/tests/tb_wishbone.py", line 11, in <module>
from cocotbext.wishbone.monitor import WishboneSlave
File "/usr/local/lib/python3.9/dist-packages/cocotbext/wishbone/__init__.py", line 1, in <module>
from .driver import *
File "/usr/local/lib/python3.9/dist-packages/cocotbext/wishbone/driver.py", line 6, in <module>
from cocotb.drivers import BusDriver
ModuleNotFoundError: No module named 'cocotb.drivers'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/cocotb/__init__.py", line 242, in _initialise_testbench
_initialise_testbench_(argv_)
File "/usr/local/lib/python3.9/dist-packages/cocotb/__init__.py", line 345, in _initialise_testbench_
regression_manager = RegressionManager.from_discovery(top)
File "/usr/local/lib/python3.9/dist-packages/cocotb/regression.py", line 150, in from_discovery
return cls(dut, tests)
File "/usr/local/lib/python3.9/dist-packages/cocotb/regression.py", line 129, in __init__
for test in tests:
File "/usr/local/lib/python3.9/dist-packages/cocotb/regression.py", line 175, in _discover_tests
module = _my_import(module_name)
File "/usr/local/lib/python3.9/dist-packages/cocotb/regression.py", line 69, in _my_import
mod = __import__(name)
File "/build/tests/tb_wishbone.py", line 11, in <module>
from cocotbext.wishbone.monitor import WishboneSlave
File "/usr/local/lib/python3.9/dist-packages/cocotbext/wishbone/__init__.py", line 1, in <module>
from .driver import *
File "/usr/local/lib/python3.9/dist-packages/cocotbext/wishbone/driver.py", line 6, in <module>
from cocotb.drivers import BusDriver
ModuleNotFoundError: No module named 'cocotb.drivers'
0.00ns ERROR Failing test at simulator request before test run completion: Simulator shutdown prematurely
Hi, I updated to the latest version (my bus does not have cti and bte signals), and the library now break at line 257 of the driver.py file, where they are used and there is no check if they exists.
Also there is no tag of the previous version, so its not an easy way to use the old version.
According to this cocotb discussion.
Hi,
:tools>python3 -m pip install cocotbext-wishbone
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement cocotbext-wishbone (from versions: none)
ERROR: No matching distribution found for cocotbext-wishbone
any idea how to resolve this error message?
I also tried this
> tools>python3 -m pip install -e cocotbext-wishbone
> Defaulting to user installation because normal site-packages is not writeable
> Obtaining file:///tools/cocotbext-wishbone
> ERROR: Command errored out with exit status 1:
> command: /opt/rh/rh-python36/root/usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tools/cocotbext-wishbone/setup.py'"'"'; file='"'"'/tools/cocotbext-wishbone/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-g90qfibg
> cwd: /tools/cocotbext-wishbone/
> Complete output (7 lines):
> Traceback (most recent call last):
> File "", line 1, in
> File "/tools/cocotbext-wishbone/setup.py", line 4, in
> long_description = fh.read()
> File "/opt/rh/rh-python36/root/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
> return codecs.ascii_decode(input, self.errors)[0]
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1370: ordinal not in range(128)
> ----------------------------------------
> ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.