Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 1 | /* 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 Shelley | fd275a2 | 2019-09-05 23:13:59 -0500 | [diff] [blame^] | 28 | |
| 29 | namespace libhei |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 30 | { |
| 31 | |
| 32 | ScomRegisterAccess::ScomRegisterAccess( |
Zane Shelley | 23244cb | 2019-08-30 21:12:12 -0500 | [diff] [blame] | 33 | const Register & i_pRegister, |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 34 | ExtensibleChip * i_pRuleChip ) : |
Zane Shelley | cd36f43 | 2019-08-30 21:22:07 -0500 | [diff] [blame] | 35 | HardwareRegister( i_pRegister ), |
Zane Shelley | fd3f9cc | 2019-07-29 15:02:24 -0500 | [diff] [blame] | 36 | iv_containerChip( i_pRuleChip ) |
| 37 | {} |
| 38 | |
| 39 | //---------------------------------------------------------------------- |
| 40 | |
| 41 | ExtensibleChip* ScomRegisterAccess::getChip( )const |
| 42 | { |
| 43 | return iv_containerChip; |
| 44 | } |
| 45 | |
| 46 | //---------------------------------------------------------------------- |
| 47 | |
| 48 | bool 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 | |
| 63 | bool 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 | //---------------------------------------------------------------------- |
| 77 | bool ScomRegisterAccess::operator >= ( |
| 78 | const ScomRegisterAccess & i_right ) const |
| 79 | { |
| 80 | return !( *this < i_right ); |
| 81 | } |
| 82 | |
| 83 | //---------------------------------------------------------------------- |
Zane Shelley | fd275a2 | 2019-09-05 23:13:59 -0500 | [diff] [blame^] | 84 | |
| 85 | } // end namespace libhei |
| 86 | |