📄 usb_new_upstreamled_rtl.vhdl
字号:
--------------------------------------------------------------------------------
---- File >>> usb_new_upstreamled_rtl.vhdl
---- Iden >>> 980306-10:26:05
----
---- Project: USB Development
---- Customer: Philips_ITCL
----
---- VHDL Design Unit:
---- Written by: Usb User
---- Easics nv
---- http://www.easics.com
---- mailto: vhdl@easics.be
----
---- Creation Date: Fri, 06 Mar 1998
----
---- Purpose:
----
---- Revision history:
----
--------------------------------------------------------------------------------
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
architecture RTL of UPSTREAMLED is
constant BLINK_TIME: integer := 256;
subtype S_BlinkTime is integer range 0 to BLINK_TIME-1;
signal Blinking: boolean;
begin
process(FsClk,Reset_N)
variable BlinkTimer: S_BlinkTime;
begin
if (Reset_N = ACTIVE_LOW) then
BlinkTimer := 0;
Blinking <= FALSE;
elsif FsClk'event and (FsClk = '1') then
-- DOC_BEGIN
-- When a successful transfer occured, the blink timer
-- is reset at its maximum value. From that moment it starts
-- counting down every millisecond. The LED blinks as long as the
-- timer value is higher than half the maximum value.<p>
-- The timer stops at 0. From that moment on it waits again
-- for a new successful transfer.<p>
Blinking <= (BlinkTimer >= BLINK_TIME /2);
if (BlinkTimer = 0) then
if SH_Succes then
BlinkTimer := BLINK_TIME-1;
end if;
else
if (TM_1kHzPulse = '1') then
BlinkTimer := BlinkTimer -1;
end if;
end if;
-- DOC_END
end if;
end process;
-- DOC_BEGIN
-- There are two modes for the leds. When NoBlinkingLEDs(ConfigArray)
-- is true, the LEDs wont blink. When NoBlinkingLEDs(ConfigArray) is
-- false blinking is allowed.<p>
-- When not configured the LED is default off. When configured,
-- it is default on.<p>
-- Blinking is superposed on these states as follows.
-- The LEDs blink when Blinking = TRUE and the configuration
-- allows blinking. During global suspend, the LED is always off
-- to save power.<p>
Configured_LED <= conv_active_high(
SH_Configured and not TM_Suspend) when NoBlinkingLEDs(ConfigArray) else
conv_active_high(
((not SH_Configured and Blinking) or
(SH_Configured and not Blinking)) and
(not TM_Suspend));
-- DOC_END
end RTL;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -