Showing posts with label static timing analysis. Show all posts
Showing posts with label static timing analysis. Show all posts

Sep 25, 2026

STA: Timing_Analysis: Reg to Output path analysis

Timing Analysis: Register-to-Output Path

Timing Analysis: Register-to-Output Path

A register-to-output path, also called a reg-to-out path, describes the timing relationship between a flip-flop inside the design and an output port of the integrated circuit or FPGA.

This analysis determines how much time is required for data launched by an internal register to become valid at an external output pin.

Basic Concept: The register captures data on an active clock edge. After the clock-to-Q delay and the output combinational delay, the data appears at the output port.

1. Register-to-Output Path Structure

Clock ───────────────► Launch Register │ │ Clock-to-Q Delay ▼ Combinational Logic │ │ Output Delay ▼ Output Port / Pin │ ▼ External Receiver

A typical register-to-output path contains the following elements:

  • Launch register: Stores and launches the data.
  • Clock-to-Q delay: Time taken for the register output to change after the clock edge.
  • Combinational logic delay: Delay through logic between the register and output port.
  • Routing delay: Delay caused by interconnects and wiring.
  • Output buffer delay: Delay through the output driver or I/O cell.
  • External receiver: The device or component receiving the output signal.

2. Example RTL Code

module register_to_output (
    input  wire clk,
    input  wire reset_n,
    input  wire data_in,
    output reg  data_out
);

    always @(posedge clk or negedge reset_n) begin
        if (!reset_n)
            data_out <= 1'b0;
        else
            data_out <= data_in;
    end

endmodule

In this example, data_out is directly driven by a flip-flop. Therefore, the timing path is:

Launch Register → Output Buffer → Output Port

3. Maximum Register-to-Output Delay

The maximum delay determines the latest time at which the output data becomes valid after the active clock edge.

Treg-to-out(max) = Tcq(max) + Tcomb(max) + Troute(max) + Toutput(max)

Where:

Parameter Description
Tcq(max) Maximum clock-to-Q delay of the launch register
Tcomb(max) Maximum delay through combinational logic
Troute(max) Maximum routing or interconnect delay
Toutput(max) Maximum output buffer and I/O delay

Example

Assume the following delays:

  • Tcq(max) = 0.20 ns
  • Tcomb(max) = 0.80 ns
  • Troute(max) = 0.30 ns
  • Toutput(max) = 0.40 ns
Treg-to-out(max) = 0.20 + 0.80 + 0.30 + 0.40 = 1.70 ns

Therefore, the output signal becomes valid no later than 1.70 ns after the launching clock edge.

4. Minimum Register-to-Output Delay

Minimum delay determines how quickly the output can begin changing after the active clock edge. It is important when the external receiver has a hold-time requirement.

Treg-to-out(min) = Tcq(min) + Tcomb(min) + Troute(min) + Toutput(min)

A very small minimum delay may cause the receiving device to see new data too early, resulting in an external hold-time violation.

5. External Setup-Time Analysis

The output of one device is often connected to the input of another device. The receiving device samples the signal using its own clock.

Source Device Destination Device Launch FF ──► Logic ──► Output ──► PCB Trace ──► Input ──► Capture FF │ ▲ └── Launch Clock └── Capture Clock

For setup timing, data must arrive at the receiving device before its capture clock edge.

Treg-to-out(max) + Tboard(max) + Tsetup(receiver) ≤ Tclock + Tclock-skew - Tuncertainty

If the receiving device has a clock period of 10 ns, the source register-to-output delay is 1.70 ns, the PCB delay is 0.80 ns, and the receiver setup time is 1.00 ns:

Required time = 10.00 ns
Arrival time = 1.70 + 0.80 + 1.00 = 3.50 ns
Setup slack = 10.00 - 3.50 = 6.50 ns

Positive setup slack indicates that the path meets the setup-time requirement.

6. External Hold-Time Analysis

For hold timing, the output data must not change too soon after the receiving device's capture clock edge.

Treg-to-out(min) + Tboard(min) ≥ Thold(receiver) + Tclock-skew + Tuncertainty

If the minimum source delay is too small, new data may reach the receiving device while it is still within its hold window.

Negative hold slack indicates a hold-time violation.

7. Register-to-Output Timing in FPGA Constraints

Static timing analysis tools need external timing information. This is normally provided using an output delay constraint.

Vivado XDC Example

# Create a 100 MHz clock
create_clock -name sys_clk -period 10.000 [get_ports clk]

# Maximum output delay for setup analysis
set_output_delay -clock sys_clk -max 3.000 \
    [get_ports data_out]

# Minimum output delay for hold analysis
set_output_delay -clock sys_clk -min 1.000 \
    [get_ports data_out]

Intel Quartus SDC Example

# Create a 100 MHz clock
create_clock -name sys_clk -period 10.000 [get_ports clk]

# Maximum output delay
set_output_delay -clock sys_clk -max 3.000 \
    [get_ports data_out]

# Minimum output delay
set_output_delay -clock sys_clk -min 1.000 \
    [get_ports data_out]
Important: The values used with set_output_delay are based on the external receiver's timing requirements and board-level delays. They should not be selected arbitrarily.

8. Meaning of set_output_delay

The command below informs the timing analyzer that the external device expects the output signal to arrive within a specified time window relative to the clock.

set_output_delay -clock sys_clk -max 3.0 [get_ports data_out]

This means the output data is expected to reach the external device within 3.0 ns of the reference clock relationship used by the timing tool.

The minimum constraint is used for hold analysis:

set_output_delay -clock sys_clk -min 1.0 [get_ports data_out]

9. Timing Diagram

Clock ────┐ ┌──────┐ ┌──────┐ └──────┘ └──────┘ └── Launch FF ────●─────────────────────────────── │ │ Clock-to-Q delay ▼ Output Data ────────────────┐ └────────────────── ◄────────────► Reg-to-Output Delay Receiver ─────────────────────────●───────── │ Capture Clock Edge

10. Common Causes of Register-to-Output Violations

  • Large combinational logic between the register and output.
  • Excessive routing delay caused by poor placement.
  • High fanout on the output-driving register.
  • Slow I/O standards or incorrect drive-strength settings.
  • Incorrect clock constraints.
  • Missing or incorrect set_output_delay constraints.
  • Clock skew and clock uncertainty.
  • Long PCB traces or excessive external load capacitance.

11. Techniques to Improve Reg-to-Out Timing

Technique Purpose
Register the output Reduces combinational delay between the last register and output port.
Reduce combinational logic Shortens the data path and improves maximum delay.
Use I/O registers Places the register near the physical output pin in an FPGA.
Improve placement and routing Reduces interconnect delay.
Reduce fanout Prevents excessive loading on the output-driving register.
Choose a suitable I/O standard Improves output transition time and signal integrity.
Use appropriate drive strength Helps drive the external load without unnecessary delay or noise.

12. Registered Versus Combinational Outputs

Combinational Output

assign data_out = enable ? data_a : data_b;

The output can change whenever any input changes. The timing path may include input registers, multiplexers, logic gates, and routing.

Registered Output

always @(posedge clk) begin
    data_out <= data_next;
end

The output changes only after a clock edge. Registered outputs generally provide more predictable timing and are easier to constrain.

13. Timing Report Parameters

A static timing analysis report commonly contains:

Report Item Meaning
Startpoint The launching register and its clock.
Endpoint The output port or output pin.
Data arrival time Time taken for data to reach the output.
Data required time Latest acceptable arrival time.
Slack Difference between required time and arrival time.
Path delay Total delay from the launch register to the output.
Slack = Required Time - Arrival Time
  • Positive slack: Timing requirement is satisfied.
  • Zero slack: Path is exactly at the timing limit.
  • Negative slack: Timing violation exists.

14. Summary

  • Register-to-output analysis measures the delay from an internal register to an output port.
  • The maximum delay is important for external setup timing.
  • The minimum delay is important for external hold timing.
  • The total path includes clock-to-Q delay, logic delay, routing delay, and output-buffer delay.
  • Use set_output_delay -max for setup analysis.
  • Use set_output_delay -min for hold analysis.
  • Positive timing slack indicates that the path meets its requirement.
  • Registering outputs and reducing logic or routing delay can improve reg-to-out timing.

Dec 3, 2019

Dynamic vs Static Timing Analysis

Dynamic vs Static Timing Analysis
Timing analysis is integral part of ASIC/VLSI design flow. Anything else can be compromised but not timing! Timing analysis can be static or dynamic. Dynamic timing analysis verifies functionality of the design by applying input vectors and checking for correct output vectors whereas Static Timing Analysis checks static delay requirements of the circuit without any input or output vectors.

Dynamic timing analysis has to be accomplished and functionality of the design must be cleared before the design is subjected to Static Timing Analysis (STA). Dynamic Timing Analysis (DTA) and Static Timing Analysis (STA) are not alternatives to each other. Quality of the Dynamic Timing Analysis (DTA) increases with the increase of input test vectors. Increased test vectors increase simulation time. Dynamic timing analysis can be used for synchronous as well as asynchronous designs. Static Timing Analysis (STA) can’t run on asynchronous deigns and hence Dynamic Timing Analysis (DTA) is the best way to analyze asynchronous designs. Dynamic Timing Analysis (DTA) is also best suitable for designs having clocks crossing multiple domains.


Example of Dynamic Timing Analysis(DTA) tool is Modelsim (from mentor Graphics), VCS (from Synopsys). DTA is also carried out on post layout netlist to verify that functionality of the design has not changed. Test vectors remain same for both.


SPICE Simulation


Device level timing analysis is carried out using SPICE simulation. SPICE simulation is very essential for full custom designs to verify the electrical properties of the designs. These are calculated based on the mathematical equations that represent electrical properties of devices. Material and some of the electrical properties of the devices, which are represented by either variables or constants, are stored in model files. Examples are threshold voltage of MOSFET, electron density etc. SPICE characterized data is tabulated in technology libraries which becomes basic delay information for the Static Timing Analysis. For example let us consider a AND gate. Several electrical properties such as input and output transition, propagation delay, output capacitance etc are evaluated by this SPICE simulation. SPICE simulated data gives maximum accuracy compared to any other form of simulation. SPICE code is manually written and simulated. Hence for a larger design SPICE simulation is cumbersome job. There are specific tools available for transistor level Static Timing Analysis (STA), (Eg. Pathmill from Synopsys) SPICE simulation being the backbone of all these tools.



What is Static Timing Analysis (STA)?


In Static Timing Analysis (STA) static delays such as gate delay and net delays are considered in each path and these delays are compared against their required maximum and minimum values. Circuit to be analyzed is broken into different timing paths constituting of gates, flip flops and their interconnections. Each timing path has to process the data within a clock period which is determined by the maximum frequency of operation. Cell delays are available in the corresponding technology libraries. Cell delay values are tabulated based on input transition and fanout load which are characterized by SPICE simulation. Net delays are calculated based on the Wire Load Models(WLM) or extracted resistance R and capacitance C. Wire Load Models(WLM) are available in the Technology File. These values are Table Look Up(TLU) values calculated based on the net fanout length.


The static timing analyzer will report the following delays (or it can do following analysis):

Register to Register delays

Setup times of all external synchronous inputs

Clock to Output delays

Pin to Pin combinational delays

Different Analysis Modes-Best, Worst, Typical, On Chip Variation (OCV)

Data to Data Checks

Case Analysis

Multiple Clocks per Register

Minimum Pulse Width Checks

Derived Clocks

Clock Gating Checks

Netlist Editing

Report_clock_timing

Clock Reconvergence Pessimism

Worst-Arrival Slew Propagation

Path-Based Analysis

Debugging Delay Calculation


and many more......!!


The wide spread use of STA can be attributed to several factors [David]:


*

The basic STA algorithm is linear in runtime with circuit size, allowing analysis of designs in excess of 10 million instances.

*

The basic STA analysis is conservative in the sense that it will over-estimate the delay of long paths in the circuit and under-estimate the delay of short paths in the circuit. This makes the analysis ”safe”, guaranteeing that the design will function at least as fast as predicted and will not suffer from hold-time violations.

*

The STA algorithms have become fairly mature, addressing critical timing issues such as interconnect analysis, accurate delay modeling, false or multi-cycle paths, etc.

*

Delay characterization for cell libraries is clearly defined, forms an effective interface between the foundry and the design team, and is readily available. In addition to this, the Static Timing Analysis (STA) does not require input vectors and has a runtime that is linear with the size of the circuit [Agarwal].


Advantages of STA:


* All timing paths are considered for the timing analysis. This is not the case in simulation.

* Analysis times are relatively short when compared with event and circuit simulation.

* Timing can be analyzed for worst case, best case simultaneously. This type of analysis is not possible in dynamic timing analysis.

* Static Timing Analysis (STA) works with timing models. STA has more pessimism and thus gives maximum delay of the design. DTA performs full timing simulation. The problem associated with DTA is the computational complexity involved in finding the input patterns (vectors) that produce maximum delay at the output and hence it is slow.


Disadvantages of STA:

* All paths in the design may not run always in worst case delay. Hence the analysis is pessimistic.

* Clock related all information has to be fed to the design in the form of constraints.

* Inconsistency or incorrectness or under constraining of these constraints may lead to disastrous timing analysis.

* STA does not check for logical correctness of the design.

* STA is not suitable for asynchronous circuits.

Feb 6, 2014

Static Timing Analysis


STA play an important role during chip development process, it is timing sign off process.



So .. What is STA ?
Static timing analysis (STA) is a simulation method of computing the expected timing of a digital circuit without requiring a simulation of the full circuit. High-performance integrated circuits have traditionally been characterized by the clock frequency at which they operate.

Below are the main responsibilities of a STA engineer.

1. Setup Timing violations
2. Hold Timing violations
3. Min Pulse violations
4. Max transition violations
5. Max Cap violations
6. Clock transition violations
7. Clock Gating violations .. etc

Hold timing check can only be done once clock tree netlist is available. Hold time is not dependent on clock frequency.
Setup timing can be check on after synthesis netlist with more margin. It will give initial report about the design.

There could be n number of corners , below is the calculation for corners.

STA run individually in test mode and function mode.

Test Mode ->
These days there could be below test mode.
1. Scan mode
2. At-Speed/Capture mode.
3. OCC scan mode

Functional Mode ->
It depends on the functionality of design. There could be normal mode, loopback mode , few special debugging mode .. , when design is not in test mode, design support one mode at the time.
1. normal mode
2. Loopback mode

PVT conditions ->
1. Fast corner ( best case)
2. Slow corner (worst caese)
3. Fast corner with higher temp
4. Typical
5. combinations of corner 1 and 2

Total corners -> (number of PVT condition) * (Functional Mode) * (Test mode)

Once STA has ran , post processing will required to get the desired result. If using some standard tools which can present a dashboard from STA result , then much scripting may not be required.

Perl/Tcl is majority of script which used in post-processing and building up the environment. Shell can also be used.

You need to have good grip on below unix command.
1. grep
2. compare
3. find
4. awk
5. sed

Under-Construction Pages :
Timing Analysis : Input to output
Timing Analysis : Input to Reg
Timing Analysis : Reg to Reg
Timing Analysis : Reg to Output timing analysis


For go in more detail, go @ below link.

Practical Knowledge on STA

FAQ :
Q1. how to get the unconstrained path in a design ?
A. check_timing -verbose
     report_timing -exceptions
     report_disable_timing

Q2. What is the relationship for the timing analysis and UPF ?
A.  ??



Thanks
Rahul


SiteMap