package hardcaml_verilator

  1. Overview
  2. Docs
Hardcaml Verilator Simulation Backend

Install

Dune Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=76f944f35c445eeb3028ff9e73dcdf1778937078ad655c1e949278d23d888251

doc/src/hardcaml_verilator/verilator_version.ml.html

Source file verilator_version.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
open! Core

type t =
  | V4
  | V5
[@@deriving sexp_of]

let to_string t = Sexp.to_string (sexp_of_t t)

let of_int version =
  match version with
  | 4 -> V4
  | 5 -> V5
  | _ -> raise_s [%message "Invalid verilator version" (version : int)]
;;

let flag =
  [%map_open.Command
    let version =
      flag "-V" (optional_with_default Setup.default_version int) ~doc:"Verilator version"
    in
    of_int version]
;;
OCaml

Innovation. Community. Security.