Skip to main content

pedalkernel/compiler/
mod.rs

1//! Netlist-to-WDF compiler.
2//!
3//! Compiles a parsed `.pedal` file into a real-time audio processor by:
4//! 1. Building a circuit graph from the netlist
5//! 2. Identifying clipping stages (around diode elements)
6//! 3. For each stage, building a WDF binary tree via series-parallel decomposition
7//! 4. Modeling active elements (transistors, opamps) as gain stages
8//! 5. Chaining everything into a cascaded `PedalProcessor`
9
10mod bbd_lowering;
11mod bias;
12mod bind;
13mod blockwise;
14mod boundary_load;
15mod build;
16mod calibrate;
17mod classify;
18pub mod boundary_rules;
19mod compile;
20mod compiled;
21pub mod component;
22pub mod components;
23mod coupling;
24mod delay_lowering;
25mod dsp_block;
26mod dyn_node;
27mod graph;
28mod helpers;
29mod k_method;
30pub mod neighbor_roles;
31mod rigid;
32mod signal_flow;
33mod split;
34mod spqr;
35mod spqr_build;
36mod spqr_control;
37mod spring_lowering;
38mod stage;
39pub mod stage_test_helpers;
40pub(crate) mod subcircuit;
41pub mod validate;
42mod vca_lowering;
43mod vco_lowering;
44mod warnings;
45pub(crate) mod wdf_leaf;
46
47#[cfg(feature = "build-cache")]
48pub use compile::compile_pedal_cached;
49pub use compile::{compile_cache_key, compile_pedal, compile_pedal_with_options, CompileOptions};
50pub(crate) use compiled::extract_precomputed_from_compiled;
51pub use compiled::CompiledPedal;
52pub use component::{
53    Cardinality, Component, NeighborReq, NeighborRole, PinDirection,
54};
55pub use boundary_rules::{
56    classify_control_path, classify_edges, classify_ports, smoke_classify, BoundaryPolicy,
57    ClassifiedEdge, ClassifiedPort, Directive, Domain, PortClass,
58};
59pub use neighbor_roles::{
60    completeness_errors, infer_neighbor_roles, InferredNeighbor,
61};
62pub use split::{compile_split_pedal, SplitCompiledPedal};
63pub use spqr_build::{compile_via_spqr, compile_via_spqr_with_options};
64pub use validate::{validate_pedal, validate_pedal_files, PedalWarning, Severity};
65pub use warnings::{check_voltage_compatibility, VoltageWarning, WarningSeverity};
66
67#[cfg(test)]
68mod bias_analysis_tests;
69#[cfg(test)]
70mod bias_application_tests;
71#[cfg(test)]
72mod bias_characterization_tests;
73#[cfg(test)]
74mod bind_tests;
75#[cfg(test)]
76mod black_feedback_tests;
77#[cfg(test)]
78mod diode_polarity_tests;
79#[cfg(test)]
80mod extraction_candidate_tests;
81#[cfg(test)]
82mod feedforward_tests;
83#[cfg(test)]
84mod general_mna_tests;
85#[cfg(test)]
86mod goldenrod_pot_tests;
87#[cfg(test)]
88mod goldenrod_signal_chain_tests;
89#[cfg(test)]
90mod graph_role_tests;
91#[cfg(test)]
92mod ground_clip_tests;
93#[cfg(test)]
94mod group_terminal_tests;
95#[cfg(test)]
96mod harmonic_tests;
97#[cfg(test)]
98mod mna_accuracy_tests;
99#[cfg(test)]
100mod nonideal_tests;
101#[cfg(test)]
102mod opamp_drive_tests;
103#[cfg(test)]
104mod passive_extraction_tests;
105#[cfg(test)]
106mod passive_wdf_tests;
107#[cfg(test)]
108mod pot_binding_investigation_tests;
109#[cfg(test)]
110mod pot_binding_tests;
111#[cfg(test)]
112mod pot_sweep_tests;
113#[cfg(test)]
114mod pot_tests;
115#[cfg(test)]
116mod pot_wiper_tests;
117#[cfg(test)]
118mod ratking_signal_chain_tests;
119#[cfg(test)]
120mod rigid_tests;
121#[cfg(test)]
122mod split_point_tests;
123#[cfg(test)]
124mod spqr_build_tests;
125#[cfg(test)]
126mod spqr_tests;
127#[cfg(test)]
128mod state_space_pot_tests;
129#[cfg(test)]
130mod tone_stage_tests;
131#[cfg(test)]
132mod tree_build_tests;
133#[cfg(test)]
134mod voltage_extraction_tests;
135#[cfg(test)]
136mod zero_output_tests;
137// incremental_recompute_tests moved to pedalkernel-rt/tests/incremental_recompute.rs
138#[cfg(test)]
139mod biquad_table_tests;
140#[cfg(test)]
141mod blockwise_detection_tests;
142#[cfg(test)]
143mod bridged_t_bias_loading_tests;
144#[cfg(test)]
145mod coupling_tests;
146#[cfg(test)]
147mod ground_leg_tests;
148#[cfg(test)]
149mod k_method_non_bjt_tests;
150#[cfg(test)]
151mod k_method_tests;
152#[cfg(test)]
153mod level_pot_tests;
154#[cfg(test)]
155mod mfb_debug_test;
156#[cfg(test)]
157mod opamp_gain_tests;
158#[cfg(test)]
159mod tb303_decomposition_tests;
160#[cfg(test)]
161mod test_support;