From 4787d357d51811bf5f4c73583e038de3f60e6a72 Mon Sep 17 00:00:00 2001 From: Kevin Lim Date: Sun, 25 Jun 2006 00:22:41 -0400 Subject: Make OzoneCPU work again in SE/FS. src/cpu/ozone/cpu.hh: Fixes to get OzoneCPU working in SE/FS again. src/cpu/ozone/cpu_impl.hh: Be sure to set up ports properly. src/cpu/ozone/front_end.hh: Allow port to be created without specifying its name at the beginning. src/cpu/ozone/front_end_impl.hh: Setup port properly, also only use checker if it's enabled. src/cpu/ozone/lw_back_end_impl.hh: Be sure to initialize variables. src/cpu/ozone/lw_lsq.hh: Handle locked flag for UP systems. src/cpu/ozone/lw_lsq_impl.hh: Initialize all variables. src/python/m5/objects/OzoneCPU.py: Fix up config. --HG-- extra : convert_revision : c99e7bf82fc0dd1099c7a82eaebd58ab6017764d --- src/cpu/ozone/front_end_impl.hh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/cpu/ozone/front_end_impl.hh') diff --git a/src/cpu/ozone/front_end_impl.hh b/src/cpu/ozone/front_end_impl.hh index b1bc325c7..40042489d 100644 --- a/src/cpu/ozone/front_end_impl.hh +++ b/src/cpu/ozone/front_end_impl.hh @@ -28,6 +28,8 @@ * Authors: Kevin Lim */ +#include "config/use_checker.hh" + #include "arch/faults.hh" #include "arch/isa_traits.hh" #include "base/statistics.hh" @@ -37,6 +39,10 @@ #include "mem/packet.hh" #include "mem/request.hh" +#if USE_CHECKER +#include "cpu/checker/cpu.hh" +#endif + using namespace TheISA; template @@ -83,6 +89,7 @@ template FrontEnd::FrontEnd(Params *params) : branchPred(params), icachePort(this), + mem(params->mem), instBufferSize(0), maxInstBufferSize(params->maxInstBufferSize), width(params->frontEndWidth), @@ -123,6 +130,25 @@ FrontEnd::name() const return cpu->name() + ".frontend"; } +template +void +FrontEnd::setCPU(CPUType *cpu_ptr) +{ + cpu = cpu_ptr; + + icachePort.setName(this->name() + "-iport"); + + Port *mem_dport = mem->getPort(""); + icachePort.setPeer(mem_dport); + mem_dport->setPeer(&icachePort); + +#if USE_CHECKER + if (cpu->checker) { + cpu->checker->setIcachePort(&icachePort); + } +#endif +} + template void FrontEnd::setCommBuffer(TimeBuffer *_comm) -- cgit v1.2.3