CTK

CTK is the Compliance Test Kit used to generate a directory of tests given an ISA string (e.g. "rv64imfv").

  • For a first time tutorial of how to use CTK, see the tutorial at CTK - Getting Started for a walkthrough of how to use CTK.

  • If you want to get started quickly, see the Generating A Vector Test Kit User Guide for a quick start guide on how to generate a test kit for a single extension.

Command-line Interface

The main entry point for the framework is the ctk.py orchestrator script. To see available run options, run:

ctk  -h

To generate a test kit, use

ctk  --isa <isa> --run_dir path/to/output_directory

The ctk python library can also be used to generate a test kit.

from riescue import Ctk

Ctk.run_cli("--isa <isa> --run_dir path/to/output_directory")

API

The Ctk python library can also be used to generate a test kit.

class riescue.Ctk(seed: int, run_dir: Path, toolchain: Toolchain)

Bases: CliBase

Compliance Test Kit. Generates a directory of RiescueC tests given an ISA and CPU configuration.

Parameters:
  • seed – Seed for the test. Used as starting seed for test kit

  • run_dir – Run directory where the test will be run

  • toolchain – Configured Toolchain object. If none provided, a default Toolchain object will be used (assumes whisper and spike are available in environment)

run(cl_args: Namespace | None = None) Path

Generate test kit, return the path to the test kit

configure(cl_args: Namespace | None = None)

Responsible for generating all Configuration objects for the test kit.

Later this should return a Configuration object that power-users can create and pass to generate().

generate(configuration: CtkCfg) Path

Generate the test kit with given configuration.