-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AXIStream: self.width = len(self.bus.tdata) TypeError: object of type 'NoneType' has no len() #42
Comments
Strange. What does |
|
Odd, the only signal I see in that list is bfm_m_axis_tdata. If cocotb doesn't see the signal, then cocotbext-axi can't connect to it. It's not clear if this is a cocotb issue or a simulator issue. |
My colleague is using cocotb 1.4 and cocotbext-axi 0.1.4 and it works for him. |
We are both using Active HDL |
Well, possibly it's a cocotb issue related to VHPI. I think you should take this missing signal issue over to the cocotb github and open an issue there because if cocotb doesn't get all of the signal names from the simulator, then cocotbext-axi simply isn't going to be able to operate on those signals. |
I can still access these signals from my python test, for instance I can do |
Right, I suspect it is some sort of enumeration issue. If you ask for a specific signal, it gives you the signal. But if you ask for all of the signals, something is broken and cocotb doesn't give you all of the signals, only some subset of the signals. cocotbext-axi works by asking for all of the signals and then prefix-matching against those. Well I suppose in this case, it isn't really cocotbext-axi doing that either, instead it's the Bus object in cocotb-bus that does this that cocotbext-axi uses, which is part of cocotb. I suspect that cocotb and/or activehdl have some sort of issue in how signals are enumerated in VHPI, so you should raise this issue on the cocotb github. |
Alright, I posted something in Gitter but they pointed me here, so I'll ping them back with your response :) |
So I think it is something to do with the Bus class because if I put a Verilog wrapper around my VHDL testbench then it finds all the signals and works. |
If it works with a Verilog wrapper, then that pretty much confirms that this is some sort of VHPI issue between ccootb and activehdl, as cocotb uses VPI when interacting with Verilog code and VHPI when interacting with VHDL code. |
Thanks for your speedy responses, I appreciate it! |
Hi @jackbpdx Have you found a way to run VHDL directly? I run into a similar problem while testing Aldec Riviera. |
I was able to make my tests work by using the following workaround: Before defining the my driver, I touch each signal once:
No Idea why, but it makes the test work again (I used to run the same test with Modelsim before) |
yeah, this definitely seems to be some sort of simulator API related issue, not sure if it's on the cocotb end or the simulator end. Has anyone reported this to cocotb? I don't use VHDL or have access to riviera, so I can't test this on my end. |
@Botnic Hi yes, I have been using that exact same method as a workout to get cocotb to recognize my bus signals. @alexforencich I made a comment about it in Gitter however, I don't think anyone really responded. I have scoured Gitter and have not seen anyone else reporting this issue. I found it hard to believe I was the only one running into this issue. It worked in cocotb 1.4 as far as I know. Once we upgraded to 1.6 I saw the issue, I also tested 1.5 and it persisted there too. Also, I believe this is an issue with the bus class because cocotb recognizes all other non bus signals in the ports at the top level. |
Shot in the dark - does it help to run |
Hey @cmarqu I tried it and it did not work. |
@cmarqu @Botnic @alexforencich I rolled back cocotb-bus to version 0.1.1 and the issue seemed to go away. I don't have use setimmediatevalue to work around the issue. |
cocotb=1.6.2
cocotbext-axi = 0.1.16
Active HDL 11.1
When I define an
axis_source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "bfm_m_axis"), dut.clk_in, dut.reset)
and
axis_sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "bfm_s_axis"), dut.clk_in, dut.reset)
I get the error
self.width = len(self.bus.tdata) TypeError: object of type 'NoneType' has no len()
on the axis_sink.Here is my entity:
However, if I remove either the source or sink object then remove the corresponding signals in the entity it runs fine.
The text was updated successfully, but these errors were encountered: