diff options
author | crupest <crupest@outlook.com> | 2021-11-23 09:51:36 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-11-23 09:51:36 +0800 |
commit | 224d5fec9b9377faa4bf8d3da0e37f675ef5ea03 (patch) | |
tree | 3b06ea5155efa5c1313e3af1c67b16e57adaf1d8 /works/life/computer-organization-experiment/test_bench.vhdl | |
parent | 226bfe84c5f690462adbf386dc66316cc21fdb28 (diff) | |
download | crupest-224d5fec9b9377faa4bf8d3da0e37f675ef5ea03.tar.gz crupest-224d5fec9b9377faa4bf8d3da0e37f675ef5ea03.tar.bz2 crupest-224d5fec9b9377faa4bf8d3da0e37f675ef5ea03.zip |
import(life): Add computer organization experiment 4.
Diffstat (limited to 'works/life/computer-organization-experiment/test_bench.vhdl')
-rw-r--r-- | works/life/computer-organization-experiment/test_bench.vhdl | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/works/life/computer-organization-experiment/test_bench.vhdl b/works/life/computer-organization-experiment/test_bench.vhdl index 756aa8d..64daf7f 100644 --- a/works/life/computer-organization-experiment/test_bench.vhdl +++ b/works/life/computer-organization-experiment/test_bench.vhdl @@ -62,3 +62,25 @@ begin end loop; end process stimulus; end architecture test_multiplexer_32_2; + +architecture test_adder_32 of test_bench is + signal A: std_logic_vector(31 downto 0) := B"00000000000000000000000000000000"; + signal B: std_logic_vector(31 downto 0) := B"00000000000000000000000000000000"; + signal CIN: std_logic; + signal S: std_logic_vector(31 downto 0); + signal COUT: std_logic; +begin + adder: entity work.adder_32(behavior) + port map (A, B, CIN, S, COUT); + stimulus: process is + begin + loop + A <= A + 1; + B <= B + 2; + CIN <= '0'; + wait for 5 ns; + CIN <= '1'; + wait for 5 ns; + end loop; + end process stimulus; +end architecture test_adder_32; |