This homework has 3 parts and covers floating point representations and the first half of the Σniac circuit project. You have to do parts 1 and 2 by yourself, but on part 3 you may work in groups of two, or by yourself if you prefer.
Copy the program floattest.c from ~schar/cs202/hw9/ into your directory, and complete it. The program is supposed to "dissect" a floating point number into its components. The function of the program should be clear from reading the skeleton provided. In the same directory there is also a sample executable that works for a restricted set of inputs. You can compare the output of the sample program to the output of your program to make sure it works. Submit your completed program, as well as a text file "sampleout.txt" containing the output of your program when run on the following test cases (copy and paste from the terminal):
./floattest 0 ./floattest 1 ./floattest 1.5 ./floattest 3.14159265 ./floattest -.2 ./floattest 3755.8042 ./floattest 1.234e-20
This is the first half of the Σniac circuit project, in which you will implement most of the components of the circuit, and connect them with buses. For the final homework you will add the control circuitry that will bring your Σniac to life.
A Accumulator — 8 bits IC Instruction counter — 5 bits MA Memory address register — 5 bits MB Memory buffer — 8 bits OP Opcode register — 3 bits B B register (for second operand) — 8 bits
These registers are interconnected in the following way (the circles represent tri-state buffers):
Create a new circuit file "zniac.circ" to implement this diagram.
The 5-bit wire bundle on the left will come from the output of the MA register. Add pins for "read" and "write" signals. Add gates to decode the upper two address bits (a3, a4) to select the correct memory chip as follows:
Your main job for this homework is to come up with a clean layout to connect all components as shown in the block diagram above. Once you have everything connected, you should test your circuit by setting the control signals. Double-click on the ROM and RAM contents to change them. Initially, with all signals set to 0 and after pushing the reset button, all displays should show 0, except for the data lines, which should be in "Z" mode. When you set read=1 you should see the contents of memory cell 0 on the data lines. With IC+1->IC=1 and ld_IC=1, pushing the clock button should cycle IC=00, 01, 02, ..., 1e, 1f, 00. You can test your entire circuit in this manner. In the final homework of the semester you'll add the circuitry to generate these signals automagically.
For parts 1 and 2, submit your files written.pdf, floattest.c, and sampleout.txt. Make sure all files contain your name. For part 3, if you work in a team, only one team member should submit your file zniac.circ, with both names shown on the main circuit. Upload all files using the HW 9 submission page by 5pm on the due date.