This is the abstract base class of all the TAP action classes. It
provides the common interface, expected by
JtagSC
.
JtagSC
is declared a
friend
class and the pure virtual
process
method is made protected. This method
can therefore be called by JtagSC
, but not by
other users of the class. Subclasses of
TapAction
are expected to implement this
method.
Although there are no public instance variables which form part of the
API, TapAction
maintains some private state.
sc_core::sc_event *doneEvent
The SystemC event which will be notified when an action completes.
int resetCounter
A counter for use when resetting the TAP state machine of the
target through checkResetDone
(see below).
In addition to the pure virtual process
method,
TapAction
provides the function
checkResetDone
(see below) as a utility for its
subclasses.
The TapActionIRScan
and
TapActionDRScan
subclasses rely on the
TAP state machine in JtagSC
being an
accurate reflection of the TAP state machine in the target. This
can only be the case if both have been through a synchronous reset
cycle (5 or more TMS
=1 cycles).
The TRST
signal cannot be used as a guide, since it is an optional
signal, which may not be implemented by targets.
Instead the TAP state machine class,
TapStateMachine
records whether it has been
through a reset cycle. It relies on other classes to use (and set)
this information as is helpful.
Both TapActionIRScan
and
TapActionDRScan
check this information, and
if necessary force the state machine through a reset to
synchronize with the model.
This method is a utility to provide that function for
subclasses. A subtlety of its implementation is that it sets the
value of the TAP state machine flag as soon as it has provided
the final (fifth) TMS
signal, but does not return
true
to indicate no reset is needed until its
subsequent call. This allows users to distinguish whether they are
about to complete reset, or have already completed it in the
previous TCK
cycle. This in turn allows the method to provide the
functionality for TapActionReset
.