xlsynth_codegen/lib.rs
1// SPDX-License-Identifier: Apache-2.0
2
3//! Deterministic, Rust-native SystemVerilog generation for XLS block IR and
4//! DSLX types.
5
6mod arithmetic;
7mod block;
8mod error;
9mod hierarchy;
10mod ops;
11mod options;
12mod priority;
13mod slicing;
14mod stages;
15pub mod sv_bridge_builder;
16
17pub use error::BlockCodegenError;
18pub use options::{BlockCodegenOptions, BlockCodegenOutput, Layout};
19
20use xlsynth_pir::ir::Package;
21
22/// Emits the selected block and its transitive block dependencies.
23pub fn emit_system_verilog(
24 package: &Package,
25 options: &BlockCodegenOptions,
26) -> Result<BlockCodegenOutput, BlockCodegenError> {
27 block::emit_package(package, options)
28}