Midterm 2 Review

Tom Kelliher, CS 220

Nov. 19, 1997

Announcements

The project and the remainder of the semester.

Assignment

For 11/24: The SPIM paper.

Midterm Review

Five questions:

  1. Addressing modes.

  2. Instruction set design.

  3. CMOS logic design.

  4. Arithmetic operations.

  5. Data structures and SAL.

Addressing Modes

  1. Effective address, location of operand.

  2. Modes: immediate, direct, register, register direct, base-displacement, PC-relative.

Instruction set design

In a nutshell, the RISC design philosophy: KISS, unless there's good reason to do otherwise.

CMOS logic design

Bits and pieces:

  1. Pull-up, pull-down and their relationship.

  2. N- and p-type transistors and where they're used.

  3. The geometrical structure of OR and AND.

Examples:

  1. .

  2. .

  3. .

  4. (two gates).

Arithmetic operations

  1. Signed add, subtract, multiply, divide.

  2. Bit-wise logical operations: NOT, OR, AND, XOR, etc.

  3. Rotates and logic and arithmetic shifts. Speeding up multiplication for some constant multipliers.

Data structures and SAL

Starting from

               .data
stack:         .word 0:128
tosPtr:        .word
arg:           .word
value:         .word
rtnAddr:       .word

               .text
__start:       la tosPtr, stack
               mul temp, 4, 128
               add tosPtr, tosPtr, temp
implement push and pop for a stack.



Thomas P. Kelliher
Tue Nov 18 11:28:33 EST 1997
Tom Kelliher