29.11.2014 Views

Fast Models Reference Manual - ARM Information Center

Fast Models Reference Manual - ARM Information Center

Fast Models Reference Manual - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Signaling and Clocking Protocols<br />

Verification and testing<br />

Validation of the ClockTimer component consisted of booting operating systems and VE test<br />

suites on a VE model that contained a ClockTimer component.<br />

Performance<br />

An active ClockTimer component incurs no simulation overhead. For best performance, avoid<br />

having your performance-critical code frequently cancel timers or query the number of<br />

remaining ticks.<br />

Library dependencies<br />

The ClockTimer component has no dependencies on external libraries.<br />

3.3.4 ClockTimer64 component<br />

The ClockTimer component provides a mechanism for other components to schedule a callback<br />

after a number of ticks at a given ClockSignal rate.<br />

Figure 3-3 on page 3-6 shows a view of the component in System Canvas.<br />

This component is written in C++.<br />

Figure 3-4 ClockTimer64 in System Canvas<br />

Ports<br />

Table 3-4 on page 3-7 provides a brief description of the ClockTimer component ports.<br />

Name Port protocol Type Description<br />

Table 3-5 ClockTimer ports<br />

timer_callback TimerCallback64 master port on which a signal is sent after the<br />

number of scheduled ticks has elapsed<br />

timer_control TimerControl64 slave allows the timer to be set, canceled and<br />

queried<br />

clk_in ClockSignal slave determines the tick rate of the timer<br />

TimerControl64 protocol<br />

The TimerControl protocol is used to control the actions of a ClockTimer component. It allows<br />

a timer to be set to schedule a callback after a given number of ticks at the rate of the clock input.<br />

If a timer is set while it is counting starts counting the new number of ticks without sending the<br />

original callback. Cancelling a timer when it is not active has no effect.<br />

The TimerControl protocol has the following behaviors:<br />

set(uint64_t ticks) : void<br />

sets the timer to countdown the given number of ticks<br />

<strong>ARM</strong> DUI 0423J Copyright © 2008-2011 <strong>ARM</strong>. All rights reserved. 3-8<br />

ID051811<br />

Non-Confidential

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!