RubySlicc_ComponentMapping.hh (6785:bb675ba62c79) RubySlicc_ComponentMapping.hh (6843:de4b394c6792)
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
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{
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

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

76{
77 MachineID mach = {MachineType_Directory, map_Address_to_DirectoryNode(addr)};
78 return mach;
79}
80
81inline
82MachineID map_Address_to_DMA(const Address & addr)
83{
93 MachineID dma = {MACHINETYPE_DMA_ENUM, 0};
84 MachineID dma = {MachineType_DMA, 0};
94 return dma;
95}
96
85 return dma;
86}
87
88inline
89NetDest broadcast(MachineType type)
90{
91 NetDest dest;
92 for (int i=0; i<MachineType_base_count(type); i++) {
93 MachineID mach = {type, i};
94 dest.add(mach);
95 }
96 return dest;
97}
98
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)
102 return mach;
103 mach.num = addr.bitSelect(low_bit, low_bit+num_bits-1);
104 return mach;

--- 41 unchanged lines hidden ---
99inline
100MachineID mapAddressToRange(const Address & addr, MachineType type, int low_bit, int num_bits)
101{
102 MachineID mach = {type, 0};
103 if (num_bits == 0)
104 return mach;
105 mach.num = addr.bitSelect(low_bit, low_bit+num_bits-1);
106 return mach;

--- 41 unchanged lines hidden ---