Skip to main content

partition

Function partition 

Source
pub fn partition(graph: &DriverGraph, max_passes: u32) -> Vec<Partition>
Expand description

The WOCB partitioning pass (Decision-record union-find): every write edge always unions process with net (LRM multi-driver atomicity falls out for free — two processes that both write one net both union with it, hence transitively with each other, with no special-casing). A read edge unions net with reader UNLESS both sides already carry a resolved, DIFFERING clock domain — a genuine cross-domain register-to-register read, which [crate::analysis::clock::classify_cdc_edges] turns into a CdcEdge instead (never a merge, per NL-082). Two same-domain clocked nodes (NL-076’s fixture) also do NOT union on a read alone — finer partition granularity, still correct (each register independently reads old values within one clock domain) and not required to merge by anything this pass’s tests assert. Iterated to a fixed point (a merge can turn a group’s domain from None to Some, unblocking a previously-skipped union later in the same or a later pass), bounded by max_passes.