From 95fd6ae836ab5fee7387f4df46b727165a05b723 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 25 Jun 2026 04:42:23 +0200 Subject: Adds v1 unit tests and fixes bugs found by them --- arch/v1/vars.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'arch/v1/vars.py') diff --git a/arch/v1/vars.py b/arch/v1/vars.py index 4eac4e7..3eb0880 100644 --- a/arch/v1/vars.py +++ b/arch/v1/vars.py @@ -1,3 +1,12 @@ +# index +# [section] instruction set +# [section] core data fields +# [section] other fields +# [section] process fields + +# ------------------------------------------------------------------------------ +# [section] instruction set +# ------------------------------------------------------------------------------ inst_set = [ (["noop"], " "), (["nop0"], "0"), @@ -65,6 +74,9 @@ inst_set = [ (["lokp"], "P"), ] +# ------------------------------------------------------------------------------ +# [section] core data fields +# ------------------------------------------------------------------------------ core_data_fields = [ ("uint64_t", f"ipop[{len(inst_set)}]"), # instruction population counter ("uint64_t", f"iexe[{len(inst_set)}]"), # instruction execution counter @@ -75,9 +87,17 @@ core_data_fields = [ ("uint64_t", f"weva[{2 ** globals()["args"].mvec_pow}]"), # write events array ("uint64_t", f"xeva[{2 ** globals()["args"].mvec_pow}]"), # memory block swap events array ] + +# ------------------------------------------------------------------------------ +# [section] other fields +# ------------------------------------------------------------------------------ core_fields = [] muta_flip = False mvec_loop = False + +# ------------------------------------------------------------------------------ +# [section] process fields +# ------------------------------------------------------------------------------ proc_fields = [ ("uint64_t", "ip"), ("uint64_t", "sp"), -- cgit v1.2.1