Project 1
Project 1
Project 1
A typical computer architecture is based on a set of elementary logic gates like And, Or, Mux, etc.,
as well as on their bitwise versions And16, Or16, Mux16, etc. (assuming a 16-bit machine). In this
project you will build a typical set of basic logic gates. These gates form the elementary building
blocks from which you will build the computer’s CPU and RAM chips in later projects.
Below we describe the tools, resources, and implementation tips needed for completing project 1.
Objective
Build the following chips (we use the terms chip and gate interchangeably):
Nand (given)
Not
And
Or
Xor
Mux
DMux
Not16
And16
Or16
Mux16
Or8Way
Mux4Way16
Mux8Way16
DMux4Way
DMux8Way
Since Nand is considered primitive, there is no need to implement it.
Files: For each chip Xxx in the list, we provide a skeletal Xxx.hdl program, also called stub file, with
a missing PARTS section. In addition, for each chip we provide an Xxx.tst script that tells the
hardware simulator how to test the chip, along with an Xxx.cmp compare file containing the
correct outputs that the supplied test is expected to generate. Your task is writing, and testing, the
chip implementations (specifically: Completing the supplied Xxx.hdl files).
Contract: For each chip in the list, your chip implementation (modified Xxx.hdl file), tested by the
supplied Xxx.tst file, must generate the outputs listed in the supplied Xxx.cmp file. If the actual
outputs generated by your chip disagree with the desired outputs, the simulator will report error
messages.
References
HDL Guide
Chips Set API
Tutorials
The tutorials below focus on using the desktop version of the hardware simulator. Tutorials for the
online simulator, the preferred tool for this project, will be available soon. However, you can apply
the principles from these tutorials to perform similar actions in the online simulator (a major
difference is that there is no need to load any files in the online simulator).
Hardware Simulator: Intro
Building and Testing Chips
Script-Based Chip Simulation
Hardware Simulator Tutorial (click slideshow)
Consult each reference / tutorial as needed: There is no need to go through the entire resource.
Implementation Tips
0. Before implementing a chip, it is recommended to experiment with its builtin implementation.
If you are using the online simulator, simply click the builtin toggle; If you are using the desktop
version, load the builtin chip from the tools/builtInChips folder.