UART & I2C Using System Verilog
UART & I2C Using System Verilog
ABSTRACT- Design Verification in VLSI is the most KEYWORDS- Verification, Protocols, UART, I2C,
important step in the product development process. It aims System Verilog.
toconfirm that the system designed meets with the standards
andrequirements of the system. Verification is the process I. INTRODUCTION
ofchecking whether the designed system performs all the
required functionality specified in the design by writing the A. Verification in VLSI is Done in Two Stages
test bench or verification environment that contains group Verification is the Predictive analysis that is done to make
ofclasses and modules which generates input stimulus to sure the design will carry out the specified input output
the system and the output from that design is compared function when manufactured [1].
with the expected output. Test: A production phase that verifies there are no
A communication system has set of roles those are called manufacturing defects in the actual product that was
protocols. UART is a serial communication protocol that created from the synthesized design.
is used when only two devices are needed to communicate System Verilog has special features like randomization,
and it uses peer to peer topology. I2C stands for Inter functional coverage, assertions and use OOP features in
Integrated Circuit used for communication between master test bench construction.
and slave in which more than one slave devices or memory Test bench is a group of classes or components where each
can be connected to a master device. System Verilog has component is responsible for performing a specific
been primarily used for the verification purposes in VLSI operation.
because it has the features of Hardware Description i.e. generating stimulus, driving to the DUT, monitoring,
Languages such as Verilog and VHDL, C and C++ and comparing and scheduling different events like reset, main
functional coverage, assertion coverage, constrained tasks etc. and those classes will be named based on the
randomization and supports OOPs concepts. operation[9,10].
III. I2C PROTOCOL communication protocol means that we can attach multiple
IC at a time with the same machine[2]. In the I2C protocol,
I2C is a multi-master and multi-slave periodical the master has control on motorcars and in the case of
multi-master, only one master will control I2C machine. device with a matched address received from the master,
The data transfer and synchronization between the master responds with a confirmation to the master after which the
and slave is done by timepiece signal. In communication communication is established between both master and
master and slave partake the same timepiece, for slave devices on the data bus.
coetaneous periodical communication. The timepiece Then, the master can transmit 8-bit of data to the receiver
machine is handled by the master but in some conditions which replies with a 1-bit confirmation.
the slave is also suitable to control the timepiece[3].
C. Result
The following parameters are displayed in the Output:
The type of operation being done.
The data sent by the master
The address at which the data is stored
Read operation is completed or not.
Acknowledgement signal to know whether a particular
operation is completed or not.
D. Output
Figure 5: I2C communication
KERNEL: [DRV] : RESET DONE
KERNEL: [GEN] : WR : 1 WDATA : 76 ADDR : 1
A. I2C Data Frame RDATA : 0 DONE : 0
I2C is an eight- bit communication protocol and an ACK KERNEL: [DRV] : wr:1 wdata :76 waddr : 1 rdata : x#
or NACK bit associated with each byte. In I2C data is KERNEL: [MON] : DATA WRITE -> wdata :76
transferred in dispatches. Each communication begins with waddr : 1
a launch bit, and the trade ends with a stop bit. Master may KERNEL: [SCO] : WR : 1 WDATA : 76 ADDR : 1
shoot another launch condition to retain control of the RDATA : 0 DONE : 0
machine. dispatches contain frames of data. Each KERNEL: [SCO]: DATA STORED -> ADDR : 1DATA
communication has an address frame (slave address), and : 76
one or farther data frames that contain the data being KERNEL: [GEN] : WR : 0 WDATA : 23 ADDR : 4
transmitted. The communication signal consists of rd/ wr RDATA : 0 DONE : 0
bits, 1 bit ACK/ NACK signal between each data frame. KERNEL: [DRV] : wr:0 wdata :23 waddr : 4 rdata : 145
See the below Image[8]. KERNEL: [MON] : DATA READ -> waddr : 4 rdata
: 145
KERNEL: [SCO] : WR : 0 WDATA : 23 ADDR : 4
RDATA : 145 DONE : 0
KERNEL: [SCO] :DATA READ -> Data Matched #
KERNEL: [GEN] : WR : 0 WDATA : 49 ADDR : 1
RDATA : 0 DONE : 0
Figure 5: I2C data frame KERNEL: [DRV] : wr:0 wdata :49 waddr : 1 rdata : 76
KERNEL: [MON] : DATA READ -> waddr : 1 rdata
: 76
B. Process of Data Transmission
KERNEL: [SCO] : WR : 0 WDATA : 49 ADDR : 1
Slave devices get acknowledged by master with the help RDATA : 76 DONE : 0
of start condition. The data transmission is done by SCL and KERNEL: [SCO] :DATA READ -> Data Matched
SDL lines. If address matches the target device gets
selected and other slaves get disconnected. The slave