The present invention relates to universal asynchronous receiver-transmitters (UARTs), and in particular to interrupt codes for such UARTs.
UARTs are used in many communications applications to convert data streams from parallel to serial, enabling a serial data stream to communicate with a central processing unit or CPU. UARTs have increased in complexity over the years, with a single UART being able to serve multiple channels. Interrupt registers have been provided for the different channels to flag certain events, such as line status, a ready time out, etc. Newer, more complex UARTs have had to be compatible with the codes used for the prior UARTs to maintain compatibility with drivers already in existence or other UARTs.
One feature that has been added to some UARTs is a bus interface, such as a PCI bus interface. A separate interrupt status register containing overall status for the multiple channels is included here, and is user accessible. Because of the need for backward compatibility, the same codes that have been used for interrupts are also used here and simply written into the interrupt register, which is accessible by the user over the bus. However, as the number of channels have increased, the number of register bits required for this has also increased, limiting what can be done in one general interrupt register.
The present invention provides an improved UART which has a number of channels, with each channel having a set of channel configuration registers. Each channel configuration register includes an interrupt source register. The interrupt source register has a multi-bit interrupt source code which is used to indicate the source of the interrupt. This code is chosen to be compatible with prior UART devices. The device also includes a bus interface, and a plurality of device configuration registers accessible through the bus interface by a user. One of the device configuration registers is an interrupt register which provides a user accessible code to indicate the interrupt source. The code used for the interrupt source is a compressed version of the multiple bit code used in the channel configuration interrupt source register. This compression allows more channels to be represented in a single register, while also conveying the interrupt source information quickly to the user. Since the device interrupt register in the configuration registers is for access by the user, rather than internal access by UART drivers, there is no need for compatibility with the prior UART drivers.
In a preferred embodiment, a 5-bit code compatible with the prior art codes is used in the channel configuration interrupt register. This is compressed to a 3-bit code for use in the device interrupt register. Preferably, a 32-bit device interrupt register is used, with three bits for each of eight channels. In addition, eight bits are provided to indicate which channel has an interrupt, with a single bit being used for this purpose for each channel. This invention in this embodiment is applicable to a PCI bus.
Directly accessible by the PCI local bus interface 26 are a series of device configuration registers 30.
The device interrupt register contains three bits indicating the source of the interrupt for each of the channels as indicated.
The interrupt status register supports two interrupt schemes. The first scheme is an 8-bit indicator representing all eight channels with each bit representing each channel from 0 to 7. This permits the interrupt routine to quickly vector and serve that UART channel and determine the sources(s) in each individual routines. INTO bit-0 represents the interrupt status for UART channel 0 when its transmitter, receiver, line status, or modem port status requires service. Other bits in the INTO register provide indication for the other channels with bit-7 representing UART channel 7, respectively.
The second scheme provides detail about the source of the interrupts for each UART channel. All the interrupts are encoded into a 3-bit code. This 3-bit code represents seven interrupts corresponding to an individual UART's transmitter, receiver, line status, modem port status. INT1, INT2 and INT3 registers provide the 24-bit interrupt status for all eight channels. Bits 8, 9 and 10 representing channel 0 and bits 29, 30 and 31 representing channel 7, respectively. All eight channel interrupts status are available with a single DWORD read operation. This feature allows the host to quickly vector and serve the interrupts, reducing the service interval, and hence reduce the host bandwidth requirement.
INTO [7:0] Channel Interrupt Indicator. Each bit gives an indication of the channel that has requested service. Bit-0 represents channel 0 and bit-7 indicates channel 7. Logic one indicates the channel N [7:0] has called for service. The interrupt bit clears after reading the appropriate register of the interrupting channel register.
INT3, INT2 and INT1 [32:8] form a 24-bit encoded interrupt indicator. Each channel's interrupt is encoded into three bits for receive, transmit, and status. Bit [10:8] represents channel 0 and go up to channel 7 with bits [31:29]. The 3-bit encoding and their priority order are shown in
As will be understood by those of skill in the art, the present invention may be embodied in other specific forms without departing from the essential characteristics thereof. Accordingly, the foregoing description is intended to be illustrative, but not limiting, of the scope of the invention which is set forth in the following claims.
Number | Name | Date | Kind |
---|---|---|---|
4788639 | Tamaru | Nov 1988 | A |
4949333 | Gulick et al. | Aug 1990 | A |
5619544 | Lewis et al. | Apr 1997 | A |
5857108 | Hong | Jan 1999 | A |
6038294 | Tran et al. | Mar 2000 | A |
6272452 | Wu et al. | Aug 2001 | B1 |
6470404 | Kim | Oct 2002 | B1 |
Number | Date | Country |
---|---|---|
0 535 821 | Apr 1993 | EP |
0 632 391 | Jan 1995 | EP |