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

Subversion Repositories openrisc_me

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

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

Line No. Rev Author Line
1 63 julius
// ----------------------------------------------------------------------------
2
 
3
// TAP action header: abstract class 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__H
33
#define TAP_ACTION__H
34
 
35
#include "TapStateMachine.h"
36
 
37
namespace sc_core
38
{
39
class  sc_event;
40
}
41
 
42
 
43
//! Enumeration of all the TAP actions supported.
44
 
45
enum TapActionType {
46
  TAP_ACTION_RESET    = 0,
47
  TAP_ACTION_SHIFT_DR = 1,
48
  TAP_ACTION_SHIFT_IR = 2
49
};
50
 
51
 
52
//! Abstract class to represent a TAP action.
53
 
54
//! Subclasses implement specific actions: Reset (TapActionReset::), DR-Scan
55
//! (TapActionDRScan::) and IR-Scan (TapActionIRScan::).
56
 
57
//! We keep a SystemC event, which is used to notify the creator of
58
//! completion. Since we are not a SystemC class, we don't do the notification
59
//! ourselves.
60
 
61
class TapAction
62
{
63
public:
64
 
65
  friend class  JtagSC;
66
 
67
  // Constructor
68
  TapAction (sc_core::sc_event *_doneEvent);
69
 
70
 
71
protected:
72
 
73
  // Accessor for the SystemC event to notify completion
74
  sc_core::sc_event *getDoneEvent ();
75
 
76
  // Process the action. Pure virtual, so must be implemented by subclasses.
77
  virtual bool  process (TapStateMachine *tapStateMachine,
78
                         bool            &tdi,
79
                         bool             tdo,
80
                         bool            &tms) = 0;
81
 
82
  // Function to drive the TAP to a consistent state, optionally with a
83
  // warning.
84
  bool  checkResetDone (TapStateMachine *tapStateMachine,
85
                        bool            &tms,
86
                        bool             warn = false);
87
 
88
 
89
private:
90
 
91
  //! The associated SystemC event to mark completion
92
  sc_core::sc_event *doneEvent;
93
 
94
  //! Counter for the reset process
95
  int  resetCounter;
96
 
97
};      // TapAction ()
98
 
99
#endif  // TAP_ACTION__H

powered by: WebSVN 2.1.0

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