summaryrefslogtreecommitdiff
path: root/tb
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-11-17 08:54:01 -0600
committerAlejandro Soto <alejandro@34project.org>2022-11-17 09:14:01 -0600
commit0aabf3cb8e11409506bf90d6cd0c1125f3df7c04 (patch)
treeadb55166088cf91aacbe0e3f6e8affffd4bf34c0 /tb
parentf8f03fb60a593e1b8d6877b31cf968cf02e7284c (diff)
Finish simulation
Diffstat (limited to '')
-rw-r--r--tb/sim/descifrador.py5
-rw-r--r--tb/top/conspiracion.cpp2
2 files changed, 5 insertions, 2 deletions
diff --git a/tb/sim/descifrador.py b/tb/sim/descifrador.py
index 0e0fb71..5d81686 100644
--- a/tb/sim/descifrador.py
+++ b/tb/sim/descifrador.py
@@ -1,10 +1,11 @@
+LOG = 'image_processing/log'
FILE = 'image_processing/out_file'
SIZE = 640 * 480 * 4
START = 0x10000
loads = {START: FILE}
consts = {0x30050000: 1, 0x30060000: 0}
-cycles = 10000000
+cycles = 20000000
mem_dumps = [range(START, START + SIZE)]
def final():
@@ -14,3 +15,5 @@ def final():
words.append(int.from_bytes(data, 'little') ^ 0x00ffffff)
assert_mem(START, words)
+ with open(LOG, 'w') as log:
+ print(read_mem(START, SIZE), file=log)
diff --git a/tb/top/conspiracion.cpp b/tb/top/conspiracion.cpp
index c87d09c..984cb58 100644
--- a/tb/top/conspiracion.cpp
+++ b/tb/top/conspiracion.cpp
@@ -411,7 +411,7 @@ int main(int argc, char **argv)
auto word = avl.dump(dump.start + i);
word = (word & 0xff) << 24
| ((word >> 8) & 0xff) << 16
- | ((word >> 16) & 0xff) << 24
+ | ((word >> 16) & 0xff) << 8
| ((word >> 24) & 0xff);
std::printf("%08x", word);