OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [bench/] [sysc/] [include/] [TapActionIRScan.h] - Diff between revs 63 and 462

Only display areas with differences | Details | Blame | View Log

Rev 63 Rev 462
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
 
 
// TAP IR-Scan action: definition
// TAP IR-Scan action: definition
 
 
// Copyright (C) 2009  Embecosm Limited <info@embecosm.com>
// Copyright (C) 2009  Embecosm Limited <info@embecosm.com>
 
 
// Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
// Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
 
 
// This file is part of the Embecosm cycle accurate SystemC JTAG library.
// This file is part of the Embecosm cycle accurate SystemC JTAG library.
 
 
// This program is free software: you can redistribute it and/or modify it
// This program is free software: you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License as published by
// under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or (at your
// the Free Software Foundation, either version 3 of the License, or (at your
// option) any later version.
// option) any later version.
 
 
// This program is distributed in the hope that it will be useful, but WITHOUT
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
// License for more details.
// License for more details.
 
 
// You should have received a copy of the GNU Lesser General Public License
// You should have received a copy of the GNU Lesser General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
// The C/C++ parts of this program are commented throughout in a fashion
// The C/C++ parts of this program are commented throughout in a fashion
// suitable for processing with Doxygen.
// suitable for processing with Doxygen.
 
 
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
 
 
// $Id$
// $Id$
 
 
 
 
#ifndef TAP_ACTION_IR_SCAN__H
#ifndef TAP_ACTION_IR_SCAN__H
#define TAP_ACTION_IR_SCAN__H
#define TAP_ACTION_IR_SCAN__H
 
 
#include <stdint.h>
#include <stdint.h>
 
 
#include "TapAction.h"
#include "TapAction.h"
#include "TapStateMachine.h"
#include "TapStateMachine.h"
 
 
 
 
//! Class to represent a TAP IR-Scan action.
//! Class to represent a TAP IR-Scan action.
 
 
//! This class assumes that JTAG instruction registers are relatively
//! This class assumes that JTAG instruction registers are relatively
//! small. IEEE 1149.1 mandates at least 2 bits, although implementations
//! small. IEEE 1149.1 mandates at least 2 bits, although implementations
//! often have a wider range of instructions. The OpenRISC 1000 debug unit for
//! often have a wider range of instructions. The OpenRISC 1000 debug unit for
//! example uses 5 bits. 32-bits seems more than enough for the largest
//! example uses 5 bits. 32-bits seems more than enough for the largest
//! applications.
//! applications.
 
 
class TapActionIRScan
class TapActionIRScan:public TapAction {
  : public TapAction
 
{
 
public:
public:
 
 
  // Constructor
        // Constructor
  TapActionIRScan (sc_core::sc_event *_doneEvent,
  TapActionIRScan (sc_core::sc_event *_doneEvent,
                   uint32_t           _iRegIn,
                        uint32_t _iRegIn, int _iRegSize);
                   int                _iRegSize);
 
 
 
  // Get the shifted out value
        // Get the shifted out value
  uint32_t  getIRegOut ();
        uint32_t getIRegOut();
 
 
 
 
protected:
protected:
 
 
  // Process the action for IR-Scan
        // Process the action for IR-Scan
  bool  process (TapStateMachine *tapStateMachine,
  bool  process (TapStateMachine *tapStateMachine,
                 bool            &tdi,
                      bool & tdi, bool tdo, bool & tms);
                 bool             tdo,
 
                 bool            &tms);
 
 
 
 
 
private:
private:
 
 
  //! The value being shifted in
        //! The value being shifted in
  uint32_t  iRegIn;
         uint32_t iRegIn;
 
 
  //! The number of bits to shift
        //! The number of bits to shift
  int       iRegSize;
        int iRegSize;
 
 
  //! The value shifted out
        //! The value shifted out
  uint32_t  iRegOut;
        uint32_t iRegOut;
 
 
  //! The number of bits shifted so far
        //! The number of bits shifted so far
  int       bitsShifted;
        int bitsShifted;
 
 
  //! Where we are in the IR-scan process
        //! Where we are in the IR-scan process
  enum {
        enum {
    SHIFT_IR_PREPARING,
                SHIFT_IR_PREPARING,
    SHIFT_IR_SHIFTING,
                SHIFT_IR_SHIFTING,
    SHIFT_IR_UPDATING
                SHIFT_IR_UPDATING
  } iRScanState;
        } iRScanState;
 
 
};      // TapActionIRScan
};                              // TapActionIRScan
 
 
#endif  // TAP_ACTION_IR_SCAN__H
#endif // TAP_ACTION_IR_SCAN__H
 
 

powered by: WebSVN 2.1.0

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