增加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

39
tb/sw/src/plic.h Normal file
View File

@@ -0,0 +1,39 @@
#ifndef __PLIC_H__
#define __PLIC_H__
#define PLIC_BASE (0xc000000U)
#define PLIC_PRIORITY (0U)
#define PLIC_PENDING_0_31 (0X001000U)
#define PLIC_ENABLE_0_31 (0X002000U)
#define PLIC_THRESHOLD_0 (0X200000U)
#define PLIC_CLAIM (0X200004U)
#define CDR_INT_TX0END 14U
#define CDR_INT_TX1END 15U
#define CDR_INT_RX0ERROR 16U
#define CDR_INT_RX1ERROR 17U
#define CDR_INT_RX0START 18U
#define CDR_INT_RX1START 19U
#define CDR_INT_RX0END 20U
#define CDR_INT_RX1END 21U
#define CDR_INT_TX0_FIFO_DEQ 22U
#define CDR_INT_TX1_FIFO_DEQ 23U
#define CDR_INT_RX0_FIFO_ENQ 24U
#define CDR_INT_RX1_FIFO_ENQ 25U
#ifndef __ASSEMBLER__
#include "stdint.h"
extern volatile uint32_t *const plic_priority;
extern volatile uint32_t *const plic_pending_0_31;
extern volatile uint32_t *const plic_enable_0_31;
extern volatile uint32_t *const plic_threshold_0;
extern volatile uint32_t *const plic_claim;
#endif
#endif