Академический Документы
Профессиональный Документы
Культура Документы
Development of OVM Verification Environment for Functional Verification of Quad Serial Peripheral Interface
Kiran N.
CGB0910003 M. Sc. [Engg.] in VLSI System Design
Academic Guide : Cyril Prasanna Raj . P HoD, Dept. of EEE, MSRSAS, Bangalore.
Industrial Guide : Linu Thomas, Manager, IC Design Engineering, Broadcom (I) Pvt. Ltd.
M.S.Ramaiah School of Advanced Studies
QSPI
Project Objectives
To review literature on Quad SPI module, OVM and verification environments To study Quad SPI module functionality and arrive at functional specifications for verification environment To develop OVM based verification environment for Quad SPI To identify suitable test cases and verify functionality of Quad SPI To perform functional verification and achieving maximum possible coverage of the QSPI module for various test cases.
have
been
Maximum coverage for QSPI IP using the VCS tool and the waveform debug tool VERDI is reported.
Introduction
Quad SPI module is an advanced version of the commonly used Serial Peripheral Interface (SPI) module. The SPI is used for synchronous serial data communication between a host processor and the peripherals connected to it. It is master-slave protocol type of interface. It was primarily developed by Motorola In its most general form the SPI consists of two data lines and two control lines.
Introduction cont..
The two control lines are Chip Select(CS) which is used to select the corresponding peripheral device connected and then Clock Select (SCLK) which is used for synchronizing the data transfer. The two data lines are for the data input and output. The SPI in general consists of a shift register which is used to shift data into and out of the interface and a serial buffer which stores the data when the module is made inactive. The Quad SPI module consists of four data lines and a characteristic two control lines. The QSPI module which is verified in this project can also operate in dual mode in which there are two data lines and two control lines
Introduction cont..
The QSPI module finds its application in System On Chip (SoC) designs to assists the hard core processor to communicate with the peripherals attached to it. Since the interconnect is small the noise immunity is best in case of serial communication which the QSPI uses and also the frequency of operation is around 80 MHz is which is ideal and well suited for on chip operations. Verification methodologies are a must to tackle verification complexities and design closure times. Out of the popular verification methodologies (Open Verification Methodology) OVM preferred in the industry for SoC designs.
10
Introduction cont..
OVM is Functional verification methodology developed using the System verilog (Hardware Design Verification language)HDVL The three main building blocks of OVM include OVM_ components, OVM_env and OVM_test. Component classes include 1. Sequencer 2. Driver 3. Monitor 4. Scoreboard Env class helps connect all the components together. QSPI
M.S.Ramaiah School of Advanced Studies
11
12
13
Project Plan
Literature Review Linking of DUT to verification environment
Testing of DUT
Test bench creation and testing the modules using developed test-bench
NO
Design of verification environment Obtaining Required Coverage
Literature Review
The QSPI architecture for the AXI 4 interface is used for only to interface the serial flash memories connected as peripherals. The architecture for this application can only be used for high data rate reads as it concentrates only on the AXI bus so sending control signals from the processor for data transfer from the serial flash memory will take critical machine cycles and hence hindering the overall performance The goal of adopting a particular methodology is to obtain maximum level of confidence in the quality of the design in a given amount of time and engineering resources. For achieving this goal methodologies use assertions, functional abstraction, automation through randomization, reuse all at the same time.OVM supports all the above features and also functional verification.
M.S.Ramaiah School of Advanced Studies
15
For good quality of verification always functional verification of the design should be prioratized. Test writing writing should be intense and attack the design by first random tests and then constraining the random vectors and finally usage of assertion and directed tests to plug holes in verification
M.S.Ramaiah School of Advanced Studies
16
2.
2008
17
18
19
20
21
SI/IO0
I/O
Serial Data Input: Transfers data serially into the device. Device latches commands, addresses, and program data on SI on the rising edge of SCK. Functions as an output pin in Dual and Quad I/O mode.
Serial Clock: Provides serial interface timing. Latches commands, addresses, and data on SI on rising edge of SCK. Chip Select: Places device in active power mode when driven low. Deselects device and places SO at high impedance when high. After power-up, device requires a falling edge on CS# before any command is written.
SCK
Input
CS
Input
22
HOLD#/IO3
I/O
Hold: Pauses any serial communication with the device without deselecting it. When driven low, SO is at high impedance, and all input at SI and SCK are ignored. Requires that CS# also be driven low. Functions as an output pin in Quad I/O mode.
Write Protect: Protects the memory area specified by Status Register bits BP2:BP0. When driven low, prevents any program or erase command from altering the data in the protected memory area. Functions as an output pin in Quad I/O mode.
W#/ACC/IO2
I/O
23
24
25
Read operation
Standard mode
The host system must first select the device by driving CS# low. The READ command is then written to SI, followed by a 3 byte address (A23-A0). Each bit is latched on the rising edge of SCK. The memory array data, at that address, are output serially on SO at a frequency 20 MHz, on the falling edge of SCK.
26
Read operation
Dual mode
The host system must first select the device by driving CS# low. The Dual Output Read command is then written to SI, followed by a 3-byte address (A23-A0) and a dummy byte. Each bit is latched on the rising edge of SCK. Then the memory contents, at the address that is given, are shifted out two bits at a time through the IO0 (SI) and IO1 (SO) pins at a frequency 60 MHz on the falling edge of SCK.
27
Read operation
Quad mode
The host system must first select the device by driving CS# low. The Quad Output Read command is then written to SI, followed by a 3-byte address (A23-A0) and a dummy byte. Each bit is latched on the rising edge of SCK. Then the memory contents, at the address that are given, are shifted out four bits at a time through IO0 (SI), IO1 (SO), IO2 (W#/ACC), and IO3 (HOLD#) pins at a frequency 80 MHz on the falling edge of SCK.
28
400400 h
29
30
EB h,1E8588 h, XX h
31
Log file:
[ 43197.0ns] iproc_soc.iproc_tbc.driver.spif : write transaction data = 63 [ 43197.0ns] iproc_soc.iproc_tbc.driver.spif : write transaction data = 61 [ 488971.0ns] iproc_soc.iproc_tbc.driver.spif : data read form rx reg = 00000063 , read buffer = 63 [ 489070.0ns] iproc_soc.iproc_tbc.driver.spif : data read form rx reg = 00000061 , read buffer = 61 [ 489565.0ns] iproc_soc.iproc_tbc.scn.spif : data compare Passed for entry 3.exp = 63, act = 63 [ 489565.0ns] iproc_soc.iproc_tbc.scn.spif : data compare Passed for entry 4.exp = 61, act = 61
M.S.Ramaiah School of Advanced Studies
32
Log file:
[ 18549.0ns] iproc_soc.iproc_tbc.driver.spif : BSPI write data from Address ( 1e400400) is [ 18549.0ns] iproc_soc.iproc_tbc.scn.spif : Write data Byte Array: cnt = 32 06 00 00 ea 22 00 00 ea 26 00 00 ea 2a 00 00 ea 33 00 00 ea 32 00 00 ea 43 00 00 ea 52 00 00 ea [ 18549.0ns] iproc_soc.iproc_tbc.scn.spif : BSPI Read completed for 32 bytes, Read data Byte Array: cnt = 32 06 00 00 ea 22 00 00 ea 26 00 00 ea 2a 00 00 ea 33 00 00 ea 32 00 00 ea 43 00 00 ea 52 00 00 ea [ 18549.0ns] iproc_soc.iproc_tbc.scn.spif : BSPI Read comparision Passed for address = 1e400400 [ 18549.0ns] iproc_soc.iproc_tbc.scn.spif : Beat Len = 2, beat_size= 2
M.S.Ramaiah School of Advanced Studies
33
34
Coverage Analysis
Coverage value represents the verification effort carried on the designs.
Line Coverage: It is the measure to check for the total number of lines of code which is being executed.
Conditional Coverage: It is the measure to check if all the conditional statements present in the code are traversed. FSM Coverage: It is a measure to find out the state transitions & unvisited states in an FSM Toggle Coverage: It is a measures the transitions of the stimulus [changes in the signal logic] w.r.t the execution of the code.
M.S.Ramaiah School of Advanced Studies
35
Regression Result
The regression is combination the all the sub blocks in the design done to verify them as one unit. All the test cases for each block are run at a time to verify the proper functionality of the design.
36
The final coverages obtained Line :89.88 Conditional: 83.63 Toggle: 58.93
100 80 60 40 20 0 Coverage
37
38
39
Conclusion
The Quad SPI module is verified for 3 data transfer modes of operation along with 3 and 4 byte addressing modes and is reported to operate at 80MHz for Quad read mode operation Functional verification of QSPI is carried out by applying constraint random test cases. Line coverage is reported 89.32%, conditional coverage is reported at 83.62% and toggle coverage is reported at 58.33% for constraints random test cases
40
41
Literature
D. Geist, G. Biran, T. Arons, M. Slavkin, Y. Nustov, M. Farkas, K. Holtz (2008), A Methodology For the Verification of a System on Chip, DAC, Louisiana. Daniel McKenna, Using the QuadSPI Module on MPC56xxS, freescale semiconductors, application note, Document Number: AN4186 Guy Mosensoson (2010), Practical Approaches to SOC Verification, Verisity Design Inc.
Janick Bergeron (2006), Verification methodology manual for SystemVerilog, Springer Pvt. Ltd., London.
Molina and O. Cadenas (2007), Functional verification: approaches and challenges, Computer architecture Department, Universitat politecnica de catalunya, Barcelona, Spain. Parag Goel, Pushkar Naik (October 22nd 2011), System Verilog + OVM: Migrating Verification Challenges and Maximizing Reuseability , Applied Microelectronics.
M.S.Ramaiah School of Advanced Studies
42
Literature
D. Geist, G. Biran, T. Arons, M. Slavkin, Y. Nustov, M. Farkas, K. Holtz (2008), A Methodology For the Verification of a System on Chip, DAC, Louisiana. Daniel McKenna, Using the QuadSPI Module on MPC56xxS, freescale semiconductors, application note, Document Number: AN4186 Guy Mosensoson (2010), Practical Approaches to SOC Verification, Verisity Design Inc.
Janick Bergeron (2006), Verification methodology manual for SystemVerilog, Springer Pvt. Ltd., London.
Molina and O. Cadenas (2007), Functional verification: approaches and challenges, Computer architecture Department, Universitat politecnica de catalunya, Barcelona, Spain. Parag Goel, Pushkar Naik (October 22nd 2011), System Verilog + OVM: Migrating Verification Challenges and Maximizing Reuseability , Applied Microelectronics.
M.S.Ramaiah School of Advanced Studies
43
Literature
Pretez landau, Guy Regev (2009), A Methodology for Timely Verification of a Complex SoC, Percello Ltd., USA. S25FL128R, S25FL256R, S25FL512R Marketing Spansion Datasheet. Requirements Specification,
Santanu Chattopadhyay (2010), Embedded System Design, PHI learning pvt. Ltd., USA
44
Thank You
45