RubySlicc_ComponentMapping.hh (11308:7d8836fd043d) | RubySlicc_ComponentMapping.hh (12065:e3e51756dfef) |
---|---|
1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 21 unchanged lines hidden (view full) --- 30#define __MEM_RUBY_SLICC_INTERFACE_RUBYSLICC_COMPONENTMAPPINGS_HH__ 31 32#include "mem/protocol/MachineType.hh" 33#include "mem/ruby/common/Address.hh" 34#include "mem/ruby/common/MachineID.hh" 35#include "mem/ruby/common/NetDest.hh" 36#include "mem/ruby/structures/DirectoryMemory.hh" 37 | 1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 21 unchanged lines hidden (view full) --- 30#define __MEM_RUBY_SLICC_INTERFACE_RUBYSLICC_COMPONENTMAPPINGS_HH__ 31 32#include "mem/protocol/MachineType.hh" 33#include "mem/ruby/common/Address.hh" 34#include "mem/ruby/common/MachineID.hh" 35#include "mem/ruby/common/NetDest.hh" 36#include "mem/ruby/structures/DirectoryMemory.hh" 37 |
38// used to determine the home directory 39// returns a value between 0 and total_directories_within_the_system 40inline NodeID 41map_Address_to_DirectoryNode(Addr addr) 42{ 43 return DirectoryMemory::mapAddressToDirectoryVersion(addr); 44} 45 46inline NodeID 47map_Address_to_TCCdirNode(Addr addr) 48{ 49 return DirectoryMemory::mapAddressToDirectoryVersion(addr); 50} 51 52// used to determine the home directory 53// returns a value between 0 and total_directories_within_the_system 54inline MachineID 55map_Address_to_Directory(Addr addr) 56{ 57 MachineID mach = 58 {MachineType_Directory, map_Address_to_DirectoryNode(addr)}; 59 return mach; 60} 61 62inline MachineID 63map_Address_to_RegionDir(Addr addr) 64{ 65 MachineID mach = {MachineType_RegionDir, 66 map_Address_to_DirectoryNode(addr)}; 67 return mach; 68} 69 70inline MachineID 71map_Address_to_TCCdir(Addr addr) 72{ 73 MachineID mach = 74 {MachineType_TCCdir, map_Address_to_TCCdirNode(addr)}; 75 return mach; 76} 77 | |
78inline NetDest 79broadcast(MachineType type) 80{ 81 NetDest dest; 82 for (NodeID i = 0; i < MachineType_base_count(type); i++) { 83 MachineID mach = {type, i}; 84 dest.add(mach); 85 } --- 49 unchanged lines hidden --- | 38inline NetDest 39broadcast(MachineType type) 40{ 41 NetDest dest; 42 for (NodeID i = 0; i < MachineType_base_count(type); i++) { 43 MachineID mach = {type, i}; 44 dest.add(mach); 45 } --- 49 unchanged lines hidden --- |