























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
























z
z
9 Direct Memory Access (DMA) z
- -
z
z
r1,#DEV
set up device adrs LDR r0,[r1]
read
r0,#
set up value to write STR r0,[r1]
write value to device
z
int peek(char *location)
return *location;
void poke(char *location, char newval)
(*location)
newval;
z
9 Address map for the peripherals 9 Location of the application code in the memory space Block RAM External memory z
9 The amount of memory required for storing the instructions 9 The amount of memory required for storing the data associated with the program
z
9 PPC405 uses 32-bit addresses z
9 Every PowerPC™ system should have the boot section starting at 0xFFFFFFFC z
9 Program space occupies a contiguous address space from 0xFFFF0000 to 0xFFFFFFFF 9 Stack size: 4 KB 9 Heap size: 4 KB 0xFFFF_FFFC0xFFFF_0000^ 0x0000_ Peripherals PLB/OPB Memory PLB/OPB Memory Reset Address
z Exceptions are events detected by the processor that require actionby the system software 9 Unexpected error conditions (e.g., bus error) 9 Programmed to occur (e.g., timed interval) 9 Generated by external devices (e.g., keypad) z Interrupts are automatic control transfers as a result of an exception 9 Execution of the current program is suspended after the currentinstruction 9 Some context info is saved so execution can return to the currentprogram 9 Execution is transferred to the interrupt handler to service the interrupt 9 The interrupt handler must be registered 9 The interrupt must be enabled
intr? N Y Assume priority selection is handled before thispoint. N ignore Y ack vector? Y Y N timeout? Y bus error call table[vector] intr priority > current priority?
z
9 Priorities determine what interrupt gets CPU first. 9 Vectors determine what code is called for each type of interrupt. z
z
z
9 Often used for power-down.
- -
z Peripherals connected to each other in daisy-chain manner 9 One peripheral connected to resource, all others connected“upstream” 9 Peripheral’s req flows “downstream” to resource, resource’s ack flows “upstream” to requesting peripheral 9 Closest peripheral has highest priority μP System bus Inta^ Int Peripheral Ack_in Ack_out Req_out Req_in Peripheral Ack_in Ack_out Req_out Req_in Daisy-chain aware peripherals 0
- -
z
9 Easy to add/remove peripheral - no system redesignneeded 9 Does not support dynamic priority 9 One broken peripheral can cause loss of access to otherperipherals
z
z
z
z
z
z DMA provides parallelism on bus by controlling transfers without CPU . 9 Microprocessor could handle this with ISR Storing and restoring microprocessor state inefficient Regular program must wait 9 DMA controller more efficient Separate single-purpose processor Microprocessor relinquishes control of system bus to DMA controller Microprocessor can meanwhile execute its regular program
No inefficient storing and restoring state due to ISR call - Regular program need not wait unless it requires the system bus