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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [orpsocv2/] [bench/] [sysc/] [include/] [TapActionIRScan.h] - Blame information for rev 74

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 63 julius
// ----------------------------------------------------------------------------
2
 
3
// TAP IR-Scan action: definition
4
 
5
// Copyright (C) 2009  Embecosm Limited <info@embecosm.com>
6
 
7
// Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
8
 
9
// This file is part of the Embecosm cycle accurate SystemC JTAG library.
10
 
11
// This program is free software: you can redistribute it and/or modify it
12
// under the terms of the GNU Lesser General Public License as published by
13
// the Free Software Foundation, either version 3 of the License, or (at your
14
// option) any later version.
15
 
16
// This program is distributed in the hope that it will be useful, but WITHOUT
17
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
19
// License for more details.
20
 
21
// You should have received a copy of the GNU Lesser General Public License
22
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
23
 
24
// The C/C++ parts of this program are commented throughout in a fashion
25
// suitable for processing with Doxygen.
26
 
27
// ----------------------------------------------------------------------------
28
 
29
// $Id$
30
 
31
 
32
#ifndef TAP_ACTION_IR_SCAN__H
33
#define TAP_ACTION_IR_SCAN__H
34
 
35
#include <stdint.h>
36
 
37
#include "TapAction.h"
38
#include "TapStateMachine.h"
39
 
40
 
41
//! Class to represent a TAP IR-Scan action.
42
 
43
//! This class assumes that JTAG instruction registers are relatively
44
//! small. IEEE 1149.1 mandates at least 2 bits, although implementations
45
//! often have a wider range of instructions. The OpenRISC 1000 debug unit for
46
//! example uses 5 bits. 32-bits seems more than enough for the largest
47
//! applications.
48
 
49
class TapActionIRScan
50
  : public TapAction
51
{
52
public:
53
 
54
  // Constructor
55
  TapActionIRScan (sc_core::sc_event *_doneEvent,
56
                   uint32_t           _iRegIn,
57
                   int                _iRegSize);
58
 
59
  // Get the shifted out value
60
  uint32_t  getIRegOut ();
61
 
62
 
63
protected:
64
 
65
  // Process the action for IR-Scan
66
  bool  process (TapStateMachine *tapStateMachine,
67
                 bool            &tdi,
68
                 bool             tdo,
69
                 bool            &tms);
70
 
71
 
72
private:
73
 
74
  //! The value being shifted in
75
  uint32_t  iRegIn;
76
 
77
  //! The number of bits to shift
78
  int       iRegSize;
79
 
80
  //! The value shifted out
81
  uint32_t  iRegOut;
82
 
83
  //! The number of bits shifted so far
84
  int       bitsShifted;
85
 
86
  //! Where we are in the IR-scan process
87
  enum {
88
    SHIFT_IR_PREPARING,
89
    SHIFT_IR_SHIFTING,
90
    SHIFT_IR_UPDATING
91
  } iRScanState;
92
 
93
};      // TapActionIRScan
94
 
95
#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.