3.3.2. ClockDivider component

The ClockDivider component uses a configurable ratio to convert the ClockSignal rate at its input to a new ClockSignal rate at its output. Changes to the input rate or ratio take effect immediately and clocking components dependent on the output rate continue counting at the new rate.

For examples of the use of ClockDividers, see the VEMotherBoard.lisa component in the %PVLIB_HOME%\examples\FVP_VE\LISA directory of your Fast Models distribution. On Linux, use the $PVLIB_HOME/examples/FVP_VE/LISA directory instead.

Figure 3.2 shows a view of the component in System Canvas.

Figure 3.2. ClockDivider in System Canvas

ClockDivider in System Canvas

This component is written in C++.

Ports

Table 3.2 provides a brief description of the ClockDivider component ports.

Table 3.2. ClockDivider ports

NamePort protocolTypeDescription
clk_inClockSignalslavesource clock rate
clk_outClockSignalmasteroutput clock rate
rateClockRateControlslavepermits the clock divider ratio to be changed dynamically

ClockRateControl protocol

The ClockRateControl protocol can be used to set the ratio of a ClockDivider component.

set(uint32_t mul, uint32_t div) : void

sets the multiplier/divider that determines the clock divider ratio:

clk_outfreq = clk_infreq * mul / div

Parameters

Table 3.3 provides a description of the configuration parameters for the ClockDivider component.

Table 3.3. ClockDivider configuration parameters

Parameter nameDescriptionTypeAllowed valueDefault value
mulclock rate multiplierIntegeruint_321
divclock rate dividerIntegeruint_321

Registers

The ClockDivider component has no registers.

Debug features

The ClockDivider component has no debug features.

Verification and testing

The ClockDivider component was tested as part of the VE example system by running VE test suites and by booting operating systems.

Performance

The ClockDivider component does not normally incur a runtime performance cost. However, reprogramming the clock rate causes all related clocks and timers to be recalculated.

Library dependencies

The ClockDivider component has no dependencies on external libraries.

Copyright © 2008-2013 ARM. All rights reserved.ARM DUI 0423O
Non-ConfidentialID060613