calyx_stdlib/
primitives.rs1macro_rules! load_prims {
11    ($name:ident, $futil_path:literal, $sv_path:literal) => {
12        pub const $name: [(&str, &str); 2] = [
13            (
14                $futil_path,
15                include_str!(concat!("../primitives/", $futil_path)),
16            ),
17            ($sv_path, include_str!(concat!("../primitives/", $sv_path))),
18        ];
19    };
20}
21
22load_prims! { CORE, "core.futil", "core.sv" }
23load_prims! { BINARY_OPERATORS, "binary_operators.futil", "binary_operators.sv" }
24load_prims! { MATH, "math.futil", "math.sv" }
25load_prims! { COMB_MEMORIES, "memories/comb.futil", "memories/comb.sv" }
26load_prims! { SEQ_MEMORIES, "memories/seq.futil", "memories/seq.sv" }
27load_prims! { PIPELINED, "pipelined.futil", "pipelined.sv" }
28load_prims! { STALLABLE, "stallable.futil", "stallable.sv" }
29load_prims! { SYNC, "sync.futil", "sync.sv" }
30
31pub const COMPILE_LIB: (&str, &str) =
33    ("compile.futil", include_str!("../primitives/compile.futil"));
34
35pub const KNOWN_LIBS: [(&str, [(&str, &str); 2]); 8] = [
36    ("core", CORE),
37    ("binary_operators", BINARY_OPERATORS),
38    ("math", MATH),
39    ("comb_memories", COMB_MEMORIES),
40    ("seq_memories", SEQ_MEMORIES),
41    ("pipelined", PIPELINED),
42    ("stallable", STALLABLE),
43    ("sync", SYNC),
44];