app: stacked_cores: define a fork -> join sim

this is like 18xx, but better measured & with better control/coupling
wirings.

so far we don't have anything > 1.0x amp, but closer to 0.75x
This commit is contained in:
colin 2022-11-08 09:23:28 +00:00
parent be172d4371
commit df68100f82
6 changed files with 488 additions and 3 deletions

View File

@ -5,7 +5,7 @@ from stacked_cores_52xx_plotters import *
def extract_53xx_tx(meas_rows: list) -> tuple:
"""
extracts a flat list of input/output M mappings from a 53xx run
extracts a flat tuple of input/output M mappings from a 53xx run
"""
return (meas_rows[1].m[0], meas_rows[0].m[1], meas_rows[0].m[2], meas_rows[1].m[3])

View File

@ -0,0 +1,24 @@
#!/usr/bin/env python3
from natsort import natsorted
from stacked_cores_52xx import *
from stacked_cores_52xx_plotters import *
def extract_54xx_tx(meas_rows: list) -> tuple:
"""
extracts a flat tuple of input/output M mappings from a 54xx run
"""
return (meas_rows[0].m[0], meas_rows[2].m[0])
split_gates = read_db(lambda name: name.startswith("54-"))
sweep_input = lambda points=101: [( unit_to_m(x/(points-1)), None ) for x in range(points)]
for name, meas in natsorted(or_gates.items()):
trace = eval_series(meas, sweep_input(), extract_54xx_tx)
plot(f"{name}", "a1", trace)
plot_slope(f"slope {name}", "a1", trace)

View File

@ -0,0 +1,24 @@
#!/usr/bin/env python3
from natsort import natsorted
from stacked_cores_52xx import *
from stacked_cores_52xx_plotters import *
def extract_55xx_tx(meas_rows: list) -> tuple:
"""
extracts a flat tuple of input/output M mappings from a 55xx run
"""
return (meas_rows[0].m[1], meas_rows[2].m[1])
split_gates = read_db(lambda name: name.startswith("55-"))
sweep_input = lambda points=101: [( unit_to_m(x/(points-1)), None ) for x in range(points)]
for name, meas in natsorted(split_gates.items()):
trace = eval_series(meas, sweep_input(), extract_55xx_tx)
plot(f"{name}", "a1", trace)
plot_slope(f"slope {name}", "a1", trace)

View File

@ -11,7 +11,7 @@ from stacked_cores_52xx_db import DB
## CONSTANTS/CONFIGURATION
# list of sims to extract details for
PREFIXES = { "52", "53" }
PREFIXES = { "52", "53", "54", "55" }
def times_of_interest(sim_name: str) -> list:
# could be more intelligent, extracting e.g. the clock duration from the name
@ -19,6 +19,10 @@ def times_of_interest(sim_name: str) -> list:
return [2e-9, 4e-9, 8e-9]
if sim_name.startswith("53-"):
return [2e-9, 4e-9]
if sim_name.startswith("54-"):
return [2e-9, 4e-9, 8e-9]
if sim_name.startswith("55-"):
return [4e-9, 6e-9, 10e-9]
## USER-FACING FUNCTIONS

View File

@ -1611,4 +1611,286 @@ DB = {
MeasRow(4e-09, [ 15470, -30866, -30880, -16602]),
],
}),
'54-split_2-0.0004rad-4ctl-16coupling-1_1_winding-1e10-drive-': ParameterizedMeas({
(-1.000,): [
MeasRow(2e-09, [-17024, -189, -17026]),
MeasRow(4e-09, [ 8374, -27233, 8371]),
MeasRow(8e-09, [-27486, 15191, -27487]),
],
(-0.200,): [
MeasRow(2e-09, [-17068, 12204, -17069]),
MeasRow(4e-09, [ 15832, -27073, 15819]),
MeasRow(8e-09, [-27420, 16988, -27418]),
],
(-0.150,): [
MeasRow(2e-09, [-17055, 12694, -17056]),
MeasRow(4e-09, [ 15905, -27073, 15889]),
MeasRow(8e-09, [-27420, 16996, -27419]),
],
(-0.100,): [
MeasRow(2e-09, [-17043, 13165, -17042]),
MeasRow(4e-09, [ 15972, -27071, 15957]),
MeasRow(8e-09, [-27420, 17004, -27419]),
],
(-0.050,): [
MeasRow(2e-09, [-17028, 13614, -17028]),
MeasRow(4e-09, [ 16036, -27069, 16021]),
MeasRow(8e-09, [-27420, 17012, -27419]),
],
( 0.000,): [
MeasRow(2e-09, [-17013, 14044, -17011]),
MeasRow(4e-09, [ 16093, -27068, 16080]),
MeasRow(8e-09, [-27419, 17017, -27418]),
],
( 0.050,): [
MeasRow(2e-09, [-16997, 14457, -16993]),
MeasRow(4e-09, [ 16140, -27067, 16128]),
MeasRow(8e-09, [-27418, 17023, -27417]),
],
( 0.100,): [
MeasRow(2e-09, [-16979, 14865, -16975]),
MeasRow(4e-09, [ 16181, -27066, 16170]),
MeasRow(8e-09, [-27418, 17028, -27417]),
],
( 0.150,): [
MeasRow(2e-09, [-16962, 15229, -16958]),
MeasRow(4e-09, [ 16217, -27065, 16206]),
MeasRow(8e-09, [-27418, 17032, -27417]),
],
( 0.200,): [
MeasRow(2e-09, [-16948, 15512, -16944]),
MeasRow(4e-09, [ 16243, -27064, 16233]),
MeasRow(8e-09, [-27418, 17035, -27417]),
],
( 0.300,): [
MeasRow(2e-09, [-16927, 15904, -16922]),
MeasRow(4e-09, [ 16279, -27064, 16269]),
MeasRow(8e-09, [-27417, 17039, -27417]),
],
( 1.000,): [
MeasRow(2e-09, [-16853, 16840, -16848]),
MeasRow(4e-09, [ 16361, -27064, 16353]),
MeasRow(8e-09, [-27414, 17049, -27414]),
],
}),
'54-split_2-0.0004rad-4ctl-16coupling-1_1_winding-99999997952e0-drive-': ParameterizedMeas({
(-1.000,): [
MeasRow(2e-09, [-19689, -22493, -19692]),
MeasRow(4e-09, [ -4237, -30189, -4263]),
MeasRow(8e-09, [-30184, 9834, -30176]),
],
( 1.000,): [
MeasRow(2e-09, [-16799, 16804, -16805]),
MeasRow(4e-09, [ 16877, -30052, 16877]),
MeasRow(8e-09, [-30164, 16956, -30157]),
],
}),
'54-split_2-0.0004rad-8ctl-16coupling-1_1_winding-2e10-drive-': ParameterizedMeas({
(-1.000,): [
MeasRow(2e-09, [-19555, -22163, -19548]),
MeasRow(4e-09, [ -8022, -30949, -8036]),
MeasRow(8e-09, [-30944, 4823, -30943]),
],
( 0.000,): [
MeasRow(2e-09, [-17321, 12560, -17317]),
MeasRow(4e-09, [ 16653, -30907, 16621]),
MeasRow(8e-09, [-30930, 17528, -30931]),
],
( 1.000,): [
MeasRow(2e-09, [-16876, 16884, -16877]),
MeasRow(4e-09, [ 16983, -30901, 16979]),
MeasRow(8e-09, [-30929, 17554, -30931]),
],
}),
'54-split_2-0.0004rad-8ctl-16coupling-1_1_winding-5e9-drive-': ParameterizedMeas({
(-1.000,): [
MeasRow(2e-09, [-17262, 1206, -17263]),
MeasRow(4e-09, [ 8873, -29653, 8861]),
MeasRow(8e-09, [-29725, 15846, -29728]),
],
(-0.200,): [
MeasRow(2e-09, [-17110, 11955, -17110]),
MeasRow(4e-09, [ 15728, -29650, 15725]),
MeasRow(8e-09, [-29730, 16857, -29731]),
],
(-0.150,): [
MeasRow(2e-09, [-17088, 12494, -17090]),
MeasRow(4e-09, [ 15816, -29650, 15812]),
MeasRow(8e-09, [-29730, 16865, -29731]),
],
(-0.100,): [
MeasRow(2e-09, [-17068, 13024, -17069]),
MeasRow(4e-09, [ 15897, -29650, 15892]),
MeasRow(8e-09, [-29730, 16872, -29731]),
],
(-0.050,): [
MeasRow(2e-09, [-17046, 13537, -17047]),
MeasRow(4e-09, [ 15974, -29650, 15968]),
MeasRow(8e-09, [-29730, 16878, -29732]),
],
(-0.020,): [
MeasRow(2e-09, [-17034, 13836, -17034]),
MeasRow(4e-09, [ 16016, -29650, 16011]),
MeasRow(8e-09, [-29730, 16882, -29732]),
],
( 0.000,): [
MeasRow(2e-09, [-17026, 14027, -17025]),
MeasRow(4e-09, [ 16042, -29650, 16037]),
MeasRow(8e-09, [-29730, 16884, -29732]),
],
( 0.020,): [
MeasRow(2e-09, [-17019, 14212, -17016]),
MeasRow(4e-09, [ 16066, -29650, 16061]),
MeasRow(8e-09, [-29730, 16886, -29732]),
],
( 0.050,): [
MeasRow(2e-09, [-17007, 14478, -17004]),
MeasRow(4e-09, [ 16098, -29649, 16094]),
MeasRow(8e-09, [-29730, 16889, -29732]),
],
( 0.070,): [
MeasRow(2e-09, [-16999, 14646, -16996]),
MeasRow(4e-09, [ 16116, -29648, 16113]),
MeasRow(8e-09, [-29730, 16892, -29732]),
],
( 0.100,): [
MeasRow(2e-09, [-16988, 14880, -16985]),
MeasRow(4e-09, [ 16141, -29648, 16139]),
MeasRow(8e-09, [-29731, 16894, -29732]),
],
( 0.120,): [
MeasRow(2e-09, [-16980, 15023, -16978]),
MeasRow(4e-09, [ 16156, -29648, 16153]),
MeasRow(8e-09, [-29731, 16896, -29732]),
],
( 0.150,): [
MeasRow(2e-09, [-16970, 15216, -16968]),
MeasRow(4e-09, [ 16176, -29648, 16173]),
MeasRow(8e-09, [-29731, 16898, -29732]),
],
( 0.170,): [
MeasRow(2e-09, [-16963, 15332, -16962]),
MeasRow(4e-09, [ 16187, -29648, 16184]),
MeasRow(8e-09, [-29731, 16899, -29732]),
],
( 0.200,): [
MeasRow(2e-09, [-16954, 15488, -16953]),
MeasRow(4e-09, [ 16203, -29648, 16199]),
MeasRow(8e-09, [-29731, 16901, -29732]),
],
( 0.300,): [
MeasRow(2e-09, [-16931, 15895, -16929]),
MeasRow(4e-09, [ 16238, -29646, 16235]),
MeasRow(8e-09, [-29732, 16906, -29732]),
],
( 1.000,): [
MeasRow(2e-09, [-16836, 16848, -16839]),
MeasRow(4e-09, [ 16317, -29639, 16311]),
MeasRow(8e-09, [-29736, 16916, -29736]),
],
}),
'55-split_2-0.0004rad-8ctl-16coupling-1_1_winding-2e9-drive-': ParameterizedMeas({
(-1.000,): [
MeasRow(4e-09, [-18807, -20858, -18808]),
MeasRow(6e-09, [-12601, -27867, -12603]),
MeasRow(1e-08, [-27872, -4175, -27875]),
],
(-0.300,): [
MeasRow(4e-09, [-17149, -2315, -17149]),
MeasRow(6e-09, [ -1147, -27856, -1153]),
MeasRow(1e-08, [-27868, 5839, -27872]),
],
(-0.250,): [
MeasRow(4e-09, [-17153, 914, -17154]),
MeasRow(6e-09, [ -148, -27856, -155]),
MeasRow(1e-08, [-27869, 6717, -27873]),
],
(-0.200,): [
MeasRow(4e-09, [-17158, 4128, -17158]),
MeasRow(6e-09, [ 798, -27856, 792]),
MeasRow(1e-08, [-27869, 7541, -27873]),
],
(-0.150,): [
MeasRow(4e-09, [-17131, 6535, -17132]),
MeasRow(6e-09, [ 1505, -27856, 1498]),
MeasRow(1e-08, [-27869, 8145, -27872]),
],
(-0.100,): [
MeasRow(4e-09, [-17087, 8328, -17088]),
MeasRow(6e-09, [ 2036, -27856, 2029]),
MeasRow(1e-08, [-27870, 8594, -27873]),
],
(-0.050,): [
MeasRow(4e-09, [-17044, 9881, -17045]),
MeasRow(6e-09, [ 2497, -27856, 2490]),
MeasRow(1e-08, [-27870, 8980, -27875]),
],
( 0.000,): [
MeasRow(4e-09, [-17001, 11293, -17002]),
MeasRow(6e-09, [ 2916, -27857, 2909]),
MeasRow(1e-08, [-27871, 9329, -27875]),
],
( 1.000,): [
MeasRow(4e-09, [-16751, 16758, -16749]),
MeasRow(6e-09, [ 4508, -27855, 4501]),
MeasRow(1e-08, [-27888, 10660, -27890]),
],
}),
'55-split_2-0.0004rad-8ctl-16coupling-1_1_winding-5e9-drive-': ParameterizedMeas({
(-1.000,): [
MeasRow(4e-09, [-19126, -21406, -19127]),
MeasRow(6e-09, [-10981, -29698, -11006]),
MeasRow(1e-08, [-29819, -447, -29823]),
],
(-0.300,): [
MeasRow(4e-09, [-18961, -20991, -18959]),
MeasRow(6e-09, [-10517, -29687, -10536]),
MeasRow(1e-08, [-29818, -4, -29821]),
],
(-0.250,): [
MeasRow(4e-09, [-18465, -19524, -18466]),
MeasRow(6e-09, [ -8991, -29675, -9006]),
MeasRow(1e-08, [-29809, 1376, -29813]),
],
(-0.200,): [
MeasRow(4e-09, [-17386, -14592, -17386]),
MeasRow(6e-09, [ -4238, -29654, -4244]),
MeasRow(1e-08, [-29780, 5626, -29784]),
],
(-0.150,): [
MeasRow(4e-09, [-17358, -6654, -17359]),
MeasRow(6e-09, [ 2376, -29654, 2371]),
MeasRow(1e-08, [-29738, 11421, -29745]),
],
(-0.100,): [
MeasRow(4e-09, [-17366, 1269, -17366]),
MeasRow(6e-09, [ 8767, -29653, 8757]),
MeasRow(1e-08, [-29727, 15820, -29732]),
],
(-0.050,): [
MeasRow(4e-09, [-17311, 7496, -17309]),
MeasRow(6e-09, [ 13615, -29649, 13608]),
MeasRow(1e-08, [-29731, 16694, -29733]),
],
( 0.000,): [
MeasRow(4e-09, [-17183, 11007, -17180]),
MeasRow(6e-09, [ 15478, -29649, 15473]),
MeasRow(1e-08, [-29731, 16838, -29732]),
],
( 0.100,): [
MeasRow(4e-09, [-17001, 14828, -16998]),
MeasRow(6e-09, [ 16131, -29650, 16128]),
MeasRow(1e-08, [-29733, 16894, -29733]),
],
( 0.200,): [
MeasRow(4e-09, [-16963, 15491, -16961]),
MeasRow(6e-09, [ 16198, -29648, 16196]),
MeasRow(1e-08, [-29733, 16903, -29733]),
],
( 1.000,): [
MeasRow(4e-09, [-16840, 16851, -16844]),
MeasRow(6e-09, [ 16316, -29638, 16310]),
MeasRow(1e-08, [-29736, 16917, -29737]),
],
}),
}

View File

@ -1364,6 +1364,41 @@ fn drive_map_buf_53(amp0: f32, amp1: f32) -> [[ClockState; 4]; 2] {
]
}
#[allow(unused)]
fn drive_map_split_54(amp: f32) -> [[ClockState; 3]; 4] {
use ClockState as C;
// amplitudes are inverted from what you would expect.
// hold(-1) puts the core into a positive M
[
// init S1 pos; charge S0 neg, S3 neg
[C::release_high(), C::release(-amp), C::release_high()],
// clear S1 -> {S0, S2}
[C::float(), C::hold_high(), C::float(), ],
// ready S1 for receive
[C::float(), C::release_high(), C::float(), ],
// clear {S0, S2} -> S1
[C::hold_high(), C::float(), C::hold_high(), ],
]
}
#[allow(unused)]
fn drive_map_split_54_2clock_init(amp: f32) -> [[ClockState; 3]; 5] {
use ClockState as C;
// amplitudes are inverted from what you would expect.
// hold(-1) puts the core into a positive M
[
// init S1 pos; charge S0 neg, S3 neg
[C::hold_high(), C::hold(-amp), C::hold_high(), ],
[C::release_high(), C::release(-amp), C::release_high(),],
// clear S1 -> {S0, S2}
[C::float(), C::hold_high(), C::float(), ],
// ready S1 for receive
[C::float(), C::release_high(), C::float(), ],
// clear {S0, S2} -> S1
[C::hold_high(), C::float(), C::hold_high(), ],
]
}
fn asymmetric_inverter_name(p: &Params, sim_id: &str, windings: u32, init_flt: f32) -> String {
let init_int = (init_flt.abs() * 100.0 + 0.5) as u32;
let init_level = if init_flt > 0.0 {
@ -5889,7 +5924,7 @@ fn main() {
}
}
if true {
if false {
for init_set in [
// M1, M2 are treated as X and -X, respectively.
// because it's differential, testing (-1, 1) is sort of extraneous with (1, -1).
@ -6059,6 +6094,122 @@ fn main() {
}
}
}
if true {
for init_set in [
&[
// establish rough domain/range
1.00,
-1.00,
0.00,
][..],
&[
-0.20,
-0.10,
-0.30,
// 0.10,
// 0.20,
][..],
&[
-0.15,
-0.05,
-0.25,
// 0.05,
// 0.15,
][..],
&[
// 2e9 details
-0.50,
-0.40,
-0.60,
-0.35,
-0.45,
][..],
&[
// more detailed sweep
-0.12,
-0.17,
-0.02,
-0.07,
0.02,
0.07,
-0.22,
-0.27,
0.12,
0.17,
0.22,
0.27,
][..],
] {
for (long_init, ctl_cond, coupling_cond, clock_duration, clock_decay, coupling_loops, couplings_per_ctl, s_major, cur_flt) in [
// total slot use is L*(2*A + 1),
// where L is the "coupling loops" and A is the inp_loops ("asymmetric loops")
// e.g. L=13, A=1 gives 39
// e.g. L=8, A=2 gives 40
// e.g. L=6, A=3 gives 42
// e.g. L=4, A=4 gives 36
// e.g. L=3, A=6 gives 39
// y(-20900) = -4200 y(16800) = 10700
// slope = 055 from x-17000 to -2700
(true, 2e3, 2e4, ps(2000), ps(100), 8, 2, um(400), 2e9),
// y(-21400) = -400, y(16900) = 16900
// slope = 0.75 from x=-17000 to -7000
(true, 2e3, 2e4, ps(2000), ps(100), 8, 2, um(400), 5e9),
// y(1200) = 15800, y(16800) = 16900
// (false, 2e3, 2e4, ps(2000), ps(100), 8, 2, um(400), 5e9),
// y(-22200) = 4800, y(16900) = 17600
// (false, 2e3, 2e4, ps(2000), ps(100), 8, 2, um(400), 2e10),
// y(-200) = 15200, y(16800) = 17000
// (false, 2e3, 2e4, ps(2000), ps(100), 4, 4, um(400), 1e10),
// y(-22500) => 9800, y(16800) => 17000
// (false, 2e3, 2e4, ps(2000), ps(100), 4, 4, um(400), 1e11),
] {
for &init_flt in init_set {
// M1 core is coupled to M0 + M2 + control slots
let net_slots = 2*couplings_per_ctl + 1;
let mut params = params_v2
.with_clock_phase_duration(clock_duration)
.with_clock_decay(clock_decay)
.with_ctl_conductivity(ctl_cond)
.with_coupling_conductivity(coupling_cond)
.with_s_major(s_major)
.with_coupling_loops(coupling_loops)
.with_input_magnitude(cur_flt)
// control loops
.with_coupling(0, 0, 0, net_slots, CouplingMethod::Control)
.with_coupling(1, 1, 0, net_slots, CouplingMethod::Control)
.with_coupling(2, 2, 0, net_slots, CouplingMethod::Control)
;
for i in 0..couplings_per_ctl {
// couple output core 0 to core 3
params = params.with_coupling(0, 1, 1+2*i, net_slots, CouplingMethod::Direct);
params = params.with_coupling(1, 2, 2+2*i, net_slots, CouplingMethod::Direct);
}
if long_init {
let name = asymmetric_inverter_name_v2(
&params, "55-split_2", coupling_loops /* ctl loops */, couplings_per_ctl*coupling_loops, 1 /* asym loops */, init_flt
);
run_sim(
&name,
drive_map_split_54_2clock_init(init_flt),
params,
);
} else {
let name = asymmetric_inverter_name_v2(
&params, "54-split_2", coupling_loops /* ctl loops */, couplings_per_ctl*coupling_loops, 1 /* asym loops */, init_flt
);
run_sim(
&name,
drive_map_split_54(init_flt),
params,
);
}
}
}
}
}
}