-- File: test_dff.adb -- Date: 7/98 -- Author: SY Wong -- Aim: Test program for D-FlipFlop with HDL, UTILITY, TEXT_IO, DFF; procedure test_dff is u: DFF.device; clock_was: HDL.input := FALSE; procedure display is begin UTILITY.put(u.data_in); UTILITY.put(u.data_out); UTILITY.put(clock_was); UTILITY.put(u.clock); DFF.update(u); UTILITY.put(u.data_in); UTILITY.put(u.data_out); clock_was:= u.clock; -- state TEXT_IO.new_line; end display; begin TEXT_IO.put_line ("before update after update"); TEXT_IO.put_line ("data_in data_out clk_was clock data_in data_out" ); display; -- 0 0 0 0 0 0 u.data_in:= TRUE; u.clock:= TRUE; display; -- 1 0 0 1 1 1 u.data_in:= FALSE; display; -- 0 1 1 1 0 1 u.clock:= FALSE; display; -- 0 1 1 0 0 1 u.clock:= TRUE; display; -- 0 1 0 1 0 0 display; -- 0 0 1 1 0 0 end test_dff;