1/94
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
if statement
executes substatements when the statement's expression is true, otherwise the substatements are skipped
branch not equal (bne)
If the expression is a comparison for equality, an if statement can be converted to a simple pattern of assembly instructions
if-else statement
executes one of two possible sets of sub-statements depending on an expression's value
C programs commonly use a multi-branch form of an if-else statement
true
beq: Branch on equal
beq $t0, $t1, LBranch if $t0 equals $t1
bne: Branch on not equal
bne $t0, $t1, LBranch if $t0 does not equal $t1
blt: Branch on less than
blt $t0, $t1, LBranch if $t0 < $t1
ble: Branch on less than or equal
ble $t0, $t1, LBranch if $t0 ≤ $t1
bgt: Branch on greater than
bgt $t0, $t1, LBranch if $t0 > $t1
bge: Branch on greater than or equal
bge $t0, $t1, LBranch if $t0 ≥ $t1
while loop
has an expression and substatements. If the expression is true, the substatements execute, and then execution jumps back to check the expression again
iteration
Each execution of a loop's substatements
for loop
four parts: substatements, and three preceding parts of an initialization, an expression, and an update
function
a named group of statements that performs a specific operation
function call
involves passing arguments to the function's parameters, executing the function's statements, and returning the function's return value
local variable
declared in a function has a scope limited to the function, meaning the variable only exists when the function executes
array
variable consisting of a sequence of elements.
base address
An array's elements are stored sequentially in memory, with a starting address
string
an array of characters
null character
\0, the last element in a C string
compiler
a program that converts a program in a high-level language, like C, C++, or Java, into assembly instructions.
front end
ensures the program is valid according to the language's rules, and converts the program to an intermediate representation (IR).
optimizations
simplify the intermediate representation
back end
converts the intermediate representation to a processor's assembly instructions
program memory
refers to all memory contents used by a program, including both instructions and data. Program memory is typically organized into several regions (or segments)
code region
contains a program's instructions
text region
another word for code region
static region
contains global variables (variables defined outside any function) and static local variables (variables defined inside functions starting with the keyword "static")
stack
contains values used to call functions and may also contain a function's local variables
heap
contains all dynamically allocated memory
data region
contains data that is initialized
bss region
(short for block started by symbol -- a term carried over from early assemblers) contains data that is uninitialized
circuit
a connection of electrical components
analog circuit
components that transform analog signals, which are signals that take on continuous values, like 0.001, 2.3, or -3.333
digital circuit
components that transform digital signals, which are signals that take on only one of a few specific values, like 0 and 1
combinational circuit
a digital circuit whose output values depend solely on the present combination of input values
logic gates
A combinational circuit can be built from components like AND, OR, and NOT gates
truth table
one way to describe the behavior of a combinational circuit, listing the output value for every possible combination of input values
boolean equation
another way to describe the behavior of a combinational circuit, using operators AND (a*b or just ab), OR (a+b), and NOT (a')
minterm
term that involves all a function's variables exactly once
sum of minterms
An equation derived by ORing terms for each 1 in a truth table
multiplexor
a combinational circuit that passes one of multiple data inputs through to a single output, selecting which one based on additional control inputs
mux
short for multiplexor
select lines
A mux's control inputs
4x1 mux
spoken as "4 to 1 mux", has 4 data inputs, 1 data output, and requires 2 select inputs
decoder
a combinational circuit that converts N inputs to a 1 on one of 2N outputs
2x4 decoder
spoken as "2 to 4 decoder", converts two inputs to a 1 on one of four outputs
adder
a combinational circuit that adds two N-bit inputs, producing an N-bit sum output
timing diagram
graphically shows a circuit's output values for given input values that change over time
sequential circuit
a digital circuit whose output values may depend on present and past input values (vs. depending only on present values in a combinational circuit)
register
stores N bit values, loading new bit values when a clock input rises if a load input is 1
load input(ld)
indicates when the register should be loaded
reset input(rst)
indicates that the register's bits should be reset to 0 (having priority over ld)
All a circuit's registers may share one ___________________, whose _________________ (the instant a 0 changes to 1) synchronizes loading of all registers (like a drum beat synchronizes a marching band).
clock signal; rising edge
three-state buffer
a component that outputs y = b if input a is 1, and outputs Z if a is 0
high impedance
Z represents an electrical situation
tri-state buffer
A three-state buffer
register file
efficiently implements access to N M-bit registers
write operation
Loading a register in a register file
write port
The data input, address input, and load enable input for writing are together
read port
a register file consolidates read wires into a single 32-bit data output, 4-bit address input, and enable input
base MIPSzy
implements the lw, sw, addi, and add instructions
processor
a circuit that executes instructions
Program Counter(PC)
holds the address of the current instruction to execute
memory
a digital component that retains bit values, consisting of N words of M bits each
random access memory (RAM)
any "random" word can be quickly accessed, in contrast to older sequentially-accessed memory technologies like tape that had to first be spun or moved to access a particular word
Most RAM is __________________, meaning bit values are lost if electrical power is removed.
volatile memory
static RAM (SRAM)
typically uses 6 transistors to store each bit value, by passing the bit into a loop within those transistors
Dynamic RAM (DRAM)
typically uses 1 transistor and 1 capacitor to store each bit value, by charging the capacitor
IEC prefixes
kibi (210 or 1024), mebi (220 or 1,048,576), gibi (230 or 1,073,741,824), and tebi (240 or 1,099,511,627,776)
chip(integrated circuit or IC)
a digital circuit manufactured on a fingernail-sized piece of silicon, typically placed inside a black or silver insulating package.
Non-recurring engineering (NRE) cost
the cost to design and set up a computer chip for manufacturing
yield
the percentage of chips that are usable and free from significant defects
cache
small on-chip memory
hit
if an item's copy exists in the cache
miss
system first copies the item from memory to cache
direct-mapped cache
directly maps memory addresses to cache addresses using a subset of address bits (called the index), storing the remaining bits (called the tag) in the cache entry
index
subset of address bits
tag
remaining bits
valid bit
initially set with 0, then set with 1 upon the first copy of an item into that entry (staying 1 from then on)
spatial locality
If a program accesses a memory location, then the program will likely soon access adjacent locations too
block(line)
if a memory item doesn't exist in cache, the system usually copies that item plus several adjacent items
Some address bits are used to ________ into the block to get the proper item.
offset
write through
A straightforward cache write approach
write back
A faster cache write approach
when a processor writes data to the cache, the system marks that cache block as
dirty
thrashing
two blocks may keep replacing each other in the cache
2 way set associative cache
a cache can be designed to allow two blocks per cache address
fully associative cache
A cache where all memory blocks are looked up just by tags (so the cache essentially has only one cache address)
cache replacement policy
When copying a block into a 2-way associative cache, the system must decide which of the two existing blocks to replace
temporal locality
If a memory address was recently accessed, that word will likely be accessed again soon
LRU
replaces the least recently used block
memory hierarchy
Computers often have multiple levels of memory/storage devices
drive(hard drive)
non-volatile storage (typically disk or flash) that holds a computer's program instructions and data files even when the computer is off
non-volatile storage
maintains bit values even without electrical power.