20
PROCESSORS FOR THE CONNECTED WORLD Your application is unique, so why isn’t your processor? RISC-V PROCESSOR VERIFICATION Challenges and Strategies

RISC-V PROCESSOR · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

Embed Size (px)

Citation preview

Page 1: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

PROCESSORS FOR THE CONNECTED WORLDYour application is unique, so why isn’t your processor?

RISC-V PROCESSOR VERIFICATIONChallenges and Strategies

Page 2: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

RISC-V ISA

Free to use, modern and open instruction set

architecture (ISA)

Originally designed to support research and

education, now standard for industry

implementations under RISC-V Foundation

No patents

Page 3: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

CODIX PROCESSOR IP CORES

Page 4: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

RISC-V VERIFICATION CHALLENGES

1 RISC-V ISA standard many RISC-V HW architecture variants:

Base is only integer instruction set (" I ")

Can be enhanced by extensions: integer multiplication and division ("M"), atomic instructions for handling real-time concurrency ("A"), IEEE floating point ("F") with double-precision ("D") and quad-precision ("Q")

Can have compressed instructions (“C")

Can have different size of the registers, i.e. 32 or 64 bits.

We do not verify only 1 processor but many of its variants with enabled/disabled extensions!

Page 5: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

2 FACTORS FOR MINIMIZING COST AND RISC

1. Automated generation of the processor, its SDK and its UVM-

based verification environment.

2. Verification strategies favoring reuse.

Page 6: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

VERIFICATION AUTOMATION

Page 7: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

UNIQUE AUTOMATION TECHNOLOGY

Processor ModelingSoftware analysis

SDK Synthesis RTL Synthesis Verification

Codix

Microarchitecture

Codix Cycle Accurate

ModelsCodix RTL ModelsCA Simulator, Profiler, Debugger

Application(s)/Programs(s)

C/C++ Compiler

Assembler

Linker

IA Simulator, Profiler, DebuggerCodix Instruction

Accurate Models

Codix CodAL Models

Codix Instruction Set

Page 8: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

AUTOMATION VS. VERIFICATION

Fewer bugs - once the tool generating RTL is debugged, then certain

types of bugs no longer occur.

Verification environment generation –from the high-level IA and CA

CodAL models.

Reference model updates - as well as new RTL (which serves in

verification as DUT), reference models from IA model in C/C++ can

be generated.

Test generation - random assembler programs generator tool

integrated in Codasip Studio.

Page 9: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

UNIQUE AUTOMATION TECHNOLOGY

Processor ModelingSoftware analysis

SDK Synthesis RTL Synthesis Verification

Codix

Microarchitecture

Codix Cycle Accurate

ModelsCodix RTL ModelsCA Simulator, Profiler, Debugger

Application(s)/Programs(s)

C/C++ Compiler

Assembler

Linker

IA Simulator, Profiler, DebuggerCodix Instruction

Accurate Models

Codix CodAL Models

Codix Instruction SetReference Models

UVM

Verification

Page 10: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

AUTOMATION: FEWER BUGS

Many bugs that can be introduced by writing RTL manually can be

avoided with generated RTL:

‘Fat finger’ errors

Logical errors – interrupts handling, decoding logic, bit-width conversions,

pipeline control, ALU operations, write-back and fetch logic, etc.

Connectivity errors –instantiation and wiring of components.

Readability of the generated code – links to CodAL make life easier

RTL generator has been made robust by years of use

Page 11: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

AUTOMATION: UVM GENERATION

Page 12: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

AUTOMATION: TESTS

Generated ISA tests can cover most of the processor functionality

Page 13: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

SUMMARY

Automation in generating RTL, UVM verification environments,

reference models and tests (programs) can rapidly improve

productivity in the development of RISC-V cores.

We do not spend a valuable time on code writing but rather on real

debugging and exploring corner cases!

Page 14: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

STRATEGIES FAVORING

REUSE

Page 15: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

REUSE OF NON-GENERATED PARTS

Following items should be reusable across RISC-V variants:

Test constraints (restrictions to random assembler generator)

Directed tests (hand-written tests that target specific usually

micro-architectural features)

Assertions

Coverage points

Page 16: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

EXAMPLE: FULL DESIGN

Bk5 model from Codasip64b+I+M+F+C

RTL, reference model, UVM verification environment,

ISA tests

GENERATE

Directed tests, assertions, coverage points

MISMATCHES FOUND, MODEL MUST BE FIXED

RESULTS OK BUT COVERAGE NOT 100%

RESULTS OK,COVERAGE 100%VERIFICATION

FINISHED

Page 17: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

EXAMPLE: SUB-DESIGN REUSE

Bk5 sub-model64b+I+M

RTL, reference model, UVM verification environment,

ISA tests

GENERATE

COPY directed tests,

assertions, coverage points from full design

RESULTS OK BUT COVERAGE NOT 100%

RESULTS OK,COVERAGE 100%VERIFICATION

FINISHED

MISMATCHES FOUND, MODEL MUST BE FIXED (not expected, everything is debugged)

Page 18: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

EXAMPLE: NEW EXTENSION

Bk5 extended model

64b+I+M+F+C+?

RTL, reference model, UVM verification environment,

ISA tests

GENERATE

COPY directed tests,

assertions, coverage points

from full design + add newconnected to extension

MISMATCHES FOUND, MODEL MUST BE FIXED (only extension-specific parts)

RESULTS OK BUT COVERAGE NOT 100%

RESULTS OK,COVERAGE 100%VERIFICATION

FINISHED

Page 19: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

SUMMARY

Automation in generating RTL, UVM verification environments,

reference models and tests (programs) can rapidly improve

productivity in the development of RISC-V cores.

We do not spend a valuable time on code writing but rather on real

debugging and exploring corner cases!

When verifying a simpler variant of a most complex RISC-V core or

when adding a user-extension, we can highly reuse existing manually

written parts of the verification environment.

Page 20: RISC-V PROCESSOR  · PDF file1 RISC-V ISA standard many RISC-V HW architecture variants: ... i.e. 32 or 64 bits. ... decoding logic, bit-width conversions, pipeline control, ALU

Thank you for your attention!

[email protected]

www.codasip.com

Bozetechova 2, Brno, Czech Republic

+420 541 141 475 (CZE)