41081 Chapter Notes - Chapter 5: Global Variable, Circular Buffer, The Queue

65 views4 pages
5 Jun 2018
School
Department
Course
Professor
Chapter 5 Concurrent synchSMs
Concurrent SynchSMs
A task is a unique continuously executing behaviour.
Concurrent tasks are tasks that execute at the same time.
A block diagram shows each task as a block, and uses a directed line to show that
the block writes to an output or reads from an input.
The multiple SynchSM model ticks the two nearly simultaneously, but there is a
small non-zero amount of time that may separate the ticks.
Using multiple tabs on RIBS allows the capture of multiple tasks.
Shared Variables
Soeties a sstes ehaiour is est aptured as ultiple tasks ee though the
are ot etirel idepedet, due to the tasks opleit.
Only one task should have actions that write to a shared variable.
A common error is to not ensure that tasks communicate robustly, leading to a
system that may sometimes work, but sometimes fails depending on the variations
that can occur with simultaneous ticks.
Converting Multiple SynchSMs to C
Whe oertig SMs to C, the to tasks phsiall at tick concurrently and so
the process of serialisation occurs, known as multitasking.
Executing each task in a straight forward form is called round-robin task execution.
To convert a normal SM to a SynchSM, note:
o An SM task merely needs to be given a period.
o A sequential code task can be rewritten as a single state SM having that code
as its actions, and having a single true condition transition pointing back to
itself.
Converting SynchSM local variables to C
A ariales sope refers to the regios of a system that can see that variable.
The keord stati should e prepeded to a ShSM loal ariales.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows page 1 of the document.
Unlock all 4 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents