Functions in MIPS
Todays lecture: Implementing Functions!
The programs flow of control must be changed.
The Jump and Link (jal) instruction (NEW!)
Using Jump Register (jr)
Arguments and return values are passed back & forth.
Boolean Algebra and Its Rela1on to Gates
An Introduc+on to CS233
233 in one slide!
The class consists roughly of 4 quarters:
You will build a simple computer processor
You will learn how high-level language code exec
Number Systems (in Binary)
Represen:ng things with bits
N bits gets you 2N representa0ons
Unsigned binary number representa:on
Conver0ng between binary and decimal
Binary Addi:on & Bitwise Logica
/ Netflix has been engaged by movie studios to advertise new movies.
/ Netflix will show visitors one of 4 ads based on the kind of movie
/ they last watched.
The following characteristics of the last watched movie are
/ these are inputs to "circuit under test"
reg [1:0] T;
/ wires for the outputs of "circuit under test"
wire [1:0] M;
/ the circuit under test
movies m(M, A, F, T);
/ initial = run at beginning of simulation
# struct Puzzle cfw_
# / Given the assignment at current position, removes all inconsistent values
# / for cells in the same row, column, and cage.
# forward_checking(int position, Puzzle *puzzle) cfw_
STAT 200 Homework 2
C)I prefer bar chart since it can both compare between different groups and the
changes over time.
 57.6 54.8 63.4 57.0 54.7 42.3 63.6 55.5 33.5 63.3
 58.3 42.1 56.1 47.8 56.1 55.9 38.8 49.7 42.3
Exam 1: Combinational Design (examples will be up on PrairieLearn)
12 short answer questions from PrairieLearn Homeworks
1 Verilog combinational design problem
Exam 2: Sequential Design
1 finite state machine (FSM) design problem
Exam 3: Processor Datapat
Wri$ng Cache Friendly Code
Make the common case go fast
! Focus on the inner loops of the core func0ons
Minimize the misses in the inner loops
! Repeated references to variables are good (temporal locality)
! Stride-1 reference
We need more space!
Registers are fast and convenient, but we have only 32 of
them, and each one is just
MIPS control ow instruc1ons:
Jumps, Branches, and Loops
! Programma(cally upda(ng the program counter (PC)
! Uncondi(onal control ow
! How is it implemented?
What do you get if you connect a register to an adder?
Combina(onal Logic Design
Dierent Representa-ons of Boolean Func-ons (review)
How to design any circuit
Write a truth table
Other gates you should know