在用quartusII验证vhdl程序时发现的错误,是书上的例子.
libraryieee;useieee.std_logic_1164.all;useieee.std_logic_arith.all;useieee.std_logic_...
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity adder is
port( in1: in std_logic;
in2: in std_logic;
cntl: bit;
pout: out bit_vector);
end adder;
architecture func of adder is
begin
process(cntl)
begin
if(cntl='1') then pout<=in1+in2;
end if;
end process;
end func;
提示错误:Error (10327): VHDL error at adder.vhd(16): can't determine definition of operator ""+"" -- found 0 possible definitions 展开
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity adder is
port( in1: in std_logic;
in2: in std_logic;
cntl: bit;
pout: out bit_vector);
end adder;
architecture func of adder is
begin
process(cntl)
begin
if(cntl='1') then pout<=in1+in2;
end if;
end process;
end func;
提示错误:Error (10327): VHDL error at adder.vhd(16): can't determine definition of operator ""+"" -- found 0 possible definitions 展开
2个回答
展开全部
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity adder is
port( in1: in std_logic;
in2: in std_logic;
cntl: std_logic;
pout: out std_logic);
end adder;
architecture func of adder is
begin
process(cntl)
begin
if(cntl='1') then pout<=in1 and in2;
end if;
end process;
end func;
帮你改了下 应该可以用了
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity adder is
port( in1: in std_logic;
in2: in std_logic;
cntl: std_logic;
pout: out std_logic);
end adder;
architecture func of adder is
begin
process(cntl)
begin
if(cntl='1') then pout<=in1 and in2;
end if;
end process;
end func;
帮你改了下 应该可以用了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
威孚半导体技术
2024-08-19 广告
2024-08-19 广告
威孚(苏州)半导体技术有限公司是一家专注生产、研发、销售晶圆传输设备整机模块(EFEM/SORTER)及核心零部件的高科技半导体公司。公司核心团队均拥有多年半导体行业从业经验,其中技术团队成员博士、硕士学历占比80%以上,依托丰富的软件底层...
点击进入详情页
本回答由威孚半导体技术提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询