开发者

How to do a VHDL "typedef"

开发者 https://www.devze.com 2023-02-17 07:31 出处:网络
I want to \"create\" a type \"my_type\", which is a开发者_如何学Python std_logic_vector(...), like this C/VHDL fake code:

I want to "create" a type "my_type", which is a开发者_如何学Python 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);
0

精彩评论

暂无评论...
验证码 换一张
取 消