get_clock_period - 2022.1 English

Vitis High-Level Synthesis User Guide (UG1399)

Document ID
UG1399
Release Date
2022-06-07
Version
2022.1 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.
-ns
Return the clock period in nanoseconds (ns). 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