QNICE-FPGA icon indicating copy to clipboard operation
QNICE-FPGA copied to clipboard

Delay function

Open sy2002 opened this issue 3 years ago • 0 comments

  • Add to the Monitor OS a delay function that takes a 32bit value in R8/R9 and that then uses the cycle counter to syncroneously wait the given amount of microseconds. Probably the "misc" library is the right place to add this functionality.

  • The cycle counter is activated by the monitor by default when starting up. So delay can rely on it. In case it is not active and delay is called: Ponder over the question if in such a case the delay function should activate the cycle counter (and deactivsate afterwards) because otherwise delay would wait forever.

  • Make sure to publish this function also for being used in C via qmon.h and the qmon library.

  • Do not use hard coded values for the CPU speed but use the constants that also power SYSINFO

sy2002 avatar Nov 11 '20 09:11 sy2002