TT Zephyr Platforms 18.11.99
Tenstorrent Firmware
Loading...
Searching...
No Matches
timer.h File Reference
#include <stdint.h>

Go to the source code of this file.

Macros

#define NS_PER_REFCLK   20
#define REFCLK_F_MHZ   50
#define WAIT_1US   50 /* For 50 MHZ REFCLK (20 ns period) */
#define WAIT_100NS   5 /* For 50 MHZ REFCLK (20 ns period) */
#define WAIT_1MS   (1000 * WAIT_1US) /* For 50MHz REFCLK (20ns period) */
#define WAIT_20NS   1 /* For 50 MHz REFCLK */

Functions

uint64_t TimerTimestamp (void)
void Wait (uint32_t cycles)
static uint32_t TimerGetCyclesForNsTime (uint32_t ns)
static void WaitNs (uint32_t ns)
static void WaitUs (uint32_t us)
static void WaitMs (uint32_t ms)

Macro Definition Documentation

◆ NS_PER_REFCLK

#define NS_PER_REFCLK   20

◆ REFCLK_F_MHZ

#define REFCLK_F_MHZ   50

◆ WAIT_100NS

#define WAIT_100NS   5 /* For 50 MHZ REFCLK (20 ns period) */

◆ WAIT_1MS

#define WAIT_1MS   (1000 * WAIT_1US) /* For 50MHz REFCLK (20ns period) */

◆ WAIT_1US

#define WAIT_1US   50 /* For 50 MHZ REFCLK (20 ns period) */

◆ WAIT_20NS

#define WAIT_20NS   1 /* For 50 MHz REFCLK */

Function Documentation

◆ TimerGetCyclesForNsTime()

uint32_t TimerGetCyclesForNsTime ( uint32_t ns)
inlinestatic

◆ TimerTimestamp()

uint64_t TimerTimestamp ( void )

◆ Wait()

void Wait ( uint32_t cycles)

◆ WaitMs()

void WaitMs ( uint32_t ms)
inlinestatic

◆ WaitNs()

void WaitNs ( uint32_t ns)
inlinestatic

◆ WaitUs()

void WaitUs ( uint32_t us)
inlinestatic