blob: 3f3f2713d9f8ab8eb82678d4a40ab31c579af404 [file] [log] [blame]
Zane Shelleyfd3f9cc2019-07-29 15:02:24 -05001/* IBM_PROLOG_BEGIN_TAG */
2/* This is an automatically generated prolog. */
3/* */
4/* $Source: src/usr/diag/prdf/common/framework/register/prdfScomRegisterAccess.C $ */
5/* */
6/* OpenPOWER HostBoot Project */
7/* */
8/* COPYRIGHT International Business Machines Corp. 2012,2014 */
9/* */
10/* Licensed under the Apache License, Version 2.0 (the "License"); */
11/* you may not use this file except in compliance with the License. */
12/* You may obtain a copy of the License at */
13/* */
14/* http://www.apache.org/licenses/LICENSE-2.0 */
15/* */
16/* Unless required by applicable law or agreed to in writing, software */
17/* distributed under the License is distributed on an "AS IS" BASIS, */
18/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
19/* implied. See the License for the specific language governing */
20/* permissions and limitations under the License. */
21/* */
22/* IBM_PROLOG_END_TAG */
23
24#include <prdfScomRegisterAccess.H>
25#include <prdfScanFacility.H>
26#include <prdfRegisterCache.H>
27#include <prdfExtensibleChip.H>
Zane Shelleyfd275a22019-09-05 23:13:59 -050028
29namespace libhei
Zane Shelleyfd3f9cc2019-07-29 15:02:24 -050030{
31
32ScomRegisterAccess::ScomRegisterAccess(
Zane Shelley23244cb2019-08-30 21:12:12 -050033 const Register & i_pRegister,
Zane Shelleyfd3f9cc2019-07-29 15:02:24 -050034 ExtensibleChip * i_pRuleChip ) :
Zane Shelleycd36f432019-08-30 21:22:07 -050035 HardwareRegister( i_pRegister ),
Zane Shelleyfd3f9cc2019-07-29 15:02:24 -050036 iv_containerChip( i_pRuleChip )
37{}
38
39//----------------------------------------------------------------------
40
41ExtensibleChip* ScomRegisterAccess::getChip( )const
42{
43 return iv_containerChip;
44}
45
46//----------------------------------------------------------------------
47
48bool ScomRegisterAccess::operator == (
49 const ScomRegisterAccess & i_rightRegister ) const
50{
51 if( GetAddress() == i_rightRegister.GetAddress() )
52 {
53 return ( getChip() == i_rightRegister.getChip() );
54 }
55 else
56 {
57 return false ;
58 }
59
60}
61//----------------------------------------------------------------------
62
63bool ScomRegisterAccess::operator < (
64 const ScomRegisterAccess & i_rightRegister ) const
65{
66 if( GetAddress() == i_rightRegister.GetAddress() )
67 {
68 return ( getChip() < i_rightRegister.getChip() );
69 }
70 else
71 {
72 return ( GetAddress() < i_rightRegister.GetAddress() );
73 }
74}
75
76//----------------------------------------------------------------------
77bool ScomRegisterAccess::operator >= (
78 const ScomRegisterAccess & i_right ) const
79{
80 return !( *this < i_right );
81}
82
83//----------------------------------------------------------------------
Zane Shelleyfd275a22019-09-05 23:13:59 -050084
85} // end namespace libhei
86