get_clock_period - 2023.2 English

Vitis High-Level Synthesis User Guide (UG1399)

Document ID
UG1399
Release Date
2023-12-18
Version
2023.2 English

Description

This command returns the clock period for specified clock objects, or returns the default clock period for the active solution.

Syntax

get_clock_period [OPTIONS]

Options

-default
Return the default period if the clock period is not specified.
-name <string>
Get the clock period for the specified clock.
-units [ns | ps | hz | MHz | GHz]
Return the clock period in the specified units. By default Vitis HLS returns the clock period in the same units as it was specified.

Examples

The following example creates a clock, ap_clk, and specifies the clock period in MHz. Then it gets the clock period for the clock as ns:

create_clock -name ap_clk -period 200MHz
get_clock_period -name ap_clk -ns