Last modified by Alexander Schulz-Rosengarten on 2023/09/11 16:17

From version 16.1
edited by cmot
on 2014/02/10 21:32
Change comment: There is no comment for this version
To version 10.1
edited by cmot
on 2014/02/10 20:43
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -52,116 +52,8 @@
52 52  
53 53  = Model an SCChart =
54 54  
55 -Right-click on a project and create a (text) File:
55 +xxx
56 56  
57 -[[image:attach:kieler08.png]]
58 -
59 -Name it abo.sct:
60 -
61 -[[image:attach:kieler09.png]]
62 -
63 -The textual SCCharts Xtext based editor (for *.sct files) will automatically be opened:
64 -
65 -[[image:attach:kieler10.png]]
66 -
67 -Now start modeling an SCChart. For example copy & paste the following sct code of abo, the hello world of SCCharts:
68 -
69 -{{code title="abo.sct"}}
70 -@VHLayout
71 -scchart ABO {
72 - input output bool A;
73 - input output bool B;
74 - output bool O1;
75 - output bool O2;
76 - region:
77 -
78 - initial state Init
79 - --> WaitAB immediate with / O1 = false; O2 = false;
80 - state WaitAB {
81 - region HandleA:
82 - initial state WaitA
83 - --> DoneA immediate with A / B = true; O1 = true;
84 - final state DoneA;
85 - region HandleB:
86 - initial state WaitB
87 - --> DoneB with B / O1 = true;
88 - final state DoneB;
89 - }
90 - >-> GotAB with / O1 = false; O2 = true;
91 - state GotAB;
92 -}
93 -{{/code}}
94 -
95 -As you save (Ctrl+S), KIELER will automatically draw the graphical SCChart diagram in a new KLigD view:
96 -
97 -[[image:attach:kieler11.png]]
98 -
99 -You may want to re-arrange views. Just drag the KLighD view to the right side:
100 -
101 -[[image:attach:kieler12.png]]
102 -
103 -You will now see how to generate a C tick function.
104 -
105 105  = Generate C Code =
106 106  
107 -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).
108 -
109 -[[image:attach:kieler13.png]]
110 -
111 -After performing a transformation the transformed SCChart will open (together with it's KLighD diagram visualization):
112 -
113 -[[image:attach:kieler14.png]]
114 -
115 -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:
116 -
117 -[[image:attach:kieler15.png]]
118 -
119 -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):
120 -
121 -[[image:attach:kieler16.png]]
122 -
123 -You can now populate the SCG automatically with dependency data. Choose Transform SCG -> SCG with Dependency Data from the context menu:
124 -
125 -[[image:attach:kieler17.png]]
126 -
127 -This will result in the following SCG:
128 -
129 -[[image:attach:kieler18.png]]
130 -
131 -Now populate the SCG with basic block information:
132 -
133 -[[image:attach:kieler19.png]]
134 -
135 -The SCG with calculated basic blocks will look like this:
136 -
137 -[[image:attach:kieler20.png]]
138 -
139 -The next step in compilation is the (more fine grained) calculate of scheduling blocks:
140 -
141 -[[image:attach:kieler21.png]]
142 -
143 -The populated SCG with scheduling information looks like this:
144 -
145 -[[image:attach:kieler22.png]]
146 -
147 -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:
148 -
149 -[[image:attach:kieler23.png]]
150 -
151 -The sequentialized SCG looks like this:
152 -
153 -[[image:attach:kieler24.png]]
154 -
155 -From here its only a short hop to C code. Transform the sequentialized SCG into an S Tick Function:
156 -
157 -[[image:attach:kieler25.png]]
158 -
159 -When opening the S file (abo.normalized.seq.s) this already is very c like code. Selecting Generate SC
160 -
161 -
162 -
163 -
164 -
165 -
166 -
167 -
59 +xxx
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -8651729
1 +8651717
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/8651729/PLDI'14 Artifact on SCCharts
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/8651717/PLDI'14 Artifact on SCCharts