Comments (5)
I think your
AxiStreamBus.from_entity(self.dut.axi_s_if)
is wrong. Of what type is self.dut.axi_s_if? I use it as follow and it works great:self.source_bus = AxiStreamBus(dut, "S") self.source_driver = AxiStreamSource(self.source_bus, dut.Clk, dut.Rst)
The corresponding signals are then called S_Tvalid, S_Tdata.....
self.dut.axi_s_if is an Interface, you addressing a bus by a "classic" way like with "from_prefix()" method. This way does not suitable for me.
from cocotbext-axi.
I think your AxiStreamBus.from_entity(self.dut.axi_s_if)
is wrong. Of what type is self.dut.axi_s_if?
I use it as follow and it works great:
self.source_bus = AxiStreamBus(dut, "S")
self.source_driver = AxiStreamSource(self.source_bus, dut.Clk, dut.Rst)
The corresponding signals are then called S_Tvalid, S_Tdata.....
from cocotbext-axi.
Can you post the SV interfaces that you're using? At some point I want to collect a bunch of real-world interface definitions and toss them into the unit tests to make sure stuff is getting detected correctly. I also need to do make the name matching more flexible, I just haven't had time to work on any of this recently.
from cocotbext-axi.
Can you post the SV interfaces that you're using? At some point I want to collect a bunch of real-world interface definitions and toss them into the unit tests to make sure stuff is getting detected correctly. I also need to do make the name matching more flexible, I just haven't had time to work on any of this recently.
I cannot publish Interface file. But it contains all signals from AXI4-Stream spec, i.e.
TDATA,
TLAST,
TKEEP,
TUSER,
TVALID,
TREADY
I think I've found the problem: For its discovery you need to launch remote_pdb and see at Bus constructor "init" in cocotb_bus/bus.py file (official cocotb_bus lib). (I'll omit line's numbers because they shifted because of "breakpoints")
See in this loop "for attr_name, sig_name in _build_sig_attr_dict(optional_signals).items():" where "optional signals" must be founded.
Here are some Pdb logs:
(Pdb) p dir(entity)
['ACLK', 'ARESETn', 'TDATA', 'TID', 'TKEEP', 'TLAST', 'TREADY', 'TUSER', 'TVALID', '_HierarchyObject__get_sub_handle_by_name', 'class', 'delattr', 'dict', 'dir', 'doc', 'eq', 'format', 'ge', 'getattr', 'getattribute', 'gt', 'hash', 'init', 'init_subclass', 'iter', 'le', 'len', 'lt', 'module', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', 'weakref', '_child_path', '_compat_mapping', '_def_file', '_def_name', '_discover_all', '_discovered', '_fullname', '_handle', '_id', '_invalid_sub_handles', '_len', '_log', '_name', '_path', '_sub_handle_key', '_sub_handles', '_type', 'get_definition_file', 'get_definition_name']
(Pdb) p signame
'tvalid'
(Pdb) !hasattr(entity, signame)
False
(Pdb) !hasattr(entity,'tvalid')
False
(Pdb) !hasattr(entity,'TVALID')
True
Comparing to previous loop which finds "main" signals, this has hasattr() function which checks if "optional signal" is exist. And it's case-sensitive.
Now I am not sure if it is your's library bug.
I've opened issue in cocotb-bus repo: cocotb/cocotb-bus#45
from cocotbext-axi.
You can see in cocotb/cocotb-bus#45 that I've found temporary solution. But here we get the next problem (I think it is related not only to AXI4-Stream but for any bus):
In AxiStreamBase's constructor (axis.py file) there is a piece of code that "sets immediate value" on the axi-bus. And it assumed that inner buses (such as TUSER) do not have structure. In my case, TUSER bus is not just a set of bits but a signal with user-defined structure. I.e. TUSER=MY_TYPE1+MY_TYPE2+MY_TYPE... where MY_TYPE1=SOME_TYPE1+SOME_TYPE2+...
It is a powerful feature of SystemVerilog to define custom types, so I think this feature should be supported by this library too.
See: cocotb/cocotb-bus#46
from cocotbext-axi.
Related Issues (20)
- 0.1.20 makes my tests fail HOT 43
- axi address width causing overflow HOT 5
- address may exeed signal width HOT 2
- Axi Streaming is missing support for tstrb
- Is the repo unmaintained / closed to new features? HOT 2
- AxiStreamSink cannot handle tdata X-bytes for bytes to ignore (tkeep=0) HOT 1
- Missing signal results in AssertionError During handling of the above exception, another exception occurred: HOT 5
- Axis DUT signal naming HOT 1
- manually set tlast=1 when sending the last sample HOT 4
- Something is broken between 0.1.20 and 0.1.22
- AxiStreamSink not reading signed_int from dut HOT 5
- Conditional logging
- No support for suffixed AXI bus signal names
- AxiStreamSource shows unexpected behaviour with TUSER and multiple byte_lanes HOT 4
- Setting optional arguments arid,awid in AxiMaster don't seem to work
- Axi stream receiving 8b chunks when sending 32b data HOT 3
- Assigning value to individual signals of AXI Read Address Channel HOT 9
- Issue accessing AXI4Lite bus signals wrapped in a VHDL record HOT 2
- AxiStreamMonitor: Monitor AXIS in a hierarchy deeper than top dut HOT 1
- Writing to / Reading of AxiRam from the hardware DUT hang when adding when loops to the test bench
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cocotbext-axi.