package rfsm

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Values

type t

The type of guest-level values

type typ

The type of guest-level types

val default_value : typ -> t

default_value t should return a default value for type t

VCD interface

exception Unsupported_vcd of t
val vcd_type : t -> Vcd_types.vcd_typ

vcd_type v should return the VCD type corresponding to value v. For example, if v denotes an boolean value, vcd_type v should return Rfsm.Vcd_types.TyBool. This function should raise Unsupported_vcd in case of failure (if there's no corresponding VCD type)

val vcd_value : t -> Vcd_types.vcd_value

vcd_value v should return the VCD encoding of value v. For example, if v denotes the boolean value b, vcd_value v should return Rfsm.Vcd_types.Val_bool b. This function should raise Unsupported_vcd in case of failure (if there's no corresponding VCD value)

val flatten : base:Ident.t -> t -> (Ident.t * t) list

flatten base:b v should decompose a structured value v into a list of qualified scalar values for VCD dumping. For example, if v is a record {x=1;y=2}, then flatten ~base:"a" v should be [("a.x",1);("a.y",2)]. If v is a scalar value, then flatten ~base:"a" v is just ["a",v]

Printing

val pp : Format.formatter -> t -> unit

pp fmt v prints value v on formatter fmt.

OCaml

Innovation. Community. Security.