Commit 40a8feb9 authored by Manuel Mikschl's avatar Manuel Mikschl
Browse files

lab#3_add1

parent 834fb1c7
......@@ -35,8 +35,12 @@ BEGIN
outputs_s <=
"00" WHEN "000",
"10" WHEN "001",
-- fill in the missing lines here
-- ...
"10" WHEN "010",
"01" WHEN "011",
"10" WHEN "100",
"01" WHEN "101",
"01" WHEN "110",
"11" WHEN "111",
"XX" WHEN OTHERS;
sum_o <= outputs_s(1); -- split vector elements ...
......
......@@ -86,7 +86,50 @@ BEGIN -- tbench
-- fill in the missing stimuli here
-- ...
-- Test case: 011
b_i <= '1'; -- change value of b_i
a_i <= '1'; -- change value of a_i
WAIT FOR period;
-- Observer:
ASSERT sum_o = '0' REPORT "Error: sum is not correct !" SEVERITY failure;
ASSERT co_o = '1' REPORT "Error: co is not correct !" SEVERITY failure;
---------------------------------------------------------------------------
-- Test case: 100
ci_i <= '1';
b_i <= '0'; -- change value of b_i
a_i <= '0'; -- change value of a_i
WAIT FOR period;
-- Observer:
ASSERT sum_o = '1' REPORT "Error: sum is not correct !" SEVERITY failure;
ASSERT co_o = '0' REPORT "Error: co is not correct !" SEVERITY failure;
---------------------------------------------------------------------------
-- Test case: 101
a_i <= '1'; -- change value of a_i
WAIT FOR period;
-- Observer:
ASSERT sum_o = '0' REPORT "Error: sum is not correct !" SEVERITY failure;
ASSERT co_o = '1' REPORT "Error: co is not correct !" SEVERITY failure;
---------------------------------------------------------------------------
-- Test case: 110
b_i <= '1'; -- change value of b_i
a_i <= '0'; -- change value of a_i
WAIT FOR period;
-- Observer:
ASSERT sum_o = '0' REPORT "Error: sum is not correct !" SEVERITY failure;
ASSERT co_o = '1' REPORT "Error: co is not correct !" SEVERITY failure;
---------------------------------------------------------------------------
-- Test case: 111
a_i <= '1'; -- change value of a_i
WAIT FOR period;
-- Observer:
ASSERT sum_o = '1' REPORT "Error: sum is not correct !" SEVERITY failure;
ASSERT co_o = '1' REPORT "Error: co is not correct !" SEVERITY failure;
---------------------------------------------------------------------------
WAIT;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment