Skip to main content

Crate csa_rhdl

Crate csa_rhdl 

Source
Expand description

§csa-rhdl

Carry-save adder (CSA) compressor trees as a categorical combinator library, with optional hdl-cat backend for hardware synthesis and simulation.

The crate is organized in layers:

shape    Shape, width arithmetic, errors
category CircuitArrow + Category/Monoidal/Braided/Symmetric
tree     TreeGraph + tree_level + compressor_tree
reducer  Stream catamorphism (compile_tree)
gates    hdl-cat circuit constructors (feature: hdl-cat-gates)
pipeline Registered compressor (feature: hdl-cat-gates)
lower    Abstract CircuitArrow → HdlGraph lowering (feature: hdl-cat-gates)

See prelude for the single-import surface.

Modules§

category
Categorical layer: the circuit category built over comp-cat-rs.
error
Hand-rolled error type for the CSA crate.
prelude
Single-import surface for the csa-rhdl crate.
reducer
Stream-based catamorphism: the delay-run tree reducer.
shape
Shape: the object type in the circuit category.
tree
Tree-level and full compressor construction.
width
Width arithmetic for the compressor tree.