Verilog Quickstart: A Practical Guide to Simulation and Synthesis in Verilog, 3rd Edition

There is no magic secret to debugging a design. Debugging is a process of looking for common errors and then observing the operation of the circuit. With experience, you will develop techniques that are a combination of the commands presented here and other commands. This chapter did not list every possible interactive or debugging command, but it provides the basic, tried-and-true commands and techniques that form the basis of an effective debugging process. Table 21-6 summarizes the commands, special keystrokes, and command-line options related to debugging explained in this chapter.
| Command/Keystroke | Where Used | Description |
|---|---|---|
| -s | Invocation | Stop at time 0 before any execution |
| -1 filename | Invocation | Set the name of the log file |
| $nolog | Interactive | Turn off logging |
| $log | Interactive | Turn on logging into verilog.log file |
| $log(" filename ") | Interactive | Start logging into filename |
| . | Interactive | Continue simulation |
| , | Interactive | Single step |
| control-c | Interactive | Interrupt simulation |
| -k filename | Invocation | Set the name of the keystroke file |
| $nokey | Interactive | Turn off logging of keystrokes |
| $key | Interactive | Turn on keystroke logging into verilog.key file |
| $key(" filename ") | Interactive | Turn on keystroke logging into filename |
| -i filename | Invocation | Read in interactive commands from filename |
| $input(" filename ") | Interactive | Read in interactive commands from filename |
| $showscopes | Interactive | Show what scopes are available |
| $scope | Interactive | Change scope |
| $list | Interactive | Show source code and current values |
| $display | Interactive | Observe values |
| : | Interactive | Show current scope |
| $stop | Source code or interative | Enter interactive mode |
| -t | Invocation |