CSCI 2321 (Computer Design), Spring 2019:
Homework 8
- Credit:
- 15 points.
Be sure you have read, or at least skimmed,
Chapter 4 up through section 4.4.
Answer the following questions. You may write out your answers by
hand or using a word processor or other program, but please submit
hard copy, either in class or in one of my mailboxes (outside my
office or in the ASO).
- (15 points)
For this problem your mission is to describe
what changes, if any, would be needed to
the single-cycle implementation sketched in Figure 4.24
to allow it to execute additional instructions:
- Would you need additional logic blocks or state elements?
If so, what?
Please be as detailed as you can;
you may want to make a copy of Figure 4.24 and mark it up.
- Would you need additional control signals?
- What values would be needed for the existing control signals
and any new ones?
(``Existing control signals'' here refers to the outputs of
the logic blocks labeled Control and ALU control.)
Hint: It might be helpful to think about what had to be
added to Figure 4.17 to have it support j (Figure 4.24).
Instructions to add:
- The existing instruction bne.
- A hypothetical instruction
lwi (for ``load word indexed'')
that loads a word from a memory location obtained by
adding the contents of two registers.
This would be an R-format instruction that
in assembly language would look like
lwi rd,rs(rt)
where rs, rt, and rd are register
numbers, and the result of executing the instruction
would be to load into register
rd the word obtained from data memory at the
address given by adding the contents of registers
rs and rt.
For simplicity,1assume that this instruction
has its own distinct opcode,
rather than having an opcode of 0
like the other R-format instructions.
(Credit where credit is due:
This question was inspired by problem 4.2 in the textbook.)
Include the Honor Code pledge or just the word ``pledged'',
plus at least one of the following about
collaboration and help (as many as apply).2Text in italics is explanatory or something for you to
fill in.
For programming assignments, this should go in the body of the e-mail
or in a plain-text file honor-code.txt (no word-processor files
please).
- This assignment is entirely my own work.
(Here, ``entirely my own work'' means that it's
your own work except for anything you got from the
assignment itself -- some programming assignments
include ``starter code'', for example -- or
from the course Web site.
In particular, for programming assignments you can
copy freely from anything on the ``sample programs page''.)
- I worked with names of other students on this
assignment.
- I got help with this assignment from
source of help -- ACM
tutoring, another student in the course, the instructor, etc.
(Here, ``help'' means significant help,
beyond a little assistance with tools or compiler errors.)
- I got help from outside source --
a book other than the textbook (give title and author),
a Web site (give its URL), etc..
(Here too, you only need to mention significant help --
you don't need to tell me that you
looked up an error message on the Web, but if you found
an algorithm or a code sketch, tell me about that.)
- I provided help to names of students on this
assignment.
(And here too, you only need to tell me about
significant help.)
Include a brief essay (a sentence or two is fine, though you can write
as much as you like) telling me what about the assignment you
found interesting, difficult, or otherwise noteworthy.
For programming assignments, it should go in the body of the e-mail
or in a plain-text file essay.txt (no word-processor files
please).
Footnotes
- ... simplicity,1
-
I'm not sure this is even doable with an opcode of 0!
- ... apply).2
-
Credit where credit is due:
I based the wording of this list on a posting to a SIGCSE mailing list.
SIGCSE is the ACM's Special Interest Group on CS Education.
2019-04-20