Homework 2
Due Monday, November 2

Problem I:

Use Chipmunk to design a memory system for a computer having 64K 16-bit words and 16-bit addresses (one word per address). Your design must consist of SRAM8K memory chips, and a bus, the latter consisting of address (16), data (16), clock and read/write lines (and no other lines).

Ordinarily a CPU would be attached to the bus. It would generate the quantities on the address bus, and consume (for memory reads) and generate (for memory writes) the quantities on the data bus. However, we will not have that here; instead, just attach Digital Hex Keypads, Hex Displays, Digital Switches and Digital Pulse Generative Switches to the proper bus lines, to play the role of the CPU and to check the operation of your circuit.

You are welcome to use miscellaneous components such as MUXes, decoders and so on, but it is required that addresses and data be communicated via the bus.

You will need two memory chips per memory system word. Use "high-order" interleaving to determine which pair of memory chips a given system word is assigned: The first ("zero-th") pair of chips will contain system words 0-8K, the next pair 8K-16K and so on. The name "high-order" comes from the fact that the high bits of an address determine which pair of chips the word is in. (The example in the notes uses high-order interleaving.)

In order to simplify your work and have a less cluttered screen, you may wish to use diglog's "module" feature. Make a module consisting of a pair of SRAM8K chips, and then use as many modules as you have pairs.

Problem II:

Re-do Problem I using a low-order interleaving scheme. Here word 0 will be in the zero-th pair of chips, word 1 in the first pair, word 2 in the second pair, word 3 in the third pair, ..., word 8 back in the zero-th pair again, word 9 in the first pair, and so on. Here the low-order bits determine the pair.

Problem III:

Implement the ALU portion of the CPU at the end of the lecture notes. Assume word size is 8 bits.

The ALU will have the following inputs:

The outputs will be:

Use Hex Keypads for your inputs and Hex Displays for the outputs.