top of page

UART Basics

To understand UART if you are a total novice or if you want to keep it in your memory for a long time, let me tell you a story. 

What is UART and how it works: 

Imagine you and your friend are having a conversation using walkie-talkies. When you want to talk, you press a button on your walkie-talkie, and when you release the button, your friend can hear what you said. That button you press is like the "transmit" signal.

Now, when your friend wants to talk, they press a button on their walkie-talkie, and you can hear what they say when they release the button. That button they press is like the "receive" signal.

In UART, devices use similar signals to talk to each other. One device sends a signal to say, "Hey, I want to send a message!" and the other device listens for that signal and gets ready to receive the message. Then, the first device starts sending the actual message, and the second device listens carefully to receive it.

It's like taking turns in a conversation. When it's your turn to talk, you press the button on your walkie-talkie and speak. When it's your friend's turn, they press their button and speak. This way, you can have a back-and-forth conversation.

In UART, devices use these signals to take turns and send messages to each other. They follow a set of rules to make sure they understand each other and have a smooth conversation.

Transmission in UART: 

​

UART involves two devices: a transmitter and a receiver. The transmitter is responsible for sending data, while the receiver is responsible for receiving and understanding that data.

When the transmitter wants to send data, it takes the information and converts it into a sequence of electrical signals. Each signal represents a bit of data. For example, a high voltage signal could represent a "1" and a low voltage signal could represent a "0".

To make sure the receiver knows when the data transmission starts, a special signal called the start bit is sent first. It acts as a signal to prepare the receiver to receive the upcoming data.

After the start bit, the actual data bits are sent one by one. These bits make up the message or information being transmitted. The number of data bits can vary depending on the system's configuration, typically ranging from 5 to 8 bits.

To ensure the reliability of the transmitted data, a parity bit may be included. The parity bit is an extra bit added after the data bits. It helps in error detection by allowing the receiver to verify if the number of ones (or zeros) in the data bits is odd or even.

Finally, to indicate the end of the data transmission, one or more stop bits are sent. These stop bits provide a brief pause before the next transmission starts.

On the receiving end, the receiver watches for the start bit to identify the beginning of the data. It then reads the data bits, one at a time, and keeps track of the parity bit if present. Once all the bits are received, the receiver can reconstruct the original data.

​

Now as we have gained enough information on UART, let's just get our hands dirty with some UVM coding already. 

bottom of page