automerge
[gem5.git] / src / mem / protocol / RubySlicc_ComponentMapping.sm
1
2 /*
3 * Copyright (c) 1999-2005 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
9 * notice, this list of conditions and the following disclaimer;
10 * redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution;
13 * neither the name of the copyright holders nor the names of its
14 * contributors may be used to endorse or promote products derived from
15 * this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30 // Mapping functions
31
32 // NodeID map_address_to_node(Address addr);
33 MachineID map_Address_to_DMA(Address addr);
34 MachineID map_Address_to_Directory(Address addr);
35 NodeID map_Address_to_DirectoryNode(Address addr);
36 MachineID map_Address_to_CentralArbiterNode(Address addr);
37 NodeID oldmap_L1RubyNode_to_L2Cache(Address addr, NodeID L1RubyNode);
38 MachineID map_L1CacheMachId_to_L2Cache(Address addr, MachineID L1CacheMachId);
39 MachineID map_L2ChipId_to_L2Cache(Address addr, NodeID L2ChipId);
40 // MachineID map_L1RubyNode_to_Arb(NodeID L1RubyNode);
41
42 MachineID getL1MachineID(NodeID L1RubyNode);
43 NodeID getChipID(MachineID L2machID);
44 MachineID getCollectorDest(MachineID L1machID);
45 MachineID getCollectorL1Cache(MachineID colID);
46 NetDest getMultiStaticL2BankNetDest(Address addr, Set sharers);
47 bool isL1OnChip(MachineID L1machID, NodeID L2NodeID);
48 bool isL2OnChip(MachineID L2machID, NodeID L2NodeID);
49
50 int getNumBanksInBankSet();
51 NodeID machineIDToNodeID(MachineID machID);
52 NodeID machineIDToVersion(MachineID machID);
53 MachineType machineIDToMachineType(MachineID machID);
54 NodeID L1CacheMachIDToProcessorNum(MachineID machID);
55 NodeID L2CacheMachIDToChipID(MachineID machID);
56 Set getOtherLocalL1IDs(MachineID L1);
57 Set getLocalL1IDs(MachineID L1);
58 Set getExternalL1IDs(MachineID L1);
59 NetDest getAllPertinentL2Banks(Address addr);
60 bool isLocalProcessor(MachineID thisId, MachineID tarId);
61
62 GenericMachineType ConvertMachToGenericMach(MachineType machType);
63