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

Subversion Repositories openrisc

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

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

Rev 64 Rev 462
Line 33... Line 33...
 
 
#include "systemc"
#include "systemc"
 
 
#include "JtagSC_includes.h"
#include "JtagSC_includes.h"
 
 
 
 
//! Module providing TAP requests to JTAG
//! Module providing TAP requests to JTAG
 
 
//! Provides a queue of requests to the JTAG interface. Requests are at the
//! Provides a queue of requests to the JTAG interface. Requests are at the
//! level of TAP actions for reset, DR-Scan or IR-Scan.
//! level of TAP actions for reset, DR-Scan or IR-Scan.
 
 
class JtagDriverSC
class JtagDriverSC:public sc_core::sc_module {
  : public sc_core::sc_module
 
{
 
public:
public:
 
 
  // Constructor
  // Constructor
  JtagDriverSC (sc_core::sc_module_name        name,
  JtagDriverSC (sc_core::sc_module_name        name,
                sc_core::sc_fifo<TapAction *> *_tapActionQueue);
                     sc_core::sc_fifo < TapAction * >*_tapActionQueue);
 
 
private:
private:
 
 
  // JTAG instructions
  // JTAG instructions
  static const uint32_t  CHAIN_SELECT_IR = 0x3;  //!< Chain Select instruction
  static const uint32_t  CHAIN_SELECT_IR = 0x3;  //!< Chain Select instruction
Line 96... Line 93...
  // Bits for the RISCOP register
  // Bits for the RISCOP register
  static const uint32_t  RISCOP_STALL = 0x00000001;     //!< Stall the CPU
  static const uint32_t  RISCOP_STALL = 0x00000001;     //!< Stall the CPU
  static const uint32_t  RISCOP_RESET = 0x00000002;     //!< Reset the CPU
  static const uint32_t  RISCOP_RESET = 0x00000002;     //!< Reset the CPU
 
 
  //! The JTAG fifo we queue on
  //! The JTAG fifo we queue on
  sc_core::sc_fifo<TapAction *> *tapActionQueue;
        sc_core::sc_fifo < TapAction * >*tapActionQueue;
 
 
  //! The currently selected scan chain
  //! The currently selected scan chain
  int  currentScanChain;
  int  currentScanChain;
 
 
  // SystemC thread to queue actions
  // SystemC thread to queue actions
Line 108... Line 105...
 
 
  // Or1k JTAG actions
  // Or1k JTAG actions
  void      reset ();
  void      reset ();
  void      selectChain (int chain);
  void      selectChain (int chain);
  uint32_t  readReg (uint32_t  addr);
  uint32_t  readReg (uint32_t  addr);
  uint32_t  readReg1 (uint32_t   addr,
        uint32_t readReg1(uint32_t addr, int bitSizeNoCrc);
                      int        bitSizeNoCrc);
 
  uint32_t  readReg1 (uint64_t  *dRegArray,
  uint32_t  readReg1 (uint64_t  *dRegArray,
                      uint32_t   addr,
                          uint32_t addr, int bitSizeNoCrc);
                      int        bitSizeNoCrc);
        void writeReg(uint32_t addr, uint32_t data);
  void      writeReg (uint32_t  addr,
 
                      uint32_t  data);
 
  // Utilities to compute CRC-8 the OpenRISC way. Versions for "big" and
  // Utilities to compute CRC-8 the OpenRISC way. Versions for "big" and
  // "small" numbers.
  // "small" numbers.
  uint8_t  crc8 (uint64_t  data,
        uint8_t crc8(uint64_t data, int size);
                 int       size);
        uint8_t crc8(uint64_t * dataArray, int size);
  uint8_t  crc8 (uint64_t *dataArray,
 
                 int       size);
 
 
 
  // Utilities to insert and extract bit strings from vectors
  // Utilities to insert and extract bit strings from vectors
  void  insertBits (uint64_t  str,
  void  insertBits (uint64_t  str,
                    int       strLen,
                        int strLen, uint64_t * array, int startBit);
                    uint64_t *array,
        uint64_t extractBits(uint64_t * array, int startBit, int strLen);
                    int       startBit);
 
  uint64_t extractBits (uint64_t *array,
 
                        int       startBit,
 
                        int       strLen);
 
 
 
};      // JtagDriverSC ()
};      // JtagDriverSC ()
 
 
#endif  // JTAG_DRIVER_SC__H
#endif  // JTAG_DRIVER_SC__H
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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