memory-onfi applet should use IOB registers to improve reliability
There were some spurious errors while reading ONFI-like NAND with revB, it's unclear if they were caused by FXMAs or something else.
I've did a lot of experimenting and it looks like the spurious errors observed on revB are gone. But I'm still not sure where to attribute the random-ish bit errors. Sure, these could be just the flash unreliability, but I feel like that's not the only reason.
Specifically, I've tried reading out the same 1 GiB flash a few times, then XOR'd them together, then looked at the difference. Mostly, I was interested in whether there are lots of missed pages (no, I think there aren't any?) but I've noticed that the bit errors aren't that random. In fact most of the non-zero XOR'd bytes were 01 or 08... and IO1 and IO4 had the longest wires in my wiring harness. This doesn't look like a coincidence at all.
xor.rs
use std::fs::File;
use std::env::args;
use std::io::prelude::*;
fn main() {
let mut args = args();
args.next().unwrap();
let in1 = args.next().unwrap();
let in2 = args.next().unwrap();
let out = args.next().unwrap();
let mut data1 = Vec::new();
File::open(in1).unwrap().read_to_end(&mut data1).unwrap();
let mut data2 = Vec::new();
File::open(in2).unwrap().read_to_end(&mut data2).unwrap();
let mut datao = Vec::new();
for (x1, x2) in data1.iter().zip(data2.iter()) {
datao.push(x1 ^ x2);
}
let mut fout = File::create(out).unwrap();
fout.write(&mut datao[..]).unwrap();
}