diff --git a/crates/fayalite/src/sim.rs b/crates/fayalite/src/sim.rs index 275b106..b508756 100644 --- a/crates/fayalite/src/sim.rs +++ b/crates/fayalite/src/sim.rs @@ -6698,6 +6698,11 @@ impl SimulationModuleState { mut target: Target, which_module: WhichModule, ) -> CompiledValue { + assert!( + target.canonical_ty().is_passive(), + "simulator read/write expression must have a passive type \ + (recursively contains no fields with `#[hdl(flip)]`)" + ); if let Some(&retval) = self.io_targets.get(&target) { return retval; }