1/23
Flashcards covering key concepts from the Instruction Set Architecture (ISA) lecture, including ISA types, MIPS instructions, the fetch-decode-execute cycle, registers, program counter, subroutines, and stack operations.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What are the components of the von Neumann architecture?
Arithmetic/Logic Unit, Control Unit, Main Memory (Instructions and Data), Input, Output
What is the ISA?
The interface between the hardware and software.
What is an instruction set architecture (ISA)?
A set of commands that a processor can understand and execute.
Name some examples of 'families' of ISAs.
Accumulator-based ISAs and General-purpose-registers ISAs.
What are the characteristics of Reduced Instruction Set Computers (RISC)?
Small number of instructions, common operand format, instructions operate on registers (load/store architecture), instructions typically take 1 clock cycle.
What are the characteristics of Stack-based ISAs?
Instructions can only access operands at the top of a stack. Special PUSH and POP instructions are used.
What categories of instructions does the MIPS 1 ISA have?
Has the following categories of instructions: Arithmetic and logic instructions, Data transfer instructions, Control transfer instructions.
What does the MIPS instruction 'addu $d, $s, $t' do?
$d = $s + $t; unsigned addition; ignore any overflow.
What does the MIPS instruction 'sll $d, $t, constant C' do?
Shift left logical immediate – shifts $t to the left by C bits and puts the result into $d (i.e., multiplies by 2C)
What does the MIPS instruction 'lw $t,C($s)' do?
Load the 32-bit unit (“word”) that starts at MEM[$s+C] into $t.
What does the MIPS instruction 'sw $t,C($s)' do?
Store the word in $t into MEM[$s+C] and the 3 bytes following.
What does the MIPS instruction 'beq $s, $t, C' do?
If ($s == $t) jump to the instruction at PC+4+(4*C)
What does the MIPS instruction 'j C' do?
Jump (unconditionally) to the instruction at the specified address.
What does the MIPS instruction 'jr $s' do?
Jump (unconditionally) to the address contained in register $s.
What are the three steps in the fetch-decode-execute cycle?
What are registers used for?
They are holding areas for data being worked on inside the CPU. They are much faster than main memory.
What are general purpose registers?
The registers used by the arithmetic and logic instructions.
What is the program counter (PC)?
A 'special register' that you can't load and store. It is a pointer to the next instruction to be executed.
What is a return address?
The address of the next instruction in the calling routine.
Which MIPS instruction stores the return address in $31 and jumps to the subroutine at address C?
jal C
Which MIPS instruction is used to return from a subroutine?
jr $31
What is a stack?
A Last In, First Out queue mapped to adjacent locations in memory (MEM[]).
What does the stack pointer (SP) remember?
The address of the top of the stack.
Why is it important to remember the return address when calling a subroutine?
A subroutine is called from many places, so we can’t simply “hard wire” a return address into the program – we must “remember” the return address each time we make each call.