def __init__(self, parent, stateT, stateRegName="<STR_LIT>"):
if isinstance(stateT, HEnum):<EOL><INDENT>beginVal = stateT.fromPy(stateT._allValues[<NUM_LIT:0>])<EOL><DEDENT>else:<EOL><INDENT>beginVal = <NUM_LIT:0><EOL><DEDENT>self.stateReg = parent._reg(stateRegName, stateT, beginVal)<EOL>Switch.__init__(self, self.stateReg)<EOL>
:param parent: parent unit where fsm should be builded
:param stateT: enum type of state
:param stateRegName: name of register where sate is stored