==========================================
|
==========================================
|
UART16750 (C) 2008-2009 Sebastian Witt
|
UART16750 (C) 2008-2009 Sebastian Witt
|
==========================================
|
==========================================
|
|
|
Description:
|
Description:
|
|
|
Implements a synthesizable 16550/16750 UART core.
|
Implements a synthesizable 16550/16750 UART core.
|
|
|
Features:
|
Features:
|
|
|
- Full synchronous design
|
- Full synchronous design
|
- Pin compatible to 16550/16750
|
- Pin compatible to 16550/16750
|
- Register compatible to 16550/16750
|
- Register compatible to 16550/16750
|
- Baudrate generator with clock enable
|
- Baudrate generator with clock enable
|
- Supports 5/6/7/8 bit characters
|
- Supports 5/6/7/8 bit characters
|
- None/Even/Odd parity bit generation and detection
|
- None/Even/Odd parity bit generation and detection
|
- Supports 1/1.5/2 stop bit generation
|
- Supports 1/1.5/2 stop bit generation
|
- 16/64 byte FIFO mode
|
- 16/64 byte FIFO mode
|
- Receiver FIFO trigger levels 1/4/8/14/16/32/56
|
- Receiver FIFO trigger levels 1/4/8/14/16/32/56
|
- Control lines RTS/CTS/DTR/DSR/DCD/RI/OUT1/OUT2
|
- Control lines RTS/CTS/DTR/DSR/DCD/RI/OUT1/OUT2
|
- Automatic flow control with RTS/CTS
|
- Automatic flow control with RTS/CTS
|
- All interrupts sources/modes
|
- All interrupts sources/modes
|
|
|
Todo:
|
Todo:
|
|
|
- Variable character time-out counter
|
- Variable character time-out counter
|
- DMA control
|
- DMA control
|
|
|
Tests:
|
Tests:
|
|
|
A script is used to create a extensive functional stimuli file which
|
A script is used to create a extensive functional stimuli file which
|
can be used for simulation or real-hardware testing.
|
can be used for simulation or real-hardware testing.
|
The core was synthesized on a Altera Cyclone II, connected to x86
|
The core was synthesized on a Altera Cyclone II, connected to x86
|
standard hardware and than tested with standard OS drivers from:
|
standard hardware and than tested with standard OS drivers from:
|
|
|
- Linux 2.2/2.4/2.6
|
- Linux 2.2/2.4/2.6
|
- Windows 2000/XP/Vista
|
- Windows 2000/XP/Vista
|
- *BSD
|
- *BSD
|
- *DOS
|
- *DOS
|
|
|
Files:
|
Files:
|
|
|
uart_16750.vhd: Top level file
|
uart_16750.vhd: Top level file
|
uart_receiver.vhd: UART receiver part
|
uart_receiver.vhd: UART receiver part
|
uart_transmitter.vhd: UART transmitter part
|
uart_transmitter.vhd: UART transmitter part
|
uart_baudgen.vhd: Baudrate generator
|
uart_baudgen.vhd: Baudrate generator
|
uart_interrupt.vhd: Interrupt register and generation
|
uart_interrupt.vhd: Interrupt register and generation
|
|
|
The FIFO implementation should be replaced for the specific device.
|
The FIFO implementation should be replaced for the specific device.
|
In slib_fifo.vhd is a generic FIFO (for simulation), slib_fifo_cyclone2.vhd
|
In slib_fifo.vhd is a generic FIFO (for simulation), slib_fifo_cyclone2.vhd
|
can be used for a Altera Cyclone II.
|
can be used for a Altera Cyclone II.
|
|
|
Rules for FIFO generation with vendor tools:
|
Rules for FIFO generation with vendor tools:
|
|
|
The top-word is always available at the output (no read-request/delay).
|
The top-word is always available at the output (no read-request/delay).
|
|
|
Resource usage:
|
Resource usage:
|
|
|
* Altera Cyclone II
|
* Altera Cyclone II
|
o 440 LE
|
o 440 LE
|
o 1216 memory bits
|
o 1216 memory bits
|
o Frequency: 130 MHz
|
o Frequency: 130 MHz
|
|
|
* Xilinx Spartan 3E
|
* Xilinx Spartan 3E
|
o 378 Slices
|
o 378 Slices
|
o 1 RAMB
|
o 1 RAMB
|
o Frequency: 100 MHz
|
o Frequency: 100 MHz
|
|
|
Simulation:
|
Simulation:
|
|
|
It's possible to simulate and test the design with GHDL [1].
|
It's possible to simulate and test the design with GHDL [1].
|
A Makefile is available for starting the simulation. The testbench
|
A Makefile is available for starting the simulation. The testbench
|
creates a log file (uart_log.txt).
|
creates a log file (uart_log.txt).
|
|
|
[1] http://ghdl.free.fr
|
[1] http://ghdl.free.fr
|
|
|