mirror of
https://github.com/saymrwulf/pulp-runtime.git
synced 2026-07-23 19:32:26 +00:00
Ibex cleanup
This commit is contained in:
parent
c3cfcb45e4
commit
a3f57b07d3
4 changed files with 3 additions and 9 deletions
|
|
@ -50,7 +50,7 @@
|
|||
#define archi_read(add) (*(volatile unsigned int *)(long)(add))
|
||||
|
||||
|
||||
#if defined(__riscv__) && !defined(__LLVM__) && !defined(RV_ISA_RV32) && !defined(PLP_NO_BUILTIN)
|
||||
#if defined(__riscv__) && !defined(__LLVM__) && !defined(RV_ISA_RV32)
|
||||
#define ARCHI_WRITE_VOL(base, offset, value) __builtin_pulp_write_base_off_v((value), (base), (offset))
|
||||
#define ARCHI_WRITE(base, offset, value) __builtin_pulp_OffsetedWrite((value), (int *)(base), (offset))
|
||||
#define ARCHI_READ(base, offset) __builtin_pulp_OffsetedRead((int *)(base), (offset))
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
static inline unsigned int evt_read32(unsigned int base, unsigned int offset)
|
||||
{
|
||||
unsigned int value;
|
||||
#if !defined(__LLVM__) && ((defined(OR1K_VERSION) && OR1K_VERSION >= 5) || (defined(RISCV_VERSION) && RISCV_VERSION >= 4)) && !defined(PLP_NO_BUILTIN)
|
||||
#if !defined(__LLVM__) && ((defined(OR1K_VERSION) && OR1K_VERSION >= 5) || (defined(RISCV_VERSION) && RISCV_VERSION >= 4)) && !defined(RV_ISA_RV32)
|
||||
value = __builtin_pulp_event_unit_read((int *)base, offset);
|
||||
#else
|
||||
__asm__ __volatile__ ("" : : : "memory");
|
||||
|
|
|
|||
|
|
@ -25,13 +25,7 @@
|
|||
|
||||
#define CSR_PCMR_ACTIVE 0x1
|
||||
|
||||
#ifdef __ibex__
|
||||
// For PULP, ibex added non-standard irqs to allow for 32 fast interrupts.
|
||||
// These use custom CSRs: MIE: 0x7D0, MTVEC: 0x7D1, MIP: 0x7D2
|
||||
#define SR_MTVEC 0x7D1
|
||||
#else
|
||||
#define SR_MTVEC 0x305
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
ifdef USE_IBEX
|
||||
PULP_LDFLAGS +=
|
||||
PULP_CFLAGS += -D__ibex__ -U__riscv__ -UARCHI_CORE_HAS_PULPV2 -DPLP_NO_BUILTIN -UCORE_PULP_BUILTINS -DRV_ISA_RV32
|
||||
PULP_CFLAGS += -D__ibex__ -U__riscv__ -UARCHI_CORE_HAS_PULPV2 -DRV_ISA_RV32
|
||||
PULP_ARCH_CFLAGS ?= -march=rv32imc
|
||||
PULP_ARCH_LDFLAGS ?= -march=rv32imc
|
||||
PULP_ARCH_OBJDFLAGS ?= -Mmarch=rv32imc
|
||||
|
|
|
|||
Loading…
Reference in a new issue