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

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [example/] [floating_point_test/] [main.c] - Diff between revs 60 and 62

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

Rev 60 Rev 62
Line 146... Line 146...
  neorv32_uart_printf("SILENT_MODE enabled (only showing actual errors)\n");
  neorv32_uart_printf("SILENT_MODE enabled (only showing actual errors)\n");
#endif
#endif
  neorv32_uart_printf("Test cases per instruction: %u\n", (uint32_t)NUM_TEST_CASES);
  neorv32_uart_printf("Test cases per instruction: %u\n", (uint32_t)NUM_TEST_CASES);
  neorv32_uart_printf("NOTE: The NEORV32 FPU does not support subnormal numbers yet. Subnormal numbers are flushed to zero.\n\n");
  neorv32_uart_printf("NOTE: The NEORV32 FPU does not support subnormal numbers yet. Subnormal numbers are flushed to zero.\n\n");
 
 
 
  // enable FPU extension
 
  uint32_t mstatus = neorv32_cpu_csr_read(CSR_MSTATUS);
 
  mstatus |= 1 << CSR_MSTATUS_FS_L; // state = initial
 
  neorv32_cpu_csr_write(CSR_MSTATUS, mstatus);
 
 
  // clear exception status word
  // clear exception status word
  neorv32_cpu_csr_write(CSR_FFLAGS, 0);; // real hardware
  neorv32_cpu_csr_write(CSR_FFLAGS, 0); // real hardware
  feclearexcept(FE_ALL_EXCEPT); // software runtime (GCC floating-point emulation)
  feclearexcept(FE_ALL_EXCEPT); // software runtime (GCC floating-point emulation)
 
 
 
 
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// Conversion Tests
// Conversion Tests

powered by: WebSVN 2.1.0

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