79715931

Date: 2025-07-26 19:08:37
Score: 1
Natty:
Report link

If you declare an object inside a generate block, ordinarily the name of that object is hierarchical, i.e., loop_gen_block[0].object it may or may not need to be escaped, i.e., \loop_gen_block[0]

If you don't name the gen block, the compiler will. Might be genblock0, might be genblock[0]. Note that the index is only meaningful within generate; it's not an array.

For a generate loop, objects declared inside the loop must be referenced hierarchically to disambiguate them.

For an if generate, in Vivado at least, you can specify -noname_unnamed_generate to xelab, and if there's no ambiguity, an object declared in the block can be referenced without the added hierarchical level. Which can be very useful. But, it has to be an explicit generate block, with "generate" and "endgenerate". An implicit generate (based on, say, a parameter value) doesn't work that way and will need, or be given, a block name.

Just my experience; don't flame me if I got something wrong.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: jmhiu