tsunami_cchip.cc (4739:9f8edf47aeca) tsunami_cchip.cc (4762:c94e103c83ad)
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

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

517{
518 UNSERIALIZE_ARRAY(dim, Tsunami::Max_CPUs);
519 UNSERIALIZE_ARRAY(dir, Tsunami::Max_CPUs);
520 UNSERIALIZE_SCALAR(ipint);
521 UNSERIALIZE_SCALAR(itint);
522 UNSERIALIZE_SCALAR(drir);
523}
524
58 : BasicPioDevice(p), tsunami(p->tsunami)
59{
60 pioSize = 0x10000000;
61
62 drir = 0;
63 ipint = 0;
64 itint = 0;
65

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

517{
518 UNSERIALIZE_ARRAY(dim, Tsunami::Max_CPUs);
519 UNSERIALIZE_ARRAY(dir, Tsunami::Max_CPUs);
520 UNSERIALIZE_SCALAR(ipint);
521 UNSERIALIZE_SCALAR(itint);
522 UNSERIALIZE_SCALAR(drir);
523}
524
525BEGIN_DECLARE_SIM_OBJECT_PARAMS(TsunamiCChip)
526
527 Param<Addr> pio_addr;
528 Param<Tick> pio_latency;
529 SimObjectParam<Platform *> platform;
530 SimObjectParam<System *> system;
531 SimObjectParam<Tsunami *> tsunami;
532
533END_DECLARE_SIM_OBJECT_PARAMS(TsunamiCChip)
534
535BEGIN_INIT_SIM_OBJECT_PARAMS(TsunamiCChip)
536
537 INIT_PARAM(pio_addr, "Device Address"),
538 INIT_PARAM(pio_latency, "Programmed IO latency"),
539 INIT_PARAM(platform, "platform"),
540 INIT_PARAM(system, "system object"),
541 INIT_PARAM(tsunami, "Tsunami")
542
543END_INIT_SIM_OBJECT_PARAMS(TsunamiCChip)
544
545CREATE_SIM_OBJECT(TsunamiCChip)
525TsunamiCChip *
526TsunamiCChipParams::create()
546{
527{
547 TsunamiCChip::Params *p = new TsunamiCChip::Params;
548 p->name = getInstanceName();
549 p->pio_addr = pio_addr;
550 p->pio_delay = pio_latency;
551 p->platform = platform;
552 p->system = system;
553 p->tsunami = tsunami;
554 return new TsunamiCChip(p);
528 return new TsunamiCChip(this);
555}
529}
556
557REGISTER_SIM_OBJECT("TsunamiCChip", TsunamiCChip)