Skip to main content

csa_rhdl/
lib.rs

1//! # csa-rhdl
2//!
3//! Carry-save adder (CSA) compressor trees as a categorical
4//! combinator library, with optional hdl-cat backend for hardware
5//! synthesis and simulation.
6//!
7//! The crate is organized in layers:
8//!
9//! ```text
10//! shape    Shape, width arithmetic, errors
11//! category CircuitArrow + Category/Monoidal/Braided/Symmetric
12//! tree     TreeGraph + tree_level + compressor_tree
13//! reducer  Stream catamorphism (compile_tree)
14//! gates    hdl-cat circuit constructors (feature: hdl-cat-gates)
15//! pipeline Registered compressor (feature: hdl-cat-gates)
16//! lower    Abstract CircuitArrow → HdlGraph lowering (feature: hdl-cat-gates)
17//! ```
18//!
19//! See [`prelude`] for the single-import surface.
20
21#![deny(missing_docs)]
22
23pub mod category;
24pub mod error;
25pub mod prelude;
26pub mod reducer;
27pub mod shape;
28pub mod tree;
29pub mod width;
30
31#[cfg(feature = "hdl-cat-gates")]
32pub mod gates;
33
34#[cfg(feature = "hdl-cat-gates")]
35pub mod lower;
36
37#[cfg(feature = "hdl-cat-gates")]
38pub mod pipeline;