Tutorials

Contents

SPIM Tutorials

Spim is a self-contained simulator that will run MIPS R2000/R3000 assembly language programs. It reads and immediately executes assembly language code for this processor (it does not execute binary programs). Spim provides a simple debugger and minimal set of operating system services.

Spim implements almost the entire MIPS assembler-extended instruction set for the R2000/R3000. It omits some complex floating point comparisons and rounding modes and details of the memory system page tables. The MIPS architecture has evolved considerably since then (in particular, from 32 to 64 bits), which means that spim will not run programs compiled for recent MIPS or SGI processors. MIPS compilers also generate a number of assembler directives that spim cannot process. These directives can be safely deleted.

Spim implements both a simple, terminal-style interface and a visual windowing interface. On Unix, the spim program provides the terminal interface and the xspim program provides the X window interface. On PCs, PCSpim provides the Windows interface. Macs are not explicitly supported, but the Unix/X window source will compile under Mac OS X.

The following tutorials describe the various versions of SPIM.

You can download spim from the SPIM website.

VHDL Tutorial

The VHDL Tutorial introduces the basic language features that are needed to get started in modeling relatively simple digital systems. It does not comprehensively review the language. For a full coverage of the language, the reader is referred to The Designer’s Guide to VHDL, 3rd Edition, by Peter J. Ashenden (Morgan Kaufmann Publishers, ISBN 978-0-12-088785-9) or The Student’s Guide to VHDL, 2nd Edition, by Peter J. Ashenden (Morgan Kaufmann Publishers, ISBN 978-1-55860-865-8).

For an introduction to digital design using VHDL, see Digital Design: An Embedded Systems Approach Using VHDL by Peter J. Ashenden (Morgan Kaufmann Publishers, ISBN 978-0-12-369528-4).

Verilog Tutorial

The Introduction to Verilog tutorial written by John Sanguinetti is a self-study course for learning the Verilog Hardware Description Language. There are nine chapters in the course, and each chapter has a number of topics and subsections that you visit by moving around in hypertext. The tutorial includes searching features and a test to help you evaluate your learning.

For an introduction to digital design using Verilog, see Digital Design: An Embedded Systems Approach Using Verilog by Peter J. Ashenden (Morgan Kaufmann Publishers, ISBN 978-0-12-369527-7).