3.3.2 ClockTimer

A ClockTimer provides support for counting a number of ticks at the rate determined by the input clock. When the countdown reaches zero, the timer can send a signal to another component. That component can return a value that will cause the timer to start counting down again. Setting up a timer is very efficient, and no host processing time is used while a counter is counting down: when a timer is started, the scheduler precomputes the finish time. To use a ClockTimer connect the ClockTimer's 'timer_callback' port to a slave port that implements the 'signal()' behaviour and connect a clock signal to the clk_in port. Use the 'timer_control' port to start the timer counting down for a given number of ticks. This model is written in C++.

ClockTimer - about

This component provides a mechanism for other components to schedule a callback after a number of ticks at a given ClockSignal rate.

An active ClockTimer component incurs no simulation overhead. For best performance, avoid having your performance-critical code frequently cancel timers or query the number of remaining ticks.

Table 3-64 Ports

Name Protocol Type Description
clk_in ClockSignal Slave Determines the tick rate of the timer.
timer_callback 2.2.3 TimerCallback protocol Master Port on which a signal is sent after the number of scheduled ticks has elapsed.
timer_control 2.2.5 TimerControl protocol Slave Permits the timer to be set, canceled and queried.
Non-ConfidentialPDF file icon PDF version100964_1161_00_en
Copyright © 2014–2019 Arm Limited or its affiliates. All rights reserved.