|
|
发表于 2003-10-5 14:12:52
|
显示全部楼层
关于“attribute”的应用?
Package p_attr is
Type t_package_type is (leadless, pin_grid,dip);
Attribute package_type : t_package_type; <---- 声明package_type
Attribute location: integer: <---- 声明location
End p_attr;
Use work.p_attr.all;
Entity board is
Port (…..
)
end board;
architecture cpu_board of board is
component mc68040
generic( );
port (…..
)
end component;
signal a: integer;
signal b: t_package_type;
attribute package_type of mc68040 : component is 20; <---这里该是package_type的定义了,但location的呢?而且package_type是个枚举类型的,怎么
赋值为20?不明白
begin
a<=mc68040’location; -- returen 20
b<=mc68040’package_type; --return pin_grid;
end cpu_board;
|
|