From 78ce0ddf1ab18e67d62b0f6b05ab010b0e4bb8c0 Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 3 Dec 2021 19:34:17 +0800 Subject: ... --- computer-organization-experiment/test_bench.vhdl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'computer-organization-experiment/test_bench.vhdl') diff --git a/computer-organization-experiment/test_bench.vhdl b/computer-organization-experiment/test_bench.vhdl index 6e5e9e8..d2910d7 100644 --- a/computer-organization-experiment/test_bench.vhdl +++ b/computer-organization-experiment/test_bench.vhdl @@ -124,3 +124,23 @@ begin end loop; end process stimulus; end architecture test_shift_32; + + +architecture test_alu of test_bench is + signal A: std_logic_vector(31 downto 0) := "00000000000000000000000000000011"; + signal B: std_logic_vector(31 downto 0) := "00000000000000000000000000000011"; + signal S: std_logic_vector(31 downto 0); + signal ALUC: std_logic_vector(3 downto 0) := "0000"; + signal Z: std_logic; +begin + alu: entity work.alu(Behavioral) + port map (A, B, ALUC, S, Z); + stimulus: process is + begin + loop + wait for 5 ns; + ALUC <= ALUC + 1; + end loop; + + end process stimulus; +end architecture test_alu; \ No newline at end of file -- cgit v1.2.3