TimingExpression : public class
Created: 2011-06-22 10:54:39
Modified: 2011-07-07 14:00:13
Project:
Advanced:
<p>The type TimingExpr stands for all terms that denote time values.<br/></p><p><br/></p><p>Semantics:<br/></p><p>The meaning of an IntExpr is a non-negative integer value. If it has the form integer, its meaning is simply the denoted integer value. If it has the form variable, its meaning is an arbitrary non-negative integer value.<br/></p><p>The meaning of a TimeExpr is a non-negative integer value n, or the special value infinity which is larger than any integer value. <br/></p><p>If the meaning of IntExpr is integer value n, and the factor of unit in universal is k, the meaning of a timing expression of the form IntExpr unit is k * n.<br/></p><p>If the meaning of IntExpr is integer value n, the timebase of clock is t, the factor of unit in t is k, and the meaning of cl is function f, the meaning of a timing expression of the form IntExpr unit on clock is f (k * n).<br/></p><p>If the meaning TimingExpr_1 and TimingExpr_2 are the integer values n_1 and n_2, respectively, the meaning of of a timing expression of the form TimingExpr_1 + TimingExpr_2 is n_1 + n_2. If the meaning of either TimingExpr_1 or TimingExpr_2 is infinity, the meaning of TimingExpr_1 + TimingExpr_2 is infinity.<br/></p><p>If the meaning of IntExpr is n_1 and the meaning of TimingExpr is n_2, the meaning of a timing expression of the form IntExpr * TimingExpr is n_1 * n_2. If the meaning of TimingExpr is infinity, the meaning of IntExpr * TimingExpr is infinity .<br/></p><p>The meaning of a timing expression of the form (TimingExpr) is the same as the meaning of timing expression e.<br/></p><p>The meaning of a timing expression of the form infinity is a value which is larger than any integer value.<br/></p><p>The meaning of a timing expression of the form 0 is the integer value 0.<br/></p><p><br/></p><p>Grammar:<br/></p><p>TimingExpr ::= IntExpr unit<br/></p><p> | IntExpr unit on clock<br/></p><p> | TimingExpr + TimingExpr<br/></p><p> | IntExpr * TimingExpr<br/></p><p> | ( TimingExpr )<br/></p><p> | infinity<br/></p><p> | 0<br/></p><p><br/></p><p>Examples:<br/></p><p>Declaration of an angular timebase:<br/></p><p> timebase angle { degree: 1, rotation: 360 }<br/></p><p>Declaration of the required universal timebase:<br/></p><p> timebase universal { sec: 1000000, micros: 1 , ms: 1000 }<br/></p><p>Declaration of clocks with different scaling and offsets:<br/></p><p> clock Ecu1 : universal (x ms) = 997 * x micros<br/></p><p> clock Ecu2 : universal (x ms) = x ms on Ecu1 + 2 ms<br/></p><p> clock MyUni : universal (x ms) = x ms + 42 ms<br/></p><p>Equivalent expressions:<br/></p><p> 3 ms on Ecu1= 2991 micros<br/></p><p> 3 ms on Ecu2 = 3 ms on Ecu1 + 2 ms = 4991 micros<br/></p><p> 3 ms on MyUni = 45 ms<br/></p><p>An angular clock, connected to the universal timebase via Ecu1:<br/></p><p> clock CrankClk: angle (x degree) = speed * x ms on Ecu1<br/></p><p>An angular clock running at half the speed of CranClk:<br/></p><p> clock CamClk: angle (x degree) = 2 * x degree on CranClk<br/></p><p>Equivalent expressions:<br/></p><p> 3 degree on CranClk = speed * 3 ms on Ecu1= speed * (2991 micros)<br/></p><p> 3 degree on CamClk = 2 * 3 degree on CranClk = 2 * speed * (2991 micros)<br/></p><p> 3 degree on CamClk + 3 ms on MyUni = 2 * speed * (2991 micros) + 45 ms<br/></p><p>Alternative declaration of universal with 2x semantic precision:<br/></p><p> timebase universal { sec: 2000000, micros: 2 , ms: 2000 }<br/></p><p>Ill-formed timing expressions:<br/></p><p> 3 degree on MyUni <br/></p><p> 2 micros onCamClk<br/></p>
Element Source Role Target Role Details
Clock
Class  
Name:  
 
Name: clock
 
 
Unit
Class  
Name:  
 
Name: unit
 
 
Element Source Role Target Role Details
RepetitionConstraint
Class  
Name:  
 
Name: lower
Default: 0
 
RepetitionConstraint
Class  
Name:  
 
Name: upper
Default: infinity
 
OrderConstraint
Class  
Name:  
 
Name: left
 
 
RepetitionConstraint
Class  
Name:  
 
Name: jitter
Default: 0
 
DelayConstraint
Class  
Name:  
 
Name: lower
Default: 0
 
DelayConstraint
Class  
Name:  
 
Name: upper
Default: infinity
 
SynchronizationConstraint
Class  
Name:  
 
Name: tolerance
Default: infinity
 
OrderConstraint
Class  
Name:  
 
Name: right
 
 
SporadicConstraint
Class  
Name:  
 
Name: upper
Default: infinity
 
SporadicConstraint
Class  
Name:  
 
Name: jitter
Default: 0
 
SporadicConstraint
Class  
Name:  
 
Name: minimum
Default: 0
 
SporadicConstraint
Class  
Name:  
 
Name: lower
Default: 0
 
PatternConstraint
Class  
Name:  
 
Name: offset
 
 
PatternConstraint
Class  
Name:  
 
Name: jitter
Default: 0
 
PatternConstraint
Class  
Name:  
 
Name: minimum
Default: 0
 
PeriodicConstraint
Class  
Name:  
 
Name: period
 
 
PeriodicConstraint
Class  
Name:  
 
Name: jitter
Default: 0
 
PeriodicConstraint
Class  
Name:  
 
Name: minimum
Default: 0
 
ArbitraryConstraint
Class  
Name:  
 
Name: minimum
 
 
ArbitraryConstraint
Class  
Name:  
 
Name: maximum
 
 
BurstConstraint
Class  
Name:  
 
Name: length
 
 
BurstConstraint
Class  
Name:  
 
Name: minimum
Default: 0
 
ReactionConstraint
Class  
Name:  
 
Name: minimum
Default: 0
 
ReactionConstraint
Class  
Name:  
 
Name: maximum
Default: infinity
 
AgeConstraint
Class  
Name:  
 
Name: minimum
Default: 0
 
AgeConstraint
Class  
Name:  
 
Name: maximum
Default: infinity
 
Clock
Class  
Name:  
 
Name: timingExpression
 
 
Object Type Connection Notes
RepetitionConstraint Class Weak  
RepetitionConstraint Class Weak  
OrderConstraint Class Weak  
RepetitionConstraint Class Weak  
DelayConstraint Class Weak  
DelayConstraint Class Weak  
SynchronizationConstraint Class Weak  
OrderConstraint Class Weak  
SporadicConstraint Class Weak  
SporadicConstraint Class Weak  
SporadicConstraint Class Weak  
SporadicConstraint Class Weak  
PatternConstraint Class Weak  
PatternConstraint Class Weak  
PatternConstraint Class Weak  
PeriodicConstraint Class Weak  
PeriodicConstraint Class Weak  
PeriodicConstraint Class Weak  
ArbitraryConstraint Class Weak  
ArbitraryConstraint Class Weak  
BurstConstraint Class Weak  
BurstConstraint Class Weak  
ReactionConstraint Class Weak  
ReactionConstraint Class Weak  
AgeConstraint Class Weak  
AgeConstraint Class Weak  
EAElement Class Generalization  
Clock Class Weak