intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Embedded software enggineering: Embedded softwarearchitectures

Chia sẻ: Duong The Anh | Ngày: | Loại File: PPT | Số trang:49

49
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 software architectures" 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.

Chủ đề:
Lưu

Nội dung Text: Embedded software enggineering: Embedded softwarearchitectures

  1. Embedded Software Engineering EMBEDDED SOFTWARE ARCHITECTURES Graduate Course ESE Lecturers:  Dr. Nguyen Ngoc Binh Dr. Le Quang Minh
  2. Contents • Round-Robin • Function-Queue Scheduling • Real-Time Operating Systems • Selecting an Architecture ESE by NN Binh   2
  3. Software Architectures • When you are designing embedded software, what architecture will be the most appropriate for a given system? ESE by NN Binh   3
  4. 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
  5. 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
  6. 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
  7. 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
  8. Some Examples • The class diagram for the answering machine ESE by NN Binh   8
  9. Some Examples • The state diagram for the controls activate behavior ESE by NN Binh   9
  10. 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
  11. 4 Basic SW Architectures • Round-Robin • Round-Robin with Interrupts • Function-Queue Scheduling Increasing Complexity • Real-Time Operating System ESE by NN Binh   11
  12. Round­Robin 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
  13. Round­Robin Architecture • The simplest architecture ESE by NN Binh   13
  14. 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
  15. Digital Multimeter • The possible pseudo-code ESE by NN Binh   15
  16. 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
  17. Discussion • Advantages – Simplicity – Low development cost – Short development cycle • Shortcomings – This architecture cannot handle complex problems. ESE by NN Binh   17
  18. 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
  19. Round­Robin 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
  20. 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
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
3=>0