risc-v configurability in compliance test framework · high-level oop description o fast code...

16
RISC-V Configurability in Compliance Test Framework Milan Skála Radek Hájek

Upload: others

Post on 15-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: RISC-V Configurability in Compliance Test Framework · High-level OOP description o Fast code implementation o Easily readable • Pytest o Package for automated testing o Supports

RISC-V Configurability in Compliance Test

FrameworkMilan Skála

Radek Hájek

Page 2: RISC-V Configurability in Compliance Test Framework · High-level OOP description o Fast code implementation o Easily readable • Pytest o Package for automated testing o Supports

Agenda

• Achievements and activities of Codasip in Compliance Task Group• What is Codasip Compliance Framework• Framework scheme• Automatic plugin generation• Custom model integration process• Framework reporting• Automatic test selection

Codasip GmbH 2

Page 3: RISC-V Configurability in Compliance Test Framework · High-level OOP description o Fast code implementation o Easily readable • Pytest o Package for automated testing o Supports

Achievements and Activitiesof Codasip in CTG

• Initialized RISC-V compliance test process definition• Implementation of RV32I tests• Proposal of test format specification• Compliance framework implementation

Codasip GmbH 3

Page 4: RISC-V Configurability in Compliance Test Framework · High-level OOP description o Fast code implementation o Easily readable • Pytest o Package for automated testing o Supports

Compliance Test Format

• Unified directory structure

• File naming convention

• Test structureo Unified user defined macros for test sectionso Common header files

• Signature format specification

• Glossary definition

Codasip GmbH 4

Page 5: RISC-V Configurability in Compliance Test Framework · High-level OOP description o Fast code implementation o Easily readable • Pytest o Package for automated testing o Supports

Codasip Compliance Framework

• High-level framework for compliance testing of RISC-V models

• Highlighted features: Supports any implementation of RISC-V processor (ISA, RTL, ...) Easily extensible with new tests and models Automatic tests selection based on tested model configuration Support of custom toolchain for tests compilation Simple and intuitive user interface User-friendly reporting system

Codasip GmbH 5

Předvádějící
Poznámky prezentace
Note: Brief description of its origin – started as a master thesis…
Page 6: RISC-V Configurability in Compliance Test Framework · High-level OOP description o Fast code implementation o Easily readable • Pytest o Package for automated testing o Supports

Selected Technology• Python 3

o High-level OOP descriptiono Fast code implementationo Easily readable

• Pytesto Package for automated testingo Supports full customization of the testing processo Allows implementing custom plugins and their easy integration

• xdist plugino Parallel test execution

Codasip GmbH 6

Page 7: RISC-V Configurability in Compliance Test Framework · High-level OOP description o Fast code implementation o Easily readable • Pytest o Package for automated testing o Supports

Compliance Framework Scheme

Codasip GmbH 7

Page 8: RISC-V Configurability in Compliance Test Framework · High-level OOP description o Fast code implementation o Easily readable • Pytest o Package for automated testing o Supports

Plugin Structure

Codasip GmbH 8

• Abstract modelo Implements functional behavior of the tested modelo Responsible for signature extraction

• Compiler wrappero Needed only when using custom toolchain (not RISC-V GCC)o Responsible for correct assembly compilation

• Environmento Contains files for correct compilation process (header files, linker

scripts, etc.)

Page 9: RISC-V Configurability in Compliance Test Framework · High-level OOP description o Fast code implementation o Easily readable • Pytest o Package for automated testing o Supports

Automatic User Plugin GenerationThe frameworkimplements a plugin generator for easier model integration

Codasip GmbH 9

Page 10: RISC-V Configurability in Compliance Test Framework · High-level OOP description o Fast code implementation o Easily readable • Pytest o Package for automated testing o Supports

Custom Model Integration1. Generate a plugin using the plugin generator

• Creates directory structure and default implementations

2. Define macros for the custom processor model• Program start, memory size, reset vector address, etc.

3. Implement a custom compiler wrapper if needed• Default implementation is auto-generated, but can be overridden

4. Implement abstract model behavior• Specification of arguments and execution of custom RISC-V model

5. Execute test suite

Codasip GmbH 10

Page 11: RISC-V Configurability in Compliance Test Framework · High-level OOP description o Fast code implementation o Easily readable • Pytest o Package for automated testing o Supports

Framework Reporting

• Framework generates reports in multiple formats:

o XML report for machine post-processing

o HTML report for user-friendliness

• Ability to filter tests by theresult (passed, failed, skipped)

Codasip GmbH 11

Page 12: RISC-V Configurability in Compliance Test Framework · High-level OOP description o Fast code implementation o Easily readable • Pytest o Package for automated testing o Supports

Framework Reporting: Console

Codasip GmbH 12

Page 13: RISC-V Configurability in Compliance Test Framework · High-level OOP description o Fast code implementation o Easily readable • Pytest o Package for automated testing o Supports

Automatic Test Selection

• Framework selects and executes only tests that should pass on a specific RISC-V configuration

• Uses Pytest markerso Easy way to filter testso Can be parametrizedo Extensible for any RISC-V feature or configuration option

Codasip GmbH 13

Page 14: RISC-V Configurability in Compliance Test Framework · High-level OOP description o Fast code implementation o Easily readable • Pytest o Package for automated testing o Supports

Automatic Test Selection

Codasip GmbH 14

Page 15: RISC-V Configurability in Compliance Test Framework · High-level OOP description o Fast code implementation o Easily readable • Pytest o Package for automated testing o Supports

Supported Targets

• Codasip SDK + Codasip simulator (Bk series)• RISC-V GCC + Codasip simulator (Bk series)• RISC-V GCC + riscvOVPsim by Imperas• ri5cy verilator – RI5CY core + verilator• Codasip SDK + Codasip RTL (proprietary)

Codasip GmbH 15