Services - tools - models - for embedded software development
Embecosm divider strip
Prev  Next

3.4.6.  TapStateMachine

This class is for internal use by JtagSC and the various TAP action classes. It maintains the interface's model of the state machine in the TAP Controller.

The header defining this class also defines enum TapState for the various states of the TAP state machine.

TapStateMachine has a number of private instance variables.

Constructor

The constructor initializes the state to Test-Logic-Reset and clears the flag indicating the TAP controller has been reset. Until a reset has been completed, there can be no confidence that the state is a correct reflection of reality.

Accessor Functions

The functions getState is provided to get the current state. The functions getResetDone and setResetDone are provided to access the flag indicating whether a reset has been completed. Although initialized to false, it is the responsibility of users to set this flag to its correct value.

nextState

This uses table lookup to advance the state, based on the supplied value of TMS.

targetState

This function returns through its second argument a value of TMS which will move from the current state to the specified target state most efficiently (i.e. smallest number of steps). Table lookup makes this an efficient function.

The return value indicates if the state machine was already in the target state.

This function is used by the instruction and data scan TAP action classes to get to the correct state during their process functions.

Embecosm divider strip