We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 12166

4.2i Foundation Simulator - Multiple "clock" keywords use the same period for all clocks


Keywords: simulator, clock, foundation, stepsize, CMD, script

Urgency: Standard

General Description:
When I specify two clocks in a command script using the "clock and step size" method, only one clock is used for both signals in simulation.

For example:

clock CLK100 0 1
stepsize 5ns
clock CLK150 0 1
stepsize 3.35ns

How do I use both clocks in simulation?



One way to use both clocks in simulation is to utilize a WFM keyword as follows:

wfm CLK100 @0ns=0\h (5ns=H 5ns=L)*15 |clock 2
wfm CLK150 @0ns=0\h (3.35ns=H 3.35ns=L)*40 | clock 1


In the example above, the step size may only have one value -- it will keep the value of the last definition (3.35ns in this case). Multiple clocks can be defined with the same step size.

For example:

stepsize 2.5ns
clock CLK200 0 1
clock CLK100 0 0 1 1
clock CLK50 0 0 0 0 1 1 1 1

Each digit represents one step.

Uneven clock steps may also be defined.

For example:

stepsize 5ns
clock CLKU 0 0 1 0 0 1 1 0 0 1 1 1

This creates a clock with three High pulses of different lengths (5 ns, 10 ns, 15 ns) that are separated by 10 ns Low pulses. This sequence will repeat for the length of the simulation.
AR# 12166
Date 08/11/2003
Status Archive
Type General Article