Quartus® Prime Pro Edition User Guide: Timing Analyzer

ID 683243
Date 11/26/2024
Public
Document Table of Contents

2.3.5.1.2. Entity Based SDC-on-RTL Constraint Scope

The entity-based SDC-on-RTL approach offers diverse scoping possibilities for determining the constraint's scope of influence.
Table 7.  Entity-based Constraint Scope
Constraint Scope Type Features To Enable Instance-based Scoping
Automatic
  • Configurable only by .qsf assignment.
  • Under automatic scoping, constraints apply to every instance of the assigned entity across the project.
  • Each result from any get command (for example, get_pins, get_ports, and so on) in the SDC file is prepended with the instance's path. The Timing Analyzer evaluates the options of the get command in the context of the entity's instance hierarchy as the current instance.
  • All get commands are confined to the target elements within the bound instance associated with the SDC-on-RTL file.
Use the following arguments:
name RTL_SDC_FILE <sdc_on_rtl_file_name>

-entity <entity_name>

-library <library_name>
Manual
  • Configurable only by .qsf assignment.
  • The -no_sdc_promotion setting disables automatic scoping, necessitating full hierarchical path for targeting nodes.
  • The get_entity_current_instance command returns the top-level path to the current entity's instance, allowing you to merge filters targeting elements in the current instance with commands addressing those beyond entity boundaries.
  • Allows targeting nodes beyond entity boundaries.
Use the following arguments:
-name RTL_SDC_FILE <sdc_on_rtl_file_name>
-entity <entity_name>
-library <library_name>
-no_sdc_promotion
Prepend each collection filter with get_entity_current_instance to target nodes within the entity boundaries.
For example:
get_pins [get_entity_current_instance]|reg[*]|q

When you define entity-bound SDC files, the software applies the constraints using automatic scoping, unless the -no_sdc_promotion argument is present.

Automatic scoping involves prepending filters with the instance's path. To provide clarity, the following table illustrates how paths are interpreted in various Tcl commands due to the automatic scoping of constraints:

Table 8.  Automatic Scope of Constraints
Constraint Example Auto-Scope Constraint Interpretation for Instance X|Y
set_false_path -from [get_pins reg_a|clk] set_false_path -from [get_pins X|Y|reg_a|clk]
set_false_path -from [get_pins reg_a|clk] -to [get_pins reg_b|d] set_false_path -from [get_pins X|Y|reg_a|clk] -to [get_pins X|Y|reg_b|d]
set_false_path –from [get_clocks clk_1] –to [get_clocks clk_2] set_false_path –from [get_clocks clk_1] –to [get_clocks clk_2]
set_max_delay –from [get_ports in] -to [get_pins reg_a|d] 2.0 set_max_delay –from [get_ports in] -to [get_pins X|Y|reg_a|d] 2.0
get_ports *
Note: In a design where you apply constraints at the entity level, get_ports enables you to target pins at the periphery of a module after Analysis & Elaboration. Once the timing netlist undergoes propagation and is subsequently flattened, the port pins of entities might transition to a different node type, influenced by their respective connections. This alteration can impact your originally intended scope of the entity-bound constraint definition, as the nature of the port's connectivity dictates its final node representation within the flattened hierarchy.
get_ports X|Y|*
get_clocks * get_clocks *
get_ports a get_ports X|Y|a
get_clocks a get_clocks a

When automatic scoping is disabled through QSF assignments, including the use of the -no_sdc_promotion argument, you must manually prepend the top-level path to achieve the same behavior as automatic scoping. To simplify this process, use the -get_entity_current_instance command that returns the top-level path of the current instance. The following table illustrates how paths are interpreted when you use the -get_entity_current_instance command to add the top-level path to certain Tcl commands:

Table 9.  Manual Scope of Constraints
Constraint Example Manual Scope Constraint Interpretation
set_false_path –from [get_entity_current_instance
|reg_a|clk –to [get_entity_current_instance]|reg_b|d
set_false_path –from i1|inner|reg_a|clk –to i1|inner|reg_b|d
set_false_path –from i2|inner|reg_a|clk –to i2|inner|reg_b|d
set_false_path –from i3|reg_a|clk –to i3|reg_b|d
create_generated_clock –divide_by 2 –source \
     [get_ports inclk] –name \
     [get_entity_current_instance]_divclk \
     [get_entity_current_instance]|div 
set_multicycle_path –from \
    [get_entity_current_instance]|a \
    –to [get_entity_current_instance]|b 2 
# Evaluated for instances i1 and i2
create_generated_clock –divide_by 2 –source \
     [get_ports inclk] –name i1_divclk i1|div
set_multicycle_path –from i1|a –to i1|b 2 \ 
create_generated_clock –divide_by 2 –source \ 
     [get_ports inclk] –name i2_divclk \
     i2|div set_multicycle_path –from i2|a \
     –to i2|b 2 \