CSCI 2321 (Computer Design), Spring 2017:
Homework X2

Credit:
Up to 50 extra-credit points. (But be advised that you can't get more than 50 extra-credit points on this assignment and Homework X1 combined.)

Overview

This set of extra-credit problems covers mostly material from the second part of the course, though there are some problems related to earlier material as well. You can do as many as you like, but you can only receive a total of 50 extra points on this assignment and Homework X1 combined.

NOTE that the usual rules for collaboration do not apply to this assignment. More in the following section.

Honor Code Statement

Please include with each part of the assignment the Honor Code pledge or just the word ``pledged'', and the statement ``This assignment is entirely my own work'' (where ``my own work'' means ``except for anything I got from the assignment itself, such as starter code, or from the course Web site or sample solutions to other assignments). For this assignment you should not work with or seek help from other students or from tutors, but you can consult other sources (other books, Web sites, etc.), as long as you identify them.

Problems

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).

  1. (Optional: Up to 5 extra-credit points.) One of the questions on Exam 2 asks you about additions to the table of ALU control signals in Figure B.5.13 of the textbook: Each line in the table represents a combination of control inputs (Ainvert, Bnegate, and a 2-bit Operation) to the design shown in Figures B.5.10 and B.5.12. The table doesn't include all 16 possibilities for these inputs, perhaps because some of them don't correspond to actual MIPS instructions. What operation would a line for values 1011 represent? (Hint: It may be helpful to review how values 0111 cause the circuit in B.5.12 to compute slt on the two inputs.)

  2. (Optional: Up to 10 extra-credit points each.) One of the homeworks asked you to describe what changes would be needed to the single-cycle implementation sketched in Figure 4.24 of the textbook to allow it to execute additional instructions. For each of the instructions below, describe what would be needed in order to support it. Specifically:

    The instructions:

    (You can do any or all these.)

  3. (Optional: No maximum, though as a rough guideline a page or so of prose will likely get you about 5 points.)

    In this course we focused on the MIPS architecture and its assembly language because it's simple and regular, and in theory once you have this background you should be well-prepared to learn about other architectures and their assembly languages. Choose some other architecture (x86 comes to mind, but there are others) and write a one-page-or-so executive-level summary of how it compares to the MIPS architecture (e.g., does it also have a notion of general-purpose registers, what if any special-purposes registers does it have, how do (some of) the instructions compare to those used in MIPS, etc.). Include a list of the sources you consulted (parts of the textbook, Web sites, etc.) You can even do this more than once for several different architectures.

  4. (Optional: No maximum, though as a rough guideline a page or so of prose will likely get you about 5 points.)

    For testing MIPS assembler programs we used a simple emulator (SPIM). Based on a very quick Google search it appears that there are other tools that provide similar or greater functionality (cross-compilers that generate MIPS assembler or object code from C code. full-fledged virtual machines that implement the MIPS architecture.) Find one or more that seem to you likely to be useful for this course and explain why you think it would be useful and what would be involved in installing it.

Programming Problems

Do the following programming problems. You will end up with at least one code file per problem. Submit your program source (and any other needed files) by sending mail to bmassing@cs.trinity.edu with each file as an attachment. Please use a subject line that mentions the course and the assignment (e.g., ``csci 2321 hw X2'' or ``computer design hw X2''). You can develop your programs on any system that provides the needed functionality, but I will test them on one of the department's Linux machines, so you should probably make sure they work in that environment before turning them in.

  1. (Optional: Up to 30 extra-credit points each.) Some of the homeworks and exams had you do things that (should?) seem very automatable. For any or all of the following tasks, write a program in a high-level language to perform it. You can use any high-level language I can easily test from the command line on one of our classroom/lab Linux systems. (For many of you Scala is likely to be your first choice, though C++ might appeal to some, or possibly Python.) Your program must include comments explaining what it does and its limitations (e.g., ``only works for the following list of instructions''), a brief explanation of how to use it, and an example of suitable input. (Some of these are pretty ambitious but all seem interesting?)



Berna Massingill
2017-05-07