--clock Options - 2020.2 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2021-03-22
Version
2020.2 English
Important: The --clock options described here are supported on embedded processor platforms and newer platforms for Data Center accelerator cards. On on older legacy platforms, clock frequency for kernels can be specified using the --kernel_frequency option.

The --clock.XXX options provide a method for assigning clocks to kernels from the v++ command line and locating the required kernel clock frequency source during the linking process. There are a number of options that can be used with increasing specificity. The order of precedence is determined by how specific a clock option is. The rules are listed in order from general to specific, where the specific rules take precedence over the general rules:

  • When no --clock.XX option is specified, the platform default clock will be applied to each compute unit (CU). For kernels with two clocks, clock ID 0 from the platform will be assigned to ap_clk, and clock ID 1 will be assigned to ap_clk_2.
  • Specifying --clock.defaultId=<id> defines a specific clock ID for all kernels, overriding the platform default clock assignments.
  • Specifying --clock.defaultFreqHz=<Hz> defines a specific clock frequency for all kernels that overrides a user specified default clock ID, and the platform default clock.
  • Specifying --clock.id=<id>:<cu_0>[.<clk_pin_0>][,<cu_n>[.<clk_pin_n>]] assigns a clock ID to a list of associated CUs, and optionally the clock pin for the CU.
  • Specifying --clock.freqHz=<Hz>:<cu_0>[.<clk_pin_0>][,<cu_n>[.<clk_pin_n>]] assigns the specified clock frequency to the specified clock pin on the specified CU.

--clock.defaultFreqHz

--clock.defaultFreqHz <arg>

Specifies a default clock frequency in Hz to use for all kernels. This lets you override the default platform clock, and assign the clock with the specified clock frequency as the default. Where <arg> is specified as the clock frequency in Hz.

For example:

v++ --link --clock.defaultFreqHz 300000000
Tip: This option can be specified in a configuration file under the [clock] section head using the following format:
[clock]
defaultFreqHz=300000000

--clock.defaultId

--clock.defaultId <arg>
Specifying --clock.defaultId=<id> defines a specific clock ID for all kernels, overriding the platform default clock. Where <arg> is specified as the clock ID from one of the clocks defined on the target platform, other than the default clock ID.
Tip: You can determine the available clock IDs for a target platform using the platforminfo utility as described in platforminfo Utility.

For example:

v++ --link --clock.defaultId 1
Tip: This option can be specified in a configuration file under the [clock] section head using the following format:
[clock]
defaultId=1

--clock.defaultTolerance

--clock.defaultTolerance <arg>

Specifies a default clock tolerance as a value, or as a percentage of the default clock frequency. When specifying clock.defaultFreqHz, you can also specify the tolerance with either a value or percentage. This will update timing constraints to reflect the accepted tolerance.

The tolerance value, <arg>, can be specified as a whole number, indicating the clock.defaultFreqHz ± the specified tolerance; or as a percentage of the default clock frequency specified as a decimal value.

Important: The default clock tolerance is 5% when this option is not specified.

For example:

v++ --link --clock.defaultFreqHz 300000000 --clock.defaultTolerance 0.10
Tip: This option can be specified in a configuration file under the [clock] section head using the following format:
[clock]
defaultTolerance=0.10

--clock.freqHz

--clock.freqHz <arg>

Specifies a clock frequency in Hz and assigns it to a list of associated compute units (CUs) and optionally specific clock pins on the CU. Where <arg> is specified as <frequency_in_Hz>:<cu_0>[.<clk_pin_0>][,<cu_n>[.<clk_pin_n>]]:

  • <frequency_in_Hz>: Defines the clock frequency specified in Hz.
  • <cu_0>[.<clk_pin_0>][,<cu_n>[.<clk_pin_n>]]: Applies the defined frequency to the specified CUs, and optionally to the specified clock pin on the CU.
For example:
v++ --link --clock.freqHz 300000000:vadd_1,vadd_3
Tip: This option can be specified in a configuration file under the [clock] section head using the following format:
[clock]
freqHz=300000000:vadd_1,vadd_3

--clock.id

--clock.id <arg>

Specifies an available clock ID from the target platform and assigns it to a list of associated compute units (CUs) and optionally specific clock pins on the CU. Where <arg> is specified as <reference_ID>:<cu_0>[.<clk_pin_0>][,<cu_n>[.<clk_pin_n>]]:

  • <reference_ID>: Defines the clock ID to use from the target platform.
    Tip: You can determine the available clock IDs for a target platform using the platforminfo utility as described in platforminfo Utility.
  • <cu_0>[.<clk_pin_0>][,<cu_n>[.<clk_pin_n>]]: Applies the defined frequency to the specified CUs and optionally to the specified clock pin on the CU.

For example:

v++ --link --clock.id 1:vadd_1,vadd_3
Tip: This option can be specified in a configuration file under the [clock] section head using the following format:
[clock]
id=1:vadd_1,vadd_3

--clock.tolerance

--clock.tolerance <arg>

Specifies a clock tolerance as a value, or as a percentage of the clock frequency. When specifying --clock.freqHz, you can also specify the tolerance with either a value or percentage. This will update timing constraints to reflect the accepted tolerance. Where <arg> is specified as <tolerance>:<cu_0>[.<clk_pin_0>][,<cu_n>[.<clk_pin_n>]]

  • <tolerance>: Can be specified either as a whole number, indicating the clock.freqHz ± the specified tolerance value; or as a percentage of the clock frequency specified as a decimal value.
  • <cu_0>[.<clk_pin_0>][,<cu_n>[.<clk_pin_n>]]: Applies the defined clock tolerance to the specified CUs, and optionally to the specified clock pin on the CU.
Important: The default clock tolerance is 5% of the clock.FreqHz when this option is not specified.

For example:

v++ --link --clock.tolerance 0.10:vadd_1,vadd_3 
Tip: This option can be specified in a configuration file under the [clock] section head using the following format:
[clock]
tolerance=0.10:vadd_1,vadd_3