Deleted Added
sdiff udiff text old ( 6285:ce086eca1ede ) new ( 6372:f1a41ea3bbab )
full compact
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

--- 21 unchanged lines hidden (view full) ---

30/*
31 * $Id$
32 */
33
34#ifndef COMPONENTMAPPINGFNS_H
35#define COMPONENTMAPPINGFNS_H
36
37#include "mem/ruby/common/Global.hh"
38#include "mem/ruby/system/NodeID.hh"
39#include "mem/ruby/system/MachineID.hh"
40#include "mem/ruby/common/Address.hh"
41#include "mem/ruby/common/Set.hh"
42#include "mem/ruby/common/NetDest.hh"
43#include "mem/protocol/GenericMachineType.hh"
44#include "mem/ruby/system/DirectoryMemory.hh"
45

--- 10 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// used to determine the home directory
65// returns a value between 0 and total_directories_within_the_system
66inline
67NodeID map_Address_to_DirectoryNode(const Address& addr)
68{
69 return DirectoryMemory::mapAddressToDirectoryVersion(addr);
70}
71

--- 8 unchanged lines hidden (view full) ---

80
81inline
82MachineID map_Address_to_DMA(const Address & addr)
83{
84 MachineID dma = {MachineType_DMA, 0};
85 return dma;
86}
87
88extern inline NodeID machineIDToNodeID(MachineID machID)
89{
90 return machID.num;
91}
92
93extern inline MachineType machineIDToMachineType(MachineID machID)
94{
95 return machID.type;
96}
97
98extern inline NodeID L1CacheMachIDToProcessorNum(MachineID machID)
99{
100 assert(machID.type == MachineType_L1Cache);
101 return machID.num;
102}
103
104extern inline MachineID getL1MachineID(NodeID L1RubyNode)
105{
106 MachineID mach = {MACHINETYPE_L1CACHE_ENUM, L1RubyNode};
107 return mach;
108}
109
110extern inline GenericMachineType ConvertMachToGenericMach(MachineType machType) {
111 if (machType == MACHINETYPE_L1CACHE_ENUM) {

--- 15 unchanged lines hidden ---