NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

User:DVT/UserDocumentation/DVT Component Reference Guide/DVT Data TimeAdjuster

From Texas Instruments Wiki
Jump to: navigation, search

Time Adjuster[edit]

Overview[edit]

Adjusts a field by scaling and/or by adding an offset. The field has to be of Numeric type like a time field. The offset and scale can be provided statically or the scale can be dynamically derived from a sequence of records each containing 2 time fields.

Input Channel[edit]

2 input channels

  • Input Channel 1 (Left): The input stream containing the numeric field that has to be adjusted
  • Input Channel 2 (Right): The input stream containing the synch time records. Channel should have the following 2 numeric fields. The first field will be the Reference Time and the second will be Time

Output Channel[edit]

1 output channel

Properties[edit]

Property Description Type Default
Auto Adjust Scale Determines if the adjustment scale will be detected during runtime. The last input channel is used as a reference. New data on this channel field is used to derive the dynamic scale Boolean false
Flush When All Channels Have Discontinuity Not supported Boolean false
Keep Previous Value Not supported Boolean true
Merge Non Primary Not supported Boolean false
Name Displays the unique name for the component. Name can be changed through GSB Text
Num Inputs Not supported integer 2
Offset Offset by which the numeric field should be adjusted. If a scale is specified the adding of the offset is done after the scale is applied float 0.0
Ref Field The name of the field which needs to be adjusted. Text
Round Number to round the adjusted value to float 0.0
Scale Factor by which the numeric field should be adjusted. Scale is applied before offset addition. float 1.0

Example[edit]

  • Input


The following records

Time Priority Event Size
1000 0 ReadCmd 8
1100 0 ReadResp 8
1200 2 WriteCmd 8
1300 3 WriteCmd 8
1400 1 ReadCmd 22
1500 0 WriteCmd 8
1600 1 ReadResp 16

Case 1[edit]

  • Properties

These are properties changed from the default values

Property Value
Offset 777.0
Ref Field Time
Round 25.0
Scale 10.0


  • Output
      How calculation is done. Consider 1st record with Time = 1000
      Scale is applied. 1000 * 10.0 = 10000.0
      Then Offset is added. 10000.0 + 777.0 = 10777.0
      Then Rounded to the 25.0 = 10775   


Time Priority Event Size
10775 0 ReadCmd 8
11775 0 ReadResp 8
12775 2 WriteCmd 8
13775 3 WriteCmd 8
14775 1 ReadCmd 22
15775 0 WriteCmd 8
16775 1 ReadResp 16

Case 2[edit]

  • Input

In addition to the main input stream of data the 2nd Channel being connected and having time synch records as below

RefTime Time
500 100
1600 200
13500 1350
15500 1550

Assume that the Time field here is the same Time field in the main data stream. The sequence of records comming into the Time Adjustor across both inputs, is based on this Time field.

      Scale derivation from Time Synch Channel (Right)
      
      Dynamic Scale = (Current Ref Time - Previous Ref Time)/(Current Time - Previous Time)
      So the scale would be derived in time as follows       
RefTime Time Dynamic Scale
0
500 100 (500-0)/(100-0) = 5
800 200 (800-500)/(200-100) = 3
13500 1350 (13500-800)/(1350-200) = 11.043
15500 1550 (15500-13500)/(1550-1350) = 10



  • Properties

These are properties changed from the default values

Property Value
Auto Adjust Scale true
Ref Field Time


  • Output
Time Priority Event Size
3000 0 ReadCmd 8
3300 0 ReadResp 8
3600 2 WriteCmd 8
3900 3 WriteCmd 8
15460.2 1 ReadCmd 22
16564.5 0 WriteCmd 8
16000 1 ReadResp 16


Example Solutions[edit]

<install>\dvt\Examples\TimeAdjuster\StaticAdjustment\TimeAdjuster_Static.sol

<install>\dvt\Examples\TimeAdjuster\DynamicAdjustment\TimeAdjuster_Dynamic.sol

Also See[edit]

TODO: Add references to tutorials in which component is used

Enhancement Requests[edit]

Gforge Tracker ID: 687

Known Issues[edit]

Gforge Tracker ID: 688, 689, 690