Vhdl 中缀运算符没有可行的条目“+&引用;

Vhdl 中缀运算符没有可行的条目“+&引用;,vhdl,Vhdl,我正在设计一个2s补码,但它表明,任何人都可以帮助我解决这个错误 library ieee; use ieee.std_logic_1164.all; use IEEE.std_logic_arith.all; entity comp is port(a : in std_logic_vector(7 downto 0); y : out std_logic_vector(7 downto 0)); end comp; architecture dataflow of comp is

我正在设计一个2s补码,但它表明,任何人都可以帮助我解决这个错误

library ieee;
use ieee.std_logic_1164.all;
use IEEE.std_logic_arith.all;

entity comp is
port(a : in std_logic_vector(7 downto 0);
    y : out std_logic_vector(7 downto 0));
end comp;

architecture dataflow of comp is
signal temp: std_logic;
begin
    y<=  not(a) + "00000001";
end dataflow;
ieee库;
使用ieee.std_logic_1164.all;
使用IEEE.std_logic_arith.all;
实体公司
端口(a:标准逻辑向量(7到0);
y:输出标准逻辑向量(7到0);
年终薪酬;
comp-is的体系结构数据流
信号温度:标准逻辑;
开始

y使用Synopsys软件包时,需要在
std\u logic\u 1164
之后添加使用
std\u logic\u unsigned
软件包,如:

use IEEE.std_logic_unsigned.all;
这样,您甚至可以使用整数表示法进行加法,如:

y <= not(a) + 1;

每个人都会跳过原因-运算符是依赖于重载解决方案签名的函数。没有一个函数的签名[std_logic_vector,std_logic_vector return std_logic_vector]可见。您没有使一个声明可见的use子句(从包声明中)。Morten的解决方案通过使用显式类型转换和可用声明(在package numeric_std中)提供并使用了可视的。对于那些与IEEE std 1076-2008兼容的模拟和合成环境,也有package numeric_std_unsigned,提供与Synopsys软件包std_logic_unsigned等效的IEEE兼容产品。
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
...
  y <= std_logic_vector(unsigned(not(a)) + 1);