446a447,453
> if self.isMachineType:
> code('#include "base/misc.hh"')
> code('#include "mem/protocol/GenericMachineType.hh"')
> code('#include "mem/ruby/common/Address.hh"')
> code('#include "mem/ruby/system/NodeID.hh"')
> code('struct MachineID;')
>
491c498,502
< code('#define MACHINETYPE_${{enum.ident}} 1')
---
> if enum.ident == "DMA":
> code('''
> MachineID map_Address_to_DMA(const Address &addr);
> ''')
> code('''
492a504,521
> MachineID get${{enum.ident}}MachineID(NodeID RubyNode);
> ''')
>
> code('''
> inline GenericMachineType
> ConvertMachToGenericMach(MachineType machType)
> {
> ''')
> for enum in self.enums.itervalues():
> code('''
> if (machType == MachineType_${{enum.ident}})
> return GenericMachineType_${{enum.ident}};
> ''')
> code('''
> panic("cannot convert to a GenericMachineType");
> }
> ''')
>
552a582
> code('#include "mem/ruby/system/MachineID.hh"')
725a756,776
> for enum in self.enums.itervalues():
> if enum.ident == "DMA":
> code('''
> MachineID
> map_Address_to_DMA(const Address &addr)
> {
> MachineID dma = {MachineType_DMA, 0};
> return dma;
> }
> ''')
>
> code('''
>
> MachineID
> get${{enum.ident}}MachineID(NodeID RubyNode)
> {
> MachineID mach = {MachineType_${{enum.ident}}, RubyNode};
> return mach;
> }
> ''')
>