-
Notifications
You must be signed in to change notification settings - Fork 35
Asynchronous serial receiver unit
Juan Gonzalez-Gomez edited this page Dec 17, 2015
·
30 revisions
Asynchronous serial receiver unit for the Icestick board, synthetized with Opensource Icestorm tools
- Baudrates: 300, 600, 300, 600, 1200, 4800, 9600, 19200, 38400, 115200
- Clock frequency: 12Mhz
- Start bits: 1
- Data bits: 8
- Parity: None
- Stop bits: 1
- Description language: Verilog
- Toolchain: Opensource: Yosys, Arachne-pnr, Icestorm project
Serial packages consist of three parts: the start bit, the 8-bit data and the stop bit
Example of the serial package for the K character (ASCII 0x4B: Binary: 01001011)
The serial receiver is encapsulated in the uart-rx entity
The receiver unit has 3 inputs and 2 outputs:
-
Inputs:
- clk: System clock (12MHz in the ICEstick board)
- rstn: Active low. When rstn is 0, the serial unit is reset (synchronous reset)
- rx: Serial input. The serial packages are received from this input
-
Outputs:
- data: 8-bit data to transmit
- rcv: Character received. When a new character is received, a pulse of duration 1 clock cycle is emitted, so that it can be used for capturing the data.
The step for receiving a character are the following:
- Wait until the rcv signal is 1. It will remains 1 only during 1 system clock cycle
- Capture the character (8 bits) from the data output
- Repeat the process