question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can't get signal under generate block with vcs, using systemVerilog

See original GitHub issue

when I want to capture a signal under generate block,like this: in sv file: for(i=0; i<2; i=i+1) begin : PACKET my_module module1(...)

in cocotb test: topmodule.PACKET[0].module1

I run make: make SIM=vcs it runs wrong and log:

File "/usr/local/lib64/python3.6/site-packages/cocotb/handle.py", line 306, in __getattr__
raise AttributeError("%s contains no object named %s" % (self._name, name))
 AttributeError: topmodule contains no object named PACKET

so, how to get a signal under generate block with vcs?

cocotb environment: image simulator and verison: vcs Version O-2018.09-SP python version: 3.6.8

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
marlonjamescommented, Nov 11, 2020

The workaround in #2143 is only compiled for Icarus. If vpi_handle_by_name doesn’t resolve the vpiGenScopeArray handle, the iteration over parent workaround may work. You could try adding a check for VCS to: https://github.com/cocotb/cocotb/blob/9df43e5c0a797299ff5abc994da7cbbb31756e5e/cocotb/share/lib/vpi/VpiImpl.cpp#L305

1reaction
cmarqucommented, Nov 11, 2020

Unfortunately, I don’t believe it’s fixed in master, I still see the problem with VCS in test_array with TESTCASE=test_discover_all. I’ll try to give more information soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

accessing a generate block hierarchy - Verification Academy
P.s - What I'm generally trying to do is to get handles to the instantiated interfaces (some_interface) and pass them to system verilog...
Read more >
What does it mean VCS has encountered unamed generate ...
I get an error saying VCS has encountered unnamed generate blocks. And it points to the lines where i have the assign statements....
Read more >
Verilog Generate Configurable RTL Designs
Generate block in a Verilog generate loop can be named or unnamed. If it is named, then an array of generate block instances...
Read more >
VCS/VCSi User Guide
SystemVerilog Assertions Severity . ... Access Routine for Signal in a Generate Block. ... VCS cannot accelerate certain data types and primitives. VCS...
Read more >
Verilog generate block - ChipVerify
A generate block cannot contain port, parameter, specparam declarations or specify blocks. However, other module items and other generate blocks are allowed ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found