Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Communication Series P1 : UART, SPI and I2C in Verilog
Rating: 4.3 out of 5(373 ratings)
3,584 students

Communication Series P1 : UART, SPI and I2C in Verilog

A Step-by-Step Guide
Created byKumar Khandagle
Last updated 6/2024
English

What you'll learn

  • Essential principles of UART, SPI, and I2C.
  • Implementation of UART 16550A, PMOD DA4.
  • Different Modes of SPI, Daisy Chain Configuration of SPI.
  • Bit Banging

Course content

3 sections94 lectures7h 22m total length
  • Communication Series Overview1:46

    Explore the eight-course FPGA communication series, starting with UART, SPI, and I2C, then cover high-speed Ethernet, PCI, CAN, and related bus protocols.

  • Interfaces Classification6:19

    Explore how interfaces are classified as simplex or duplex, half- or full-duplex, serial or parallel, and point-to-point, multi-drop, or multipoint, with UART, SPI, and I2C as examples.

  • Overview3:50

    Learn how UART enables asynchronous communication with start, parity, and stop bits, and implement a simplified 16550-style core with a 16-byte fifo and TX/RX logic at a fixed baud rate.

  • Simple UART TX12:42

    Develop and verify a simple Verilog UART transmitter and receiver, detailing idle high, start bit, LSB-first eight-bit data, stop bit, and baud-rate timing within a verification environment.

  • Simple UART RX3:06

    the uart rx uses an independent clock generator, starts when rx goes low, shifts in eight bits (lsb first) to form rx data, within a uart top module for verification.

  • Simple UART TB4:40

    Create and validate a simple uart testbench that connects inputs and outputs to the DUT, runs ten random transmissions on the N_TX line, and verifies TX and RX data.

  • Design Code1:14
  • TB Code0:33
  • UART 16550A Overview5:52

    Examine a verilog-based uart 16550 implementation focusing on basic functionality. Develop tx and rx FIFOs of 16 bytes, registers, baud generator, and transmitter/receiver logic, with start, stop, and parity framing.

  • UART 16550 : FIFO P13:59

    Implement a 16-depth, 8-bit fifo for a 16550 uart with push_in and pop_in, D_in and D_out, and a 4-bit threshold that triggers an interrupt, tracking empty, full, underrun, overrun.

  • UART 16550 : FIFO P26:34

    Designs a Verilog fifo module named p4 top with 8-bit data and 16-depth memory. Implements empty and full flags and gates push/pop with asynchronous reset to prevent overrun and underrun.

  • UART 16550 : FIFO P34:27

    Learn how to update a UART fifo: manage push and pop with write and read addresses, handle full and empty flags, shift memory on reads, and keep D out synchronized.

  • UART 16550 : FIFO P42:24

    Implement underrun, overrun, and threshold logic for a UART fifo in Verilog, using empty and full flags with push and pop and an XOR-based threshold, plus a simple testbench.

  • FIFO TB4:14

    Demonstrate the fifo testbench setup and run 20 write and 20 read transactions to observe full, empty, overrun, threshold at 10 with d_in/d_out data comparison.

  • Design Code1:15
  • Testbench Code0:26
  • UART 16550 TX : Understanding Oversampling in Baud Generator7:29

    The lecture details transmitter operation driven by the line control register and explains oversampling choices of 16x or 13x with a programmable baud rate generator forming the baud clock.

  • UART 16550 TX : LCR (Line Control Register)8:41

    Examine how the UART transmitter uses the line control register to select data width five through eight bits and configure start and parity logic via EPS, SP, and parity enable.

  • UART 16550 TX : Stop bits4:38

    Learn how the UART transmitter uses the LCR and WLS fields to select 1, 1.5, or 2 stop bits, with durations of 16, 24, or 32 baud clock cycles.

  • UART 16550 TX : TX Logic12:59

    Explore the 16550 uart transmitter design with a fifo, shift register, and data format decoder. Understand parity, stop bits, baud rate generation, and 16x oversampling that drives the tx line.

  • UART 16550 TX : TX TB4:49

    Design a UART transmitter testbench by wiring input and output ports to the DUT, generating baud pulses, and validating parity, stop bits, and an 8-bit data frame.

  • Design Code1:22
  • TB Code0:29
  • UART 16550 RX : RX Logic9:32

    Implements UART RX logic with a four-state FSM that samples RX on baud pulses, computes parity when enabled, and pushes data to FIFO while signaling parity and frame errors.

  • UART 16550 RX : RX TB4:26

    Design and validate a UART RX testbench for 16550, generating baud pulses, applying LCR settings, and debugging parity with a corrected XNOR-based parity calculation to ensure correct RX reception.

  • Design Code1:23
  • TB Code0:33
  • UART 16550 Registers : Overview5:40

    Explore 16550 UART registers: THR, RBR, baud divisor latch, and IER, IIR, FCR, LCR, MCR, LSR, MSR, SPR, and how the DLAB bit switches between data and divisor access.

  • UART 16550 Registers : THR and RBR9:55

    Explore the UART 16550 registers, focusing on the transmit holding register and receiver buffer register, and how TX FIFO and RX FIFO manage data flow with push and pop signals.

  • UART 16550 Registers : Divisor Latch5:18

    Master how the UART 16550 divisor latch and baud generator use eight-bit latches and DLAB to form a 16-bit baud count and generate baud pulses for RX and TX.

  • UART 16550 Registers : FCR and LCR6:58

    Explore the 16550 uart registers, focusing on the fcr and lcr: fifo control, dma mode, rx/tx clears, rx threshold, iir read-only behavior, and dlab-driven data format.

  • UART 16550 Registers : LSR5:07

    The lecture explains the 16550 uart line status register (lsr), including data ready and reception errors such as overrun, parity, frame, and break.

  • UART 16550 Registers : TB5:22

    Create a testbench to verify updates to the divisor latch by setting the LCR DLAB bit and writing LSB and MSB values, producing baud pulses and updating the baud counter.

  • Design Code6:06
  • TB Code0:37
  • Complete Design2:07

    Connects UART receiver and transmitter through RX and TX FIFOs to manage data flow. Uses baud pulses, parity controls, and address 0x00 reads to push and pop data.

  • TX testbench7:31

    Explains how to configure UART TX path in a Verilog testbench: set DLAB, update LSB/MSB, select frame format, and transmit via the TX FIFO while validating parity and baud timing.

  • Design Code11:04
  • TB Code0:35
  • A11

Requirements

  • Fundamentals of Digital Electronics, Verilog.

Description

This comprehensive course is meticulously designed to cater to a broad audience, ranging from beginners who are just stepping into the world of digital design and hardware description languages (HDLs) to experienced FPGA/ASIC developers looking to deepen their expertise. The central aim of this course is to equip participants with a thorough mastery of digital communication interfaces, employing Verilog as the primary tool. Regardless of your prior experience in the field, this course offers something valuable. Beginners will find a structured and gradual introduction to the complex world of digital communication interfaces and Verilog. The course spans a comprehensive curriculum that encompasses three fundamental digital communication protocols: Serial Peripheral Interface (SPI), Universal Asynchronous Receiver-Transmitter (UART), and Inter-Integrated Circuit (I2C). Each of these protocols plays a critical role in modern electronics and embedded systems, and mastering them is vital for both aspiring and experienced engineers.

In summary, this course is a transformative journey that welcomes participants at all skill levels into the world of digital communication interfaces and Verilog. It equips you with the skills, knowledge, and confidence needed to excel in the dynamic and ever-evolving field of digital design and embedded systems. Whether you're taking your first steps or seeking to advance your career, this course provides a robust foundation for your success.


Who this course is for:

  • A VLSI engineer is interested in constructing the foundational elements of the standard communication interfaces frequently utilized in FPGA systems.