diff --git a/crates/applications/stacked_cores/src/main.rs b/crates/applications/stacked_cores/src/main.rs index 3cb2465..7d86130 100644 --- a/crates/applications/stacked_cores/src/main.rs +++ b/crates/applications/stacked_cores/src/main.rs @@ -474,6 +474,11 @@ fn drive_map_5stack_one_sided_inv() -> [[ClockState; 5]; 6] { ] } +/// stack of N cores. +/// core 0 is the actively driven core. +/// core 0 is assumed to be coupled to core 1, core 1 to core 2, and so on. +/// each alternating core has opposite polarity. +/// the odd ones are initialized low, even ones are initialized high. #[allow(unused)] fn drive_map_nstack_one_sided_inv() -> [[ClockState; N]; 6] { use ClockState as C; @@ -489,7 +494,7 @@ fn drive_map_nstack_one_sided_inv() -> [[ClockState; N]; 6] { for c in 1..N { clocks[0][c] = match c % 2 { // charge to base state 1 => C::hold_low(), - _ => C::release_low(), + _ => C::hold_high(), }; clocks[1][c] = match c % 2 { // let settle 1 => C::release_low(), @@ -510,6 +515,30 @@ fn drive_map_nstack_one_sided_inv() -> [[ClockState; N]; 6] { clocks } +#[allow(unused)] +fn drive_map_nstack_one_sided() -> [[ClockState; N]; 6] { + use ClockState as C; + + let mut clocks = [[C::float(); N]; 6]; + clocks[0][0] = C::hold_high(); // charge S0 high + clocks[1][0] = C::release_high(); // let settle + clocks[2][0] = C::hold_low(); // write S0 -> S1, {S2, ...} + clocks[3][0] = C::hold_low(); // charge S0 low + clocks[4][0] = C::release_low(); // let settle + clocks[5][0] = C::hold_low(); // write S0 -> S1, {S2, ...} + + for c in 1..N { + clocks[0][c] = C::hold_low(); // init low + clocks[1][c] = C::release_low(); + clocks[2][c] = C::float(); // accept active transfer + clocks[3][c] = C::hold_low(); // reset low + clocks[4][c] = C::release_low(); + clocks[5][c] = C::float(); // accept the noop transfer + } + + clocks +} + fn main() { coremem::init_logging(); // coremem::init_debug(); @@ -1252,14 +1281,75 @@ fn main() { .with_ctl_conductivity(5e2) .with_coupling_conductivity(5e3) .with_s_major(um(400)) - .with_coupling_loops(10) - .with_coupling(0, 1, 0, 2, CouplingMethod::Outside) - .with_coupling(0, 2, 1, 2, CouplingMethod::Outside) ; run_sim( "13-3stack-8e10-drive", drive_map_3stack_one_sided(), - p13xx.with_input_magnitude(8e10), + p13xx + .with_input_magnitude(8e10) + .with_coupling_loops(10) + .with_coupling(0, 1, 0, 2, CouplingMethod::Outside) + .with_coupling(0, 2, 1, 2, CouplingMethod::Outside) + ); + run_sim( + "13-4stack-10loop-8e10-drive", + drive_map_nstack_one_sided::<4>(), + p13xx + .with_input_magnitude(8e10) + .with_coupling_loops(10) + .with_coupling(0, 1, 0, 3, CouplingMethod::Outside) + .with_coupling(0, 2, 1, 3, CouplingMethod::Outside) + .with_coupling(0, 3, 2, 3, CouplingMethod::Outside) + ); + run_sim( + "13-5stack-8loop-8e10-drive", + drive_map_nstack_one_sided::<5>(), + p13xx + .with_input_magnitude(8e10) + .with_coupling_loops(8) + .with_coupling(0, 1, 0, 4, CouplingMethod::Outside) + .with_coupling(0, 2, 1, 4, CouplingMethod::Outside) + .with_coupling(0, 3, 2, 4, CouplingMethod::Outside) + .with_coupling(0, 4, 3, 4, CouplingMethod::Outside) + ); + run_sim( + "13-6stack-6loop-8e10-drive", + drive_map_nstack_one_sided::<6>(), + p13xx + .with_input_magnitude(8e10) + .with_coupling_loops(6) + .with_coupling(0, 1, 0, 5, CouplingMethod::Outside) + .with_coupling(0, 2, 1, 5, CouplingMethod::Outside) + .with_coupling(0, 3, 2, 5, CouplingMethod::Outside) + .with_coupling(0, 4, 3, 5, CouplingMethod::Outside) + .with_coupling(0, 5, 4, 5, CouplingMethod::Outside) + ); + run_sim( + "13-7stack-5loop-8e10-drive", + drive_map_nstack_one_sided::<7>(), + p13xx + .with_input_magnitude(8e10) + .with_coupling_loops(5) + .with_coupling(0, 1, 0, 6, CouplingMethod::Outside) + .with_coupling(0, 2, 1, 6, CouplingMethod::Outside) + .with_coupling(0, 3, 2, 6, CouplingMethod::Outside) + .with_coupling(0, 4, 3, 6, CouplingMethod::Outside) + .with_coupling(0, 5, 4, 6, CouplingMethod::Outside) + .with_coupling(0, 6, 5, 6, CouplingMethod::Outside) + ); + run_sim( + "13-8stack-5loop-8e10-drive", + drive_map_nstack_one_sided::<8>(), + p13xx + .with_input_magnitude(8e10) + .with_coupling_loops(5) + .with_coupling(0, 1, 0, 7, CouplingMethod::Outside) + .with_coupling(0, 2, 1, 7, CouplingMethod::Outside) + .with_coupling(0, 3, 2, 7, CouplingMethod::Outside) + .with_coupling(0, 4, 3, 7, CouplingMethod::Outside) + .with_coupling(0, 5, 4, 7, CouplingMethod::Outside) + .with_coupling(0, 6, 5, 7, CouplingMethod::Outside) + .with_coupling(0, 7, 6, 7, CouplingMethod::Outside) ); } }