diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-11-17 08:17:04 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-11-17 08:53:38 -0600 |
| commit | 3b62a23705e93f3786402157fc95fd256d850041 (patch) | |
| tree | bccc8e2a835fccaee23804fe2028ee05efa454ae /tb/sim/descifrador.py | |
| parent | 61bf2100fbd5e0a5f4bd1f013d70d8027604bbba (diff) | |
Implement sim test: descifrador
Diffstat (limited to 'tb/sim/descifrador.py')
| -rw-r--r-- | tb/sim/descifrador.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tb/sim/descifrador.py b/tb/sim/descifrador.py index 8fda8b8..2253e6f 100644 --- a/tb/sim/descifrador.py +++ b/tb/sim/descifrador.py @@ -1,2 +1,20 @@ +FILE = 'image_processing/out_file' +SIZE = 640 * 480 * 4 +START = 0x10000 + +loads = {START: FILE} +consts = {0x30050000: 1, 0x30060000: 0} +cycles = 10000000 +mem_dumps = [range(START, START + SIZE)] + def final(): - pass
\ No newline at end of file + words = [] + i = 0 + with open(FILE, 'rb') as file: + while data := file.read(4): + words.append(int.from_bytes(data, 'little') ^ 0x00ffffff) + i += 1 + if i == 10: + break + + assert_mem(START, words) |
