嵌入式系统代写代做代考 Embedded Systems Reconfigurable computing

Reconfigurable computing

Small Embedded Systems

Unit 6.5 Graphical Methods for Design Representation

Introduction
System architecture design
Graphical representations (traditional)
Graphical representations (UML, SysML)

Diagrammatic Approaches to Design
Design must be documented, recorded and communicated
Some communications are with technical specialists
Others with non-specialists (e.g. intended users during requirements analysis)
Graphical methods are often used
Classical design methods are simple to understand
Block diagrams
Flow charts
State diagrams
More sophisticated and powerful diagrammatic modelling methods are often used by specialists
UML (Unified Modelling Language)
SysML (System Modelling Language) extension of UML

Block Diagram
A block diagram shows the relationship (exchange of data) between components in the system
Controller

Heater

Pump

Motor

Valve

Washing Machine

Flow Charts
Flowcharts are simple graphical representations of program steps.

Useful for describing software as a series of processes interspersed with logical decisions

Task sequence
Second task

First task

Start

Finish

Condition

Task A

Task B
T
F
Selection: If block

Condition

Task
T
F
While loop

Flow Chart Example

Flow charts are simplistic and are not well suited to systems
with parallel operation of multiple tasks, or
whose response is driven by eternal events

Leave umbrella

Look outside

Start

Is it raining?
N
Y
Look for umbrella

Finish
N
Y

Did you find it?
Take umbrella

Activity Diagram
Generalisation of flowchart used in UML and SysML
Allows for flows of actions that can be done simultaneously

Action 1

Action 2

Action 5

Action 3

Action 4
Condition

T
F
Cannot proceed beyond join point until actions 2 and 3 both complete
Start
Fork
Join
Finish
These actions can be done concurrently
Only one of these actions occurs: which one depends on condition being true or false

Activity Diagram: Swim Lanes
Allow us to model the responsibilities of various “doers”
Each doer is assigned one swim lane

Action 1

Action 3

Action 5

Action 2

Action 4
Condition

T
F
System 1
System 2
System 3

State Diagrams
State diagrams show the behaviour of a single entity in response to a series of external events
At any given time, the entity must be in one state: stays there until an input triggers a transition
Example combination lock – combination is 7-4-8

start
0

Name of state
Output when in this state
Outgoing transition
(labelled by trigger condition)

Incoming transition
(labelled by trigger condition)

State Diagram Example
Combination lock – combination is 7-4-8
The lock has 4 possible states:
s0: no correct numbers have been received
s1: one correct number has been received (7)
s2: two correct numbers has been received (7-4)
s3: three correct numbers has been received (7-4-8)
s3 outputs a 1 to the unlock mechanism

s0
s1
s2
s3
0
0
0
1
7
4
8
7
not 4 or 7
not 8
not 7

7

not 7

State Diagram Example
Combination lock – combination is 7-4-8
Lock starts in state s0
Transition is triggered by entry on keypad
Entering a 7 will cause a transition to s1 (1 correct number)
Otherwise return to s0 (no correct numbers)
And so on …
Lock outputs 1 (“unlock” signal) when 7-4-8 has been entered

s1
0
s0

0

s2
0

7

4

7

not 7

s3
1
8
not 8

7

not 7

not 4 or 7

UML State Chart
UML state charts extend traditional state diagrams to add additional capabilities, e.g.
Composite/hierarchic states
Actions performed on entry/exit to/from a state
Actions to perform on entering/exiting state
This state contains a small sub-machine
https://www.javatpoint.com/uml-state-machine-diagram

UML Use Case Diagram
Use case diagrams show how system must interact with users and other systems
An actor is anyone or anything that needs to interact with the system (human, organization, another information system, …)

UML Use Case Diagram
Include relationship shows that the base use case incorporates the included use case
Extend relationship defines supplementary (normally optional) functionality added to the system.

UML Sequence Diagram
Sequence diagrams show dynamic behavior of a system, focusing on interaction among the entities within a system
Each entity has a lifeline
Entities exchange messages (instructions/responses)
Diagram shows time periods in which entities are active
Object A

Flow of time
Flow of messages
Object B

Do an action

Response

Controller

Water valve

Motor

Drain pump

Heater

User
Heat
Drain
UML Sequence Diagram Example

Fill

Washing

Fill

Rinsing
Spinning
Drain
240 s
180 s
120 s

Washing machine system:
Real-Time Systems, Rob Williams, Butterworth-Heinemann, 2005

UML Communication Diagram
Annotates a block diagram with the events from the sequence diagram, showing the order (1,2,3,…) but not the time
4: Temperature reached
Controller

Heater

Pump

Motor

Valve

2: Level reached
1: Start fill
3: Start heating

Summary
Diagrammatic methods for design documentation and communication

/docProps/thumbnail.jpeg