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

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [lib/] [source/] [neorv32_rte.c] - Diff between revs 52 and 53

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

Rev 52 Rev 53
Line 53... Line 53...
static void __neorv32_rte_print_true_false(int state) __attribute__((unused));
static void __neorv32_rte_print_true_false(int state) __attribute__((unused));
static void __neorv32_rte_print_hex_word(uint32_t num);
static void __neorv32_rte_print_hex_word(uint32_t num);
 
 
 
 
/**********************************************************************//**
/**********************************************************************//**
 * Floating-Point extension notifier.
 
 **************************************************************************/
 
#ifdef __riscv_flen
 
  #warning Floating-point extension <F> is WORK-IN-PROGRESS and NOT FULLY OPERATIONAL yet!
 
#endif
 
 
 
 
 
/**********************************************************************//**
 
 * Setup NEORV32 runtime environment.
 * Setup NEORV32 runtime environment.
 *
 *
 * @note This function installs a debug handler for ALL exception and interrupt sources, which
 * @note This function installs a debug handler for ALL exception and interrupt sources, which
 * gives detailed information about the exception/interrupt. Actual handler can be installed afterwards
 * gives detailed information about the exception/interrupt. Actual handler can be installed afterwards
 * via neorv32_rte_exception_install(uint8_t id, void (*handler)(void)).
 * via neorv32_rte_exception_install(uint8_t id, void (*handler)(void)).
Line 353... Line 345...
    neorv32_uart_printf("Zbb ");
    neorv32_uart_printf("Zbb ");
  }
  }
  if (tmp & (1<<CSR_MZEXT_ZBS)) {
  if (tmp & (1<<CSR_MZEXT_ZBS)) {
    neorv32_uart_printf("Zbs ");
    neorv32_uart_printf("Zbs ");
  }
  }
 
  if (tmp & (1<<CSR_MZEXT_ZBA)) {
 
    neorv32_uart_printf("Zba ");
 
  }
 
  if (tmp & (1<<CSR_MZEXT_ZFINX)) {
 
    neorv32_uart_printf("Zfinx ");
 
  }
 
 
  // check physical memory protection
  // check physical memory protection
  neorv32_uart_printf("\nPMP:               ");
  neorv32_uart_printf("\nPMP:               ");
  uint32_t pmp_num_regions = neorv32_cpu_pmp_get_num_regions();
  uint32_t pmp_num_regions = neorv32_cpu_pmp_get_num_regions();
  if (pmp_num_regions != 0)  {
  if (pmp_num_regions != 0)  {
Line 645... Line 643...
 **************************************************************************/
 **************************************************************************/
uint32_t neorv32_rte_get_compiler_isa(void) {
uint32_t neorv32_rte_get_compiler_isa(void) {
 
 
  uint32_t misa_cc = 0;
  uint32_t misa_cc = 0;
 
 
#ifdef __riscv_atomic
#if defined __riscv_atomic || defined __riscv_a
  misa_cc |= 1 << CSR_MISA_A_EXT;
  misa_cc |= 1 << CSR_MISA_A_EXT;
#endif
#endif
 
 
#ifdef __riscv_compressed
#ifdef __riscv_b
 
  misa_cc |= 1 << CSR_MISA_B_EXT;
 
#endif
 
 
 
#if defined __riscv_compressed || defined __riscv_c
  misa_cc |= 1 << CSR_MISA_C_EXT;
  misa_cc |= 1 << CSR_MISA_C_EXT;
#endif
#endif
 
 
#if (__riscv_flen == 64)
#if (__riscv_flen == 64) || defined __riscv_d
  misa_cc |= 1 << CSR_MISA_D_EXT;
  misa_cc |= 1 << CSR_MISA_D_EXT;
#endif
#endif
 
 
#ifdef __riscv_32e
#ifdef __riscv_32e
  misa_cc |= 1 << CSR_MISA_E_EXT;
  misa_cc |= 1 << CSR_MISA_E_EXT;
#else
#else
  misa_cc |= 1 << CSR_MISA_I_EXT;
  misa_cc |= 1 << CSR_MISA_I_EXT;
#endif
#endif
 
 
#if (__riscv_flen == 32)
#if (__riscv_flen == 32) || defined __riscv_f
  misa_cc |= 1 << CSR_MISA_F_EXT;
  misa_cc |= 1 << CSR_MISA_F_EXT;
#endif
#endif
 
 
#ifdef __riscv_mul
#if defined __riscv_mul || defined __riscv_m
  misa_cc |= 1 << CSR_MISA_M_EXT;
  misa_cc |= 1 << CSR_MISA_M_EXT;
#endif
#endif
 
 
#if (__riscv_xlen == 32)
#if (__riscv_xlen == 32)
  misa_cc |= 1 << CSR_MISA_MXL_LO_EXT;
  misa_cc |= 1 << CSR_MISA_MXL_LO_EXT;

powered by: WebSVN 2.1.0

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