Skip to content
Snippets Groups Projects
Commit 56f2efe4 authored by Yannik Stradmann's avatar Yannik Stradmann
Browse files

Move timing functions to internal memory

The implementation of sleep_cycles has cycle-accurate predictions for
function call overhead. These can only be fulfilled if it never requires
fetching from extmem.

Change-Id: Idc5fe1571c751bfed0889db4906531a073ef2949
parent edfac921
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,9 @@ SPR_GETTER(get_tbl, "mfspr %0, 284") ...@@ -36,7 +36,9 @@ SPR_GETTER(get_tbl, "mfspr %0, 284")
typedef uint64_t time_base_t; typedef uint64_t time_base_t;
ATTRIB_UNUSED static time_base_t get_time_base() { ATTRIB_UNUSED static time_base_t get_time_base() ATTRIB_LINK_TO_INTERNAL;
static time_base_t get_time_base()
{
time_base_t tbu, tbl; time_base_t tbu, tbl;
tbu = get_tbu(); tbu = get_tbu();
tbl = get_tbl(); tbl = get_tbl();
......
...@@ -12,7 +12,7 @@ namespace libnux::vx { ...@@ -12,7 +12,7 @@ namespace libnux::vx {
constexpr static uint32_t default_ppu_cycles_per_us = 250; constexpr static uint32_t default_ppu_cycles_per_us = 250;
void sleep_cycles(uint32_t cycles); void sleep_cycles(uint32_t cycles) ATTRIB_LINK_TO_INTERNAL;
/* /*
Get current absolute time in ppu cycles. Get current absolute time in ppu cycles.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment