-- -- Component : disp_driver -- -- THIS CODE WRITTEN BY MICHAEL MAYER -- Generated with System Architect version v8.4_3.7 by mrmayer on Feb 3, 1997 -- ARCHITECTURE spec OF disp_driver IS BEGIN ------------------------------------------------------------------- vhdl_disp_driver : PROCESS ( display_time, indicator_mode, sys_clk, sys_rst ) ------------------------------------------------------------------- CONSTANT blink_length : integer := 1000; VARIABLE blink_counter : integer; --this blink length is the amount of clock events that --will occur before the lights are toggled on/off --100 would mean 50 full periods of the clock (2 events --for each period, one up then the other down) to turn --on, then another 50 to turn off, or 100 clock periods --to turn on and back off again. VARIABLE int_indicators_on : bit; VARIABLE out_digit : segment; BEGIN if indicator_mode = solid then --used for initializiation since this should always be the first case! int_indicators_on := '1'; blink_counter := 0; elsif sys_clk'event then if blink_counter < blink_length then blink_counter := blink_counter + 1; else blink_counter := 0; int_indicators_on := not int_indicators_on; end if; --blink_counter; end if; --indicator_mode indicators_on <= int_indicators_on; -- Now to decode the integers into the correct LED assignments. for x in 1 to 6 loop case display_time(x) is when 0 => out_digit := "1111110"; when 1 => out_digit := "0001100"; when 2 => out_digit := "1011011"; when 3 => out_digit := "0011111"; when 4 => out_digit := "0101101"; when 5 => out_digit := "0110111"; when 6 => out_digit := "1110111"; when 7 => out_digit := "0111100"; when 8 => out_digit := "1111111"; when 9 => out_digit := "0111101"; end case; display_drv(x) <= out_digit; end loop; END PROCESS vhdl_disp_driver ; END spec ;