SynaptiCAD Tutorials

(Sim) 2.3 Draw the test bench waveforms

(Sim) 2.3 Draw the test bench waveforms

Previous topic Next topic  

(Sim) 2.3 Draw the test bench waveforms

Previous topic Next topic  

Draw the stimulus on the input ports of the of the MUT and the expected output on the output signals. You can draw anything and see the results, however the rest of the images shown in this tutorial will be using the timing diagram shown below. If you do not want to draw the testbench then you can copy the add4test.btim file from c:\Synapticad\Examples\TutorialFiles\Waveformer2MsimVHDL directory into the project directory.

Draw the Test Bench

Draw the following timing diagram. If you have never used SynaptiCAD's drawing environment, then read the rest of the instructions in this section and practice drawing random signals before drawing the following diagram:

add4test_drawn_td

Notice that the black waveforms are the inputs and will generate code that will drive the MUT. The blue waveforms are outputs of the MUT and represent expected outputs of the  model.

Save the changes to add4test.btim using the File>Save Timing Diagram menu, as we will use this btim file later to compare our expected results against the VCD results file generated during simulation.

Basic Drawing Instructions (Skip to Section 2.4 if you can draw the timing diagram)

The timing diagram editor is always in drawing mode, so left clicking on a signal will draw a waveform. The red state button controls the type of waveform that is drawn (high, low, tri-state, valid, invalid, weak high, and weak low). The buttons toggle back and forth between two states, and the next state is indicated by the little red T on top. Click on the state buttons to set the toggle and  next state.

6buttons

To draw the waveform of a signal:

Place the mouse cursor inside the Diagram window at the same vertical row as the signal name.The red state button on the button bar determines the type of waveform drawn. The cursor shape also mirrors the red state button

drawseq_1

Click the left mouse button. This draws a waveform from the end of the signal to the mouse cursor.

drawseq_2

Move the mouse to the right and click again to draw another segment.

Drawseq_3

Keep drawing from left to right across the diagram.

drawseq_4

Pressing the middle mouse button either toggles the state buttons or cycles through them depending on the setting in the Design Preferences dialog. Choose Options > Design Preferences menu to open the dialog.

There are several mouse-based editing techniques used to modify existing waveforms. These techniques will only work on signals that are drawn. They will not work on generated signals like clocks and simulated (purple) signals.

1) Drag-and-Drop a Signal Transitions:

To move one transition, click on the transition and drag it to the desired location.

Drag_trasition_1

To move all of the transitions on one signal, hold down the <1> and <2> number keys while dragging. Holding down just the <1> key moves all the edges to the left, and the <2> key moves all the right.

Drag_trasition_2

To move transitions on different signals, first select the transitions by holding the <CTRL> while clicking on them. Then drag the transition to desired location.

Drag_trasition_3

2) Click-and-Drag to insert a segment into a waveform:

Inside of a segment, click and drag the cursor to insert a segment

insertsegment_1

The inserted state is determined by the red state button

insertsegment_2

3) Change a segment's graphical state by selecting it and then pressing a state button:

Click in the middle of the segment to select it (so that it has a green box around it).

change_segment_1

Click on a state button to apply that graphical state to the segment. If you change a segment to same level as an adjacent section, the transition will turn red to preserve the edge data. This transition can be deleted if necessary.

change_segment_2

4) Adding virtual state Information to a segment

For Signals, double-click on the middle of a segment to open the Edit Bus State dialog, and then type in a new value into the Virtual edit box.

virtual_state_infomation

For Clocks, press the Hex button and then double-click on the middle of the segment to open the Edit Bust State dialog. If the Hex button is not pressed, the double-click will open a different dialog to allow editing of the clock.