summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/framework/register/iipScanCommRegisterChip.h
blob: a1a7c960869163b1de3a3de21b903b5ccca7a587 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/usr/diag/prdf/framework/register/iipScanCommRegisterChip.h $ */
/*                                                                        */
/* IBM CONFIDENTIAL                                                       */
/*                                                                        */
/* COPYRIGHT International Business Machines Corp. 1996,2012              */
/*                                                                        */
/* p1                                                                     */
/*                                                                        */
/* Object Code Only (OCO) source materials                                */
/* Licensed Internal Code Source Materials                                */
/* IBM HostBoot Licensed Internal Code                                    */
/*                                                                        */
/* The source code for this program is not published or otherwise         */
/* divested of its trade secrets, irrespective of what has been           */
/* deposited with the U.S. Copyright Office.                              */
/*                                                                        */
/* Origin: 30                                                             */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */

#ifndef iipScanCommRegisterChip_h
#define iipScanCommRegisterChip_h

// Class Specification *************************************************
//
// Class name:   ScanCommRegisterChip
// Parent class: ScanCommRegisterAccess
//
// Summary: This class provides access to a Scan Comm Register
//          associated with a specific chip.
//
//          A pointer to a CHIP_CLASS is maintained.  The member
//          function GetChipSelectValues() is implemented to use the
//          CHIP_CLASS instance to return the values.
//
// Cardinality: N
//
// Performance/Implementation:
//   Space Complexity: Constant
//   Time Complexity:  All member functions constant unless otherwise
//                     stated.
//
// Usage Examples:
//
//   void foo(CHIP_CLASS * chipPtr, unsigned int registerAddress,
//     unsigned int bitLength)
//     {
//     ScanCommRegisterChip scr(chipPtr, registerAddress, bitLength);
//     scr.Read();
//     scr.Write();
//     }
//
// End Class Specification *********************************************

// Includes
#if !defined(iipScanCommRegisterAccess_h)
#include <iipScanCommRegisterAccess.h>
#endif

#if !defined(IIPBITS_H)
#include <iipbits.h>
#endif


// Forward References
class CHIP_CLASS;
class MopsRegisterAccess;

class ScanCommRegisterChip : public ScanCommRegisterAccess
{
public:

  ScanCommRegisterChip(uint64_t ra,
                       unsigned int bl,
                       MopRegisterAccess &hopsAccess);
  ScanCommRegisterChip() : ScanCommRegisterAccess(), xBitString((uint32_t)0) {}
  // Function Specification ********************************************
  //
  // Purpose:      Initialization (preferred Ctor)
  // Parameters:   chid: Chip Id of chip on which the hardware register resides
  //               ra: Scan com register address or Register Id
  //               bl: Number of bits in register
  //               hopsAccess: object to access Hardware Ops
  // Returns:      No value returned.
  // Requirements: None.
  // Promises:     All data members are initialized
  // Exceptions:   None.
  // Concurrency:  N/A
  //
  // End Function Specification //////////////////////////////////////


  //ScanCommRegisterChip(const ScanCommRegisterChip & scr);
  // Function Specification ********************************************
  //
  // Purpose:      Copy
  // Parameters:   scr: Reference to instance to copy
  // Returns:      No value returned.
  // Requirements: None.
  // Promises:     All data members will be copied (Deep copy).
  // Exceptions:   None.
  // Concurrency:  N/A.
  // Notes:  This constructor is not declared.  This compiler generated
  //         default definition is sufficient.
  //
  // End Function Specification ****************************************

  //virtual ~ScanCommRegisterChip(void);
  // Function Specification ********************************************
  //
  // Purpose:      Destruction
  // Parameters:   None.
  // Returns:      No value returned
  // Requirements: None.
  // Promises:     None.
  // Exceptions:   None.
  // Concurrency:  N/A
  // Notes:  This destructor is not declared.  This compiler generated
  //         default definition is sufficient.
  //
  // End Function Specification ****************************************

  //  ScanCommRegisterChip & operator=(const ScanCommRegisterChip & scr);
  // Function Specification ********************************************
  //
  // Purpose:      Assigment
  // Parameters:   d: Reference to instance to assign from
  // Returns:      Reference to this instance
  // Requirements: None.
  // Promises:     All data members are assigned to
  // Exceptions:   None.
  // Concurrency:  N/A.
  // Notes:  This assingment operator is not declared.  The compiler
  //         generated default definition is sufficient.
  //
  // End Function Specification ****************************************

//  virtual const uint32_t * GetChipSelectValues(unsigned int & chipSelectCount) const;
  // Function Specification ********************************************
  //
  // Purpose:      This function returns the chip select values.
  // Parameters:   chipSelectCount: Number of chip select values in
  //                                returned array
  // Returns:      Pointer to an array of chip select values
  // Requirements: None.
  // Promises:     Parameter chipSelectCount is modified.
  // Exceptions:   None.
  // Concurrency:  Reentrant.
  // Notes:  If the chipPtr is NULL, then the count will be zero and
  //         NULL is returned.
  //
  // End Function Specification ****************************************

  virtual const BIT_STRING_CLASS * GetBitString(ATTENTION_TYPE i_type = PRDF::INVALID_ATTENTION_TYPE) const
  { return &xBitString; }
  // Function Specification ********************************************
  //
  // Purpose:      Access the bit string
  // Parameters:   None
  // Returns:      the bit string
  // Requirements: none
  // Promises:     a bit string
  // Exceptions:   None.
  // Notes:
  //
  // End Function Specification ****************************************

  virtual void SetBitString(const BIT_STRING_CLASS * bs);
  // Function Specification ********************************************
  //
  // Purpose:      Modify the internal bit string
  // Parameters:   a Bit string
  // Returns:      Nothing
  // Requirements: none
  // Promises:     Internal bit string == *bs for first len bits where
  //               len is the smaller of the two lengths
  // Exceptions:   None.
  // Notes:
  //
  // End Function Specification ****************************************

protected: // Functions

  virtual BIT_STRING_CLASS & AccessBitString(void) { return(xBitString); }
  // Function Specification ********************************************
  //
  // Purpose:      Get non-cost referece to bit string
  // Parameters:   None.
  // Returns:      BIT_STRING_CLASS &
  // Requirements: none.
  // Promises:     Direct access to the Bit string
  // Exceptions:   None
  // Notes:
  //
  // End Function Specification ****************************************


private: // functions

  friend class CaptureData;

private: // Data

//  CHIP_CLASS * chipPtr;
  BIT_STRING_BUFFER_CLASS  xBitString;
//  MopRegisterAccessScanCommSingle  xHopsAccess;

};

// Change Log **********************************************************
//
//  Flag  PTR/DCR#  Userid    Date      Description
//  ----  --------  --------  --------  -----------
//  n/a   n/a       JST       04/18/95  Created.
//        D49127.7  DGILBERT  09/20/96  Added xBitString, Get/SetBitString()
//                                      AccessBitString()
//                  DGILBERT  05/27/97  V4R3 changes
//                  dgilbert  10/02/02  fips changes
//
// End Change Log ******************************************************


#endif
OpenPOWER on IntegriCloud