在线咨询 切换到宽版
eetop公众号 创芯大讲堂 创芯人才网

 找回密码
 注册

手机号码,快捷登录

手机号码,快捷登录

搜全文
查看: 4825|回复: 10

关于“attribute”的应用?

[复制链接]
发表于 2003-10-5 14:02:31 | 显示全部楼层

关于“attribute”的应用?

查了下Attribute的语法:
{declaration}
attribute AttributeName : TypeName;
{specification}
attribute AttributeName of Name [Signature] : Class is Expression
Signature = [TypeName,...] return TypeName
Class = {either} signal type function architecture {etc}
回复 支持 反对

使用道具 举报

发表于 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;

回复 支持 反对

使用道具 举报

发表于 2003-10-8 07:53:46 | 显示全部楼层

关于“attribute”的应用?

如果按你说的改,倒是对了。也许是书上有错吧?!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条


手机版| 小黑屋| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 ) |网站地图

GMT+8, 2025-11-4 04:35 , Processed in 0.017282 second(s), 5 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表