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

Subversion Repositories openrisc

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

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

powered by: WebSVN 2.1.0

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