我的测试台代码。
1.我要输入CIN <=“ 0”,“ 1”;等待3 ns;
但是添加到CIN的代码是错误代码。
错误是#**错误:C:/Modeltech_pe_edu_10.4a/examples/tb_ladder.vhd(73):在需要非数组类型ieee.std_logic_1164.STD_LOGIC的地方找到了字符串文字。
图书馆ieee; 使用ieee.std_logic_1164.all;
使用ieee.std_logic_arith.all;
ENTITY tb_ladder IS
END tb_ladder;
ARCHITECTURE behavior OF tb_ladder IS
COMPONENT ladder
PORT(A : IN std_logic_vector(3 downto 0);
B : IN std_logic_vector(3 downto 0);
CIN : IN std_logic;
SUM : OUT std_logic_vector(3 downto 0);
COUT : OUT std_logic
);
END COMPONENT;
signal A : std_logic_vector(3 downto 0);
signal B : std_logic_vector(3 downto 0);
signal CIN : std_logic ;
signal SUM : std_logic_vector(3 downto 0);
signal COUT : std_logic;
BEGIN
uut: ladder PORT MAP (
A => A,
B => B,
CIN => CIN,
SUM => SUM,
COUT => COUT
);
stim_proc: process begin
A <= "0100";
wait for 2 ns;
B <= "1001";
wait for 5 ns;
A <= "1101";
wait for 2 ns;
B <= "0011";
wait for 5 ns;
A <= "0100";
wait for 2 ns;
B <= "0110";
wait for 5 ns;
A <= "1101";
wait for 2 ns;
B <= "1100";
wait for 5 ns;
end process;
END ;