[κ] Illustration from The Design Warriors's Guide to FPGAs by Clive Maxfield, Elsevier
[κκ] Modeling, Synthesis and Rapid Prototyping with the Verilog HDL, Michael D. Ciletti
Basic Timing Analysis Concepts: https://eclipse.umbc.edu/robucci/cmpe415/attachments/Lecture14.pdf#page=10 Page 10-31
Mapping is the process of associating entities such as gate-level functions in the gate-level netlist with the physical LUT-level functions available on the FPGA
Packing is grouping of LUT and registers into CLBs
Place and Route is the process of placing CLBs and finding routing configuration to make required interconnections
After Place and route, we have a fully routed physical design and a timing analysis tool can extract timing and check for any timing violations (setup, hold,etc...) associated with any of the internal registers.
These are more accurate than load estimates that would be used before place and route
A new netlist can be generated that includes accurate delays in a standard delay format SDF file associated with the post place and route netlist (can't push delays directly back to original description as lots of stuff has moved around or changed)
FPGAs vs ASICs: FPGAs are regular structures and a represent a constrained design space for analysis tools (and synthesis tools).
Many designs will emerge from one underlying physical hardware design.
This underlying hardware can be heavily characterized in the fabricated IC. This for allows tools that can perform accurate general design analysis for anyone using the same underlying hardware. In ASICs, each design can be very different, meaning it is more difficult for tools to accurately predict timing for every possible design. In ASIC Design, SPICE-Level simulation is sometimes used.
Static timing analysis refers to using using delays extracted from physical implementation to analyze timing directly rather than through simulation
Static timing analysis does not involve driving inputs input the system and analyzing resulting waveforms
Static Timing Analysis is often fast and may be part of an automation toolβs optimization process to test and evaluate design option trade-offs
Pre place-and-route estimates delays and can drive synthesis, timing-driven synthesis, Timing-Driven Synthesis logic option
Typically pessimistic delay assumptions are made to arrive at a worst-case model β a data-driven simulation may reveal what delays are actually relevant in a design
Sequential Elements Include
The combinational paths between sequential elements in the same clock domain are constrained and must be analyzed
Critical Path Timing requirement:
: Time from when clk edge occurs at an source flip-flip to when the edge occurs at a destination (e.g. clock delay 1 -clock delay 2) As defined here, positive clock skew with respect to a critical path increases setup slack, while negative skew reduces it.
For each path there should be some slack to the timing. A positive slack value refers to how much extra delay could be added or how much faster a clock rate could be..
: positive slack indicates the timing requirement is met for a defined clock period while a negative slack means it has not
All possible paths must be analyzed. The paths with the longest delay are important, but the analysis should be a combination of path delay and clock skew and clock and path delay uncertainty, not just path delay.
Setup Time Analysis = Data Path Delay including source clock-to-q delay + Desitination Synchronous Element Setup Time - Clock Path Skew
Hold Time Analysis Avoids Race Conditions
Most problematic are βshortβ combinatorial paths and high clock skew (e.g. back-to-back registers far from each other on the clock network)
Can fix by slowing path (adding several slow buffers in series)
In VLSI, tend to route clock in oposite direction of data whenever creating shift register chains.
Source: Xilinx Timing Constraints User Guide
If the clocks of two clock domains are related in some limited ways, the paths can be analyzed, if the relationship is specified...
Slide Source: Xilinx Timing Constraints User Guide
Following is an example of the PERIOD constraint syntax. The TS_Period_2 constraint value is a multiple of the TS_Period_1 TIMESPEC.
TIMESPEC TS_Period_1 = PERIOD "clk1_in_grp" 20 ns HIGH 50%;
TIMESPEC TS_Period_2 = PERIOD "clk2_in_grp" TS_Period_1 * 2;
Note that if the two PERIOD constraints are not related in this method, the cross clock domain data paths is not covered or analyzed by any PERIOD constraint.
Other information can be specified like lag (phase)
The existence of paths that cannot be analyzed by STA, unconstrained paths, will be noted in the timing analysis report
Can override delay on some paths, such as providing a series of multipliers two clock cycles instead of one to complete
In this example the assertion of the enable signals (en) determines the actual constraints. An STA tool may not have an understanding/information about the design to infer this
Consult documentation for adjusting timing constraints of individual paths
Can exclude paths were timing based on a single-cycle is not important (false paths)
In the following example, assume mode is a signal set once upon processor power-up initialization.
... S3: D <= (endianMode?{AH,AL}:{AL,AH}) + (endianMode?{BH,BL}:{BL,BH});
Where the design accounts for timing concerns, such as explicit designs to handle Clock Domain Crossing and Synchronizers, standard analysis and warning isn't meaningful
always @ (posedge clk) begin Q1<=in; Q2<=Q1; end
Or if the architecture doesn't require a path to meet timing. For instance in the following example, it may be the case that selA and selB are never both high, meaning the path through C1 and C3 is a false path
Other Examples:
https://www.edn.com/design/integrated-circuit-design/4433229/Basics-of-multi-cycle---false-paths
Wherever sensitivity to glitches exits, use registered output logic to generate the control signal.
Verilog tools include several methods for annotating timing including use of
specify blocks
Timing Data augmentation using a sidecar files e.g. Standard Delay Format Files
Delay parameters (e.g. #) may also be used to model timing delays
Assertions
Verilog also support timing check tasks to flag violations during simulation
These can be added to code with sequential logic
$hold (reference_event, data_event, limit[,notifier]) ;
Assertion violations are detected during simulation and reported
Functional simulation and verification refers to verifying logical descriptions, including Boolean expressions and register transfers
Timing verification refers to making sure that all timing requirements, external and internal (setup, hold, etc..) are satisfied
Dynamic Timing Analysis refers to analysis of timing by simulating the system with inputs and examining the resulting waveforms.
Static timing analysis uses no data and does not use a simulation β is just analyzes the structure
A timing analysis tool stores delays in a separate file Standard Delay Format SDF file along side the post place and route netlist
Dynamic timing analysis and functional simulation each require well-selected input sequences These are called test-vectors. Static Timing analysis uses no test vectors.
Dynamic timing analysis is sometimes combined with functional simulation while static timing analysis can not
Though Dynamic Timing and Functional Analysis use an event driven simulation which is much faster than SPICE-level βanalogβ circuit simulation, Static Timing Analysis is much faster and is used during place and route iterations.
Static timing analysis is more straight forward with one clock domain, though can be extended to handle multiple clock domains. Dynamic timing analysis can automatically handle multiple clock domains.