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

Subversion Repositories openrisc

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

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
#ifndef TAP_ACTION_IR_SCAN__H
32
#define TAP_ACTION_IR_SCAN__H
33
 
34
#include <stdint.h>
35
 
36
#include "TapAction.h"
37
#include "TapStateMachine.h"
38
 
39
//! Class to represent a TAP IR-Scan action.
40
 
41
//! This class assumes that JTAG instruction registers are relatively
42
//! small. IEEE 1149.1 mandates at least 2 bits, although implementations
43
//! often have a wider range of instructions. The OpenRISC 1000 debug unit for
44
//! example uses 5 bits. 32-bits seems more than enough for the largest
45
//! applications.
46
 
47 462 julius
class TapActionIRScan:public TapAction {
48 63 julius
public:
49
 
50 462 julius
        // Constructor
51
        TapActionIRScan(sc_core::sc_event * _doneEvent,
52
                        uint32_t _iRegIn, int _iRegSize);
53 63 julius
 
54 462 julius
        // Get the shifted out value
55
        uint32_t getIRegOut();
56 63 julius
 
57
protected:
58
 
59 462 julius
        // Process the action for IR-Scan
60
         bool process(TapStateMachine * tapStateMachine,
61
                      bool & tdi, bool tdo, bool & tms);
62 63 julius
 
63
private:
64
 
65 462 julius
        //! The value being shifted in
66
         uint32_t iRegIn;
67 63 julius
 
68 462 julius
        //! The number of bits to shift
69
        int iRegSize;
70 63 julius
 
71 462 julius
        //! The value shifted out
72
        uint32_t iRegOut;
73 63 julius
 
74 462 julius
        //! The number of bits shifted so far
75
        int bitsShifted;
76 63 julius
 
77 462 julius
        //! Where we are in the IR-scan process
78
        enum {
79
                SHIFT_IR_PREPARING,
80
                SHIFT_IR_SHIFTING,
81
                SHIFT_IR_UPDATING
82
        } iRScanState;
83 63 julius
 
84 462 julius
};                              // TapActionIRScan
85 63 julius
 
86 462 julius
#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.