Skip to main content

Crate bitloom_prelude

Crate bitloom_prelude 

Source
Expand description

Design-facing surface. Designs depend only on this crate.

Modules§

bitloom
Bitloom-branded attribute facade (FR118 / FR157 text paths use #[bitloom::…]).
ip
First-class IP stubs (FR37 / FR48): FIFO, UART, … via this prelude only. First-class IP (FR37 / FR48 / FR82 / FR89 / FR98 / FR108 / FR120): SyncFifo, UartTx, UartRx, SpiMaster, I2cMaster, Axi4LiteSlave, Gpio, GpioVip, black-box; plus FR77 overlay Crc8Lut (Epic 29.3).
rhdl
Re-export attributes via this crate’s rhdl facade.

Structs§

Bits
Bool
Hardware ground types (language surface).
Clock
ClockDomain
Clash-style phantom clock-domain marker (AD-22 / FR52).
Diagnostics
DoubleFlop
语言级 CDC 两级同步器(FR79 / AD-29;加深 FR23/FR52)。
ElaborateSession
Session token holding the unfrozen circuit (AD-13).
FrozenHir
Immutable circuit after freeze (AD-7).
GeneratedInstance
Plain instance spec produced by an elaborate-time factory Fn (FR73 / Cap-R-53).
HlsMark
Marker retained by #[rhdl::hls] expansions (FR35).
HwCaptureRef
Documented illegal-capture marker for Wire/Reg/signal refs (Story 27.3).
HwVec
Hardware vector; documented as the synthesizable Vec<T,N> equivalent (FR51).
Input
Directed input port wrapper (AD-18).
LegalEmptyClosure
Positive stand-in: empty non-capturing closure (FR74 ATDD).
LegalSimpleClosure
Positive stand-in: simple pure unary transform (FR74 / FR75 comb inline).
Mem
CHIRRTL-friendly Mem (async-read) surface marker (AD-21).
Output
Directed output port wrapper (AD-18).
PortValues
Port-level values shared by tick and functional models (AD-17).
Reset
SInt
SeqOwnershipViolation
Documented Cap-R-70 ownership violation token (Story 28.3).
Span
Source span threaded from builder / macros (opaque for now).
SyncFIFO
语言级跨域 FIFO(FR79 / AD-29;加深 FR23/FR52)。
SyncReadMem
CHIRRTL-friendly SyncReadMem surface marker (AD-21).
SynthesizableClosureViolation
Documented SynthesizableClosure violation token (Story 28.1 / Cap-R-60).
UInt

Enums§

CombInline
Elaborate-time description of a combinational RHS (FR75 / Cap-R-55).
GroundType
Ground types for phase-1 HIR (AD-12).
HwCaptureKind
Kind of hardware reference that must not be captured into elaborate-time generator / factory closures (FR73 / NFR35 / AD-18).
PortDir
Port direction recorded by PortField.
PortDirection
ProcessKindMark
Compile-time mark expanded by #[combinational] / #[sequential].
SeqInline
Elaborate-time description of a sequential Reg.d next-state (FR75 / Cap-R-56).
SeqOwnershipViolationKind
Cap-R-70 ownership breach inside sequential synthesizable-closure inline.
SynthesizableClosureViolationKind
Kind of SynthesizableClosure constraint breach (FR74 / Cap-R-48…50).
ViewKind
Host-only simulation view kind (FR29 / FR102). Never a FrozenHir node.

Traits§

Bundle
Documented synthesizable named aggregate (FR51 / FR80).
Elaboratable
Trait implemented by #[rhdl::top] / design modules (AD-19 partial for 1.1).
FsmLabels
FR157: compile-time FSM state label set (from #[bitloom::fsm] / #[rhdl::fsm]).
HostView
Marker implemented by #[rhdl::bridge] / #[rhdl::abstraction] / #[rhdl::both] / #[rhdl::functional_model]. These types do not enter HIR.
PortField
Marker trait: only Input<T> / Output<T> implement this. Bare UInt<N> etc. cannot be used as module fields with #[rhdl::module].
StartWaitComplete
Host/bridge handshake template: start action → tick until not busy (FR78 / Cap-R-65).
SynthesizableClosure
Documented constraints for closures that may enter the synthesizable hardware path (FR74 / Cap-R-48…50 / AD-18).

Functions§

add_port_field
Register a directed port field, flattening composites to scalar HIR ports.
diagnose_seq_ownership_violations
Cap-R-70 check surface: diagnose seq-ownership violations without a session.
diagnose_synthesizable_closure_violations
Cap-R-60 check surface: diagnose SynthesizableClosure violations without a session (CLI / cargo bitloom check can call this; session methods wrap it).
generate_mem_init
Elaborate-time LUT/ROM/Mem init generator (FR73 / AD-18).
mask_mem_word
Elaborate-time LUT/ROM/Mem init generator (FR73 / AD-18).
start_wait_complete
Free-function form of StartWaitComplete::start_wait_complete (same FR78 contract).

Derive Macros§

Bundle
#[derive(Bundle)] (FR80) — same name as the Bundle trait (macro vs type namespace). Derive [bitloom_prelude::Bundle] from named struct fields (FR80 / Story 32.3).