aboutsummaryrefslogtreecommitdiff
path: root/works/life/computer-organization-experiment/test_bench.vhdl
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-12-03 19:34:17 +0800
committercrupest <crupest@outlook.com>2021-12-03 19:34:17 +0800
commit44c58b206b910b15819a738c4a9995f8f840c039 (patch)
treeea3157bdbc0d69966605538992f002df78678978 /works/life/computer-organization-experiment/test_bench.vhdl
parent27556004e8e12a72ed1c2c70212f6b660ed798c3 (diff)
downloadcrupest-44c58b206b910b15819a738c4a9995f8f840c039.tar.gz
crupest-44c58b206b910b15819a738c4a9995f8f840c039.tar.bz2
crupest-44c58b206b910b15819a738c4a9995f8f840c039.zip
import(life): ...
Diffstat (limited to 'works/life/computer-organization-experiment/test_bench.vhdl')
-rw-r--r--works/life/computer-organization-experiment/test_bench.vhdl20
1 files changed, 20 insertions, 0 deletions
diff --git a/works/life/computer-organization-experiment/test_bench.vhdl b/works/life/computer-organization-experiment/test_bench.vhdl
index 6e5e9e8..d2910d7 100644
--- a/works/life/computer-organization-experiment/test_bench.vhdl
+++ b/works/life/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