Transcript 投影片 1
Code Efficiency vs. Coding effort
Source
Typical Efficiency
C
Coding Effort
50-80%
Low
90-100%
Med
Compiler Optimizer
Linear ASM
Assembly Optimizer
100%
ASM
Hand Optimizer
1
High
DSP System-Level Implementation
• Traditional Structural Programming
• Real-time Framework
• Interrupt Scheduling System
2
Traditional Structured Programming
Main
Initialization()
Function1()
Function2()
3
Real-Time Framework of Operation
Main
Initialization()
while(1)
{
...wait for ever
}
Interrupt
ISR_1()
4
ISR_2()
Features and problems
• Features
– After initialization, the program usually falls into an idle
state and waits for a system event (i.e. interrupt)to occur.
An appropriate interrupt service routine (ISR) is called.
– After the ISR has completed its task, program flow falls
back into the idle state.
• Problems
– Very difficult to track events as they occur.
5
Interrupt Scheduling System
Real-time operating kernel
Software interrupt scheduler by DSP/BIOS
Main
Initialization()
ISR_1()
Return()
6
ISR_2()