package hardcaml
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
RTL Hardware Design in OCaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
v0.17.1.tar.gz
md5=7435ee8610c2205c5f912b4bf09163b0
sha512=38d7cf428bd3491024212e52776ac582183d7b5f6a494589a3697d9a213fa18347d6eeea23327859c340b0cb3b967c08cd21a8a7f8d15cf2de20e5598cb8456d
doc/src/hardcaml/parameter.ml.html
Source file parameter.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53open Base module Value = struct type t = | Bit of bool | Bit_vector of Logic.Bit_vector.t | Bool of bool | Int of int | Real of float | Std_logic of Logic.Std_logic.t | Std_logic_vector of Logic.Std_logic_vector.t | Std_ulogic of Logic.Std_logic.t | Std_ulogic_vector of Logic.Std_logic_vector.t | String of string [@@deriving equal, sexp, variants] end type t = { name : Parameter_name.t ; value : Value.t } [@@deriving equal, sexp_of] let sexp_of_t { name; value } = [%message "" ~_:(name : Parameter_name.t) ~_:(value : Value.t)] ;; let create ~name ~value = { name = name |> Parameter_name.of_string; value } let find_name ts name = List.find_map ts ~f:(fun t -> if Parameter_name.equal t.name name then Some t.value else None) ;; let find_name_exn ts name = match find_name ts name with | Some x -> x | None -> raise_s [%message "couldn't find parameter" (name : Parameter_name.t) ~parameters:(ts : t list)] ;; let is_subset ts1 ts2 = List.for_all ts1 ~f:(fun t1 -> match find_name ts2 t1.name with | Some v2 -> Value.equal t1.value v2 | None -> false) ;; let sort_by_name ts = List.sort ts ~compare:(fun t1 t2 -> Parameter_name.compare t1.name t2.name) ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>