Professional Documents
Culture Documents
423651ijsetr8063 1902
423651ijsetr8063 1902
Vol.04,Issue.51,
December-2015,
Pages:11023-11030
www.ijsetr.com
Design and Functional Verification of A SPI Master Slave Core using UVM
K. V. ASHOK KUMAR1, M. SANTOSH KRISHNA2
1
Abstract: Synchronous serial interfaces are widely used to provide economical board
level interfaces between different devices
such as microcontrollers, DACs ADCs and other. Many IC manufacturers produce
components that are compatible with SPI and
Microwire/plus. The SPI Master core is compatible with both protocols as master
with some additional functionality. The SPI
consists of slave select lines, serial clock lines, as well as input and output
data lines. All transfers are full duplex transfers of a
programmable number of bits per transfer. I design the SPI Master-Slave core design
and verified using UVM. The Universal
Verification Methodology (UVM) Class Library provides the building blocks needed to
quickly develop reusable and wellconstructed verification components and test
environments using System Verilog. In this paper i have designed and developed
testing environment using system Verilog implementation of UVM for SPI Master-Slave
core design. My work introduces an
automated stimulus generating testing environment for the design and checks the
functionality of the SPI Master-Slave core
design.
Keywords: Universal Verification Methodology, Direct Memory Access and Serial
Peripheral Interface.
I. INTRODUCTION
SPI stands for Serial Peripheral Interface. SPI is
asynchronous protocol that allows a master device to initiate
communication with a slave device. Data is exchanged
between these devices. SPI is implemented by a hardware
module called the Synchronous Serial Port or the Master
Synchronous Serial Port. This module is built into many
different micro devices. It allows serial communication
between two or more devices at a high speed and is
reasonably easy to implement. The SPI bus can operate with a
single master device and with one or more slave devices. If a
single slave device is used, the SS pin may be fixed to logic
low if the slave permits it. Some slaves require the falling
edge (high to low transition) of the chip select to initiate an
action which starts conversion on said transition. With
multiple slave devices, an independent SS signal is required
from the master for each slave device. Most slave devices
have tri-state outputs so their MISO signal becomes high
impedance (logically disconnected) when the device is not
selected. Devices without tri-state outputs can't share SPI bus
segments with other devices; only one such slave could talk to
the master, and only its chip select could be activated. Fig.1
shows the signaling between an SPI Master and SPI Slave.SPI
is a Serial Interface and uses the following signals to serially
exchange data with another device as explained in fig.1.
SS: This signal is known as Slave Select. When it goes
low, the slave device will listen for SPI clock and data
signals.
SCK: This is the serial clock signal. It is generated by the
master device and controls when data is sent and when it
is read.
H. Agent
Sequencers, drivers and monitors can be reused
independently, but this requires the environment integrator to
learn the names, roles, configuration and hookup of each of
these entities. To reduce the amount of work and knowledge
required by test writer, Agent is used. Agent is basically a
container. Some agents are proactive and initiate transactions
to the DUT, while other agents react to transaction requests.
Agents should be configurable so that they can be either
active or passive. In active mode it drives the signal to the
DUT. So driver and sequencer are instantiated in active mode.
In passive mode it just sample the DUT signals does not drive
them. So only monitor is instantiated in passive mode.
I. Scoreboard
Scoreboard is a crucial element in a self checking
environment, it verifies the proper operation of a design at
functional level. This component is the most difficult one to
write, it varies from design to design and from designer to
designer.
C. RTL Schematic
The following diagram describes the Schematic of RTL as
shown in Fig.10.
Fig.10.RTL Schematic.