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 FSM
Contents
FSM System[edit]
Overview[edit]
Allows the user to detect patterns in data using FSM specified in an XML file. The user can detect only one pattern of the FSM but will be able to run different Heterogeneous FSMs in parallel
Input Channel[edit]
1 input channels
Output Channel[edit]
1 output channel
Properties[edit]
Property | Description | Type | Default |
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 |
XML tags for FSM Operation[edit]
The XML file will have the following format:
< FSMSystem name="IRQs"><fsm name="IRQStack" states="9" events="2"> <transition name="00" event="0" state="0" next="1" /> … <statename state="0" name="Initial" /> … </fsm>
<eventgen srcname="EventID" value="1" fsm="SYSStack" event="0" /> …
<fsm name ….> … </fsm>
<eventgen srcname="EventID" value="1" fsm="SYSStack" event="0" /> …
<output name="Time" srctype="input" srcname="Time" datatype="data" /> <output name="DepthIrq" srctype="fsm" srcname="IRQStack" datatype="state" /> …
</FSMSystem>
XML Tag | Description | ||||||||||||||||||||||||||||||
<FSMSystem /> | Is the top level tag. The subsequent tags below are present inside this body | ||||||||||||||||||||||||||||||
<eventgen /> | Specifies which field and value pairs will be used as events that trigger a change of state. Events need to be defined separately for each FSM. Uses the following attributes
| ||||||||||||||||||||||||||||||
<fsm /> | Specifies the number of States, number of events and the terminate FSM state using the following attributes
| ||||||||||||||||||||||||||||||
<output/> | Describes the fields that are to be made available in the output record
|
Lower level tags that can be used under the <fsm /> tag are
XML Tag | Description | ||||||||||
<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 |
900 | 2 | ReadCmd | 16 |
1000 | 0 | ReadCmd | 24 |
1100 | 0 | ReadResp | 8 |
1200 | 2 | WriteCmd | 8 |
1300 | 3 | WriteCmd | 8 |
1400 | 1 | ReadCmd | 22 |
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 the following FSMs
- Single Sequence of records having Size = 8 and then Size 32
- Repeating Sequence of records having Size = 8 and then Size 32
- Single Sequence of records having Priority = 0, Priority = 1 and then Priority = 2
- XML File
<FSMSystem name="Pattern">
<fsm name="Size_8_32_single" states="3" events="2"> <transition name="000" event="0" state="0" next="1" /> <transition name="112" event="1" state="1" next="2" /> </fsm>
<eventgen srcname="Size" value="8" fsm="Size_8_32_single" event="0" /> <eventgen srcname="Size" value="32" fsm="Size_8_32_single" event="1" />
<fsm name="Size_8_32_repeat" states="3" events="2"> <transition name="000" event="0" state="0" next="1" /> <transition name="112" event="1" state="1" next="2" /> <transition name="021" event="0" state="2" next="1" />
<statename state="0" name="Initial" /> <statename state="1" name="8_Detect" /> <statename state="2" name="32_Detect" /> </fsm>
<eventgen srcname="Size" value="8" fsm="Size_8_32_repeat" event="0" /> <eventgen srcname="Size" value="32" fsm="Size_8_32_repeat" event="1" />
<fsm name="Priority_0_1_2" states="4" events="3"> <transition name="001" event="0" state="0" next="1" /> <transition name="112" event="1" state="1" next="2" /> <transition name="223" event="2" state="2" next="3" /> </fsm>
<eventgen srcname="Priority" value="0" fsm="Priority_0_1_2" event="0" /> <eventgen srcname="Priority" value="1" fsm="Priority_0_1_2" event="1" /> <eventgen srcname="Priority" value="2" fsm="Priority_0_1_2" event="2" />
<output name="Time" srctype="input" srcname="Time" datatype="data" /> <output name="Size_8_32_single" srctype="fsm" srcname="Size_8_32_single" datatype="statename" /> <output name="Size_8_32_repeat" srctype="fsm" srcname="Size_8_32_repeat" datatype="statename" /> <output name="Priority_0_1_2" srctype="fsm" srcname="Priority_0_1_2" datatype="state" />
</FSMSystem>
- Properties
These are properties changed from the default values
Property | Value |
Config File | <the xml file describing the FSM> |
- Output
Time | Size_8_32_single | Size_8_32_repeat | Priority_0_1_2 |
900 | state0 | Initial | 0 |
1000 | state0 | Initial | 1 |
1100 | state1 | 8_Detect | 1 |
1200 | state0 | 8_Detect | 1 |
1300 | state1 | 8_Detect | 1 |
1400 | state1 | 8_Detect | 2 |
1500 | state1 | 8_Detect | 2 |
1600 | state1 | 8_Detect | 2 |
1700 | state1 | 8_Detect | 2 |
1800 | state1 | 8_Detect | 2 |
1900 | state1 | 8_Detect | 2 |
2000 | state1 | 8_Detect | 2 |
2100 | state2 | 32_Detect | 2 |
2200 | state2 | 32_Detect | 2 |
2300 | state2 | 8_Detect | 2 |
2400 | state2 | 8_Detect | 2 |
2500 | state2 | 8_Detect | 3 |
2600 | state2 | 8_Detect | 3 |
2700 | state2 | 32_Detect | 3 |
2800 | state2 | 32_Detect | 3 |
2900 | state2 | 8_Detect | 3 |
Example Solution[edit]
<install>\dvt\Examples\FSM\FSM.sol
Also See[edit]
TODO: Add references to tutorials in which component is used
Enhancement Requests[edit]
Gforge Tracker ID: 761, 763, 764, 765, 766, 772, 773
Known Issues[edit]
Gforge Tracker ID: