ruby: rename template_hack to template
I don't like using the word hack. Hence, the patch.
This commit is contained in:
parent
d58f84c481
commit
b370f6a7b2
16 changed files with 18 additions and 18 deletions
|
@ -126,7 +126,7 @@ machine(L1Cache, "MESI Directory L1 Cache CMP")
|
||||||
bool isPresent(Address);
|
bool isPresent(Address);
|
||||||
}
|
}
|
||||||
|
|
||||||
TBETable L1_TBEs, template_hack="<L1Cache_TBE>";
|
TBETable L1_TBEs, template="<L1Cache_TBE>";
|
||||||
|
|
||||||
MessageBuffer mandatoryQueue, ordered="false";
|
MessageBuffer mandatoryQueue, ordered="false";
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,7 @@ machine(L2Cache, "MESI Directory L2 Cache CMP")
|
||||||
bool isPresent(Address);
|
bool isPresent(Address);
|
||||||
}
|
}
|
||||||
|
|
||||||
TBETable L2_TBEs, template_hack="<L2Cache_TBE>";
|
TBETable L2_TBEs, template="<L2Cache_TBE>";
|
||||||
|
|
||||||
void set_cache_entry(AbstractCacheEntry a);
|
void set_cache_entry(AbstractCacheEntry a);
|
||||||
void unset_cache_entry();
|
void unset_cache_entry();
|
||||||
|
|
|
@ -105,7 +105,7 @@ machine(Directory, "MESI_CMP_filter_directory protocol")
|
||||||
|
|
||||||
// ** OBJECTS **
|
// ** OBJECTS **
|
||||||
|
|
||||||
TBETable TBEs, template_hack="<Directory_TBE>";
|
TBETable TBEs, template="<Directory_TBE>";
|
||||||
|
|
||||||
void set_tbe(TBE tbe);
|
void set_tbe(TBE tbe);
|
||||||
void unset_tbe();
|
void unset_tbe();
|
||||||
|
|
|
@ -98,7 +98,7 @@ machine(L1Cache, "MI Example L1 Cache")
|
||||||
|
|
||||||
|
|
||||||
// STRUCTURES
|
// STRUCTURES
|
||||||
TBETable TBEs, template_hack="<L1Cache_TBE>";
|
TBETable TBEs, template="<L1Cache_TBE>";
|
||||||
|
|
||||||
// PROTOTYPES
|
// PROTOTYPES
|
||||||
void set_cache_entry(AbstractCacheEntry a);
|
void set_cache_entry(AbstractCacheEntry a);
|
||||||
|
|
|
@ -102,7 +102,7 @@ machine(Directory, "Directory protocol")
|
||||||
}
|
}
|
||||||
|
|
||||||
// ** OBJECTS **
|
// ** OBJECTS **
|
||||||
TBETable TBEs, template_hack="<Directory_TBE>";
|
TBETable TBEs, template="<Directory_TBE>";
|
||||||
|
|
||||||
void set_tbe(TBE b);
|
void set_tbe(TBE b);
|
||||||
void unset_tbe();
|
void unset_tbe();
|
||||||
|
|
|
@ -142,7 +142,7 @@ machine(L1Cache, "Directory protocol")
|
||||||
|
|
||||||
MessageBuffer mandatoryQueue, ordered="false", abstract_chip_ptr="true";
|
MessageBuffer mandatoryQueue, ordered="false", abstract_chip_ptr="true";
|
||||||
|
|
||||||
TBETable TBEs, template_hack="<L1Cache_TBE>";
|
TBETable TBEs, template="<L1Cache_TBE>";
|
||||||
TimerTable useTimerTable;
|
TimerTable useTimerTable;
|
||||||
int l2_select_low_bit, default="RubySystem::getBlockSizeBits()";
|
int l2_select_low_bit, default="RubySystem::getBlockSizeBits()";
|
||||||
|
|
||||||
|
|
|
@ -225,8 +225,8 @@ machine(L2Cache, "Token protocol")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TBETable TBEs, template_hack="<L2Cache_TBE>";
|
TBETable TBEs, template="<L2Cache_TBE>";
|
||||||
PerfectCacheMemory localDirectory, template_hack="<L2Cache_DirEntry>";
|
PerfectCacheMemory localDirectory, template="<L2Cache_DirEntry>";
|
||||||
|
|
||||||
void set_cache_entry(AbstractCacheEntry b);
|
void set_cache_entry(AbstractCacheEntry b);
|
||||||
void unset_cache_entry();
|
void unset_cache_entry();
|
||||||
|
|
|
@ -119,7 +119,7 @@ machine(Directory, "Directory protocol")
|
||||||
}
|
}
|
||||||
|
|
||||||
// ** OBJECTS **
|
// ** OBJECTS **
|
||||||
TBETable TBEs, template_hack="<Directory_TBE>";
|
TBETable TBEs, template="<Directory_TBE>";
|
||||||
|
|
||||||
void set_tbe(TBE b);
|
void set_tbe(TBE b);
|
||||||
void unset_tbe();
|
void unset_tbe();
|
||||||
|
|
|
@ -44,7 +44,7 @@ machine(DMA, "DMA Controller")
|
||||||
|
|
||||||
MessageBuffer mandatoryQueue, ordered="false";
|
MessageBuffer mandatoryQueue, ordered="false";
|
||||||
MessageBuffer triggerQueue, ordered="true";
|
MessageBuffer triggerQueue, ordered="true";
|
||||||
TBETable TBEs, template_hack="<DMA_TBE>";
|
TBETable TBEs, template="<DMA_TBE>";
|
||||||
State cur_state;
|
State cur_state;
|
||||||
|
|
||||||
void set_tbe(TBE b);
|
void set_tbe(TBE b);
|
||||||
|
|
|
@ -180,7 +180,7 @@ machine(L1Cache, "Token protocol")
|
||||||
void wakeUpAllBuffers();
|
void wakeUpAllBuffers();
|
||||||
void wakeUpBuffers(Address a);
|
void wakeUpBuffers(Address a);
|
||||||
|
|
||||||
TBETable L1_TBEs, template_hack="<L1Cache_TBE>";
|
TBETable L1_TBEs, template="<L1Cache_TBE>";
|
||||||
|
|
||||||
MessageBuffer mandatoryQueue, ordered="false", abstract_chip_ptr="true";
|
MessageBuffer mandatoryQueue, ordered="false", abstract_chip_ptr="true";
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ machine(L2Cache, "Token protocol")
|
||||||
}
|
}
|
||||||
|
|
||||||
PersistentTable persistentTable;
|
PersistentTable persistentTable;
|
||||||
PerfectCacheMemory localDirectory, template_hack="<L2Cache_DirEntry>";
|
PerfectCacheMemory localDirectory, template="<L2Cache_DirEntry>";
|
||||||
|
|
||||||
void set_cache_entry(AbstractCacheEntry b);
|
void set_cache_entry(AbstractCacheEntry b);
|
||||||
void unset_cache_entry();
|
void unset_cache_entry();
|
||||||
|
|
|
@ -157,7 +157,7 @@ machine(Directory, "Token protocol")
|
||||||
PersistentTable persistentTable;
|
PersistentTable persistentTable;
|
||||||
TimerTable reissueTimerTable;
|
TimerTable reissueTimerTable;
|
||||||
|
|
||||||
TBETable TBEs, template_hack="<Directory_TBE>";
|
TBETable TBEs, template="<Directory_TBE>";
|
||||||
|
|
||||||
bool starving, default="false";
|
bool starving, default="false";
|
||||||
int l2_select_low_bit, default="RubySystem::getBlockSizeBits()";
|
int l2_select_low_bit, default="RubySystem::getBlockSizeBits()";
|
||||||
|
|
|
@ -173,7 +173,7 @@ machine(L1Cache, "AMD Hammer-like protocol")
|
||||||
bool isPresent(Address);
|
bool isPresent(Address);
|
||||||
}
|
}
|
||||||
|
|
||||||
TBETable TBEs, template_hack="<L1Cache_TBE>";
|
TBETable TBEs, template="<L1Cache_TBE>";
|
||||||
|
|
||||||
void set_cache_entry(AbstractCacheEntry b);
|
void set_cache_entry(AbstractCacheEntry b);
|
||||||
void unset_cache_entry();
|
void unset_cache_entry();
|
||||||
|
|
|
@ -184,7 +184,7 @@ machine(Directory, "AMD Hammer-like protocol")
|
||||||
|
|
||||||
Set fwd_set;
|
Set fwd_set;
|
||||||
|
|
||||||
TBETable TBEs, template_hack="<Directory_TBE>";
|
TBETable TBEs, template="<Directory_TBE>";
|
||||||
|
|
||||||
Entry getDirectoryEntry(Address addr), return_by_pointer="yes" {
|
Entry getDirectoryEntry(Address addr), return_by_pointer="yes" {
|
||||||
Entry dir_entry := static_cast(Entry, "pointer", directory[addr]);
|
Entry dir_entry := static_cast(Entry, "pointer", directory[addr]);
|
||||||
|
|
|
@ -82,7 +82,7 @@ machine(L1Cache, "Network_test L1 Cache")
|
||||||
|
|
||||||
// STRUCTURES
|
// STRUCTURES
|
||||||
|
|
||||||
TBETable TBEs, template_hack="<L1Cache_TBE>";
|
TBETable TBEs, template="<L1Cache_TBE>";
|
||||||
|
|
||||||
|
|
||||||
// FUNCTIONS
|
// FUNCTIONS
|
||||||
|
|
|
@ -385,7 +385,7 @@ void unset_tbe(${{self.TBEType.c_ident}}*& m_tbe_ptr);
|
||||||
// Objects
|
// Objects
|
||||||
''')
|
''')
|
||||||
for var in self.objects:
|
for var in self.objects:
|
||||||
th = var.get("template_hack", "")
|
th = var.get("template", "")
|
||||||
code('${{var.type.c_ident}}$th* m_${{var.c_ident}}_ptr;')
|
code('${{var.type.c_ident}}$th* m_${{var.c_ident}}_ptr;')
|
||||||
|
|
||||||
if var.type.ident == "MessageBuffer":
|
if var.type.ident == "MessageBuffer":
|
||||||
|
@ -568,7 +568,7 @@ $c_ident::init()
|
||||||
if "factory" in var:
|
if "factory" in var:
|
||||||
code('$vid = ${{var["factory"]}};')
|
code('$vid = ${{var["factory"]}};')
|
||||||
elif var.ident.find("mandatoryQueue") < 0:
|
elif var.ident.find("mandatoryQueue") < 0:
|
||||||
th = var.get("template_hack", "")
|
th = var.get("template", "")
|
||||||
expr = "%s = new %s%s" % (vid, vtype.c_ident, th)
|
expr = "%s = new %s%s" % (vid, vtype.c_ident, th)
|
||||||
|
|
||||||
args = ""
|
args = ""
|
||||||
|
|
Loading…
Reference in a new issue