Address.hh (6285:ce086eca1ede) | Address.hh (6372:f1a41ea3bbab) |
---|---|
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 | 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/* 111inline 112Address next_stride_address(const Address& addr, int stride) { 113 Address temp = addr; 114 temp.makeNextStrideAddress(stride); 115 temp.setAddress(temp.maskHighOrderBits(ADDRESS_WIDTH-RubyConfig::memorySizeBits())); // surpress wrap-around problem 116 return temp; 117} 118*/ 119 | |
120// Output operator declaration 121ostream& operator<<(ostream& out, const Address& obj); 122// comparison operator declaration 123bool operator==(const Address& obj1, const Address& obj2); 124bool operator!=(const Address& obj1, const Address& obj2); 125bool operator<(const Address& obj1, const Address& obj2); 126/* Address& operator=(const physical_address_t address); */ 127 --- 74 unchanged lines hidden (view full) --- 202 return (m_address >> number); 203} 204 205inline 206integer_t Address::memoryModuleIndex() const 207{ 208 integer_t index = bitSelect(RubySystem::getBlockSizeBits()+RubySystem::getMemorySizeBits(), ADDRESS_WIDTH); 209 assert (index >= 0); | 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); |
210 /* 211 if (index >= RubyConfig::memoryModuleBlocks()) { 212 cerr << " memoryBits: " << RubySystem::getMemorySizeBits() << " memorySizeBits: " << RubySystem::getMemorySizeBits() 213 << " Address: " << "[" << hex << "0x" << m_address << "," << " line 0x" << maskLowOrderBits(RubySystem::getBlockSizeBits()) << dec << "]" << flush 214 << "error: limit exceeded. " << 215 " getDataBlockBits: " << RubySystem::getBlockSizeBits() << 216 " memoryModuleBlocks: " << RubyConfig::memoryModuleBlocks() << 217 " index: " << index << endl; 218 } 219 assert (index < RubyConfig::memoryModuleBlocks()); 220 */ | |
221 return index; 222 223 // Index indexHighPortion = address.bitSelect(MEMORY_SIZE_BITS-1, PAGE_SIZE_BITS+NUMBER_OF_MEMORY_MODULE_BITS); 224 // Index indexLowPortion = address.bitSelect(DATA_BLOCK_BITS, PAGE_SIZE_BITS-1); 225 226 //Index index = indexLowPortion | (indexHighPortion << (PAGE_SIZE_BITS - DATA_BLOCK_BITS)); 227 228 /* --- 37 unchanged lines hidden --- | 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 --- |