1 2/* 3 * Copyright (c) 1999-2008 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 --- 47 unchanged lines hidden (view full) --- 56#endif 57 58#ifdef MACHINETYPE_L3Cache 59#define MACHINETYPE_L3CACHE_ENUM MachineType_L3Cache 60#else 61#define MACHINETYPE_L3CACHE_ENUM MachineType_NUM 62#endif 63 |
64#ifdef MACHINETYPE_DMA 65#define MACHINETYPE_DMA_ENUM MachineType_DMA 66#else 67#define MACHINETYPE_DMA_ENUM MachineType_NUM 68#endif 69 70// used to determine the number of acks to wait for 71int getNumberOfLastLevelCaches(); 72 |
73// used to determine the home directory 74// returns a value between 0 and total_directories_within_the_system 75inline 76NodeID map_Address_to_DirectoryNode(const Address& addr) 77{ 78 return DirectoryMemory::mapAddressToDirectoryVersion(addr); 79} 80 --- 4 unchanged lines hidden (view full) --- 85{ 86 MachineID mach = {MachineType_Directory, map_Address_to_DirectoryNode(addr)}; 87 return mach; 88} 89 90inline 91MachineID map_Address_to_DMA(const Address & addr) 92{ |
93 MachineID dma = {MACHINETYPE_DMA_ENUM, 0}; |
94 return dma; 95} 96 97inline 98MachineID mapAddressToRange(const Address & addr, MachineType type, int low_bit, int num_bits) 99{ 100 MachineID mach = {type, 0}; 101 if (num_bits == 0) --- 44 unchanged lines hidden --- |