ECE 251 Spring 2024 — Study Guide
Mid-term exam scheduled for Wednesday, April 3rd 6:15-7:45pm ET. Please arrive on-time at 6:00pm ET.
Topic Guide for our mid-term exam:
- Design principles of computer architecture
- The design of a modern, von Neumann-based digital computer
- the definition
- the components
- the relationships among the components
- the diagram connecting the components together
- Performance of computers
- Performance theory
- execution, or response, time
- throughput, or bandwidth
- relationship between throughput and response time
- relative performance
- Measuring performance
- Relationship between performance and execution time
-
\[Performance_\text{computer X} = \left(1 \over ExecutionTime_\text{of program running on computer X} \right)\]
- Computer X is “n” times faster than Computer Y
\(n = \left (Performance_\text{computer X} \over Performance_\text{computer Y} \right) = \left ( ExecutionTime_\text{of program running on computer Y} \over ExecutionTime_\text{of program running on computer X} \right)\)
- CPU performance and its factors
- CPU execution time, or CPU time
NOTE: Htere is a distinction between performance based on elapsed time and, separately, on CPU time. System performance refers to elapsed time on an unloaded system. CPU performance refers to user CPU time. For this section, we focus on CPU performance.
- user CPU time
- system (kernel) CPU time
- \(CPU_\text{exec time for prog} = \left(CPU_\text{clock cycles for prog} \right) * \left(time_\text{clock cycle} \right)\)
or
\(CPU_\text{exec time for prog} = \left (CPU_\text{clock cycles for prog} \over freq_\text{clock} \right)\)
- Instruction performance
- Execution time is equal to the number of instructions multiplied by the average time per instruction.
- Number of clock cycles required for a program; note CPI means “Clock cycles per instruction (CPI)”
\(\text{Clock Cycles}_\text{a program} = Count_\text{of instructions for program} * CPI_\text{average}\)
- Classic CPU performance equation
- The basic performance equation in terms of instruction count (which is the number of instructions executed by the program), CPI, and clock cycle.
\(CPU_\text{time} = Count_\text{instructions of program} * CPI * CycleTime_\text{of clock}\)
or
\(CPU_\text{time} = \left (Count_\text{instructions of program} * CPI \over freq_\text{clock} \right)\)
- MIPS32 instruction set architecture (ISA)
- Registers
- User available aka “General Purpose Registers (GPR)”
- R0 through R31
- CPU-only accessible
- Program Counter (PC)
- Endian-ness
- Big Endian — MIPS32 defined
- Little Endian
- Memory addressability
- Byte-addressable — MIPS32 defined
- MIPS basic instruction formats
- Register-based
- Immediate-based
- Jump-based
- Memory layout
- Stack
- Dynamic data
- Static data
- Text
- Reserved
- Core instructions
- Arithmetic and logic
- Memory
- Branch
- Pseudo instructions
- Memory
- Branch
- Coprocessor instructions (floating point)
- Floating point coprocessor
- Single-precision vs double-precision
- Instruction formats
- Register-based
- Immediate-based
- Core instructions
- Arithmetic
- Memory
- into coprocessor FP registers (FPRs) from GPRs
- into GPRs from FPRs
- MIPS32 Assembly Programming
- Arithmetic
- Memory access
- Conditional statements
- Branching (conditional vs absolute, looping, recursion)
- Convert C to Assembly
- Convert Assembly to unlinked MIPS32 machine code (binary)
- Convert MIPS32 machine code to assembly
- Convert MIPS32 assembly code to C code
- Procedural programming
- Leaf procedure
- Nested procedure
- Recursion — implement recursive algorithms like Fibonacci, factorial, etc.
- Floating Point Math in MIPS32
- Convert a decimal number to IEEE 754-based floating point number in binary
- Single precision
- Double precision
- Convert an IEEE 754-based floating point number (in binary) to a decimal number
- Determine if the floating point binary number is +/- infinity, not a number, or a floating point number in decimal.
- Simple add, subtract, multiply, divide floating point numbers in MIPS32 assembly using the coprocessor instructions
- how to load number in from
.data
into the FP registers and back to GPRs
- SystemVerilog
- module and test bench coding
- timing definition
- use of parameters
- implement digital circuits
- full adder
- clock
- registers (D-FF)
- shift logical right and left