CSE 2312 - Assignments - Assignment 2

The assignment will be graded out of 100 points. Create a text document entitled answers.xxx (where you replace xxx with whatever extension is appropriate, depending on the file format you use). Acceptable file formats are plain text, Word document, OpenOffice document, and PDF. Put your name and UTA ID on the first line of the document. Submit this document to Blackboard before the deadline. You will be able to revise your answers until the deadline with no penalty.


Task 1 (20 pts.)

Suppose that we are using an instruction set with the following instructions: Consider the following program: Assume that, when the program starts executing, address1 contains integer 10, and address2 contains integer 5. Show how the instructions are executed through the pipeline step-by-step, until the program finishes running. Use a table where each row is a time step, each column is one of the 5 pipeline steps (instruction fetch, decode, operand fetch, execute operation, write back result), and at each entry in the table you show which line of code is at that specific step at that specific time (similar to how it was done in the slides, but switching rows with columns). Mark with an 'X' entries in the table where no instruction is executed.


Task 2 (10 pts.)

Part a (5 pts): For the program execution that you described in Task 1, what is the pipeline utilization percentage? In other words, what is the percentage of entries in your table that are not marked by 'X'?

In computing your answer, you should not consider the entire table. You should start from (and including) the time that the first instruction arrives at the last step of the pipeline, and you should stop at (and including) the time that the last instruction arrives at the first step of the pipeline.

Part b (5 pts): Discuss why you should not consider the entire table when measuring the pipeline utilization percentage.


Task 3 (15 pts.)

For the program in task 1, rearrange the order of instructions, so that: Multiple solutions are possible, each solution will receive credit according to how well it utilizes the pipeline.


Task 4 (15 pts.)

For your solution from Task 3, show (using a table formatted the same way as in Task 1) how this solution is executed through the pipeline, assuming (as in Task 1) that when the program starts executing, contains integer 10, and address2 contains integer 5.


Task 5 (10 pts.)

(This is Problem 1 from Chapter 2 of the textbook).

Consider the operation of a machine with the data path of Fig. 2-2. Suppose that loading the ALU input registers takes 5 nsec, running the ALU takes 10 nsec, and storing the result back to a register takes 5 nsec. What is the maximum number of MIPS this machine is capable of in the absence of pipelining?


Task 6 (10 pts.)

(This is Problem 3 from Chapter 2 of the textbook).

On computer 1, all instructions take 10 nsec to execute. On computer 2, they all take 5 nsec to execute. Can you say for certain that computer 2 is faster? Discuss.


Task 7 (10 pts.)

(This is Problem 4 from Chapter 2 of the textbook).

Imagine you are designing a single-chip computer for an embedded system. The chip is going to have all its memory on chip and running at the same speed as the CPU with no access penalty. Examine each of the principles discussed in Sec. 2.1.4 and tell whether they are so important (assuming that high performance is still desired).


Task 8 (10 pts.)

(This is Problem 7 from Chapter 2 of the textbook).

Sociologists can get three possible answers to a typical survey question such as "Do you believe in the tooth fairy?" - namely, yes, no, and no opinion. With this in mind, the Sociomagnetic Computer Company has decided to build a computer to process survey data. This computer has a trinary memory. That is, each byte (tryte?) consists of 8 trits, with a trit holding a 0, 1, or 2. How many trits are needed to hold a 6-bit number? Give an expression for the number of trits needed to hold n bits of data.


Back to the list of assignments.