Giter VIP home page Giter VIP logo

Comments (7)

ktbarrett avatar ktbarrett commented on May 30, 2024

This should be possible. It may be due to limited support in your simulator. Please provide the full details about your environment that the issue template asked you.

from cocotb.

genfrontier avatar genfrontier commented on May 30, 2024

Hey guys, sorry to intrude on firemountain issue , just to add that I see the same issue albeit on a more convoluted fashion but it boils down to the same. I am using 1.7.2 cocotb, using VCS: VCS Release version S-2021.09-SP2-1_Full64 and here is a snippet:

genvar stream_group_gen;
genvar stream_gen;

for (stream_group_gen = 0; stream_group_gen < 8; stream_group_gen++) begin: overlay_stream_group

for (stream_gen = 0; stream_gen < 8; stream_gen++) begin: overlay_stream

stream_module stream_inst()

end
end

When I try to access this via : dut.overlay_stream_group[0].overlay_stream[0].stream_inst

I get the same error as the OP, a print(dir(dut)) gives no member named overlay_stream_group, but weirdly we get a member named stream_inst. which is not an array so any access to it while it does not complain at runtime, goes to nowhere

from cocotb.

ktbarrett avatar ktbarrett commented on May 30, 2024

@genfrontier See #2187. It seems that VCS doesn't have great support for discovering generate loops, but there is a work-around.

from cocotb.

genfrontier avatar genfrontier commented on May 30, 2024

Thanks ktbarret, i was able to bypass this by using :

fullsig = dut._id(f"overlay_stream_group[{groupsel:d}].overlay_stream[{streamsel:d}].stream_inst", extended=False)

The trick is to use as the ._id string the whole hierarchy from the first generate loop onward. Leaving it here as might someone find it helpful

from cocotb.

github-actions avatar github-actions commented on May 30, 2024

Has your question been resolved? If so please close this issue. If it has not been resolved, you may need to provide more information. If no more activity on this issue occurs in 7 days, it will be closed.

from cocotb.

firemountain154B avatar firemountain154B commented on May 30, 2024

may I have a elaborate explanation on what the mean of simulator I use, I guess it's verilator? and I just built it with python3, I still have this problem, so how u grab this signal if it's defined like that.

from cocotb.

ktbarrett avatar ktbarrett commented on May 30, 2024

Verilator is a simulator. What version of verilator? You can find out by running verilator --version.

from cocotb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.