mast_logo

SIM-MAST

Simulator of MAST Models

Table of Contents

Introduction

SIM_MAST is a tool for simulating the temporal behavior of real-time systems that have been previously modeled with MAST. The tool takes the MAST Model file as input, and after set some parameters, executes the simulation. This execution generates different information  about the system, i.e., the fulfillment of the timing requirements set in the model, the utilization of passive and active resources, the worst, average and best response times and execution traces.

SIM_MAST has been developed with the following objectives:

SIM-MAST evolves from and relies on the Modeling and Analysis Suite for Real-Time Applications (see the MAST page for details) and takes advantage of its modeling capabilities, but it is also subject to the restrictions under which it can be applied.

Sim-Mast_Environment

 The tool is provided as a set of four executable programs:

components

 

User Interface

The  Sim_Mast_Launcher module is a GUI program that allows the selection of  the Mast model that is going to be analyzed, the assignment of the simulation parameters and then, the invocation of the simulation tools. The user interface is based on a graphic window, which contains the following controls for defining the elements needed for the simulation:

Directory: Text box that defines the directory used to create the Model file's pathname, which is also used to place the output files.
Model File: Text box that defines the name of the Mast Model file used as input for the simulator. The complete input file pathname is the concatenation of the Directory and Model File entries in the way: <Directory>+<Model File>. For the example in the next figure, it would be: “C:\Temp\Telerobot.txt”.
Results File: Text box that defines the name of the output files generated by the simulator. The complete output files pathname is the concatenation of the Directory and Results File entries with the appropriate suffix, according to the kind of results, in the way: < Directory>+<Results File>+{”.res”|”.log.xml”|”.bak”}. When the extension of the model file is ´xml´, the output files pathname is: <Directory>+<ResultsFile>+{”.res”|”.log”|”.bak”}+".xml". The suffix ".res" is used for the simulation results file, ".log.xml" is used for the traces file and the ".bak" file keeps a copy of the simulated model. For the example in the next figure, the results file name would be: "C:\Temp\Telerobot_1.res". 
 
Time: Text box that defines the maximum simulation time, at which the simulation execution finishes. In some profiles it represents the simulation time, in others it is a timeout used to terminate the simulation when the ordinary finalizing criterion is not satisfied.

Profile: Label that specifies the results profile used in the simulation. The possible values are:            
SCHEDULABILITY, VERIFICATION, EXHAUSTIVE.
Buffer: It defines the buffer length, in bytes, of the logger used. In the case that the buffer is managed in a bounded or circular way, it is the buffer size, though if it is unbounded, it represents the size of the blocks used to storage them. It can take the values: 512, 2K, 8K y 32K.
Executions: It is used as a finalizing criterion in some profiles, the execution finishes when every transaction has been simulated at least the number of times specified.

Model: Button that launches a dialog box that helps to select the Directory and Model file to be used.

Default: Button that set the default output root file name, this is the model file name followed by an underscore and a number, that is: <Model File>+’_’+<n>’. The number increases to avoid loosing previous results.

From: Button that establishes as Model File the ".bak"  file associated to the file in the Results File entry. This button is disabled when a results file name is established and the corresponding ".bak" file does not exist.

Edit model: Button that launches the model file editor (this program is under development). This editor handles model files with the extensions {`.mdl’|’.bak’| ’.txt’}, and always saves them with the ’.mdl’ extension.

Execute: Button that executes the Model File simulation. It is enabled only if the file extension is ´.xml` or ´.txt`.

View Results: Button that launches the results viewer.It is enabled only if the results file with ´.res´ extension exists.
Display Traces: Button that launches the traces viewer. It is enabled only if the results file with ’.log’ extension exists.

Exit: Button that finishes the program.

Help: Button that launches an html browser with a help page showing information about the use of this program (this page).
sim_mast_screen

Profiles

A profile establishes the objective of the model simulation. It defines:
- The statistical magnitudes that are to be evaluated.
- The logging messages and traces that are to be generated.
- The buffer managing mode.
- The criterion for ending the simulation.

SCHEDULABILITY_PROFILE: It generates information equivalent to that generated by the schedulability analysis tool.

Monitoring:

  • Events that has Timing Requirements associated and events that are the output of a segment. 
  • Events which represent the end of transactions.
  • The utilization of resources.
  Logging:
  • Messages that are generated when a Timing Requirement is not fulfilled.
 Buffer Managing:
  • BOUNDED mode.
 Ending criterion:
  • It ends when the last events of every transaction have been reached at least a minimum number of timer, or by timeout, when the maximum simulation time is elapsed. 
VERIFICATION_PROFILE: Its objective is searching for situations in which the timing requirements are not fulfilled.

Monitoring:

  • Events that has Timing Requirements associated and events that are the output of a segment. 
  • The utilization of resources.

Logging:
  • Messages that are generated when a Timing Requirement is not fulfilled.
  • Messages that are generated each time a relevant event (Flow_Event) occurs.
Buffer Managing:
  • CIRCULAR  mode.

Finalizing criterion:
  • It ends when the terminal events of every transaction have been reached at least a minimum number of times, or by timeout, when the maximum simulation time is elapsed , or when a Timing Requirement is not satisfied.
EXHAUSTIVE_PROFILE:  It generates an exhaustive information about the simulation's execution.

Monitoring:

  • Events that has Timing Requirements associated and events that are the output of a segment. 
  • The utilization of resources.

Logging:
  • Messages that are generated when a Timing Requirement is not fulfilled.
  • Messages are generated for each  Processing Resources, Shared_Resources ,Scheduling_Server, timers and activities state change.
  • Messages are generated each time an event is sent.
Buffer Managing:
  • UNBOUNDED  mode.

Finalizing criterion:
  • It ends when the maximum simulation time is reached.


Documents

The following documents explaining the Sim_Mast environment are available:

Downloading

To download, right-click on the link and choose "Save link as"

Mast Page

You can visit the MAST Home Page to get a closer look at what you can do with this tool.
 
If you have any comment or suggestion about this tool, please feel free of
getting in contact with us.

Authors : Patricia López Martínez
Grupo de Computadores y Tiempo-Real
Departamento de Electrónica y Computadores
Universidad de Cantabria - Spain