合并bacon_dev分支的修改:1.增加寻找超出指定执行周期的指令;2.删除汇编中不需要的代码;3.增加协议的细节内容

This commit is contained in:
2025-03-03 10:59:07 +08:00
parent 7f123244be
commit c64df6956d
4 changed files with 95 additions and 306 deletions

View File

@@ -8,10 +8,6 @@
.extern exti_isr_flag
.extern mtimer_int_flag
#ifdef __riscv_i
.extern plic_handle
#endif
.globl _prog_start
.section .text.init
@@ -32,7 +28,7 @@ _prog_start:
li x13, 0
li x14, 0
li x15, 0
#ifdef __riscv_i
#if defined(__riscv_i) || defined(__USE_RV32I_ABI)
li x16, 0
li x17, 0
li x18, 0
@@ -56,19 +52,8 @@ _prog_start:
la sp, sys_stack
add sp, sp, t0
#ifdef __riscv_i
la t0, trap_entry
#else
li a0, 0
lui t0, %hi(plic_claim)
lw a1, %lo(plic_claim)(t0)
la a2, exti_isr_flag
call int_svr_code
mv t0, a0 #trap_entry,RV32I
#endif
csrw mtvec, t0
li t0, (1 << 11) //| (1 << 13) //13bitrocc
csrw mie, t0
@@ -81,7 +66,6 @@ _prog_start:
ecall
#ifdef __riscv_i
.balign 32
trap_entry:
#.macro define_const name, value
@@ -90,7 +74,6 @@ trap_entry:
## 使
#define_const CDR_INT_TXEND, 14
opt_trap_entry:
addi sp,sp,136
#sw ra,4(sp)
@@ -166,6 +149,7 @@ exti_isr:
#lw sp,8(sp)
#lw gp,12(sp)
#lw tp,16(sp)
rocc_isr:
//add rocc interrupt here
i_hlm_read_intflag(t0)
@@ -221,4 +205,3 @@ isr_j_table:
j rocc_isr # d jump to unknown_isr
1: j 1b # e jump to unknown_isr
1: j 1b # f jump to unknown_isr
#endif