This lab implements a UART (Universal Asynchronous Receiver-Transmitter) protocol for serial communication using Verilog on the Nexys A7-100T FPGA board. The goal is to design and verify a Transmitter (Tx) and Receiver (Rx) to transfer four 8-bit symbols (AA, 55, CC, 89) asynchronously. The system uses a 100 MHz clock, adjustable baud rates (300–115200 bps), and includes start, stop, and parity bits for data integrity.
- Board: Nexys A7-100T
- Clock: 100 MHz (10 ns period)
- Protocol: UART (8-bit data, no flow control)
- Description: Implements a controller to set a common baud rate for Tx and Rx, ensuring synchronized communication despite independent clocks.
- Implementation: Uses a 3-bit
baud_selectinput to choose rates (300–115200 bps). Calculates clock cycles (max_cycles = f_clk / (16 * Baud_Rate)) with a 15-bit counter and outputssample_ENABLEsignal when the counter hits the target size. - Verification: Testbench checks
sample_ENABLEtoggles correctly for differentbaud_selectvalues, resetting before each change. Waveforms confirm periodic activation aligned with baud rates.
- Description: Serializes 8-bit symbols with start, parity, and stop bits for transmission.
- Implementation: Top module
uart_transmitteruses a baud controller and FSM (Tx_FSM) with states: idle, start, trans, parity, stop. Inputs includeTx_DATA(8-bit symbol),Tx_EN, andTx_WR; outputs areTxD(serial data) andTx_BUSY(transmission status). - Verification: Testbench sets
baud_select = 111(115200 bps) andTx_DATA = 10101010. Waveforms show state transitions (idle to stop), correct bit shifting, even parity (0), and return to idle after reset.
- Description: Samples serial data, validates it, and stores correct 8-bit symbols.
- Implementation: Top module
uart_receiverintegrates the baud controller and FSM (Rx_FSM) with states: idle, start, trans, parity, stop. Inputs includeRxD(from TxD); outputs areRx_DATA(8-bit symbol),Rx_VALID,Rx_PERROR(parity error), andRx_FERROR(framing error). Samples at 16x baud rate. - Verification: Testbench verifies center sampling, error detection (PERROR/FERROR), and
Rx_DATAstability. Waveforms show successful data receipt when error-free, and error signals active with parity or framing issues.
- Description: Combines Tx and Rx for end-to-end serial transfer of four symbols.
- Implementation: Integrates
uart_transmitteranduart_receivermodules, connectingTxDtoRxD. - Verification: Testbench sends four symbols (AA, 55, CC, 89) using a simple FSM to trigger
Tx_WRwhenTx_BUSY = 0. Waveforms confirmRx_DATAmatchesTx_DATAwith a delay, and no errors occur, validating the system.
- Clone this repository.
- Open in Vivado.
- Synthesize, implement, and generate bitstreams for each part.
- Program the Nexys A7-100T and verify with testbenches.