Bus-Based Computer Systems Flashcards
What is the function of a CPU bus?
allows memory, CPU, and devices to communicate
What is a bus?
a set of wires/communication protocol
What determines how devices communicate?
bus protocol
What happens to devices on the bus?
they go through a sequence of states
What are protocols specified by?
state machines
How many state machines per actor are there in the protocol?
one
Can bus protocols contain asynchronous logic?
yes
What are the steps of the four-cycle handshake?
dev 1 raises enquiry, dev 2 responds with acknowledgment, device 2 lowers acknowledgment once it is done, device 1 lowers enquiry
What provides synchronization in microprocessor busses?
the clock
R/W bit is true during what action?
reading
What is the name of the signal for when the data is ready?
Data ready bit
Address and data are how many lines?
a or n bit bundles of address and data lines (respectively)
How is the behavior of a bus most often specified?
a timing diagram
What are shown on timing diagrams to make sure signals go to the proper values at the proper times?
timing constraints
What must be provided when the data is ready?
Acknowledge
What does the data ready signal allow for?
the bus to be connected to devices that are slower than the bus
What is the wait state?
the cycles between the minimum time at which data can be asserted and when it is actually asserted
What is the wait state used for?
to connect slow, inexpensive memories to buses
What is DMA?
direct memory access which performs data transfers without executing instructions
What device sets up a data transfer?
the CPU
What does the DMA engine do during a data transfer?
fetches and writes data
What is a bus master by default?
CPU, sets up transfers
What must the DMA do to perform its work?
become the bus master
What is the bus mastership protocol?
bus request (DMA controller->CPU) then bus grant (CPU->DMA controller)
What is the operation of the DMA?
CPU sets DMA registers for start address and length, status register controls the unit, once DMA is bus master, transfers automatically
What do multiple busses allow for?
parallelism
What connects two busses?
a bridge
What are the two ARM AMBA bus varieties?
AHB and APB
What is the performance characteristic of the AHB bus variety?
high-performance
What are the cost/performance characteristics of the APB bus variety?
lower-speed, lower cost
What can the AHB bus variety support?
pipe-lining, burst transfers, split transactions, multiple bus masters
What is one of the key characteristics of the APB bus variety?
all devices are slaves
What types of memory is there?
DRAM, SRAM, and flash
What can vary with each type of memory?
capacity and width
What is DRAM?
dynamic random-access memory, requires refresh since the values inside the memory cells decay over time
What is SDRAM?
synchronous dynamic random-access memory, uses clock to improve performance and pipeline memory access
What are some current forms of SDRAM?
DDR (double-data rate) like DDR2 or DDR3
What is the dominant type of DRAM?
SDRAM
What is ROM?
Read only memory
What is a dominant form of field programmable ROM?
flash
True or false: ROM can only be field-programmable?
false, can be programmed at factory as well
What are some characteristics of flash?
electrically erasable, must be block erased, random access, but write/erase is much slower than read
What is the flexible type of flash?
NOR
What is the dense type of flash?
NAND
True or false: flash memory is volatile?
false
Can flash memory be programmed in circuit?
yes
What is a negative about flash memory?
writing causes wear that eventually destroys the device, lifetime of approximately 1 mil writes
What are the types of flash memory?
NAND and NOR
Why is NAND the preferred type of flash?
cheaper, faster erase, and sequential access times
What is the difference between a timer and a counter?
timer is incremented by a periodic signal and a counter is incremented by and async occasional signal
What can cause interrupt with timers and counters?
rollover
What is a watchdog timer?
a timer periodically reset by system timer
What happens if a watchdog is not reset?
it generates an interrupt to reset the host
How do you do digital to analog conversion?
use a resistor tree
For an analog to digital conversion how many comparators do you need for N-bits?
2^n
What is another way to convert from analog to digital?
dual-slope conversion
How does dual-slope conversion eliminates non-linearities?
charging then discharging
Why does a switch need to be debounced?
to eliminate mechanical bouncing
How does an encoded keyboard work?
array of switches is read by an encoder, N-key rollover remembers multiple key depressions
What must a LED use to limit current?
a resistor
What kind of input can a 7-segment LCD display use?
parallel or multiplexed
What is the dominant form of high-resolution displays?
LCD (liquid crystal display)
What are some other types of high-resolution displays?
plasma, OLED
What holds the current display contents in a display?
frame buffer
What are display contents written and read by?
processor and video (respectively)
What is the input device for a touchscreen?
two-dimensional voltmeter
What are the two considerations for architecture?
software and hardware
What are the considerations for hardware architecture design?
CPU, bus, memory, and I/O devices
What are the considerations for software architecture design?
division among people, conceptual organization, performance, testability, maintenance
Does the software design affect the hardware design and vice versa?
yes
What are evaluation boards?
boards designed by CPU manufacturer that have CPU, memory and some I/O devices and often a prototyping section, can be used to start designing a custom board
How can you add logic to a board?
PLDs, FPGAs, and ASICs
What is the purpose of a PLD?
provides low/medium density logic
What is the purpose of a FPGA?
provides more and higher-level logic
What is the purpose of an ASIC?
(application-specific integrated circuit) made for a single purpose
What is a platform?
the PC
What are the advantages and disadvantages of a PC as a platform?
pros: cheap and easy to get, familiar software environment, cons: requires a lot of hardware resources, not well adapted to real time
What are some typical busses in a PC?
PCI (peripheral component interconnect) and USB (universal serial bus)
What are some software elements in a PC?
BIOS (low-level system software to implement low-level functions)
What is the typical way for embedded software design?
host/target design
What is host/target design?
use a host system to prepare software for target system
What are some host-based tools?
cross compiler (compiles code on host for target), and cross debugger (displays target state and allows target to be controlled)
What is a software debugger?
a monitor program residing on the target that provides basic debugger functions
What do we need to be careful about with the program?
it should not destroy debugger program but should be able to recover some in case of damage caused by user code
What is a breakpoint?
allows user to stop execution, examine state, and change state
How does a breakpoint work from the instruction level?
replaces breakpointed instruction with a subroutine call to the monitor program
What are the actions of the breakpoint handler?
save registers, allow user to examine machine, restore system state before returning
What is the safest way to execute the breakpointed instruction?
replace it, execute in place, put another breakpoint after the replaced breakpoint to allow restoring the original breakpoint
What is an in-circuit emulator?
a specially-instrumented microprocessor that allows you to stop execution, examine CPU state, and modify registers
What is a logic analyzer?
an array of low grade oscilloscopes
What are the ways to exercise code?
run on: host, target, instruction-level simulator, cycle-accurate simulator, and hardware/software co-simulation environment
What makes debugging difficult in real-time code?
bugs can cause non deterministic behavior and may be timing dependent
Which elements does the performance depend on?
all: CPU, cache, bus, main memory, I/O device
Which components does bandwidth apply to?
memory, bus, CPU fetches
What is the bandwidth dependent on?
the clock rate and the width
How do you increase the bandwidth?
increase width or clock rate
How do you calculate the transfer time?
t (transfer time) = T (transfer cycles) * P (period of one cycle)
How do you calculate transfer cycles?
Tbasic(N) = (D+O)*N/W (N=bytes to transfer W=bus width T=#of bus clock cycles P=bus clock period D=data transfer clock cycles O=overhead clock cycles)
True or false: Memories of the same size always have the same aspect ratios.
false, can have different
Where can you find the memory component access time?
chip data sheet
What allow for faster access for successive transfers on the same page?
page modes
What can speed things up?
parallelism
When does DMA provide parallelism?
if the CPU doesn’t need the bus