The Elements of Computing  Systems / Nisan & Schocken / www.idc.ac.il/tecs  

Project 2: Combinational Chips

Objective: Build all the chips described in Chapter 2. The only building blocks that you can use are the chips described in chapter 1 and the chips that you will gradually build in this project.

Tip: When your HDL programs invoke chips that you may have built in project 1, it is recommended to use the built-in versions of these chips instead. This will ensure correctness and speed up the operation of the hardware simulator. There is a simple way to accomplish this convention: make sure that your project directory includes only the .hdl files that belong to the present project.

Resources: The only tool that you need for this project is the hardware simulator supplied with the book. All the chips should be implemented in the HDL language specified in Appendix A. For each one of the chips  mentioned in Chapter 2, we provide a skeletal .hdl program (text file) with a missing implementation part. In addition, for each chip we provide a .tst script file that tells the hardware simulator how to test it, along with the correct output file that this script should generate, called .cmp or "compare file". Your job is to complete the missing implementation parts of all the supplied .hdl programs.

Contract: When loaded into the Hardware Simulator, your chip design (modified .hdl program), tested on the supplied .tst file, should produce the outputs listed in the supplied .cmp file. If that is not the case, the simulator will let you know.

Chip (HDL)

Function

Test script

Compare file

HalfAdder Half Adder HalfAdder.tst HalfAdder.cmp
FullAdder Full Adder FullAdder.tst FullAdder.cmp
Add16 16-bit Adder Add16.tst Add16.cmp
Inc16 16-bit Incrementer Inc16.tst Inc16.cmp
ALU Arithmetic-Logic Unit ALU.tst ALU.cmp

We recommend building the chips in the order in which they appear in the chapter. However, since the simulator features built-in versions of all the chips described in the book, you can always use these chips without defining them first: the simulator will automatically use their built-in versions.

Steps: We recommend proceeding in the following order:  

0.      The hardware simulator needed for this project is available in the tools directory of the book’s software suite.

1.      Read Appendix A (Hardware Description Language), Sections 1-6 only;

2.      Go through the hardware simulator tutorial (parts I,II,III only), available in the tutorials directory of the book’s software suite;

3.      Create a directory named projects/02 on your computer, extract project 02.zip to it, then build and simulate all the specified chips.