ds748_axi_uart16550
ds748_axi_uart16550
ds748_axi_uart16550
(v1.01a)
DS748 July 25, 2012 Product Specification
© Copyright 2010–2012 Xilinx, Inc. Xilinx, the Xilinx logo, Artix, ISE, Kintex, Spartan, Virtex, Vivado, Zynq, and other designated brands included herein are
trademarks of Xilinx in the United States and other countries. AMBA and ARM are trademarks of ARM in the EU and other countries. All other trademarks are the
property of their respective owners.
Functional Description
The AXI UART 16550 implements the hardware and software functionality of the National Semiconductor 16550
UART, which works in both the 16450 and 16550 UART modes. For complete details, see the National
Semiconductor data sheet.
The AXI UART 16550 performs parallel to serial conversion on characters received from the AXI master and serial
to parallel conversion on characters received from a modem or serial peripheral.
The AXI UART 16550 is capable of transmitting and receiving 8, 7, 6, or 5 bit characters, with 2, 1.5 or 1 stop bits and
odd, even or no parity. The AXI UART 16550 can transmit and receive independently.
The device can be configured and its status monitored by the internal register set. The AXI UART 16550 is capable
of signaling receiver, transmitter and modem control interrupts. These interrupts can be masked, are prioritized
and can be identified by reading an internal register.
The device contains a 16-bit, programmable, baud rate generator, and independent 16 character length transmit and
receive FIFOs. The FIFOs can be enabled or disabled through software control.
The top-level block diagram for the AXI UART 16550 is shown in Figure 1.
X-Ref Target - Figure 1
3ERIAL
!8) ,ITE !8) )0)# 5!24
)NTERFACE )0)#?)& )NTERFACE
)NTERFACE )NTERFACE 5!24
)NTERFACE -ODULE
-ODEM
)NTERFACE
$3?
)0).4#?)RPT
&REEZE
5!24
2XRDY.
"US)0?#LK 2CLK
2ECEIVER
"US)0?2ESET 2"2 &)&/ 3IN
4(2 &)&/
3OUT
WR
!8) )NTERFACE -ODULE
4XRDY.
)0)#?)&
4RANSMITTER

RD
,#2
!8) ,ITE ,32
)0"US?!CK )%2
)NTERFACE "AUDOUT.
)0"US?%RROR ))2
.OTE
5!24 MODE DOES NOT SUPPORT THE &)&/S
5!24 MODE DOES NOT SUPPORT THE  $3?
Interrupts
The AXI UART 16550 core provides separate interrupt enable and interrupt identification registers. If interrupts are
enabled, a level sensitive interrupt is generated for these conditions:
• Receiver line status
• Received data available
• Character Timeout
• Transmitter holding register empty
• Modem status
Character Timeout
The Character Timeout interrupt is generated when no character has been removed from, or input to, the receiver
FIFO during the last 4 character time and there is at least one character in the FIFO during this time. The character
time considered for timeout (Start + 8 bit data + Parity + 2 Stop bit) is constant for all configurations. This interrupt
is cleared by reading Receiver Buffer Register.
Modem Status
This interrupt is generated for these modem status conditions:
• Clear to send
• Data Set Ready
• Ring Indicator
• Data Carrier Detect
This interrupt is cleared by reading the Modem Status Register.
I/O Signals
The I/O signals are listed and described in Table 1.
Table 1: I/O Signals
Initial
Port Signal Name Interface I/O Description
State
System Signals
P1 S_AXI_ACLK System I - AXI Clock
P2 S_AXI_ARESETN System I - AXI Reset signal, active-Low
Device interrupt output to microprocessor interrupt input
P3 IP2INTC_Irpt System O 0
or system interrupt controller (active-High)
P4 Freeze System I - Freezes UART for software debug (active-High)
AXI Write Address Channel Signals
S_AXI_AWADDR[C_S_AXI_ AXI Write address. The write address bus gives the
P5 AXI I -
ADDR_WIDTH-1:0] address of the write transaction.
Write address valid. This signal indicates that valid write
P6 S_AXI_AWVALID AXI I -
address is available.
Write address ready. This signal indicates that the slave
P7 S_AXI_AWREADY AXI O 0
is ready to accept an address.
AXI Write Channel Signals
S_AXI_WDATA[C_S_AXI_
P8 AXI I - Write data
DATA_WIDTH - 1: 0]
S_AXI_WSTB[C_S_AXI_ Write strobes. This signal indicates which byte lanes to
P9 AXI I -
DATA_WIDTH/8-1:0] (1) update in memory.
Write valid. This signal indicates that valid write data and
P10 S_AXI_WVALID AXI I -
strobes are available.
Write ready. This signal indicates that the slave can
P11 S_AXI_WREADY AXI O 0
accept the write data.
AXI Write Response Channel Signals
Write response. This signal indicates the status of the
write transaction.
P12 S_AXI_BRESP[1:0](2) AXI O 0
“00“ - OKAY
“10“ - SLVERR
Write response valid. This signal indicates that a valid
P13 S_AXI_BVALID AXI O 0
write response is available.
Response ready. This signal indicates that the master
P14 S_AXI_BREADY AXI I -
can accept the response information.
AXI Read Address Channel Signals
S_AXI_ARADDR[C_S_AXI_ Read address. The read address bus gives the address
P15 AXI I -
ADDR_WIDTH -1:0] of a read transaction.
Read address valid. When High, this signal indicates that
the read address is valid and remains stable until the
P16 S_AXI_ARVALID AXI I -
address acknowledgement signal, S_AXI_ARREADY, is
High.
Read address ready. This signal indicates that the slave
P17 S_AXI_ARREADY AXI O 1
is ready to accept an address.
Notes:
1. This signal is not used. The AXI UART 16550 assumes that all byte lanes are active.
2. For these signals, the IP core does not generate the Decode Error (“11”) response. Other responses such as “00” (OKAY) and “10”
(SLVERR) are generated by the core based on certain conditions.
Design Parameters
To allow the user to create an AXI UART 16550 that is uniquely tailored for the user’s system, certain features are
parameterizable in the AXI UART 16550 design. This allows the user to have a design that utilizes only the
resources required by the system and runs at the highest possible performance. The parameterizable features in the
AXI UART 16550 core are as shown in Table 2.
In addition to the parameters listed in this table, there are also parameters that are inferred for each AXI interface in
the EDK tools. Through the design, these EDK-inferred parameters control the behavior of the AXI Interconnect.
For a complete list of the interconnect settings related to the AXI interface, see DS768, AXI Interconnect IP Data Sheet.
Table 2: Design Parameters
Generic Parameter Description Parameter Name Allowable Values Default Value VHDL
Type
System Parameters
virtex7, kintex7,
G1 Target FPGA family C_FAMILY artix7, zynq, virtex6 string
virtex6,spartan6
System clock frequency (in integer 100_
G2 Hz) driving the 16550 UART C_S_AXI_ACLK_FREQ_HZ 000_ integer
peripheral (ex.100000000) 000
AXI Parameters
G3 AXI address bus width C_S_AXI_ADDR_WIDTH 13 13 integer
G4 AXI data bus width C_S_AXI_DATA_WIDTH 32 32 integer
16550 UART Interface
0: xin is open(1)(2)
G5 External xin clock C_HAS_EXTERNAL_XIN 1: xin is externally 0 integer
driven
0 : rclk is open
G6 External Receiver clock C_HAS_EXTERNAL_RCLK 1 : rclk is externally 0 integer
driven
0 : 16450 mode
G7 Select 16450/16550 UART C_IS_A_16550 1 integer
1 : 16550 mode
Notes:
1. When C_HAS_EXTERNAL_XIN=0, this core uses S_AXI_ACLK as a reference clock for the baud calculation. User must use
S_AXI_ACLK frequency to calculate baud divisor value for DLL and DLM register configuration.
2. The external xin input clock must be less than half of S_AXI_ACLK.
3. External xin clock frequency. User must configure this parameter when external xin is used. (C_HAS_EXTERNAL_XIN is ‘1’).
Register Descriptions
AXI 16550 Interface
The internal registers of the AXI UART 16550 are offset from the base address C_BASEADDR. Additionally, some
of the internal registers are accessible only when bit 7 of the Line Control Register (LCR) is set. The AXI UART 16550
internal register set is described in Table 4.
Table 4: Registers
Register Name LCR(7) + Address Access
Receiver Buffer Register (RBR) 0 + 0x1000 Read
Transmitter Holding Register (THR) 0 + 0x1000 Write
Interrupt Enable Register (IER) 0 + 0x1004 Read/Write
Interrupt Identification Register (IIR) 0 + 0x1008 Read
FIFO Control Register (FCR)(3) X + 0x1008 Write
FIFO Control Register(2) (3) 1 + 0x1008 Read
Line Control Register (LCR) X(1) + 0x100C Read/Write
Modem Control Register (MCR) X(1) + 0x1010 Read/Write
Line Status Register (LSR) X(1) + 0x1014 Read/Write
Modem Status Register (MSR) X(1) + 0x1018 Read/Write
Scratch Register (SCR) X(1) + 0x101C Read/Write
Divisor Latch (Least Significant Byte) Register (DLL) 1 + 0x1000 Read/Write
Divisor Latch (Most Significant Byte) Register (DLM) 1 + 0x1004 Read/Write
Notes:
1. X denotes a ‘don’t care’
2. FIFO Control Register is write-only in the National PC16550D
3. 16450 UART mode implementation does not include this register
Register Logic
This section tabulates the internal AXI UART 16550 registers, including their reset values (if any). See the National
Semiconductor PC16550D UART with FIFOs data sheet (June, 1995) for a more detailed description of the register
behavior.
2ESERVED 2"2
$3?
2ESERVED 4(2
$3?
%,3) %2"&)
$3?
$3?
Notes:
1. Bits are always zero in 16450 UART mode
2. Reading these bits always return "00"
3. If INTPEND = ’0’, interrupt is pending. See National Semiconductor PC16550D data sheet for more details
4. Line status interrupt is generated for framing, parity, overrun error and break condition.
Notes:
1. FCR is not included in 16450 UART mode
3TICK
2ESERVED $,!" 0ARITY 0%. 7,3
Notes:
1. Reading these bits always returns "000".
4%-4 ") 0% $2
$3?
Notes:
1. The error is reported until the last character containing an error in the FIFO is read out of the FIFO.
Notes:
1. X represents bit driven by external input
Scratch Register
This 32-bit write/read register is shown in Figure 12. The Scratch Register can be used to hold user data. The bit
definitions for the register are shown in Table 15. The offset and accessibility of this register value is shown in
Table 4.
X-Ref Target - Figure 12
2ESERVED 3CRATCH
$3?
2ESERVED $,,
$3?
Table 16: Divisor Latch (Least Significant Byte) Register Bit Definitions
Bit Name Access Reset Value Description
31-8 Reserved N/A N/A Reserved
7-0 DLL Read/Write "XXXXXXXX"(1) Divisor Latch Least Significant Byte
Notes:
1. On reset, the DLL gets configured for 9600 baud. The DLL reset value, [LSB(divisor)] is calculated from the formula, divisor =
C_S_AXI_ACLK_FREQ/(16 x 9600)).
2ESERVED $,,
$3?
Notes:
1. On reset, the DLM gets configured for 9600 baud. The DLM reset value, [MSB(divisor)] is calculated from the formula, divisor =
(C_S_AXI_ACLK_FREQ/(16 x 9600)).
Example 1
An example use of the AXI UART 16550 with the operating mode set to the following parameters in 16550 mode is
outlined in the subsequent numbered steps.
• Baud rate: 56Kbps
• System clock: 100 Mhz (C_HAS_EXTERNAL_XIN = 0)
• Enabled and Threshold settings for the FIFO receive buffer.
• Format of asynchronous data exchange 8 data bits, Even parity and 2 stop bits
1. Write 0x0000_0080 to Line Control Register. This configures the DLAB bit, which allows the writing into the
Divisor Latch’s Least significant and Most significant bytes.
2. Write 0x0000_006F to Divisor Latch’s Least significant byte and write 0x0000_0000 to Divisor Latch’s Most
significant byte in that order. This configures the baud rate setup of UART to 56Kbps operation. The divisor
value is calculated by using following formula:
divisor = (C_S_AXI_ACLK_FREQ/(16 × Baud Rate))
3. Write 0x0000_001F to Line Control Register. This configures word length to 8 bits, Number of Stop Bits to 2,
Parity is enabled and set to Even parity and DLAB bit is set to value 0 to enable the use of Transmit Holding
register and Receive Buffer register data for transmitting and reception of data.
4. Write 0x0000_0011 to Interrupt Enable Register. This enables the Transmitter holding register empty interrupt
and Receive data available interrupt.
5. Write the buffer to Transmit Holding register and read the data received from Receive Holding register by
servicing the interrupts generated.
Example 2
An example use of the AXI UART 16550 when external xin clock is used (C_HAS_EXTERNAL_XIN = 1) with the
operating mode set to the following parameters in 16550 mode outlined in the subsequent numbered steps.
• Baud rate: 56Kbps
• System clock: 100 Mhz
• External xin clock: 1.8432 Mhz
• Enabled and Threshold settings for the FIFO receive buffer.
• Format of asynchronous data exchange 8 data bits, Even parity and 2 stop bits
1. Write 0x0000_0080 to Line Control Register. This configures the DLAB bit which allows the writing into the
Divisor Latch’s Least significant and Most significant bytes.
2. Write 0x0000_0002 to the Divisor Latch’s Least significant byte and write 0x0000_0000 to Divisor Latch’s Most
significant byte in that order. This configures the baud rate setup of the UART to 56Kbps operation. Other steps
remain the same as shown in the previous example.
3. Write 0x0000_001F to Line Control Register. This configures word length to 8 bits, Number of stop bits to 2,
Parity is enabled and set to Even parity, and DLAB bit is set to value 0 to enable the use of Transmit Holding
register and Receive buffer register data for transmitting and reception of data.
4. Write 0x0000_0011 to Interrupt Enable Register. This enables the Transmitter holding register empty interrupt
and Receive data available interrupt.
5. Write the buffer to Transmit Holding register and read the data received from Receive Holding register by
servicing the interrupts generated.
Design Implementation
Target Technology
The intended target technology is an FPGA listed in the Supported Device Family field of the LogiCORE IP Facts
Table.
The AXI UART 16550 resource utilization for various parameter combinations measured with the Virtex-7 FPGA as
the target device are detailed in Table 18. For more information, see DS180 7 Series FPGAs Overview..
Table 18: Performance and Resource Utilization Benchmarks on the Virtex-7 FPGA (xc7v855tffg1157-3)
Parameter Values Device Resources Performance
C_HAS_EXTERNAL_RCLK
C_HAS_EXTERNAL_XIN
Slice Flip-Flops
C_IS_A_16550
FMAX (MHz)
Slices
LUTs
0 0 0 168 285 360 264
0 0 1 131 237 256 201
0 1 0 118 237 265 201
0 1 1 119 243 274 201
1 0 0 168 285 360 264
1 0 1 167 286 365 205
1 1 0 167 286 395 236
1 1 1 181 289 398 230
The AXI UART 16550 resource utilization for various parameter combinations measured with the Artix-7 FPGA as
the target device are detailed in Table 19. For more information, see DS180 7 Series FPGAs Overview..
Table 19: Performance and Resource Utilization Benchmarks on the Artix-7(1) FPGA and Zynq-7000
Device(2)
Parameter Values Device Resources Performance
C_HAS_EXTERNAL_RCLK
C_HAS_EXTERNAL_XIN
Slice Flip-Flops
C_IS_A_16550
FMAX (MHz)
Slices
LUTs
0 0 0 169 285 400 200
0 0 1 112 241 278 201
0 1 0 116 237 270 201
0 1 1 125 243 271 202
1 0 0 169 285 400 200
1 0 1 163 286 391 201
1 1 0 174 286 398 201
1 1 1 151 291 401 201
The AXI UART 16550 resource utilization for various parameter combinations measured with the Kintex-7 FPGA as
the target device are detailed inTable 20. For more information, see DS180 7 Series FPGAs Overview.
Table 20: Performance and Resource Utilization Benchmarks on the Kintex-7(1) FPGA and Zynq-7000
Device(2)
Parameter Values Device Resources Performance
C_HAS_EXTERNAL_RCLK
C_HAS_EXTERNAL_XIN
Slice Flip-Flops
C_IS_A_16550
FMAX (MHz)
Slices
LUTs
0 0 0 166 285 361 209
0 0 1 121 237 260 209
0 1 0 114 237 268 204
0 1 1 120 243 264 241
1 0 0 166 285 364 209
1 0 1 184 286 359 202
1 1 0 161 286 396 221
1 1 1 164 289 399 229
The AXI UART 16550 resource utilization for various parameter combinations measured with the Spartan-6 FPGA
as the target device are detailed in Table 21.For more information, see DS160 Spartan-6 Family Overview.
Table 21: Performance and Resource Utilization Benchmarks on the Spartan-6 FPGA (xc6slx16-csg324-2)
Parameter Values Device Resources Performance
C_HAS_EXTERNAL_RCLK
C_HAS_EXTERNAL_XIN
Slice Flip-Flops
C_IS_A_16550
FMAX (MHz)
Slices
LUTs
0 0 0 115 229 250 110
0 0 1 109 230 260 110
0 1 0 120 239 292 110
0 1 1 128 237 277 110
1 0 0 160 279 348 110
1 0 1 145 281 351 110
1 1 0 162 291 388 110
1 1 1 134 281 363 110
The AXI UART 16550 resource utilization for various parameter combinations measured with the Virtex-6 FPGA as
the target device are detailed in Table 22. For more information, see DS150 Virtex-6 Family Overview. .
Table 22: Performance and Resource Utilization Benchmarks on the Virtex-6 FPGA (xc6vlx75t-ff784-1)
Parameter Values Device Resources Performance
C_HAS_EXTERNAL_RCLK
C_HAS_EXTERNAL_XIN
Slice Flip-Flops
C_IS_A_16550
FMAX (MHz)
Slices
LUTs
0 0 0 120 230 254 200
0 0 1 124 231 247 200
0 1 0 128 231 277 200
0 1 1 131 233 266 200
1 0 0 159 280 380 200
1 0 1 162 281 372 200
1 1 0 158 281 393 200
1 1 1 175 288 395 200
System Performance
To measure the system performance (FMAX) of the AXI UART 16550 core, it was added as the Device Under Test
(DUT) to a Virtex-6 FPGA system as shown in Figure 15 and to a Spartan-6 FPGA system as shown in Figure 16.
Because the AXI UART 16550 core is used with other design modules in the FPGA, the utilization and timing
numbers reported in this section are estimates only. When this core is combined with other designs in the system,
the utilization of FPGA resources and timing of the design varies from the results reported here.
X-Ref Target - Figure 15
6IRTEX ,8 &0'!
!8) #$-!
$?,-"
)?,-" $0 $EVICE 5NDER
4EST $54
#ONTROL !8) ).4#
)NTERFACE
3UBSET
)NTERCONNECT !8) '0)/ ,%$S
"2!- !8) ,ITE
#ONTROLLER
!8) 5!24,ITE 23
-$-
$3?
Figure 15: Virtex-6 LX FPGA System with the AXI UART 16550 as the DUT
6IRTEX ,8 &0'!
!8) #$-!
$?,-"
)?,-" $0 $EVICE 5NDER
4EST $54
#ONTROL !8) ).4#
)NTERFACE
3UBSET
)NTERCONNECT !8) '0)/ ,%$S
"2!- !8) ,ITE
#ONTROLLER
!8) 5!24,ITE 23
-$-
$3?
Figure 16: Spartan-6 LXT FPGA System with the AXI UART 16550 as the DUT
The target FPGA was then filled with logic to drive the LUT and block RAM utilization to approximately 70% and
the I/O utilization to approximately 80%. Using the default tool options and the slowest speed grade for the target
FPGA, the resulting target FMAX numbers are shown in Table 23.
Table 23: AXI UART 16550 FPGA System Performance
Target FPGA Target FMAX (MHz)
V6LX130t-1 180
S6LX45t-2 110
The target FMAX is influenced by the exact system and is provided for guidance. It is not a guaranteed value across
all systems.
Specification Exceptions
FIFO Control Register
The FIFO control register has been made read/write. Read access is controlled by setting Line Control Register bit 7.
System Clock
The asynchronous microprocessor interface of the National Semiconductor PC16550D is synchronized to the
system clock input of the UART.
XIN Clock
If the xin input is driven externally, then the xin clock must be less than or equal to half of the system clock. (that is,
xin ≤ (S_AXI_ACLK/2)). This is mandatory for the proper functioning of the core.
Register Addresses
All internal registers reside on 32- bit word boundaries, not on 8-bit byte boundaries.
Support
Xilinx provides technical support for this LogiCORE™ IP product when used as described in the product
documentation. Xilinx cannot guarantee timing, functionality, or support of product if implemented in devices that
are not defined in the documentation, if customized beyond that allowed in the product documentation, or if
changes are made to any section of the design labeled DO NOT MODIFY.
Reference Documents
The listed documents contain reference information that is important for understanding the UART design:
1. National Semiconductor PC16550D UART with FIFOs data sheet (June, 1995)
(www.datasheetsite.com/datasheet/PC16550D)
2. ARM AMBA Protocol Version: 2.0 Specification
For support resources such as Answers, Documentation, Downloads, and Forums, see the Xilinx Support website
at: www.xilinx.com/support.
For a glossary of technical terms used in Xilinx documentation, see: www.xilinx.com/company/terms.htm.
Revision History
Date Version Revision
9/21/10 1.0 Initial Xilinx release.
12/14/10 2.0 Updated for core version 1.01a.
06/22/11 2.1 Updated to ISE 13.2. Updated for Artix-7, Virtex-7, and Kintex-7.
• Updated to 14.2/2012.2 tools
07/25/12 2.2 • Updated with Vivado design tools and Zynq-7000 device information
• Removed the AXI parameters, C_BASEADDR and C_HIGHADDR
Notice of Disclaimer
The information disclosed to you hereunder (the “Materials”) is provided solely for the selection and use of Xilinx products. To
the maximum extent permitted by applicable law: (1) Materials are made available “AS IS” and with all faults, Xilinx hereby
DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT
LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR
PURPOSE; and (2) Xilinx shall not be liable (whether in contract or tort, including negligence, or under any other theory of
liability) for any loss or damage of any kind or nature related to, arising under, or in connection with, the Materials (including
your use of the Materials), including for any direct, indirect, special, incidental, or consequential loss or damage (including loss
of data, profits, goodwill, or any type of loss or damage suffered as a result of any action brought by a third party) even if such
damage or loss was reasonably foreseeable or Xilinx had been advised of the possibility of the same. Xilinx assumes no
obligation to correct any errors contained in the Materials or to notify you of updates to the Materials or to product
specifications. You may not reproduce, modify, distribute, or publicly display the Materials without prior written consent.
Certain products are subject to the terms and conditions of the Limited Warranties which can be viewed at
http://www.xilinx.com/warranty.htm; IP cores may be subject to warranty and support terms contained in a license issued to
you by Xilinx. Xilinx products are not designed or intended to be fail-safe or for use in any application requiring fail-safe
performance; you assume sole risk and liability for use of Xilinx products in Critical Applications:
http://www.xilinx.com/warranty.htm#critapps.