addr_range.hh (9780:704c03c216f7) | addr_range.hh (10435:97d6ed3054ae) |
---|---|
1/* 2 * Copyright (c) 2012 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 44 unchanged lines hidden (view full) --- 53#include "base/types.hh" 54 55class AddrRange 56{ 57 58 private: 59 60 /// Private fields for the start and end of the range | 1/* 2 * Copyright (c) 2012 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 44 unchanged lines hidden (view full) --- 53#include "base/types.hh" 54 55class AddrRange 56{ 57 58 private: 59 60 /// Private fields for the start and end of the range |
61 /// Both _start and _end are part of the range. |
|
61 Addr _start; 62 Addr _end; 63 64 /// The high bit of the slice that is used for interleaving 65 uint8_t intlvHighBit; 66 67 /// The number of bits used for interleaving, set to 0 to disable 68 uint8_t intlvBits; --- 92 unchanged lines hidden (view full) --- 161 Addr size() const 162 { 163 return (_end - _start + 1) >> intlvBits; 164 } 165 166 /** 167 * Determine if the range is valid. 168 */ | 62 Addr _start; 63 Addr _end; 64 65 /// The high bit of the slice that is used for interleaving 66 uint8_t intlvHighBit; 67 68 /// The number of bits used for interleaving, set to 0 to disable 69 uint8_t intlvBits; --- 92 unchanged lines hidden (view full) --- 162 Addr size() const 163 { 164 return (_end - _start + 1) >> intlvBits; 165 } 166 167 /** 168 * Determine if the range is valid. 169 */ |
169 bool valid() const { return _start < _end; } | 170 bool valid() const { return _start <= _end; } |
170 171 /** 172 * Get the start address of the range. 173 */ 174 Addr start() const { return _start; } 175 176 /** 177 * Get a string representation of the range. This could --- 130 unchanged lines hidden --- | 171 172 /** 173 * Get the start address of the range. 174 */ 175 Addr start() const { return _start; } 176 177 /** 178 * Get a string representation of the range. This could --- 130 unchanged lines hidden --- |