请问一下VHDL语言高手我下面这个程序怎么错了?怎么修改?
时间:10-02
整理:3721RD
点击:
---------------hugong
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity test_yunsuan is
Port ( CLK : in STD_LOGIC;
disvaluein : in STD_LOGIC_VECTOR (3 downto 0);
disvalueout0 : out STD_LOGIC_VECTOR (3 downto 0);
disvalueout1 : out STD_LOGIC_VECTOR (3 downto 0));
end test_yunsuan;
architecture ben of test_yunsuan is
signal A: std_logic_vector(7 downto 0):="00000000";
signal B0: std_logic_vector(7 downto 0):="00000000";
signal B1: std_logic_vector(7 downto 0):="00000000";
signal X: std_logic_vector(7 downto 0):="00000000";
begin
process(CLK)
variable flag:std_logic;
begin
IF CLK' EVENT AND CLK='1' THEN
case disvaluein is
when "1101" =>B0 B0 B1 A<=A&disvaluein;
X<=X&disvaluein;
end case;
END IF;
end process;
end ben;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity test_yunsuan is
Port ( CLK : in STD_LOGIC;
disvaluein : in STD_LOGIC_VECTOR (3 downto 0);
disvalueout0 : out STD_LOGIC_VECTOR (3 downto 0);
disvalueout1 : out STD_LOGIC_VECTOR (3 downto 0));
end test_yunsuan;
architecture ben of test_yunsuan is
signal A: std_logic_vector(7 downto 0):="00000000";
signal B0: std_logic_vector(7 downto 0):="00000000";
signal B1: std_logic_vector(7 downto 0):="00000000";
signal X: std_logic_vector(7 downto 0):="00000000";
begin
process(CLK)
variable flag:std_logic;
begin
IF CLK' EVENT AND CLK='1' THEN
case disvaluein is
when "1101" =>B0 B0 B1 A<=A&disvaluein;
X<=X&disvaluein;
end case;
END IF;
end process;
end ben;
错误提示:
Error (10327): VHDL error at test_yunsuan.vhd(33): can't determine definition of operator ""+"" -- found 5 possible definitions
程序中:
? ? ? ? ? ? ? ? X<=(((B0(7)&B0(6)&B0(5)&B0(4))+(B1(7)&B1(6)&B1(5)&B1(4)))*"1010")+(B0(3)&B0(2)&B0(1)&B0(0))+(B1(3)&B1(2)&B1(1)&B1(0));
disvalueout1 : out STD_LOGIC_VECTOR (3 downto 0)); 分号与左括号调换一下看看
那肯定是错的,这我倒是知道。
自己再想想 不能老求助求助