explore more of 40: multi-wrapped cores

This commit is contained in:
2022-09-24 03:25:32 -07:00
parent c7ac19dcc9
commit ebbaf4c697
3 changed files with 494 additions and 87 deletions

View File

@@ -17,6 +17,8 @@ class Line:
def get(self, x: float) -> float: def get(self, x: float) -> float:
from_x, from_y = self.from_ from_x, from_y = self.from_
to_x, to_y = self.to to_x, to_y = self.to
if x == from_x:
return from_y
tween = (x - from_x) / (to_x - from_x) tween = (x - from_x) / (to_x - from_x)
return tween * to_y + (1-tween) * from_y return tween * to_y + (1-tween) * from_y
@@ -41,11 +43,29 @@ class Piecewise:
(x, 1-y) for (x, y) in self.xy (x, 1-y) for (x, y) in self.xy
]) ])
def logically_inverted_x(self) -> 'Piecewise':
return Piecewise([
(1-x, y) for (x, y) in self.xy
][::-1])
def logically_inverted_xy(self) -> 'Piecewise':
return self.logically_inverted_x().logically_inverted()
def shifted_x(self, shift: float) -> 'Piecewise':
return Piecewise([
(x + shift, y) for (x, y) in self.xy
])
def shifted_y(self, shift: float) -> 'Piecewise':
return Piecewise([
(x, y + shift) for (x, y) in self.xy
])
def line_for(self, x: float) -> Line: def line_for(self, x: float) -> Line:
for first_lower in self.xy[:-1][::-1]: for first_lower in self.xy[:-1][::-1]:
if first_lower[0] < x: break if first_lower[0] < x: break
for first_upper in self.xy[1:]: for first_upper in self.xy[1:]:
if first_upper[0] > x: break if not first_upper[0] < x: break
return Line(first_lower, first_upper) return Line(first_lower, first_upper)
@@ -59,11 +79,17 @@ class Piecewise:
def get_slope(self, x: float) -> float: def get_slope(self, x: float) -> float:
return self.line_for(x).slope() return self.line_for(x).slope()
def get_repeated(self, x: float, n: int = 63) -> float: def get_repeated(self, x: float, n: int = 255) -> float:
for _ in range(n): for _ in range(n):
x = self.get(x) x = self.get(x)
return x return x
def get_mean(self, x: float, n: int = 100) -> float:
return 1/n * sum(self.get(x * i/(n-1)) for i in range(n))
def get_integral(self, x: float, n: int = 100) -> float:
return self.get_mean(x) * x
def df_for(self, from_: float, to: float, points: int, f) -> DataFrame: def df_for(self, from_: float, to: float, points: int, f) -> DataFrame:
x_step = (to - from_) / (points - 1) x_step = (to - from_) / (points - 1)
x = [from_ + x_step*x for x in range(points)] x = [from_ + x_step*x for x in range(points)]
@@ -90,6 +116,98 @@ class Piecewise:
def plot_equilibrium(self, from_: float = 0.0, to: float = 1.0, title: str = "Piecewise"): def plot_equilibrium(self, from_: float = 0.0, to: float = 1.0, title: str = "Piecewise"):
self.plot_for(from_, to, title, self.get_repeated) self.plot_for(from_, to, title, self.get_repeated)
def plot_integral(self, from_: float = 0.0, to: float = 1.0, title: str = "Piecewise"):
self.plot_for(from_, to, title, self.get_integral)
# stable inverter (ideal)
fwd_fake_step = Piecewise(
[
[ 0.0, 0.0 ],
[ 0.4, 0.0 ],
[ 0.6, 1.0 ],
[ 1.0, 1.0 ],
]
)
# stable inverter (amplifying)
fwd_fake_1_5x = Piecewise(
[
[ 0.0, 0.0 ],
[ 0.65, 1.0 ],
[ 1.0, 1.0 ],
]
)
# stable inverter (amplifying only from 0.3 -> 0.5)
fwd_fake_slope_change_before_0_5 = Piecewise(
[
[ 0.0, 0.2 ],
[ 0.3, 0.3 ],
[ 0.5, 0.6 ],
[ 1.0, 1.0 ],
]
)
# failed inverter (>1.0 slope happens too late)
# flipping x doesn't fix.
# however, shifting x by -0.1 and y by -0.2 and *then* inverting x does.
# - this gives us a concave-up 1-x like curve
fwd_fake_slope_change_after_0_5 = Piecewise(
[
[ 0.0, 0.2 ],
[ 0.3, 0.3 ],
[ 0.6, 0.5 ],
[ 1.0, 1.0 ],
]
)
slope_fake_hill = [
0.8, 0.9, 1.0, 1.1, 1.2, 1.2, 1.1, 1.0, 0.9, 0.8
]
fwd_fake_hill = Piecewise(
[ (0.1*i, 0.1 * sum(slope_fake_hill[0:i])) for i in range(11) ]
)
fwd_fake_asymmetric_hill = Piecewise(
[
(0.0, 0.20),
(0.2, 0.30),
(0.4, 0.45),
(0.6, 0.75),
(0.8, 0.80),
(1.0, 0.85),
]
)
# valid inverter; the [0.6, 1.0] -> 0.8 mapping *fixes* the logic low value to
# 1.0 - 0.8 = 0.2
# and allows anything 0.6 to 1.0 to be recognized as logic high immediately.
# i.e. "bottoming out" is a *good* thing
fwd_fake_asymmetric_flats = Piecewise(
[
(0.0, 0.20),
(0.2, 0.30),
(0.6, 0.80),
(1.0, 0.80),
]
)
fwd_fake_asymmetric_overdrive = Piecewise(
[
(0.0, 0.40),
(0.3, 0.50),
(0.6, 0.85),
(1.0, 0.90),
]
)
fwd_fake_asymmetric_bottom_out = Piecewise(
[
(0.0, 0.00),
(0.8, 0.99),
(1.0, 1.00),
]
)
fwd_17_4_0_8e10 = Piecewise( fwd_17_4_0_8e10 = Piecewise(
[ [
[ -16381, 6688 ], [ -16381, 6688 ],
@@ -148,12 +266,26 @@ fwd_24_5_1_2e10 = Piecewise(
fwd_24_5_1_5e10 = Piecewise( fwd_24_5_1_5e10 = Piecewise(
[ [
[ -15208, -6303 ], # -1.00 [ -15208, -6303 ],
[ -11991, -4499 ], # -0.30 [ -13396, -5388 ],
[ -4757, 531 ], # -0.20 [ -11992, -4516 ],
[ 5994, 11126 ], # 0.00 [ -11991, -4499 ],
[ 8238, 13048 ], # +0.20 [ -9379, -2953 ],
[ 12048, 15346 ], # +1.00 [ -4757, 531 ],
[ -2, 4734 ],
[ 3074, 7760 ],
[ 4854, 9784 ],
[ 5611, 10736 ],
[ 5994, 11126 ],
[ 6298, 11404 ],
[ 6678, 11757 ],
[ 7196, 12200 ],
[ 7667, 12589 ],
[ 8238, 13048 ],
[ 8239, 13046 ],
[ 9613, 14027 ],
[ 10585, 14622 ],
[ 12048, 15346 ],
] ]
).normalized(17000) ).normalized(17000)
@@ -451,12 +583,190 @@ inv_39_2_0_15e10 = Piecewise(
] ]
).normalized(17000) ).normalized(17000)
fwd_40_12_3_1_5e10 = Piecewise(
[
[ -15617, -4900 ],
[ -15086, -4405 ],
[ -14357, -3941 ],
[ -13828, -3800 ],
[ -13111, -3294 ],
[ -12203, -2582 ],
[ -9321, -169 ],
[ -4645, 4342 ],
[ 422, 9543 ],
[ 5472, 14584 ],
[ 8233, 16078 ],
[ 9249, 16224 ],
[ 9700, 16263 ],
[ 10044, 16286 ],
[ 10643, 16323 ],
[ 11168, 16348 ],
[ 11605, 16367 ],
[ 12054, 16387 ],
[ 12411, 16402 ],
]
).normalized(17000)
fwd_40_6_3_1_5e10 = Piecewise(
[
[ -16046, -5674 ],
[ -15523, -5367 ],
[ -14807, -4923 ],
[ -14350, -4632 ],
[ -13668, -4326 ],
[ -12591, -3719 ],
[ -9752, -1873 ],
[ -5310, 1484 ],
[ -1048, 4991 ],
[ 2517, 7918 ],
[ 5284, 10134 ],
[ 7297, 11623 ],
[ 8629, 12439 ],
[ 9611, 12955 ],
[ 11360, 13845 ],
[ 12188, 14174 ],
[ 12831, 14537 ],
[ 13573, 14838 ],
[ 14082, 14999 ],
]
).normalized(17000)
fwd_40_6_7_1_5e10 = Piecewise(
[
[ -14687, -7326 ],
[ -14108, -7030 ],
[ -13435, -6690 ],
[ -13049, -6503 ],
[ -12522, -6223 ],
[ -11785, -5833 ],
[ -9190, -4410 ],
[ -4649, -1447 ],
[ 250, 2263 ],
[ 3132, 4799 ],
[ 4306, 6177 ],
[ 4961, 7059 ],
[ 5320, 7400 ],
[ 5631, 7670 ],
[ 6516, 8370 ],
[ 8605, 9674 ],
[ 9764, 10342 ],
[ 10753, 10874 ],
[ 11283, 11147 ],
]
).normalized(15000)
fwd_40_600um_20_3_1_5e10 = Piecewise(
[
[ -9878, -1348 ],
[ -9392, -985 ],
[ -8694, -508 ],
[ -8256, -360 ],
[ -7609, -221 ],
[ -4128, 1930 ],
[ -974, 4269 ],
[ 2142, 6978 ],
[ 3895, 8940 ],
[ 5049, 10512 ],
[ 5838, 11677 ],
[ 6192, 11925 ],
[ 6415, 12017 ],
[ 6613, 12086 ],
[ 6960, 12202 ],
[ 7282, 12311 ],
[ 7658, 12407 ],
[ 8037, 12562 ],
[ 8272, 12695 ],
]
).normalized(19000)
fwd_40_600um_20_3_1_1e11 = Piecewise(
[
[ -12167, -1233 ],
[ -11552, -655 ],
[ -10820, -93 ],
[ -10370, 199 ],
[ -9825, 434 ],
[ -9043, 844 ],
[ -8573, 1101 ],
[ -7905, 1565 ],
[ -4197, 4541 ],
[ 1886, 9344 ],
[ 5011, 11888 ],
[ 6604, 12899 ],
[ 7932, 13602 ],
[ 8423, 13730 ],
[ 8645, 13888 ],
[ 8942, 13962 ],
[ 9318, 14166 ],
[ 9554, 14252 ],
]
).normalized(15000)
fwd_40_600um_12_5_1_1e11 = Piecewise(
[
[ -11814, -3658 ],
[ -11192, -3265 ],
[ -10456, -2801 ],
[ -10025, -2587 ],
[ -9522, -2256 ],
[ -8805, -1836 ],
[ -8362, -1556 ],
[ -7702, -1105 ],
[ 315, 4617 ],
[ 4359, 9016 ],
[ 5981, 10366 ],
[ 6782, 10836 ],
[ 7084, 11037 ],
[ 7501, 11328 ],
[ 8045, 11716 ],
[ 8395, 12070 ],
]
).normalized(13000)
fwd_40_600um_6_11_1_5e10 = Piecewise(
[
[ -9209, -10033 ],
[ -8755, -9809 ],
[ -8113, -9520 ],
[ -7741, -9312 ],
[ -7180, -9051 ],
[ -4152, -8422 ],
[ -1328, -7790 ],
[ 117, -7317 ],
[ 1037, -6894 ],
[ 1580, -6541 ],
[ 1870, -6257 ],
[ 2055, -6046 ],
[ 2191, -5921 ],
[ 2366, -5783 ],
[ 3097, -5430 ],
[ 4014, -5084 ],
[ 4496, -4826 ],
[ 4942, -4641 ],
[ 5175, -4562 ],
]
).normalized(11000)
for (name, curve) in [ for (name, curve) in [
# ("fake step", fwd_fake_step.logically_inverted()),
# ("fake 1.5x", fwd_fake_1_5x.logically_inverted()),
# ("fake slope-change", fwd_fake_slope_change_before_0_5.logically_inverted()),
# ("fake slope-change (delayed)", fwd_fake_slope_change_after_0_5.logically_inverted()),
# ("fake slope-change (delayed, shifted)", fwd_fake_slope_change_after_0_5.shifted_x(-0.1).logically_inverted()),
# ("fake slope-change (delayed, shifted, inv-xy)", fwd_fake_slope_change_after_0_5.shifted_x(-0.1).shifted_y(-0.2).logically_inverted_x()),
# ("fake slope-change (delayed, flipped)", fwd_fake_slope_change_after_0_5.logically_inverted_x().logically_inverted()),
# ("fake hill", fwd_fake_hill.logically_inverted()),
# ("fake asymmetric hill", fwd_fake_asymmetric_hill.logically_inverted()),
("fake asymmetric flats", fwd_fake_asymmetric_flats.logically_inverted()),
("fake asymmetric overdrive", fwd_fake_asymmetric_overdrive.logically_inverted()),
("fake asymmetric bottom out", fwd_fake_asymmetric_bottom_out.logically_inverted()),
# ("18", fwd_18.logically_inverted()), # ("18", fwd_18.logically_inverted()),
("24 5:1 (2e10 I)", fwd_24_5_1_2e10.logically_inverted()), # ("24 5:1 (2e10 I)", fwd_24_5_1_2e10.logically_inverted()),
("24 5:1 (5e10 I)", fwd_24_5_1_5e10.logically_inverted()), # ("24 5:1 (5e10 I)", fwd_24_5_1_5e10.logically_inverted()),
("24 5:1 (8e10 I)", fwd_24_5_1_8e10.logically_inverted()), # ("24 5:1 (8e10 I)", fwd_24_5_1_8e10.logically_inverted()),
("26", fwd_26.logically_inverted()), # ("26", fwd_26.logically_inverted()),
# ("38 1:0 (2e10 I)", fwd_38_1_0.logically_inverted()), # ("38 1:0 (2e10 I)", fwd_38_1_0.logically_inverted()),
# ("38 1:0 (5e10 I)", fwd_38_1_0_5e10.logically_inverted()), # ("38 1:0 (5e10 I)", fwd_38_1_0_5e10.logically_inverted()),
# ("38 2:0 (2e10 I)", fwd_38_2_0.logically_inverted()), # ("38 2:0 (2e10 I)", fwd_38_2_0.logically_inverted()),
@@ -470,7 +780,19 @@ for (name, curve) in [
# ("39 2:0 (8e10 I)", inv_39_2_0_8e10), # ("39 2:0 (8e10 I)", inv_39_2_0_8e10),
# ("39 2:0 (1e11 I)", inv_39_2_0_1e11), # ("39 2:0 (1e11 I)", inv_39_2_0_1e11),
# ("39 2:0 (15e10 I)", inv_39_2_0_15e10), # ("39 2:0 (15e10 I)", inv_39_2_0_15e10),
# ("40 12x 3:1 (400um, 5e10 I)", fwd_40_12_3_1_5e10.logically_inverted()),
# ("40 6x 3:1 (400um, 5e10 I)", fwd_40_6_3_1_5e10.logically_inverted()),
# ("40 6x 7:1 (400um, 5e10 I)", fwd_40_6_7_1_5e10.logically_inverted()),
# ("40 20x 3:1 (600um, 5e10 I)", fwd_40_600um_20_3_1_5e10.logically_inverted()),
# ("40 20x 3:1 (600um, 5e10 I)-flipped-xy", fwd_40_600um_20_3_1_5e10.logically_inverted_x()),
# # ("40 20x 3:1 (600um, 5e10 I)-flipped", fwd_40_600um_20_3_1_5e10.logically_inverted_x()),
# # ("40 20x 3:1 (600um, 5e10 I)-shifted", fwd_40_600um_20_3_1_5e10.shifted_x(-0.10).logically_inverted()),
# ("40 20x 3:1 (600um, 1e11 I)", fwd_40_600um_20_3_1_1e11.logically_inverted()),
# ("40 12x 5:1 (600um, 1e11 I)", fwd_40_600um_12_5_1_1e11.logically_inverted()),
# ("40 6x 11:1 (600um, 5e10 I)", fwd_40_600um_6_11_1_5e10.logically_inverted()),
]: ]:
curve.plot(title = f"{name} mapping") curve.plot(title = f"{name} mapping")
curve.logically_inverted().plot_slope(title = f"{name} slope") curve.logically_inverted().plot_slope(title = f"{name} slope")
curve.plot_equilibrium(title = f"{name} equilibrium") curve.plot_equilibrium(title = f"{name} equilibrium")
# curve.plot_integral(title = f"{name} integrated")

View File

@@ -21,16 +21,16 @@ def extract_one(path: str, t_first: float, t_last: float):
def extract_39xx(base_path: str, t_first: str = "2e-9", t_last: str = "3e-9"): def extract_39xx(base_path: str, t_first: str = "2e-9", t_last: str = "3e-9"):
base_dir, prefix = os.path.split(base_path) base_dir, prefix = os.path.split(base_path)
mappings = [] mappings = {}
for entry in os.listdir(base_dir): for entry in os.listdir(base_dir):
if entry.startswith(prefix): if entry.startswith(prefix):
(input_, output) = extract_one(os.path.join(base_dir, entry, "meas.csv"), float(t_first), float(t_last)) (input_, output) = extract_one(os.path.join(base_dir, entry, "meas.csv"), float(t_first), float(t_last))
mappings.append((input_, output)) mappings[int(round(input_))] = int(round(output))
print("Piecewise(") print("Piecewise(")
print(" [") print(" [")
for i, o in sorted(mappings): for i, o in sorted(mappings.items()):
print(f" [ {int(round(i)):6}, {int(round(o)):6} ],") print(f" [ {i:6}, {o:6} ],")
print(" ]") print(" ]")
print(")") print(")")

View File

@@ -2035,6 +2035,30 @@ fn main() {
; ;
// third run: vary init M0 // 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( run_sim(
"17-6stack-8loop-2e10-n001-percent-drive-strength", "17-6stack-8loop-2e10-n001-percent-drive-strength",
drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.01), drive_map_nstack_one_sided_with_output_locked_once::<6>(-0.01),
@@ -2691,43 +2715,52 @@ fn main() {
.with_coupling(0, 0, 3, 4, CouplingMethod::SelfLoopHalfExterior) .with_coupling(0, 0, 3, 4, CouplingMethod::SelfLoopHalfExterior)
; ;
run_sim( if false {
"23-3stack-5_1_winding-8e10-drive-neg-gate-p100", run_sim(
drive_map_3stack_through_saturation(-1.0, 1.00), "23-3stack-5_1_winding-8e10-drive-neg-gate-p100",
p23xx.clone() drive_map_3stack_through_saturation(-1.0, 1.00),
); p23xx.clone()
run_sim( );
"23-3stack-5_1_winding-8e10-drive-neg-gate-000", run_sim(
drive_map_3stack_through_saturation(-1.0, 0.00), "23-3stack-5_1_winding-8e10-drive-neg-gate-000",
p23xx.clone() drive_map_3stack_through_saturation(-1.0, 0.00),
); p23xx.clone()
run_sim( );
"23-3stack-5_1_winding-8e10-drive-neg-gate-n100", run_sim(
drive_map_3stack_through_saturation(-1.0, -1.00), "23-3stack-5_1_winding-8e10-drive-neg-gate-n100",
p23xx.clone() drive_map_3stack_through_saturation(-1.0, -1.00),
); p23xx.clone()
);
}
for (cur, scur) in [(8e10, "8e10"), (5e10, "5e10"), (2e10, "2e10"), (1e10, "1e10")] { for (cur, cur_str) in [
(5e10, "5e10"),
(8e10, "8e10"),
(2e10, "2e10"),
(1e10, "1e10")
] {
let p = p23xx.with_input_magnitude(cur); let p = p23xx.with_input_magnitude(cur);
for a in [100, 50, 30, 20, 15, 10, 5, 2, 0] { for (a_str, a) in [
if a == 0 { ("n100", -1.00),
run_sim( ("n050", -0.50),
&format!("24-2stack-5_1_winding-{}-drive-neg-gate-000", scur), ("n030", -0.30),
drive_map_2stack_with_init(0.00), ("n025", -0.25),
p.clone() ("n020", -0.20),
); ("n015", -0.15),
} else { ("n010", -0.10),
run_sim( ("n005", -0.05),
&format!("24-2stack-5_1_winding-{}-drive-neg-gate-p{}", scur, a), ("000", 0.00),
drive_map_2stack_with_init(0.01 * a as f32), ("p005", 0.05),
p.clone() ("p010", 0.10),
); ("p020", 0.20),
run_sim( ("p050", 0.50),
&format!("24-2stack-5_1_winding-{}-drive-neg-gate-n{}", scur, a), ("p100", 1.00),
drive_map_2stack_with_init(-0.01 * a as f32), ] {
p.clone() run_sim(
); &format!("24-2stack-5_1_winding-{}-drive-neg-gate-{}", cur_str, a_str),
} drive_map_2stack_with_init(a),
p.clone()
);
} }
} }
} }
@@ -3679,7 +3712,7 @@ fn main() {
} }
} }
if true { if false {
let p39xx = params let p39xx = params
.with_clock_phase_duration(ps(1000)) .with_clock_phase_duration(ps(1000))
.with_clock_decay(ps(50)) .with_clock_decay(ps(50))
@@ -3742,7 +3775,7 @@ fn main() {
} }
} }
if false { if true {
let p40xx = params let p40xx = params
.with_clock_phase_duration(ps(1000)) .with_clock_phase_duration(ps(1000))
.with_clock_decay(ps(50)) .with_clock_decay(ps(50))
@@ -3752,40 +3785,92 @@ fn main() {
.with_s_major(um(400)) .with_s_major(um(400))
.with_coupling_loops(8) .with_coupling_loops(8)
; ;
for (init_str, init_f) in [ for init_set in [
("p100", 1.00), &[
("n100", -1.00), ("p100", 1.00),
("000", 0.00), ("n100", -1.00),
("p050", 0.50), ("000", 0.00),
("n050", -0.50), ("p050", 0.50),
("p020", 0.20), ("n050", -0.50),
("n020", -0.20), ("p020", 0.20),
("n020", -0.20),
("n080", -0.80), ][..],
("n030", -0.30), &[
("n010", -0.10), ("n080", -0.80),
("p010", 0.10), ("n030", -0.30),
("p030", 0.30), ("n010", -0.10),
("p080", 0.80), ("p010", 0.10),
("n040", -0.40), ("p030", 0.30),
("n060", -0.60), ("p080", 0.80),
("n025", -0.25), // ][..],
("n015", -0.15), // &[
("n005", -0.05), ("n040", -0.40),
("p005", 0.05), ("n060", -0.60),
("n025", -0.25),
("n015", -0.15),
("n005", -0.05),
("p005", 0.05),
("p200", 2.00),
("n200", -2.00),
][..],
] { ] {
let cur_str = "2e10"; for (coupling_loops, s0_loops, s_major, cur_str, cur_flt) in [
let name = &format!("40-{}cores-{}-8loop-{}tx", 2, cur_str, init_str); (12, 2, um(600), "1e11", 1e11),
let params = p40xx (20, 1, um(600), "5e10", 5e10),
.with_coupling(0, 1, 0, 3, CouplingMethod::Outside) // forward coupling (20, 1, um(600), "1e11", 1e11),
.with_coupling(0, 3, 1, 3, CouplingMethod::Outside) // forward coupling // (12, 2, um(600), "2e11", 2e11), // higher current actually weakens transfer (why?)
.with_coupling(1, 3, 2, 3, CouplingMethod::Direct) // link M1-M2-M3 with M2=output // (20, 1, um(600), "2e11", 2e11),
;
run_sim( (12, 1, um(400), "5e10", 5e10),
name, // (4, 5, um(400), "5e10", 5e10), // doesn't transition enough on p100
drive_map_fork_then_join_m2_out(init_f), (6, 1, um(400), "5e10", 5e10),
params, // (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,
);
}
}
} }
} }
} }
@@ -3917,7 +4002,7 @@ fn run_sim<const C: usize, const R: usize>(
let prefix = format!("out/applications/stacked_cores/{}/", name); let prefix = format!("out/applications/stacked_cores/{}/", name);
let _ = std::fs::create_dir_all(&prefix); let _ = std::fs::create_dir_all(&prefix);
driver.add_state_file(&*format!("{}state.bc", prefix), 25600); driver.add_state_file(&*format!("{}state.bc", prefix), 12800);
driver.add_serializer_renderer(&*format!("{}frame-", prefix), 6400, Some(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-detailed.csv", prefix), 100, None);
driver.add_csv_renderer(&*format!("{}meas.csv", prefix), 1600, None); driver.add_csv_renderer(&*format!("{}meas.csv", prefix), 1600, None);