Lec18State

Lec18State - Lecture 13 State Machines in Software Outline...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 471 18-State-1 Outline Why Using State Machines in Software Fundamental Concepts of State Machines Definition of State Machines Development of State Machines Implementation of State Machines in C Program Discussion and Summary Lecture 13 State Machines in Software
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ECE 471 18-State-2 Why Using State Machines in Software Why Using State Machines in Software Fundamental Concepts of State Machines Definition of State Machines Development of State Machines Implementation of State Machines in C Program Discussion and Summary State machines can systematically describe the dynamic behavior of objects State machines can describe systems in a more abstract way There are systematic procedures to develop state machines The correctness of state machines is mathematically proven Easy to handle asynchronous events in state machines
Background image of page 2
ECE 471 18-State-3 Handle Asynchronous Events by Polling and Interrupts We have learned two ways to handle asynchronous events in hardware Polling Simple to implement Use a lot CPU power Interrupt Efficient use of CPU power More complex to implement The similar techniques can also be used to handle asynchronous events in software.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ECE 471 18-State-4 Fundamental Concepts of State Machines Why Using State Machines in Software Fundamental Concepts of State Machines Definition of State Machines Development of State Machines Implementation of State Machines in C Program Discussion and Summary A complex system can be decomposed into many objects An object has static information and dynamic behavior. The static information of an object can be described by its data structures. The dynamic behavior of an object can be described by a state machine.
Background image of page 4
ECE 471 18-State-5 Operation of the Object An object is in one and only one stage of its operation at any time. In some cases, the operation is a sequence from a start stage to an end stage. e.g., Airbag controller starts from idle state, and ends at deploy airbag state. In other cases, the operation goes through cycles. e.g., door goes between open stage and closed stage The progression from one stage to another stage does not occur automatically. It must be caused by incidences. Stage progression can occur among only certain stages. Progressions are usually not allowed for all pairs of states.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
ECE 471 18-State-6 Definition of State Machines Why Using State Machines in Software Fundamental Concepts of State Machines Definition of State Machines Development of State Machines Implementation of State Machines in C Program Discussion and Summary A state machine has four basic elements: states state transitions events that cause state transitions actions A state machine has two main presentations State transition diagram State transition table
Background image of page 6
ECE 471 18-State-7 States A state is a condition of the object interested by the particular application
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/31/2008 for the course ECE 471 taught by Professor Chien during the Spring '08 term at IUPUI.

Page1 / 49

Lec18State - Lecture 13 State Machines in Software Outline...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online