Software Requirements Engineering for RTS and Embedded Systems B. Ramamurthy

advertisement
Software Requirements
Engineering for RTS and
Embedded Systems
B. Ramamurthy
Page 1
5/28/2016
Topics
•
•
•
•
Requirements engineering process
State machines
Event-driven programming
Table-driven methods
Page 2
5/28/2016
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.
Page 3
5/28/2016
Types of requirements
•
•
Standard scheme for realtime systems is
defined by IEEE standard IEEE830.
It defines the following kind of
requirements:
I. Functional
II. Non-functional
1.
2.
3.
4.
5.
Page 4
External interfaces
Performance
Logical database
Design constraints (ex: standards compliance)
Software system attributes
Reliability, availability, security, maintainability, portability
5/28/2016
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.
Page 5
5/28/2016
Drone aircraft avionics
(simplified)
else
TAK
MA
else
else
NAA
Page 6
LO
MA: Mission Assigned
else TD: Target Detected
LO: Locked On
EE: enemy Evaded
NAV
ED: Enemy Destroyed
MC: Mission Complete
TD
NAE
MC
ED
LAN
EE
TAK: Take off
NAV: Navigate
NAE: Navigate & Evade
NAA: Navigate & Attack
LAN: Land
5/28/2016
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
Page 7
5/28/2016
State Transition table
MA
TAK
LO
NAA
MC
NAE
LAN
EE
ED
NAE
NAV
NAV
NAV
NAE
TD
NAA
LAN
Page 8
5/28/2016
Lets write the embedded 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
Page 9
5/28/2016
Download