app: stacked_cores: more experiments
This commit is contained in:
@@ -270,13 +270,13 @@ fn drive_map_3stack() -> [[ClockState; 3]; 6] {
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
fn drive_map_3stack_and_rev() -> [[ClockState; 3]; 6] {
|
||||
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_high(), C::hold_low() ],
|
||||
[C::hold_low(), C::hold(amp), C::hold_low() ],
|
||||
// let the cores settle
|
||||
[C::release_low(), C::release_high(),C::release_low()],
|
||||
[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() ],
|
||||
|
||||
@@ -288,6 +288,10 @@ fn drive_map_3stack_and_rev() -> [[ClockState; 3]; 6] {
|
||||
[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] {
|
||||
@@ -852,7 +856,7 @@ fn main() {
|
||||
p9xx.with_coupling_loops(4),
|
||||
);
|
||||
}
|
||||
if true {
|
||||
if false {
|
||||
let p10xx = params
|
||||
.with_clock_phase_duration(ps(1000))
|
||||
.with_clock_decay(ps(50))
|
||||
@@ -910,6 +914,215 @@ fn main() {
|
||||
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)
|
||||
.with_coupling(1, 2, 1, 3)
|
||||
.with_coupling(0, 2, 2, 3)
|
||||
;
|
||||
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 true {
|
||||
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)
|
||||
.with_coupling(1, 2, 1, 3)
|
||||
.with_coupling(0, 2, 2, 3)
|
||||
;
|
||||
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),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
50
crates/post/scripts/stacked_cores_12xx.py
Executable file
50
crates/post/scripts/stacked_cores_12xx.py
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
invoke with the path to a meas.csv file for the stacked_core 12-xx demos
|
||||
to extract higher-level info from them.
|
||||
"""
|
||||
import sys
|
||||
|
||||
from stacked_cores import load_csv, labeled_rows, last_row_before_t, extract_m
|
||||
|
||||
def extract_12xx(path: str):
|
||||
header, raw_rows = load_csv(path)
|
||||
rows = labeled_rows(header, raw_rows)
|
||||
|
||||
tx_start = last_row_before_t(rows, 2e-9)
|
||||
tx_end = last_row_before_t(rows, 3e-9)
|
||||
noop_start = last_row_before_t(rows, 5e-9)
|
||||
noop_end = last_row_before_t(rows, 6e-9)
|
||||
|
||||
m_tx_start = extract_m(tx_start)
|
||||
m_tx_end = extract_m(tx_end)
|
||||
m_noop_start = extract_m(noop_start)
|
||||
m_noop_end = extract_m(noop_end)
|
||||
|
||||
m1_tx = abs(m_tx_end[1] - m_tx_start[1])
|
||||
m1_noop = abs(m_noop_end[1] - m_noop_start[1])
|
||||
|
||||
m_tx_arr = [round(abs(m_tx_end[i] - m_tx_start[i])) for i in [0, 2]]
|
||||
m_tx = sum(m_tx_arr)
|
||||
m_noop_arr = [round(abs(m_noop_end[i] - m_noop_start[i])) for i in [0, 2]]
|
||||
m_noop = sum(m_noop_arr)
|
||||
|
||||
ratio_tx_noop = m_tx / m_noop
|
||||
ratio_tx_m1 = m_tx / m1_tx
|
||||
ratio_tx_noop_m1 = (m_tx - m_noop) / m1_tx
|
||||
|
||||
print(f'm1 tx: {m1_tx} ({m_tx_start[1]} -> {m_tx_end[1]})')
|
||||
print(f'm1 noop: {m1_noop} ({m_noop_start[1]} -> {m_noop_end[1]})')
|
||||
print('')
|
||||
print(f'm(tx): {m_tx_start}')
|
||||
print(f' -> {m_tx_end}')
|
||||
print('')
|
||||
print(f'm(noop): {m_noop_start}')
|
||||
print(f' -> {m_noop_end}')
|
||||
print('')
|
||||
print(f'tx/noop: {ratio_tx_noop:.3}')
|
||||
print(f'tx/m1: {ratio_tx_m1:.3}')
|
||||
print(f'(tx-noop)/m1: {ratio_tx_noop_m1:.3}')
|
||||
|
||||
if __name__ == '__main__':
|
||||
extract_12xx(sys.argv[1])
|
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
invoke with the path to a meas.csv file for the stacked_core 8xx demos
|
||||
invoke with the path to a meas.csv file for the stacked_core 9xx demos
|
||||
to extract higher-level info from them.
|
||||
"""
|
||||
import sys
|
||||
|
Reference in New Issue
Block a user