diff options
| author | Paul Oliver <contact@pauloliver.dev> | 2025-12-03 22:14:38 +0100 |
|---|---|---|
| committer | Paul Oliver <contact@pauloliver.dev> | 2025-12-08 06:45:59 +0100 |
| commit | 0fb1497a62332e0db45f94b4f195cb37183678cb (patch) | |
| tree | 0926e7c04415e69e7ad5c105f79eb4625ae9145f /arch/salis-v1/arch_vars.py | |
| parent | c7c5925d86fd3e36069ee3689b1c0a1f6df600f9 (diff) | |
Improve SQL handling & aggregate memory events (WIP)data_improvements
Diffstat (limited to 'arch/salis-v1/arch_vars.py')
| -rw-r--r-- | arch/salis-v1/arch_vars.py | 236 |
1 files changed, 121 insertions, 115 deletions
diff --git a/arch/salis-v1/arch_vars.py b/arch/salis-v1/arch_vars.py index f469ad6..25687ce 100644 --- a/arch/salis-v1/arch_vars.py +++ b/arch/salis-v1/arch_vars.py @@ -1,119 +1,125 @@ -mvec_loop = False +def gen_arch_vars(args): + return { + "mvec_loop": False, -# Organisms consist of: -# - instruction pointer -# - seeker pointer -# - main memory block -# - child memory block -# - 4 registers -# - 8 value stack -proc_fields = [ - ("uint64_t", "ip"), - ("uint64_t", "sp"), - ("uint64_t", "mb0a"), - ("uint64_t", "mb0s"), - ("uint64_t", "mb1a"), - ("uint64_t", "mb1s"), - ("uint64_t", "r0x"), - ("uint64_t", "r1x"), - ("uint64_t", "r2x"), - ("uint64_t", "r3x"), - ("uint64_t", "s0"), - ("uint64_t", "s1"), - ("uint64_t", "s2"), - ("uint64_t", "s3"), - ("uint64_t", "s4"), - ("uint64_t", "s5"), - ("uint64_t", "s6"), - ("uint64_t", "s7"), -] + # Organisms consist of: + # - instruction pointer + # - seeker pointer + # - main memory block + # - child memory block + # - 4 registers + # - 8 value stack + "proc_fields": [ + ("uint64_t", "ip"), + ("uint64_t", "sp"), + ("uint64_t", "mb0a"), + ("uint64_t", "mb0s"), + ("uint64_t", "mb1a"), + ("uint64_t", "mb1s"), + ("uint64_t", "r0x"), + ("uint64_t", "r1x"), + ("uint64_t", "r2x"), + ("uint64_t", "r3x"), + ("uint64_t", "s0"), + ("uint64_t", "s1"), + ("uint64_t", "s2"), + ("uint64_t", "s3"), + ("uint64_t", "s4"), + ("uint64_t", "s5"), + ("uint64_t", "s6"), + ("uint64_t", "s7"), + ], -# Salis-v1 instruction set -inst_set = [ - (["noop"], " "), - (["nop0"], "0"), - (["nop1"], "1"), - (["nop2"], "2"), - (["nop3"], "3"), - # ------------- - (["jmpb"], "("), - (["jmpf"], ")"), - (["adrb"], "["), - (["adrf"], "]"), - (["ifnz"], "?"), - # ------------- - (["allb"], "{"), - (["allf"], "}"), - (["bswp"], "%"), - (["bclr"], "|"), - (["splt"], "$"), - # ------------- - (["addn"], "+"), - (["subn"], "-"), - (["muln"], "*"), - (["divn"], "/"), - (["incn"], "^"), - (["decn"], "v"), - (["notn"], "!"), - (["shfl"], "<"), - (["shfr"], ">"), - (["zero"], "z"), - (["unit"], "u"), - # ------------- - (["pshn"], "#"), - (["popn"], "~"), - # ------------- - (["load"], "."), - (["wrte"], ":"), - (["dupl"], "="), - (["swap"], "x"), - # ------------- - (["keya"], "a"), - (["keyb"], "b"), - (["keyc"], "c"), - (["keyd"], "d"), - (["keye"], "e"), - (["keyf"], "f"), - (["keyg"], "g"), - (["keyh"], "h"), - (["keyi"], "i"), - (["keyj"], "j"), - (["keyk"], "k"), - (["keyl"], "l"), - (["keym"], "m"), - (["keyn"], "n"), - (["keyo"], "o"), - (["keyp"], "p"), - # ------------- - (["loka"], "A"), - (["lokb"], "B"), - (["lokc"], "C"), - (["lokd"], "D"), - (["loke"], "E"), - (["lokf"], "F"), - (["lokg"], "G"), - (["lokh"], "H"), - (["loki"], "I"), - (["lokj"], "J"), - (["lokk"], "K"), - (["lokl"], "L"), - (["lokm"], "M"), - (["lokn"], "N"), - (["loko"], "O"), - (["lokp"], "P"), -] + # Salis-v1 instruction set + "inst_set": [ + (["noop"], " "), + (["nop0"], "0"), + (["nop1"], "1"), + (["nop2"], "2"), + (["nop3"], "3"), + # ------------- + (["jmpb"], "("), + (["jmpf"], ")"), + (["adrb"], "["), + (["adrf"], "]"), + (["ifnz"], "?"), + # ------------- + (["allb"], "{"), + (["allf"], "}"), + (["bswp"], "%"), + (["bclr"], "|"), + (["splt"], "$"), + # ------------- + (["addn"], "+"), + (["subn"], "-"), + (["muln"], "*"), + (["divn"], "/"), + (["incn"], "^"), + (["decn"], "v"), + (["notn"], "!"), + (["shfl"], "<"), + (["shfr"], ">"), + (["zero"], "z"), + (["unit"], "u"), + # ------------- + (["pshn"], "#"), + (["popn"], "~"), + # ------------- + (["load"], "."), + (["wrte"], ":"), + (["dupl"], "="), + (["swap"], "x"), + # ------------- + (["keya"], "a"), + (["keyb"], "b"), + (["keyc"], "c"), + (["keyd"], "d"), + (["keye"], "e"), + (["keyf"], "f"), + (["keyg"], "g"), + (["keyh"], "h"), + (["keyi"], "i"), + (["keyj"], "j"), + (["keyk"], "k"), + (["keyl"], "l"), + (["keym"], "m"), + (["keyn"], "n"), + (["keyo"], "o"), + (["keyp"], "p"), + # ------------- + (["loka"], "A"), + (["lokb"], "B"), + (["lokc"], "C"), + (["lokd"], "D"), + (["loke"], "E"), + (["lokf"], "F"), + (["lokg"], "G"), + (["lokh"], "H"), + (["loki"], "I"), + (["lokj"], "J"), + (["lokk"], "K"), + (["lokl"], "L"), + (["lokm"], "M"), + (["lokn"], "N"), + (["loko"], "O"), + (["lokp"], "P"), + ], -inst_count = len(inst_set) + "inst_count": 2 ** 6, -# Extra fields used exclusively for data aggregation -core_fields = [ - ("uint64_t", f"iexe[{inst_count}]"), - ("uint64_t", f"iwrt[{inst_count}]"), - ("uint64_t", "emb0"), - ("uint64_t", "emb1"), - ("uint64_t", "eliv"), - ("uint64_t", "edea"), - ("uint64_t", "wmb0"), - ("uint64_t", "wmb1"), - ("uint64_t", "wdea"), -] + # Extra fields used exclusively for data aggregation + "core_fields": [ + ("uint64_t", f"iexe[{2 ** 6}]", False), + ("uint64_t", f"iwrt[{2 ** 6}]", False), + ("uint64_t", "emb0", True), + ("uint64_t", "emb1", True), + ("uint64_t", "eliv", True), + ("uint64_t", "edea", True), + ("uint64_t", "wmb0", True), + ("uint64_t", "wmb1", True), + ("uint64_t", "wdea", True), + + # Event data aggregators + ("uint64_t", f"aeva[{2 ** args.mvec_pow}]", False), + ], + } |
