Main Page | Alphabetical List | Class List | File List | Class Members | File Members

confreg.h File Reference

Access to apeNEXT run-time clock counters. More...

#include <nlibc.h>
#include <inttypes.h>
#include <confregs.h>

Include dependency graph for confreg.h:

Include dependency graph

Go to the source code of this file.

Classes

struct  clockcnt_t

Functions

void cc_get (clockcnt_t *cnt)
void cc_reset ()
unsigned cc_clk (const clockcnt_t *cnt)
unsigned cc_run (const clockcnt_t *cnt)
unsigned cc_qwait (const clockcnt_t *cnt)
unsigned cc_nbusy (const clockcnt_t *cnt)
uint64_t cc_mbusy (const clockcnt_t *cnt)
uint64_t cc_mwait (const clockcnt_t *cnt)

Variables

clockcnt_t __cc_ref = { 0, 0, 0, 0 }


Detailed Description

Access to apeNEXT run-time clock counters.

NOTE
The number of clock ticks per second can be obtained using
 sysconf(_SC_CLK_TCK);
VERSION
Id
confreg.h,v 1.3 2005/10/28 12:28:31 pleiter Exp

Definition in file confreg.h.


Function Documentation

unsigned cc_clk const clockcnt_t cnt  )  [inline]
 

NAME
cc_clk - returns the clock counter
SYNOPSIS
#include <sys/confreg.h>

uint64_t cc_clk(const clockcnt_t* cnt)
DESCRIPTION
The cc_clk() function takes a argument of type clockcnt_t and returns the number of clock ticks during which the processor was not in I2C mode.
RETURN VALUE
Returns the value described.

Definition at line 125 of file confreg.h.

References __cc_ref, clockcnt_t::clkcnt, and vector::lo.

void cc_get clockcnt_t cnt  )  [inline]
 

NAME
cc_get - reads the clock counters
SYNOPSIS
#include <sys/confreg.h>

void cc_get(clockcnt_t*)
DESCRIPTION
The cc_get() function reads the clock counters from the configuration registers CrClkCnt, CrRunCnt, CrComStr and CrMemStr.

Definition at line 59 of file confreg.h.

References clockcnt_t::clkcnt, clockcnt_t::comstr, clockcnt_t::memstr, NULL, and clockcnt_t::runcnt.

uint64_t cc_mbusy const clockcnt_t cnt  )  [inline]
 

NAME
cc_mbusy - returns the memory busy counter
SYNOPSIS
#include <sys/confreg.h>

uint64_t cc_mbusy(const clockcnt_t* cnt)
DESCRIPTION
The cc_mbusy() function takes a argument of type clockcnt_t and returns the number of clock ticks during which the processor was blocked due to interfering memory accesses.
RETURN VALUE
Returns the value described.

Definition at line 255 of file confreg.h.

References __cc_ref, clockcnt_t::memstr, and uint64_t.

uint64_t cc_mwait const clockcnt_t cnt  )  [inline]
 

NAME
cc_mwait - returns the memory wait counter
SYNOPSIS
#include <sys/confreg.h>

uint64_t cc_mwait(const clockcnt_t* cnt)
DESCRIPTION
The cc_mwait() function takes a argument of type clockcnt_t and returns the number of clock ticks during which the processor was waiting for data to arrive from memory
RETURN VALUE
Returns the value described.

Definition at line 288 of file confreg.h.

References __cc_ref, clockcnt_t::memstr, and uint64_t.

unsigned cc_nbusy const clockcnt_t cnt  )  [inline]
 

NAME
cc_nbusy - returns the network busy counter
SYNOPSIS
#include <sys/confreg.h>

uint64_t cc_nbusy(const clockcnt_t* cnt)
DESCRIPTION
The cc_nbusy() function takes a argument of type clockcnt_t and returns the number of clock ticks during which the processor was waiting for data transmission to become possible.
RETURN VALUE
Returns the value described.

Definition at line 222 of file confreg.h.

References __cc_ref, and clockcnt_t::comstr.

unsigned cc_qwait const clockcnt_t cnt  )  [inline]
 

NAME
cc_qwait - return queue wait counter
SYNOPSIS
#include <sys/confreg.h>

uint64_t cc_qwait(const clockcnt_t* cnt)
DESCRIPTION
The cc_qwait() function takes a argument of type clockcnt_t and returns the number of clock ticks during which the processor was waiting for data to arrive in the data prefetch queue.
RETURN VALUE
Returns the value described.

Definition at line 189 of file confreg.h.

References __cc_ref, and clockcnt_t::comstr.

void cc_reset  )  [inline]
 

NAME
cc_reset - resets all clock counters
SYNOPSIS
#include <sys/confreg.h>

void cc_reset()
DESCRIPTION
The cc_reset() function resets the reference counters.

Definition at line 90 of file confreg.h.

References __cc_ref, clockcnt_t::clkcnt, clockcnt_t::comstr, clockcnt_t::memstr, and clockcnt_t::runcnt.

unsigned cc_run const clockcnt_t cnt  )  [inline]
 

NAME
cc_run - returns the run counter
SYNOPSIS
#include <sys/confreg.h>

uint64_t cc_run(const clockcnt_t* cnt)
DESCRIPTION
The cc_run() function takes a argument of type clockcnt_t and returns the number of clock ticks during which the processor was neither in I2C mode nor stalled (or stretching).
RETURN VALUE
Returns the value described.

Definition at line 157 of file confreg.h.

References __cc_ref, vector::lo, and clockcnt_t::runcnt.


Variable Documentation

clockcnt_t __cc_ref = { 0, 0, 0, 0 }
 

Define reference counter

Definition at line 40 of file confreg.h.

Referenced by cc_clk(), cc_mbusy(), cc_mwait(), cc_nbusy(), cc_qwait(), cc_reset(), and cc_run().


Generated on Fri Jul 14 10:51:37 2006 for nlibc by doxygen 1.3.5