RubySlicc_ComponentMapping.hh (6467:5670eee2a866) | RubySlicc_ComponentMapping.hh (6468:26abdfe2d980) |
---|---|
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 --- 72 unchanged lines hidden (view full) --- 81inline 82MachineID map_Address_to_DMA(const Address & addr) 83{ 84 MachineID dma = {MachineType_DMA, 0}; 85 return dma; 86} 87 88inline | 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 --- 72 unchanged lines hidden (view full) --- 81inline 82MachineID map_Address_to_DMA(const Address & addr) 83{ 84 MachineID dma = {MachineType_DMA, 0}; 85 return dma; 86} 87 88inline |
89MachineID mapAddressToRange(const Address & addr, MachineType type, int low_bit, int high_bit) | 89MachineID mapAddressToRange(const Address & addr, MachineType type, int low_bit, int num_bits) |
90{ 91 MachineID mach = {type, 0}; | 90{ 91 MachineID mach = {type, 0}; |
92 mach.num = addr.bitSelect(low_bit, high_bit); | 92 if (num_bits == 0) 93 return mach; 94 mach.num = addr.bitSelect(low_bit, low_bit+num_bits-1); |
93 return mach; 94} 95 96extern inline NodeID machineIDToNodeID(MachineID machID) 97{ 98 return machID.num; 99} 100 --- 34 unchanged lines hidden --- | 95 return mach; 96} 97 98extern inline NodeID machineIDToNodeID(MachineID machID) 99{ 100 return machID.num; 101} 102 --- 34 unchanged lines hidden --- |