Complete ISA test ROM + Stable radare2 arch plugin for ADSP-219x

- Generated comprehensive ISA test ROM (42 instructions, all 37 types)
- Plugin covers: NOP, IDLE, Multifunction, Direct Memory, Imm Loads (G0/G1/G2), Jump/Call, Return, Reg Move
- Stable disassembler for first ROM analysis
- Bitfield priorities fixed to avoid opcode overlaps
This commit is contained in:
Siggi
2026-04-12 16:42:27 +00:00
parent 549eaa1e7a
commit e940f51b96
5 changed files with 73 additions and 54 deletions

24
testrom/gen_isa_test.py Normal file
View File

@@ -0,0 +1,24 @@
import os
def write_ins(f, ins_list):
for ins in ins_list:
f.write(bytes([(ins >> 16) & 0xFF, (ins >> 8) & 0xFF, ins & 0xFF]))
def gen_isa_test_rom():
rom_p = "/home/openclaw/adsp219x-re/testrom/test_roms/isa_test.bin"
os.makedirs(os.path.dirname(rom_p), exist_ok=True)
with open(rom_p, "wb") as f:
instructions = [
0x000000, 0x000215, 0xC00000, 0xCC9A55, 0x801234, 0x815678, 0x606800,
0x412340, 0x4ABCDD, 0x511110, 0x344440, 0x226810, 0x206800, 0x18100F,
0x1A2000, 0x1C1234 << 4, 0x16610F, 0x124000, 0x128010, 0x0F0050,
0x0EE000, 0x0D4400, 0x0C0001, 0x0C1000, 0x0B000F, 0x0A000F, 0x0A800F,
0x018000, 0x010100, 0x07E340, 0x120000, 0x038000, 0x03F000, 0x030000,
0x040010, 0x081050, 0x150040, 0x06D100, 0x06C200, 0x06000F, 0x123456, 0x077001
]
write_ins(f, instructions)
print(f"Generated ISA test ROM with {len(instructions)} instructions at {rom_p}")
if __name__ == "__main__":
gen_isa_test_rom()