分别采用中断、查询方式优化转发时间,上传备份代码,通过控制Makefile脚本里的APP_MARCH、MABI的rv32i和rv32e来控制C语言和asm优化

This commit is contained in:
2025-02-12 15:58:50 +08:00
parent 0aa00781e5
commit d87c2dacf0
10 changed files with 181 additions and 323 deletions

View File

@@ -8,12 +8,6 @@
#include "sysDef.h"
#include "plic.h"
#ifdef __riscv_i
#define USING_POLL_STRATEGY
#endif
static void error();
static uint32_t init_plic(void);
@@ -33,15 +27,9 @@ void main()
//tx1 上行
//rx0 下行
//rx1 上行
#ifdef USING_POLL_STRATEGY
//使用查询策略 POLL_STRATEGY 操作 half lvds mac
HLM_poll(WORKMODE_SLAVE);
#else
//使用中断策略操作half lvds mac
HLM_work_with_isr(WORKMODE_SLAVE);
#endif
while (1);
}