Specifics of Statechart Implementation
The calculation for the size of The StateInfo data type will be named StateInfo_<Controller Name> - for example, might be StateInfo_A11_CTRLcnt1. The data type will be defined as an unsigned type of either 8, 16 or 32 bits. The size depends on the topology of the Statechart. A general method for calculating the required size is:
2. To calculate the bits required for each level in the state hierarchy, take the maximal number of states in that level, add one and calculate how many bits are required to count, in binary, to that number: