Escolar Documentos
Profissional Documentos
Cultura Documentos
By
Mayur Navinchandra Kubavat (131060752013)
Guided By
Mr.Ashish Prabhu
Sr. Verification Engineer, LSI India R&D
Remove space
A Thesis Submitted to
Gujarat Technological University
in Partial Fulfillment of the Requirements for
the Degree of Master of Engineering in
VLSI & Embedded System Design
June 2015
CERTIFICATE
This is to certify that research work embodied in this Thesis entitled Development of Verification Environment for SHA-3 Core using UVM was
carried out by Mr. Mayur Navinchandra Kubava (131060752011) at Gujarat Technological University PG School (106), Ahmedabad for partial
fulfillment of Master of Engineering degree, (Electronics & Communication
Systems
Engineering) in VLSI & Embedded System Design, to be awarded by Gujarat Technological University. This research work has been carried out under my
supervision and is to my satisfaction.
Signature of Guide
Principal
Seal of Institute
COMPLIANCE CERTIFICATE
This is to certify that research work embodied in this thesis entitled Development of Verification Environment for SHA-3 Core using UVM was carried out by Mr. Mayur Navinchandra Kubavat (Enrollment No. 131060752013)
at Gujarat Technological University PG School (106), Ahmedabad for
partial fulfillment of Master of Engineering degree, (Electronics & Communication Engineering) in VLSI & Embedded System Design, to be awarded
by Gujarat Technological University. He has complied with the comments given
by the Dissertation Phase-I as well as Mid Semester Thesis Reviewer to my satisfaction.
Signature of Student:
Signature of Guide:
Kubavat Mayur N.
This is to certify that research work embodied in this thesis entitled Development of Verification Environment for SHA-3 Core using UVM carried
out by Mr. Mayur Navinchandra Kubavat (Enrollment No. 131060752013)
at Gujarat Technological University PG School (106), Ahmedabad for
partial fulfillment of Master of Engineering degree, (Electronics & Communication Engineering) in VLSI & Embedded System Design, to be awarded
by Gujarat Technological University, has published article entitled UVM Based
Verification Environmet for SHA-3 Core for publication by the Journal
Name, at City during Volume and Date.
Date: June 2015
Place: Ahmedabad
Signature of Student:
Signature of Guide:
Kubavat Mayur N.
ii
This is to certify that research work embodied in this thesis entitled Development of Verification Environment for SHA-3 Core using UVM carried
out by Mr. Mayur Navinchandra Kubavat (Enrollment No. 131060752013)
at Gujarat Technological University PG School (106), Ahmedabad is approved for the degree of Master of Engineering with specialization of (Electronics
& Communication Engineering) in VLSI & Embedded System Design
by Gujarat Technological University.
......................................................... .........................................................
iii
DECLARATION OF ORIGINALITY
We hereby certify that we are the sole authors of this thesis and that neither any
part of this thesis nor the whole of the thesis has been submitted for a degree to
any other University or Institution.
We certify that, to the best of our knowledge, the current thesis does not infringe upon anyones copyright nor violate any proprietary rights and that any
ideas, techniques, quotations or any other material from the work of other people
included in our thesis, published or otherwise, are fully acknowledged in accordance with the standard referencing practices. Furthermore, to the extent that
we have included copyrighted material that surpasses the boundary of fair dealing
within the meaning of the Indian Copyright (Amendment) Act 2012, we certify
that we have obtained a written permission from the copyright owner(s) to include
such material(s) in the current thesis and have included copies of such copyright
clearances to our appendix.
We declare that this is a true copy of thesis, including any final revisions, as
approved by thesis review committee.
We have checked write up of the present thesis using anti-plagiarism database and
it is in allowable limit. Even though later on in case of any complaint pertaining
of plagiarism, we are sole responsible for the same and we understand that as per
UGC norms, University can even revoke Master of Engineering degree conferred
to the student submitting this thesis.
Signature of Student
Signature of Guide
Kubavat Mayur N.
iv
ACKNOWLEDGMENT
I would like to express my deepest appreciation to all those who provided me the
possibility to complete this report. A special gratitude I give to our guide Mr.
Ashish Prabhu, Sr. Verification Engineer, LSI R&D India, Pune, whose contribution in stimulating suggestions and encouragement helped me to coordinate my
report writing.
Furthermore I would also like to acknowledge with much appreciation the crucial
role of the staff of CDAC. Including Mr. Suresh Sikka, Sr. Technical Officer,
CDAC ACTS, Pune who gave the permission to use all required equipment and
the necessary materials to complete the report. I have to appreciate the guidance
given by other supervisor as well as the panels especially in our Dissertation PhaseI presentation that has improved our presentation skills, any comments and advices
which suggest improvement of this work will be much appreciated.
Credits also go to my friends and senior students, including Pankaj Chavda for
his valuable suggestion and support time and again.
And I thank Gujarat Technological University, Ahmedabad and CDAC
ACTS, Pune for providing IEEE Xplore subscription.
Contents
Certificate
Compliance Certificate
ii
iii
Declaration of Originality
iv
Acknowledgment
1 Introduction
1.1
Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2
Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3
Scope
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.4
Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.5
Research Methodology . . . . . . . . . . . . . . . . . . . . . . . . .
1.6
Expected Outcome . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1
Verification Methodologies . . . . . . . . . . . . . . . . . . . . . . .
2.2
UVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.1
Data Items(Transactions) . . . . . . . . . . . . . . . . . . .
vi
CONTENTS
2.2.2
Sequencer . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.3
Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.4
Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.5
Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.6
The Environment . . . . . . . . . . . . . . . . . . . . . . . .
2.3
2.4
UVM Phases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.5
UVM Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.6
TLM 1.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.7
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
14
3.1
3.2
Keccak SHA-3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3
. . . . . 15
3.2.1
Keccak-p Permutations . . . . . . . . . . . . . . . . . . . . . 16
3.2.2
Sponge Construction . . . . . . . . . . . . . . . . . . . . . . 16
3.2.3
Keccak[c] Specification . . . . . . . . . . . . . . . . . . . . . 17
3.2.4
3.3.2
Password Verification . . . . . . . . . . . . . . . . . . . . . . 19
3.3.3
Page vii
CONTENTS
3.3.4
3.4
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4 Literature Survey
21
4.1
4.2
Testbench Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.3
4.4
4.5
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
26
5.1
5.2
Coverage Plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.2.1
Code Coverage . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.2.2
Functional Coverage . . . . . . . . . . . . . . . . . . . . . . 29
5.3
Verification Environment . . . . . . . . . . . . . . . . . . . . . . . . 30
5.4
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
6 Simulation Results
32
6.1
6.2
6.3
6.4
Coverage Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Page viii
CONTENTS
7 Conclusion and Future Work
39
A List of Abbreviations
42
43
45
47
54
F Progress Report
55
Page ix
List of Figures
2.1
2.2
. . . . . . . . . . . . . . . . .
2.3
2.4
2.5
2.6
2.7
Analysis Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.1
3.2
Sponge Construction . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.1
6.1
6.2
6.3
6.4
Coverage Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
. . . . . . . . . . . . . . . . 11
. . . . . . . . . . . . . . . . . . . . 11
. . . . . . . . . . 17
. . . . . . . . . . . . . . . . . 30
List of Tables
2.1
3.1
3.2
5.1
5.2
xi
By
Mayur Navinchandra Kubavat
(131060752013)
Guided By
Mr.Ashish Prabhu
Sr. Verification Engineer, LSI India R&D
ABSTRACT
As CMOS technology advances, complexity of ICs also increases. Moores law
states that number of transistor in ICs doubles approximately every two years.
Verifying working of these complex digital systems has become more important
now, because any small deviation from specification in high density chips can lead
to system failure and complete re-spin of the design cycle. Which then leads to
increased cost and delay in time-to-market. Therefore SystemVerilog HVL was
developed to create testbench for large digital design. SystemVerilog supports
concepts of OOPs and provide higher level of abstraction in our testbench. To
support reusability of verification components UVM is developed later which is
derived from OVM and eRM.
This dissertation work is induced from necessity of development of UVM based
verification environment for SHA-3 cryptographic core. Taking this need in consideration, dissertation work describes flow from specification extraction to development of verification environment.
Continue...
xii
Expected result from this dissertation work includes, developing of UVM component for verification environment, integrating design under test with developed
environment, creating test cases, development of functional model, complete code
coverage and detailed documentation about them all. We also try to achieve
higher functional coverage report and foreign language integration in our verification environment. Scripting can be used to execute commands in batch mode.
The verification environment can also be reused between low and high-throughput
cores as well. Also some design concept can be studied to find new ways of optimizing FPGA implementations.
xiii
CHAPTER
1
Introduction
This report describes various facts used to select thesis statement Development
of verification environment for SHA-3 core using UVM and follow up approach
to realize development of solution for the problem stated. Work progress up to
Mid Semester Thesis Progress Review has been shown in chapter 6. It also discusses areas to be explored if work will be extended. Brief overview of verification
methodology used and design under test, which is Keccak SHA-3 cryptographic
core, are also discussed in following sections. Literature which is surveyed to come
up for the thesis selection is outlined in Literature Survey section. Detailed plan
of Dissertation has been described and followed. Also chapter 5 has detailed plan
till DP-II which will give ideas about tasks to be followed.
1.1
Problem Statement
This dissertation work is induced from need of development of UVM based verification environment for SHA-3 cryptographic core. Taking this need in consideration,
dissertation work describes flow from specification extraction to development of
verification environment.
1.2
Motivation
CHAPTER 1. INTRODUCTION
tion Language (HVL) came into existence. SystemVerilog is comprehensive base
language which supports OOPs and thus abstraction level in testbench. But, to
practice reusability in our testbench environment, UVM methodology is developed
later which has rich set of class library.
SHA-1 is most widely known and used hash function in several applications and
protocols. Many successful attacks have been noted on SHA-1 which led NIST
to require many applications in federal agencies to move to SHA-2 after 2010 because of the weakness in previous hash algorithm. Although no successful attacks
have been noted on SHA-2, development of another option is necessary as future
perspective. NIST has selected a new cryptographic hash algorithm which is referred to as the Secure Hash Algorithm 3 (SHA-3) and is intended to complement
the SHA-2 hash algorithms currently specified in Federal Information Processing
Standard (FIPS) 180-3, Secure Hash Standard. The selected algorithm is intended
to be suitable for use by the U.S. government as well as the private sector and is
available royalty-free worldwide.4
Combining above best practices, flow of development of verification environment
for Keccak SHA-3 core using UVM is described in this report.
1.3
Scope
Page 2
CHAPTER 1. INTRODUCTION
1.4
Objectives
Work to be presented in this dissertation thesis aims at following standard verification flow used in industry to develop verification environment of the cryptographic
core.
Critically analyzing the relevant literature of Secure Hash Algorithm and Verification techniques with UVM is the first step.
The work will follow standard practices to develop verification environment for
verification methodology which is Universal Verification Methodology.
Function model for the cryptographic core is also need to be developed to compare
different testcases created. One important aspect of hardware verification is code
coverage, which will also be covered.
Scope of this work can also be extended to generate functional coverage. Concept
of reusability can also be explored.
And area vs. throughput consideration can be analyzed and studied for hardware
design improvements and FPGA implementation.
Other than primary objectives stated above, other objectives covers learning tools
used in the process. Use of Mentor Graphics QuestaSim 10.0b is done to create
verification environment and generate various reports. Understanding and using
scripts for batch execution will also be considered. Extended objectives include
learning use of Xilinx ISE, Timing Tool Editor and generating synthesis and timing
reports on the tools.
1.5
Research Methodology
First step in this dissertation flow is to understand Design under Test (DUT)
specification. Following feature extraction from the design, this is specification of
Page 3
CHAPTER 1. INTRODUCTION
our Keccak SHA-3 core. These features are used to generate testcases.
It is then followed by testbench architecture development phase. This phase contains developing UVM testbench hierarchical components. Development and execution of environment will be done on verification tool QuestaSim 10.0b by Mentor
Graphics. Code coverage and functional coverage functionalities are also provided
by Mentor Graphics Questa Advanced Simulator.
Other waveform viewers like GTK Wave and complementary tools are also used.
To get Linux like environment on windows system Cygwin, which is collection of
GNU and Open Source tools, is also used.
Use of scripting language like Perl or TCL can also be studied to create Makefile
or Do file and command line arguments to run tests and batch execution.
Scope of this dissertation work if extended to design and implementation of SHA-3
Keccak on FPGA then other tools Xilinx ISE, Timing Tool Editor Etc will be used
to create RTL code, linting and synthesizing the RTL and producing technology
view of the RTL.
1.6
Expected Outcome
Page 4
CHAPTER
2
Universal Verification Methodology
2.1
Verification Methodologies
In hardware design and verification industry there are three major vendors Synopsys, Cadence and Mentor Graphics. Early in the methodology development
phases, Vera language was developed by Sun Micro Systems for its ASIC verification projects. Later it has been passed to Synopsys and named as OpenVera
which is currently supported in its VCS compiler. Synopsys donated parts of Vera
to Verilog to form bases for SystemVerilog. OpenVera uses Reuse Verification
Methodology (RVM) which is documented in Synopsys Verification Methodology
Manual (VMM).e Hardware Verification Language developed by Verisity used as
basis of Universal Verification Methodology (UVM) developed by Cadence. Open
Verification Methodology (OVM) contains building block of verification library for
semiconductor chips. OVM is originally developed from URM and eRM. It also has
parts of Advanced Verification Methodology used by Mentor Graphics. After the
era of OVM, new verification methodology was developed by joint efforts of verification industries which is known as Universal Verification Methodology (UVM).
UVM combines concepts of OVM as well as VMM. Although major vendors and
many other automation tool vendors supports UVM; eRM with e hardware verification language made for highly flexible reusable testbench, supported by Cadence
also has been used in parallel.
A brief timeline of methodology development has been given in figure 2.1 below,
2.2
UVM
Page 6
2.2.1
Data Items(Transactions)
Data items are testcases also known as transactions to be applied to DUT to get
desired coverage. These transactions can be randomized to get higher coverage.
Transactions consist of data packet for Ethernet switch, messages for other secure
hash protocols, bus transactions etc.
2.2.2
Sequencer
Transaction items described above only consist test specific data items. It does
not know how to reach to driver at specific interval of time. Sequencer does this
job very well. It randomizes sequences (transactions) to be applied on driver. It
checks for drivers status and sends transactions accordingly. We can add constraints to the sequencer to send data packet in user defined fashion. Sequencer
provides synchronization to the driver, constraint randomize transactions, react
to the current state of the DUT and also provides system level synchronization
for communication protocols.
2.2.3
Driver
2.2.4
Monitor
Monitor is passive entity which samples DUT outputs and convert them to transaction. Monitor checks for protocol timing and its violations. It also provides
coverage mechanism. Monitor extracts data items and notifies for events. And
also collects transactions to be sent to Scoreboard.
Mayur Kubavat (131060752013)
Page 7
2.2.5
Agent
Agent provides higher abstract class by encapsulating Sequencer, Driver and Monitor. Because sequencer, driver and monitor can be reused between different verification environments, agent makes this work easy by combining all three of them.
Agents can be both active and passive entity. Active agent can drive and monitor
DUT signals while passive agents only monitor DUT.
2.2.6
The Environment
Environment is top level block for UVCs. It consists of one or more agents and
other UVC like scoreboard. Figure below describes reusable verification environment. Notice in figure 2.2 that the environment class may contain monitor other
than provided in agent. Reason is that bus monitor may be independent of specific
agents.
Page 8
2.3
The UVM class library provides all building blocks you need to quickly develop
verification environment. It consist of UVM base classes, pre-defined methods like
print(), copy() etc. It also consists of utilities, macros and provides Transaction
Level Modeling (TLM 1.0) set for communication between UVCs.
A Partial hierarchy of UVM components and TLM is provided in figure 2.3 below,
2.4
UVM Phases
All UVM class described above has simulation phases. These UVM phase are used
to construct, configure and connect components. Although new() is not an phase,
sometimes it is considered to be one. new() is constructor on the parent class.
Some of the phases are described below,
function void build() is used to construct components of testbench hierarchy. Example is, build phase() of agent is used to construct Sequencer,
Driver and Monitor.
Mayur Kubavat (131060752013)
Page 9
Page 10
2.5
UVM Macros
UVM macros implement useful methods in classes and in variables. Some of the
important macros are described below,
2.6
TLM 1.0
Page 11
Symbol
Type
Port
Export
Analysis Port
Port Declaration
uvm put port
#(Transaction)
port name
uvm put imp
#(Transaction, Classname) export name
uvm analysis port
#(Transaction) analysis port name
2.7
Conclusion
Page 12
Page 13
CHAPTER
3
Secure Hash Algorithm-3 Standard
14
3.1
Table below compares some properties of hash functions3 like message size, word
size, output digest size etc.
Algorithm
MD5
SHA-1
SHA-224,
SHA-256
SHA-384,
SHA-512,
SHA512/224,
SHA512/256
SHA-3
SHA3-224
SHA3-256
SHA3-384
SHA3-512
Output
Size(bits)
128
160
Internal
Block Length Word
Rounds
State
Size
Size
Size
Size
128
512
64
32
84
160
512
64
32
80
256/224
256
512
64
32
84
384/512/
224/256
512
1024
128
64
80
224/256/
384/512
1600
64
24
224
256
384
512
1600
1600
1600
1600
64
64
64
64
24
24
24
24
1600
2*bits
1152
1088
832
576
3.2
Keccak SHA-3
Draft FIPS-202 is new SHA-3 standard based on Keccak, the algorithm NIST
has selected as the winner of the public SHA-3 Cryptographic Hash Algorithm
Competition.4 The SHA-3 family consists of four cryptographic hash functions
and two extendable output functions. All six functions share common structure
called as the sponge construction described in 3.2.1.
The four SHA-3 hash functions are SHA3-224, SHA3-256, SHA3-384 and SHA3512. Here suffix denotes length of output message digest. Two extendable output
Mayur Kubavat (131060752013)
Page 15
3.2.1
Keccak-p Permutations
Keccak-p permutations are based on the equation Keccak-p[b, nr]. Here two
parameters are length of the string to be permuted, called width b and number of
iteration of an internal round called nr.
A round of Keccak-p permutation Rnd consists of a sequence of five round transformations. It is called step-mappings. Set of b-bit to the permutation is called
state. Seven possible values for Keccak-p is in table below,
b
w = b/25
l = log2(b/25)
25
1
0
50
2
1
100
4
2
200
8
3
400
16
4
800
32
5
1600
64
6
3.2.2
Sponge Construction
SHA-3 uses sponge construction in its underlying structure which is same general
structure provided in other iterative hash functions. Sponge construction build a
function SPONGE[f,pad,r]. Where,
f is internal function used to process input block, r is the size of input block, also
called bit rate, pad is padding algorithm.
Page 16
3.2.3
Keccak[c] Specification
Keccak is family of sponge function with function as Keccak-p = [b, 2l+12] permutation as underlying function and padding rule pad1*01. Any specific function
from family is defined by choices of parameters rate r and capacity c such that
r+c is 25, 50, 100, 200, 400, 800, 1600. This is values of b specified in table 2.
DUT we have selected consist of 512-bit hash value for which value of b is 1600-
Page 17
3.2.4
Four SHA-3 hash functions defined from Keccak-p function specification in 2.2.3
and by appending two bits to the message are,
SHA3-224(M) = Keccak [448] (M || 01, 224)
SHA3-256(M) = Keccak[512] (M || 01, 256)
SHA3-384(M) = Keccak[768] (M || 01, 384)
SHA3-512(M) = Keccak[1024] (M || 01, 512)
And the two SHA-3 XOFs defined from Keccak are as following,
SHAKE128(M, d) = Keccak[256] (M || 1111, d)
SHAKE256(M, d) = Keccak[512] (M || 1111, d)
Here, two 11 bit appended to message provides domain specification. That is
Page 18
3.3
3.3.1
3.3.2
Password Verification
3.3.3
Message digest are also used for reliably identifying files on several code management systems like Git, Mercurial or Monotone etc. uses sha1sum of various types
of content (file content, directory trees, ancestry information, etc.) to uniquely
identify them. Peer to Peer file sharing and Magnet links are other examples of
Hash identifiers.
Page 19
3.3.4
Hash functions are also used to generate pseudorandom bits or to derive multiple
keys from a single key.
3.4
Conclusion
Page 20
CHAPTER
4
Literature Survey
Literature referred for selecting out various key concepts are divided in four main
groups stated below,
4.1
21
4.2
Testbench Architecture
Page 22
4.3
There are many Cryptographic cores used in wide range of digital systems. Any
application requiring security, like password management systems, ATM, Sensor Network, Communication networks employ application of Cryptography with
HW/SW. A broad field of Cryptographic primitives is has functions. Cryptographic Hash Functions are used in security of messages, password verification, to
check file integrity and Pseudo Random Number Generation (PRNG).
Well known and officially used Hash Function is Secure Hash Algorithm-1 (SHA1) and SHA-2. Recently serious attack has been published against SHA-1. It is
suggested that SHA-1 can be broken in near future. NIST has suggested moving
toward SHA-2 algorithm. While moving toward SHA-2 need for other more secure
hashing standard is needed for future replacements. While SHA-1 and SHA-2 share
same basic architectural elements, SHA-3 has been developed to complement SHA2 and provide greater security level. Need for different hardware implementations
of SHA-3 are discussed in.10 Detailed structure of SHA-3 Crypto Core and inside
functionality are explained in.11
4.4
Page 23
4.5
Conclusion
Page 24
Page 25
CHAPTER
5
SHA-3 Verification Plan
Verification plan gives us idea about two things mainly. Two questions are generally asked; what to verify? How to verify it? It is a blueprint of plan we
have established. The plan includes architecture of the DUT, specification extraction, creating test scenarios and testcases based on test scenarios. Verification
environment has been created based on the DUT architecture. This verification
environment includes VCs such as test module, environment module, agent and
score board etc.
Detailed verification plan also specifies DUT specifications, pin tables, VCs and
their interconnection based on verification methodology used and coverage plan.
Originally verification plan consist of verification environment, methodology used
and communication methods between VCs.
Another term is test plan, includes specific test to be applied and coverage planning. Test plan is very specific to DUT. It also includes development of function
model which is integrated in scoreboard. Function model can be developed by
personal other than verification engineer. Model in C language can be connected
by DPI-C functionality of SystemVerilog language. Detailed test plan is described
in figure below,
Specification for SHA-3 core is taken from Keccak SHA-3 documentation from
OpenCores.org. These specifications include signal details, timing and usage of
the core.
Specification for Keccak SHA-3 core is given below,
26
Width
1
1
Direction
in
in
in
byte num
in ready
is last
buffer full
out
out ready
64
3
1
1
1
512
1
in
in
in
in
out
out
out
Description
Clock applied
Synchronous reset aligned with posedge of
clk
input
Byte length of input
Input valid or not
Current input last or not
Buffer full(ready) or not
output hash result
output ready or not
5.1
Test scenarios and testcases based on that are given in table below,
Page 27
Width
1
1
Direction
in
in
in
byte num
in ready
is last
buffer full
out
out ready
32
2
1
1
1
512
1
in
in
in
in
out
out
out
Description
Clock applied
Synchronous reset aligned with posedge of
clk
input
Byte length of input
Input valid or not
Current input last or not
Buffer full(ready) or not
output hash result
output ready or not
5.2
Coverage Plan
5.2.1
Code Coverage
Code coverage can be of number of different types. Some of these types are listed
and explained in brief as given below,
Line Coverage/ Statement Coverage: It is required to get 100% line coverage in
any verification project. Line coverage includes every line of DUT code, it covers
only executable code portion and lines which are not executable such as module,
endmodule and timescale are not considered as part of line/ statement coverage.
Block Coverage: It is nearly same as statement coverage but only includes blocks
line if/else, wait, case statement etc. Block coverage is used to identify dead code
inside our design.
Conditional Coverage: It is also known as expression coverage. If Boolean conditions are given, then it will check for covered expression. It is ratio of expression
Page 28
5.2.2
Functional Coverage
Functional coverage is better than code coverage and tells what features has been
tested by particular testcase applied. Function coverage is manually added to our
test environment. By performing functional coverage we can qualify our testbench.
It also gives details about testcases that are redundant. Functional coverage can be
performed by item coverage with cover groups, cross cover groups and transition
points.
Page 29
5.3
Verification Environment
Page 30
5.4
Conclusion
This chapter represents standard verification flow to be followed with the detailed
test plan. Detailed test plan consists of DUT specifications, understanding of the
pin signals and test scenarios and testcases are developed to test SHA-3 Core
thoroughly for normal operation, corner cases and error conditions. Also detailed
test plan requires developing verification environment which is also specified above.
Another important aspect of developing verification environment is to check for
error free working environment, it can be justified by performing sanity check. It
then follows connecting DUT to the environment and adding DUT specific changes
in UVM components.
Page 31
CHAPTER
6
Simulation Results
Based on the test scenarios and testcases created in chapter 5, simulation results
obtained from the testcases are,
6.1
Test sequence for tr1 test is defined in tr1 seq class pseudo code for which looks
like given below,
32
sequencer sequencer_h;
uvm_component uvm_component_h; //Temporary handle.
task body();
//Start sequences on sequencer_h
endtask : body
endclass : tr1_seq
Page 33
Which matches output shown in the waveform. Also for tr test, test hierarchy
using print() method created is given below,
Page 34
Type
Size
Value
# -----------------------------------------------------------------# uvm_test_top
tr1_test
@460
sha3_env
@468
sha3_agent
@475
env_h
agent
agent_ap
uvm_analysis_port
@493
driver
sha3_driver
@501
rsp_port
uvm_analysis_port
@516
sqr_pull_port
uvm_seq_item_pull_port
@508
sha3_monitor
@524
uvm_analysis_port
@642
uvm_sequencer
@531
#
#
#
monitor
monitor_ap
sequencer_h
rsp_export
uvm_analysis_export
@538
seq_item_export
uvm_seq_item_pull_imp
@632
arbitration_queue
array
lock_queue
array
num_last_reqs
integral
32
d1
num_last_rsps
integral
32
d1
sha3_scoreboard
@482
uvm_tlm_analysis_fifo #(T)
@664
#
#
scoreboard
fifo
analysis_export
uvm_analysis_imp
@703
get_ap
uvm_analysis_port
@695
get_peek_export
uvm_get_peek_imp
@679
put_ap
uvm_analysis_port
@687
put_export
uvm_put_imp
@671
scoreboard_ae
uvm_analysis_export
@656
Page 35
6.2
Test Requirement 2 checks for application of empty input message on design under
test. Here, empty string is represented by and shown in waveform as sequence
of zeros. Application of tr2 test on Low throughput SHA-3 Core leads to message
digest after 24 clocks. And High throughput core yields same 512-bits of output
digest in 12 clock cycles.
Pseudo code for Test Requirement is given below,
class tr3_seq extends base_sequence;
uvm_object_utils(tr3_seq);
// Sequence handles
//Create Sequences
endfunction : new
task body();
//Start sequences
endtask : body
endclass : tr3_seq
6.3
6.4
Coverage Results
Page 36
Page 37
Page 38
CHAPTER
Aim of the thesis work is to create verification environment for SHA-3 Crypto
Processor Core in SystemVerilog Hardware Description and Verification Language
using UVM 1.1 accellera standard methodology. UVM 1.1 library comes with
QuestaSim 10.0b Simulation tool. The UVM based environmet contains standard
UVM Verification Components, Driver, Monitor, Agen, Env etc, connected via
virtual interface. Complexity of Keccak SHA-3 Crpto Core requires structural
testbench concepts used in industry. UVM methodology is industry standard
methodology evolved from OVM and VMM. With the use of HVL and appropriate methodology, to verify DUT, coverage management helps keep track of
coverage result in terms of code coverage and functional coverage. Appropriate
coverage closure enables achieve time-to-market and cost control. Coverage management being important aspect, in this work code coverage report has been created using test regression and coverage UVC keeps track of functional coverage.
Testcases have been developed considering test scenarios for appropriate functionalities. Scope of this work can also be extended to design Keccak SHA-3 RTL/
other SHS (Secure Hash Standard) RTLs and implementation on Xilinx FPGA
families for throughput and area improvement considerations. And Verification
Environment created in this work can be applied to verify RTL functionality with
minimum re-configuration applied on the Verification Environment.
39
Bibliography
[1] Jonathan Bromley. if systemverilog is so good, why we need the uvm? sharing responsibilities between libraries and the core language. in Specification
& Design Languages (FDL), April 2013.
[2] Provelengios G.; Kitsos P.; Sklavos N.; Koulamas C. fpga-based design
approaches of keccak hash function. 15th Euromicro Conference on Digital
System Design (DSD), October 2012.
[3] NIST Computer Security Division (CSD). secure hash standard (shs). In
FIPS PUB 180-4, NIST. Available online at, October 2014.
[4] NIST Computer Security Division (CSD). sha-3 standard: Permutationbased hash and extendable-output functions. Available online at, October
2014.
[5] Arshad A.; Kundi D. e. S. ; Aziz A. compact implementation of sha3-512 on
fpga. Conference on Information Assurance and Cyber Security (CIACS),
October 2014.
[6] Athanasiou G.S.; Makkas G.-P.; Theodoridis G. high throughput pipelined
fpga implementation of the new sha-3 cryptographic hash algorithm. in
6th IEEE International Symposium on Communications, Control and Signal
Processing (ISCCSP), October 2014.
[7] Michael Peeters Guido Bertoni, Joan Daemen and Gilles Van Assche. the
keccak reference. Available online at, October 2014.
[8] Rao M.; Newe T.; Grout I. efficient high speed implementation of secure
hash algorithm-3 on virtex-5 fpga. IEEE 23rd International Symposium on
Industrial Electronics (ISIE), October 2014.
40
BIBLIOGRAPHY
[9] Francesconi J.; Agustin Rodriguez J.; Julian P.M.
bench architecture for unit verification. Argentine Conference on MicroNanoelectronics, Technology and Applications (EAMTA), October 2014.
[10] N. Sklavos. towards to sha-3 hashing standard for secure communications:
On the hardware evaluation development. in Latin America Transactions,
IEEE, October 2012.
[11] W. Stallings. inside sha-3. in Potentials, IEEE, October 2013.
[12] Geng Zhong; Jian Zhou ; Bei Xia. parameter and uvm, making a layered testbench powerful. IEEE 10th International Conference on ASIC (ASICON),
October 2013.
Page 41
APPENDIX
A
List of Abbreviations
IEEE
ASIC
EDA
RTL
HDL
FPDA
DSP
FIFO
DUT-TB
VC
Verification Component
VIP
UVM
OVM
eRM
e Reuse Methodology
VMM
AVM
NIST
FIPS-PUB
SHA
AES
RSA
42
APPENDIX
B
Package File: sha3 pkg.svh
package sha3_pkg;
// Sequences
include "sequences/base_sequence.svh"
include "sequences/reset_seq.svh"
include "sequences/init_seq.svh"
include "sequences/strt_ctrl_seq.svh"
include "sequences/finish_ctrl_seq.svh"
include "sequences/msg_seq.svh"
include "sequences/empty_msg_seq.svh"
include "sequences/rndmsg_seq.svh"
include "sequences/long_msg_seq.svh"
include "sequences/tr1_seq.svh"
include "sequences/tr2_seq.svh"
include "sequences/tr3_seq.svh"
include "sequences/tr5_seq.svh"
43
// UVM Components
include "sha3_driver.svh"
include "sha3_monitor.svh"
include "sha3_agent_config.svh"
include "sha3_agent.svh"
include "sha3_scoreboard.svh"
include "sha3_env.svh"
endpackage: sha3_pkg
Page 44
APPENDIX
sha3_uvm
|__ main
|
|__ high_throughput_core
|__ low_throughput_core
|__ testbench
|__ sequences
|__ msg_seq.svh
|__ reset_seq.svh
|__ rndmsg_seq.svh
|__ empty_seq.svh
|__ tr1_seq.svh
|__ tr2_seq.svh
|__ tr3_seq.svh
|__ test
|__ sha3_base_test.svh
|__ tr1_test.svh
|__ tr2_test.svh
|__ tr3_test.svh
|__ sequence_item.svh
|__ sha3_agent.svh
|__ sha3_driver.svh
|__ sha3_env.svh
|__ sha3_monitor.svh
|__ sha3_scoreboard.svh
45
Page 46
APPENDIX
D
Review Card Compliance
Remove space
47
Page 53
APPENDIX
Writing Paper
54
APPENDIX
F
Plagiarism Report
55
Mayur Kubavat
ORIGINALITY REPORT
11
SIMILARIT Y INDEX
9%
0%
7%
PUBLICAT IONS
ST UDENT PAPERS
PRIMARY SOURCES
5%
St udent Paper
2
3
4
4%
csrc.nist.gov
Int ernet Source
2%
en.wikipedia.org
Int ernet Source
1%
EXCLUDE QUOT ES
ON
EXCLUDE
BIBLIOGRAPHY
ON
< 1%
APPENDIX
G
Progress Report
57
In this paper UVM is analyzed throughout its application that targets FIFO buffer module and
I2C EEPROM Slave Module. Paper also discusses Key concepts of UVM Class library,
Component Class, Transaction Class, and application of these features on above stated
modules.
Parameter and UVM, Making a Layered Testbench Powerful
Here focus is on creating parameterized UVM, interconnections and interoperation which is
proven useful in different kinds of scenarios.
Comparison of sharing Responsibilities between Libraries and the Core Language has been
discussed in the paper. It also explores relationship between SV and UVM.
Page 1 of 3
4. Research Methodology
1) Methodology followed is industry standard procedure used in RTL Design/Verification domain.
2) Specification Extraction from the SHA-3 Core,
3) Defining Test Scenarios and creating Testcases,
4) Development of UVM verification environment,
5) Create and apply sequences to the testbench
6) Collection of coverage information and report generation.
Page 2 of 3
Review
Literature Review
Suggestions
Instead of generalized verification plan, a
detailed verification plan for your project
29/12/2015
Dissertation Phase - 1
13/04/2015
Mid-Semester Review
functional verification.
Completed
Literature review and its relevance,
Specification extraction,
Create Test Scenarios and Testcases,
Study of SystemVerilog and Universal
Verification Methodology,
Development of major components inside
To be done
Achieve 100% code coverage,
UVM environment,
Integrating UVM environment with SHA-3
Core,
Run basic sequence.
Code testcases and running combination of
sequences,
Page 3 of 3