tsunami_cchip.cc (4885:385a051ad874) | tsunami_cchip.cc (4918:3214e3694fb2) |
---|---|
1/* 2 * Copyright (c) 2004-2005 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; --- 33 unchanged lines hidden (view full) --- 42#include "cpu/intr_control.hh" 43#include "cpu/thread_context.hh" 44#include "dev/alpha/tsunami.hh" 45#include "dev/alpha/tsunami_cchip.hh" 46#include "dev/alpha/tsunamireg.h" 47#include "mem/packet.hh" 48#include "mem/packet_access.hh" 49#include "mem/port.hh" | 1/* 2 * Copyright (c) 2004-2005 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; --- 33 unchanged lines hidden (view full) --- 42#include "cpu/intr_control.hh" 43#include "cpu/thread_context.hh" 44#include "dev/alpha/tsunami.hh" 45#include "dev/alpha/tsunami_cchip.hh" 46#include "dev/alpha/tsunamireg.h" 47#include "mem/packet.hh" 48#include "mem/packet_access.hh" 49#include "mem/port.hh" |
50#include "sim/builder.hh" | 50#include "params/TsunamiCChip.hh" |
51#include "sim/system.hh" 52 53using namespace std; 54//Should this be AlphaISA? 55using namespace TheISA; 56 | 51#include "sim/system.hh" 52 53using namespace std; 54//Should this be AlphaISA? 55using namespace TheISA; 56 |
57TsunamiCChip::TsunamiCChip(Params *p) | 57TsunamiCChip::TsunamiCChip(const Params *p) |
58 : BasicPioDevice(p), tsunami(p->tsunami) 59{ 60 pioSize = 0x10000000; 61 62 drir = 0; 63 ipint = 0; 64 itint = 0; 65 --- 450 unchanged lines hidden (view full) --- 516{ 517 UNSERIALIZE_ARRAY(dim, Tsunami::Max_CPUs); 518 UNSERIALIZE_ARRAY(dir, Tsunami::Max_CPUs); 519 UNSERIALIZE_SCALAR(ipint); 520 UNSERIALIZE_SCALAR(itint); 521 UNSERIALIZE_SCALAR(drir); 522} 523 | 58 : BasicPioDevice(p), tsunami(p->tsunami) 59{ 60 pioSize = 0x10000000; 61 62 drir = 0; 63 ipint = 0; 64 itint = 0; 65 --- 450 unchanged lines hidden (view full) --- 516{ 517 UNSERIALIZE_ARRAY(dim, Tsunami::Max_CPUs); 518 UNSERIALIZE_ARRAY(dir, Tsunami::Max_CPUs); 519 UNSERIALIZE_SCALAR(ipint); 520 UNSERIALIZE_SCALAR(itint); 521 UNSERIALIZE_SCALAR(drir); 522} 523 |
524BEGIN_DECLARE_SIM_OBJECT_PARAMS(TsunamiCChip) 525 526 Param<Addr> pio_addr; 527 Param<Tick> pio_latency; 528 SimObjectParam<Platform *> platform; 529 SimObjectParam<System *> system; 530 SimObjectParam<Tsunami *> tsunami; 531 532END_DECLARE_SIM_OBJECT_PARAMS(TsunamiCChip) 533 534BEGIN_INIT_SIM_OBJECT_PARAMS(TsunamiCChip) 535 536 INIT_PARAM(pio_addr, "Device Address"), 537 INIT_PARAM(pio_latency, "Programmed IO latency"), 538 INIT_PARAM(platform, "platform"), 539 INIT_PARAM(system, "system object"), 540 INIT_PARAM(tsunami, "Tsunami") 541 542END_INIT_SIM_OBJECT_PARAMS(TsunamiCChip) 543 544CREATE_SIM_OBJECT(TsunamiCChip) | 524TsunamiCChip * 525TsunamiCChipParams::create() |
545{ | 526{ |
546 TsunamiCChip::Params *p = new TsunamiCChip::Params; 547 p->name = getInstanceName(); 548 p->pio_addr = pio_addr; 549 p->pio_delay = pio_latency; 550 p->platform = platform; 551 p->system = system; 552 p->tsunami = tsunami; 553 return new TsunamiCChip(p); | 527 return new TsunamiCChip(this); |
554} | 528} |
555 556REGISTER_SIM_OBJECT("TsunamiCChip", TsunamiCChip) | |