Skip to content

Commit

Permalink
[fp test] setup FPU csrs
Browse files Browse the repository at this point in the history
  • Loading branch information
stnolting committed Jul 8, 2024
1 parent 6e33e9c commit 0d56011
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sw/example/floating_point_test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ int main() {
// ----------------------------------------------------------------------------
// Initialize FPU hardware
// ----------------------------------------------------------------------------
neorv32_cpu_csr_write(CSR_FCSR, 0); // clear exception flags and set "round to nearest"
neorv32_cpu_csr_write(CSR_FFLAGS, 0); // clear exception flags
neorv32_cpu_csr_write(CSR_FRM, 0b000); // set dynamic rounding mode "round to nearest, ties to even"


// ----------------------------------------------------------------------------
Expand Down

0 comments on commit 0d56011

Please sign in to comment.