NxDesignSuite 23.5 NX Design Constraint (NXDC)
This document aims to list all the the nxpython methods available to apply timing constraints on a design.
- 1 General
- 2 Clock Creation
- 3 Clock Relationship
- 4 Delay Path
- 5 IO Delay
- 6 Report Request
- 6.1 removeTimingConstraint(id)
- 6.2 addReportTimingRequest(source = ‘source_reg', target = 'target_reg’)
- 6.3 reportTiming(source=‘source_reg', target=‘target_reg’,[conditions=’conditions'],[maximumSlack=slack],[searchPathsLimit=limit],[persistent=persistent])
- 6.4 addReportPathRequest(source = ‘source_pin', target = 'target_pin’)
- 6.5 reportPath(source = ‘source_pin', target = 'target_pin’,[conditions=’conditions'],[maximumSlack=slack],[searchPathsLimit=limit],[persistent=persistent]
- 6.6 removeReportTimingRequest(id)
- 6.7 removeReportRequest(id)
General
destroy()
This method is used to destroy the analyzer object.
This method takes no argument.
Once the analyzer is destroyed every python variable referencing it becomes obsolete so nxpython behavior is safe.
Example:
analyzer = project.createAnalyzer()
analyzer.launch()
analyzer.destroy()
preAnalyze()
This method is used to pre-analyze and check if each timing constraint is valid or not.
This method takes no argument.
Example:
analyzer = project.createAnalyzer()
analyzer.createClock(target=getPort('clk'),name='clk', period=10.0)
analyzer.preAnalyze()
launch(parameters)
This method is used to run the static timing analysis.
The analyzer computes a maximum of 'searchPathsLimit' paths for each domain, considering only the paths which slack is less than or equal to 'maximumSlack'.
Temperature and voltage can also be supplied to adjust timing values.
When not given, the parameters take their default values.
Arguments:
Name | Type | Description |
parameters | dictionary | Keys are the names of the parameters to set (see following table), values must match the type specified. |
Available Parameters:
Name | Type | Description (Default value in bold) |
|
searchPathLimit | unsigned | maximum number of paths computed for each domain. (default value is 10) |
|
maximumSlack | integer | maximum reportable slack. (default is unlimited) |
|
conditions | string
| ‘bestcase’ : Voltage = typical core voltage + 0.1V Temperature = -40°C 'typical’ : Voltage = typical core voltage Temperature = 25°C ‘worstcase’ : Voltage = typical core voltage - 0.1V Temperature = 125°C |
|
|
|
|
|
Example:
analyzer = project.createAnalyzer()
parameters = { 'searchPathLimit': 15, 'conditions': 'worstcase'}
analyzer.launch (parameters)
parameters = { 'searchPathLimit': 15, ‘maximumSlack’ : 500, 'conditions': 'worstcase' }
analyzer.launch (parameters)
The project step must be at the minimum “prepared” to run this method.
preAnalyze()
This method is used to analyze timing constraints without running the static timing analysis.
This method takes no argument.
Example:
developCKGs()
This method automatically creates a generated clock constraint on each output of the PLLs and WFGs in current project. This constraint is used by timing driven algorithms and static timing analysis.
This method takes no argument.
developCKGs() allows the user to create generated clocks for CKGs output pins. For example, before activating a generated clock which is based on a clock driven by a WFG, user needs to launch this method for generating the base clock. Without this method, nxmap automatically derives a clock on each output of the CKGs after activating all of the given timing constraints.
Examples:
setAnalysisConditions(conditions = 'conditions')
This method is used to specify the chip conditions for the static timing analysis. This constraint is used by timing driven algorithms and static timing analysis.
Arguments:
Name | Type | Description |
conditions | string | Specifies the conditions for static timing analysis. |
Example:
setCaseAnalysis(value = 'value', netList = netList)
This method is used to specify a constant logic value to the given tests. This constraint is used by timing driven algorithms and static timing analysis.
Arguments:
Name | Type | Description |
---|---|---|
value | string | The valid constant. Values can be ‘0' or '1’ |
netList | string | Specifies how to get one or several nets. A valid argument can be: |
Example:
In the example above, two clocks (clk[0] and clk[1]) are connected to the inputs of the multiplexer, but only clk[1] is propagated through the output after setting the constant value on the selection signal (sel).
clearTimingConstraints()
This method is used to clear all design constraints from the current project.
Cleared constraints can be clocks, generated clocks, derived clocks of PLLs and WFGs, input delays, output delays, clock groups, analysis case, false paths, multicycle paths, min delay paths, and max delays paths.
This method takes no argument.
Example:
This method is used before launching a Static Timing Analysis or using TimingDriven:
Clock Creation
createClock( target = ‘target', name = ‘name’, period = ]0, ], rising = [0,period[, falling = ]rising, rising+period] )
This method is used to create a clock constraint at a timing point. This constraint is used by timing driven algorithms and static timing analysis. By default, the unit defined is in ns.
Arguments:
Name | Type | Description |
target | string | Mandatory. The argument that specifies how to get a clock related point. A valid argument can be: |
name | string | Optional. User clock name of the created clock, default name is target_str |
period | float | Mandatory. Period for the clock waveform. Must be positive, default value is period/2 |
rising | float | Mandatory if falling is defined. Otherwise, it is optional. Rising edge for the clock waveform. The range is defined as [0, period[ The default value is 0. |
falling | float | Optional. Falling edge for the clock waveform. The range is defined as ]rising, rising + period]. The default value is period/2. |
Examples:
In the example above, to define a 100MHz clock for net “Clk”, the following three commands are equivalent :
createGeneratedClock(source = ‘source', target = ‘target’, name = 'name', key = value)
This method is used to create an internal generated clock constraint at a timing point. This constraint is used by timing driven algorithms and static timing analysis.
Arguments:
Name | Type | Description |
source | string | Mandatory. Specifies how to get source clock related point. A valid argument can be: |
target | string | Mandatory. Specifies how to get a clock related point. A valid argument can be: |
name | string | User clock name of the generated clock |
Parameters for computing clock wave of generated clock from master clock are described below:
Key | Type | Description and value |
multiplyBy | int | Period multiplication factor. The value must be greater or equal to 1. Default value is 1 |
divideBy | int | Period division factor. The value must be greater or equal to 1. Default value is 1 |
dutyCycle | int | Duty cycle of clock period. The range must be from 1 to 99. Default value is 50.0 |
phase | unsigned | The range must be from 0 to 359 |
invert | boolean | Invert the clock signal (~ phase = 180) |
offset | float | Offset for rising edge |
edges | int list | Specifies the edges of the master clock to use in defining transitions on the generated clock. List in non-decreasing order. Mutually exclusive with 'multiplyBy' or 'divideBy' |
edgeShift | float list | Shifts the edges of the generated clock by the specified values relative to the master clock. Mutually exclusive with 'multiplyBy' or 'divideBy' |
Examples:
In the example above, the master clock "Clk" was created as 100MHz and the generated clock "clk1" is divided by 2 from the master clock. However note that the "clk_reg" is driven by the falling edge of master clock, the relation between the master clock and the generated clock is shown in the diagram below:
The diagram of the above command would be:
Clock Relationship
setClockGroup(group1 = ‘group1', group2= ‘group2’, option = 'option’)
This method is used to specify which clocks are not related. This constraint is used by timing driven algorithms and static timing analysis.
Arguments:
Name | Type | Description |
group1 | string | Mandatory. Specifies how to get a group of clocks. A valid clock should be a clock created by command createClock. A valid argument can be: |
group2 | string | Mandatory. Same as the argument "group1" |
option | string | Mandatory. A valid option can be 'asynchronous' or 'exclusive': Asynchronous clocks are those that are completely unrelated. Exclusive clocks are not actively used in the design at the same time. For asynchronous clocks, paths between clock domains are reported without raising violations. For exclusive clocks, paths between clock domains are reported and so no violation is reported neither. By default, clocks are considered synchronous, paths between clock domains are reported and violations can be raised. |
Examples:
Delay Path
setMaxDelay(source = ‘source', target = ‘target’, delay = 'delay’)
This method is used to specify the maximum delay path for the timing paths. It is used by timing driven algorithms and static timing analysis.
Arguments:
Name | Type | Description |
source | string | Specifies how to get a timing path starting points. A valid timing starting point can be either an input port or a register. A valid argument can be: |
target | string | Specifies how to get a timing path ending points. A valid timing ending point can be either an output port or a register. A valid argument can be: |
delay | float | The required maximum delay value in ns for specified paths. |
Examples:
setMinDelay(source = ‘source', target = ‘target’, delay = 'delay’)
This method is used to specify the minimum delay path for the timing paths. It is used by timing driven algorithms and static timing analysis.
Arguments:
Name | Type | Description |
source | string | Specifies how to get a timing path starting points. A valid timing starting point can be either an input port or a register. A valid argument can be: |
target | string | Specifies how to get a timing path ending points. A valid timing ending point can be either an output port or a register. A valid argument can be: |
delay | float | The required minimum delay value in ns for specified paths. |
Examples:
setMulticyclePath(source = 'source', target = 'target', pathMultiplier = 'pathMultiplier')
This method is used to specify the multicycle path for the timing paths. It is used by timing driven algorithms and static timing analysis.
Arguments:
Name | Type | Description |
source | string | Mandatory. Specifies how to get a timing path starting points. A valid timing starting point is a register. A valid argument can be: |
target | string | Mandatory. Specifies how to get a timing path ending points. A valid timing ending point is a register. A valid argument can be: |
pathMultiplier | integer | Mandatory. A value that represents a number of cycles. Must be greater than 1. |
Examples:
setFalsePath(source = ‘source', target = 'target’)
This method is used to specify the false path for the timing paths. This constraint is used by timing driven algorithms and static timing analysis.
Name | Type | Description |
source | string | Mandatory. Specifies how to get a timing path starting points. A valid timing starting point is an input port or a register. A valid argument can be: |
target | string | Mandatory. Specifies how to get a timing path ending points. A valid timing ending point is an output port or a register. A valid argument can be: |
Examples:
IO Delay
setInputDelay(clock = ‘clock', clockMode = ‘clockMode’, min = ‘min’, max = ‘max’, ports = 'ports’)
This method specifies the data arrival times at the specified input ports relative to the clock. The clock must refer to a clock name in the design. This constraint is used by timing driven algorithms and static timing analysis. Depending on
Arguments:
Name | Type | Description |
clock | string | Mandatory. Specifies how to get a clock specified. A valid clock should be a clock created by command createClock. The valid argument is |
clockMode | string | Optional. Specifies that input delay is relative to the falling or rising edge of the clock. It must be "rise"' or "fall". Default value is rise. |
min | float | Optional. Applies value as minimum data delay, it refers to the longest path. The default value is max if the max is defined, otherwise it is set to 0. |
max | float | Optional. Applies value as maximum data delay, it refers to the shortest path. The default value is min if the min is defined, otherwise it is set to 0. |
ports | string | Mandatory. Specifies how to get a list of input pads. A valid argument can be: |
Examples:
setOutputDelay(clock = ‘clock', clockMode = ‘clockMode’, min = ‘min’, max = ‘max’, ports = 'ports’)
This command specifies the data required times at the specified output ports relative to the clock. The clock must refer to a clock defined in the design. This constraint is used by timing driven algorithms and static timing analysis.
Arguments:
Name | Type | Description |
clock | string | Mandatory. Specifies how to get a clock specified. A valid clock should be a clock created by command createClock. A valid argument can be: |
clockMode | string | Optional. Specifies that output delay is relative to the falling or rising edge of the clock. It must be "rise"' or "fall". The default value is “rise”. |
min | float | Optional. Applies value as minimum data delay, it refers to the longest path. The default value is max if the max is defined, otherwise it is set to 0. |
max | float | Optional. Applies value as maximum data delay, it refers to the shortest path. The default value is min if the min is defined, otherwise it is set to 0. |
ports | string | Mandatory. Specifies how to get a list of input pads. A valid argument can be: |
Examples:
Report Request
removeTimingConstraint(id)
This method is used to remove a timingconstraint from the current project.
Remove constraint can be clocks, generated clocks, derived clocks of PLLs and WFGs, input delays, output delays, clock groups, analysis case, false paths, multicycle paths, min delay paths, and max delays paths.
Arguments:
Name | Type | Description |
---|---|---|
id | unsigned | The id of the timing constraint to remove |
Example:
This method is used before launching a Static Timing Analysis or using TimingDriven:
addReportTimingRequest(source = ‘source_reg', target = 'target_reg’)
This method gives the shortest and the longest delays of a path.
Timing log files will only contain paths found between sources and targets from these queries.
Arguments:
Name | Type | Description |
---|---|---|
source_reg | string | Specifies the starting points of the timing paths to be analyzed. A valid argument can only be a register : |
target_reg | string | Specifies the ending points or destination objects of timing paths to be analyzed. A valid argument can be: |
Example:
This method should be launched after creating an Analyzer, as follow :
reportTiming(source=‘source_reg', target=‘target_reg’,[conditions=’conditions'],[maximumSlack=slack],[searchPathsLimit=limit],[persistent=persistent])
This method gives the shortest and the longest delays of a path.
It leads to the same impact than addReportTimingPath except in addition, it launch the STA tool and then remove the addReportTimingPath constraint.
Timing log files will only contain paths found between sources and targets from these queries.
Arguments:
Name | Type | Description |
---|---|---|
source_reg | string | Specifies the starting points of the timing paths to be analyzed. A valid argument can only be a register : |
target_reg | string | Specifies the ending points or destination objects of timing paths to be analyzed. A valid argument can be: |
conditions | string | ‘bestcase’ : Voltage = typical core voltage + 0.1V / Temperature = -40°C 'typical’ : Voltage = typical core voltage /Temperature = 25°C ‘worstcase’ : Voltage = typical core voltage - 0.1V /Temperature = 125°C |
maximumSlack | float | maximum reportable slack. (default is unlimited) |
searchPathsLimit | integer | maximum number of paths computed for each domain. (default value is 10) |
persistent | bool | If enable, the report request is kept by Analyzer even after the analysis ended (default value is True) |
Example:
This method should be launched after creating an Analyzer, as follow :
addReportPathRequest(source = ‘source_pin', target = 'target_pin’)
This method gives the shortest and the longest delays of a path. This constraint is used by timing driven algorithms and static timing analysis.
Timing log files will still contain all paths. In addition, A file is create with shortest and longest paths found between sources and targets from each query.
Arguments:
Name | Type | Description |
---|---|---|
source_reg | string | Specifies the starting points of the timing paths to be analyzed. A valid argument can be a register or a port : |
target_reg | string | Specifies the ending points or destination objects of timing paths to be analyzed. A valid argument can be: |
Example:
This method should be launched after creating an Analyzer, as follow :
reportPath(source = ‘source_pin', target = 'target_pin’,[conditions=’conditions'],[maximumSlack=slack],[searchPathsLimit=limit],[persistent=persistent]
This method gives the shortest and the longest delays of a path.
It leads to the same impact than addReportPath except in addition, it launch the STA tool and then remove the addReportPath constraint.
Timing log files will only contain paths found between sources and targets from these queries.
Arguments:
Name | Type | Description |
---|---|---|
source_pin | string | Specifies the starting points of the timing paths to be analyzed. A valid argument can be a a pin or a port: |
target_pin | string | Specifies the ending points or destination objects of timing paths to be analyzed. A valid argument can be a pin or a port: |
conditions | string | ‘bestcase’ : Voltage = typical core voltage + 0.1V / Temperature = -40°C 'typical’ : Voltage = typical core voltage /Temperature = 25°C ‘worstcase’ : Voltage = typical core voltage - 0.1V /Temperature = 125°C |
maximumSlack | float | maximum reportable slack. (default is unlimited) |
searchPathsLimit | integer | maximum number of paths computed for each domain. (default value is 10) |
persistent | bool | If enable, the report request is kept by Analyzer even after the analysis ended (default value is True) |
Example:
This method should be launched after creating an Analyzer, as follow :
removeReportTimingRequest(id)
This method is used to remove a reportTiming from the current project.
Arguments:
Name | Type | Description |
---|---|---|
id | unsigned | The id of the reportTiming constraint to remove |
Example:
removeReportRequest(id)
This method is used to remove a reportPath from the current project.
Arguments:
Name | Type | Description |
---|---|---|
id | unsigned | The id of the reportPath constraint to remove |
Example:
© NanoXplore 2022