In my VHDL design I have entities with port definitions similar to this:
entity dummy is
port( cpl : cplxRecord_t )
end entity
type cplxRecord_t is record
r1 : anotherRecord_t;
vec: unsigned;
lin: std_logic;
...
end record
in the architecture I use some standard functions for unsigned
, e.g. to_integer(cpl.vec)
. These complain during simulation startup Metavalue detected. Returning ...
. I would like to eliminate the cause of these warnings. So far my only idea is to assign a default value to that port. However having to define each element feels like a bad solution, making htis a maintenance headache when elements are added to/removed from the record. Is there some way to initialize the port with all '0' (Zero)?
Q: How do I prevent Metavalue detected
warnings, caused by unsigned ports being uninitialized U
during design loading and processesd by to_integer
?
P.S.: I am using modelsim. And this font makes it hard to differntiate between letter o and zero. O0o
unsigned
fits better thanstd_ulogic_vec
and the problem occurs only during startup (first delta cycles after design is loaded) and is not a problem in operation since the other units drive the inputs only to valid levels (0,1) I think that adding a conversion function would a) be a bit over the top and b) the problem is caused by the port readingU
during startup in the first place. \$\endgroup\$