From 991d0185c68b53a04ae5d1f1a05749bbfddced89 Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Fri, 18 Feb 2011 14:27:52 -0500 Subject: inorder: initialize res. req. vectors based on resource bandwidth first change in an optimization that will stop InOrder from allocating new memory for every instruction's request to a resource. This gets expensive since every instruction needs to access ~10 requests before graduation. Instead, the plan is to allocate just enough resource request objects to satisfy each resource's bandwidth (e.g. the execution unit would need to allocate 3 resource request objects for a 1-issue pipeline since on any given cycle it could have 2 read requests and 1 write request) and then let the instructions contend and reuse those allocated requests. The end result is a smaller memory footprint for the InOrder model and increased simulation performance --- src/cpu/inorder/resources/use_def.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/cpu/inorder/resources/use_def.cc') diff --git a/src/cpu/inorder/resources/use_def.cc b/src/cpu/inorder/resources/use_def.cc index 538b20246..dd178403b 100644 --- a/src/cpu/inorder/resources/use_def.cc +++ b/src/cpu/inorder/resources/use_def.cc @@ -88,6 +88,19 @@ UseDefUnit::regStats() Resource::regStats(); } +void +UseDefUnit::init() +{ + // Set Up Resource Events to Appropriate Resource BandWidth + resourceEvent = new ResourceEvent[width]; + + for (int i = 0; i < width; i++) { + reqs[i] = new UseDefRequest(this, NULL, 0, 0, 0, 0, 0); + } + + initSlots(); +} + ResReqPtr UseDefUnit::getRequest(DynInstPtr inst, int stage_num, int res_idx, int slot_num, unsigned cmd) -- cgit v1.2.3