SlideShare a Scribd company logo
1 of 34
Introduction to State
Machines
About Swift Act LLC
Introduction to State Machine @ Swift Act LLC
❑ Established @ end of 2017
❑ Legal representation in Egypt and Germany
❑ Experience in Automotive, Industrial Automation, IoT, consumer electronics …
❑ Safety critical experience: IEC 61508, ISO 26262 ...
❑ Process compliance: A-SPICE and CMMI
❑ Mission: Long-term partnership with stakeholders
❑ Vision: Maximizing value for stakeholders
❑ Values: Ethics, Empowerment, Professionalism, Team Work and Trust
❑ www.swift-act.com
What is a State Machine?
Introduction to State Machine @ Swift Act LLC
Why a State Machine?
Introduction to State Machine @ Swift Act LLC
State Machines are Hierarchical
Introduction to State Machine @ Swift Act LLC
State Machines are Concurrent
Introduction to State Machine @ Swift Act LLC
State Machine Elements
Introduction to State Machine @ Swift Act LLC
S/M
Elements
States
Transitions
Events
Actions
States are ...
Introduction to State Machine @ Swift Act LLC
States
Finite
Distinct
1 or more
initial states
0 or more
end states
0 or more
intermediate
states
State Machine Graphical Representation
Introduction to State Machine @ Swift Act LLC
Stopped Playing
Paused
Play/Song is Playing from beginning
Stop or Song Finished/Song
is Stopped
Pause/Song is Paused
Play/Song is Resumed
Stop/Song is Stopped
State Machine Tabular Representation
Introduction to State Machine @ Swift Act LLC
Current State Event Action Next State
Stopped Play
Play song from
beginning
Playing
Stopped Pause Stopped
Stopped Stop Stopped
Stopped Song finished Stopped
Playing Play Playing
Playing Pause Song is paused Paused
Playing Stop Song is stopped Stopped
Playing Song finished Song is stopped Stopped
Paused Play Song is resumed Playing
Paused Pause Paused
Paused Stop Song is stopped Stopped
Paused Song finished Paused
State Machine Textual Representation
Introduction to State Machine @ Swift Act LLC
State Machine from Design PoV
Introduction to State Machine @ Swift Act LLC
Events Timing events only?
Input events only?
Timing and input events
State Machine from Coding PoV
Introduction to State Machine @ Swift Act LLC
Function
for
every
state?
Similar? 1 function + Data
Different? State type + State
variable + function
(switch-case) +
function for every
state (optional)
Data-Indexed State Machine Example
Introduction to State Machine @ Swift Act LLC
Data-Indexed State Machine Example cont’d
Introduction to State Machine @ Swift Act LLC
Execution-Indexed State Machine Example
Introduction to State Machine @ Swift Act LLC
Execution-Indexed State Machine Example cont’d
Introduction to State Machine @ Swift Act LLC
Remember: State Machines are Hierarchical
Introduction to State Machine @ Swift Act LLC
Testing State Machine – Coverage Methods
Introduction to State Machine @ Swift Act LLC
• States
• Events
• Actions
• Paths
Testing State Machine – Coverage Methods cont’d
Introduction to State Machine @ Swift Act LLC
• States
• Events
• Actions
• Paths
Testing State Machine – Coverage Methods cont’d
Introduction to State Machine @ Swift Act LLC
• States
• Events
• Actions
• Paths
Testing State Machine – Coverage Methods cont’d
Introduction to State Machine @ Swift Act LLC
• States
• Events
• Actions
• Paths
Transition Coverage: n-switch (+ve Testing)
Introduction to State Machine @ Swift Act LLC
A
B
C
D
F
E
1
2
9
8
10
3
14
11
4
13
5
12
7
6
Transition Coverage: 0-switch vs. 1-switch
Introduction to State Machine @ Swift Act LLC
0-switch 1-switch
A1 A2 A9 A1A1 A1A2 A1A9 A9B10 A9B8 A9B3
B10 B8 B3 B10C14 B10C11 B10C4 B8A1 B8A2 B8A9
C14 C11 C4 C14C14 C14C11 C14C4 C11D13 C11D12 C11D5
D13 D12 D5 D13D13 D13D12 D13D5 D12F6 D12F7
F6 F7 F7A1 F7A2 F7A9
0-switch: Systematic Way
Introduction to State Machine @ Swift Act LLC
1
3
2
4
1
3 4
1212
13
13
12
n-switch: Systematic Way
Introduction to State Machine @ Swift Act LLC
(N-1)-
switch
Extra
level in
the tree
N-
switch
-ve Testing
Introduction to State Machine @ Swift Act LLC
-ve Testing
Testing
Invalid
Transitions
Case Study: Digital Clock
Introduction to State Machine @ Swift Act LLC
Digital ClockSet Button
+ Button
- Button
Hours Units SSD
Minutes Tens SSD
Hours Tens SSD
Minutes Units SSD
Case Study: Block Diagram
Introduction to State Machine @ Swift Act LLC
Digital Clock
SW
Time
SSD
Display
Case Study: SW
Introduction to State Machine @ Swift Act LLC
Case Study: SSD
Introduction to State Machine @ Swift Act LLC
Case Study: Time
Introduction to State Machine @ Swift Act LLC
Set Hours
Set
Minutes
Normal
Set is pressed
Set is pressed
Set is pressed
Case Study: Display
Introduction to State Machine @ Swift Act LLC
Blink
Hours
Blink
Minutes
Blink
Seconds
Time mode = Set Hours
Time mode = Set Minutes
Time mode = Normal
Introduction to State Machine @ Swift Act LLC

More Related Content

What's hot

Verification flow and_planning_vlsi_design
Verification flow and_planning_vlsi_designVerification flow and_planning_vlsi_design
Verification flow and_planning_vlsi_designUsha Mehta
 
Arduino slides
Arduino slidesArduino slides
Arduino slidessdcharle
 
SOC Verification using SystemVerilog
SOC Verification using SystemVerilog SOC Verification using SystemVerilog
SOC Verification using SystemVerilog Ramdas Mozhikunnath
 
VLSI Testing Techniques
VLSI Testing TechniquesVLSI Testing Techniques
VLSI Testing TechniquesA B Shinde
 
Embedded Design
Embedded Design Embedded Design
Embedded Design AJAL A J
 
Blinking a Single LED
Blinking a Single LEDBlinking a Single LED
Blinking a Single LEDRihab Rahman
 
Uvm presentation dac2011_final
Uvm presentation dac2011_finalUvm presentation dac2011_final
Uvm presentation dac2011_finalsean chen
 
Low power design-ver_26_mar08
Low power design-ver_26_mar08Low power design-ver_26_mar08
Low power design-ver_26_mar08Obsidian Software
 
19 Jun 2018 - Hazard Analysis and Functional Safety Compliance
19 Jun 2018 - Hazard Analysis and Functional Safety Compliance 19 Jun 2018 - Hazard Analysis and Functional Safety Compliance
19 Jun 2018 - Hazard Analysis and Functional Safety Compliance Intland Software GmbH
 
Dft (design for testability)
Dft (design for testability)Dft (design for testability)
Dft (design for testability)shaik sharief
 
Arduino Microcontroller
Arduino MicrocontrollerArduino Microcontroller
Arduino MicrocontrollerShyam Mohan
 
Embedded system design challenges
Embedded system design challenges Embedded system design challenges
Embedded system design challenges Aditya Kamble
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gatesRakesh kumar jha
 

What's hot (20)

Verification flow and_planning_vlsi_design
Verification flow and_planning_vlsi_designVerification flow and_planning_vlsi_design
Verification flow and_planning_vlsi_design
 
Arduino slides
Arduino slidesArduino slides
Arduino slides
 
SOC Verification using SystemVerilog
SOC Verification using SystemVerilog SOC Verification using SystemVerilog
SOC Verification using SystemVerilog
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
 
ASIC vs SOC vs FPGA
ASIC  vs SOC  vs FPGAASIC  vs SOC  vs FPGA
ASIC vs SOC vs FPGA
 
Arduino Uno Pin Description
Arduino Uno Pin DescriptionArduino Uno Pin Description
Arduino Uno Pin Description
 
VLSI Testing Techniques
VLSI Testing TechniquesVLSI Testing Techniques
VLSI Testing Techniques
 
Embedded Design
Embedded Design Embedded Design
Embedded Design
 
Verilog
VerilogVerilog
Verilog
 
Blinking a Single LED
Blinking a Single LEDBlinking a Single LED
Blinking a Single LED
 
Uvm presentation dac2011_final
Uvm presentation dac2011_finalUvm presentation dac2011_final
Uvm presentation dac2011_final
 
VLSI testing and analysis
VLSI testing and analysisVLSI testing and analysis
VLSI testing and analysis
 
Low power design-ver_26_mar08
Low power design-ver_26_mar08Low power design-ver_26_mar08
Low power design-ver_26_mar08
 
Advance Peripheral Bus
Advance Peripheral Bus Advance Peripheral Bus
Advance Peripheral Bus
 
Lec13
Lec13Lec13
Lec13
 
19 Jun 2018 - Hazard Analysis and Functional Safety Compliance
19 Jun 2018 - Hazard Analysis and Functional Safety Compliance 19 Jun 2018 - Hazard Analysis and Functional Safety Compliance
19 Jun 2018 - Hazard Analysis and Functional Safety Compliance
 
Dft (design for testability)
Dft (design for testability)Dft (design for testability)
Dft (design for testability)
 
Arduino Microcontroller
Arduino MicrocontrollerArduino Microcontroller
Arduino Microcontroller
 
Embedded system design challenges
Embedded system design challenges Embedded system design challenges
Embedded system design challenges
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gates
 

Similar to Introduction to state machines in Embedded Software Design

State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...European SharePoint Conference
 
How JIRA Service Desk Saved Twitter's Global Help Desk - Alex Stillings
How JIRA Service Desk Saved Twitter's Global Help Desk - Alex StillingsHow JIRA Service Desk Saved Twitter's Global Help Desk - Alex Stillings
How JIRA Service Desk Saved Twitter's Global Help Desk - Alex StillingsAtlassian
 
Virtual enterprise synthesys
 Virtual enterprise synthesys Virtual enterprise synthesys
Virtual enterprise synthesysVictor Romanov
 
Discover finite state machines with gen_statem in Erlang /Elixir
Discover finite state machines with gen_statem in Erlang /ElixirDiscover finite state machines with gen_statem in Erlang /Elixir
Discover finite state machines with gen_statem in Erlang /ElixirAntoine REYT
 
Introduction to State Machines
Introduction to State MachinesIntroduction to State Machines
Introduction to State Machinescodeofficer
 
Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...
Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...
Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...Flink Forward
 
Sessionizing Uber Trips in Realtime - Flink Forward '18, Berlin
Sessionizing Uber Trips in Realtime  - Flink Forward '18, BerlinSessionizing Uber Trips in Realtime  - Flink Forward '18, Berlin
Sessionizing Uber Trips in Realtime - Flink Forward '18, BerlinAmey Chaugule
 
Maintaining the Front Door to Netflix : The Netflix API
Maintaining the Front Door to Netflix : The Netflix APIMaintaining the Front Door to Netflix : The Netflix API
Maintaining the Front Door to Netflix : The Netflix APIDaniel Jacobson
 
Government Interoperability Framework (Palestine Case) v5
Government Interoperability Framework (Palestine Case) v5Government Interoperability Framework (Palestine Case) v5
Government Interoperability Framework (Palestine Case) v5jarrar
 
Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...
Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...
Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...CA Technologies
 
Microsoft Power Automate Questions and Answers
Microsoft Power Automate Questions and AnswersMicrosoft Power Automate Questions and Answers
Microsoft Power Automate Questions and AnswersSFSupport247
 
Complex event processing platform handling millions of users - Krzysztof Zarz...
Complex event processing platform handling millions of users - Krzysztof Zarz...Complex event processing platform handling millions of users - Krzysztof Zarz...
Complex event processing platform handling millions of users - Krzysztof Zarz...GetInData
 
Asynchronous Programming, Analysis and Testing with State Machines
Asynchronous Programming, Analysis and Testing with State MachinesAsynchronous Programming, Analysis and Testing with State Machines
Asynchronous Programming, Analysis and Testing with State MachinesPantazis Deligiannis
 
Agile + DevOps Keynote - The Evolution of a Continuous Integration Pipeline
Agile + DevOps Keynote - The Evolution of a Continuous Integration PipelineAgile + DevOps Keynote - The Evolution of a Continuous Integration Pipeline
Agile + DevOps Keynote - The Evolution of a Continuous Integration PipelineGreg Sypolt
 
The Use of Formal Methods on the iFACTS Air Traffic Control Project
The Use of Formal Methods on the iFACTS Air Traffic Control ProjectThe Use of Formal Methods on the iFACTS Air Traffic Control Project
The Use of Formal Methods on the iFACTS Air Traffic Control ProjectAdaCore
 
Cim Automation 0909 Xx (Linkedin)
Cim Automation 0909 Xx (Linkedin)Cim Automation 0909 Xx (Linkedin)
Cim Automation 0909 Xx (Linkedin)JovanZ
 
Unit 4- State Machine in mobile programming
Unit 4- State Machine in mobile programmingUnit 4- State Machine in mobile programming
Unit 4- State Machine in mobile programmingLeahRachael
 
It's a Bird, It's a Plane, It's a Drone...Innovation at CSCMP
It's a Bird, It's a Plane, It's a Drone...Innovation at CSCMPIt's a Bird, It's a Plane, It's a Drone...Innovation at CSCMP
It's a Bird, It's a Plane, It's a Drone...Innovation at CSCMPMarketing_Kenco
 
How Railinc Ensures The Links In Our Nation's Supply Chain: CA Spectrum and ...
How Railinc Ensures The Links In Our Nation's Supply Chain: CA Spectrum and ...How Railinc Ensures The Links In Our Nation's Supply Chain: CA Spectrum and ...
How Railinc Ensures The Links In Our Nation's Supply Chain: CA Spectrum and ...CA Technologies
 

Similar to Introduction to state machines in Embedded Software Design (20)

1120 rao mathew
1120 rao mathew1120 rao mathew
1120 rao mathew
 
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
 
How JIRA Service Desk Saved Twitter's Global Help Desk - Alex Stillings
How JIRA Service Desk Saved Twitter's Global Help Desk - Alex StillingsHow JIRA Service Desk Saved Twitter's Global Help Desk - Alex Stillings
How JIRA Service Desk Saved Twitter's Global Help Desk - Alex Stillings
 
Virtual enterprise synthesys
 Virtual enterprise synthesys Virtual enterprise synthesys
Virtual enterprise synthesys
 
Discover finite state machines with gen_statem in Erlang /Elixir
Discover finite state machines with gen_statem in Erlang /ElixirDiscover finite state machines with gen_statem in Erlang /Elixir
Discover finite state machines with gen_statem in Erlang /Elixir
 
Introduction to State Machines
Introduction to State MachinesIntroduction to State Machines
Introduction to State Machines
 
Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...
Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...
Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...
 
Sessionizing Uber Trips in Realtime - Flink Forward '18, Berlin
Sessionizing Uber Trips in Realtime  - Flink Forward '18, BerlinSessionizing Uber Trips in Realtime  - Flink Forward '18, Berlin
Sessionizing Uber Trips in Realtime - Flink Forward '18, Berlin
 
Maintaining the Front Door to Netflix : The Netflix API
Maintaining the Front Door to Netflix : The Netflix APIMaintaining the Front Door to Netflix : The Netflix API
Maintaining the Front Door to Netflix : The Netflix API
 
Government Interoperability Framework (Palestine Case) v5
Government Interoperability Framework (Palestine Case) v5Government Interoperability Framework (Palestine Case) v5
Government Interoperability Framework (Palestine Case) v5
 
Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...
Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...
Hands-On Labs: Identifying Application Delivery Performance Problems with CA ...
 
Microsoft Power Automate Questions and Answers
Microsoft Power Automate Questions and AnswersMicrosoft Power Automate Questions and Answers
Microsoft Power Automate Questions and Answers
 
Complex event processing platform handling millions of users - Krzysztof Zarz...
Complex event processing platform handling millions of users - Krzysztof Zarz...Complex event processing platform handling millions of users - Krzysztof Zarz...
Complex event processing platform handling millions of users - Krzysztof Zarz...
 
Asynchronous Programming, Analysis and Testing with State Machines
Asynchronous Programming, Analysis and Testing with State MachinesAsynchronous Programming, Analysis and Testing with State Machines
Asynchronous Programming, Analysis and Testing with State Machines
 
Agile + DevOps Keynote - The Evolution of a Continuous Integration Pipeline
Agile + DevOps Keynote - The Evolution of a Continuous Integration PipelineAgile + DevOps Keynote - The Evolution of a Continuous Integration Pipeline
Agile + DevOps Keynote - The Evolution of a Continuous Integration Pipeline
 
The Use of Formal Methods on the iFACTS Air Traffic Control Project
The Use of Formal Methods on the iFACTS Air Traffic Control ProjectThe Use of Formal Methods on the iFACTS Air Traffic Control Project
The Use of Formal Methods on the iFACTS Air Traffic Control Project
 
Cim Automation 0909 Xx (Linkedin)
Cim Automation 0909 Xx (Linkedin)Cim Automation 0909 Xx (Linkedin)
Cim Automation 0909 Xx (Linkedin)
 
Unit 4- State Machine in mobile programming
Unit 4- State Machine in mobile programmingUnit 4- State Machine in mobile programming
Unit 4- State Machine in mobile programming
 
It's a Bird, It's a Plane, It's a Drone...Innovation at CSCMP
It's a Bird, It's a Plane, It's a Drone...Innovation at CSCMPIt's a Bird, It's a Plane, It's a Drone...Innovation at CSCMP
It's a Bird, It's a Plane, It's a Drone...Innovation at CSCMP
 
How Railinc Ensures The Links In Our Nation's Supply Chain: CA Spectrum and ...
How Railinc Ensures The Links In Our Nation's Supply Chain: CA Spectrum and ...How Railinc Ensures The Links In Our Nation's Supply Chain: CA Spectrum and ...
How Railinc Ensures The Links In Our Nation's Supply Chain: CA Spectrum and ...
 

More from Amr Ali (ISTQB CTAL Full, CSM, ITIL Foundation)

More from Amr Ali (ISTQB CTAL Full, CSM, ITIL Foundation) (20)

Embedded SW Testing
Embedded SW TestingEmbedded SW Testing
Embedded SW Testing
 
Cracking the interview
Cracking the interviewCracking the interview
Cracking the interview
 
Embedded linux network device driver development
Embedded linux network device driver developmentEmbedded linux network device driver development
Embedded linux network device driver development
 
Embedded summer camps 2017
Embedded summer camps 2017Embedded summer camps 2017
Embedded summer camps 2017
 
Introduction to Embedded Systems a Practical Approach
Introduction to Embedded Systems a Practical ApproachIntroduction to Embedded Systems a Practical Approach
Introduction to Embedded Systems a Practical Approach
 
ISTQB Advanced Test Manager Training 2012 - Testing Process
ISTQB Advanced Test Manager Training 2012 - Testing Process ISTQB Advanced Test Manager Training 2012 - Testing Process
ISTQB Advanced Test Manager Training 2012 - Testing Process
 
Introduction to Software Test Automation
Introduction to Software Test AutomationIntroduction to Software Test Automation
Introduction to Software Test Automation
 
ISTQB Foundation Agile Tester 2014 Training, Agile SW Development
ISTQB Foundation Agile Tester 2014 Training, Agile SW DevelopmentISTQB Foundation Agile Tester 2014 Training, Agile SW Development
ISTQB Foundation Agile Tester 2014 Training, Agile SW Development
 
ISTQB Technical Test Analyst 2012 Training - Structure-Based Testing
ISTQB Technical Test Analyst 2012 Training - Structure-Based TestingISTQB Technical Test Analyst 2012 Training - Structure-Based Testing
ISTQB Technical Test Analyst 2012 Training - Structure-Based Testing
 
ISTQB Technical Test Analyst 2012 Training - The Technical Test Analyst's Tas...
ISTQB Technical Test Analyst 2012 Training - The Technical Test Analyst's Tas...ISTQB Technical Test Analyst 2012 Training - The Technical Test Analyst's Tas...
ISTQB Technical Test Analyst 2012 Training - The Technical Test Analyst's Tas...
 
Android Booting Scenarios
Android Booting ScenariosAndroid Booting Scenarios
Android Booting Scenarios
 
Simulation Using Isim
Simulation Using Isim Simulation Using Isim
Simulation Using Isim
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
Introduction to embedded systems
Introduction to embedded systemsIntroduction to embedded systems
Introduction to embedded systems
 
Introduction to stm32-part1
Introduction to stm32-part1Introduction to stm32-part1
Introduction to stm32-part1
 
Introduction to stm32-part2
Introduction to stm32-part2Introduction to stm32-part2
Introduction to stm32-part2
 
Fpga programming
Fpga programmingFpga programming
Fpga programming
 
Synthesis Using ISE
Synthesis Using ISESynthesis Using ISE
Synthesis Using ISE
 
Simulation using model sim
Simulation using model simSimulation using model sim
Simulation using model sim
 
FreeRTOS Course - Semaphore/Mutex Management
FreeRTOS Course - Semaphore/Mutex ManagementFreeRTOS Course - Semaphore/Mutex Management
FreeRTOS Course - Semaphore/Mutex Management
 

Recently uploaded

A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyUXDXConf
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessUXDXConf
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024Stephen Perrenod
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastUXDXConf
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfFIDO Alliance
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsStefano
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftshyamraj55
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomCzechDreamin
 

Recently uploaded (20)

A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 

Introduction to state machines in Embedded Software Design

  • 2. About Swift Act LLC Introduction to State Machine @ Swift Act LLC ❑ Established @ end of 2017 ❑ Legal representation in Egypt and Germany ❑ Experience in Automotive, Industrial Automation, IoT, consumer electronics … ❑ Safety critical experience: IEC 61508, ISO 26262 ... ❑ Process compliance: A-SPICE and CMMI ❑ Mission: Long-term partnership with stakeholders ❑ Vision: Maximizing value for stakeholders ❑ Values: Ethics, Empowerment, Professionalism, Team Work and Trust ❑ www.swift-act.com
  • 3. What is a State Machine? Introduction to State Machine @ Swift Act LLC
  • 4. Why a State Machine? Introduction to State Machine @ Swift Act LLC
  • 5. State Machines are Hierarchical Introduction to State Machine @ Swift Act LLC
  • 6. State Machines are Concurrent Introduction to State Machine @ Swift Act LLC
  • 7. State Machine Elements Introduction to State Machine @ Swift Act LLC S/M Elements States Transitions Events Actions
  • 8. States are ... Introduction to State Machine @ Swift Act LLC States Finite Distinct 1 or more initial states 0 or more end states 0 or more intermediate states
  • 9. State Machine Graphical Representation Introduction to State Machine @ Swift Act LLC Stopped Playing Paused Play/Song is Playing from beginning Stop or Song Finished/Song is Stopped Pause/Song is Paused Play/Song is Resumed Stop/Song is Stopped
  • 10. State Machine Tabular Representation Introduction to State Machine @ Swift Act LLC Current State Event Action Next State Stopped Play Play song from beginning Playing Stopped Pause Stopped Stopped Stop Stopped Stopped Song finished Stopped Playing Play Playing Playing Pause Song is paused Paused Playing Stop Song is stopped Stopped Playing Song finished Song is stopped Stopped Paused Play Song is resumed Playing Paused Pause Paused Paused Stop Song is stopped Stopped Paused Song finished Paused
  • 11. State Machine Textual Representation Introduction to State Machine @ Swift Act LLC
  • 12. State Machine from Design PoV Introduction to State Machine @ Swift Act LLC Events Timing events only? Input events only? Timing and input events
  • 13. State Machine from Coding PoV Introduction to State Machine @ Swift Act LLC Function for every state? Similar? 1 function + Data Different? State type + State variable + function (switch-case) + function for every state (optional)
  • 14. Data-Indexed State Machine Example Introduction to State Machine @ Swift Act LLC
  • 15. Data-Indexed State Machine Example cont’d Introduction to State Machine @ Swift Act LLC
  • 16. Execution-Indexed State Machine Example Introduction to State Machine @ Swift Act LLC
  • 17. Execution-Indexed State Machine Example cont’d Introduction to State Machine @ Swift Act LLC
  • 18. Remember: State Machines are Hierarchical Introduction to State Machine @ Swift Act LLC
  • 19. Testing State Machine – Coverage Methods Introduction to State Machine @ Swift Act LLC • States • Events • Actions • Paths
  • 20. Testing State Machine – Coverage Methods cont’d Introduction to State Machine @ Swift Act LLC • States • Events • Actions • Paths
  • 21. Testing State Machine – Coverage Methods cont’d Introduction to State Machine @ Swift Act LLC • States • Events • Actions • Paths
  • 22. Testing State Machine – Coverage Methods cont’d Introduction to State Machine @ Swift Act LLC • States • Events • Actions • Paths
  • 23. Transition Coverage: n-switch (+ve Testing) Introduction to State Machine @ Swift Act LLC A B C D F E 1 2 9 8 10 3 14 11 4 13 5 12 7 6
  • 24. Transition Coverage: 0-switch vs. 1-switch Introduction to State Machine @ Swift Act LLC 0-switch 1-switch A1 A2 A9 A1A1 A1A2 A1A9 A9B10 A9B8 A9B3 B10 B8 B3 B10C14 B10C11 B10C4 B8A1 B8A2 B8A9 C14 C11 C4 C14C14 C14C11 C14C4 C11D13 C11D12 C11D5 D13 D12 D5 D13D13 D13D12 D13D5 D12F6 D12F7 F6 F7 F7A1 F7A2 F7A9
  • 25. 0-switch: Systematic Way Introduction to State Machine @ Swift Act LLC 1 3 2 4 1 3 4 1212 13 13 12
  • 26. n-switch: Systematic Way Introduction to State Machine @ Swift Act LLC (N-1)- switch Extra level in the tree N- switch
  • 27. -ve Testing Introduction to State Machine @ Swift Act LLC -ve Testing Testing Invalid Transitions
  • 28. Case Study: Digital Clock Introduction to State Machine @ Swift Act LLC Digital ClockSet Button + Button - Button Hours Units SSD Minutes Tens SSD Hours Tens SSD Minutes Units SSD
  • 29. Case Study: Block Diagram Introduction to State Machine @ Swift Act LLC Digital Clock SW Time SSD Display
  • 30. Case Study: SW Introduction to State Machine @ Swift Act LLC
  • 31. Case Study: SSD Introduction to State Machine @ Swift Act LLC
  • 32. Case Study: Time Introduction to State Machine @ Swift Act LLC Set Hours Set Minutes Normal Set is pressed Set is pressed Set is pressed
  • 33. Case Study: Display Introduction to State Machine @ Swift Act LLC Blink Hours Blink Minutes Blink Seconds Time mode = Set Hours Time mode = Set Minutes Time mode = Normal
  • 34. Introduction to State Machine @ Swift Act LLC