Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Now you can proceed in modeling an SCChart as explained below.

2. + 3. Model and Compile an SCChart

Right-click on a project and create a (text) File:

Image Removed

Name it abo.sct:

Image Removed

SCT is a textual description language for SCCharts. Due to space limitations SCT is not documented in the PLDI paper, but examples can be found here. Also the code completion functionality of the textual editor for SCT is very helpful. It can be invoked by pressing <Ctrl> + <Space>. It will list all syntactically possible input according to the SCT/SCCharts meta model.

The textual SCCharts Xtext based editor (for *.sct files) will automatically be opened:

Image Removed

Now start modeling an SCChart. For example copy & paste the following sct code of abo, the hello world of SCCharts:

Code Block
titleabo.sct
@VHLayout
scchart ABO {
  input output bool A;
  input output bool B;
  output bool O1;
  output bool O2;
  region:
  
  initial state Init
  --> WaitAB immediate with / O1 = false; O2 = false;
  state WaitAB {
    region HandleA:
    initial state WaitA
    --> DoneA  immediate with A / B = true; O1 = true;
    final state DoneA;
    region HandleB:
    initial state WaitB
    --> DoneB with B / O1 = true;
    final state DoneB;
  }
  >-> GotAB with / O1 = false; O2 = true;
  state GotAB;
}

As you save (Ctrl+S), KIELER will automatically draw the graphical SCChart diagram in a new KLigD view:

Image Removed

You may want to re-arrange views. Just drag the KLighD view to the right side:

Image Removed

You will now see how to generate a C tick function.

3. Generate C Code

You can do several transformations on SCCharts (*.sct files). Just right click the file you want to transform in the project explorer and select the Transform SCChart sub menu. As abo is already a Core SCCart you do not need the core transformations. Click the All Normalize Transformations, this will do the Split Trigger and Effects and the Surface and Depth transformations together (in this order).

Image Removed

After performing a transformation the transformed SCChart will open (together with it's KLighD diagram visualization):

Image Removed

Now generate the Sequentially Constructive Graph (SCG) from the normalized form. You do this also in the context menu of the Project Explorer by selecting the *.normalized.sct and choosing Generate SCG. When selecting the abo.normalized.scg file the SCG diagram will be automatically synthesized (you may also want to re-arrange the KLigD view by dragging in to the right side again).

Image Removed Image Removed

 

You can now populate the SCG automatically with dependency data. Choose Transform SCG -> SCG with Dependency Data from the context menu (left side). This will result in the following SCG (right side).

Image Removed Image Removed

 

Now populate the SCG with basic block information (left side). The SCG with calculated basic blocks will look like this (right side).

Image Removed Image Removed

 

The next step in compilation is the (more fine grained) calculate of scheduling blocks (left side). The populated SCG with scheduling information looks like this (right side).

Image Removed Image Removed

 

The SCG is now ready to be sequentialized. A primitive scheduler currently is included in KIELER but more elaborate ones are already in the pipe line (left side). The sequentialized SCG looks like this (right side).

Image Removed Image Removed

 

From here its only a short hop to C code. Transform the sequentialized SCG into an S Tick Function (left side). When opening the S file (abo.normalized.seq.s) this already is very c like code (right side).

Image Removed Image Removed

 

Selecting Generate SC will produce a C file:

Image Removed Image RemovedWe have moved the guide that shows how to model and compile an SCChart within KIELER to a new Quick Start Tutorial. Be advised that in order to follow all explanations there may require the latest version of KIELER not the (possibly outdated) PLDI-Artifact.

 

4. Evaluated Examples

In the following, you find the examples used for evaluation. Be advised that there currently is no tool integrated evaluation possible. Please refer to the SCCharts superpage for the project status and known limitations.

...