Skip to content

Question: be less restrictive with type casting? #19

Closed
@numero-744

Description

@numero-744

I have found this: openhwgroup/cva6#2824

To put it short, the standard seems to prevent things such as Cfg.Len'(value) in the syntax.
(At least I have not found where it is allowed.)
The type can be 42, unsigned, logic, my_t, my_pkg::my_t but not Cfg.Len.
(This is only a syntax issue, Cfg is a parameter so semantically, it is equivalent to typedef logic [Cfg.Len-1:0] my_t; then my_t'(value)).

However, Verilator, Verible, Questa, Vcs, Vivado (and probably others) allow Cfg.Len'(value).

Should we support this syntax as well?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions