Line 1... |
Line 1... |
--
|
--
|
-- UART 16750
|
-- UART 16750
|
--
|
--
|
-- Author: Sebastian Witt
|
-- Author: Sebastian Witt
|
-- Date: 29.01.2008
|
-- Date: 29.01.2008
|
-- Version: 1.0
|
-- Version: 1.1
|
--
|
--
|
-- History: 1.0 - Initial version
|
-- History: 1.0 - Initial version
|
|
-- 1.1 - THR empty interrupt register connected to RST
|
--
|
--
|
--
|
--
|
-- This code is free software; you can redistribute it and/or
|
-- This code is free software; you can redistribute it and/or
|
-- modify it under the terms of the GNU Lesser General Public
|
-- modify it under the terms of the GNU Lesser General Public
|
-- License as published by the Free Software Foundation; either
|
-- License as published by the Free Software Foundation; either
|
Line 465... |
Line 466... |
-- THR empty interrupt
|
-- THR empty interrupt
|
UART_IIC_THRE_ED: slib_edge_detect port map (CLK => CLK, RST => RST, D => iLSR_THRE, RE => iLSR_THRERE);
|
UART_IIC_THRE_ED: slib_edge_detect port map (CLK => CLK, RST => RST, D => iLSR_THRE, RE => iLSR_THRERE);
|
UART_IIC_THREI: process (CLK, RST)
|
UART_IIC_THREI: process (CLK, RST)
|
begin
|
begin
|
if (RST = '1') then
|
if (RST = '1') then
|
|
iTHRInterrupt <= '0';
|
elsif (CLK'event and CLK = '1') then
|
elsif (CLK'event and CLK = '1') then
|
if (iLSR_THRERE = '1' or iFCR_TXFIFOReset = '1' or (iIERWrite = '1' and iDIN(1) = '1' and iLSR_THRE = '1')) then
|
if (iLSR_THRERE = '1' or iFCR_TXFIFOReset = '1' or (iIERWrite = '1' and iDIN(1) = '1' and iLSR_THRE = '1')) then
|
iTHRInterrupt <= '1'; -- Set on THRE, TX FIFO reset (FIFO enable) or ETBEI enable
|
iTHRInterrupt <= '1'; -- Set on THRE, TX FIFO reset (FIFO enable) or ETBEI enable
|
elsif ((iIIRRead = '1' and iIIR(3 downto 1) = "001") or iTHRWrite = '1') then
|
elsif ((iIIRRead = '1' and iIIR(3 downto 1) = "001") or iTHRWrite = '1') then
|
iTHRInterrupt <= '0'; -- Clear on IIR read (if source of interrupt) or THR write
|
iTHRInterrupt <= '0'; -- Clear on IIR read (if source of interrupt) or THR write
|