clock - 2021.2 English

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

Document ID
UG1393
Release Date
2022-03-29
Version
2021.2 English
Important: This option cannot be used with embedded processor platforms.
The clock command allows you to change the clock frequencies of the clock(s) to the Compute Units (CUs) inside a xclbin. It has the following command line format:
xbutil clock [-d card] [-r region] [-f clock1_freq_MHz] 
[-g clock2_freq_MHz] [-h clock3_freq_MHz]

The clock frequency specified with the -f switch is applied to all CUs. Clock frequency for individual CUs cannot be changed independently. In addition, the xclbin must be programmed and be capable or running at the specified clock frequency. CUs generated with the Vitis tools only have clock1. RTL-based kernels can have clock2 and clock3 connected.

The following table lists the available options.

Table 1. xbutil clock Command Options
Option Description Required
-d <card> Specifies the target card. <card> can be specified as either the card_id or Bus:Device:Function (BDF). Defaults to card_id = 0 if not specified.
Note: Use the xbutil scan command to display both the card_id and BDF for installed cards.
N
-r <region> Deprecated and has no effect. Option will be removed in subsequent release. N
-f <clock1_freq_MHz> Specifies clock frequency (in MHz) for the first clock. All platforms have this clock. Y
-g <clock2_freq_MHz> Specifies clock frequency (in MHz) for the second clock. Some platforms might not have this clock. N
-h <clock3_freq_MHz> Specifies clock frequency (in MHz) for the third clock. Some platforms might not have this clock. N

Use the xclbinutil Utility tool to list the available xclbin clocks.

It is necessary to program the xclbin prior to changing the clock frequency. See program to program the xclbin. Once the xclbin is programmed, the clock frequency can be changed.

For example, to change clock1 in card_ID = 0 to 100 MHz, run the following command:

xbutil clock -d 0 -f 100

Similarly, to change two clocks in card_ID = 0, such that clock1 is set to 200 MHz and clock2 is set to 250 MHz, run this command:

xbutil clock -d 0 -f 200 -g 250

The following example is an output after running this command successfully:

INFO: Found total 1 card(s), 1 are usable
INFO: xbutil clock succeeded.

If no xclbin is programmed, a message similar to the following will be displayed. Program the xclbin before running the clock command.

INFO: Found total 1 card(s), 1 are usable
WARNING: 'uuid' invalid, unable to find uuid.
Has the bitstream been loaded? See 'xbutil program'.
ERROR: xbutil clock failed.