Docsity

Comp 411 Computer Organization Problem Set #7, UNC Chapel Hill, Fall 2008 - Prof. Montek S, Assignments of Computer Architecture and Organization

Toggle sidebar
bg1
Comp 411 – Fall 2008 - Page 1 of 3 - Problem Set #7
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Comp 411 Computer Organization
Fall 2008
Problem Set #7
Issued Thursday, 11/6/08; Due Thursday, 11/13/08
Homework Information: Some of the problems are probably too long to be done the night before the
due date, so plan accordingly. Late homework will not be accepted. Feel free to get help from others, but
the work you hand in should be your own.
Problem 1. “Out of Control” (20 points)
Fill in the missing entries of the Control Logic ROM in the table below, based on the data path shown
above.
pf3

Partial preview of the text

Download Comp 411 Computer Organization Problem Set #7, UNC Chapel Hill, Fall 2008 - Prof. Montek S and more Assignments Computer Architecture and Organization in PDF only on Docsity!

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Comp 411 Computer Organization Fall 2008 Problem Set # 7 Issued Thursday, 11/6/08; Due Thursday, 11/13/ Homework Information : Some of the problems are probably too long to be done the night before the due date, so plan accordingly. Late homework will not be accepted. Feel free to get help from others, but the work you hand in should be your own. Problem 1. “Out of Control” (20 points) Fill in the missing entries of the Control Logic ROM in the table below, based on the data path shown above.

Opcode PCSEL WASEL SEXT BSEL WDSEL ALUFN Sub Bool Shft Math Wr WERF ASEL sub (^0 0) X 0 1 1 XX 0 1 0 1 0 xor (^0 0 ) addi (^0 ) sll (^0 0) X 0 1 0 1 andi (^0 ) lw (^2 ) sw (^1) j (^) X XX X X 0 jal (^) X XX X X 0 lui (^0) Problem 2. “Simplified Shifts” (40 points) Lori Acan, a budding computer architect, realized that the hardware implementation of the sll, slr, sar, and lui instructions could be simplified, if they were encoded as follows: op=000000 shamt rt rd 0 func=000000 sll^ rd,^ rt,^ shamt op=000000 shamt rt rd 0 func=000010 srl^ rd,^ rt,^ shamt op=000000 shamt rt rd 0 func=000011 sra^ rd,^ rt,^ shamt op=001111 10000 rt 16 - bit immediate lui^ rt,^ imm (A) Comment on how Lori’s new encoding approach impacts the hardware implementation (i.e., relate it to the miniMIPS block diagram discussed in class, and also shown on the previous page). (B) Does Lori’s new encoding impact the hardware implementation of the variable shift instructions (sllv, srav, and srlv)? Comment briefly. Lori has also suggested that the lui instruction be replaced with the following more general instruction: op=001111 shamt rt 16 - bit immediate lsi^ rt,^ imm,^ shamt This new instruction, called lsi, works as follows: Load the specified register, rt, with the value of the signed-immediate constant shifted left by the unsigned instruction field, shamt. (C) Does Lori’s proposed lsi instruction require any additional hardware modification to the miniMIPS data path beyond those needed for her new encodings in part (A)? (D) Discuss the utility of Lori’s new instruction. Specifically, what capabilities does it provide over lui. Comment on whether lui is a subset of the lsi instruction’s functionality? (E) Discuss the implications of Lori’s choice to treat the 16-bit immediate value as a signed number. Does it impact the data path? How does the set of constants that can be generated vary in comparison to an unsigned implementation?