标题: VHDL例化元件报错和类型不匹配的问题 [打印本页]

作者: FVESSK    时间: 2019-2-28 18:31
标题: VHDL例化元件报错和类型不匹配的问题
在做一个老师课后布置的小设计,出了两个错误,2天了,我尝试了各种办法依旧没有解决。
元件例化的port ma出错

显示“未定义的实体”,但是在同一个VHDL文件上面,明明有定义了。


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


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


不知道各位大佬有何见解

作者: FVESSK    时间: 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;


作者: FVESSK    时间: 2019-2-28 18:48

只有这样1位1位凑够9位,才能执行最后的()<=controls(8 downto 0) 赋值
但是这里的aluop必须为2位,为之奈何?





欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1