YOMEDIA
Embedded software enggineering: Embedded softwarearchitectures
Chia sẻ: Duong The Anh
| Ngày:
| Loại File: PPT
| Số trang:49
54
lượt xem
5
download
Download
Vui lòng tải xuống để xem tài liệu đầy đủ
Invite you to consult the lecture content "Embedded software engineering: Embedded softwarearchitectures" below. Contents of lectures introduce to you the content: Round robin, function queue scheduling, real time operating systems, selecting an architecture. Hopefully document content to meet the needs of learning, work effectively.
AMBIENT/
Chủ đề:
Nội dung Text: Embedded software enggineering: Embedded softwarearchitectures
- Embedded Software Engineering
EMBEDDED SOFTWARE
ARCHITECTURES
Graduate Course
ESE
Lecturers:
Dr. Nguyen Ngoc Binh
Dr. Le Quang Minh
- Contents
• Round-Robin
• Function-Queue Scheduling
• Real-Time Operating Systems
• Selecting an Architecture
ESE by NN Binh 2
- Software Architectures
• When you are designing embedded software, what
architecture will be the most appropriate for a given system?
ESE by NN Binh 3
- Decision Factors
• The most important factor
– how much control you need to have over system
response.
• Good response
– Absolute response time requirements
– The speed of your microprocessor
– and the other processing requirements
• Few, loose reqts simple architecture
• Many, stringent reqts complex architecture
ESE by NN Binh 4
- Some Examples
• The control of an air conditioner
– This system can be written with a very simple
software architecture.
– The response time can be within a number of tens
of seconds.
– The major function is to monitor the temperature
readings and turn on and off the air conditioner.
– A timer may be needed to provide the turn-on and
turn-off time.
ESE by NN Binh 5
- Some Examples
• The software design of the control of an air
conditioner
– A simple assembly program for a low-end
microprocessor
– Inputs
• Input buttons
• Temperature readings
• Timer readings
– Output
• The on-off control of the air conditioner
• The power control
ESE by NN Binh 6
- Some Examples
• Digital telephone answering machine
– A telephone answering machine with digital
memory, using speech compression.
– The performance and functions
• It should be able to record about 30 minutes of total
voice.
• Voice data are sampled at the standard telephone rate of
8kHz.
• OGM of up to 10 seconds
– Three basic modes default/play back/OGM editing mode
ESE by NN Binh 7
- Some Examples
• The class diagram for the answering machine
ESE by NN Binh 8
- Some Examples
• The state diagram for the controls activate behavior
ESE by NN Binh 9
- Some Examples
• The software design for the answering
machine
• It must respond rapidly to many
different events.
• It has various processing requirements.
• It has different deadlines and different
priorities.
• A more complex architecture
ESE by NN Binh 10
- 4 Basic SW Architectures
• Round-Robin
• Round-Robin with Interrupts
• Function-Queue Scheduling Increasing
Complexity
• Real-Time Operating System
ESE by NN Binh 11
- RoundRobin Architecture
• Very simple
• No interrupts
• No shared data
• No latency concerns
• Main loop:
– checks each I/O device in turn
– services any device requests
• E.g.: Digital Multimeter
ESE by NN Binh 12
- RoundRobin Architecture
• The simplest architecture
ESE by NN Binh 13
- An Application
• Digital multimeter
• Measures
– R, I, and V readings
• I/O
– Two probes
– A digital display
– A rotary switch
• Function
– Continuous measurements
– Update display
ESE by NN Binh 14
- Digital Multimeter
• The possible pseudo-code
ESE by NN Binh 15
- Digital Multimeter
• Round-robin works well for this system
because:
– only 3 I/O devices
– no lengthy processing
– no tight response requirements
• Emergency control
– No such requirements
– Users are unlikely to notice the few fractions of a
second it takes for the microprocessor to get
around the loop
• Adequate because it is a SIMPLE system!
ESE by NN Binh 16
- Discussion
• Advantages
– Simplicity
– Low development cost
– Short development cycle
• Shortcomings
– This architecture cannot handle complex
problems.
ESE by NN Binh 17
- Shortcomings
• If any one device needs response in less time
– Two possible improvements for the RR
architecture
• Squeezing the loop
• Carefully arranging the sequence (A,Z,B,Z,C,Z,D,Z,…)
• If there is any lengthy processing to do
– Every other event is also postponed.
• This architecture is fragile
– A single additional device or requirement may
break everything.
ESE by NN Binh 18
- RoundRobin with Interrupts
• A little bit more control
– In this architecture,
• ISRs deal with the very urgent needs of the hardware
and set corresponding flags
• the main loop polls the flags and does any followup
processing
• ISR can get good response
• All of the processing that you put into the ISR
has a higher priority than the task code
ESE by NN Binh 19
- A Little Bit More Control
• You can control the priorities among the
ISR as well.
• The software is more event-driven.
ESE by NN Binh 20
Thêm tài liệu vào bộ sưu tập có sẵn:
Báo xấu
LAVA
ERROR:connection to 10.20.1.100:9315 failed (errno=111, msg=Connection refused)
ERROR:connection to 10.20.1.100:9315 failed (errno=111, msg=Connection refused)
Đang xử lý...