diff --git a/crates/applications/multi_core_inverter/src/main.rs b/crates/applications/multi_core_inverter/src/main.rs index 8863f07..e7e3ab7 100644 --- a/crates/applications/multi_core_inverter/src/main.rs +++ b/crates/applications/multi_core_inverter/src/main.rs @@ -43,6 +43,7 @@ use coremem::cross::compound::list::{ Empty, EnumerateU32, Flatten as _, + IntoVec as _, List1, Map, MapVisitor, @@ -54,7 +55,7 @@ use coremem::meas; use coremem::real::{self, Real as _}; use coremem::sim::spirv::{self, SpirvSim}; use coremem::sim::units::Seconds; -use coremem::stim::{CurlStimulus, Exp, Gated, Shifted}; +use coremem::stim::{AbstractStimulus, CurlStimulus, DynStimuli, Exp, Gated, Shifted}; use coremem::Driver; type R = real::R32; @@ -98,6 +99,15 @@ where } } +struct MapIntoBoxStimulus; +impl MapVisitor for MapIntoBoxStimulus { + type Output = Box; + fn map(&self, s: S) -> Self::Output { + Box::new(s) + } +} + + enum DriveDirection { High, Low, @@ -372,6 +382,7 @@ fn main() { let duration = Seconds(params.clock_phase_duration * (num_cycles + 3) as f32); + // let stim = DynStimuli::from_vec(stim.map(MapIntoBoxStimulus).into_vec()); let mut driver = driver.with_stimulus(stim); let prefix = "out/applications/multi_core_inverter/19-4ns-1e7A/";