The TimingDiagram class controls all functions related to drawing the timing diagram. Multiple timing diagrams can be viewed and edited in separate tab windows. A command manager implements Undo and Redo functions for most all the functions. Some of the functions use multiple commands that are executed together as one command from a linked list of commands.
Adds a DigitalClock to the timing diagram. A DigitalClock instance is required as the argument. This function is undoable and redoable and is the same as adding a clock from the GUI
td.addDigitalClock(myClock)
Adds a DigitalClock to the timing diagram. It creates a new instance of a DigitalClock object using the arguments. This function is undoable and redoable.
Returns a DigitalClock object that can be used by other routines. The name, frequency, duty cycle, rise time, fall time, start delay, start state, and height can be changed using updateDigitalClock()
dclk = td.addDigitalClock("CLK25",25e6,"H")
Adds a DigitalClock to the timing diagram. It creates a new instance of a DigitalClock object using the arguments. This function is undoable and redoable.
Returns a Digital Clock object that can be used by other routines. The name, frequency, duty cycle, rise time, fall time, start delay, start state, and height can be changed using updateDigitalClock()
dclk = td.addDigitalClock("CLK25",25e6,"H",40)
Adds a DigitalBus to the timing diagram. The DigitalBus instance is required as the argument. This function is undoable and redoable and is the same as adding a clock from the GUI
td.addDigitalBus(myBus)
Adds a DigitalBus to the timing diagram. It creates a new instance of a DigitalBus object using the arguments. This function is undoable and redoable.
Returns a DigitalBus object that can be used by other routines needed to do timing analysis. The parameters can be changed using updateDigitalClock. The stateFormat can be “Hex”, “Bin”, “Dec”, or “Text”
dbus = td.addDigitalBus("ADDR[15:0]","Z","Hex")
Adds a DigitalSignal to this timing diagram. It creates a new instance of a DigitalSignal object using the arguments. This function is undoable and redoable.
Returns a DigitalSignalobject that can be used by other routines. The parameters can be changed using updateDigitalSignal(). The start state of signal can be “H” or “L” or “Z”
dsig = td.addDigitalSignal("GNT_N","H")
Adds a DigitalSignal to the timing diagram. A DigitalSignal instance is required as the argument. This function is undoable and redoable. The parameters can be changed using updateDigitalSignal()
td.addDigitalSignal(mySignal)
Adds an Edge to a Signal. The edge is added to the signal at the specified time. The edge object contains the time and new state of the edge. Adding edges should only be used when the new edge will be last edge in the signal. Use addPulse() to change the state of a signal otherwise. This function is undoable and redoable.
Returns the Edge object
thisEdge = td.addEdge(myBus,340.0e-9,"FF22")
Adds a Pulse to a Signal. The pulse occurs from time1 to time2. The newState argument defines the state of the pulse. This actually adds 2 edges to the signal. This function is undoable and redoable
td.addPulse(mySignal,50.0e-9,100.0e-9,"H")
Adds a PulseWidthLabel between two edges. The label is can be displayed on the left, right, or center of the edges.
td.addPulseWidthLabel(edge1,edge2,"t_min","Center")
Adds a StateBar to an Edge. The label is displayed to the right of the line on top of the waveform. The label can be moved by specifying an offset in pixels in the X and Y directions. The line type string can be “Dashed” or “Solid”.
Ths function is undoable and redoable.
td.addStateBar(clk_edge,"","Dashed",0,0)
Adds a text label to the timing diagram above a signal. The following example adds the label “Write Transaction” 20 pixels above the top of the write_cmd signal at 50 ns
td.addTextAboveSignal("write_cmd", "Write Transaction", 50.0e-9, 20)
Adds a text label to the timing diagram below a signal. The following example adds the label “Write Transaction” 20 pixels below the bottom of the write_cmd signal at 50 ns
td.addTextBelowSignal("write_cmd", "Write Transaction", 50.0e-9, 20)
Adds a TimeWarp that begins at the startTime and ends at the endTime. startTime should be less than endTime.
td.addTimeWarp(50.0e-9,800.0e-9)
Add a User Defined Delay. The Delay is added to the second edge. Minimum, Typical and Maximum delay times are required as arguments and are used when a timing analysis is executed. The time of the second edge time is the first edge time plus the delay. This function is undoable and redoable and is the same as adding a Delay from the GUI. All other Delay parameters are set to the default values.
Returns the Delay object
tpDelay = td.addUserDelay("tpd",edge1,edge2,4.0e-9,8.0e-9,12.0e-9)
Add a User Defined Constraint. The Constraint is added to the second edge. Minimum, Typical and Maximum constraint times are required as arguments and are used when a timing analysis is executed. This function is undoable and redoable and is the same as adding a Constraint from the GUI. All other Constraint parameters are set to the default values.
Returns the new Constraint
myConstraint = td.addUserConstraint("tsetup",edge1,edge2,12.0e-9,12.0e-9,12.0e-9)
Returns the time scale of the timing diagram. Valid values are 1.-e-3 1.0e-6 1.0.e-9 1.0e-12
tScale = td.getTimeScale()
Returns an ArrayList which contains all the signals in the current timing diagram
sigList = td.getSignalList()
Sets the end time of the timing diagram.
td.setEndTime(300.0e-9)
Sets the start time of the timing diagram.
td.setStartTime(20.0e-9)
Sets the time for each large division. tpd should not include the timeScale
td.setTimePerDivision(20.0)
Sets the time scale for the timing diagram. Valid values are 1.0e-3, 1.0e-6, 1.0e-9. and 1.0e-12
td.setTimeScale(1.0e-9)
This zooms in to a window in time in the timing diagram.
td.zoomIn(300.0e-9, 800.0e-9)
This divides the time per division by 2.0.
td.zoomIn()
This multiplies the time per division by 2.0.
td.zoomOut()