ruby: Import ruby and slicc from GEMS
[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_Directory(Address addr);
34 NodeID map_Address_to_DirectoryNode(Address addr);
35 MachineID map_Address_to_CentralArbiterNode(Address addr);
36 NodeID oldmap_L1RubyNode_to_L2Cache(Address addr, NodeID L1RubyNode);
37 MachineID map_L1CacheMachId_to_L2Cache(Address addr, MachineID L1CacheMachId);
38 MachineID map_L2ChipId_to_L2Cache(Address addr, NodeID L2ChipId);
39 // MachineID map_L1RubyNode_to_Arb(NodeID L1RubyNode);
40
41 MachineID getL1MachineID(NodeID L1RubyNode);
42 NodeID getChipID(MachineID L2machID);
43 MachineID getCollectorDest(MachineID L1machID);
44 MachineID getCollectorL1Cache(MachineID colID);
45 NetDest getMultiStaticL2BankNetDest(Address addr, Set sharers);
46 bool isL1OnChip(MachineID L1machID, NodeID L2NodeID);
47 bool isL2OnChip(MachineID L2machID, NodeID L2NodeID);
48
49 int getNumBanksInBankSet();
50 NodeID machineIDToNodeID(MachineID machID);
51 NodeID machineIDToVersion(MachineID machID);
52 MachineType machineIDToMachineType(MachineID machID);
53 NodeID L1CacheMachIDToProcessorNum(MachineID machID);
54 NodeID L2CacheMachIDToChipID(MachineID machID);
55 Set getOtherLocalL1IDs(MachineID L1);
56 Set getLocalL1IDs(MachineID L1);
57 Set getExternalL1IDs(MachineID L1);
58 NetDest getAllPertinentL2Banks(Address addr);
59 bool isLocalProcessor(MachineID thisId, MachineID tarId);
60
61 GenericMachineType ConvertMachToGenericMach(MachineType machType);
62