Closed avelure closed 2 years ago
@bpadalino also reported the same issue when he was trying to get UVVM to work (I guess that's where this is from too). I think this error is reported correctly, but I may be wrong. I'd need to check the LRM carefully.
An others
association can only be used where the aggregate has a constrained array subtype. Here the subtype is determined by the LHS of the assignment. clock_name
is declared with type string
which is an unconstrained type, and that then gets propagated to the type of the aggregate. A simple fix is to remove the type from the alias declaration (or provide a fully constrained type):
alias clock_name is vvc_config.clock_name;
Yes, it's from the UVVM clock_generator_vvc. I kind of understand why then, but I assumed since an alias always is reflecting an object and as that object in this case is constrained, then that those constraint would be applied to the string.
This has been reported by at least three people now so I've decided to be pragmatic and implement the GHDL behaviour when --relaxed
is passed. The UVVM sources now compile with modification.
This might need to be checked in the LRM, but I was under the impression that there is no difference between using an alias and the original object. In the following code the range for 'others' can be determined for the direct assignment, but not for the assignment via an alias. GHDL also complains on the same issue.