SlideShare a Scribd company logo
1 of 22
Download to read offline
UVM-based RISC-V processor
verification platform
Tao Liu, Richard Ho, Udi Jonnalagadda
● Motivation
● What makes a good instruction generator
● Random instruction generation flow
● RTL and ISS co-simulation flow
● Benchmark
● Future work
Agenda
Open source RISC-V processor verification solutions
riscv-tests
Assembly unit test
A simple test framework focused on sanity testing the basic
functionality of each RISC-V instruction. It’s a very good starting
point to find basic implementation issues.
riscv-torture
Scala-based RISC-V assembly generator
Provides a good mix of hand-written sequences. Supports most
RISC-V ISA extensions which makes it very attractive. Simple
program structure and fixed privileged mode setting.
Verification is one of
the key challenges of
modern processor
development.
Many missing pieces
● Complex branch structure
● MMU stress testing
● Exception scenarios
● Compressed instruction support
● Full privileged mode operation
verification
● Coverage model
● ...
Motivation
Build a high quality open DV infrastructure that can be adopted and enhanced by DV
engineers to improve the verification quality of RISC-V processors.
Why SV/UVM
SystemVerilog (SV)
Most popular verification language, provides great
features like constrained random, coverage groups etc.
Universal Verification Methodology (UVM)
Most prevalent verification framework in the industry
We want to build something with the industry standard
verification language and framework which most DV
engineers can easily understand and extend.
What makes a good instruction generator
01
Randomness
Randomize everything:
instruction, ordering,
program structure,
privileged mode setting,
exceptions..
02
Architecture-aware
The generated program
should be able to hit the
corner cases of the
processor architectural
features.
04
Extendability
Easy to add new instruction
sequences, custom
instruction extension,
custom CSR etc.
03
Performance
The instruction generator
should be scalable to
generate a large program in
a short period of time.
Randomness
Instruction level randomization
Cover all possible operands and immediate values of each instruction
Example: Arithmetic overflow, divide by zero, long branch, exceptions etc.
Sequence level randomization
Maximize the possibility of instruction orders and dependencies
Program level randomization
Random privileged mode setting, page table organization, program calls
DIV Branch Load Fence Store
SHIFT
Instruction randomization
Easy part
Arithmetic: ADD, SUB, LUI, MUL, DIV ...
Shift: SLLI, SRL, SRLI, SRAI …
Logical: XOR, OR, AND, ANDI …
Compare: SLTI, SLT, SLTU …
Others: FENCE, SFENCE, EBREAK ...
Randomize each instruction individually with
bias towards corner cases.
(overflow, underflow, compressed
instruction)
Tricky part
Branch / jump instruction
Need a valid branch/jump target
Avoid infinite loop
Load/store/jump instruction
Need an additional instruction to setup the base address
The calculated address should be a valid location
CSR instruction
Avoid randomly changing the privileged state
Result checking could be a challenge as the privileged
CSR behavior could be implementation-specific.
Load/store instruction generation
la x10, data_label
lw x11, x10, 20
la x10, data_label
add x12, x13, x14
xor x14, x5, x6
lw x11, x10, 20
A basic load/store instruction needs additional
instruction to setup the base address (rs1)
Mix the atomic instruction stream with other
irrelevant instructions to improve instruction order
combination coverage
Basic load/store instruction
Similar atomic instruction stream
JAL/JALR
Stack push/pop operations
Loop structure
Forward branch
Branch instruction generation
Randomly pick a forward target
Avoid step into the atomic instruction
stream
1
2
3
4
5
6
7
OK
OK
Not allowed
Mostly OK
Atomic
instruction
stream
Backward branch
A dedicated instruction stream to properly
setup loop structure, make sure the loop exit
condition can be triggered
Init loop counter register
… ...
Init loop limit register
… ...
… ...
… ...
Update loop counter register
… ...
Backward branch instruction
Call stack randomization
A A B
A B N
...
Avoid loop function call
Main
Sub1 Sub2 Sub3 Sub4
Sub5 Sub6 Sub7
Subn
Generate call stack in a tree structure
Page table randomization
PPN2 PPN1 PPN0 PPN2 PPN1 PPN0
PPN2 PPN1 PPN0
PPN2 PPN1 PPN0 PPN2 PPN1 PPN0
PPN2 PPN1 PPN0
PPN2 PPN1 PPN0
... ... ...
... ... ...
PPN2 PPN1 PPN0
... ... ...
... ... ...
PPN2 PPN1 PPN0
... ... ...
... ... ...
Example: SV39 page table randomization (with exception injection)
4KB
!
!
!
Root table (1GiB) Level 1 page (2MiB) Level 0 page (4KiB)
Architecture aware
01 Branch prediction 02 MMU (TLB, Cache etc)
Code segment 0
Code segment n
Code segment k
Data page 0
Data page 1
Data page 2
Data page 3
Data page 4
Data page 5
Data page 6
Data page 7
Data page 8
Data page 9
Load
Store
Jump
Jump
BHT
Address
TAG
Prediction
bits
M
U
U
Trap handler
S
Trap
Instruction
Architecture aware
03 Issue, execute, commit
It’s not just a random stream
of instructions, it should be
designed to effectively verify
the architectural features of
the processor.
R3 <- R4 + R5
R1 <- R3 + R8
RAW
R2 <- R4 + R5
R4 <- R3 - R8
WAR
R2 <- R4 + R5
R2 <- R3 + R8
WAW
Issue
Execution
unit
Execution
unit
Execution
unit
Commit
Exceptions
!
Generator
flow
Generate program header
Privileged mode setup
Page table randomization
Initialization routine
Generate main/sub programs
Branch target assignment
Generate data/stack section
Generate page tables
Generate intr/trap handler
Test completion section
Call stack randomization
Apply directed instructions
Memory map
All instructions and data are located in
continuous physical address space, and
are mapped to the virtual address space
through page table.
Initialization routine
Main program
Sub program 0
… ...
Sub program n
Interrupt handler
ECALL handler
Exception handler
Data page 0
Data page n
….
Stack section
Instruction
Data
Stack
reset entry
Page table 0
Page table n
... Page table
satp
RTL & ISS co-simulation flow
UVM random
instruction
generator
RISC-V
compiler
RISC-V
ELF
Link script
RISC-V
assembly
RISC-V ISS
(spike)
ISS sim
log
RISC-V plain
binary
RISC-V
Processor
DUT
Memory
model
RTL sim
log
Log
compare
objcopy
RTL simulation environment
Complete feature list
Test suite
Basic arithmetic instruction test
Random instruction test
MMU stress test
Page table exception test
HW/SW interrupt test
Branch/jump instruction stress test
Interrupt/trap delegation test
Privileged CSR test
Supported ISA
RV32IMC, RV64IMC
Supported privileged mode
User mode, supervisor mode, machine mode
Supported spec version
User level spec 2.20, privileged mode spec 1.10
Supported RTL simulator
VCS, Incisive
Benchmark flow
Pulpino RI5CY:
4 stages, RV32-IMC, DSP extension
Pulpino Ariane :
6-stage, RV64-IMC, single issue,
in-order, support M/S/U privileged levels
Merlin:
Open Source RV32I[C] CPU
Ariane core architecture
Processor candidates
Benchmark metrics
Bug hunting capability, test coverage
Flow integration effort, performance
ISS simulator
Spike
Cache line access racing
Bugs found
Load
Store
Load
Load
SSTATUS
MSTATUS
mxr ...
mxr ...
wr rd
Issue
LSU
ALU
...
Multiplier
Fence
PT 1
PT 0 PT 2
PT 3
PT 4
Load Branch Add ... Mult
privileged CSR access FENCE operation failure
page fault handling Incorrect branch execution
MULHSU
ALU corner case bug
Build it
together.
It’s just the beginning ...
More instruction extensions support F/V/A
Performance verification suite
Security verification
Coverage model
...
Planned release date: 01/2019
Please sign up Google group “riscv-dv” for
further update
https://groups.google.com/forum/#!foru
m/riscv-dv
Reference
● riscv-tests
● riscv-torture
● Ariane core specification
● RI5CY core specification
● Merline core specification
● UVM (Universal Verification Methodology)

More Related Content

Similar to UVM-based RISC-V processor Verification Paltform ---.pdf

[Apostila] programação arduíno brian w. evans
[Apostila] programação arduíno   brian w. evans[Apostila] programação arduíno   brian w. evans
[Apostila] programação arduíno brian w. evansWeb-Desegner
 
tau 2015 spyrou fpga timing
tau 2015 spyrou fpga timingtau 2015 spyrou fpga timing
tau 2015 spyrou fpga timingTom Spyrou
 
Instruction Level Parallelism – Compiler Techniques
Instruction Level Parallelism – Compiler TechniquesInstruction Level Parallelism – Compiler Techniques
Instruction Level Parallelism – Compiler TechniquesDilum Bandara
 
Android RenderScript on LLVM
Android RenderScript on LLVMAndroid RenderScript on LLVM
Android RenderScript on LLVMJohn Lee
 
HKG15-300: Art's Quick Compiler: An unofficial overview
HKG15-300: Art's Quick Compiler: An unofficial overviewHKG15-300: Art's Quick Compiler: An unofficial overview
HKG15-300: Art's Quick Compiler: An unofficial overviewLinaro
 
RailswayCon 2010 - Dynamic Language VMs
RailswayCon 2010 - Dynamic Language VMsRailswayCon 2010 - Dynamic Language VMs
RailswayCon 2010 - Dynamic Language VMsLourens Naudé
 
Grow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM StackGrow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM StackKeitaSugiyama1
 
Copper: A high performance workflow engine
Copper: A high performance workflow engineCopper: A high performance workflow engine
Copper: A high performance workflow enginedmoebius
 
Combining Phase Identification and Statistic Modeling for Automated Parallel ...
Combining Phase Identification and Statistic Modeling for Automated Parallel ...Combining Phase Identification and Statistic Modeling for Automated Parallel ...
Combining Phase Identification and Statistic Modeling for Automated Parallel ...Mingliang Liu
 
Checking the Code of LDAP-Server ReOpenLDAP on Our Readers' Request
Checking the Code of LDAP-Server ReOpenLDAP on Our Readers' RequestChecking the Code of LDAP-Server ReOpenLDAP on Our Readers' Request
Checking the Code of LDAP-Server ReOpenLDAP on Our Readers' RequestPVS-Studio
 
PCI Express Verification using Reference Modeling
PCI Express Verification using Reference ModelingPCI Express Verification using Reference Modeling
PCI Express Verification using Reference ModelingDVClub
 
May2010 hex-core-opt
May2010 hex-core-optMay2010 hex-core-opt
May2010 hex-core-optJeff Larkin
 
Siggraph 2016 - Vulkan and nvidia : the essentials
Siggraph 2016 - Vulkan and nvidia : the essentialsSiggraph 2016 - Vulkan and nvidia : the essentials
Siggraph 2016 - Vulkan and nvidia : the essentialsTristan Lorach
 
IBM SAN Volume Controller Performance Analysis
IBM SAN Volume Controller Performance AnalysisIBM SAN Volume Controller Performance Analysis
IBM SAN Volume Controller Performance Analysisbrettallison
 
Web Template Mechanisms in SOC Verification - DVCon.pdf
Web Template Mechanisms in SOC Verification - DVCon.pdfWeb Template Mechanisms in SOC Verification - DVCon.pdf
Web Template Mechanisms in SOC Verification - DVCon.pdfSamHoney6
 

Similar to UVM-based RISC-V processor Verification Paltform ---.pdf (20)

[Apostila] programação arduíno brian w. evans
[Apostila] programação arduíno   brian w. evans[Apostila] programação arduíno   brian w. evans
[Apostila] programação arduíno brian w. evans
 
tau 2015 spyrou fpga timing
tau 2015 spyrou fpga timingtau 2015 spyrou fpga timing
tau 2015 spyrou fpga timing
 
Instruction Level Parallelism – Compiler Techniques
Instruction Level Parallelism – Compiler TechniquesInstruction Level Parallelism – Compiler Techniques
Instruction Level Parallelism – Compiler Techniques
 
Android RenderScript on LLVM
Android RenderScript on LLVMAndroid RenderScript on LLVM
Android RenderScript on LLVM
 
HKG15-300: Art's Quick Compiler: An unofficial overview
HKG15-300: Art's Quick Compiler: An unofficial overviewHKG15-300: Art's Quick Compiler: An unofficial overview
HKG15-300: Art's Quick Compiler: An unofficial overview
 
RailswayCon 2010 - Dynamic Language VMs
RailswayCon 2010 - Dynamic Language VMsRailswayCon 2010 - Dynamic Language VMs
RailswayCon 2010 - Dynamic Language VMs
 
PhD Slides
PhD SlidesPhD Slides
PhD Slides
 
Grow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM StackGrow and Shrink - Dynamically Extending the Ruby VM Stack
Grow and Shrink - Dynamically Extending the Ruby VM Stack
 
Copper: A high performance workflow engine
Copper: A high performance workflow engineCopper: A high performance workflow engine
Copper: A high performance workflow engine
 
Combining Phase Identification and Statistic Modeling for Automated Parallel ...
Combining Phase Identification and Statistic Modeling for Automated Parallel ...Combining Phase Identification and Statistic Modeling for Automated Parallel ...
Combining Phase Identification and Statistic Modeling for Automated Parallel ...
 
Lect 1.pptx
Lect 1.pptxLect 1.pptx
Lect 1.pptx
 
Introduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSPIntroduction to Blackfin BF532 DSP
Introduction to Blackfin BF532 DSP
 
Dpdk applications
Dpdk applicationsDpdk applications
Dpdk applications
 
Checking the Code of LDAP-Server ReOpenLDAP on Our Readers' Request
Checking the Code of LDAP-Server ReOpenLDAP on Our Readers' RequestChecking the Code of LDAP-Server ReOpenLDAP on Our Readers' Request
Checking the Code of LDAP-Server ReOpenLDAP on Our Readers' Request
 
PCI Express Verification using Reference Modeling
PCI Express Verification using Reference ModelingPCI Express Verification using Reference Modeling
PCI Express Verification using Reference Modeling
 
Presentation
PresentationPresentation
Presentation
 
May2010 hex-core-opt
May2010 hex-core-optMay2010 hex-core-opt
May2010 hex-core-opt
 
Siggraph 2016 - Vulkan and nvidia : the essentials
Siggraph 2016 - Vulkan and nvidia : the essentialsSiggraph 2016 - Vulkan and nvidia : the essentials
Siggraph 2016 - Vulkan and nvidia : the essentials
 
IBM SAN Volume Controller Performance Analysis
IBM SAN Volume Controller Performance AnalysisIBM SAN Volume Controller Performance Analysis
IBM SAN Volume Controller Performance Analysis
 
Web Template Mechanisms in SOC Verification - DVCon.pdf
Web Template Mechanisms in SOC Verification - DVCon.pdfWeb Template Mechanisms in SOC Verification - DVCon.pdf
Web Template Mechanisms in SOC Verification - DVCon.pdf
 

More from SamHoney6

eetop.cn_UVM_REG_workshop.--------------pdf
eetop.cn_UVM_REG_workshop.--------------pdfeetop.cn_UVM_REG_workshop.--------------pdf
eetop.cn_UVM_REG_workshop.--------------pdfSamHoney6
 
Cadence GenusTutorial------------ .pdf.pdf
Cadence GenusTutorial------------ .pdf.pdfCadence GenusTutorial------------ .pdf.pdf
Cadence GenusTutorial------------ .pdf.pdfSamHoney6
 
snug07_Verilog Gotchas for Verification.pdf
snug07_Verilog Gotchas for Verification.pdfsnug07_Verilog Gotchas for Verification.pdf
snug07_Verilog Gotchas for Verification.pdfSamHoney6
 
04+ECETEMT092-+WDT+APB+UVM.pdf
04+ECETEMT092-+WDT+APB+UVM.pdf04+ECETEMT092-+WDT+APB+UVM.pdf
04+ECETEMT092-+WDT+APB+UVM.pdfSamHoney6
 
14-Bill-Tiffany-SigmaSense-VF2023.pdf
14-Bill-Tiffany-SigmaSense-VF2023.pdf14-Bill-Tiffany-SigmaSense-VF2023.pdf
14-Bill-Tiffany-SigmaSense-VF2023.pdfSamHoney6
 
RF-Transceiver.pdf
RF-Transceiver.pdfRF-Transceiver.pdf
RF-Transceiver.pdfSamHoney6
 
inf5430_sv_randomization.pdf
inf5430_sv_randomization.pdfinf5430_sv_randomization.pdf
inf5430_sv_randomization.pdfSamHoney6
 
FAC14_Vlach.pdf
FAC14_Vlach.pdfFAC14_Vlach.pdf
FAC14_Vlach.pdfSamHoney6
 
vip-shielding.pdf
vip-shielding.pdfvip-shielding.pdf
vip-shielding.pdfSamHoney6
 
UVM_TB_20220621_slides-1.pdf
UVM_TB_20220621_slides-1.pdfUVM_TB_20220621_slides-1.pdf
UVM_TB_20220621_slides-1.pdfSamHoney6
 
cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...
cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...
cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...SamHoney6
 
SVA Advanced Topics- SVAUnit and Assertions for Introduction to SystemVerilog...
SVA Advanced Topics- SVAUnit and Assertions for Introduction to SystemVerilog...SVA Advanced Topics- SVAUnit and Assertions for Introduction to SystemVerilog...
SVA Advanced Topics- SVAUnit and Assertions for Introduction to SystemVerilog...SamHoney6
 

More from SamHoney6 (13)

eetop.cn_UVM_REG_workshop.--------------pdf
eetop.cn_UVM_REG_workshop.--------------pdfeetop.cn_UVM_REG_workshop.--------------pdf
eetop.cn_UVM_REG_workshop.--------------pdf
 
Cadence GenusTutorial------------ .pdf.pdf
Cadence GenusTutorial------------ .pdf.pdfCadence GenusTutorial------------ .pdf.pdf
Cadence GenusTutorial------------ .pdf.pdf
 
snug07_Verilog Gotchas for Verification.pdf
snug07_Verilog Gotchas for Verification.pdfsnug07_Verilog Gotchas for Verification.pdf
snug07_Verilog Gotchas for Verification.pdf
 
04+ECETEMT092-+WDT+APB+UVM.pdf
04+ECETEMT092-+WDT+APB+UVM.pdf04+ECETEMT092-+WDT+APB+UVM.pdf
04+ECETEMT092-+WDT+APB+UVM.pdf
 
14-Bill-Tiffany-SigmaSense-VF2023.pdf
14-Bill-Tiffany-SigmaSense-VF2023.pdf14-Bill-Tiffany-SigmaSense-VF2023.pdf
14-Bill-Tiffany-SigmaSense-VF2023.pdf
 
RF-Transceiver.pdf
RF-Transceiver.pdfRF-Transceiver.pdf
RF-Transceiver.pdf
 
inf5430_sv_randomization.pdf
inf5430_sv_randomization.pdfinf5430_sv_randomization.pdf
inf5430_sv_randomization.pdf
 
FAC14_Vlach.pdf
FAC14_Vlach.pdfFAC14_Vlach.pdf
FAC14_Vlach.pdf
 
vip-shielding.pdf
vip-shielding.pdfvip-shielding.pdf
vip-shielding.pdf
 
UVM_TB_20220621_slides-1.pdf
UVM_TB_20220621_slides-1.pdfUVM_TB_20220621_slides-1.pdf
UVM_TB_20220621_slides-1.pdf
 
Sva.pdf
Sva.pdfSva.pdf
Sva.pdf
 
cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...
cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...
cupdf.com_chapter-11-system-level-verification-issues-the-importance-of-verif...
 
SVA Advanced Topics- SVAUnit and Assertions for Introduction to SystemVerilog...
SVA Advanced Topics- SVAUnit and Assertions for Introduction to SystemVerilog...SVA Advanced Topics- SVAUnit and Assertions for Introduction to SystemVerilog...
SVA Advanced Topics- SVAUnit and Assertions for Introduction to SystemVerilog...
 

Recently uploaded

➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...amitlee9823
 
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...Naicy mandal
 
HLH PPT.ppt very important topic to discuss
HLH PPT.ppt very important topic to discussHLH PPT.ppt very important topic to discuss
HLH PPT.ppt very important topic to discussDrMSajidNoor
 
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...amitlee9823
 
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...ranjana rawat
 
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...amitlee9823
 
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...Pooja Nehwal
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)amitlee9823
 
Call Girls in Vashi Escorts Services - 7738631006
Call Girls in Vashi Escorts Services - 7738631006Call Girls in Vashi Escorts Services - 7738631006
Call Girls in Vashi Escorts Services - 7738631006Pooja Nehwal
 
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...Call Girls in Nagpur High Profile
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...motiram463
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证tufbav
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...drmarathore
 
Introduction-to-4x4-SRAM-Memory-Block.pptx
Introduction-to-4x4-SRAM-Memory-Block.pptxIntroduction-to-4x4-SRAM-Memory-Block.pptx
Introduction-to-4x4-SRAM-Memory-Block.pptxJaiLegal
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...Amil baba
 
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...amitlee9823
 

Recently uploaded (20)

➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
 
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
 
HLH PPT.ppt very important topic to discuss
HLH PPT.ppt very important topic to discussHLH PPT.ppt very important topic to discuss
HLH PPT.ppt very important topic to discuss
 
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men  🔝Deoghar🔝   Escorts...
➥🔝 7737669865 🔝▻ Deoghar Call-girls in Women Seeking Men 🔝Deoghar🔝 Escorts...
 
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
Book Paid Lohegaon Call Girls Pune 8250192130Low Budget Full Independent High...
 
CHEAP Call Girls in Ashok Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Ashok Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Ashok Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Ashok Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
 
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
Call Now ≽ 9953056974 ≼🔝 Call Girls In Yusuf Sarai ≼🔝 Delhi door step delevry≼🔝
 
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
Call Girls in Vashi Escorts Services - 7738631006
Call Girls in Vashi Escorts Services - 7738631006Call Girls in Vashi Escorts Services - 7738631006
Call Girls in Vashi Escorts Services - 7738631006
 
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...Book Sex Workers Available Pune Call Girls Yerwada  6297143586 Call Hot India...
Book Sex Workers Available Pune Call Girls Yerwada 6297143586 Call Hot India...
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
 
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
怎样办理斯威本科技大学毕业证(SUT毕业证书)成绩单留信认证
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
 
Introduction-to-4x4-SRAM-Memory-Block.pptx
Introduction-to-4x4-SRAM-Memory-Block.pptxIntroduction-to-4x4-SRAM-Memory-Block.pptx
Introduction-to-4x4-SRAM-Memory-Block.pptx
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
 
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
 
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
 

UVM-based RISC-V processor Verification Paltform ---.pdf

  • 1. UVM-based RISC-V processor verification platform Tao Liu, Richard Ho, Udi Jonnalagadda
  • 2. ● Motivation ● What makes a good instruction generator ● Random instruction generation flow ● RTL and ISS co-simulation flow ● Benchmark ● Future work Agenda
  • 3. Open source RISC-V processor verification solutions riscv-tests Assembly unit test A simple test framework focused on sanity testing the basic functionality of each RISC-V instruction. It’s a very good starting point to find basic implementation issues. riscv-torture Scala-based RISC-V assembly generator Provides a good mix of hand-written sequences. Supports most RISC-V ISA extensions which makes it very attractive. Simple program structure and fixed privileged mode setting. Verification is one of the key challenges of modern processor development.
  • 4. Many missing pieces ● Complex branch structure ● MMU stress testing ● Exception scenarios ● Compressed instruction support ● Full privileged mode operation verification ● Coverage model ● ... Motivation Build a high quality open DV infrastructure that can be adopted and enhanced by DV engineers to improve the verification quality of RISC-V processors.
  • 5. Why SV/UVM SystemVerilog (SV) Most popular verification language, provides great features like constrained random, coverage groups etc. Universal Verification Methodology (UVM) Most prevalent verification framework in the industry We want to build something with the industry standard verification language and framework which most DV engineers can easily understand and extend.
  • 6. What makes a good instruction generator 01 Randomness Randomize everything: instruction, ordering, program structure, privileged mode setting, exceptions.. 02 Architecture-aware The generated program should be able to hit the corner cases of the processor architectural features. 04 Extendability Easy to add new instruction sequences, custom instruction extension, custom CSR etc. 03 Performance The instruction generator should be scalable to generate a large program in a short period of time.
  • 7. Randomness Instruction level randomization Cover all possible operands and immediate values of each instruction Example: Arithmetic overflow, divide by zero, long branch, exceptions etc. Sequence level randomization Maximize the possibility of instruction orders and dependencies Program level randomization Random privileged mode setting, page table organization, program calls DIV Branch Load Fence Store SHIFT
  • 8. Instruction randomization Easy part Arithmetic: ADD, SUB, LUI, MUL, DIV ... Shift: SLLI, SRL, SRLI, SRAI … Logical: XOR, OR, AND, ANDI … Compare: SLTI, SLT, SLTU … Others: FENCE, SFENCE, EBREAK ... Randomize each instruction individually with bias towards corner cases. (overflow, underflow, compressed instruction) Tricky part Branch / jump instruction Need a valid branch/jump target Avoid infinite loop Load/store/jump instruction Need an additional instruction to setup the base address The calculated address should be a valid location CSR instruction Avoid randomly changing the privileged state Result checking could be a challenge as the privileged CSR behavior could be implementation-specific.
  • 9. Load/store instruction generation la x10, data_label lw x11, x10, 20 la x10, data_label add x12, x13, x14 xor x14, x5, x6 lw x11, x10, 20 A basic load/store instruction needs additional instruction to setup the base address (rs1) Mix the atomic instruction stream with other irrelevant instructions to improve instruction order combination coverage Basic load/store instruction Similar atomic instruction stream JAL/JALR Stack push/pop operations Loop structure
  • 10. Forward branch Branch instruction generation Randomly pick a forward target Avoid step into the atomic instruction stream 1 2 3 4 5 6 7 OK OK Not allowed Mostly OK Atomic instruction stream Backward branch A dedicated instruction stream to properly setup loop structure, make sure the loop exit condition can be triggered Init loop counter register … ... Init loop limit register … ... … ... … ... Update loop counter register … ... Backward branch instruction
  • 11. Call stack randomization A A B A B N ... Avoid loop function call Main Sub1 Sub2 Sub3 Sub4 Sub5 Sub6 Sub7 Subn Generate call stack in a tree structure
  • 12. Page table randomization PPN2 PPN1 PPN0 PPN2 PPN1 PPN0 PPN2 PPN1 PPN0 PPN2 PPN1 PPN0 PPN2 PPN1 PPN0 PPN2 PPN1 PPN0 PPN2 PPN1 PPN0 ... ... ... ... ... ... PPN2 PPN1 PPN0 ... ... ... ... ... ... PPN2 PPN1 PPN0 ... ... ... ... ... ... Example: SV39 page table randomization (with exception injection) 4KB ! ! ! Root table (1GiB) Level 1 page (2MiB) Level 0 page (4KiB)
  • 13. Architecture aware 01 Branch prediction 02 MMU (TLB, Cache etc) Code segment 0 Code segment n Code segment k Data page 0 Data page 1 Data page 2 Data page 3 Data page 4 Data page 5 Data page 6 Data page 7 Data page 8 Data page 9 Load Store Jump Jump BHT Address TAG Prediction bits M U U Trap handler S Trap Instruction
  • 14. Architecture aware 03 Issue, execute, commit It’s not just a random stream of instructions, it should be designed to effectively verify the architectural features of the processor. R3 <- R4 + R5 R1 <- R3 + R8 RAW R2 <- R4 + R5 R4 <- R3 - R8 WAR R2 <- R4 + R5 R2 <- R3 + R8 WAW Issue Execution unit Execution unit Execution unit Commit Exceptions !
  • 15. Generator flow Generate program header Privileged mode setup Page table randomization Initialization routine Generate main/sub programs Branch target assignment Generate data/stack section Generate page tables Generate intr/trap handler Test completion section Call stack randomization Apply directed instructions
  • 16. Memory map All instructions and data are located in continuous physical address space, and are mapped to the virtual address space through page table. Initialization routine Main program Sub program 0 … ... Sub program n Interrupt handler ECALL handler Exception handler Data page 0 Data page n …. Stack section Instruction Data Stack reset entry Page table 0 Page table n ... Page table satp
  • 17. RTL & ISS co-simulation flow UVM random instruction generator RISC-V compiler RISC-V ELF Link script RISC-V assembly RISC-V ISS (spike) ISS sim log RISC-V plain binary RISC-V Processor DUT Memory model RTL sim log Log compare objcopy RTL simulation environment
  • 18. Complete feature list Test suite Basic arithmetic instruction test Random instruction test MMU stress test Page table exception test HW/SW interrupt test Branch/jump instruction stress test Interrupt/trap delegation test Privileged CSR test Supported ISA RV32IMC, RV64IMC Supported privileged mode User mode, supervisor mode, machine mode Supported spec version User level spec 2.20, privileged mode spec 1.10 Supported RTL simulator VCS, Incisive
  • 19. Benchmark flow Pulpino RI5CY: 4 stages, RV32-IMC, DSP extension Pulpino Ariane : 6-stage, RV64-IMC, single issue, in-order, support M/S/U privileged levels Merlin: Open Source RV32I[C] CPU Ariane core architecture Processor candidates Benchmark metrics Bug hunting capability, test coverage Flow integration effort, performance ISS simulator Spike
  • 20. Cache line access racing Bugs found Load Store Load Load SSTATUS MSTATUS mxr ... mxr ... wr rd Issue LSU ALU ... Multiplier Fence PT 1 PT 0 PT 2 PT 3 PT 4 Load Branch Add ... Mult privileged CSR access FENCE operation failure page fault handling Incorrect branch execution MULHSU ALU corner case bug
  • 21. Build it together. It’s just the beginning ... More instruction extensions support F/V/A Performance verification suite Security verification Coverage model ... Planned release date: 01/2019 Please sign up Google group “riscv-dv” for further update https://groups.google.com/forum/#!foru m/riscv-dv
  • 22. Reference ● riscv-tests ● riscv-torture ● Ariane core specification ● RI5CY core specification ● Merline core specification ● UVM (Universal Verification Methodology)