OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [orpsocv2/] [bench/] [sysc/] [src/] [TapActionReset.cpp] - Diff between revs 63 and 462

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 63 Rev 462
Line 26... Line 26...
 
 
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
 
 
// $Id$
// $Id$
 
 
 
 
#include "TapActionReset.h"
#include "TapActionReset.h"
 
 
 
 
//! Constructor
//! Constructor
 
 
//! Records the SystemC completion event with the parent. Sets the ::firstTime
//! Records the SystemC completion event with the parent. Sets the ::firstTime
//! flag, so the ::process () method will mark the tapStateMachine as not
//! flag, so the ::process () method will mark the tapStateMachine as not
//! reset.
//! reset.
 
 
//! @param[in] _doneEvent  The SystemC completion event
//! @param[in] _doneEvent  The SystemC completion event
 
 
TapActionReset::TapActionReset (sc_core::sc_event *_doneEvent) :
TapActionReset::TapActionReset (sc_core::sc_event *_doneEvent) :
  TapAction (_doneEvent),
TapAction(_doneEvent), firstTime(true)
  firstTime (true)
 
{
{
 
 
}       // TapActionReset ()
}       // TapActionReset ()
 
 
 
 
//! Process the reset action
//! Process the reset action
 
 
//! This reuses the parent class ::checkResetDone() method. The first time we
//! This reuses the parent class ::checkResetDone() method. The first time we
//! are called, we mark the state machine as being in an inconsistent state,
//! are called, we mark the state machine as being in an inconsistent state,
//! to force the reset.
//! to force the reset.
Line 66... Line 62...
//! @param[in]  tdo              The value currently on TDO
//! @param[in]  tdo              The value currently on TDO
//! @param[out] tms              The value to drive on TMS
//! @param[out] tms              The value to drive on TMS
 
 
//! @return  True if the action is complete
//! @return  True if the action is complete
 
 
bool
bool TapActionReset::process(TapStateMachine * tapStateMachine,
TapActionReset::process (TapStateMachine *tapStateMachine,
                             bool & tdi, bool tdo, bool & tms)
                         bool            &tdi,
 
                         bool             tdo,
 
                         bool            &tms)
 
{
 
  if (firstTime)
 
    {
    {
 
        if (firstTime) {
      tapStateMachine->setResetDone (false);
      tapStateMachine->setResetDone (false);
      firstTime = false;
      firstTime = false;
    }
    }
 
 
  // Parent does the work (no warning message). Our result draws on the value
  // Parent does the work (no warning message). Our result draws on the value
  // set in the tapStateMachine, to avoid an extra cycle.
  // set in the tapStateMachine, to avoid an extra cycle.
  checkResetDone (tapStateMachine, tms, false);
  checkResetDone (tapStateMachine, tms, false);
 
 
  return tapStateMachine->getResetDone ();
  return tapStateMachine->getResetDone ();

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.