Skip to content

Generic interconnect (UntypedType) bit width is always 0 with Type::getBitstreamWidth() #1356

@akashlevy

Description

@akashlevy

Is your bug report related to the C++ slang project or the pyslang Python bindings?
C++ slang and yosys-slang

Describe the bug
There does not seem to be a way to dynamically resolve the width of an UntypedType. Calling Type::getBitstreamWidth() on an UntypedType always returns 0.

To fix this, you would probably need to implement dynamic resolution in a similar fashion to how SV class width does it. I don't currently see any methods for this at the moment though. Curious to hear your thoughts.

To Reproduce
See povik/yosys-slang#146

Additional context
Context is that the interconnect width needs to be resolved for yosys-slang to be able to dump into RTLIL.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions