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

4.1.  JTAG Reset

The code to drive reset of the JTAG is as follows.

sc_core::sc_event *actionDone = new sc_core::sc_event();
TapActionReset    *resetAction;

resetAction = new TapActionReset (actionDone);
tapActionQueue->write (resetAction);
wait (*actionDone);

delete resetAction;
delete actionDone;
      

A new instance of TapActionReset, resetAction is created using the SystemC event, actionDone. This action is queued by writing to the FIFO (tapActionQueue, waiting for the result on actionDone.

With the results traced in a VCD the effect can be seen clearly. The trace is shown in Figure 4.2.

VCD trace of a JTAG reset request

Figure 4.2.  VCD trace of a JTAG reset request


During system reset, the JTAG TRST is driven low. As soon as the system reset is complete at 1μs, the JTAG reset can be processed. A sequence of 5 cycles of TMS=1 is seen from 1μs onwards.

[Note]Note

The VCD trace shows the signals changing on the falling edge of the clock. This is a cycle accurate model, with values only sampled on clock edges. The JTAG signals change in response to the stimulus from the clock, so only appear in the trace at the next clock edge. This is a common effect in cycle accurate modeling, but does not affect the behavior of the model.

Embecosm divider strip