I want to "create" a type "my_type", which is a std_logic_vector(...), like this C/VHDL fake code: typedef std_logic_vector(CONSTANT downto 0) my_type.
"type" does not allow you to do it with std_logic_vector(...), only with array, and "alias" uses only valid types, you can't create a type with it.
So how to do it?
You need subtype
subtype foo is std_logic_vector(7 downto 0);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With