Quartus® Prime Pro Edition User Guide: Scripting

ID 683432
Date 7/08/2024
Public
Document Table of Contents

4.1.36.3. compute_synchronizer_protection_length (::quartus::sta)

The following table displays information for the compute_synchronizer_protection_length Tcl command:

Tcl Package and Version

Belongs to ::quartus::sta

Syntax compute_synchronizer_protection_length [-h | -help] [-long_help] [-slack_percentage <slack_percentage> ] -source_clk_freq <source_clk_freq> -synchronizer_clk_freq <synchronizer_clk_freq> [-toggle_rate_percentage <toggle_rate_percentage> ]
Arguments -h | -help Short help
-long_help Long help with examples and possible return values
-slack_percentage <slack_percentage> The percentage of the synchronizer clock period to use as slack
-source_clk_freq <source_clk_freq> Source clock frequency
-synchronizer_clk_freq <synchronizer_clk_freq> Synchronizer clock frequency
-toggle_rate_percentage <toggle_rate_percentage> Source data toggle rate, set as 12.5% of source clock frequency by default
Description
This command computes the synchronizer protection length using the given source clock frequency and synchronizer clock frequency.
The values should be specified as <frequency><unit> or "<frequency> <unit>", for example 10MHz or "10 MHz".
The values can also be specified as a period instead of a frequency. For example, 100ns.
By default, the source data toggle rate used in the computation is 12.5% of the source clock frequency.
This percentage can be changed by specifying the -toggle_rate_percentage option. For example, -toggle_rate_percentage 12.5.
By default, the slack of synchronizer registers used in the computation is 80% of the synchronizer clock period.
This percentage can be changed by specifying the -slack_percentage option. For example, -slack_percentage 80.
This command returns the computed protection length, or -1 if an acceptable length cannot be found.
Example Usage
compute_synchronizer_protection_length -source_clk_freq 80MHz -synchronizer_clk_freq "50 MHz" -slack_percentage 80
compute_synchronizer_protection_length -source_clk_freq 12.5ns -toggle_rate_percentage 12.5 -synchronizer_clk_freq "500 ns"
Return Value Code Name Code String Return
TCL_OK 0 INFO: Operation successful