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: |
•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.
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 |
•Click the left mouse button. This draws a waveform from the end of the signal to the mouse cursor. |
|
•Move the mouse to the right and click again to draw another segment. |
|
•Keep drawing from left to right across the diagram. |
•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. |
|
•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. |
|
•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. |
2) Click-and-Drag to insert a segment into a waveform:
•Inside of a segment, click and drag the cursor to insert a segment |
|
•The inserted state is determined by the red state button |
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). |
|
•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. |
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. |
•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. |