主从联合仿真开始

This commit is contained in:
RuigeLee
2024-10-29 17:32:17 +08:00
parent ff4508ec35
commit 332fcf010d
6 changed files with 253 additions and 79 deletions

View File

@@ -9,11 +9,12 @@
_prog_start:
li x15, 0
li sp, 0
picorv32_maskirq_insn(zero, zero)
call main
li gp, 1;
ecall
@@ -26,8 +27,36 @@ trap_entry:
# q Without the q-registers, the irq return address will be stored in x3 (gp) and the IRQ bitmask in x4 (tp),
addi x15, x4, 0
# addi x15, x4, 0
# io.interrupt(0) := intTxError
# io.interrupt(1) := intTxFifoFull
# io.interrupt(2) := intTxFinish
# io.interrupt(3) := intRxError
# io.interrupt(4) := intRxValid
# io.interrupt(5) := intTxError
# io.interrupt(6) := intTxFifoFull
# io.interrupt(7) := intTxFinish
# io.interrupt(8) := intRxError
# io.interrupt(9) := intRxValid
# andi ra, x4, 0x02
# bnez ra, 1f
# addi, sp, sp, 2048
1:
andi ra, x4, 0x10
bnez ra, 2f
addi sp, sp, 1
2:
# andi ra, x4, 0x40
# bnez ra, 3f
# addi, sp, sp, 2048
3:
andi ra, x4, 0x200
bnez ra, 4f
addi sp, sp, 1
4:
picorv32_retirq_insn()