OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [lib/] [include/] [neorv32_cpu.h] - Diff between revs 65 and 68

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 65 Rev 68
Line 271... Line 271...
 * Enable global CPU interrupts (via MIE flag in mstatus CSR).
 * Enable global CPU interrupts (via MIE flag in mstatus CSR).
 **************************************************************************/
 **************************************************************************/
inline void __attribute__ ((always_inline)) neorv32_cpu_eint(void) {
inline void __attribute__ ((always_inline)) neorv32_cpu_eint(void) {
 
 
  asm volatile ("csrrsi zero, mstatus, %0" : : "i" (1 << CSR_MSTATUS_MIE));
  asm volatile ("csrrsi zero, mstatus, %0" : : "i" (1 << CSR_MSTATUS_MIE));
  asm volatile ("nop");
 
  asm volatile ("nop");
 
}
}
 
 
 
 
/**********************************************************************//**
/**********************************************************************//**
 * Disable global CPU interrupts (via MIE flag in mstatus CSR).
 * Disable global CPU interrupts (via MIE flag in mstatus CSR).
 **************************************************************************/
 **************************************************************************/
inline void __attribute__ ((always_inline)) neorv32_cpu_dint(void) {
inline void __attribute__ ((always_inline)) neorv32_cpu_dint(void) {
 
 
  asm volatile ("csrrci zero, mstatus, %0" : : "i" (1 << CSR_MSTATUS_MIE));
  asm volatile ("csrrci zero, mstatus, %0" : : "i" (1 << CSR_MSTATUS_MIE));
  asm volatile ("nop");
 
  asm volatile ("nop");
 
}
}
 
 
 
 
/**********************************************************************//**
/**********************************************************************//**
 * Trigger breakpoint exception (via EBREAK instruction).
 * Trigger breakpoint exception (via EBREAK instruction).

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.