CPU Flashcards
What is the UART?
universal asynchronous receiver transmitter, it provides serial communication
What is a the typical type of interface from I/O device to CPU?
digital
How many functions are integrated into the standard PC interface chip?
8251
What are serial communication parameters?
baud rate, number of bits per character, parity/no parity, even/odd parity, length of stop bit
What types of instructions can support I/O?
special purpose I/O instructions and memory-mapped load/store instructions
Which chip provides in, out instructions?
Intel x86
What kind of instructions do most CPUs use?
memory-mapped
Do I/O instructions preclude memory-mapped I/O?
no
Why is busy/wait very inefficient?
the CPU can’t do other work while testing the device and it’s hard to do simultaneous I/O
How do you efficiently check the status of I/O device?
interrupts
What does the interrupt do?
allows a device to change the flow control in the CPU and causes a subroutine call to the handle device
What does the interrupt force?
a subroutine call as the next instruction
When interrupt is triggered, how does the CPU know where to go back after the ‘subroutine call’?
the return address is saved that way it can go back to the foreground program once the subroutine call is done
How are the CPU and the device connected?
through a CPU bus
What is the CPU and device handshake?
device asserts interrupt request and CPU asserts interrupt acknowledge when it can handle interrupt
What is a priority?
determines which interrupt runs first
What is a vector?
determines what code is called for each type of interrupt (table of pointers to the interrupt handlers)
What is masking?
when an interrupt with lower priority than the current one is not recognized until the current interrupt is complete
What is the interrupt with highest priority that can never be masked called?
non-maskable priority
What is a non-maskable priority often used for?
power-down
What is the interrupt sequence?
CPU acknowledges a request, device sends vector, CPU calls handler, software processes request, CPU restores state to foreground program
What are some sources of interrupt overhead
handler execution time, interrupt mechanism overhead, register save/restore, pipeline-related penalties, cache-related penalties
What 2 types of interrupt does ARM7 support?
fast interrupt requests (FIQs), and interrupt requests (IQs)
What location does the interrupt table start at?
0
What are the CPU actions of the ARM interrupt procedure?
save PC, copy CPSR to SPSR, force bits in CPSR to record interrupt, force PC to vector
What are the handler responsibilities of the ARM interrupt procedure?
restore proper PC, restore CSPR from SPSR, clear interrupt disable flags
What is the worst case latency to respond to interrupt with ARM?
27 cycles
What is the breakdown for the latency in ARM interrupt?
2 cycles for external request synchronization, up to 20 for current instruction, 3 for data abort, and 2 to enter interrupt handling state
What it the latency period for C55x interrupt?
between 7 and 13 cycles
What are the two styles of interrupt return for C55x?
fast and slow
What are the external interrupts for the ATmega2560?
2, 3, 18, 19, 20, 21
What additional bit does the ATmega2560 have in the status register?
global interrupt enable bit
What is the interrupt vector’s relationship to priority in the ATmega2560?
lower vector = higher priority
What is one of the reasons for supervisor mode?
You may want to have a protective barrier between programs
What can supervisor mode prevent?
Memory corruption
Does C55x have a supervisor mode?
No
What does supervisor mode manage?
Various programs
What instruction do you use to enter supervisor mode?
SWI
What is SWI similar to?
Subroutine
What does the SWI instruction do?
sets the PC to 0x08, passed argument to supervisor mode code, and saves the CPSR in the SPSR
What is an exception?
an internally detected error
Fill in the blanks: Exceptions are ______ with instructions but _______.
synchronous, unpredictable
True or false: Exceptions are usually prioritized but not vectorized?
false, they are usually both prioritized AND vectorized
What is a trap?
a software interrupt that is an exception generated by an instruction
What does a trap do?
calls supervisor mode
What is a co-processor?
an added function unit that is called by instruction
How many designer-selected co-processors does ARM allow?
up to 16
Does C55x use co-processors as well?
yes
What are often structured as co-processors?
floating-point units
What are some available C55x image/video hardware extensions?
DCT(discrete cosine transform)/IDCT, pixel interpolation, and motion estimation
Which C55x devices have image/video hardware extensions?
5509 and 5510
True or false: Only one memory location is mapped onto one cache entry?
false, many are
What can you have caches for?
instructions, data, or unified data and instructions
With caches, is memory access time deterministic?
no