This project implements a custom, synthesizable 16-bit UART (Universal Asynchronous Receiver-Transmitter) using pure Verilog.
Unlike standard 8-bit implementations, this core is designed for high-throughput 16-bit data transfer, making it ideal for FPGA-to-FPGA communication, soft-processor debugging, and precision sensor data acquisition.
The design features Even Parity error detection and a highly robust receiver architecture that uses Double-Flop Synchronization and Center-Sampling to reject noise and metastability.
All simulation waveforms, architectural diagrams, and test results are provided in the images/ directory.
The module is fully parametric, allowing easy configuration of CLK_FREQ and BAUD_RATE without hardware dividers.
- Transmits full 16-bit integers in a single frame (Standard UART is 8-bit).
- Frame Format:
Start Bit+16 Data Bits+Parity Bit+Stop Bit.
- Metastability Hardening: Uses a Double-Flip-Flop Synchronizer on the asynchronous
rxinput. - Noise Rejection: Samples data exactly in the middle of the baud period.
- Atomic Updates: Uses an internal "scratchpad" buffer to ensure
rx_datais only updated once the entire packet is verified (prevents output glitches).
- Even Parity: Automatically generates and checks parity bits.
- Framing Error: Validates the presence of the Stop Bit.
The UART is implemented as two independent, fully synthesizable modules.
- Type: Finite State Machine (FSM).
- States:
IDLE→START→DATA(Shift LSB first) →PARITY→STOP. - Logic: Latches input data on
tx_startand calculates parity dynamically using XOR reduction.
- Type: FSM with Oversampling Counter.
- Logic:
- Detects Start Bit (High-to-Low transition).
- Waits
HALF_BAUDto align with the center of the bit period. - Shifts bits into a temporary buffer.
- Updates output only if Parity and Stop Bit checks pass.
The project includes a self-checking testbench (tb.v) configured for loopback testing (TX output connected directly to RX input).
The simulation verifies the correct transmission of 16-bit words (e.g., 0xABCD and 0x1234) with accurate baud timing.
The testbench verifies data integrity and prints PASS confirmation to the TCL console.
UART-16bit-Verilog/
│
├── uart_tx.v # 16-bit Transmitter with Parity
├── uart_rx.v # 16-bit Receiver with Synchronizer
├── tb.v # Self-checking Loopback Testbench
│
├── images/ # Waveforms and Diagrams
│ ├── Timing.png # Simulation Waveform Result
│ └── Success.png # TCL Console Pass Log
│
└── README.md # Project Documentation

