tsunami_pchip.cc (4870:fcc39d001154) tsunami_pchip.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;

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

38#include <vector>
39
40#include "base/trace.hh"
41#include "dev/alpha/tsunami_pchip.hh"
42#include "dev/alpha/tsunamireg.h"
43#include "dev/alpha/tsunami.hh"
44#include "mem/packet.hh"
45#include "mem/packet_access.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;

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

38#include <vector>
39
40#include "base/trace.hh"
41#include "dev/alpha/tsunami_pchip.hh"
42#include "dev/alpha/tsunamireg.h"
43#include "dev/alpha/tsunami.hh"
44#include "mem/packet.hh"
45#include "mem/packet_access.hh"
46#include "sim/builder.hh"
47#include "sim/system.hh"
48
49using namespace std;
50//Should this be AlphaISA?
51using namespace TheISA;
52
46#include "sim/system.hh"
47
48using namespace std;
49//Should this be AlphaISA?
50using namespace TheISA;
51
53TsunamiPChip::TsunamiPChip(Params *p)
52TsunamiPChip::TsunamiPChip(const Params *p)
54: BasicPioDevice(p)
55{
56 pioSize = 0x1000;
57
58 for (int i = 0; i < 4; i++) {
59 wsba[i] = 0;
60 wsm[i] = 0;
61 tba[i] = 0;

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

327{
328 UNSERIALIZE_SCALAR(pctl);
329 UNSERIALIZE_ARRAY(wsba, 4);
330 UNSERIALIZE_ARRAY(wsm, 4);
331 UNSERIALIZE_ARRAY(tba, 4);
332}
333
334
53: BasicPioDevice(p)
54{
55 pioSize = 0x1000;
56
57 for (int i = 0; i < 4; i++) {
58 wsba[i] = 0;
59 wsm[i] = 0;
60 tba[i] = 0;

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

326{
327 UNSERIALIZE_SCALAR(pctl);
328 UNSERIALIZE_ARRAY(wsba, 4);
329 UNSERIALIZE_ARRAY(wsm, 4);
330 UNSERIALIZE_ARRAY(tba, 4);
331}
332
333
335BEGIN_DECLARE_SIM_OBJECT_PARAMS(TsunamiPChip)
336
337 Param<Addr> pio_addr;
338 Param<Tick> pio_latency;
339 SimObjectParam<Platform *> platform;
340 SimObjectParam<System *> system;
341 SimObjectParam<Tsunami *> tsunami;
342
343END_DECLARE_SIM_OBJECT_PARAMS(TsunamiPChip)
344
345BEGIN_INIT_SIM_OBJECT_PARAMS(TsunamiPChip)
346
347 INIT_PARAM(pio_addr, "Device Address"),
348 INIT_PARAM(pio_latency, "Programmed IO latency"),
349 INIT_PARAM(platform, "platform"),
350 INIT_PARAM(system, "system object"),
351 INIT_PARAM(tsunami, "Tsunami")
352
353END_INIT_SIM_OBJECT_PARAMS(TsunamiPChip)
354
355CREATE_SIM_OBJECT(TsunamiPChip)
334TsunamiPChip *
335TsunamiPChipParams::create()
356{
336{
357 TsunamiPChip::Params *p = new TsunamiPChip::Params;
358 p->name = getInstanceName();
359 p->pio_addr = pio_addr;
360 p->pio_delay = pio_latency;
361 p->platform = platform;
362 p->system = system;
363 p->tsunami = tsunami;
364 return new TsunamiPChip(p);
337 return new TsunamiPChip(this);
365}
338}
366
367REGISTER_SIM_OBJECT("TsunamiPChip", TsunamiPChip)