b1c3bf42b7918c396ef4876f2867c0a8.ppt
- Количество слайдов: 27
Introduction to Realtime Systems & Embedded Systems B. Ramamurthy CSE 321 3/19/2018 1
The course will enable you to: Understand design embedded systems and real-time systems For real-time systems: ◦ Identify the unique characteristics of real-time systems ◦ Explain the general structure of a real-time system ◦ Define the design problems and challenges of real -time systems ◦ Apply real-time systems design techniques to various software programs. 3/19/2018 2
Course overview For embedded systems it will enable you to : ◦ Understand the basics of an embedded system ◦ Program an embedded system ◦ Design, implement and test an embedded system. ◦ Ex: realtime + embedded : heart pacemaker ◦ Ex: realtime: online video games 3/19/2018 3
Global Embedded Systems Market, 2003 -2009($ Millions): Source BBC Inc. http: //www. the-infoshop. com/study/bc 31319 -embedded-systems. html 3/19/2018 4
Example real-time and embedded systems Domain Application Avionics Navigation; displays Multimedia Games; simulators Medicine Robot surgery; remote surgery; medical imaging Industrial systems Robot assembly lines; automated inspection Civilian Elevator control Automotive system; Global positioning system (GPS) 3/19/2018 5
Lets discuss some realtime system (RTS) characteristics 3/19/2018 6
Realtime Characteristics RTS have to respond to events in a certain pre-detemined amount of time. ◦ The time constraints have to be considered during planning, design, implementation and testing phases. Internal failures due to software and hardware fault have be handled satisfactorily. ◦ You cannot simply pop-up a dialog error box that says “send report” or “don’t send report”. ◦ Also external failures due to outside sources need to be handled. 3/19/2018 7
Realtime Characteristics (contd. ) Typical interaction in an RTS is asynchronous. Thus an RTS should have features to handle asynchronous events such as interrupt handlers and dispatcher and associated resources. Potential for race condition: when state of resources are timing dependent race condition may occur. Periodic tasks are common. 3/19/2018 8
Embedded System Is a special purpose system designed to perform a few dedicated functions. Small foot prints (in memory) Highly optimized code Cell phones, mp 3 players are examples. The components in an mp 3 player are highly optimized for storage operations. (For example, no need to have a floating point operation on an mp 3 player!) 3/19/2018 9
Real-time system concepts A system is a mapping of a set of input into a set of outputs. A digital camera is an example of a realtime system: set of input including sensors and imaging devices producing control signals and display information. Realtime system can be viewed as a sequence of job to be scheduled. Time between presentation of a set of inputs to a system and the realization of the required behavior, including availability of all associated outputs, is called the response time of the system. 3/19/2018 10
Real-time system concepts (contd. ) Real-time system is the one in which logical correctness is based on both the correctness of the output as well as their timeliness. A soft real-time system is one in which performance is degraded by failure to meet response-time constraints. A hard real-time system is one in which failure to meet a single deadline may lead to complete and catastrophic failure. More examples: ◦ Automatic teller: soft ◦ Robot vacuum cleaner: firm ◦ Missile delivery system: hard ◦ Given a system you should be able to classify it. 3/19/2018 11
Embedded Systems 3/19/2018 12
The Number Game (1) 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 3/19/2018 13
The Number Game (2) 2 3 6 7 10 11 14 15 18 19 22 23 26 27 30 31 3/19/2018 14
The Number Game (4) 4 5 6 7 12 13 14 15 20 21 22 23 28 29 30 31 3/19/2018 15
The Number Game (8) 8 9 10 11 12 13 14 15 24 25 26 27 28 29 30 31 3/19/2018 16
The Number Game (16) 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 3/19/2018 17
Analysis What is theory /concept behind this game? How did I arrive at the number you guessed? How can I automate this process? What is the data and what is the algorithm? How can we convey these to a computing machine? While a computer talks binary, we humans write programs in languages such as Java, C#, C++, Basic etc. Binary numbers (1’s and 0’s) is the number system used by the computer systems. We humans use decimal number system that has 10 distinct symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) Your task: Write a C program to computerize this game. 3/19/2018 18
2 1 3 5 9 11 13 17 19 21 25 27 29 31 7 11 14 15 19 22 23 26 23 6 18 15 3 10 7 27 30 31 4 5 6 7 8 9 10 11 16 17 18 19 12 13 14 15 20 21 22 23 24 25 26 27 28 29 30 31 3/19/2018 19
Requirements-Engineering Process Deals with determining the goals, functions, and constraints of systems, and with representation of these aspects in forms amenable to modeling and analysis. 3/19/2018 20
Types of requirements Standard scheme for realtime systems is defined by IEEE standard IEEE 830. It defines the following kind of requirements: I. II. Functional Non-functional 1. 2. 3. 4. 5. External interfaces Performance Logical database Design constraints (ex: standards compliance) Software system attributes Reliability, availability, security, maintainability, portability 3/19/2018 21
Design methods: Finite state machines Finite state automaton (FSA), finite state machine (FSM) or state transition diagram (STD) is a formal method used in the specification and design of wide range of embedded and realtime systems. The system in this case would be represented by a finite number of states. Lets design the avionics for a drone aircraft. 3/19/2018 22
Drone aircraft avionics (simplified) else TAK MA else NAA LO MA: Mission Assigned else TD: Target Detected LO: Locked On EE: enemy Evaded NAV ED: Enemy Destroyed MC: Mission Complete TD NAE MC TAK: Take off NAV: Navigate NAE: Navigate & Evade NAA: Navigate & Attack LAN: Land EE ED 3/19/2018 23
Finite State Machine (FSM) M = five tuple { S, i, T, Σ, δ } S = set of states i = initial state T = terminal state (s) Σ = events that bring about transitions δ = transitions Lets do this exercise for the avionics for fighter aircraft 3/19/2018 24
State Transition table MA TAK LO TD MC NAE EE ED LAN NAE NAV NAV NAE NAA LAN 3/19/2018 25
Lets design a simple embedded/ realtime system Use the table to code a function with case statement Or write a table-driven code Which is better and why? Try your binary game using FSM method 3/19/2018 26
Summary We examined the course objectives for embedded and realtime systems We looked at sample systems Homework /classwork 1. Write a program that automates the number game 2. Write a program that simulates the drone 3. Write C program, compile, debug, test Brush up your programming language skills 3/19/2018 27
b1c3bf42b7918c396ef4876f2867c0a8.ppt