Professional Documents
Culture Documents
UVM and Formal Verification of AES Module
UVM and Formal Verification of AES Module
Aggarwal, Rohit
Sayal, Aseem
Srivastava, Prateek
04-20-2017
Agenda
• Motivation
• Highlights
• AES Algorithm
• DUT Specifications
• Verification Methodology
• UVM Methodology/Setup
• UVM Results
• Formal Verification Methodology/Setup
• Formal Verification Results
• Conclusion
• Next Steps
• Key Learnings
Motivation – Why AES?
• Advanced Encryption Standard (AES) is the most widely adopted
encryption standard
Rows
Shifting
Column
Mixing
Round key • XOR operation of bytes with the round key
• The final output obtained is fed to next round
• Solution:
• Use FIFO (Not implemented)
• Use objections. Driver raises objection in run phase and lowers the objection
only after DUT gives final results (Implemented)
UVM Monitor
• Issues similar to Driver
SV Assertions
(AES Core and AES Encipher)
AES Core FSM
• Begins in CTRL_IDLE state
• If INIT signal is high, it goes to state
CTRL_INIT & performs key expansion
• When key expansion is done, KEY_
READY signal is set high, which makes
it return back to CTRL_IDLE
• After this, next signal is set high, which
takes the design in CTRL_NEXT state
• In this state, one round of encipher
/decipher is performed
• After completing one round the design
goes back to CTRL_IDLE state (when
MUXED_READY is high)
• This process continues for 10 rounds
to get the final encrypted/decrypted
text (14 rounds for 256 bit key)
AES Encipher
• Begins in CTRL_IDLE state
• To begin the next round, next signal is set high,
and the control passes to CTRL_INIT state
• Calculates the initial block by XORing the input
with the initial round key.
• Goes to CTRL_SBOX state; finds the S-box for the
input block, by looking up in the ROM word by
word. Stays in this state for 4 cycles
• SWORD_CTR_REGè3, goes to CTRL_MAIN state
• In CTRL_MAIN state, increments the ROUND_
CTR_REG and updates the block
• If the ROUND_CTR_REG is still less than
NUM_ROUNDS, it goes back to CTRL_SBOX state
to begin the next round otherwise it sets the ready
signal high and goes to CTRL_IDLE state.
FV Issues & Resolution
Issue 1: Verilog Syntax
• UVM test bench setup è High initial setup time and complex
framework, but provides modularity and reusability for future
runs
Q&A