Step 8: Using Cursors, Markers, and Measuring Time - 2024.1 English

Vivado Design Suite Tutorial: Logic Simulation (UG937)

Document ID
UG937
Release Date
2024-06-12
Version
2024.1 English
The Finite State Machine (U_FSM) module used in the top level of the design generates three different sine-wave select signals for specific outputs of the SineGen block. You can identify these different wave selections better using Markers to highlight them.
  1. In the Waveform window, select the /testbench/dut/sineSel[1:0] signal.
  2. In the waveform sidebar menu, click the Go to Time 0 button .

    The current marker moves to the start of the simulation run.

  3. Enable the Snap to Transition check box in the General tab of the settings window to snap the cursor to transition edges.
  4. From the waveform toolbar menu, click the Next Transition button .

    The current marker moves to the first value change of the selected sineSel[1:0] signal, at 3.5225 microseconds.

  5. Click the Add Marker button .
  6. Search for all transitions on the sineSel signal, and add markers at each one.

    With markers identifying the transitions on sineSel, the Waveform window should look similar to the following figure. As previously observed, the low-frequency signals are incorrect when the sinSel signal value is 0.

    You can also use the main Waveform window cursor to navigate to different simulation times or locate value changes. In the next steps, you use this cursor to zoom into the Waveform window when the sineSel is 0 to review the status of the output signal, sine[19:0], and identify where the incorrect behavior initiates. You also use the cursor to measure the period of low-frequency wave control.



    Tip: By default, the Waveform window displays the time unit in microseconds. However, you can use any measurement you prefer while running or changing the current simulation time, and the Waveform window adjusts accordingly.
  7. In the Waveform window, click the Go to Time 0 button , then click the Zoom in button repeatedly to zoom into the beginning of the simulation run.
  8. Continue to zoom in the Waveform window as needed, until you can see the reset signal asserted low, and you can see the waveform of the clock signals, sys_clk_p and sys_clk_n, as seen in the following figure.

    The Waveform window zooms in or out around the area centered on the cursor.

  9. Place the main Waveform window cursor on the area by clicking at a specific time or point in the waveform.

    You can also click on the main cursor, and drag it to the desired time.

  10. Because 0 is the initial or default FSM output, move the cursor to the first posedge of sys_clk_p after reset is asserted low, at time 102.5 ns, as seen in the following figure.

    You can use the Waveform window to measure the time between two points on the timeline.

  11. Place a marker at the time of interest, 102.5 ns, by clicking the Add Marker button .
  12. Click to select the marker.

    The Floating Ruler option that is available in the General tab of waveform Settings displays a ruler at the bottom of the Waveform window useful for measuring the time between two points. Use the floating ruler to measure the sineSel control signal period, and the corresponding output_sine[19:0] values during this time frame.

    When you select the marker, a floating ruler opens at the bottom of the Waveform window, with time 0 on the ruler positioned at the selected marker. As you move the cursor along the timeline, the ruler measures the time difference between the cursor and the marker.

    Tip: Enable the Floating Ruler checkbox from the General tab of Waveform Settings, if the ruler does not appear when you select the marker.


    You can move the cursor along the timeline in a number of ways. You can scroll the horizontal scroll bar at the bottom of the Waveform window. You can zoom out, or zoom fit to view more of the timeline, reposition the cursor as needed, and then zoom in for greater detail.

  13. Select sineSel from the list of signals in the Waveform window and use the Next Transition command to move to the specific transition of interest.

    As shown in above figure, the ruler measures a time period of 3.420 ns as the period that FSM selected the low frequency output.