MyFPGA Forum
标题:
vhdl的tpye 与subtybe
[打印本页]
作者:
cgh996
时间:
2010-4-30 16:15
标题:
vhdl的tpye 与subtybe
我在写package时里面用到function,但是对于type与subtype的区别不清楚,比如 subtype rtype is signed(n-1 downto 0);用type便出错了
作者:
hdhuang
时间:
2010-5-20 15:36
Subtype 是在VHDL预定义类型下用户自定义预定义类型的子集而用,Signed类型是synopsys在STD_LOGIC_ARITH中定义的一个数据类型(其实是integer的子类型),你要在它基础上定义,自然要用subtype。
欢迎光临 MyFPGA Forum (http://www.myfpga.org/discuz/)
Powered by Discuz! X3