Compiler Surface Policy

July 7, 2026 · View on GitHub

This page defines the root-level sc_neurocore.compiler API boundary. The package facade exports the stable symbols used by ordinary compiler clients. Some modules remain direct public modules because existing workflows import them by module path. The remaining modules are internal build tools used by the compiler facade, deployment facade, or hardware evidence pipeline.

Use from sc_neurocore.compiler import ... for facade symbols. Import direct public modules only when their module path is shown below. Internal build tools can change without a deprecation window.

Root Module Decisions

ModuleStatusDecision
_sby_runnerinternal build toolShared SymbiYosys task runner behind the equivalence and property proof runners.
adaptive_precisionpublic facadePackage-level exports provide the adaptive precision planning API.
auto_tuneinternal build toolInternal heuristic helper used by precision planning workflows.
block_floatingdirect public moduleShared-exponent format types are imported directly by quantization workflows.
block_floating_quantizationdirect public moduleBlock-floating dense compilation helpers are direct quantization surfaces.
c_expr_emitterinternal build toolC/C++ (ap_fixed) expression emitter behind the HLS exporter.
c_fixed_emitterinternal build toolBit-exact integer C/Rust expression emitter behind the bit-true kernel.
certification_geninternal build toolDeployment evidence generator reached through deployment.
cocotb_geninternal build toolTestbench generator reached through deployment.
compiler_implinternal build toolLegacy implementation module behind documented compiler entry points.
constraint_gendirect public moduleTiming constraint generator has direct tests and documentation.
deploymentdirect public moduleDeployment facade aggregates constraints, drivers, evidence, and multi-target helpers.
equation_compilerpublic facadePackage-level exports provide equation-to-FPGA helpers.
equivalence_checkinternal build toolSymbiYosys equivalence runner behind the hardware evidence pipeline.
equivalence_miterinternal build toolSequential-equivalence miter builder feeding the equivalence runner.
expr_lut_tablesinternal build toolShared transcendental look-up tables for the expression emitters.
fixed_point_quantizationdirect public moduleFixed-point quantization primitives back direct quantization workflows.
formal_evidenceinternal build toolEvidence writer used by hardware audit pipelines.
formal_property_checkinternal build toolSymbiYosys RTL-property runner behind the hardware evidence pipeline.
fpga_wrapperinternal build toolWrapper generator behind compiler and deployment paths.
guard_bitsinternal build toolStatic-analysis primitive reached through static_analysis.
host_driver_geninternal build toolHost driver generator reached through deployment.
ir_type_checkerpublic facadePackage-level exports provide stochastic IR validation helpers.
layer_precisioninternal build toolValidated row model behind adaptive precision layer manifests.
length_plannerinternal build toolValidated layer-length planner behind adaptive precision manifests.
live_controlpublic facadePackage-level exports provide live MMIO control specs.
live_control_opsinternal build toolImplementation module for live-control operations.
live_control_specsinternal build toolImplementation module for live-control spec records.
live_control_typesinternal build toolImplementation module for live-control type aliases.
manifest_geninternal build toolManifest helper used by validation and compiler evidence paths.
mixed_dense_kernelinternal build toolNumeric kernel behind mixed dense compilation.
mixed_dense_quantizationdirect public moduleMixed dense compiler helpers are direct quantization surfaces.
mixed_precisioncompatibility facadeBackward-compatible facade for mixed-precision solver imports.
mixed_precision_specinternal build toolData model behind the mixed-precision facade.
mlir_emitterpublic facadePackage-level exports provide MLIR bundle emission.
multi_targetinternal build toolMulti-target comparison helper reached through deployment.
operator_abstractioninternal build toolLifts an internal result to a free input to abstract a multiplier for tractable unbounded proofs.
overflow_proofinternal build toolStatic-analysis proof primitive reached through static_analysis.
pipelinepublic facadePackage-level exports provide the compiler pipeline.
pipeline_analysisinternal build toolStatic-analysis primitive reached through static_analysis.
power_estimatordirect public modulePower estimator has direct tests and documentation.
precision_configdirect public modulePrecision configuration types are direct mixed-precision surfaces.
precision_pairsinternal build toolPreset/configuration helper behind precision planning.
precision_presetsinternal build toolPreset registry behind mixed-precision facade.
precision_solverdirect public moduleConstraint solver has direct tests and documented usage.
proof_transformspublic facadePackage-level exports provide the opt-in formal-proof transform registry.
q_formatdirect public moduleQ-format types are direct quantization surfaces.
quantization_reportsinternal build toolReport records are re-exported through quantization surfaces.
quantize_corecompatibility facadeBackward-compatible import surface for quantizer.
quantizerpublic facadePackage-level exports provide canonical quantization helpers.
resource_estimatorinternal build toolDeployment estimator reached through deployment.
riscv_driverdirect public moduleRISC-V driver generator has direct tests and documentation.
sby_formalinternal build toolSymbiYosys script generator reached through deployment.
sensitivity_analysisdirect public moduleSensitivity analysis has direct tests and adaptive-precision usage.
slr_placementinternal build toolPlacement helper reached through deployment.
static_analysisdirect public moduleStatic-analysis facade aggregates guard, proof, pipeline, power, and SVA helpers.
sva_gendirect public moduleSVA generator has direct tests and documentation.
synapse_plannerinternal build toolValidated synapse planner behind adaptive precision manifests and Studio auto-tuning.
synapse_precisioninternal build toolValidated row model behind adaptive precision synapse manifests.
testbench_gendirect public moduleVerilog testbench generator has direct tests and documentation.
validationdirect public moduleAdaptive-runtime validation is re-exported by a compatibility facade.
verilog_compilerinternal build toolBackend implementation reached through equation_compiler.
verilog_compiler_configinternal build toolBackend configuration record for Verilog emission.
verilog_expr_emitterinternal build toolExpression emitter behind the equation compiler.
whitebox_tapsinternal build toolInstruments a module to expose internal state as taps for unbounded equivalence proofs.

Enforcement

tests/test_compiler_surface_policy.py reads this table and the filesystem on each run. A new root compiler module must either join the package facade, become a direct public or compatibility module, or appear here as an internal build tool with a clear reason.

operator_abstraction and whitebox_taps are intentionally proof-only build tools, not production compiler flags. Proof pipelines select them through sc_neurocore.compiler.proof_transforms or the package-level apply_proof_transform / list_proof_transforms facade. quantize_core remains a compatibility facade for legacy quantizer imports and is pinned by tests/test_compiler_compat_facades.py.