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

Subversion Repositories neorv32

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

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

Rev 53 Rev 55
Line 682... Line 682...
  num_hpm_cnts += neorv32_cpu_csr_read(CSR_MHPMCOUNTER29);
  num_hpm_cnts += neorv32_cpu_csr_read(CSR_MHPMCOUNTER29);
 
 
  return num_hpm_cnts;
  return num_hpm_cnts;
}
}
 
 
 No newline at end of file
 No newline at end of file
 
 
 
/**********************************************************************//**
 
 * Check if certain Z* extension is available
 
 *
 
 * @param[in] flag Index of the Z-extension to check from #NEORV32_CSR_MZEXT_enum
 
 * @return 0 if extension is NOT available, != 0 if extension is available.
 
 **************************************************************************/
 
int neorv32_check_zextension(uint32_t flag) {
 
 
 
  // check if out of range
 
  if (flag > 31) {
 
    return 0;
 
  }
 
 
 
  uint32_t tmp = neorv32_cpu_csr_read(CSR_MZEXT);
 
  if ((tmp & (1 << flag)) == 0) {
 
    return 0;
 
  }
 
  else {
 
    return 1;
 
  }
 
}
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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