Tutorial Part 2: Using the Synopsys Simulator

  1. Simulation Part
    1. At the Unix prompt:
      vhdlsim tb
    2. Trace some signals. In the simulator, type trace /tb/A . This will bring up the simulator window and trace the signal A in the entity tb.

      The first time you do this, Synopsys needs to go through an annoying "Font enumeration" process. This only happens the first time you use it on a particular system.

      Now, trace the B and C signals by typing

      trace /tb/B
      trace /tb/C
    3. Simulate. In the simulator, type run 1000 . This runs the simulation, tracing the indicated signals, for 1000 ns.
    4. The Waveform Viewer:
      • The zoom buttons: Z+, Z-
      • Create a marker: <-|->

      If you zoom in enough, you will see that the C signal changes 4 ns after the input signals, because of the 4 ns propogation delay in the model (2 ns from each gate).

    5. Leave the simulator. Type quit .
  2. Automate the simulator startup. At unix prompt:
    emacs sim.scr &

    Uncomment the lines:

    trace /tb/A
    trace /tb/B
    trace /tb/C

    and

    run 1000

    Next time you start/restart the simulator, it will automatically trace these signals and run for 1000 ns.

  3. Gracefully Exit
    1. First, exit the simulator by typing quit (if you're still there).
    2. You can safely delete everything in the work/ directory, it's just taking up disk quota and you can re-analyse if you need to. The command rm -rf work/* removes everything in the directory.
    3. Check
      ps -u userid

      If there are still any Synopsys-related processes running, you should kill them:

      kill PID

[ Go back to part 1 | Go on to part 3 ]


Copyright © Greg Baker, last modified 2003-06-26.