找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2813|回复: 2
收起左侧

VHDL例化元件报错和类型不匹配的问题

[复制链接]
ID:258507 发表于 2019-2-28 18:31 | 显示全部楼层 |阅读模式
在做一个老师课后布置的小设计,出了两个错误,2天了,我尝试了各种办法依旧没有解决。
元件例化的port ma出错
error.png
显示“未定义的实体”,但是在同一个VHDL文件上面,明明有定义了。 error2.png


还有这个类型匹配的问题7+2(1 downto 0)=9

match1.png
这里要求一个赋值给矢量(2 downto 0)
我只能补个blank,压根就算不上解决....
match2.png

不知道各位大佬有何见解
回复

使用道具 举报

ID:258507 发表于 2019-2-28 18:42 | 显示全部楼层
文字版
出错源代码   pcreg:flopr generic map(32) port map(clk,reset,pcnext,pc);

Error (12006): Node instance "pcreg" instantiates undefined entity "flopr". Ensure that required library paths are specified correctly, define the specified entity, or change the instantiation. If this entity represents Intel FPGA or third-party IP, generate the synthesis files for the IP.

下面是flopr的定义...就在出错代码的上方。
component flopr generic(width:integer);
    port(clk,reset: in  STD_LOGIC;
              d:         in  STD_LOGIC_VECTOR(width-1 downto 0);
                        q:         out STD_LOGIC_VECTOR(width-1 downto 0));
  end component;

回复

使用道具 举报

ID:258507 发表于 2019-2-28 18:48 | 显示全部楼层
QQ截图20190228184627.png
只有这样1位1位凑够9位,才能执行最后的()<=controls(8 downto 0) 赋值
但是这里的aluop必须为2位,为之奈何?
回复

使用道具 举报

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

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表