RTEMS: bsps/m68k/mvme167/btimer/btimer.c File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Macros | Functions | Variables
btimer.c File Reference
`#include <rtems.h>`
`#include <rtems/btimer.h>`
`#include <bsp.h>`

## Macros
#define | TICK_INTERVAL 10000UL /* T1's countdown constant (10 ms) */
#define | TIMER_INT_LEVEL 6 /* T1's interrupt level */
#define | TIMER_VECTOR (VBR0 * 0x10 + 0x8) /* T1 is vector $X8 (p. 2-71)*/
#define | AVG_OVERHEAD 3UL /* It typically takes 3.0 microseconds */
#define | LEAST_VALID 3UL /* Don't trust a value lower than this */

## Functions
rtems_isr | timerisr (rtems_vector_number)
void | benchmark_timer_initialize (void)
| Initialize the Benchmark Timer.
benchmark_timer_t | benchmark_timer_read (void)
| Read the Benchmark Timer.
void | benchmark_timer_disable_subtracting_average_overhead (bool find_flag)
| Disable Average Overhead Removal from the Benchmark Timer.

## Variables
uint32_t | Ttimer_val
bool | benchmark_timer_find_average_overhead

## Detailed Description

This file manages the benchmark timer used by the RTEMS Timing Test Suite. Each measured time period is demarcated by calls to benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns the number of microseconds since benchmark_timer_initialize() exitted.

These functions are prototyped in rtems/btimer.h and must be implemented as part of the BSP.

This port does not allow the application to select which timer on the MVME167 to use for the timer, nor does it allow the application to configure the timer. The timer uses the VMEchip2 Tick Timer #1. This timer is distinct from the clock, which uses Tick Timer #2 in the VMEchip2.

All page references are to the MVME166/MVME167/MVME187 Single Board Computer Programmer's Reference Guide (MVME187PG/D2) with the April 1993 supplements/addenda (MVME187PG/D2A1).

## Function Documentation

## ◆ benchmark_timer_disable_subtracting_average_overhead()

void benchmark_timer_disable_subtracting_average_overhead | ( | bool | find_flag | ) |

Disable Average Overhead Removal from the Benchmark Timer.

This method places the benchmark timer in a "raw" mode where it returns the actual number of units which have passed between calls to benchmark_timer_initialize and benchmark_timer_read counting.

Parameters

  [in] | find_flag | indicates to enable or disable the mode

## ◆ benchmark_timer_initialize()

void benchmark_timer_initialize | ( | void |  | ) |

Initialize the Benchmark Timer.

This method initializes the benchmark timer and resets it to begin counting.

## ◆ benchmark_timer_read()

benchmark_timer_t benchmark_timer_read | ( | void |  | ) |

Read the Benchmark Timer.

This method stops the benchmark timer and returns the number of units that have passed since benchmark_timer_initialize was invoked.

Returns
  This method returns the number of units with the average overhead removed. If the value is below the minimum trusted value, zero is returned.