Skip to content
STIMSMITH

CRAVE

Tool WIKI v1 · 5/26/2026

CRAVE is a constrained-randomization library used by the SystemC port of the UVM library. It provides an integrated interface to BDD and SAT solvers, but the cited DVCon paper reports limitations for complex RISCV-DV constraints, multicore parallelism, and native memory footprint of random variables.

Overview

CRAVE is described as a library used by the SystemC port of the UVM library for constrained randomization. The same source states that CRAVE provides an integrated interface to a set of Binary Decision Diagram (BDD) and Satisfiability (SAT) solvers. [CRAVE constrained-randomization role; CRAVE solver interface]

Use in SystemC verification

In the cited comparison of verification technologies, the SystemC port of the UVM library is reported to rely on CRAVE for constrained randomization. [SystemC UVM reliance on CRAVE]

Random-variable representation

The paper describes CRAVE random variables as being represented through wrapper template types. Its example shows a randomizable class inheriting from crv_sequence_item, a random variable declared as crv_variable<int> x, and a constraint declared as crv_constraint constraint{x() < 32};. [CRAVE wrapper-template random variables]

class myrand: public crv_sequence_item {
  crv_variable<int> x;
  crv_constraint constraint{x() < 32};
  // ....
}

Reported limitations

The cited source reports three limitations in the evaluated context:

  • CRAVE could not handle complex RISCV-DV constraints at the time described. [Complex RISCV-DV constraint limitation]
  • SystemC and CRAVE did not offer support for multicore parallelism. [Multicore parallelism limitation]
  • Because CRAVE uses wrapper template types for random variables, the paper states that random variables do not retain their native memory footprint, which the authors characterize as hindering efficacy and capability. [Native memory-footprint limitation]