From 3b62a23705e93f3786402157fc95fd256d850041 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Thu, 17 Nov 2022 08:17:04 -0600 Subject: Implement sim test: descifrador --- tb/sim/descifrador.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'tb/sim/descifrador.py') 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) -- cgit v1.2.3