A clock period specification checks timing clocked by the net (all paths that terminate at a register clocked by the specified net).
The period specification is attached to the clock net. The definition of a clock period is unlike a FROM-TO style specification because the timing analysis tools automatically take into account any inversions of the clock net at register clock pins.
A PERIOD constraint on the clock net in the following figure would generate a check for delays on all paths that terminate at a pin that has a setup or hold timing constraint relative to the clock net. This could include the data paths D1 to CLB1.D, CLB1.Q to CLB2.D, as well as the path EN to CLB2.EC (if the reset/enable were synchronous with respect to the clock).
Figure 4.10 Paths for PERIOD Constraint |
A simple method of defining a clock period is to attach the following attribute directly to a net in the path that drives the register clock pins.
Schematic syntax
PERIOD = period { HIGH | LOW } [high_or_low_time]
UCF syntax
[period_item] PERIOD = period { HIGH | LOW } [high_or_low_time];
period_item is one of the following,
period is the required clock period. The default units are nanoseconds, but the timing number can be followed by ps, ns, us, or ms. Units may be entered with or without a leading space, and are case-insensitive. The HIGH|LOW keyword indicates whether the first pulse in the period is high or low, and the optional high_or_low_time is the duty cycle of the first pulse. If an actual time is specified, it must be less than the period. If no high or low time is specified the default duty cycle is 50%. The default units for high_or_low_time is ns, but the number can be followed by % or by ps, ns, us or ms if you want to specify an actual time measurement.
The PERIOD constraint is forward traced in exactly the same way a TNM would be and attaches itself to all of the flip-flops that the forward tracing reaches. If a more complex form of tracing behavior is required (for example, where gated clocks are used in the design), you must place the PERIOD on a particular net or use the preferred method described next.
The preferred method for defining a clock period allows more complex derivative relationships to be defined as well as a simple clock period. The following attribute is attached to a TIMESPEC symbol in conjunction with a TNM attribute attached to the relevant clock net.
Schematic syntax in a TIMSPEC symbol
TSidentifier=PERIOD TNM_reference period {HIGH | LOW} [high_or_low_time]
UCF syntax
TIMESPEC TSidentifier=PERIOD TNM_reference period {HIGH | LOW} [high_or_low_time];
identifier is a reference identifier that has a unique name.
TNM_reference is the identifier name that is attached to a clock net (or a net in the clock path) using a TNM attribute.
The variable name period is the required clock period. The default units for period are nanoseconds, but the number can be followed by ps, ns, us, or ms. Units may be entered with or without a leading space, and are case-insensitive. The HIGH|LOW keyword indicates whether the first pulse in the period is high or low, and the optional high_or_low_time is the polarity of the first pulse. If an actual time is specified, it must be less than the period. If no high or low time is specified the default duty cycle is 50%. The default units for high_or_low_time is ns, but the number can be followed by % or by ps, ns, us, or ms if you want to specify an actual time measurement.
Example
Clock net sys_clk has the attribute tnm=master_clk attached to it and the following attribute is attached to a TIMESPEC primitive.
Schematic syntax in a TIMESPEC symbol
TS_master=PERIOD master_clk 50 HIGH 30
UCF syntax
TIMESPEC TS_master=PERIOD master_clk 50 HIGH 30;
This period constraint applies to the net master_clk, and defines a clock period of 50 nanoseconds, with an initial 30 nanosecond high time.
The preferred method of defining a clock period uses an identifier, allowing another clock period specification to reference it. To define the relationship in the case of a derived clock, use the following syntax.
Schematic syntax in a TIMSPEC symbol
TSidentifier=PERIOD TNM_reference another_PERIOD_identifier
[{/|*}number] [{HIGH|LOW} high_or_low_time]
UCF syntax
TIMESPEC TSidentifier=PERIOD TNM_reference another_PERIOD_identifier
[{/|*}number] [{HIGH|LOW} high_or_low_time];
Example
A clock net has the attribute tnm=slave_clk attached to it and the following attribute is attached to a TIMESPEC primitive.
Schematic syntax in a TIMESPEC symbol
ts_slave1=PERIOD slave_clk TS_master *4
UCF syntax
TIMESPEC ts_slave1=PERIOD slave_clk TS_master *4;