Date: Fri, 29 Mar 2024 08:02:26 +0000 (UTC) Message-ID: <58098561.6487.1711699346669@2f9704fbf185> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_6486_1838952408.1711699346668" ------=_Part_6486_1838952408.1711699346668 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This quick start guide does not include the KEITH product. For a KEITH q= uick start guide look here= .
Starting to model SCCharts with the KIELER tool usually includes the fol= lowing steps:
Hint
You can click on images to enlarge them.
Download a suitable KIELER version for your operation sys=
tem.
The zip bundles are fully compiled and ready-to-run, they do not ne=
ed any further installation process. Just save and extract them to/at the l=
ocation of your choice and start the KIELER executable.
When you start the KIELER executable, you probably need to set a (new) w= orkspace location of your choice.
If you selected a new workspace location, you will see a welcome screen = like this:
Dismiss this "Welcome" tab. After that you'll be all set and KIELER shou= ld look like this:
In order to prepare modeling, we must create a project. Right-click on t= he File entry of the top menu bar, select New and click o= n Project.
Select a Project in the General folder and click on ne= xt, then enter a project name, here Example, and click on Fini= sh.
Now you have a project where you can create and model your SCCharts.
To create a new SCChart, you first need to create a new file. Click on <=
em>File =E2=86=92 New =E2=86=92 SCChart in the top menu, similar =
to creating a new project.
Select your project (where you want to create=
the new file) and set a file name. The creation dialog will automatically =
append the .sctx file extension. Note that since version 0.13 SCCharts are =
written in a revised syntax with a new file extension.
A new editor tab will automatically open and you can start modeling your=
SCCharts.
For this example you may copy paste the following code for th=
e ABRO SCChart into your editor. You can find further examples and an overv=
iew about the SCCharts syntax in the sibling pages of this wiki.
scchart ABRO { input bool A, B, R output bool O initial state ABO { entry do O =3D false initial state WaitAB { region { initial state wA if A go to dA=20 =20 final state dA } =20 region { initial state wB if B go to dB =20 final state dB } } do O =3D true join to done state done } if R abort to ABO=20 }=20
When you press the save button (or ctrl+S / cmd+S) the model is saved an= d the diagram view on the right automatically updates and presents the grap= hical representation of your ABRO SCChart.
The editor provides content assist (Ctrl+Space) to help you find the cor= rect keywords or references to state or variables.
The KIELER Compiler (KiCo) provides different compilation systems to tra=
nslate SCCharts into source code for different host languages.
KiCo is c=
ontrolled via the Kieler Compiler view.
The combo box in the toolbar of this view allows to select a compilation=
system for the model in the active editor. In the screenshot, the Netl=
ist-based Compilation into C code is about to be selected.
The view=
itself show a diagram of all the processors in the currently selected comp=
ilation system. Gray nodes are groups of processors which can be expanded b=
y a double click.
The button before the combo box (highlighted by the red arrow in the scr=
eenshot) starts the compilation using the model in the act=
ive editor and the selected compilation system.
The KiCo view updates du=
ring compilation and shows all the available intermediate results per proce=
ssor as blue boxes. When the compilation is finished the diagram view updat=
es and shows the end result of the compilation (in this example the C code)=
.
The intermediate results can be inspected by clicking on the processor i=
tself (to select the last one) or by clicking on a blue box. The diagram vi=
ew will display the selected intermediate result.
In the screenshot belo=
w the SCG Netlist-based group is expanded and the fist processor i=
n this group, Dependencies, is selected. Consequently, the diagram=
view shows a Sequentially Constructive Graph (SCG) with dependencies.
SCCharts can be simulated to inspect their behavior.
First, we recommend switching to the KIELER Simulation perspective. Clic= k on the Open Perspective button in the top right corner.
In the then opening dialog, select the KIELER Model Simulation = environment and click open. After this step you can switch directly between= the two perspectives by clicking on their icon in the top right corner.
To start a simulation, click on the Start Simulation button in = the toolbar of the diagram view.
This button will start a new simulation for the model displayed in that = diagram view. By default the simulation configuration uses a C code b= ackend for compilation. This requires a GCC available in the system's PATH.= If you are using Windows, you need to install some Unix environment (e.g. = = MinGW or Cygwin). If you want to use a Java backend, you can swit= ch the simulation configuration by clicking on the small black triangle rig= ht next to the simulation start button.
When the simulation starts the simulation view will be brought to the to= p, where you can control the steps of the simulation. On the right site of = the simulation view toolbar, there are buttons to stop (rigth) the simulati= on, perform a single step (middle), and let the simulation continuously pla= y (left). The play mode can be selected by the combobox to the left. By def= ault the periodic mode is select which, when started, performs a step every= X milliseconds, which can be adjusted in the field to the left.
The table in the body of the view shows the value of each (IO) variable = in the current tick. You set own values (e.g. inputs) by typing the value i= n the User Value field. The value will be send to the model in the= next tick/step.
The SCCharts simulation is also visualized in the model. States that are= active in the current tick are highlighted in red. States that were left a= nd/or traversed are highlighted in blue. Note that this visualization is on= ly an approximation may not represent the actual state of the SCChart.