|
CS/ECE 3810 -
Computer Organization
Fall 2008 |
Extra Credit
Due Friday, December 19
The extra credit problem centers around the design and analysis of an imaginary computer system. The requirements for this computer system are given in the next section. Students have two options for earning the extra credit:
All work should either be typed, or very neatly written. There are three possible grades for the extra credit work:
Your goal in completing the extra credit should be to make sure you understand the material, and to convince me that you deserve a better grade.
The embedded system must read one hundred 16-bit words from an input sensor, sort the words (as unsigned data), and write the sorted words out to an output device. It must then repeat this process over and over again. As you design your system, keep in mind that a faster part will result in more profit to the company (and to you). The goal is to process as much data each second as possible.
Constraints: Your computer system will be placed on a chip with other components and is subject to the following constraints:
(Note that on a cache miss, each design type will have to wait extra clock cycles for memory data to become available.)
You may use up to 10 registers in your design (including PC, but not including pipeline stage registers).
You may assume that you have ALU(s) equivalent to the ALU we studied in class. It can add, subtract, do any logic operation, compare values, detect overflow, detect carry out, and detect zero. Assume that the ALU only operates on unsigned data.
Since memory is limited, it is up to you to decide how to put all the data and instructions in memory.
The cache may be split into two caches if you like. Also, the cache supports simultaneous reads and writes.
As you design your instruction set, you must allocate a fixed number of bits in the encoded instructions for the opcode. If you allocate n bits for the opcode, then you can have at most 2n instructions. In addition, if you allocate n bits for opcodes, but you include more than n instructions in your design, your CPU clock period will increase according to the following formula:
Round down. Example: Assume you designed a pipelined processor. If, when deciding on how to encode instructions you allocate 4 bits for the opcode, but your instruction set has 10 instructions, you will have to add 2 ns to the clock period. This would make the clock period for this pipelined design 3 ns.
You may decide to use memory-mapped I/O, or specialized instructions for reading and writing data. If you use memory-mapped I/O, you will need a memory controller. Assume the memory controller adds 1 ns of latency to all accesses to main memory and to the I/O. If you use specialized instructions, you will need additional data paths in and out of the processor. In this case, assume that your I/O instructions add 5 ns of latency (in addition to the I/O latency) for every I/O instruction.
Remember that memory and cache are limited, so keep your program small.
Provide a block diagram (similar to those in Chapter 5 and 6) that shows the major components of your CPU along with control lines and data paths. (I recommend using different colors to make your diagram easy to read.)
You may assume that your CPU interfaces with cache memory directly, and that cache memory may be split into two caches. (See the constraints above, this simplifies building the diagram.)
In addition, if you use specialized instructions for accessing the I/O units, draw the required datapaths in your processor design.
Provide a few short paragraphs explaining your design decision.
Main memory: Specify the memory architecture for your system. How will memory be addressed? How will it be organized? Are there alignment restrictions? You must make sure that your memory design fits within the allotted number of bits.
First, list your memory design specifics in a short table. Then write a few short paragraphs justifying your memory design. In addition, you should draw and label a diagram that indicates where data and instructions will be stored in memory.
Cache: Specify a cache architecture (in detail). If you include a branch prediction unit, include it as well. You must make sure that your cache design fits within the allotted number of bits.
First, list your cache design specifics in a short table. Draw the cache(s). Then write a few short paragraphs justifying your design.
Instruction set design: List all of the instructions available to the programmer. Your instructions must be supported by your CPU design. Give the following information for each instruction:
Machine language encoding: How is this instruction converted to a numeric code? Show how many bits will be used to identify the opcode, arguments, registers, immediates, etc.
CPU operation: How will your CPU design execute this instruction? Give an indication of which control lines will be set and how data will flow through the processor.
CPU timing: Indicate how much time the instruction will take to complete. Also list any known hazards or stalls that may be encountered. (Note that in my solution I do not provide this information - it is part of the analysis stage for extra credit #1 and #2.)
In addition, draw a block diagram that shows the CPU, cache, main memory, the I/O units, and a memory controller (if needed) all connected together with data buses. Explain your design decisions in a few short paragraphs.
Software: Given your design and your instruction set, write the program that will perform the data operation. Your program must read 100 16-bit words from the input, sort them, and write them to the output.
Comment your code, and indicate the memory address of the first line of code, the last line of code, and any labeled lines of code. Also, if you use memory for storing variables, list these memory addresses alongside the variable labels. Your code should resemble a complete assembly language program.
It should be easy to verify your code by looking at it. If necessary, change your opcodes so that they are easy to decipher visually.
Justify each answer by showing your work and explaining the result! No credit will be given if you just show numbers.
In addition, you should total up the time required for each major portion of the program, and give a grand total for how long the program will take to do one set of data.
How many times a second will this design read, sort, and write one set of data?
This is the bulk of this part of the extra credit. Make sure to spend the time needed to get it right. Show your work, and give written explanations for each step you take.
Write three short paragraphs, one for each possible improvement.
Page updated Sunday November 30, 2008 at 15:21:04.