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 MHFSM
Contents
Multi-Homogeneous FSM[edit]
Overview[edit]
Allows the user to detect patterns in data using FSM specified in an XML file. The user can detect multiple patterns of the same FSM if the patterns can be divided into categories or quantified by a Source field.
Input Channel[edit]
1 input channels
Output Channel[edit]
1 output channel
Properties[edit]
Property | Description | Type | Default |
Auxdata Field | The field chosen to be listed in the output channel. The value from the input field chosen will be the value from the record at which the FSM matched | Text | |
Config File | The XML file in which the FSM will be specified | File Dialog | |
Name | Displays the unique name for the component. Name can be changed through GSB | Text | |
Time Field | Specifies the input field which depicts the time or an increasing number | Text | |
Passthrough All Fields | make all fields present in input available in the output | boolean | false |
XML tags for MHFSM Operation[edit]
The XML file will have the following format:
<TimedFSMSystem timefield="Time" auxdatafield="Command"> <fsm name="CELink" states="4" events="4" selfterminate="0"> <transition name="00" event="0" state="0" next="0" /> … <statename state="3" name="GE" /> … </fsm> <eventgen eventfield="Event" value="8" sourcefield="TaskName" event="3" /> … </TimedFSMSystem>
XML Tag | Description | ||||||||||||||||
<TimedFSMSystem /> | Is the top level Tag. The <eventgen /> and < fsm /> described below are tags within this tag's body. Uses the following attributes
| ||||||||||||||||
<eventgen /> | Specifies which field and value pairs will be used as events that trigger a change of state. A source field needs to be specified, this field will be used to run Multiple FSMs i.e. the FSM specified can run independently for different values in the source field. uses the following attributes
| ||||||||||||||||
<fsm /> | Specifies the number of States, number of events and the terminate FSM state using the following attributes
|
Lower level tags that can be used under the <fsm /> tag are
XML Tag | Description | ||||||||||
<statename /> | In this section each line is used to give a meaningful name to the states instead of 0,1,2,3. These renamed values will be used as filed/column names for the output. Has the following attributes
| ||||||||||
<transition /> | Each line specifies a transition rule stating what event will take the FSM from a specific state to another state. Has the following attributes
|
Example[edit]
- Input
The following records
Time | Priority | Event | Size |
1000 | 0 | ReadCmd | 32 |
1100 | 0 | ReadResp | 8 |
1200 | 2 | WriteCmd | 8 |
1300 | 3 | WriteCmd | 8 |
1400 | 1 | ReadCmd | 22 |
1500 | 0 | WriteCmd | 8 |
1600 | 1 | ReadResp | 16 |
1700 | 1 | WriteCmd | 8 |
1800 | 3 | ReadCmd | 8 |
1900 | 3 | ReadResp | 8 |
2000 | 0 | WriteCmd | 8 |
2100 | 3 | ReadCmd | 32 |
2200 | 3 | ReadResp | 32 |
2300 | 1 | ReadCmd | 8 |
2400 | 1 | ReadResp | 8 |
2500 | 2 | WriteCmd | 8 |
2600 | 2 | WriteCmd | 8 |
2700 | 0 | ReadCmd | 32 |
2800 | 0 | ReadResp | 32 |
2900 | 2 | WriteCmd | 8 |
- Goal
To detect for each of the Events (ReadCmd, WriteCmd and ReadResp), when we get the following two events. 1) Priority = 0 2) Size = 8. For each time the FSM matches we want to know at what time did the events that transitioned states occur.
- XML File
<TimedFSMSystem timefield="Time" auxdatafield="Time">
<fsm name="Sequence" states="3" events="2" selfterminate="1">
<transition name="000" event="0" state="0" next="1" /> <transition name="111" event="1" state="1" next="2" />
<statename state="0" name="Initial" /> <statename state="1" name="Intermediate" /> <statename state="2" name="Detected" /> </fsm>
<eventgen eventfield="Priority" value="0" sourcefield="Event" event="0" /> <eventgen eventfield="Size" value="8" sourcefield="Event" event="1" />
</TimedFSMSystem>
- Properties
These are properties changed from the default values
Property | Value |
Auxdata Field | Time |
Config File | <the xml file describing the FSM> |
Time Field | Time |
- Output
Time | Source | SourceID | Initial | Intermediate | Detected |
1100 | ReadResp | 0 | 0 | 1100 | 1100 |
1500 | WriteCmd | 1 | 1300 | 1500 | 1500 |
1800 | ReadCmd | 2 | 0 | 1000 | 1800 |
2000 | WriteCmd | 1 | 1700 | 2000 | 2000 |
Example Solution[edit]
<install>\dvt\Examples\MultiHFSM\MultiHFSM.sol
Also See[edit]
TODO: Add references to tutorials in which component is used
Enhancement Requests[edit]
Gforge Tracker ID: 752, 761, 762, 763, 764, 767, 768, 769, 770, 772, 773
Known Issues[edit]
Gforge Tracker ID: 745, 751