using namespace std;
AlphaConsole::AlphaConsole(const string &name, SimConsole *cons, SimpleDisk *d,
- System *system, BaseCPU *cpu, SimObject *clock,
+ System *system, BaseCPU *cpu, Platform *platform,
int num_cpus, MemoryController *mmu, Addr a,
HierParams *hier, Bus *bus)
: PioDevice(name), disk(d), console(cons), addr(a)
alphaAccess->numCPUs = num_cpus;
alphaAccess->mem_size = system->physmem->size();
alphaAccess->cpuClock = cpu->getFreq() / 1000000;
- TsunamiIO *clock_linux = dynamic_cast<TsunamiIO *>(clock);
- TlaserClock *clock_tru64 = dynamic_cast<TlaserClock *>(clock);
- if (clock_linux)
- alphaAccess->intrClockFrequency = clock_linux->frequency();
- else if (clock_tru64)
- alphaAccess->intrClockFrequency = clock_tru64->frequency();
- else
- panic("clock must be of type TlaserClock or TsunamiIO\n");
+ alphaAccess->intrClockFrequency = platform->intrFrequency();
alphaAccess->diskUnit = 1;
}
Param<Addr> addr;
SimObjectParam<System *> system;
SimObjectParam<BaseCPU *> cpu;
- SimObjectParam<SimObject *> clock;
+ SimObjectParam<Platform *> platform;
SimObjectParam<Bus*> io_bus;
SimObjectParam<HierParams *> hier;
INIT_PARAM(addr, "Device Address"),
INIT_PARAM(system, "system object"),
INIT_PARAM(cpu, "Processor"),
- INIT_PARAM(clock, "Clock"),
+ INIT_PARAM(platform, "platform"),
INIT_PARAM_DFLT(io_bus, "The IO Bus to attach to", NULL),
INIT_PARAM_DFLT(hier, "Hierarchy global variables", &defaultHierParams)
CREATE_SIM_OBJECT(AlphaConsole)
{
return new AlphaConsole(getInstanceName(), sim_console, disk,
- system, cpu, clock, num_cpus, mmu,
+ system, cpu, platform, num_cpus, mmu,
addr, hier, io_bus);
}
#include "dev/alpha_access.h"
#include "dev/io_device.hh"
#include "sim/host.hh"
-#include "dev/tsunami_io.hh"
#include "sim/sim_object.hh"
class BaseCPU;
class SimConsole;
class System;
-class TlaserClock;
+class Platform;
class SimpleDisk;
/*
public:
/** Standard Constructor */
AlphaConsole(const std::string &name, SimConsole *cons, SimpleDisk *d,
- System *system, BaseCPU *cpu, SimObject *clock,
+ System *system, BaseCPU *cpu, Platform *platform,
int num_cpus, MemoryController *mmu, Addr addr,
HierParams *hier, Bus *bus);