用户登录
用户注册

分享至

VHDL: found ‘0‘ definitions of operator “+“, cannot determine exact overloaded...问题解决

  • 作者: 爱上猫的诱惑
  • 来源: 51数据库
  • 2021-08-15

目录

  • 一、问题
  • 二、解决

一、问题

?使用Xilinx ISE14.7编写VHDL代码时,出现以下问题:

found '0' definitions of operator "+", 
cannot determine exact overloaded matching definition for "+"

?翻译过来就是:找到运算符“+”的“0”定义,无法确定“+”的精确重载匹配定义。可能出错在某个’+‘运算,ISE无法找到该’+'左右两边的运算定义。
?经过代码注释等排错手段,逐步锁定问题出在一句代码:

q <= q + ‘1’;

q的定义为:

signal q: std_logic_vector(3 downto 0);

二、解决

?根据代码的错误,只需要加入

use ieee.std_logic_unsigned.all;

就可以解决问题。


原因是:在IEEE设计库的std_logic_unsigned程序包中,声明了很多“+”运算符的重载函数。
??而问题就出在缺少“+”运算符的重载函数,加入库后就完美解决了。

软件
前端设计
程序设计
Java相关