Symbolic timing expression
A Symbolic Timing Expression (STE) is a way to specify parameterized expressions between different timebases as motivated in the previous guide. The TimingExpression provides free variables, constants, values and operators to express timing constraints made of a suitable set of arithmetic operators mixing constant value and symbolic identifiers.
Relationships
Main Description

Short Description

A Symbolic Timing Expression (STE) is a way to specify parameterized expressions between different timebases as motivated in the previous guide. The TimingExpression provides free variables, constants, values and operators to express timing constraints made of a suitable set of arithmetic operators mixing constant value and symbolic identifiers. 

TADL2 manipulates symbolic timing expression, variable timing expression and value timing expression. Timing expressions are used by the timing constraints for EAST-ADL2 and AUTOSAR in order to express the duration such as maximum/minimum delay, period, jitter and tolerance duration.

There are three different timing expressions: ValueTimingExpression, VariableTimingExpression and SymbolicTimingExpression. Figure 1 shows the completeTADL2 metamodel including timing expression.

Figure 1. TADL2 Metamodel for Timing Expressions.

A ValueTimingExpression may have a unit and a time base as type. TADL2 is aimed to be a declarative language. Therefore, we have only free variables, constants and values. The VariableTimingExpression stands for free variables and constants. If a value is assigned to a variable, then the variable becomes a constant.

In SymbolicTimingExpression, the language integrates basic arithmetic and relation operators such as addition, subtraction, multiplication, greater than, and less than associated with timing values.

There are some implicit constraints in the TADL2 metamodel which are not shown in Figure 1. These constraints can be written in OCL form in order to check them in the metamodel. These constraints are in the following:

·         The SymbolicTimingExpression cannot have both an Operator and a reference to the VariableTimingExpression (the association variable in Figure 1). It is not allowed to have an expression like {((X + Y) < Z)}.

·         The left hand side of the TimeBaseRelation cannot be a SymbolicTimingExpression with an Operator. It can only be a VariableTimingExpression or a ValueTimingExpression with a Unit and a TimeBase.

·         The right hand side of the TimeBaseRelation cannot be a SymbolicTimingExpression with a relation operator such as Assignment and LessThan. In the right hand side, it is possible to have a SymbolicTimingExpression containing an arithmetic operator with value or variable timing expressions with the same Unit and TimeBases. For instances, the following time base relations are not allowed: {((X + Y) = (5 ms on universal_time)} and {(1 degree on crk_angle) = (X < (5 ms on universal_time))}. On the other hand, it is possible to have a time base relation like in the following: {(1 degree on crk_angle) = (X + (5 ms on universal_time) }. Please note that the Unit should be ms and the TimeBase should be universal_time for X.

·         Arithmetic operators cannot have right/left operands which are SymbolicTimingExpressions containing any relation operator. For instance, the following symbolic timing expression is not a valid timing expression: {(( X < (5 ms on universal_time)) + Y)}.

Please note that the TimeBaseRelation is an equality for two different time bases written as timing expressions. It is different than the relation operator Assignment.  Since we have only free variables and constants, the Assignment operator can be used only once for a variable in the left operand. The variable becomes a constant.

 

Links to TADL2 concepts

See supporting material TADL constraints, below.

 

Abstraction level specific list of applicable events

See supporting material Abstraction level specific list of events, below.

 

Figure 2 illustrates the integration of the TADL2 metamodel with the EAST-ADL metamodel for one of the EAST_ADL timing constraints.

Figure 2. Integration of Symbolic Timing Expressions with TADL2.

 

Context Specific Example

1  TimingSpecification ts1 {

2

3      

8

9      var XVL ms on universal_time    // variable timing expression

10    { (XVL < (200 ms on universal_time)) }       // STE

11    { (XVL > (180 ms on universal_time)) }       // STE

12

13    var YAL ms on universal_time    // variable timing expression

14    { (YAL := 0.60* XVL) }               // STE

15                                                        

16    var ZAL ms on universal_time   // variable timing expression

17    { (ZAL := 0.40* XVL) }               // STE

18   

19    { (YAL + ZAL  XVL) }              // STE

20    

21    var YDL ms on universal_time  // variable timing expression  

22    { (YDL := YAL - (20 ms on universal_time)) }       // STE

23    

24     var ZDL ms on universal_time  // variable timing expression

25     { (ZDL := ZAL - (10 ms on universal_time)) }       // STE

26

27     var FLWSacq ms on universal_time := 20

28     var BPacq ms on universal_time := 15

29     var Brake ms on universal_time := 10

30

31  } // end of timing specification

Listing 5 extends the timing specification ts1 in the guide for Multitime base expression with examples of timing expressions. In this listing we cover the timing constraints expressed in

1  TimingSpecification ts1 {

2

3      

8

9      var XVL ms on universal_time    // variable timing expression

10    { (XVL < (200 ms on universal_time)) }       // STE

11    { (XVL > (180 ms on universal_time)) }       // STE

12

13    var YAL ms on universal_time    // variable timing expression

14    { (YAL := 0.60* XVL) }               // STE

15                                                        

16    var ZAL ms on universal_time   // variable timing expression

17    { (ZAL := 0.40* XVL) }               // STE

18   

19    { (YAL + ZAL  XVL) }              // STE

20    

21    var YDL ms on universal_time  // variable timing expression  

22    { (YDL := YAL - (20 ms on universal_time)) }       // STE

23    

24     var ZDL ms on universal_time  // variable timing expression

25     { (ZDL := ZAL - (10 ms on universal_time)) }       // STE

26

27     var FLWSacq ms on universal_time := 20

28     var BPacq ms on universal_time := 15

29     var Brake ms on universal_time := 10

30

31  } // end of timing specification

Listing 5. Example Timing Specification with Timing Expressions

In this listing1  TimingSpecification ts1 {

2

3      

8

9      var XVL ms on universal_time    // variable timing expression

10    { (XVL < (200 ms on universal_time)) }       // STE

11    { (XVL > (180 ms on universal_time)) }       // STE

12

13    var YAL ms on universal_time    // variable timing expression

14    { (YAL := 0.60* XVL) }               // STE

15                                                        

16    var ZAL ms on universal_time   // variable timing expression

17    { (ZAL := 0.40* XVL) }               // STE

18   

19    { (YAL + ZAL  XVL) }              // STE

20    

21    var YDL ms on universal_time  // variable timing expression  

22    { (YDL := YAL - (20 ms on universal_time)) }       // STE

23    

24     var ZDL ms on universal_time  // variable timing expression

25     { (ZDL := ZAL - (10 ms on universal_time)) }       // STE

26

27     var FLWSacq ms on universal_time := 20

28     var BPacq ms on universal_time := 15

29     var Brake ms on universal_time := 10

30

31  } // end of timing specification

Listing 5, we skip the dimension, timebase and timebase relation declarations already given in Listing 2,     TimeBase chrono_time {

27        dimension physicalTime

28        precisionFactor 0.1

29        precisionUnit micros

30    }

31

32    TimeBase universal_time {

33        dimension physicalTime

34        precisionFactor 0.1

35        precisionUnit micros

36    }

37

38    TimeBase Ecu<x> {

39        dimension physicalTime

40        precisionFactor 0.1

41        precisionUnit micros

42    }

43

 and 1  TimingSpecification ts1 {

2   

3    6   

7    TimeBaseRelation tbr2 {

8        (1.0 second on universal_time) = (1.00002 second on ecu5)

9    }

10 

11  TimeBaseRelation tbr3 {

12      (1.0 ms on ecu1) = (2.0 ms on ecu5)

13  }

14

15 }

Listing 4.  

The var keyword is used for defining both free variables and constants. Free variables are useful for characterizing parameters or variant in timing expression or when referring to already existing timing expression. Line 13 gives an example of the variable YAL declared and accessed in the symbolic Timing expression line 14.

Symbolic Timing Expression allows the assignment of intervals to variables The variable XVL comes from the timing constraint TC. 1, TC. 5, TC. 6 in the BBW example description. XVL is defined in line 9 with a value interval which comprises between 180 and 200 ms on universal time. Please note that different time bases can be used in upper and lower bounds of the value interval. In this case, the timebase relations are used to calculate the time interval for a single time base. FLWSacq, BPacq and Brake used for allocation of functions to ECUs are expressed as constants in Listing 5. The scope of all free variables and constants is the ts1 timing specification.

Timing expressions can be used at different levels of abstraction in a design. They are integrated in TADL2 with EAST-ADL and AUTOSAR.

 

More Information