1 2/* 3 * Copyright (c) 1999 Mark D. Hill and David A. Wood 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 93 unchanged lines hidden (view full) --- 102 103 // Data Members (m_ prefix) 104 physical_address_t m_address; 105}; 106 107inline 108Address line_address(const Address& addr) { Address temp(addr); temp.makeLineAddress(); return temp; } 109 |
110// Output operator declaration 111ostream& operator<<(ostream& out, const Address& obj); 112// comparison operator declaration 113bool operator==(const Address& obj1, const Address& obj2); 114bool operator!=(const Address& obj1, const Address& obj2); 115bool operator<(const Address& obj1, const Address& obj2); 116/* Address& operator=(const physical_address_t address); */ 117 --- 74 unchanged lines hidden (view full) --- 192 return (m_address >> number); 193} 194 195inline 196integer_t Address::memoryModuleIndex() const 197{ 198 integer_t index = bitSelect(RubySystem::getBlockSizeBits()+RubySystem::getMemorySizeBits(), ADDRESS_WIDTH); 199 assert (index >= 0); |
200 return index; 201 202 // Index indexHighPortion = address.bitSelect(MEMORY_SIZE_BITS-1, PAGE_SIZE_BITS+NUMBER_OF_MEMORY_MODULE_BITS); 203 // Index indexLowPortion = address.bitSelect(DATA_BLOCK_BITS, PAGE_SIZE_BITS-1); 204 205 //Index index = indexLowPortion | (indexHighPortion << (PAGE_SIZE_BITS - DATA_BLOCK_BITS)); 206 207 /* --- 37 unchanged lines hidden --- |