Commit Graph

6 Commits

Author SHA1 Message Date
Sean Cross 798a0f167e ice40: hardcode ora_ptr
The previous approach of attempting to derive it didn't work.

It turns out that the ora_ptr is 16 * the current offset.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-02-26 15:12:45 +08:00
Sean Cross 89af26047e ice40: rewrite matching heuristic to increase reliability
Instead of looping through a small window, figure out the various bit
positions and offsets.  Then, as we scan through, validate that we've
found the proper offsets.

This should get us to 100% reliability.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-02-26 14:48:05 +08:00
Sean Cross f2ae56a13e ice40: convert tabs to spaces
Signed-off-by: Sean Cross <sean@xobs.io>
2019-02-26 13:02:41 +08:00
Sean Cross ea6c170023 ice40: lower fuzz size to improve patcher reliability
The fuzz size should be made smaller, because we're getting too many false positives.

Signed-off-by: Sean Cross <sean@xobs.io>
2019-02-25 22:16:31 +08:00
Sean Cross d2b4ff089d ice40: convert from dos to unix line endings
Signed-off-by: Sean Cross <sean@xobs.io>
2019-02-25 18:38:53 +08:00
Sean Cross 4ca2218403 ice40: experimental rom patching support
We can now do away with the `iceunpack`/`icebram`/`icepack` dance and
simply patch files on the fly.  This should simplify development,
since you only need two files (the bitstream and the replacement rom),
rather than four files (the bitstream, the replacement rom, the
random contents, and the output file).

Signed-off-by: Sean Cross <sean@xobs.io>
2019-02-25 13:49:38 +08:00