增加plic文件,测试仿真

This commit is contained in:
2025-02-10 23:59:35 +08:00
parent be04224806
commit 0dc8c40076
8 changed files with 159 additions and 84 deletions

View File

@@ -6,18 +6,13 @@
#include "system_cfg.h"
#include "halfLvdsMacSvr.h"
#include "sysDef.h"
#include "plic.h"
#ifdef __riscv_i
#define USING_POLL_STRATEGY
#endif
volatile uint32_t *const plic_priority = (uint32_t *)(0xc000000U);
volatile uint32_t *plic_pending_0_31 = (uint32_t*)( 0xc000000U + 0X001000 );
volatile uint32_t *plic_enable_0_31 = (uint32_t*)( 0xc000000U + 0X002000 );
volatile uint32_t *plic_threshold_0 = (uint32_t*)( 0xc000000U + 0X200000 );
volatile uint32_t *plic_claim = (uint32_t*)( 0xc000000U + 0X200004 );
static void error();
static uint32_t init_plic(void);
@@ -76,8 +71,8 @@ uint32_t init_plic(void)
//| 1 << CDR_INT_TX0_FIFO_DEQ
//| 1 << CDR_INT_TX1_FIFO_DEQ
| 1 << CDR_INT_RX0_FIFO_ENQ
| 1 << CDR_INT_RX1_FIFO_ENQ
//| 1 << CDR_INT_RX0_FIFO_ENQ
//| 1 << CDR_INT_RX1_FIFO_ENQ
;
plic_priority[CDR_INT_TX0END] = 1;