Skip to content

Commit

Permalink
#11239: Add APIs to read and clear FPU/SFPU special number registers
Browse files Browse the repository at this point in the history
  • Loading branch information
ttmtrajkovic committed Oct 4, 2024
1 parent 47bc7d2 commit 1665150
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions llk_lib/llk_math_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,11 @@ inline void _llk_math_reconfig_data_format_(const std::uint32_t srca_data_format
constexpr uint config_mask = ALU_FORMAT_SPEC_REG0_SrcA_MASK | ALU_FORMAT_SPEC_REG1_SrcB_MASK;
cfg_reg_rmw_tensix<ALU_FORMAT_SPEC_REG0_SrcA_ADDR32, 0, config_mask>(config_data);
}

inline std::uint32_t _llk_math_get_compute_special_value_flags_() {
return reg_read(RISCV_DEBUG_REG_FPU_STICKY_BITS);
}

inline void _llk_math_clear_compute_special_value_flags_() {
reg_write(RISCV_DEBUG_REG_FPU_STICKY_BITS, 0);
}

0 comments on commit 1665150

Please sign in to comment.