A major revolution in digital design has taken place over the past decade. Field programmable gate arrays (FPGAs) can now contain over a million equivalent logic gates and tens of thousands of flip-flops. This means that it is not possible to use traditional methods of logic design involving the drawing of logic diagrams when the digital circuit may contain thousands of gates. The reality is that today digital systems are designed by writing software in the form of hardware description languages (HDLs). The most common HDLs used today are VHDL and Verilog. Both are in widespread use. When using these hardware description languages the designer typically describes the behavior of the logic circuit rather than writing traditional Boolean logic equations. Computer-aided design tools are used to both simulate the VHDL or Verilog design and to synthesize the design to actual hardware.
This book assumes some previous knowledge of basic digital logic and
Verilog as is covered in our book Learning By Example Using Verilog – Basic Digital Design Using a BASYS FPGA board (L-BASYS. That book, which is available from
http://www.lbebooks.com/booksandkits.htm#verilogbasys contains over sixty Verilog examples covering basic digital design of both combinational and sequential circuits. All of the examples in that book were simulated using the Aldec Active-HDL simulator. We will use the same simulator in this book. A free student version of this simulator is available from http://www.aldec.com/Downloads/default.aspx.
All of the examples in the L-BASYS book that run on the Digilent BASYS board will run on the Nexys-2 board by using the file nexys2.ucf (available from http://www.lbebooks.com/downloads.htm#verilognexys) instead of basys.ucf to define the pin numbers.
The emphasis in this book is how to implement algorithms in an FPGA using Verilog. We will illustrate the methods by developing working programs that use all of the main features of the Nexys-2 board including the VGA port, the serial port, the PS/2 port, the onboard 16 Mbytes of RAM, and the onboard 16 Mbytes of flash memory. In addition to developing many examples of special-purpose processors we will illustrate the development of a general-purpose processor by designing a Forth core for the FPGA. You will be able to write high-level Forth code, compile it to a Verilog ROM, and execute it on the Forth core that we design in this book.
Many colleagues, students and reviewers have influenced the development of this book. Their stimulating discussions, probing questions, and critical comments are greatly appreciated.
Richard E. Haskell
Darrin M. Hanna