URL
https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk
[/] [open8_urisc/] [trunk/] [VHDL/] [o8_status_led.vhd] - Diff between revs 244 and 249
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 244 |
Rev 249 |
Line 124... |
Line 124... |
end if;
|
end if;
|
|
|
end if;
|
end if;
|
end process;
|
end process;
|
|
|
Output_FF: process( Clock, Reset )
|
U_LED_DRV : entity work.status_led
|
begin
|
generic map(
|
if( Reset = Reset_Level )then
|
Reset_Level => Reset_Level
|
LED_Out <= '0';
|
)
|
elsif( rising_edge(Clock) )then
|
port map(
|
LED_Out <= '0';
|
Clock => Clock,
|
case( LED_Mode )is
|
Reset => Reset,
|
when "001" =>
|
LED_Mode => LED_Mode,
|
LED_Out <= '1';
|
LED_Out => LED_Out
|
when "010" =>
|
);
|
LED_Out <= Dim50Pct_Out;
|
|
when "011" =>
|
|
LED_Out <= One_Hz_Out;
|
|
when "100" =>
|
|
LED_Out <= Fade_out;
|
|
when others => null;
|
|
end case;
|
|
end if;
|
|
end process;
|
|
|
|
Timer_proc: process( Clock, Reset )
|
|
begin
|
|
if( Reset = Reset_Level )then
|
|
Dim50Pct_Out <= '0';
|
|
Half_Hz_Timer <= (others => '0');
|
|
One_Hz_Out <= '0';
|
|
Fade_Timer1 <= (others => '0');
|
|
Fade_Timer2 <= (others => '0');
|
|
Fade_out <= '0';
|
|
elsif( rising_edge(Clock) )then
|
|
Dim50Pct_Out <= not Dim50Pct_Out;
|
|
|
|
Half_Hz_Timer <= Half_Hz_Timer - 1;
|
|
if( Half_Hz_Timer = 0 )then
|
|
Half_Hz_Timer <= HALF_HZ_PRD;
|
|
One_Hz_Out <= not One_Hz_Out;
|
|
end if;
|
|
|
|
Fade_Timer1 <= Fade_Timer1 - 1;
|
|
Fade_Timer2 <= Fade_Timer2 - 1;
|
|
if( or_reduce(Fade_Timer2) = '0' )then
|
|
Fade_Timer2(TIMER_MSB downto TIMER_MSB - 8) <= (others => '1');
|
|
Fade_Timer2(TIMER_MSB - 9 downto 0 ) <= (others => '0');
|
|
end if;
|
|
Fade_out <= Fade_Timer1(TIMER_MSB) xor
|
|
Fade_Timer2(TIMER_MSB);
|
|
end if;
|
|
end process;
|
|
|
|
end architecture;
|
end architecture;
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.