RubySlicc_ComponentMapping.hh (6862:3d308cbd1657) RubySlicc_ComponentMapping.hh (6926:775342cda4db)
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

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

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"
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

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

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#include "mem/protocol/MachineType.hh"
45
46#ifdef MACHINETYPE_L1Cache
47#define MACHINETYPE_L1CACHE_ENUM MachineType_L1Cache
48#else
49#define MACHINETYPE_L1CACHE_ENUM MachineType_NUM
50#endif
51
52#ifdef MACHINETYPE_L2Cache

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

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
46
47#ifdef MACHINETYPE_L1Cache
48#define MACHINETYPE_L1CACHE_ENUM MachineType_L1Cache
49#else
50#define MACHINETYPE_L1CACHE_ENUM MachineType_NUM
51#endif
52
53#ifdef MACHINETYPE_L2Cache

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

63#endif
64
65#ifdef MACHINETYPE_DMA
66#define MACHINETYPE_DMA_ENUM MachineType_DMA
67#else
68#define MACHINETYPE_DMA_ENUM MachineType_NUM
69#endif
70
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

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

147 } else if (machType == MachineType_Directory) {
148 return GenericMachineType_Directory;
149 } else {
150 ERROR_MSG("cannot convert to a GenericMachineType");
151 return GenericMachineType_NULL;
152 }
153}
154
71// used to determine the home directory
72// returns a value between 0 and total_directories_within_the_system
73inline
74NodeID map_Address_to_DirectoryNode(const Address& addr)
75{
76 return DirectoryMemory::mapAddressToDirectoryVersion(addr);
77}
78

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

145 } else if (machType == MachineType_Directory) {
146 return GenericMachineType_Directory;
147 } else {
148 ERROR_MSG("cannot convert to a GenericMachineType");
149 return GenericMachineType_NULL;
150 }
151}
152
153extern inline int machineCount(MachineType machType) {
154 return MachineType_base_count(machType);
155}
155
156#endif // COMPONENTMAPPINGFNS_H
156
157#endif // COMPONENTMAPPINGFNS_H