summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resources
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2011-02-18 14:29:02 -0500
committerKorey Sewell <ksewell@umich.edu>2011-02-18 14:29:02 -0500
commit72b5233112a41cb879ca63866f9f0ecf8638dbfb (patch)
tree088819d58becadf24d185f560242abca83c50090 /src/cpu/inorder/resources
parentd5961b2b20b498db28c0598f4344f5cb31be850f (diff)
downloadgem5-72b5233112a41cb879ca63866f9f0ecf8638dbfb.tar.xz
inorder: remove events for zero-cycle resources
if a resource has a zero cycle latency (e.g. RegFile write), then dont allocate an event for it to use
Diffstat (limited to 'src/cpu/inorder/resources')
-rw-r--r--src/cpu/inorder/resources/use_def.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cpu/inorder/resources/use_def.cc b/src/cpu/inorder/resources/use_def.cc
index 85bf14500..19246a30b 100644
--- a/src/cpu/inorder/resources/use_def.cc
+++ b/src/cpu/inorder/resources/use_def.cc
@@ -92,7 +92,11 @@ void
UseDefUnit::init()
{
// Set Up Resource Events to Appropriate Resource BandWidth
- resourceEvent = new ResourceEvent[width];
+ if (latency > 0) {
+ resourceEvent = new ResourceEvent[width];
+ } else {
+ resourceEvent = NULL;
+ }
for (int i = 0; i < width; i++) {
reqs[i] = new UseDefRequest(this);