inst_queue_impl.hh (5529:9ae69b9cd7fd) inst_queue_impl.hh (5606:6da7a58b0bc8)
1/*
2 * Copyright (c) 2004-2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 27 unchanged lines hidden (view full) ---

36#include "cpu/o3/inst_queue.hh"
37#include "enums/OpClass.hh"
38#include "sim/core.hh"
39
40#include "params/DerivO3CPU.hh"
41
42template <class Impl>
43InstructionQueue<Impl>::FUCompletion::FUCompletion(DynInstPtr &_inst,
1/*
2 * Copyright (c) 2004-2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 27 unchanged lines hidden (view full) ---

36#include "cpu/o3/inst_queue.hh"
37#include "enums/OpClass.hh"
38#include "sim/core.hh"
39
40#include "params/DerivO3CPU.hh"
41
42template <class Impl>
43InstructionQueue<Impl>::FUCompletion::FUCompletion(DynInstPtr &_inst,
44 int fu_idx,
45 InstructionQueue<Impl> *iq_ptr)
46 : Event(&mainEventQueue, Stat_Event_Pri),
47 inst(_inst), fuIdx(fu_idx), iqPtr(iq_ptr), freeFU(false)
44 int fu_idx, InstructionQueue<Impl> *iq_ptr)
45 : Event(Stat_Event_Pri), inst(_inst), fuIdx(fu_idx), iqPtr(iq_ptr),
46 freeFU(false)
48{
49 this->setFlags(Event::AutoDelete);
50}
51
52template <class Impl>
53void
54InstructionQueue<Impl>::FUCompletion::process()
55{

--- 693 unchanged lines hidden (view full) ---

749 if (idx >= 0)
750 fuPool->freeUnitNextCycle(idx);
751 } else {
752 int issue_latency = fuPool->getIssueLatency(op_class);
753 // Generate completion event for the FU
754 FUCompletion *execution = new FUCompletion(issuing_inst,
755 idx, this);
756
47{
48 this->setFlags(Event::AutoDelete);
49}
50
51template <class Impl>
52void
53InstructionQueue<Impl>::FUCompletion::process()
54{

--- 693 unchanged lines hidden (view full) ---

748 if (idx >= 0)
749 fuPool->freeUnitNextCycle(idx);
750 } else {
751 int issue_latency = fuPool->getIssueLatency(op_class);
752 // Generate completion event for the FU
753 FUCompletion *execution = new FUCompletion(issuing_inst,
754 idx, this);
755
757 execution->schedule(curTick + cpu->ticks(op_latency - 1));
756 cpu->schedule(execution, curTick + cpu->ticks(op_latency - 1));
758
759 // @todo: Enforce that issue_latency == 1 or op_latency
760 if (issue_latency > 1) {
761 // If FU isn't pipelined, then it must be freed
762 // upon the execution completing.
763 execution->setFreeFU();
764 } else {
765 // Add the FU onto the list of FU's to be freed next cycle.

--- 645 unchanged lines hidden ---
757
758 // @todo: Enforce that issue_latency == 1 or op_latency
759 if (issue_latency > 1) {
760 // If FU isn't pipelined, then it must be freed
761 // upon the execution completing.
762 execution->setFreeFU();
763 } else {
764 // Add the FU onto the list of FU's to be freed next cycle.

--- 645 unchanged lines hidden ---