Files
simulation_core/scripts/single-node/mips32_test.resc

34 lines
594 B
Plaintext
Raw Normal View History

2026-03-13 13:54:49 +08:00
:name: MIPS32 Test
:description: MIPS32 CPU基础测试脚本
$name?="MIPS32-Test"
using sysbus
mach create $name
# 加载平台描述文件
machine LoadPlatformDescription @platforms/cpus/mips32_simple.repl
# 显示UART分析器
showAnalyzer uart
# 设置CPU寄存器初始值用于测试
macro reset
"""
# 设置PC到内存起始地址
cpu PC 0x80000000
# 设置栈指针
cpu SP 0x8FFFFFFF
# 显示寄存器状态
cpu IsHalted false
"""
runMacro $reset
# 可以在这里手动设置寄存器值进行测试
# 例如:
# cpu A0 0x12345678
# cpu V0 0xABCDEF00