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