Line 1... |
Line 1... |
--
|
--
|
-- UART 16750
|
-- UART 16750
|
--
|
--
|
-- Author: Sebastian Witt
|
-- Author: Sebastian Witt
|
-- Date: 29.01.2008
|
-- Date: 29.01.2008
|
-- Version: 1.3
|
-- Version: 1.4
|
--
|
--
|
-- History: 1.0 - Initial version
|
-- History: 1.0 - Initial version
|
-- 1.1 - THR empty interrupt register connected to RST
|
-- 1.1 - THR empty interrupt register connected to RST
|
-- 1.2 - Registered outputs
|
-- 1.2 - Registered outputs
|
-- 1.3 - Automatic flow control
|
-- 1.3 - Automatic flow control
|
|
-- 1.4 - De-assert IIR FIFO64 when FIFO is disabled
|
--
|
--
|
--
|
--
|
-- 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 401... |
Line 402... |
UART_IS_DSR: slib_input_sync port map (CLK, RST, DSRN, iDSRNs);
|
UART_IS_DSR: slib_input_sync port map (CLK, RST, DSRN, iDSRNs);
|
UART_IS_DCD: slib_input_sync port map (CLK, RST, DCDN, iDCDNs);
|
UART_IS_DCD: slib_input_sync port map (CLK, RST, DCDN, iDCDNs);
|
UART_IS_RI: slib_input_sync port map (CLK, RST, RIN, iRINs);
|
UART_IS_RI: slib_input_sync port map (CLK, RST, RIN, iRINs);
|
|
|
-- Input filter for UART control signals
|
-- Input filter for UART control signals
|
UART_IF_CTS: slib_input_filter generic map (SIZE => 4) port map (CLK, RST, iBaudtick2x, iCTSNs, iCTSn);
|
UART_IF_CTS: slib_input_filter generic map (SIZE => 2) port map (CLK, RST, iBaudtick2x, iCTSNs, iCTSn);
|
UART_IF_DSR: slib_input_filter generic map (SIZE => 4) port map (CLK, RST, iBaudtick2x, iDSRNs, iDSRn);
|
UART_IF_DSR: slib_input_filter generic map (SIZE => 2) port map (CLK, RST, iBaudtick2x, iDSRNs, iDSRn);
|
UART_IF_DCD: slib_input_filter generic map (SIZE => 4) port map (CLK, RST, iBaudtick2x, iDCDNs, iDCDn);
|
UART_IF_DCD: slib_input_filter generic map (SIZE => 2) port map (CLK, RST, iBaudtick2x, iDCDNs, iDCDn);
|
UART_IF_RI: slib_input_filter generic map (SIZE => 4) port map (CLK, RST, iBaudtick2x, iRINs, iRIn);
|
UART_IF_RI: slib_input_filter generic map (SIZE => 2) port map (CLK, RST, iBaudtick2x, iRINs, iRIn);
|
|
|
-- Sync. input synchronization
|
-- Sync. input synchronization
|
UART_SIS: process (CLK, RST)
|
UART_SIS: process (CLK, RST)
|
begin
|
begin
|
if (RST = '1') then
|
if (RST = '1') then
|
Line 489... |
Line 490... |
iIIR_ID0 <= iIIR(1);
|
iIIR_ID0 <= iIIR(1);
|
iIIR_ID1 <= iIIR(2);
|
iIIR_ID1 <= iIIR(2);
|
iIIR_ID2 <= iIIR(3);
|
iIIR_ID2 <= iIIR(3);
|
iIIR_FIFO64 <= iIIR(5);
|
iIIR_FIFO64 <= iIIR(5);
|
iIIR(4) <= '0';
|
iIIR(4) <= '0';
|
iIIR(5) <= iFCR_FIFO64E;
|
iIIR(5) <= iFCR_FIFO64E when iFCR_FIFOEnable = '1' else '0';
|
iIIR(6) <= iFCR_FIFOEnable;
|
iIIR(6) <= iFCR_FIFOEnable;
|
iIIR(7) <= iFCR_FIFOEnable;
|
iIIR(7) <= iFCR_FIFOEnable;
|
|
|
-- Character timeout indication
|
-- Character timeout indication
|
UART_CTI: process (CLK, RST)
|
UART_CTI: process (CLK, RST)
|
Line 717... |
Line 718... |
iMSR_dDSR <= '1';
|
iMSR_dDSR <= '1';
|
elsif (iMSRRead = '1') then
|
elsif (iMSRRead = '1') then
|
iMSR_dDSR <= '0';
|
iMSR_dDSR <= '0';
|
end if;
|
end if;
|
-- Trailing edge RI
|
-- Trailing edge RI
|
if (iRInRE = '1') then
|
if (iRInFE = '1') then
|
iMSR_TERI <= '1';
|
iMSR_TERI <= '1';
|
elsif (iMSRRead = '1') then
|
elsif (iMSRRead = '1') then
|
iMSR_TERI <= '0';
|
iMSR_TERI <= '0';
|
end if;
|
end if;
|
-- Delta DCD
|
-- Delta DCD
|