yanchicao-yiwei-slt
This commit is contained in:
33
scripts/single-node/mips32_test.resc
Normal file
33
scripts/single-node/mips32_test.resc
Normal file
@@ -0,0 +1,33 @@
|
||||
: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
|
||||
Reference in New Issue
Block a user