4031 lines
146 KiB
Rust
4031 lines
146 KiB
Rust
//! this example takes the multi_core_inverter but tiles the cores along their primary axis.
|
|
//! this allows for more loops between them, and thereby hopefully better coupling.
|
|
//!
|
|
//! to run this, from toplevel directory:
|
|
//! ```
|
|
//! $ cargo run --release --bin stacked_cores
|
|
//! $ pushd crates/coremem; cargo run --release --bin viewer ../../out/applications/stacked_cores/0/ ; popd
|
|
//! ```
|
|
#![feature(generic_const_exprs)]
|
|
|
|
use coremem::geom::{Coord as _, Meters};
|
|
use coremem::geom::region::{
|
|
Cube,
|
|
ElongatedTorus,
|
|
Intersection,
|
|
Region,
|
|
Rotate,
|
|
Torus,
|
|
Translate,
|
|
Union,
|
|
WedgeZ,
|
|
};
|
|
use coremem::mat::{Ferroxcube3R1MH, IsoConductorOr, IsomorphicConductor};
|
|
use coremem::meas;
|
|
#[allow(unused)]
|
|
use coremem::real::{self, Real as _};
|
|
use coremem::sim::spirv::{self, SpirvSim};
|
|
use coremem::sim::units::{Seconds, Time as _};
|
|
use coremem::stim::{CurlVectorField, Exp, Gated, ModulatedVectorField, Scaled, Shifted, TimeVaryingExt as _};
|
|
use coremem::Driver;
|
|
|
|
// type R = real::R32;
|
|
type R = f32;
|
|
type Mat = IsoConductorOr<R, Ferroxcube3R1MH>;
|
|
// type Backend = spirv::CpuBackend;
|
|
type Backend = spirv::WgpuBackend;
|
|
type Sim = SpirvSim::<R, Mat, Backend>;
|
|
|
|
|
|
/// different states each control signal can be in for some clock cycle.
|
|
#[derive(Copy, Clone)]
|
|
enum ClockState {
|
|
Hold(f32),
|
|
Release(f32),
|
|
Float,
|
|
}
|
|
type ClockSegment = Shifted<R, Gated<R, Scaled<Exp<R>, R>>>;
|
|
|
|
impl ClockState {
|
|
fn hold(amp: f32) -> Self {
|
|
Self::Hold(amp)
|
|
}
|
|
fn hold_high() -> Self {
|
|
Self::hold(1.0)
|
|
}
|
|
fn hold_low() -> Self {
|
|
Self::hold(-1.0)
|
|
}
|
|
fn release(amp: f32) -> Self {
|
|
Self::Release(amp)
|
|
}
|
|
fn release_high() -> Self {
|
|
Self::release(1.0)
|
|
}
|
|
fn release_low() -> Self {
|
|
Self::release(-1.0)
|
|
}
|
|
fn float() -> Self {
|
|
Self::Float
|
|
}
|
|
fn time_stimulus(&self, params: &Params, cycle: u32)
|
|
-> Option<ClockSegment>
|
|
{
|
|
use ClockState::*;
|
|
match self {
|
|
&Hold(amp) => Some(params.control_signal_hold(cycle, amp)),
|
|
&Release(amp) => Some(params.control_signal_release(cycle, amp)),
|
|
Float => None,
|
|
}
|
|
}
|
|
}
|
|
|
|
#[derive(Copy, Clone)]
|
|
enum CouplingMethod {
|
|
/// toroidal coupling loop that connects two points -- and anything in between them.
|
|
Direct,
|
|
/// couple the points by first directing a loop outside of the core stack, thereby ensuring
|
|
/// nothing in-between them is coupled.
|
|
Outside,
|
|
|
|
// multi-wrapping related variants:
|
|
/// partially couple one core to another, but only place the exterior portion of that loop
|
|
DirectHalfExterior,
|
|
/// partially couple one core to another, but only place the interior portion of that loop
|
|
DirectHalfInterior,
|
|
|
|
/// lay a wire from one angular slice to the next -- on the same core.
|
|
/// place this wire *above* the core.
|
|
SelfAngularTop,
|
|
/// lay a wire from one angular slice to the next -- on the same core.
|
|
/// place this wire *below* the core.
|
|
SelfAngularBot,
|
|
|
|
/// lay half a loop around this core -- but only the exterior half.
|
|
SelfLoopHalfExterior,
|
|
/// lay half a loop around this core -- but only the interior half.
|
|
SelfLoopHalfInterior,
|
|
}
|
|
|
|
#[derive(Clone)]
|
|
struct Params {
|
|
input_magnitude: f32,
|
|
clock_phase_duration: f32,
|
|
clock_decay: f32, // exp decay half-life
|
|
ctl_conductivity: f32,
|
|
coupling_conductivity: f32,
|
|
// 's' = core (ferromagnetic part)
|
|
s_major: f32,
|
|
s_minor: f32,
|
|
// 'io' = drive/control wire
|
|
io_major: f32,
|
|
io_minor: f32,
|
|
coupling_major: f32,
|
|
coupling_minor: f32,
|
|
coupling_loops: u32, // per core
|
|
// how far to place S away from the sim edge
|
|
s_xy_buffer: f32,
|
|
// coords for core 'n'
|
|
sz1: f32,
|
|
couplings: Vec<(
|
|
u32, /* from core */
|
|
u32, /* to core */
|
|
u32, /* shift index */
|
|
u32, /* coupling group */
|
|
CouplingMethod,
|
|
)>,
|
|
}
|
|
fn um(n: u32) -> f32 {
|
|
n as f32 * 1e-6
|
|
}
|
|
fn ps(n: u32) -> f32 {
|
|
n as f32 * 1e-12
|
|
}
|
|
impl Params {
|
|
fn sx(&self) -> f32 {
|
|
self.s_major + self.io_major + self.io_minor + self.s_xy_buffer
|
|
}
|
|
fn sy(&self) -> f32 {
|
|
self.s_major + self.io_major + self.io_minor + self.s_xy_buffer
|
|
}
|
|
fn sz(&self, n: u32) -> f32 {
|
|
(n + 1) as f32 * self.sz1
|
|
}
|
|
/// control loop for core n (alternately called "drive" loop)
|
|
fn ctl(&self, n: u32) -> Torus {
|
|
Torus::new_xz(Meters::new(self.sx() - self.s_major, self.sy(), self.sz(n)), self.io_major, self.io_minor)
|
|
}
|
|
/// the last core gets an external output in place of its coupling loop
|
|
fn sense(&self, n: u32) -> Torus {
|
|
Torus::new_xz(Meters::new(self.sx() + self.s_major, self.sy(), self.sz(n)), self.io_major, self.io_minor)
|
|
}
|
|
fn s(&self, n: u32) -> Torus {
|
|
Torus::new_xy(Meters::new(self.sx(), self.sy(), self.sz(n)), self.s_major, self.s_minor)
|
|
}
|
|
fn coupling_angle(&self, loop_: u32, set_id: u32, of_set: u32) -> f32 {
|
|
// plus 1 control and an optional sense.
|
|
let total_loops = self.coupling_loops * of_set + 2;
|
|
// + 1 because we reserve loop 0 for control.
|
|
let mut idx = loop_ * of_set + 1 + set_id;
|
|
// reserve idx = 50% for sense wire.
|
|
if idx >= total_loops / 2 {
|
|
idx += 1;
|
|
}
|
|
idx as f32 / total_loops as f32 * f32::two_pi()
|
|
}
|
|
/// creates the wire loop which couples core `from` to core `to`.
|
|
/// - `of_set` indicates how many sets of loops this core has (e.g. 2 if it's coupling separately
|
|
/// to the above and below cores, equally).
|
|
/// - `set_id` is [0, of_set).
|
|
/// - `loop_` is [0, self.coupling_loops).
|
|
fn coupling_direct(&self, from: u32, to: u32, loop_: u32, set_id: u32, of_set: u32) -> Translate<Rotate<ElongatedTorus>> {
|
|
let angle = self.coupling_angle(loop_, set_id, of_set);
|
|
let from_z = self.sz(from);
|
|
let to_z = self.sz(to);
|
|
let center_z = (from_z + to_z) * 0.5;
|
|
let coupling_length = (to_z - from_z).abs();
|
|
Translate::new(
|
|
Rotate::about_z(
|
|
angle,
|
|
ElongatedTorus::new_xz(
|
|
Meters::new(self.s_major, 0.0, 0.0),
|
|
coupling_length,
|
|
self.coupling_major,
|
|
self.coupling_minor,
|
|
),
|
|
),
|
|
Meters::new(self.sx(), self.sy(), center_z)
|
|
)
|
|
}
|
|
/// this is `coupling_direct`, but preserves only either the exterior, or interior coupling
|
|
fn coupling_direct_half(&self, from: u32, to: u32, loop_: u32, set_id: u32, of_set: u32, exterior: bool) -> impl Region {
|
|
let angle = self.coupling_angle(loop_, set_id, of_set);
|
|
let from_z = self.sz(from);
|
|
let to_z = self.sz(to);
|
|
let center_z = (from_z + to_z) * 0.5;
|
|
let coupling_length = (to_z - from_z).abs();
|
|
let torus = ElongatedTorus::new_xz(
|
|
Meters::new(self.s_major, 0.0, 0.0),
|
|
coupling_length,
|
|
self.coupling_major,
|
|
self.coupling_minor,
|
|
);
|
|
let active_half = if exterior {
|
|
// keep only the x > s_major half of the loop
|
|
Cube::new(
|
|
Meters::new(self.s_major, -1.0, -1.0),
|
|
Meters::new(1.0, 1.0, 1.0),
|
|
)
|
|
} else {
|
|
// keep only the x < s_major half of the loop
|
|
Cube::new(
|
|
Meters::new(0.0, -1.0, -1.0),
|
|
Meters::new(self.s_major, 1.0, 1.0),
|
|
)
|
|
};
|
|
Translate::new(
|
|
Rotate::about_z(
|
|
angle,
|
|
Intersection::new2(torus, active_half),
|
|
),
|
|
Meters::new(self.sx(), self.sy(), center_z)
|
|
)
|
|
}
|
|
fn coupling_direct_half_exterior(&self, from: u32, to: u32, loop_: u32, set_id: u32, of_set: u32) -> impl Region {
|
|
self.coupling_direct_half(from, to, loop_, set_id, of_set, true)
|
|
}
|
|
fn coupling_direct_half_interior(&self, from: u32, to: u32, loop_: u32, set_id: u32, of_set: u32) -> impl Region {
|
|
self.coupling_direct_half(from, to, loop_, set_id, of_set, false)
|
|
}
|
|
/// like `coupling_direct`, but routes the wires outside the core stack,
|
|
/// thereby avoiding any accidental coupling of adjacent cores.
|
|
fn coupling_outside(&self, mut from: u32, mut to: u32, loop_: u32, set_id: u32, of_set: u32) -> impl Region {
|
|
if from > to {
|
|
// routing logic assumes `from` is at a lower `z` than `to`.
|
|
(from, to) = (to, from);
|
|
}
|
|
let angle = self.coupling_angle(loop_, set_id, of_set);
|
|
let from_z = self.sz(from);
|
|
let to_z = self.sz(to);
|
|
|
|
// this is what actually wraps halfway around a core, leaving an opening to the right.
|
|
// we'll use this twice: once at z of `from` and again at z of `to`.
|
|
let half_wrap = Intersection::new2(
|
|
Torus::new_xz(
|
|
Meters::new(self.s_major, 0.0, 0.0),
|
|
self.coupling_major,
|
|
self.coupling_minor,
|
|
),
|
|
// only keep the left half of the torus.
|
|
Cube::new(
|
|
Meters::new(-1.0, -1.0, -1.0),
|
|
Meters::new(self.s_major, 1.0, 1.0),
|
|
)
|
|
);
|
|
// how far to bring the wire past the center of the torus circle
|
|
let outside_small = self.s_minor * 2.0;
|
|
let outside_large = self.s_minor * 2.0 + self.coupling_minor * 4.0;
|
|
let outside_top_center_z = self.coupling_major;
|
|
let outside_bot_center_z = -self.coupling_major;
|
|
let bring_outside_top_small = Cube::new(
|
|
Meters::new(self.s_major, -self.coupling_minor, outside_top_center_z - self.coupling_minor),
|
|
Meters::new(self.s_major + outside_small, self.coupling_minor, outside_top_center_z + self.coupling_minor),
|
|
);
|
|
let bring_outside_bot_small = Cube::new(
|
|
Meters::new(self.s_major, -self.coupling_minor, outside_bot_center_z - self.coupling_minor),
|
|
Meters::new(self.s_major + outside_small, self.coupling_minor, outside_bot_center_z + self.coupling_minor),
|
|
);
|
|
|
|
let bring_outside_top_large = Cube::new(
|
|
Meters::new(self.s_major, -self.coupling_minor, outside_top_center_z - self.coupling_minor),
|
|
Meters::new(self.s_major + outside_large, self.coupling_minor, outside_top_center_z + self.coupling_minor),
|
|
);
|
|
let bring_outside_bot_large = Cube::new(
|
|
Meters::new(self.s_major, -self.coupling_minor, outside_bot_center_z - self.coupling_minor),
|
|
Meters::new(self.s_major + outside_large, self.coupling_minor, outside_bot_center_z + self.coupling_minor),
|
|
);
|
|
let wrap_from = Translate::new(
|
|
Union::new3(
|
|
half_wrap.clone(),
|
|
bring_outside_top_small.clone(),
|
|
bring_outside_bot_large.clone(),
|
|
),
|
|
Meters::new(0.0, 0.0, from_z)
|
|
);
|
|
let wrap_to = Translate::new(
|
|
Union::new3(
|
|
half_wrap.clone(),
|
|
bring_outside_bot_small.clone(),
|
|
bring_outside_top_large.clone(),
|
|
),
|
|
Meters::new(0.0, 0.0, to_z)
|
|
);
|
|
let outside_wire_small = Cube::new(
|
|
Meters::new(
|
|
self.s_major + outside_small,
|
|
-self.coupling_minor,
|
|
from_z + outside_top_center_z,
|
|
),
|
|
Meters::new(
|
|
self.s_major + outside_small + 2.0*self.coupling_minor,
|
|
self.coupling_minor,
|
|
to_z + outside_bot_center_z,
|
|
),
|
|
);
|
|
let outside_wire_large = Cube::new(
|
|
Meters::new(
|
|
self.s_major + outside_large,
|
|
-self.coupling_minor,
|
|
from_z + outside_bot_center_z,
|
|
),
|
|
Meters::new(
|
|
self.s_major + outside_large + 2.0*self.coupling_minor,
|
|
self.coupling_minor,
|
|
to_z + outside_top_center_z,
|
|
),
|
|
);
|
|
let unrotated = Union::new4(
|
|
wrap_from,
|
|
wrap_to,
|
|
outside_wire_small,
|
|
outside_wire_large,
|
|
);
|
|
|
|
Translate::new(
|
|
Rotate::about_z(
|
|
angle,
|
|
unrotated
|
|
),
|
|
Meters::new(self.sx(), self.sy(), 0.0),
|
|
)
|
|
}
|
|
/// wrap half-way around the core -- either wrap the exterior half of the interior half.
|
|
fn coupling_self_loop_half(&self, core: u32, loop_: u32, set_id: u32, of_set: u32, exterior: bool) -> impl Region {
|
|
let angle = self.coupling_angle(loop_, set_id, of_set);
|
|
|
|
let full_loop = Torus::new_xz(
|
|
Meters::new(self.s_major, 0.0, 0.0),
|
|
self.coupling_major,
|
|
self.coupling_minor,
|
|
);
|
|
let active_half = if exterior {
|
|
// keep only the x > s_major half of the loop
|
|
Cube::new(
|
|
Meters::new(self.s_major, -1.0, -1.0),
|
|
Meters::new(1.0, 1.0, 1.0),
|
|
)
|
|
} else {
|
|
// keep only the x < s_major half of the loop
|
|
Cube::new(
|
|
Meters::new(0.0, -1.0, -1.0),
|
|
Meters::new(self.s_major, 1.0, 1.0),
|
|
)
|
|
};
|
|
Translate::new(
|
|
Rotate::about_z(
|
|
angle,
|
|
Intersection::new2(full_loop, active_half),
|
|
),
|
|
Meters::new(self.sx(), self.sy(), self.sz(core))
|
|
)
|
|
}
|
|
fn coupling_self_loop_half_exterior(&self, from: u32, to: u32, loop_: u32, set_id: u32, of_set: u32) -> impl Region {
|
|
assert_eq!(from, to); // can only self-couple.
|
|
self.coupling_self_loop_half(from, loop_, set_id, of_set, true)
|
|
}
|
|
fn coupling_self_loop_half_interior(&self, from: u32, to: u32, loop_: u32, set_id: u32, of_set: u32) -> impl Region {
|
|
assert_eq!(from, to); // can only self-couple.
|
|
self.coupling_self_loop_half(from, loop_, set_id, of_set, false)
|
|
}
|
|
/// connect one 'slice' of the core to the next 'slice'.
|
|
/// use either a wire on "top" of the core, or one on "bottom"
|
|
fn coupling_self_angular(&self, core: u32, loop_: u32, set_id: u32, of_set: u32, top: bool) -> impl Region {
|
|
let start_angle = self.coupling_angle(loop_, set_id, of_set);
|
|
let end_angle = self.coupling_angle(loop_, set_id + 1, of_set);
|
|
let z = if top {
|
|
self.sz(core) + self.coupling_major
|
|
} else {
|
|
self.sz(core) - self.coupling_major
|
|
};
|
|
let full_loop = Torus::new_xy(
|
|
Meters::new(0.0, 0.0, z),
|
|
self.s_major,
|
|
self.coupling_minor,
|
|
);
|
|
let slice = WedgeZ::new(start_angle, end_angle);
|
|
Translate::new(
|
|
Intersection::new2(full_loop, slice),
|
|
Meters::new(self.sx(), self.sy(), 0.0),
|
|
)
|
|
}
|
|
fn coupling_self_angular_top(&self, from: u32, to: u32, loop_: u32, set_id: u32, of_set: u32) -> impl Region {
|
|
assert_eq!(from, to); // can only self-couple.
|
|
self.coupling_self_angular(from, loop_, set_id, of_set, true)
|
|
}
|
|
fn coupling_self_angular_bot(&self, from: u32, to: u32, loop_: u32, set_id: u32, of_set: u32) -> impl Region {
|
|
assert_eq!(from, to); // can only self-couple.
|
|
self.coupling_self_angular(from, loop_, set_id, of_set, false)
|
|
}
|
|
|
|
|
|
fn control_signal_hold(&self, cycle: u32, amp: f32) -> ClockSegment {
|
|
// simple square wave:
|
|
let amp = amp * self.input_magnitude;
|
|
let start = self.clock_phase_duration * cycle as f32;
|
|
Exp::new(100f32.cast() /* very long decay */)
|
|
.scaled(amp.cast())
|
|
.gated(R::zero(), self.clock_phase_duration.cast())
|
|
.shifted(start.cast())
|
|
}
|
|
|
|
fn control_signal_release(&self, cycle: u32, amp: f32) -> ClockSegment {
|
|
// decaying exponential wave:
|
|
let amp = amp * self.input_magnitude;
|
|
let start = self.clock_phase_duration * cycle as f32;
|
|
Exp::new(self.clock_decay.cast() /* half life */)
|
|
.scaled(amp.cast())
|
|
.gated(R::zero(), self.clock_phase_duration.cast())
|
|
.shifted(start.cast())
|
|
}
|
|
|
|
fn with_input_magnitude(&self, p: f32) -> Self {
|
|
let mut me = self.clone();
|
|
me.input_magnitude = p;
|
|
me
|
|
}
|
|
fn with_clock_phase_duration(&self, p: f32) -> Self {
|
|
let mut me = self.clone();
|
|
me.clock_phase_duration = p;
|
|
me
|
|
}
|
|
fn with_clock_decay(&self, p: f32) -> Self {
|
|
let mut me = self.clone();
|
|
me.clock_decay = p;
|
|
me
|
|
}
|
|
fn with_ctl_conductivity(&self, p: f32) -> Self {
|
|
let mut me = self.clone();
|
|
me.ctl_conductivity = p;
|
|
me
|
|
}
|
|
fn with_coupling_conductivity(&self, p: f32) -> Self {
|
|
let mut me = self.clone();
|
|
me.coupling_conductivity = p;
|
|
me
|
|
}
|
|
fn with_coupling_loops(&self, p: u32) -> Self {
|
|
let mut me = self.clone();
|
|
me.coupling_loops = p;
|
|
me
|
|
}
|
|
fn with_s_major(&self, p: f32) -> Self {
|
|
let mut me = self.clone();
|
|
me.s_major = p;
|
|
me
|
|
}
|
|
fn with_coupling(&self, from: u32, to: u32, id: u32, of: u32, meth: CouplingMethod) -> Self {
|
|
let mut me = self.clone();
|
|
me.couplings.push((from, to, id, of, meth));
|
|
me
|
|
}
|
|
}
|
|
|
|
|
|
/// minimal 2-core inverter.
|
|
/// analyze how the inverter transfers a zero v.s. a one.
|
|
#[allow(unused)]
|
|
fn drive_map_isolated_inv() -> [[ClockState; 2]; 6] {
|
|
use ClockState as C;
|
|
[
|
|
// charge S0 to '1', S1 to '0'
|
|
[C::hold_high(), C::hold_low() ],
|
|
// let the cores settle
|
|
[C::release_high(),C::release_low()],
|
|
// write S0 -> S1. S1 should be copied to 1
|
|
[C::hold_low(), C::float() ],
|
|
|
|
// charge S0=0, reset S1 for next write
|
|
[C::hold_low(), C::hold_low() ],
|
|
// let the cores settle
|
|
[C::release_low(), C::release_low()],
|
|
// write S0 -> S1. S1 should *keep its state* of 0
|
|
[C::hold_low(), C::float() ],
|
|
]
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_3stack_with_init_amp(amp: f32) -> [[ClockState; 3]; 6] {
|
|
use ClockState as C;
|
|
[
|
|
// charge S1 to '1', S0/S2 to '0'
|
|
[C::hold_low(), C::hold(amp), C::hold_low() ],
|
|
// let the cores settle
|
|
[C::release_low(), C::release(amp), C::release_low()],
|
|
// write S1 -> S0/S2. S0/S2 should be copied to 1
|
|
[C::float(), C::hold_low(), C::float() ],
|
|
|
|
// charge S1=0, reset S0/S2 for next write
|
|
[C::hold_low(), C::hold_low(), C::hold_low() ],
|
|
// let the cores settle
|
|
[C::release_low(), C::release_low(), C::release_low()],
|
|
// write S1 -> S0/S2. S0/S2 should *keep its state* of 0
|
|
[C::float(), C::hold_low(), C::float() ],
|
|
]
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_3stack() -> [[ClockState; 3]; 6] {
|
|
drive_map_3stack_with_init_amp(1.0)
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_3stack_and_rev_with_init_amp(amp: f32) -> [[ClockState; 3]; 6] {
|
|
use ClockState as C;
|
|
[
|
|
// charge S1 to '1', S0/S2 to '0'
|
|
[C::hold_low(), C::hold(amp), C::hold_low() ],
|
|
// let the cores settle
|
|
[C::release_low(), C::release(amp), C::release_low()],
|
|
// write S1 -> S0/S2. S0/S2 should be copied to 1
|
|
[C::float(), C::hold_low(), C::float() ],
|
|
|
|
// open S1 for write
|
|
[C::float(), C::release_low(), C::float() ],
|
|
// write {S0,S2} -> S1
|
|
[C::hold_low(), C::float(), C::hold_low() ],
|
|
// let settle
|
|
[C::release_low(), C::float(), C::release_low()],
|
|
]
|
|
}
|
|
#[allow(unused)]
|
|
fn drive_map_3stack_and_rev() -> [[ClockState; 3]; 6] {
|
|
drive_map_3stack_and_rev_with_init_amp(1.0)
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_3stack_one_sided() -> [[ClockState; 3]; 6] {
|
|
use ClockState as C;
|
|
[
|
|
// charge S0 to '1', S1/S2 to '0'
|
|
[C::hold_high(), C::hold_low(), C::hold_low() ],
|
|
// let the cores settle
|
|
[C::release_high(),C::release_low(), C::release_low()],
|
|
// write S0 -> S1/S2. S1/S2 should be copied to 1
|
|
[C::hold_low(), C::float(), C::float() ],
|
|
|
|
// charge S0=0, reset S1/S2 for next write
|
|
[C::hold_low(), C::hold_low(), C::hold_low() ],
|
|
// let the cores settle
|
|
[C::release_low(), C::release_low(), C::release_low()],
|
|
// write S0 -> S1/S2. S1/S2 should *keep its state* of 0
|
|
[C::hold_low(), C::float(), C::float() ],
|
|
]
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_3stack_one_sided_inv() -> [[ClockState; 3]; 6] {
|
|
use ClockState as C;
|
|
[
|
|
// charge S0/S2 to '1', S1 to '0'
|
|
[C::hold_high(), C::hold_low(), C::hold_high() ],
|
|
// let the cores settle
|
|
[C::release_high(),C::release_low(), C::release_high()],
|
|
// write S0 -> S1/S2. S1/S2 should be *inverted*
|
|
[C::hold_low(), C::float(), C::float() ],
|
|
|
|
// charge S0=0, reset S1/S2 for next write
|
|
[C::hold_low(), C::hold_low(), C::hold_high() ],
|
|
// let the cores settle
|
|
[C::release_low(), C::release_low(), C::release_high()],
|
|
// write S0 -> S1/S2. S1/S2 should *keep its state*
|
|
[C::hold_low(), C::float(), C::float() ],
|
|
]
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_5stack_one_sided_inv() -> [[ClockState; 5]; 6] {
|
|
use ClockState as C;
|
|
[
|
|
// charge S0/S2 to '1', S1 to '0'
|
|
[C::hold_high(), C::hold_low(), C::hold_high(), C::hold_low(), C::hold_high() ],
|
|
// let the cores settle
|
|
[C::release_high(),C::release_low(), C::release_high(),C::release_low(), C::release_high()],
|
|
// write S0 -> S1/S2. S1/S2 should be *inverted*
|
|
[C::hold_low(), C::float(), C::float(), C::float(), C::float() ],
|
|
|
|
// charge S0=0, reset S1/S2 for next write
|
|
[C::hold_low(), C::hold_low(), C::hold_high(), C::hold_low(), C::hold_high() ],
|
|
// let the cores settle
|
|
[C::release_low(), C::release_low(), C::release_high(),C::release_low(), C::release_high()],
|
|
// write S0 -> S1/S2. S1/S2 should *keep its state*
|
|
[C::hold_low(), C::float(), C::float(), C::float(), C::float() ],
|
|
]
|
|
}
|
|
|
|
/// 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<const N: usize>() -> [[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] = match c % 2 { // charge to base state
|
|
1 => C::hold_low(),
|
|
_ => C::hold_high(),
|
|
};
|
|
clocks[1][c] = match c % 2 { // let settle
|
|
1 => C::release_low(),
|
|
_ => C::release_high(),
|
|
};
|
|
clocks[2][c] = C::float(); // accept the active transfer
|
|
clocks[3][c] = match c % 2 { // charge to base state
|
|
1 => C::hold_low(),
|
|
_ => C::hold_high(),
|
|
};
|
|
clocks[4][c] = match c % 2 { // let settle
|
|
1 => C::release_low(),
|
|
_ => C::release_high(),
|
|
};
|
|
clocks[5][c] = C::float(); // accept the noop transfer
|
|
}
|
|
|
|
clocks
|
|
}
|
|
|
|
/// this is intended for S0 to *directly* couple S1, S2, S3, ...
|
|
/// we do an active transfer from S0 -> {S1, S2, ...}.
|
|
/// then reset and do a noop transfer from S0 -> {S1, S2, ...}
|
|
#[allow(unused)]
|
|
fn drive_map_nstack_one_sided<const N: usize>() -> [[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
|
|
}
|
|
|
|
/// this is intended for S0 to *directly* couple S1, S2, S3, ...
|
|
/// we charge S0 to the provided amp, then clear it into S1, S2, S3, ...
|
|
/// then clear S1, S2, S3, ... back into S0.
|
|
///
|
|
/// success would be that S0 has a higher state at the end than at the start (we amplified its
|
|
/// value).
|
|
#[allow(unused)]
|
|
fn drive_map_nstack_one_sided_and_back<const N: usize>(amp: f32) -> [[ClockState; N]; 6] {
|
|
use ClockState as C;
|
|
|
|
let mut clocks = [[C::float(); N]; 6];
|
|
|
|
for c in 0..N {
|
|
clocks[0][c] = match c { // init cores
|
|
0 => C::hold(amp),
|
|
_ => C::hold_low(),
|
|
};
|
|
clocks[1][c] = match c { // let settle
|
|
0 => C::release(amp),
|
|
_ => C::release_low(),
|
|
};
|
|
clocks[2][c] = match c { // transfer S0 -> S{n}
|
|
0 => C::hold_low(),
|
|
_ => C::float(), // accept transfer
|
|
};
|
|
clocks[3][c] = match c { // let settle
|
|
0 => C::release_low(),
|
|
_ => C::float(),
|
|
};
|
|
clocks[4][c] = match c { // transfer S{n} -> S0
|
|
0 => C::float(), // accept transfer
|
|
_ => C::hold_low(),
|
|
};
|
|
clocks[5][c] = match c { // let settle
|
|
0 => C::float(),
|
|
_ => C::release_low(),
|
|
};
|
|
}
|
|
|
|
clocks
|
|
}
|
|
|
|
/// this is intended for S0 to *directly* couple S1, S2, S3, ...
|
|
/// we charge S0 to the provided amp, then clear it into S1, S2, S3, ...
|
|
/// then clear S1, S2, S3, ... back into S0.
|
|
///
|
|
/// additionally, we charge S_{N-1} to have an _opposite_ polarity from the rest.
|
|
/// clearing this one causes S0 to push _back towards its noop value_,
|
|
/// defending against undesired amplification
|
|
///
|
|
/// success would be that S0 has a higher state at the end than at the start AND noop values are
|
|
/// kept noop.
|
|
#[allow(unused)]
|
|
fn drive_map_nstack_one_sided_and_back_with_negative<const N: usize>(amp: f32) -> [[ClockState; N]; 6] {
|
|
use ClockState as C;
|
|
|
|
let mut clocks = [[C::float(); N]; 6];
|
|
|
|
for c in 0..N {
|
|
clocks[0][c] = match c { // init cores
|
|
0 => C::hold(amp),
|
|
x if x == N-1 => C::hold_low(),
|
|
_ => C::hold_low(),
|
|
};
|
|
clocks[1][c] = match c { // let settle
|
|
0 => C::release(amp),
|
|
x if x == N-1 => C::hold_low(),
|
|
_ => C::release_low(),
|
|
};
|
|
clocks[2][c] = match c { // transfer S0 -> S{n}
|
|
0 => C::hold_low(),
|
|
x if x == N-1 => C::hold_low(),
|
|
_ => C::float(), // accept transfer
|
|
};
|
|
clocks[3][c] = match c { // let settle
|
|
0 => C::release_low(),
|
|
x if x == N-1 => C::hold_low(), // XXX: maybe release_low?
|
|
_ => C::float(),
|
|
};
|
|
clocks[4][c] = match c { // transfer S{n} -> S0
|
|
0 => C::float(), // accept transfer
|
|
x if x == N-1 => C::hold_high(), // weaken the transfer
|
|
_ => C::hold_low(),
|
|
};
|
|
clocks[5][c] = match c { // let settle
|
|
0 => C::float(),
|
|
x if x == N-1 => C::release_high(),
|
|
_ => C::release_low(),
|
|
};
|
|
}
|
|
|
|
clocks
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_nstack_one_sided_with_output<const N: usize>() -> [[ClockState; N]; 6] {
|
|
use ClockState as C;
|
|
|
|
let mut clocks = drive_map_nstack_one_sided::<N>();
|
|
// the final core is coupled to S1, S2, ...
|
|
// it needs to be initialized to the opposite polarity as those cores
|
|
clocks[0][N-1] = C::hold_high();
|
|
clocks[1][N-1] = C::release_high();
|
|
clocks[2][N-1] = C::float();
|
|
clocks[3][N-1] = C::hold_high();
|
|
clocks[4][N-1] = C::release_high();
|
|
clocks[5][N-1] = C::float();
|
|
|
|
clocks
|
|
}
|
|
|
|
/// S0 couples to S1, S2, S3, ... in parallel.
|
|
/// S1, S2, S3, ... is coupled to Sn with one loop.
|
|
/// we write S0 -> S1, S2, ... while holding Sn static.
|
|
/// then we write S1, S2, ... to Sn while holding S0 static
|
|
#[allow(unused)]
|
|
fn drive_map_nstack_one_sided_with_output_locked<const N: usize>() -> [[ClockState; N]; 10] {
|
|
use ClockState as C;
|
|
let mut clocks = [[C::float(); N]; 10];
|
|
for c in 0..N {
|
|
clocks[0][c] = match c { // charge to base state (for active transfer)
|
|
0 => C::hold_high(),
|
|
x if x == N-1 => C::hold_low(),
|
|
_ => C::hold_low(),
|
|
};
|
|
clocks[1][c] = match c { // let main cores settle
|
|
0 => C::release_high(),
|
|
x if x == N-1 => C::hold_low(),
|
|
_ => C::release_low(),
|
|
};
|
|
clocks[2][c] = match c { // write S0 -> S1, S2, ...
|
|
0 => C::hold_low(),
|
|
x if x == N-1 => C::hold_low(),
|
|
_ => C::float(),
|
|
};
|
|
clocks[3][c] = match c { // open Sn-1 for write
|
|
0 => C::hold_low(),
|
|
x if x == N-1 => C::release_low(),
|
|
_ => C::float(),
|
|
};
|
|
clocks[4][c] = match c { // write S1, S2, ... -> Sn-1
|
|
x if x == N-1 => C::float(),
|
|
_ => C::hold_low(),
|
|
};
|
|
|
|
clocks[5][c] = match c { // reset cores for noop transfer
|
|
x if x == N-1 => C::hold_low(),
|
|
_ => C::hold_low(),
|
|
};
|
|
clocks[6][c] = match c { // let main cores settle
|
|
x if x == N-1 => C::hold_low(),
|
|
_ => C::release_low(),
|
|
};
|
|
clocks[7][c] = match c { // write S0 -> S1, S2, ...
|
|
0 => C::hold_low(),
|
|
x if x == N-1 => C::hold_low(),
|
|
_ => C::float(),
|
|
};
|
|
clocks[8][c] = match c { // open Sn-1 for write
|
|
0 => C::hold_low(),
|
|
x if x == N-1 => C::release_low(),
|
|
_ => C::float(),
|
|
};
|
|
clocks[9][c] = match c { // write S1, S2, ... -> Sn-1
|
|
x if x == N-1 => C::float(),
|
|
_ => C::hold_low(),
|
|
};
|
|
}
|
|
clocks
|
|
}
|
|
|
|
/// M0 drives M1, M2, M3,... in parallel.
|
|
/// M1, M2, M3, ... drive M{n-1} in series.
|
|
/// initialize cores.
|
|
/// hold M{n-1} in place and write M0 -> {M1, ...}
|
|
/// hold M0 in place and write {M1, ...} -> M{n-1}
|
|
#[allow(unused)]
|
|
fn drive_map_nstack_one_sided_with_output_locked_once<const N: usize>(m0_amp: f32) -> [[ClockState; N]; 5] {
|
|
use ClockState as C;
|
|
let mut clocks = [[C::float(); N]; 5];
|
|
for c in 0..N {
|
|
clocks[0][c] = match c { // charge to base state (for active transfer)
|
|
0 => C::hold(m0_amp),
|
|
x if x == N-1 => C::hold_low(),
|
|
_ => C::hold_low(),
|
|
};
|
|
clocks[1][c] = match c { // let main cores settle
|
|
0 => C::release(m0_amp),
|
|
x if x == N-1 => C::hold_low(),
|
|
_ => C::release_low(),
|
|
};
|
|
clocks[2][c] = match c { // write S0 -> S1, S2, ...
|
|
0 => C::hold_low(),
|
|
x if x == N-1 => C::hold_low(),
|
|
_ => C::float(),
|
|
};
|
|
clocks[3][c] = match c { // open Sn-1 for write
|
|
0 => C::hold_low(),
|
|
x if x == N-1 => C::release_low(),
|
|
_ => C::float(),
|
|
};
|
|
clocks[4][c] = match c { // write S1, S2, ... -> Sn-1
|
|
x if x == N-1 => C::float(),
|
|
_ => C::hold_low(),
|
|
};
|
|
}
|
|
clocks
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_3stack_through_saturation(gate_amp: f32, drive_amp: f32) -> [[ClockState; 3]; 3] {
|
|
use ClockState as C;
|
|
let (g_amp, d_amp) = (gate_amp, drive_amp);
|
|
[
|
|
// charge S0.
|
|
[C::hold(d_amp), C::hold(g_amp), C::hold_high() ],
|
|
// let the cores settle
|
|
[C::release(d_amp),C::release(g_amp),C::release_high()],
|
|
// write S0 -> S1. S1 is saturated; will it pass on change to S2?
|
|
[C::hold_low(), C::float(), C::float() ],
|
|
]
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_3stack_through_saturation_inv(gate_amp: f32, drive_amp: f32) -> [[ClockState; 3]; 3] {
|
|
use ClockState as C;
|
|
let (g_amp, d_amp) = (gate_amp, drive_amp);
|
|
[
|
|
// charge S0.
|
|
[C::hold(d_amp), C::hold(g_amp), C::hold_low() ],
|
|
// let the cores settle
|
|
[C::release(d_amp),C::release(g_amp),C::release_low()],
|
|
// write S0 -> S1, S2. S1 is saturated; will it modulate change to S2?
|
|
[C::hold_low(), C::float(), C::float() ],
|
|
]
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_2stack_with_init(amp: f32) -> [[ClockState; 2]; 3] {
|
|
use ClockState as C;
|
|
[
|
|
// charge S0.
|
|
[C::hold(amp), C::hold_low(), ],
|
|
// let the cores settle
|
|
[C::release(amp),C::release_low(),],
|
|
// write S0 -> S1.
|
|
[C::hold_low(), C::float(), ],
|
|
]
|
|
}
|
|
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_2stack_with_init2(amp0: f32, amp1: f32) -> [[ClockState; 2]; 3] {
|
|
use ClockState as C;
|
|
[
|
|
// charge S0.
|
|
[C::hold(amp0), C::hold(amp1), ],
|
|
// let the cores settle
|
|
[C::release(amp0), C::release(amp1),],
|
|
// write S0 -> S1.
|
|
[C::hold_low(), C::float(), ],
|
|
]
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_4stack_with_init4(amp0: f32, amp1: f32, amp2: f32, amp3: f32) -> [[ClockState; 4]; 3] {
|
|
use ClockState as C;
|
|
[
|
|
// charge S0.
|
|
[C::hold(amp0), C::hold(amp1), C::hold(amp2), C::hold(-amp3), ],
|
|
// let the cores settle
|
|
[C::release(amp0), C::release(amp1), C::release(amp2), C::release(-amp3),],
|
|
// write S0 -> S1.
|
|
[C::hold_low(), C::float(), C::hold_low(), C::hold_high() ],
|
|
]
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_5stack_with_init5(amp0: f32, amp1: f32, amp2: f32, amp3: f32, amp4: f32) -> [[ClockState; 5]; 3] {
|
|
use ClockState as C;
|
|
[
|
|
// charge S0.
|
|
[C::hold(amp0), C::hold(amp1), C::hold(amp2), C::hold(amp3), C::hold(-amp4), ],
|
|
// let the cores settle
|
|
[C::release(amp0), C::release(amp1), C::release(amp2), C::release(amp3), C::release(-amp4),],
|
|
// write S0 -> S1.
|
|
[C::hold_low(), C::float(), C::hold_low(), C::hold_low(), C::hold_high() ],
|
|
]
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_7stack_half_pos_half_inv(amp_pos: f32, amp_inv: f32, amp_recv: f32) -> [[ClockState; 7]; 3] {
|
|
use ClockState as C;
|
|
[
|
|
// charge all
|
|
[C::hold(amp_pos), C::hold(amp_pos), C::hold(amp_pos), C::hold(amp_recv), C::hold(-amp_inv), C::hold(-amp_inv), C::hold(-amp_inv), ],
|
|
// let the cores settle
|
|
[C::release(amp_pos), C::release(amp_pos), C::release(amp_pos), C::release(amp_recv), C::release(-amp_inv), C::release(-amp_inv), C::release(-amp_inv), ],
|
|
// write S* -> S3
|
|
[C::hold_low(), C::hold_low(), C::hold_low(), C::float(), C::hold_high(), C::hold_high(), C::hold_high(), ],
|
|
]
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_nstack_pos_minv<const N: usize, const M: usize>(amp_pos: f32, amp_inv: f32) -> [[ClockState; N+M+1]; 3] {
|
|
use ClockState as C;
|
|
let mut clocks = [[C::float(); N+M+1]; 3];
|
|
for c in 0..N+M+1 {
|
|
clocks[0][c] = match c { // charge to base state
|
|
0 => C::hold_low(), // prepare to receive
|
|
x if x <= N => C::hold(amp_pos), // pos tx
|
|
_ => C::hold(-amp_inv), // inv tx
|
|
};
|
|
clocks[1][c] = match c { // let settle
|
|
0 => C::release_low(), // prepare to receive
|
|
x if x <= N => C::release(amp_pos), // pos tx
|
|
_ => C::release(-amp_inv), // inv tx
|
|
};
|
|
clocks[2][c] = match c { // write
|
|
0 => C::float(), // receive
|
|
x if x <= N => C::hold_low(), // write positive
|
|
_ => C::hold_high(), // write inverse
|
|
};
|
|
}
|
|
clocks
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_3stack_with_init3_m2_inv(amp0: f32, amp1: f32, amp2: f32) -> [[ClockState; 3]; 3] {
|
|
use ClockState as C;
|
|
[
|
|
// charge S0.
|
|
[C::hold(amp0), C::hold(amp1), C::hold(-amp2), ],
|
|
// let the cores settle
|
|
[C::release(amp0), C::release(amp1), C::release(-amp2),],
|
|
// write S0 -> S1.
|
|
[C::hold_low(), C::float(), C::hold_high() ],
|
|
]
|
|
}
|
|
|
|
/// this attempts to fork S0 -> {S1, S2},
|
|
/// then write S2 back into S1 in such a way that S1 and S2 are never working _against_ eachother
|
|
/// (like the trivial approaches for doing this do).
|
|
#[allow(unused)]
|
|
fn drive_map_fork_then_fold2(amp: f32) -> [[ClockState; 5]; 5] {
|
|
use ClockState as C;
|
|
[
|
|
// charge S0.
|
|
[C::hold(amp), C::hold_low(), C::hold_low(), C::hold_low(), C::hold_high() ],
|
|
// let the cores settle
|
|
[C::release(amp), C::release_low(), C::release_low(), C::hold_low(), C::hold_high() ],
|
|
// write S0 -> S1, S2.
|
|
[C::hold_low(), C::float(), C::float(), C::hold_low(), C::hold_high() ],
|
|
// open S3, S4 for passthru
|
|
[C::hold_low(), C::float(), C::float(), C::release_low(), C::release_high()],
|
|
// write S2 -> S3 -> S4 -> S1
|
|
[C::hold_low(), C::float(), C::hold_low(), C::float(), C::float() ],
|
|
]
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_fork_then_join(amp0: f32) -> [[ClockState; 4]; 3] {
|
|
use ClockState as C;
|
|
[
|
|
// charge cores
|
|
[C::hold(amp0), C::hold_low(), C::hold_low(), C::hold_high(), ],
|
|
// let the cores settle
|
|
[C::release(amp0), C::release_low(), C::release_low(), C::release_high(),],
|
|
// write S0 -> {S1, S2} -> S3
|
|
[C::hold_low(), C::float(), C::float(), C::float(), ],
|
|
]
|
|
}
|
|
|
|
#[allow(unused)]
|
|
fn drive_map_fork_then_join_m2_out(amp0: f32) -> [[ClockState; 4]; 3] {
|
|
use ClockState as C;
|
|
[
|
|
// charge S0.
|
|
[C::hold(amp0), C::hold_low(), C::hold_high(), C::hold_low(), ],
|
|
// let the cores settle
|
|
[C::release(amp0), C::release_low(), C::release_high(), C::release_low(),],
|
|
// write S0 -> {S1, S3} -> S2
|
|
[C::hold_low(), C::float(), C::float(), C::float(), ],
|
|
]
|
|
}
|
|
|
|
fn main() {
|
|
coremem::init_logging();
|
|
// coremem::init_debug();
|
|
|
|
let params = Params {
|
|
input_magnitude: 0.0,
|
|
clock_phase_duration: 0.0,
|
|
clock_decay: 0.0,
|
|
ctl_conductivity: 0.0,
|
|
coupling_conductivity: 0.0,
|
|
// 's' = core (ferromagnetic part)
|
|
s_major: 0.0,
|
|
s_minor: um(30),
|
|
// 'io' = drive/control wire
|
|
io_major: um(70),
|
|
io_minor: um(20),
|
|
coupling_major: um(70),
|
|
coupling_minor: um(20),
|
|
coupling_loops: 1,
|
|
s_xy_buffer: um(250),
|
|
// coords for core 'n'
|
|
sz1: um(320),
|
|
couplings: Vec::new(),
|
|
};
|
|
// if false {
|
|
// let p17x = params
|
|
// .with_clock_phase_duration(ps(2000))
|
|
// .with_clock_decay(ps(100))
|
|
// .with_input_magnitude(5e9)
|
|
// .with_ctl_conductivity(1e3)
|
|
// .with_coupling_conductivity(1e4)
|
|
// .with_s_major(um(160))
|
|
// ;
|
|
// run_sim(
|
|
// "171-2ns-100ps-5e9A-1e3pctl-1e4pcpl-4loops",
|
|
// drive_map_isolated_inv(),
|
|
// p17x.with_coupling_loops(4),
|
|
// );
|
|
// run_sim(
|
|
// "172-2ns-100ps-5e9A-1e3pctl-1e4pcpl-2loops",
|
|
// drive_map_isolated_inv(),
|
|
// p17x.with_coupling_loops(2),
|
|
// );
|
|
// run_sim(
|
|
// "173-2ns-100ps-5e9A-1e3pctl-1e4pcpl-1loops",
|
|
// drive_map_isolated_inv(),
|
|
// p17x.with_coupling_loops(1),
|
|
// );
|
|
// run_sim(
|
|
// "174-2ns-100ps-5e9A-1e3pctl-1e4pcpl-6loops",
|
|
// drive_map_isolated_inv(),
|
|
// p17x.with_coupling_loops(6),
|
|
// );
|
|
// }
|
|
// if false {
|
|
// let p3xx = params
|
|
// .with_clock_phase_duration(ps(2000))
|
|
// .with_clock_decay(ps(100))
|
|
// .with_input_magnitude(5e10)
|
|
// .with_ctl_conductivity(1e3)
|
|
// .with_coupling_conductivity(1e4)
|
|
// .with_s_major(um(400))
|
|
// ;
|
|
// run_sim(
|
|
// "301-2ns-100ps-5e10A-1e3pctl-1e4pcpl-400um-1loops",
|
|
// drive_map_isolated_inv(),
|
|
// p3xx.with_coupling_loops(1),
|
|
// );
|
|
// run_sim(
|
|
// "302-2ns-100ps-5e10A-1e3pctl-1e4pcpl-400um-2loops",
|
|
// drive_map_isolated_inv(),
|
|
// p3xx.with_coupling_loops(2),
|
|
// );
|
|
// run_sim(
|
|
// "304-2ns-100ps-5e10A-1e3pctl-1e4pcpl-400um-4loops",
|
|
// drive_map_isolated_inv(),
|
|
// p3xx.with_coupling_loops(4),
|
|
// );
|
|
// run_sim(
|
|
// "308-2ns-100ps-5e10A-1e3pctl-1e4pcpl-400um-8loops",
|
|
// drive_map_isolated_inv(),
|
|
// p3xx.with_coupling_loops(8),
|
|
// );
|
|
// run_sim(
|
|
// "312-2ns-100ps-5e10A-1e3pctl-1e4pcpl-400um-12loops",
|
|
// drive_map_isolated_inv(),
|
|
// p3xx.with_coupling_loops(12),
|
|
// );
|
|
// run_sim(
|
|
// "316-2ns-100ps-5e10A-1e3pctl-1e4pcpl-400um-16loops",
|
|
// drive_map_isolated_inv(),
|
|
// p3xx.with_coupling_loops(16),
|
|
// );
|
|
// run_sim(
|
|
// "320-2ns-100ps-5e10A-1e3pctl-1e4pcpl-400um-20loops",
|
|
// drive_map_isolated_inv(),
|
|
// p3xx.with_coupling_loops(20),
|
|
// );
|
|
// run_sim(
|
|
// "324-2ns-100ps-5e10A-1e3pctl-1e4pcpl-400um-24loops",
|
|
// drive_map_isolated_inv(),
|
|
// p3xx.with_coupling_loops(24),
|
|
// );
|
|
// run_sim(
|
|
// "328-2ns-100ps-5e10A-1e3pctl-1e4pcpl-400um-28loops",
|
|
// drive_map_isolated_inv(),
|
|
// p3xx.with_coupling_loops(28),
|
|
// );
|
|
// run_sim(
|
|
// "332-2ns-100ps-5e10A-1e3pctl-1e4pcpl-400um-32loops",
|
|
// drive_map_isolated_inv(),
|
|
// p3xx.with_coupling_loops(32),
|
|
// );
|
|
// }
|
|
// if false {
|
|
// let p4xx = params
|
|
// .with_clock_phase_duration(ps(1000))
|
|
// .with_clock_decay(ps(50))
|
|
// .with_input_magnitude(8e10)
|
|
// .with_ctl_conductivity(5e2)
|
|
// .with_coupling_conductivity(5e3)
|
|
// .with_s_major(um(400))
|
|
// .with_coupling(1, 0, 0, 2, CouplingMethod::Direct)
|
|
// .with_coupling(1, 2, 1, 2, CouplingMethod::Direct)
|
|
// ;
|
|
// run_sim(
|
|
// "401-1loops",
|
|
// drive_map_3stack(),
|
|
// p4xx.with_coupling_loops(1),
|
|
// );
|
|
// run_sim(
|
|
// "402-2loops",
|
|
// drive_map_3stack(),
|
|
// p4xx.with_coupling_loops(2),
|
|
// );
|
|
// run_sim(
|
|
// "404-4loops",
|
|
// drive_map_3stack(),
|
|
// p4xx.with_coupling_loops(4),
|
|
// );
|
|
// run_sim(
|
|
// "406-6loops",
|
|
// drive_map_3stack(),
|
|
// p4xx.with_coupling_loops(6),
|
|
// );
|
|
// run_sim(
|
|
// "408-8loops",
|
|
// drive_map_3stack(),
|
|
// p4xx.with_coupling_loops(8),
|
|
// );
|
|
// run_sim(
|
|
// "410-10loops",
|
|
// drive_map_3stack(),
|
|
// p4xx.with_coupling_loops(10),
|
|
// );
|
|
// run_sim(
|
|
// "412-12loops",
|
|
// drive_map_3stack(),
|
|
// p4xx.with_coupling_loops(12),
|
|
// );
|
|
// run_sim(
|
|
// "416-16loops",
|
|
// drive_map_3stack(),
|
|
// p4xx.with_coupling_loops(16),
|
|
// );
|
|
// run_sim(
|
|
// "420-20loops",
|
|
// drive_map_3stack(),
|
|
// p4xx.with_coupling_loops(20),
|
|
// );
|
|
// }
|
|
// if false {
|
|
// let p5xx = params
|
|
// .with_clock_phase_duration(ps(1000))
|
|
// .with_clock_decay(ps(50))
|
|
// .with_input_magnitude(8e10)
|
|
// .with_ctl_conductivity(5e2)
|
|
// .with_coupling_conductivity(5e3)
|
|
// .with_s_major(um(400))
|
|
// .with_coupling(0, 1, 0, 2, CouplingMethod::Direct)
|
|
// .with_coupling(1, 2, 1, 2, CouplingMethod::Direct)
|
|
// ;
|
|
// run_sim(
|
|
// "501-1loops",
|
|
// drive_map_3stack_one_sided(),
|
|
// p5xx.with_coupling_loops(1),
|
|
// );
|
|
// run_sim(
|
|
// "502-2loops",
|
|
// drive_map_3stack_one_sided(),
|
|
// p5xx.with_coupling_loops(2),
|
|
// );
|
|
// run_sim(
|
|
// "504-4loops",
|
|
// drive_map_3stack_one_sided(),
|
|
// p5xx.with_coupling_loops(4),
|
|
// );
|
|
// run_sim(
|
|
// "506-6loops",
|
|
// drive_map_3stack_one_sided(),
|
|
// p5xx.with_coupling_loops(6),
|
|
// );
|
|
// run_sim(
|
|
// "508-8loops",
|
|
// drive_map_3stack_one_sided(),
|
|
// p5xx.with_coupling_loops(8),
|
|
// );
|
|
// run_sim(
|
|
// "510-10loops",
|
|
// drive_map_3stack_one_sided(),
|
|
// p5xx.with_coupling_loops(10),
|
|
// );
|
|
// run_sim(
|
|
// "512-12loops",
|
|
// drive_map_3stack_one_sided(),
|
|
// p5xx.with_coupling_loops(12),
|
|
// );
|
|
// run_sim(
|
|
// "516-16loops",
|
|
// drive_map_3stack_one_sided(),
|
|
// p5xx.with_coupling_loops(16),
|
|
// );
|
|
// run_sim(
|
|
// "520-20loops",
|
|
// drive_map_3stack_one_sided(),
|
|
// p5xx.with_coupling_loops(20),
|
|
// );
|
|
// }
|
|
// if false {
|
|
// let p6xx = params
|
|
// .with_clock_phase_duration(ps(1000))
|
|
// .with_clock_decay(ps(50))
|
|
// .with_input_magnitude(8e10)
|
|
// .with_ctl_conductivity(5e2)
|
|
// .with_coupling_conductivity(5e3)
|
|
// .with_s_major(um(400))
|
|
// .with_coupling(0, 1, 0, 2, CouplingMethod::Direct)
|
|
// .with_coupling(1, 2, 1, 2, CouplingMethod::Direct)
|
|
// ;
|
|
// run_sim(
|
|
// "601-1loops",
|
|
// drive_map_3stack_one_sided_inv(),
|
|
// p6xx.with_coupling_loops(1),
|
|
// );
|
|
// run_sim(
|
|
// "602-2loops",
|
|
// drive_map_3stack_one_sided_inv(),
|
|
// p6xx.with_coupling_loops(2),
|
|
// );
|
|
// run_sim(
|
|
// "604-4loops",
|
|
// drive_map_3stack_one_sided_inv(),
|
|
// p6xx.with_coupling_loops(4),
|
|
// );
|
|
// run_sim(
|
|
// "606-6loops",
|
|
// drive_map_3stack_one_sided_inv(),
|
|
// p6xx.with_coupling_loops(6),
|
|
// );
|
|
// run_sim(
|
|
// "608-8loops",
|
|
// drive_map_3stack_one_sided_inv(),
|
|
// p6xx.with_coupling_loops(8),
|
|
// );
|
|
// run_sim(
|
|
// "610-10loops",
|
|
// drive_map_3stack_one_sided_inv(),
|
|
// p6xx.with_coupling_loops(10),
|
|
// );
|
|
// run_sim(
|
|
// "612-12loops",
|
|
// drive_map_3stack_one_sided_inv(),
|
|
// p6xx.with_coupling_loops(12),
|
|
// );
|
|
// run_sim(
|
|
// "616-16loops",
|
|
// drive_map_3stack_one_sided_inv(),
|
|
// p6xx.with_coupling_loops(16),
|
|
// );
|
|
// run_sim(
|
|
// "620-20loops",
|
|
// drive_map_3stack_one_sided_inv(),
|
|
// p6xx.with_coupling_loops(20),
|
|
// );
|
|
// }
|
|
// if false {
|
|
// let p7xx = params
|
|
// .with_clock_phase_duration(ps(1000))
|
|
// .with_clock_decay(ps(50))
|
|
// .with_input_magnitude(8e10)
|
|
// .with_ctl_conductivity(5e2)
|
|
// .with_coupling_conductivity(5e3)
|
|
// .with_s_major(um(400))
|
|
// .with_coupling(0, 1, 0, 2, CouplingMethod::Direct)
|
|
// .with_coupling(1, 2, 1, 2, CouplingMethod::Direct)
|
|
// .with_coupling(2, 3, 0, 2, CouplingMethod::Direct)
|
|
// .with_coupling(3, 4, 1, 2, CouplingMethod::Direct)
|
|
// ;
|
|
// run_sim(
|
|
// "701-1loops",
|
|
// drive_map_5stack_one_sided_inv(),
|
|
// p7xx.with_coupling_loops(1),
|
|
// );
|
|
// run_sim(
|
|
// "702-2loops",
|
|
// drive_map_5stack_one_sided_inv(),
|
|
// p7xx.with_coupling_loops(2),
|
|
// );
|
|
// run_sim(
|
|
// "704-4loops",
|
|
// drive_map_5stack_one_sided_inv(),
|
|
// p7xx.with_coupling_loops(4),
|
|
// );
|
|
// run_sim(
|
|
// "706-6loops",
|
|
// drive_map_5stack_one_sided_inv(),
|
|
// p7xx.with_coupling_loops(6),
|
|
// );
|
|
// run_sim(
|
|
// "708-8loops",
|
|
// drive_map_5stack_one_sided_inv(),
|
|
// p7xx.with_coupling_loops(8),
|
|
// );
|
|
// run_sim(
|
|
// "710-10loops",
|
|
// drive_map_5stack_one_sided_inv(),
|
|
// p7xx.with_coupling_loops(10),
|
|
// );
|
|
// run_sim(
|
|
// "712-12loops",
|
|
// drive_map_5stack_one_sided_inv(),
|
|
// p7xx.with_coupling_loops(12),
|
|
// );
|
|
// run_sim(
|
|
// "716-16loops",
|
|
// drive_map_5stack_one_sided_inv(),
|
|
// p7xx.with_coupling_loops(16),
|
|
// );
|
|
// run_sim(
|
|
// "720-20loops",
|
|
// drive_map_5stack_one_sided_inv(),
|
|
// p7xx.with_coupling_loops(20),
|
|
// );
|
|
// }
|
|
// if false {
|
|
// let p8xx = params
|
|
// .with_clock_phase_duration(ps(1000))
|
|
// .with_clock_decay(ps(50))
|
|
// .with_input_magnitude(8e10)
|
|
// .with_ctl_conductivity(5e2)
|
|
// .with_coupling_conductivity(5e3)
|
|
// .with_s_major(um(400))
|
|
// .with_coupling_loops(16)
|
|
// ;
|
|
// run_sim(
|
|
// "803-3core",
|
|
// drive_map_nstack_one_sided_inv::<3>(),
|
|
// p8xx,
|
|
// );
|
|
// run_sim(
|
|
// "805-5core",
|
|
// drive_map_nstack_one_sided_inv::<5>(),
|
|
// p8xx,
|
|
// );
|
|
// run_sim(
|
|
// "807-7core",
|
|
// drive_map_nstack_one_sided_inv::<7>(),
|
|
// p8xx,
|
|
// );
|
|
// run_sim(
|
|
// "809-9core",
|
|
// drive_map_nstack_one_sided_inv::<9>(),
|
|
// p8xx,
|
|
// );
|
|
// run_sim(
|
|
// "811-11core",
|
|
// drive_map_nstack_one_sided_inv::<11>(),
|
|
// p8xx,
|
|
// );
|
|
// run_sim(
|
|
// "813-13core",
|
|
// drive_map_nstack_one_sided_inv::<13>(),
|
|
// p8xx,
|
|
// );
|
|
// run_sim(
|
|
// "815-15core",
|
|
// drive_map_nstack_one_sided_inv::<15>(),
|
|
// p8xx,
|
|
// );
|
|
// run_sim(
|
|
// "817-17core",
|
|
// drive_map_nstack_one_sided_inv::<17>(),
|
|
// p8xx,
|
|
// );
|
|
// run_sim(
|
|
// "819-19core",
|
|
// drive_map_nstack_one_sided_inv::<19>(),
|
|
// p8xx,
|
|
// );
|
|
// run_sim(
|
|
// "820-20core",
|
|
// drive_map_nstack_one_sided_inv::<20>(),
|
|
// p8xx,
|
|
// );
|
|
// run_sim(
|
|
// "821-21core",
|
|
// drive_map_nstack_one_sided_inv::<21>(),
|
|
// p8xx,
|
|
// );
|
|
// }
|
|
if false {
|
|
let p9xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_input_magnitude(8e10)
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_coupling(1, 0, 0, 2, CouplingMethod::Direct)
|
|
.with_coupling(1, 2, 1, 2, CouplingMethod::Direct)
|
|
;
|
|
run_sim(
|
|
"912-12loops",
|
|
drive_map_3stack_and_rev(),
|
|
p9xx.with_coupling_loops(12),
|
|
);
|
|
run_sim(
|
|
"916-16loops",
|
|
drive_map_3stack_and_rev(),
|
|
p9xx.with_coupling_loops(16),
|
|
);
|
|
run_sim(
|
|
"908-8loops",
|
|
drive_map_3stack_and_rev(),
|
|
p9xx.with_coupling_loops(8),
|
|
);
|
|
run_sim(
|
|
"910-10loops",
|
|
drive_map_3stack_and_rev(),
|
|
p9xx.with_coupling_loops(10),
|
|
);
|
|
run_sim(
|
|
"920-20loops",
|
|
drive_map_3stack_and_rev(),
|
|
p9xx.with_coupling_loops(20),
|
|
);
|
|
run_sim(
|
|
"906-6loops",
|
|
drive_map_3stack_and_rev(),
|
|
p9xx.with_coupling_loops(6),
|
|
);
|
|
run_sim(
|
|
"901-1loops",
|
|
drive_map_3stack_and_rev(),
|
|
p9xx.with_coupling_loops(1),
|
|
);
|
|
run_sim(
|
|
"902-2loops",
|
|
drive_map_3stack_and_rev(),
|
|
p9xx.with_coupling_loops(2),
|
|
);
|
|
run_sim(
|
|
"904-4loops",
|
|
drive_map_3stack_and_rev(),
|
|
p9xx.with_coupling_loops(4),
|
|
);
|
|
}
|
|
if false {
|
|
let p10xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_input_magnitude(8e10)
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_coupling(1, 0, 0, 3, CouplingMethod::Direct)
|
|
.with_coupling(1, 2, 1, 3, CouplingMethod::Direct)
|
|
.with_coupling(0, 2, 2, 3, CouplingMethod::Direct)
|
|
;
|
|
run_sim(
|
|
"1008-8loops",
|
|
drive_map_3stack_and_rev(),
|
|
p10xx.with_coupling_loops(8),
|
|
);
|
|
run_sim(
|
|
"1010-10loops",
|
|
drive_map_3stack_and_rev(),
|
|
p10xx.with_coupling_loops(10),
|
|
);
|
|
run_sim(
|
|
"1012-12loops",
|
|
drive_map_3stack_and_rev(),
|
|
p10xx.with_coupling_loops(12),
|
|
);
|
|
run_sim(
|
|
"1006-6loops",
|
|
drive_map_3stack_and_rev(),
|
|
p10xx.with_coupling_loops(6),
|
|
);
|
|
run_sim(
|
|
"1014-14loops",
|
|
drive_map_3stack_and_rev(),
|
|
p10xx.with_coupling_loops(14),
|
|
);
|
|
run_sim(
|
|
"1001-1loops",
|
|
drive_map_3stack_and_rev(),
|
|
p10xx.with_coupling_loops(1),
|
|
);
|
|
run_sim(
|
|
"1002-2loops",
|
|
drive_map_3stack_and_rev(),
|
|
p10xx.with_coupling_loops(2),
|
|
);
|
|
run_sim(
|
|
"1004-4loops",
|
|
drive_map_3stack_and_rev(),
|
|
p10xx.with_coupling_loops(4),
|
|
);
|
|
run_sim(
|
|
"1016-16loops",
|
|
drive_map_3stack_and_rev(),
|
|
p10xx.with_coupling_loops(16),
|
|
);
|
|
}
|
|
if false {
|
|
let p11xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_input_magnitude(8e10)
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_coupling_loops(10)
|
|
.with_coupling(1, 0, 0, 3, CouplingMethod::Direct)
|
|
.with_coupling(1, 2, 1, 3, CouplingMethod::Direct)
|
|
.with_coupling(0, 2, 2, 3, CouplingMethod::Direct)
|
|
;
|
|
run_sim(
|
|
"11-n005-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(-0.05),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-n010-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(-0.10),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-n015-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(-0.15),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-n020-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(-0.20),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-n050-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(-0.50),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-n030-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(-0.30),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-n100-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(-1.00),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-n040-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(-0.40),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-n060-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(-0.60),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-n080-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(-0.80),
|
|
p11xx.clone(),
|
|
);
|
|
|
|
run_sim(
|
|
"11-010-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(0.10),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-001-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(0.01),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-002-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(0.02),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-005-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(0.05),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-020-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(0.20),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-050-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(0.50),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-100-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(1.00),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-030-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(0.30),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-040-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(0.40),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-060-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(0.60),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-070-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(0.70),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-080-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(0.80),
|
|
p11xx.clone(),
|
|
);
|
|
run_sim(
|
|
"11-090-percent-drive-strength",
|
|
drive_map_3stack_and_rev_with_init_amp(0.90),
|
|
p11xx.clone(),
|
|
);
|
|
}
|
|
if false {
|
|
let p12xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_input_magnitude(8e10)
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_coupling_loops(10)
|
|
.with_coupling(1, 0, 0, 3, CouplingMethod::Direct)
|
|
.with_coupling(1, 2, 1, 3, CouplingMethod::Direct)
|
|
.with_coupling(0, 2, 2, 3, CouplingMethod::Direct)
|
|
;
|
|
run_sim(
|
|
"12-1e11-drive",
|
|
drive_map_3stack(),
|
|
p12xx.with_input_magnitude(1e11),
|
|
);
|
|
run_sim(
|
|
"12-2e11-drive",
|
|
drive_map_3stack(),
|
|
p12xx.with_input_magnitude(2e11),
|
|
);
|
|
run_sim(
|
|
"12-8e10-drive",
|
|
drive_map_3stack(),
|
|
p12xx.with_input_magnitude(8e10),
|
|
);
|
|
run_sim(
|
|
"12-7e10-drive",
|
|
drive_map_3stack(),
|
|
p12xx.with_input_magnitude(7e10),
|
|
);
|
|
run_sim(
|
|
"12-5e10-drive",
|
|
drive_map_3stack(),
|
|
p12xx.with_input_magnitude(5e10),
|
|
);
|
|
run_sim(
|
|
"12-4e10-drive",
|
|
drive_map_3stack(),
|
|
p12xx.with_input_magnitude(4e10),
|
|
);
|
|
run_sim(
|
|
"12-3e10-drive",
|
|
drive_map_3stack(),
|
|
p12xx.with_input_magnitude(3e10),
|
|
);
|
|
run_sim(
|
|
"12-2e10-drive",
|
|
drive_map_3stack(),
|
|
p12xx.with_input_magnitude(2e10),
|
|
);
|
|
run_sim(
|
|
"12-1e10-drive",
|
|
drive_map_3stack(),
|
|
p12xx.with_input_magnitude(1e10),
|
|
);
|
|
run_sim(
|
|
"12-5e9-drive",
|
|
drive_map_3stack(),
|
|
p12xx.with_input_magnitude(5e9),
|
|
);
|
|
run_sim(
|
|
"12-2e9-drive",
|
|
drive_map_3stack(),
|
|
p12xx.with_input_magnitude(2e9),
|
|
);
|
|
run_sim(
|
|
"12-1e9-drive",
|
|
drive_map_3stack(),
|
|
p12xx.with_input_magnitude(1e9),
|
|
);
|
|
run_sim(
|
|
"12-5e11-drive",
|
|
drive_map_3stack(),
|
|
p12xx.with_input_magnitude(5e11),
|
|
);
|
|
}
|
|
if false {
|
|
let p13xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_input_magnitude(8e10)
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
;
|
|
run_sim(
|
|
"13-3stack-8e10-drive",
|
|
drive_map_3stack_one_sided(),
|
|
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-5stack-8loop-5e10-drive",
|
|
drive_map_nstack_one_sided::<5>(),
|
|
p13xx
|
|
.with_input_magnitude(5e10)
|
|
.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-5stack-8loop-2e10-drive",
|
|
drive_map_nstack_one_sided::<5>(),
|
|
p13xx
|
|
.with_input_magnitude(2e10)
|
|
.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-5stack-6loop-8e10-drive",
|
|
drive_map_nstack_one_sided::<5>(),
|
|
p13xx
|
|
.with_input_magnitude(8e10)
|
|
.with_coupling_loops(6)
|
|
.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-6stack-6loop-1.5e11-drive",
|
|
drive_map_nstack_one_sided::<6>(),
|
|
p13xx
|
|
.with_input_magnitude(1.5e11)
|
|
.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-6stack-6loop-5e10-drive",
|
|
drive_map_nstack_one_sided::<6>(),
|
|
p13xx
|
|
.with_input_magnitude(5e10)
|
|
.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-6stack-6loop-2e10-drive",
|
|
drive_map_nstack_one_sided::<6>(),
|
|
p13xx
|
|
.with_input_magnitude(2e10)
|
|
.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)
|
|
);
|
|
run_sim(
|
|
"13-8stack-5loop-5e10-drive",
|
|
drive_map_nstack_one_sided::<8>(),
|
|
p13xx
|
|
.with_input_magnitude(5e10)
|
|
.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)
|
|
);
|
|
}
|
|
if false {
|
|
let p14xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_input_magnitude(8e10)
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
;
|
|
run_sim(
|
|
"14-6stack-6loop-8e10-drive",
|
|
drive_map_nstack_one_sided_with_output::<6>(),
|
|
p14xx
|
|
.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(1, 5, 4, 5, CouplingMethod::Direct)
|
|
);
|
|
run_sim(
|
|
"14-5stack-8loop-8e10-drive",
|
|
drive_map_nstack_one_sided_with_output::<5>(),
|
|
p14xx
|
|
.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(1, 4, 3, 4, CouplingMethod::Direct)
|
|
);
|
|
}
|
|
if false {
|
|
let p16xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_input_magnitude(8e10)
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
;
|
|
run_sim(
|
|
"16-6stack-6loop-8e10-drive",
|
|
drive_map_nstack_one_sided_with_output_locked::<6>(),
|
|
p16xx
|
|
.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(1, 5, 4, 5, CouplingMethod::Direct)
|
|
);
|
|
run_sim(
|
|
"16-5stack-8loop-8e10-drive",
|
|
drive_map_nstack_one_sided_with_output_locked::<5>(),
|
|
p16xx
|
|
.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(1, 4, 3, 4, CouplingMethod::Direct)
|
|
);
|
|
}
|
|
if false {
|
|
let p17xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.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(1, 5, 4, 5, CouplingMethod::Direct)
|
|
;
|
|
|
|
// third run: vary init M0
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-p100-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(1.00),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-p050-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.50),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-p020-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.20),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-p010-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.10),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-n001-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.01),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-n005-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.05),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-n010-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.10),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-n020-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.20),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-n030-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.30),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-n040-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.40),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-n050-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.50),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-n100-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-1.00),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-p001-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.01),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-p005-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.05),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-p010-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.10),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-p020-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.20),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-p030-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.30),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-p040-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.40),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-p050-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.50),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-p100-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(1.00),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
|
|
// second run: vary drive/clock current
|
|
run_sim(
|
|
"17-6stack-8loop-5e10-000-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.0),
|
|
p17xx
|
|
.with_input_magnitude(5e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e10-000-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.0),
|
|
p17xx
|
|
.with_input_magnitude(2e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-1e10-000-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.0),
|
|
p17xx
|
|
.with_input_magnitude(1e10)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e9-000-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.0),
|
|
p17xx
|
|
.with_input_magnitude(8e9)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-5e9-000-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.0),
|
|
p17xx
|
|
.with_input_magnitude(5e9)
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-2e9-000-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.0),
|
|
p17xx
|
|
.with_input_magnitude(2e9)
|
|
);
|
|
|
|
// first run: vary init M0 point
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-000-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.0),
|
|
p17xx.clone(),
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-n001-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.01),
|
|
p17xx.clone(),
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-n002-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.02),
|
|
p17xx.clone(),
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-n005-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.05),
|
|
p17xx.clone(),
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-n010-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.10),
|
|
p17xx.clone(),
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-n020-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.20),
|
|
p17xx.clone(),
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-n030-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.30),
|
|
p17xx.clone(),
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-n050-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.50),
|
|
p17xx.clone(),
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-n100-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(-1.0),
|
|
p17xx.clone(),
|
|
);
|
|
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-p001-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.01),
|
|
p17xx.clone(),
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-p002-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.02),
|
|
p17xx.clone(),
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-p005-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.05),
|
|
p17xx.clone(),
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-p010-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.10),
|
|
p17xx.clone(),
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-p020-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.20),
|
|
p17xx.clone(),
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-p030-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.30),
|
|
p17xx.clone(),
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-p050-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(0.50),
|
|
p17xx.clone(),
|
|
);
|
|
run_sim(
|
|
"17-6stack-8loop-8e10-p100-percent-drive-strength",
|
|
drive_map_nstack_one_sided_with_output_locked_once::<6>(1.0),
|
|
p17xx.clone(),
|
|
);
|
|
}
|
|
|
|
if false {
|
|
let p18xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.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(
|
|
"18-5stack-8loop-8e10-drive-p100",
|
|
drive_map_nstack_one_sided_and_back::<5>(1.0),
|
|
p18xx.clone()
|
|
);
|
|
run_sim(
|
|
"18-5stack-8loop-8e10-drive-000",
|
|
drive_map_nstack_one_sided_and_back::<5>(0.0),
|
|
p18xx.clone()
|
|
);
|
|
run_sim(
|
|
"18-5stack-8loop-8e10-drive-n100",
|
|
drive_map_nstack_one_sided_and_back::<5>(-1.0),
|
|
p18xx.clone()
|
|
);
|
|
|
|
run_sim(
|
|
"18-5stack-8loop-8e10-drive-n050",
|
|
drive_map_nstack_one_sided_and_back::<5>(-0.50),
|
|
p18xx.clone()
|
|
);
|
|
run_sim(
|
|
"18-5stack-8loop-8e10-drive-n020",
|
|
drive_map_nstack_one_sided_and_back::<5>(-0.20),
|
|
p18xx.clone()
|
|
);
|
|
run_sim(
|
|
"18-5stack-8loop-8e10-drive-n010",
|
|
drive_map_nstack_one_sided_and_back::<5>(-0.10),
|
|
p18xx.clone()
|
|
);
|
|
run_sim(
|
|
"18-5stack-8loop-8e10-drive-p010",
|
|
drive_map_nstack_one_sided_and_back::<5>(0.10),
|
|
p18xx.clone()
|
|
);
|
|
run_sim(
|
|
"18-5stack-8loop-8e10-drive-p020",
|
|
drive_map_nstack_one_sided_and_back::<5>(0.20),
|
|
p18xx.clone()
|
|
);
|
|
run_sim(
|
|
"18-5stack-8loop-8e10-drive-p050",
|
|
drive_map_nstack_one_sided_and_back::<5>(0.50),
|
|
p18xx.clone()
|
|
);
|
|
|
|
run_sim(
|
|
"18-5stack-8loop-8e10-drive-n030",
|
|
drive_map_nstack_one_sided_and_back::<5>(-0.30),
|
|
p18xx.clone()
|
|
);
|
|
run_sim(
|
|
"18-5stack-8loop-8e10-drive-n005",
|
|
drive_map_nstack_one_sided_and_back::<5>(-0.05),
|
|
p18xx.clone()
|
|
);
|
|
run_sim(
|
|
"18-5stack-8loop-8e10-drive-n002",
|
|
drive_map_nstack_one_sided_and_back::<5>(-0.02),
|
|
p18xx.clone()
|
|
);
|
|
run_sim(
|
|
"18-5stack-8loop-8e10-drive-p002",
|
|
drive_map_nstack_one_sided_and_back::<5>(0.02),
|
|
p18xx.clone()
|
|
);
|
|
run_sim(
|
|
"18-5stack-8loop-8e10-drive-p005",
|
|
drive_map_nstack_one_sided_and_back::<5>(0.05),
|
|
p18xx.clone()
|
|
);
|
|
run_sim(
|
|
"18-5stack-8loop-8e10-drive-p030",
|
|
drive_map_nstack_one_sided_and_back::<5>(0.30),
|
|
p18xx.clone()
|
|
);
|
|
}
|
|
|
|
if false {
|
|
let p19xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.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(
|
|
"19-5stack-8loop-8e10-drive-p100",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(1.0),
|
|
p19xx.clone()
|
|
);
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-000",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(0.0),
|
|
p19xx.clone()
|
|
);
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-n100",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(-1.0),
|
|
p19xx.clone()
|
|
);
|
|
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-n050",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(-0.50),
|
|
p19xx.clone()
|
|
);
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-n020",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(-0.20),
|
|
p19xx.clone()
|
|
);
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-n010",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(-0.10),
|
|
p19xx.clone()
|
|
);
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-p010",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(0.10),
|
|
p19xx.clone()
|
|
);
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-p020",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(0.20),
|
|
p19xx.clone()
|
|
);
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-p050",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(0.50),
|
|
p19xx.clone()
|
|
);
|
|
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-n030",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(-0.30),
|
|
p19xx.clone()
|
|
);
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-n015",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(-0.15),
|
|
p19xx.clone()
|
|
);
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-n005",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(-0.05),
|
|
p19xx.clone()
|
|
);
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-n002",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(-0.02),
|
|
p19xx.clone()
|
|
);
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-p002",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(0.02),
|
|
p19xx.clone()
|
|
);
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-p005",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(0.05),
|
|
p19xx.clone()
|
|
);
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-p015",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(0.15),
|
|
p19xx.clone()
|
|
);
|
|
run_sim(
|
|
"19-5stack-8loop-8e10-drive-p030",
|
|
drive_map_nstack_one_sided_and_back_with_negative::<5>(0.30),
|
|
p19xx.clone()
|
|
);
|
|
}
|
|
|
|
if false {
|
|
let p20xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_input_magnitude(8e10)
|
|
.with_coupling_loops(8)
|
|
.with_coupling(0, 1, 0, 2, CouplingMethod::Direct)
|
|
.with_coupling(1, 2, 1, 2, CouplingMethod::Direct)
|
|
;
|
|
|
|
run_sim(
|
|
"20-3stack-8loop-8e10-drive-neg-gate-p100",
|
|
drive_map_3stack_through_saturation(-1.0, 1.00),
|
|
p20xx.clone()
|
|
);
|
|
run_sim(
|
|
"20-3stack-8loop-8e10-drive-neg-gate-000",
|
|
drive_map_3stack_through_saturation(-1.0, 0.00),
|
|
p20xx.clone()
|
|
);
|
|
run_sim(
|
|
"20-3stack-8loop-8e10-drive-neg-gate-n100",
|
|
drive_map_3stack_through_saturation(-1.0, -1.00),
|
|
p20xx.clone()
|
|
);
|
|
|
|
|
|
run_sim(
|
|
"20-3stack-8loop-8e10-drive-p100",
|
|
drive_map_3stack_through_saturation(1.0, 1.00),
|
|
p20xx.clone()
|
|
);
|
|
run_sim(
|
|
"20-3stack-8loop-8e10-drive-000",
|
|
drive_map_3stack_through_saturation(1.0, 0.00),
|
|
p20xx.clone()
|
|
);
|
|
run_sim(
|
|
"20-3stack-8loop-8e10-drive-n100",
|
|
drive_map_3stack_through_saturation(1.0, -1.00),
|
|
p20xx.clone()
|
|
);
|
|
|
|
run_sim(
|
|
"20-3stack-8loop-8e10-drive-p050",
|
|
drive_map_3stack_through_saturation(1.0, 0.50),
|
|
p20xx.clone()
|
|
);
|
|
run_sim(
|
|
"20-3stack-8loop-8e10-drive-p020",
|
|
drive_map_3stack_through_saturation(1.0, 0.20),
|
|
p20xx.clone()
|
|
);
|
|
run_sim(
|
|
"20-3stack-8loop-8e10-drive-p010",
|
|
drive_map_3stack_through_saturation(1.0, 0.10),
|
|
p20xx.clone()
|
|
);
|
|
run_sim(
|
|
"20-3stack-8loop-8e10-drive-n010",
|
|
drive_map_3stack_through_saturation(1.0, -0.10),
|
|
p20xx.clone()
|
|
);
|
|
run_sim(
|
|
"20-3stack-8loop-8e10-drive-n020",
|
|
drive_map_3stack_through_saturation(1.0, -0.20),
|
|
p20xx.clone()
|
|
);
|
|
run_sim(
|
|
"20-3stack-8loop-8e10-drive-n050",
|
|
drive_map_3stack_through_saturation(1.0, -0.50),
|
|
p20xx.clone()
|
|
);
|
|
}
|
|
|
|
if false {
|
|
let p21xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_input_magnitude(8e10)
|
|
.with_coupling_loops(6)
|
|
// 6:6 coupling between S0, S1
|
|
.with_coupling(0, 1, 0, 5, CouplingMethod::Direct)
|
|
// 24:24 coupling between S1, S2
|
|
.with_coupling(1, 2, 1, 5, CouplingMethod::Direct)
|
|
.with_coupling(1, 2, 2, 5, CouplingMethod::Direct)
|
|
.with_coupling(1, 2, 3, 5, CouplingMethod::Direct)
|
|
.with_coupling(1, 2, 4, 5, CouplingMethod::Direct)
|
|
;
|
|
|
|
run_sim(
|
|
"21-3stack-6_24_loop-8e10-drive-neg-gate-p100",
|
|
drive_map_3stack_through_saturation(-1.0, 1.00),
|
|
p21xx.clone()
|
|
);
|
|
run_sim(
|
|
"21-3stack-6_24_loop-8e10-drive-neg-gate-000",
|
|
drive_map_3stack_through_saturation(-1.0, 0.00),
|
|
p21xx.clone()
|
|
);
|
|
run_sim(
|
|
"21-3stack-6_24_loop-8e10-drive-neg-gate-n100",
|
|
drive_map_3stack_through_saturation(-1.0, -1.00),
|
|
p21xx.clone()
|
|
);
|
|
|
|
run_sim(
|
|
"21-3stack-6_24_loop-8e10-drive-neg-gate-n050",
|
|
drive_map_3stack_through_saturation(-1.0, -0.50),
|
|
p21xx.clone()
|
|
);
|
|
run_sim(
|
|
"21-3stack-6_24_loop-8e10-drive-neg-gate-n020",
|
|
drive_map_3stack_through_saturation(-1.0, -0.20),
|
|
p21xx.clone()
|
|
);
|
|
run_sim(
|
|
"21-3stack-6_24_loop-8e10-drive-neg-gate-n010",
|
|
drive_map_3stack_through_saturation(-1.0, -0.10),
|
|
p21xx.clone()
|
|
);
|
|
run_sim(
|
|
"21-3stack-6_24_loop-8e10-drive-neg-gate-p010",
|
|
drive_map_3stack_through_saturation(-1.0, 0.10),
|
|
p21xx.clone()
|
|
);
|
|
run_sim(
|
|
"21-3stack-6_24_loop-8e10-drive-neg-gate-p020",
|
|
drive_map_3stack_through_saturation(-1.0, 0.20),
|
|
p21xx.clone()
|
|
);
|
|
run_sim(
|
|
"21-3stack-6_24_loop-8e10-drive-neg-gate-p050",
|
|
drive_map_3stack_through_saturation(-1.0, 0.50),
|
|
p21xx.clone()
|
|
);
|
|
}
|
|
|
|
if false {
|
|
let p22xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_input_magnitude(8e10)
|
|
.with_coupling_loops(6)
|
|
// 6:6 coupling between S1, S2
|
|
.with_coupling(1, 0, 0, 5, CouplingMethod::Direct)
|
|
// 24:24 coupling between S0, S1
|
|
.with_coupling(0, 1, 1, 5, CouplingMethod::Direct)
|
|
.with_coupling(0, 1, 2, 5, CouplingMethod::Direct)
|
|
.with_coupling(0, 1, 3, 5, CouplingMethod::Direct)
|
|
.with_coupling(0, 1, 4, 5, CouplingMethod::Direct)
|
|
;
|
|
|
|
run_sim(
|
|
"22-3stack-24_6_loop-8e10-drive-neg-gate-p100",
|
|
drive_map_3stack_through_saturation(-1.0, 1.00),
|
|
p22xx.clone()
|
|
);
|
|
run_sim(
|
|
"22-3stack-24_6_loop-8e10-drive-neg-gate-000",
|
|
drive_map_3stack_through_saturation(-1.0, 0.00),
|
|
p22xx.clone()
|
|
);
|
|
run_sim(
|
|
"22-3stack-24_6_loop-8e10-drive-neg-gate-n100",
|
|
drive_map_3stack_through_saturation(-1.0, -1.00),
|
|
p22xx.clone()
|
|
);
|
|
|
|
run_sim(
|
|
"22-3stack-24_6_loop-8e10-drive-neg-gate-n050",
|
|
drive_map_3stack_through_saturation(-1.0, -0.50),
|
|
p22xx.clone()
|
|
);
|
|
run_sim(
|
|
"22-3stack-24_6_loop-8e10-drive-neg-gate-n020",
|
|
drive_map_3stack_through_saturation(-1.0, -0.20),
|
|
p22xx.clone()
|
|
);
|
|
run_sim(
|
|
"22-3stack-24_6_loop-8e10-drive-neg-gate-n010",
|
|
drive_map_3stack_through_saturation(-1.0, -0.10),
|
|
p22xx.clone()
|
|
);
|
|
run_sim(
|
|
"22-3stack-24_6_loop-8e10-drive-neg-gate-p010",
|
|
drive_map_3stack_through_saturation(-1.0, 0.10),
|
|
p22xx.clone()
|
|
);
|
|
run_sim(
|
|
"22-3stack-24_6_loop-8e10-drive-neg-gate-p020",
|
|
drive_map_3stack_through_saturation(-1.0, 0.20),
|
|
p22xx.clone()
|
|
);
|
|
run_sim(
|
|
"22-3stack-24_6_loop-8e10-drive-neg-gate-p050",
|
|
drive_map_3stack_through_saturation(-1.0, 0.50),
|
|
p22xx.clone()
|
|
);
|
|
}
|
|
|
|
if false {
|
|
let p23xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_input_magnitude(8e10)
|
|
.with_coupling_loops(6)
|
|
// couple S0 to S1
|
|
.with_coupling(0, 1, 0, 4, CouplingMethod::DirectHalfExterior)
|
|
.with_coupling(0, 1, 3, 4, CouplingMethod::DirectHalfInterior)
|
|
// "loops" for S1 (none)
|
|
.with_coupling(1, 1, 0, 4, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 1, 4, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 2, 4, CouplingMethod::SelfAngularTop)
|
|
// loops for S0:
|
|
.with_coupling(0, 0, 0, 4, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 0, 4, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 1, 4, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 1, 4, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0, 2, 4, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 2, 4, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 3, 4, CouplingMethod::SelfLoopHalfExterior)
|
|
;
|
|
|
|
if false {
|
|
run_sim(
|
|
"23-3stack-5_1_winding-8e10-drive-neg-gate-p100",
|
|
drive_map_3stack_through_saturation(-1.0, 1.00),
|
|
p23xx.clone()
|
|
);
|
|
run_sim(
|
|
"23-3stack-5_1_winding-8e10-drive-neg-gate-000",
|
|
drive_map_3stack_through_saturation(-1.0, 0.00),
|
|
p23xx.clone()
|
|
);
|
|
run_sim(
|
|
"23-3stack-5_1_winding-8e10-drive-neg-gate-n100",
|
|
drive_map_3stack_through_saturation(-1.0, -1.00),
|
|
p23xx.clone()
|
|
);
|
|
}
|
|
|
|
for (cur, cur_str) in [
|
|
(5e10, "5e10"),
|
|
(8e10, "8e10"),
|
|
(2e10, "2e10"),
|
|
(1e10, "1e10")
|
|
] {
|
|
let p = p23xx.with_input_magnitude(cur);
|
|
for (a_str, a) in [
|
|
("n100", -1.00),
|
|
("n050", -0.50),
|
|
("n030", -0.30),
|
|
("n025", -0.25),
|
|
("n020", -0.20),
|
|
("n015", -0.15),
|
|
("n010", -0.10),
|
|
("n005", -0.05),
|
|
("000", 0.00),
|
|
("p005", 0.05),
|
|
("p010", 0.10),
|
|
("p020", 0.20),
|
|
("p050", 0.50),
|
|
("p100", 1.00),
|
|
] {
|
|
run_sim(
|
|
&format!("24-2stack-5_1_winding-{}-drive-neg-gate-{}", cur_str, a_str),
|
|
drive_map_2stack_with_init(a),
|
|
p.clone()
|
|
);
|
|
}
|
|
}
|
|
}
|
|
|
|
if false {
|
|
let p25xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_input_magnitude(5e10)
|
|
.with_coupling_loops(2)
|
|
// couple S0 to S1
|
|
.with_coupling(0, 1, 0, 14, CouplingMethod::DirectHalfExterior)
|
|
.with_coupling(0, 1, 13, 14, CouplingMethod::DirectHalfInterior)
|
|
// "loops" for S1 (none)
|
|
.with_coupling(1, 1, 0, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 1, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 2, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 3, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 4, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 5, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 6, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 7, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 8, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 9, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 10, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 11, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 12, 14, CouplingMethod::SelfAngularTop)
|
|
// loops for S0:
|
|
.with_coupling(0, 0, 0, 14, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 0, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 1, 14, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 1, 14, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0, 2, 14, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 2, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 3, 14, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 3, 14, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0, 4, 14, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 4, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 5, 14, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 5, 14, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0, 6, 14, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 6, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 7, 14, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 7, 14, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0, 8, 14, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 8, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 9, 14, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 9, 14, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0, 10,14, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 10,14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 11,14, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 11,14, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0, 12,14, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 12,14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 13,14, CouplingMethod::SelfLoopHalfExterior)
|
|
;
|
|
for a in [100, 0, 20, 50, 10, 30, 5] {
|
|
for (cur, scur) in [(5e10, "5e10"), (8e10, "8e10"), (1e11, "1e11"), (2e11, "2e11")] {
|
|
let p = p25xx.with_input_magnitude(cur);
|
|
if a == 0 {
|
|
run_sim(
|
|
&format!("25-2stack-15_1_winding-{}-drive-neg-gate-000", scur),
|
|
drive_map_2stack_with_init(0.00),
|
|
p.clone(),
|
|
);
|
|
} else {
|
|
run_sim(
|
|
&format!("25-2stack-15_1_winding-{}-drive-neg-gate-p{}", scur, a),
|
|
drive_map_2stack_with_init(0.01 * a as f32),
|
|
p.clone(),
|
|
);
|
|
run_sim(
|
|
&format!("25-2stack-15_1_winding-{}-drive-neg-gate-n{}", scur, a),
|
|
drive_map_2stack_with_init(-0.01 * a as f32),
|
|
p.clone(),
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if false {
|
|
let p26xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_input_magnitude(5e10)
|
|
.with_coupling_loops(6)
|
|
// couple S0 to S1
|
|
.with_coupling(0, 1, 0, 6, CouplingMethod::DirectHalfExterior)
|
|
.with_coupling(0, 1, 5, 6, CouplingMethod::DirectHalfInterior)
|
|
// "loops" for S1 (none)
|
|
.with_coupling(1, 1, 0, 6, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 1, 6, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 2, 6, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 3, 6, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 4, 6, CouplingMethod::SelfAngularTop)
|
|
// loops for S0:
|
|
.with_coupling(0, 0, 0, 6, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 0, 6, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 1, 6, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 1, 6, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0, 2, 6, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 2, 6, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 3, 6, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 3, 6, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0, 4, 6, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 4, 6, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 5, 6, CouplingMethod::SelfLoopHalfExterior)
|
|
;
|
|
run_sim(
|
|
"26-2stack-6x7_1_winding-5e10-drive-neg-gate-000",
|
|
drive_map_2stack_with_init(0.00),
|
|
p26xx.clone(),
|
|
);
|
|
run_sim(
|
|
"26-2stack-6x7_1_winding-5e10-drive-neg-gate-p100",
|
|
drive_map_2stack_with_init(1.00),
|
|
p26xx.clone(),
|
|
);
|
|
run_sim(
|
|
"26-2stack-6x7_1_winding-5e10-drive-neg-gate-n100",
|
|
drive_map_2stack_with_init(-1.00),
|
|
p26xx.clone(),
|
|
);
|
|
run_sim(
|
|
"26-2stack-6x7_1_winding-5e10-drive-neg-gate-n20",
|
|
drive_map_2stack_with_init(-0.20),
|
|
p26xx.clone(),
|
|
);
|
|
run_sim(
|
|
"26-2stack-6x7_1_winding-5e10-drive-neg-gate-n30",
|
|
drive_map_2stack_with_init(-0.30),
|
|
p26xx.clone(),
|
|
);
|
|
run_sim(
|
|
"26-2stack-6x7_1_winding-5e10-drive-neg-gate-n50",
|
|
drive_map_2stack_with_init(-0.50),
|
|
p26xx.clone(),
|
|
);
|
|
}
|
|
|
|
if false {
|
|
let p27xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(800))
|
|
.with_input_magnitude(2e11)
|
|
.with_coupling_loops(6)
|
|
// couple S0 to S1
|
|
.with_coupling(0, 1, 0, 14, CouplingMethod::DirectHalfExterior)
|
|
.with_coupling(0, 1, 13, 14, CouplingMethod::DirectHalfInterior)
|
|
// "loops" for S1 (none)
|
|
.with_coupling(1, 1, 0, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 1, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 2, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 3, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 4, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 5, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 6, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 7, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 8, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 9, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 10, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 11, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 12, 14, CouplingMethod::SelfAngularTop)
|
|
// loops for S0:
|
|
.with_coupling(0, 0, 0, 14, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 0, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 1, 14, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 1, 14, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0, 2, 14, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 2, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 3, 14, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 3, 14, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0, 4, 14, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 4, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 5, 14, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 5, 14, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0, 6, 14, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 6, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 7, 14, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 7, 14, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0, 8, 14, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 8, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 9, 14, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 9, 14, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0,10, 14, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0,10, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0,11, 14, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0,11, 14, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0,12, 14, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0,12, 14, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0,13, 14, CouplingMethod::SelfLoopHalfExterior)
|
|
;
|
|
run_sim(
|
|
"27-2stack-6x15_1_winding-2e11-drive-neg-gate-000",
|
|
drive_map_2stack_with_init(0.00),
|
|
p27xx.clone(),
|
|
);
|
|
run_sim(
|
|
"27-2stack-6x15_1_winding-2e11-drive-neg-gate-p100",
|
|
drive_map_2stack_with_init(1.00),
|
|
p27xx.clone(),
|
|
);
|
|
run_sim(
|
|
"27-2stack-6x15_1_winding-2e11-drive-neg-gate-n100",
|
|
drive_map_2stack_with_init(-1.00),
|
|
p27xx.clone(),
|
|
);
|
|
run_sim(
|
|
"27-2stack-6x15_1_winding-2e11-drive-neg-gate-n20",
|
|
drive_map_2stack_with_init(-0.20),
|
|
p27xx.clone(),
|
|
);
|
|
run_sim(
|
|
"27-2stack-6x15_1_winding-2e11-drive-neg-gate-n30",
|
|
drive_map_2stack_with_init(-0.30),
|
|
p27xx.clone(),
|
|
);
|
|
run_sim(
|
|
"27-2stack-6x15_1_winding-2e11-drive-neg-gate-n50",
|
|
drive_map_2stack_with_init(-0.50),
|
|
p27xx.clone(),
|
|
);
|
|
}
|
|
|
|
if false {
|
|
let p28xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_input_magnitude(8e10)
|
|
.with_coupling_loops(6)
|
|
// 24:24 coupling between S1, S2
|
|
.with_coupling(0, 1, 0, 5, CouplingMethod::Direct)
|
|
.with_coupling(0, 1, 1, 5, CouplingMethod::Direct)
|
|
.with_coupling(0, 1, 2, 5, CouplingMethod::Direct)
|
|
.with_coupling(0, 1, 3, 5, CouplingMethod::Direct)
|
|
// 6:6 coupling between S0, S1
|
|
.with_coupling(1, 2, 4, 5, CouplingMethod::Direct)
|
|
;
|
|
|
|
run_sim(
|
|
"28-3stack-24_6_loop-8e10-drive-neg-gate-p100",
|
|
drive_map_3stack_through_saturation(-1.0, 1.00),
|
|
p28xx.clone()
|
|
);
|
|
run_sim(
|
|
"28-3stack-24_6_loop-8e10-drive-neg-gate-000",
|
|
drive_map_3stack_through_saturation(-1.0, 0.00),
|
|
p28xx.clone()
|
|
);
|
|
run_sim(
|
|
"28-3stack-24_6_loop-8e10-drive-neg-gate-n100",
|
|
drive_map_3stack_through_saturation(-1.0, -1.00),
|
|
p28xx.clone()
|
|
);
|
|
|
|
run_sim(
|
|
"28-3stack-24_6_loop-8e10-drive-neg-gate-n050",
|
|
drive_map_3stack_through_saturation(-1.0, -0.50),
|
|
p28xx.clone()
|
|
);
|
|
run_sim(
|
|
"28-3stack-24_6_loop-8e10-drive-neg-gate-n020",
|
|
drive_map_3stack_through_saturation(-1.0, -0.20),
|
|
p28xx.clone()
|
|
);
|
|
run_sim(
|
|
"28-3stack-24_6_loop-8e10-drive-neg-gate-n010",
|
|
drive_map_3stack_through_saturation(-1.0, -0.10),
|
|
p28xx.clone()
|
|
);
|
|
run_sim(
|
|
"28-3stack-24_6_loop-8e10-drive-neg-gate-p010",
|
|
drive_map_3stack_through_saturation(-1.0, 0.10),
|
|
p28xx.clone()
|
|
);
|
|
run_sim(
|
|
"28-3stack-24_6_loop-8e10-drive-neg-gate-p020",
|
|
drive_map_3stack_through_saturation(-1.0, 0.20),
|
|
p28xx.clone()
|
|
);
|
|
run_sim(
|
|
"28-3stack-24_6_loop-8e10-drive-neg-gate-p050",
|
|
drive_map_3stack_through_saturation(-1.0, 0.50),
|
|
p28xx.clone()
|
|
);
|
|
}
|
|
|
|
if false {
|
|
let p29xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_input_magnitude(8e10)
|
|
.with_coupling_loops(12)
|
|
// couple S0 -> S1, S0 -> S2
|
|
.with_coupling(0, 1, 0, 3, CouplingMethod::Direct)
|
|
.with_coupling(0, 2, 1, 3, CouplingMethod::Outside)
|
|
// couple S2 -> S3, S3 -> S4
|
|
.with_coupling(2, 3, 0, 3, CouplingMethod::Direct)
|
|
.with_coupling(3, 4, 1, 3, CouplingMethod::Direct)
|
|
// couple S4 -> S1
|
|
.with_coupling(4, 1, 2, 3, CouplingMethod::Outside)
|
|
;
|
|
|
|
run_sim(
|
|
"29-5stack-12x3_loop-8e10-p100",
|
|
drive_map_fork_then_fold2(1.00),
|
|
p29xx.clone()
|
|
);
|
|
run_sim(
|
|
"29-5stack-12x3_loop-8e10-000",
|
|
drive_map_fork_then_fold2(0.00),
|
|
p29xx.clone()
|
|
);
|
|
run_sim(
|
|
"29-5stack-12x3_loop-8e10-n100",
|
|
drive_map_fork_then_fold2(-1.00),
|
|
p29xx.clone()
|
|
);
|
|
run_sim(
|
|
"29-5stack-12x3_loop-8e10-n20",
|
|
drive_map_fork_then_fold2(-0.20),
|
|
p29xx.clone()
|
|
);
|
|
run_sim(
|
|
"29-5stack-12x3_loop-8e10-n50",
|
|
drive_map_fork_then_fold2(-0.50),
|
|
p29xx.clone()
|
|
);
|
|
run_sim(
|
|
"29-5stack-12x3_loop-8e10-n10",
|
|
drive_map_fork_then_fold2(-0.10),
|
|
p29xx.clone()
|
|
);
|
|
run_sim(
|
|
"29-5stack-12x3_loop-8e10-p20",
|
|
drive_map_fork_then_fold2(0.20),
|
|
p29xx.clone()
|
|
);
|
|
run_sim(
|
|
"29-5stack-12x3_loop-8e10-p50",
|
|
drive_map_fork_then_fold2(0.50),
|
|
p29xx.clone()
|
|
);
|
|
}
|
|
|
|
if false {
|
|
let p30xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_input_magnitude(5e10)
|
|
.with_coupling_loops(6)
|
|
// couple S0 to S1
|
|
.with_coupling(0, 1, 0, 6, CouplingMethod::DirectHalfInterior)
|
|
.with_coupling(0, 1, 5, 6, CouplingMethod::DirectHalfExterior)
|
|
// "loops" for S1 (none)
|
|
.with_coupling(1, 1, 0, 6, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 1, 6, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 2, 6, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 3, 6, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(1, 1, 4, 6, CouplingMethod::SelfAngularTop)
|
|
// loops for S0:
|
|
.with_coupling(0, 0, 0, 6, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 0, 6, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 1, 6, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 1, 6, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0, 2, 6, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 2, 6, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 3, 6, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 3, 6, CouplingMethod::SelfAngularBot)
|
|
.with_coupling(0, 0, 4, 6, CouplingMethod::SelfLoopHalfExterior)
|
|
.with_coupling(0, 0, 4, 6, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 5, 6, CouplingMethod::SelfLoopHalfInterior)
|
|
;
|
|
run_sim(
|
|
"30-2stack-6x7_1_winding-5e10-drive-neg-gate-000",
|
|
drive_map_2stack_with_init(0.00),
|
|
p30xx.clone(),
|
|
);
|
|
run_sim(
|
|
"30-2stack-6x7_1_winding-5e10-drive-neg-gate-p100",
|
|
drive_map_2stack_with_init(1.00),
|
|
p30xx.clone(),
|
|
);
|
|
run_sim(
|
|
"30-2stack-6x7_1_winding-5e10-drive-neg-gate-n100",
|
|
drive_map_2stack_with_init(-1.00),
|
|
p30xx.clone(),
|
|
);
|
|
run_sim(
|
|
"30-2stack-6x7_1_winding-5e10-drive-neg-gate-n20",
|
|
drive_map_2stack_with_init(-0.20),
|
|
p30xx.clone(),
|
|
);
|
|
run_sim(
|
|
"30-2stack-6x7_1_winding-5e10-drive-neg-gate-n30",
|
|
drive_map_2stack_with_init(-0.30),
|
|
p30xx.clone(),
|
|
);
|
|
run_sim(
|
|
"30-2stack-6x7_1_winding-5e10-drive-neg-gate-n50",
|
|
drive_map_2stack_with_init(-0.50),
|
|
p30xx.clone(),
|
|
);
|
|
}
|
|
|
|
if false {
|
|
let p31xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_input_magnitude(8e10)
|
|
.with_coupling_loops(16)
|
|
.with_coupling(0, 2, 0, 1, CouplingMethod::Direct)
|
|
;
|
|
|
|
run_sim(
|
|
"31-3stack-16loop-8e10drive-n100gate-p100",
|
|
drive_map_3stack_through_saturation_inv(-1.0, 1.00),
|
|
p31xx.clone()
|
|
);
|
|
run_sim(
|
|
"31-3stack-16loop-8e10drive-n100gate-000",
|
|
drive_map_3stack_through_saturation_inv(-1.0, 0.00),
|
|
p31xx.clone()
|
|
);
|
|
run_sim(
|
|
"31-3stack-16loop-8e10drive-n100gate-n100",
|
|
drive_map_3stack_through_saturation_inv(-1.0, -1.00),
|
|
p31xx.clone()
|
|
);
|
|
|
|
run_sim(
|
|
"31-3stack-16loop-8e10drive-p100gate-p100",
|
|
drive_map_3stack_through_saturation_inv(1.0, 1.00),
|
|
p31xx.clone()
|
|
);
|
|
run_sim(
|
|
"31-3stack-16loop-8e10drive-p100gate-000",
|
|
drive_map_3stack_through_saturation_inv(1.0, 0.00),
|
|
p31xx.clone()
|
|
);
|
|
run_sim(
|
|
"31-3stack-16loop-8e10drive-p100gate-n100",
|
|
drive_map_3stack_through_saturation_inv(1.0, -1.00),
|
|
p31xx.clone()
|
|
);
|
|
|
|
run_sim(
|
|
"31-3stack-16loop-8e10drive-000gate-p100",
|
|
drive_map_3stack_through_saturation_inv(0.0, 1.00),
|
|
p31xx.clone()
|
|
);
|
|
run_sim(
|
|
"31-3stack-16loop-8e10drive-000gate-000",
|
|
drive_map_3stack_through_saturation_inv(0.0, 0.00),
|
|
p31xx.clone()
|
|
);
|
|
run_sim(
|
|
"31-3stack-16loop-8e10drive-000gate-n100",
|
|
drive_map_3stack_through_saturation_inv(0.0, -1.00),
|
|
p31xx.clone()
|
|
);
|
|
}
|
|
|
|
if false {
|
|
let p32xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_input_magnitude(2e10)
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_coupling_loops(8)
|
|
.with_coupling(0, 1, 0, 2, CouplingMethod::Direct)
|
|
;
|
|
run_sim(
|
|
"32-2e10drive-000-000",
|
|
drive_map_2stack_with_init2(0.00, 0.00),
|
|
p32xx.clone(),
|
|
);
|
|
run_sim(
|
|
"32-2e10drive-p100-p100",
|
|
drive_map_2stack_with_init2(1.00, 1.00),
|
|
p32xx.clone(),
|
|
);
|
|
run_sim(
|
|
"32-2e10drive-n100-n100",
|
|
drive_map_2stack_with_init2(-1.00, -1.00),
|
|
p32xx.clone(),
|
|
);
|
|
|
|
run_sim(
|
|
"32-2e10drive-p010-p010",
|
|
drive_map_2stack_with_init2(0.10, 0.10),
|
|
p32xx.clone(),
|
|
);
|
|
run_sim(
|
|
"32-2e10drive-p015-p015",
|
|
drive_map_2stack_with_init2(0.15, 0.15),
|
|
p32xx.clone(),
|
|
);
|
|
run_sim(
|
|
"32-2e10drive-p020-p020",
|
|
drive_map_2stack_with_init2(0.20, 0.20),
|
|
p32xx.clone(),
|
|
);
|
|
run_sim(
|
|
"32-2e10drive-p030-p030",
|
|
drive_map_2stack_with_init2(0.30, 0.30),
|
|
p32xx.clone(),
|
|
);
|
|
run_sim(
|
|
"32-2e10drive-p050-p050",
|
|
drive_map_2stack_with_init2(0.50, 0.50),
|
|
p32xx.clone(),
|
|
);
|
|
run_sim(
|
|
"32-2e10drive-n010-n010",
|
|
drive_map_2stack_with_init2(-0.10, -0.10),
|
|
p32xx.clone(),
|
|
);
|
|
run_sim(
|
|
"32-2e10drive-n015-n015",
|
|
drive_map_2stack_with_init2(-0.15, -0.15),
|
|
p32xx.clone(),
|
|
);
|
|
run_sim(
|
|
"32-2e10drive-n020-n020",
|
|
drive_map_2stack_with_init2(-0.20, -0.20),
|
|
p32xx.clone(),
|
|
);
|
|
run_sim(
|
|
"32-2e10drive-n030-n030",
|
|
drive_map_2stack_with_init2(-0.30, -0.30),
|
|
p32xx.clone(),
|
|
);
|
|
run_sim(
|
|
"32-2e10drive-n050-n050",
|
|
drive_map_2stack_with_init2(-0.50, -0.50),
|
|
p32xx.clone(),
|
|
);
|
|
}
|
|
|
|
if false {
|
|
let p33xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_input_magnitude(15e9)
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_coupling_loops(8)
|
|
.with_coupling(0, 3, 0, 1, CouplingMethod::Direct)
|
|
;
|
|
run_sim(
|
|
"33-15e9drive-8loop-p100-n100",
|
|
drive_map_4stack_with_init4(-1.00, -1.00, -1.00, 1.00),
|
|
p33xx.clone(),
|
|
);
|
|
run_sim(
|
|
"33-15e9drive-8loop-p100-000",
|
|
drive_map_4stack_with_init4(0.00, 0.00, 0.00, 1.00),
|
|
p33xx.clone(),
|
|
);
|
|
run_sim(
|
|
"33-15e9drive-8loop-p100-p100",
|
|
drive_map_4stack_with_init4(1.00, 1.00, 1.00, 1.00),
|
|
p33xx.clone(),
|
|
);
|
|
|
|
run_sim(
|
|
"33-15e9drive-8loop-p100-n080",
|
|
drive_map_4stack_with_init4(-0.80, -0.80, -0.80, 1.00),
|
|
p33xx.clone(),
|
|
);
|
|
run_sim(
|
|
"33-15e9drive-8loop-p100-p080",
|
|
drive_map_4stack_with_init4(0.80, 0.80, 0.80, 1.00),
|
|
p33xx.clone(),
|
|
);
|
|
run_sim(
|
|
"33-15e9drive-8loop-p100-n050",
|
|
drive_map_4stack_with_init4(-0.50, -0.50, -0.50, 1.00),
|
|
p33xx.clone(),
|
|
);
|
|
run_sim(
|
|
"33-15e9drive-8loop-p100-p050",
|
|
drive_map_4stack_with_init4(0.50, 0.50, 0.50, 1.00),
|
|
p33xx.clone(),
|
|
);
|
|
run_sim(
|
|
"33-15e9drive-8loop-p100-n030",
|
|
drive_map_4stack_with_init4(-0.30, -0.30, -0.30, 1.00),
|
|
p33xx.clone(),
|
|
);
|
|
run_sim(
|
|
"33-15e9drive-8loop-p100-p030",
|
|
drive_map_4stack_with_init4(0.30, 0.30, 0.30, 1.00),
|
|
p33xx.clone(),
|
|
);
|
|
run_sim(
|
|
"33-15e9drive-8loop-p100-n020",
|
|
drive_map_4stack_with_init4(-0.20, -0.20, -0.20, 1.00),
|
|
p33xx.clone(),
|
|
);
|
|
run_sim(
|
|
"33-15e9drive-8loop-p100-p020",
|
|
drive_map_4stack_with_init4(0.20, 0.20, 0.20, 1.00),
|
|
p33xx.clone(),
|
|
);
|
|
run_sim(
|
|
"33-15e9drive-8loop-p100-n010",
|
|
drive_map_4stack_with_init4(-0.10, -0.10, -0.10, 1.00),
|
|
p33xx.clone(),
|
|
);
|
|
run_sim(
|
|
"33-15e9drive-8loop-p100-p010",
|
|
drive_map_4stack_with_init4(0.10, 0.10, 0.10, 1.00),
|
|
p33xx.clone(),
|
|
);
|
|
}
|
|
|
|
if false {
|
|
let p34xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_input_magnitude(15e9)
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_coupling_loops(8)
|
|
.with_coupling(0, 1, 0, 2, CouplingMethod::Direct)
|
|
.with_coupling(1, 2, 1, 2, CouplingMethod::Direct)
|
|
;
|
|
for (sshunt, fshunt) in [("p100", 1.00), ("000", 0.00)] {
|
|
for (sinit, finit) in [
|
|
("n100", -1.00),
|
|
("000", 0.00),
|
|
("p100", 1.00),
|
|
("n080", -0.80),
|
|
("n050", -0.50),
|
|
("n030", -0.30),
|
|
("n020", -0.20),
|
|
("n010", -0.10),
|
|
("p010", 0.10),
|
|
("p020", 0.20),
|
|
("p030", 0.30),
|
|
("p050", 0.50),
|
|
("p080", 0.80),
|
|
] {
|
|
run_sim(
|
|
&format!("34-15e9drive-8loop-{}-{}", sshunt, sinit),
|
|
drive_map_3stack_with_init3_m2_inv(finit, finit, fshunt),
|
|
p34xx.clone(),
|
|
)
|
|
}
|
|
}
|
|
}
|
|
|
|
if false {
|
|
let p35xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_input_magnitude(2e10)
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_coupling_loops(8)
|
|
.with_coupling(0, 3, 0, 1, CouplingMethod::Direct)
|
|
;
|
|
for (srx, rx) in [("000", 0.00), ("n100", -1.00),] {
|
|
for (sshunt, fshunt) in [("p100", 1.00), ("000", 0.00), ("p050", -0.50),] {
|
|
for (sinit, finit) in [
|
|
("n100", -1.00),
|
|
("n080", -0.80),
|
|
("n050", -0.50),
|
|
("n020", -0.20),
|
|
("000", 0.00),
|
|
("p020", 0.20),
|
|
("p050", 0.50),
|
|
("p080", 0.80),
|
|
("p100", 1.00),
|
|
] {
|
|
run_sim(
|
|
&format!("35-2e10drive-8loop-{}rx-{}shunt-{}tx", srx, sshunt, sinit),
|
|
drive_map_4stack_with_init4(finit, rx, finit, fshunt),
|
|
p35xx.clone(),
|
|
)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if false {
|
|
let p36xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_input_magnitude(2e10)
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_coupling_loops(8)
|
|
.with_coupling(0, 4, 0, 1, CouplingMethod::Direct)
|
|
;
|
|
for (scur, cur) in [("1e10", 1e10), ("15e9", 15e9), ("2e10", 2e10), ] {
|
|
for (srx, rx) in [("n100", -1.00), ] {
|
|
for (sshunt, fshunt) in [("p100", 1.00), /*("p050", 0.50),*/] {
|
|
for (sinit, finit) in [
|
|
("n100", -1.00),
|
|
("n080", -0.80),
|
|
("n050", -0.50),
|
|
("n030", -0.30),
|
|
("n020", -0.20),
|
|
("000", 0.00),
|
|
("p020", 0.20),
|
|
("p050", 0.50),
|
|
("p080", 0.80),
|
|
("p100", 1.00),
|
|
] {
|
|
run_sim(
|
|
&format!("36-{}-8loop-{}rx-{}shunt-{}tx", scur, srx, sshunt, sinit),
|
|
drive_map_5stack_with_init5(finit, rx, finit, finit, fshunt),
|
|
p36xx
|
|
.with_input_magnitude(cur)
|
|
)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if false {
|
|
let p37xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_input_magnitude(2e10)
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_coupling_loops(8)
|
|
.with_coupling(0, 6, 0, 1, CouplingMethod::Direct)
|
|
;
|
|
for (scur, cur) in [("2e10", 2e10), ("15e9", 15e9), ("1e10", 1e10), ] {
|
|
for (srx, frx) in [("n100", -1.00), ] {
|
|
for (sshunt, fshunt) in [("p100", 1.00), ("p050", 0.50), ("p020", 0.20)] {
|
|
for (sinit, finit) in [
|
|
("n100", -1.00),
|
|
("n080", -0.80),
|
|
("n050", -0.50),
|
|
("n030", -0.30),
|
|
("n020", -0.20),
|
|
("000", 0.00),
|
|
("p020", 0.20),
|
|
("p050", 0.50),
|
|
("p080", 0.80),
|
|
("p100", 1.00),
|
|
] {
|
|
run_sim(
|
|
&format!("37-{}-8loop-{}rx-{}shunt-{}tx", scur, srx, sshunt, sinit),
|
|
drive_map_7stack_half_pos_half_inv(finit, fshunt, frx),
|
|
p37xx
|
|
.with_input_magnitude(cur)
|
|
)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if false {
|
|
let p38xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_input_magnitude(2e10)
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_coupling_loops(8)
|
|
;
|
|
for (scur, cur) in [
|
|
("2e10", 2e10),
|
|
("5e10", 5e10),
|
|
// ("15e9", 15e9),
|
|
// ("1e10", 1e10),
|
|
] {
|
|
for (tx, inv) in [
|
|
(2, 0),
|
|
(3, 0),
|
|
// (3, 1),
|
|
// (4, 1),
|
|
// (4, 2),
|
|
(4, 0),
|
|
// (5, 0),
|
|
(1, 0),
|
|
] {
|
|
for (sinit, finit) in [
|
|
("p100", 1.00),
|
|
("n100", -1.00),
|
|
("000", 0.00),
|
|
("p050", 0.50),
|
|
("n050", -0.50),
|
|
("p020", 0.20),
|
|
("n020", -0.20),
|
|
|
|
("n080", -0.80),
|
|
("n030", -0.30),
|
|
("n010", -0.10),
|
|
("p010", 0.10),
|
|
("p030", 0.30),
|
|
("p080", 0.80),
|
|
("n040", -0.40),
|
|
("n060", -0.60),
|
|
("n025", -0.25),
|
|
("n015", -0.15),
|
|
("n005", -0.05),
|
|
("p005", 0.05),
|
|
] {
|
|
let name = &format!("38-{}:{}tx_shunt_cores-{}-8loop-n100rx-p100shunt-{}tx", tx, inv, scur, sinit);
|
|
let params = p38xx
|
|
.with_input_magnitude(cur)
|
|
.with_coupling(0, tx+inv, 0, 1, CouplingMethod::Direct);
|
|
match (tx, inv) {
|
|
(1, 0) => run_sim(
|
|
name,
|
|
drive_map_nstack_pos_minv::<1, 0>(finit, 1.00),
|
|
params,
|
|
),
|
|
(2, 0) => run_sim(
|
|
name,
|
|
drive_map_nstack_pos_minv::<2, 0>(finit, 1.00),
|
|
params,
|
|
),
|
|
(3, 0) => run_sim(
|
|
name,
|
|
drive_map_nstack_pos_minv::<3, 0>(finit, 1.00),
|
|
params,
|
|
),
|
|
(3, 1) => run_sim(
|
|
name,
|
|
drive_map_nstack_pos_minv::<3, 1>(finit, 1.00),
|
|
params,
|
|
),
|
|
// run_sim(
|
|
// &format!("38-{}:{}tx_shunt_cores-{}-8loop-n100rx-p100shunt-{}tx", 3, 2, scur, sinit),
|
|
// drive_map_nstack_pos_minv::<3, 2>(finit, 1.00),
|
|
// params
|
|
// .with_coupling(0, 3+2, 0, 1, CouplingMethod::Direct)
|
|
// );
|
|
(4, 0) => run_sim(
|
|
name,
|
|
drive_map_nstack_pos_minv::<4, 0>(finit, 1.00),
|
|
params,
|
|
),
|
|
(4, 1) => run_sim(
|
|
name,
|
|
drive_map_nstack_pos_minv::<4, 1>(finit, 1.00),
|
|
params,
|
|
),
|
|
(4, 2) => run_sim(
|
|
name,
|
|
drive_map_nstack_pos_minv::<4, 2>(finit, 1.00),
|
|
params,
|
|
),
|
|
// run_sim(
|
|
// &format!("38-{}:{}tx_shunt_cores-{}-8loop-n100rx-p100shunt-{}tx", 4, 3, scur, sinit),
|
|
// drive_map_nstack_pos_minv::<4, 3>(finit, 1.00),
|
|
// params
|
|
// .with_coupling(0, 4+3, 0, 1, CouplingMethod::Direct)
|
|
// );
|
|
(5, 0) => run_sim(
|
|
name,
|
|
drive_map_nstack_pos_minv::<5, 0>(finit, 1.00),
|
|
params,
|
|
),
|
|
(5, 2) => run_sim(
|
|
name,
|
|
drive_map_nstack_pos_minv::<5, 2>(finit, 1.00),
|
|
params,
|
|
),
|
|
// run_sim(
|
|
// &format!("38-{}:{}tx_shunt_cores-{}-8loop-n100rx-p100shunt-{}tx", 5, 3, scur, sinit),
|
|
// drive_map_nstack_pos_minv::<5, 3>(finit, 1.00),
|
|
// params
|
|
// .with_coupling(0, 5+3, 0, 1, CouplingMethod::Direct)
|
|
// );
|
|
// run_sim(
|
|
// &format!("38-{}:{}tx_shunt_cores-{}-8loop-n100rx-p100shunt-{}tx", 5, 4, scur, sinit),
|
|
// drive_map_nstack_pos_minv::<5, 4>(finit, 1.00),
|
|
// params
|
|
// .with_coupling(0, 5+4, 0, 1, CouplingMethod::Direct)
|
|
// );
|
|
(6, 2) => run_sim(
|
|
name,
|
|
drive_map_nstack_pos_minv::<6, 2>(finit, 1.00),
|
|
params,
|
|
),
|
|
(6, 3) => run_sim(
|
|
name,
|
|
drive_map_nstack_pos_minv::<6, 3>(finit, 1.00),
|
|
params,
|
|
),
|
|
// run_sim(
|
|
// &format!("38-{}:{}tx_shunt_cores-{}-8loop-n100rx-p100shunt-{}tx", 6, 4, scur, sinit),
|
|
// drive_map_nstack_pos_minv::<6, 4>(finit, 1.00),
|
|
// params
|
|
// .with_coupling(0, 6+4, 0, 1, CouplingMethod::Direct)
|
|
// );
|
|
// run_sim(
|
|
// &format!("38-{}:{}tx_shunt_cores-{}-8loop-n100rx-p100shunt-{}tx", 6, 5, scur, sinit),
|
|
// drive_map_nstack_pos_minv::<6, 5>(finit, 1.00),
|
|
// params
|
|
// .with_coupling(0, 6+5, 0, 1, CouplingMethod::Direct)
|
|
// );
|
|
(7, 2) => run_sim(
|
|
name,
|
|
drive_map_nstack_pos_minv::<7, 2>(finit, 1.00),
|
|
params,
|
|
),
|
|
(7, 3) => run_sim(
|
|
name,
|
|
drive_map_nstack_pos_minv::<7, 3>(finit, 1.00),
|
|
params,
|
|
),
|
|
other => panic!("unknown sim: {:?}", other),
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
if false {
|
|
let p39xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_coupling_loops(8)
|
|
;
|
|
for (cur_str, cur_f) in [
|
|
// ("5e11", 5e11),
|
|
// ("2e11", 2e11),
|
|
// ("1e10", 1e10),
|
|
("1e11", 1e11),
|
|
("8e10", 8e10),
|
|
("2e11", 2e11),
|
|
("15e10", 15e10),
|
|
("5e10", 5e10),
|
|
("2e10", 2e10),
|
|
// ("15e9", 15e9),
|
|
// ("1e10", 1e10),
|
|
] {
|
|
for (init_str, init_f) in [
|
|
("p100", 1.00),
|
|
("n100", -1.00),
|
|
("000", 0.00),
|
|
("p050", 0.50),
|
|
("n050", -0.50),
|
|
("p020", 0.20),
|
|
("n020", -0.20),
|
|
|
|
("n080", -0.80),
|
|
("n030", -0.30),
|
|
("n010", -0.10),
|
|
("p010", 0.10),
|
|
("p030", 0.30),
|
|
("p080", 0.80),
|
|
("n040", -0.40),
|
|
("n060", -0.60),
|
|
("n025", -0.25),
|
|
("n015", -0.15),
|
|
("n005", -0.05),
|
|
("p005", 0.05),
|
|
] {
|
|
let cores = 2;
|
|
let name = &format!("39-{}cores-{}-8loop-{}tx", cores, cur_str, init_str);
|
|
let slots = cores+1;
|
|
let mut params = p39xx
|
|
.with_coupling(1, cores+1, 0, slots, CouplingMethod::Direct)
|
|
.with_input_magnitude(cur_f)
|
|
;
|
|
for i in 1..=cores {
|
|
params = params.with_coupling(0, i, i, slots, CouplingMethod::Outside);
|
|
}
|
|
run_sim(
|
|
name,
|
|
drive_map_fork_then_join(init_f),
|
|
params,
|
|
);
|
|
}
|
|
}
|
|
}
|
|
|
|
if true {
|
|
let p40xx = params
|
|
.with_clock_phase_duration(ps(1000))
|
|
.with_clock_decay(ps(50))
|
|
.with_input_magnitude(2e10)
|
|
.with_ctl_conductivity(5e2)
|
|
.with_coupling_conductivity(5e3)
|
|
.with_s_major(um(400))
|
|
.with_coupling_loops(8)
|
|
;
|
|
for init_set in [
|
|
&[
|
|
("p100", 1.00),
|
|
("n100", -1.00),
|
|
("000", 0.00),
|
|
("p050", 0.50),
|
|
("n050", -0.50),
|
|
("p020", 0.20),
|
|
("n020", -0.20),
|
|
// ][..],
|
|
// &[
|
|
("n080", -0.80),
|
|
("n030", -0.30),
|
|
("n010", -0.10),
|
|
("p010", 0.10),
|
|
("p030", 0.30),
|
|
("p080", 0.80),
|
|
// ][..],
|
|
// &[
|
|
("n040", -0.40),
|
|
("n060", -0.60),
|
|
("n025", -0.25),
|
|
("n015", -0.15),
|
|
("n005", -0.05),
|
|
("p005", 0.05),
|
|
("p200", 2.00),
|
|
("n200", -2.00),
|
|
("p150", 1.50),
|
|
("n150", -1.50),
|
|
|
|
("n007", -0.07),
|
|
("n017", -0.17),
|
|
("n013", -0.13),
|
|
][..],
|
|
] {
|
|
for (coupling_loops, s0_loops, s_major, cur_str, cur_flt) in [
|
|
(12, 2, um(600), "5e10", 5e10),
|
|
(8, 3, um(600), "5e10", 5e10),
|
|
(6, 4, um(600), "5e10", 5e10),
|
|
(20, 1, um(600), "3e10", 3e10),
|
|
(8, 3, um(600), "1e11", 1e11),
|
|
(6, 4, um(600), "1e11", 1e11),
|
|
|
|
(12, 2, um(600), "1e11", 1e11),
|
|
(20, 1, um(600), "5e10", 5e10),
|
|
(20, 1, um(600), "1e11", 1e11),
|
|
(20, 1, um(600), "2e11", 2e11),
|
|
(12, 2, um(600), "2e11", 2e11), // higher current actually weakens transfer (why?)
|
|
|
|
(12, 1, um(400), "5e10", 5e10),
|
|
// (4, 5, um(400), "5e10", 5e10), // doesn't transition enough on p100
|
|
(6, 1, um(400), "5e10", 5e10),
|
|
// (6, 2, um(400)), // explored in earlier sim
|
|
(6, 3, um(400), "5e10", 5e10),
|
|
|
|
// (10, 3, um(600)), // enable later (after tuning drive strength?)
|
|
(6, 5, um(600), "5e10", 5e10),
|
|
] {
|
|
for &(init_str, init_flt) in init_set {
|
|
let net_slots = 2*s0_loops;
|
|
let name = &format!(
|
|
"40-{}rad-{}coupling-{}_1_winding-{}-drive-{}",
|
|
s_major,
|
|
coupling_loops,
|
|
2*s0_loops + 1,
|
|
cur_str,
|
|
init_str,
|
|
);
|
|
let mut params = p40xx
|
|
.with_s_major(s_major)
|
|
.with_coupling_loops(coupling_loops)
|
|
.with_input_magnitude(cur_flt)
|
|
// couple S0 to S1
|
|
.with_coupling(0, 1, 0, net_slots, CouplingMethod::DirectHalfExterior)
|
|
.with_coupling(0, 1, net_slots-1, net_slots, CouplingMethod::DirectHalfInterior)
|
|
;
|
|
for i in 0..net_slots-1 {
|
|
// "loops" for S1 (none: this just connects the two ends of the coupling)
|
|
params = params.with_coupling(1, 1, i, net_slots, CouplingMethod::SelfAngularTop);
|
|
}
|
|
// loops for S0:
|
|
for i in 0..s0_loops {
|
|
if i != 0 {
|
|
// bridge this loop to the previous one
|
|
params = params.with_coupling(0, 0, 2*i-1, net_slots, CouplingMethod::SelfAngularBot);
|
|
}
|
|
params = params
|
|
.with_coupling(0, 0, 2*i, net_slots, CouplingMethod::SelfLoopHalfInterior)
|
|
.with_coupling(0, 0, 2*i, net_slots, CouplingMethod::SelfAngularTop)
|
|
.with_coupling(0, 0, 2*i + 1, net_slots, CouplingMethod::SelfLoopHalfExterior)
|
|
;
|
|
}
|
|
run_sim(
|
|
name,
|
|
drive_map_2stack_with_init(init_flt),
|
|
params,
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
fn run_sim<const C: usize, const R: usize>(
|
|
name: &str, drive_map: [[ClockState; C]; R], params: Params
|
|
) {
|
|
// let ns = |n| n as f32 * 1e-9;
|
|
let feat_size = um(10);
|
|
|
|
let sim_padding = Meters::new(um(80), um(80), um(80));
|
|
let sim_bounds = |num_cores| {
|
|
Meters::new(params.sx() * 2.0, params.sy() * 2.0, params.sz(num_cores))
|
|
+ sim_padding
|
|
};
|
|
|
|
//////// define the control signals/transitions
|
|
// each row N denotes the drive currents at clock cycle N.
|
|
// each col M denotes the drive current at core M.
|
|
let num_cycles = drive_map.len() as u32;
|
|
let num_cores = drive_map[0].len() as u32;
|
|
let mut core_drivers = vec![Vec::default(); num_cores as usize];
|
|
for (cycle, cores) in drive_map.into_iter().enumerate() {
|
|
for (core, clock) in cores.into_iter().enumerate() {
|
|
core_drivers[core as usize].extend(clock.time_stimulus(¶ms, cycle as u32));
|
|
}
|
|
}
|
|
let stim: Vec<_> = core_drivers.into_iter()
|
|
.enumerate()
|
|
.map(|(core, time_varying)| {
|
|
let region = params.ctl(core as u32);
|
|
let area = region.cross_section();
|
|
let amp = 1.0 / area;
|
|
let v_field = CurlVectorField::new(region.clone());
|
|
ModulatedVectorField::new(v_field, time_varying.scaled(amp.cast::<R>()))
|
|
})
|
|
.collect();
|
|
assert_eq!(stim.len(), num_cores as usize);
|
|
|
|
|
|
let ctl_mat = IsomorphicConductor::new(params.ctl_conductivity.cast::<R>());
|
|
let coupling_mat = IsomorphicConductor::new(params.coupling_conductivity.cast::<R>());
|
|
let ferro_mat = Ferroxcube3R1MH::new();
|
|
|
|
// let last_core = num_cores - 1;
|
|
|
|
let mut driver = Driver::new(Sim::new(
|
|
sim_bounds(num_cores).to_index(feat_size), feat_size,
|
|
));
|
|
driver.add_classical_boundary(sim_padding);
|
|
|
|
//////// create the wires and toroids
|
|
// driver.fill_region(¶ms.sense(last_core), coupling_mat);
|
|
for core in 0..num_cores {
|
|
driver.fill_region(¶ms.s(core), ferro_mat);
|
|
driver.fill_region(¶ms.ctl(core), ctl_mat);
|
|
}
|
|
for &(from, to, id, of, meth) in ¶ms.couplings {
|
|
for loop_ in 0..params.coupling_loops {
|
|
match meth {
|
|
CouplingMethod::Direct => driver.fill_region(
|
|
¶ms.coupling_direct(from, to, loop_, id, of), coupling_mat
|
|
),
|
|
CouplingMethod::Outside => driver.fill_region(
|
|
¶ms.coupling_outside(from, to, loop_, id, of), coupling_mat
|
|
),
|
|
CouplingMethod::DirectHalfExterior => driver.fill_region(
|
|
¶ms.coupling_direct_half_exterior(from, to, loop_, id, of), coupling_mat
|
|
),
|
|
CouplingMethod::DirectHalfInterior => driver.fill_region(
|
|
¶ms.coupling_direct_half_interior(from, to, loop_, id, of), coupling_mat
|
|
),
|
|
CouplingMethod::SelfAngularTop => driver.fill_region(
|
|
¶ms.coupling_self_angular_top(from, to, loop_, id, of), coupling_mat
|
|
),
|
|
CouplingMethod::SelfAngularBot => driver.fill_region(
|
|
¶ms.coupling_self_angular_bot(from, to, loop_, id, of), coupling_mat
|
|
),
|
|
CouplingMethod::SelfLoopHalfExterior => driver.fill_region(
|
|
¶ms.coupling_self_loop_half_exterior(from, to, loop_, id, of), coupling_mat
|
|
),
|
|
CouplingMethod::SelfLoopHalfInterior => driver.fill_region(
|
|
¶ms.coupling_self_loop_half_interior(from, to, loop_, id, of), coupling_mat
|
|
),
|
|
}
|
|
}
|
|
}
|
|
|
|
//////// monitor some measurements
|
|
for core in 0..num_cores {
|
|
driver.add_measurement(meas::CurrentLoop::new(
|
|
&format!("drive{}", core),
|
|
params.ctl(core),
|
|
));
|
|
}
|
|
for &(from, to, id, of, meth) in ¶ms.couplings {
|
|
let name = format!("sense{}_{}", from, to);
|
|
// measure just *one* of the coupling loops
|
|
match meth {
|
|
CouplingMethod::Direct => {
|
|
driver.add_measurement(meas::CurrentLoop::new(
|
|
&name, params.coupling_direct(from, to, 0, id, of),
|
|
));
|
|
},
|
|
_ => {
|
|
// TODO: dream up a way to sense this current
|
|
// driver.add_measurement(meas::CurrentLoop::new(
|
|
// &name, params.coupling_outside(from, to, 0, id, of),
|
|
// ));
|
|
},
|
|
}
|
|
}
|
|
for core in 0..num_cores {
|
|
driver.add_measurement(meas::MagneticLoop::new(
|
|
&format!("state{}", core),
|
|
params.s(core),
|
|
));
|
|
}
|
|
|
|
|
|
let duration = Seconds(params.clock_phase_duration * num_cycles as f32);
|
|
|
|
// let stim = DynStimuli::from_vec(stim.map(MapIntoBoxStimulus).into_vec());
|
|
let mut driver = driver.with_modulated_stimulus();
|
|
for s in stim {
|
|
driver.add_stimulus(s);
|
|
}
|
|
|
|
let prefix = format!("out/applications/stacked_cores/{}/", name);
|
|
let _ = std::fs::create_dir_all(&prefix);
|
|
driver.add_state_file(&*format!("{}state.bc", prefix), 12800);
|
|
driver.add_serializer_renderer(&*format!("{}frame-", prefix), 6400, Some(12800));
|
|
// driver.add_csv_renderer(&*format!("{}meas-detailed.csv", prefix), 100, None);
|
|
driver.add_csv_renderer(&*format!("{}meas.csv", prefix), 1600, None);
|
|
driver.add_csv_renderer(&*format!("{}meas-sparse.csv", prefix), 12800, None);
|
|
driver.set_steps_per_stimulus(200);
|
|
|
|
driver.step_until(
|
|
duration
|
|
.to_frame(driver.timestep())
|
|
.round_up(25600)
|
|
);
|
|
}
|