iob.cc (4216:c01745179a1f) | iob.cc (4762:c94e103c83ad) |
---|---|
1/* 2 * Copyright (c) 2006 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; --- 31 unchanged lines hidden (view full) --- 40#include "arch/sparc/isa_traits.hh" 41#include "arch/sparc/faults.hh" 42#include "base/trace.hh" 43#include "cpu/intr_control.hh" 44#include "dev/sparc/iob.hh" 45#include "dev/platform.hh" 46#include "mem/port.hh" 47#include "mem/packet_access.hh" | 1/* 2 * Copyright (c) 2006 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; --- 31 unchanged lines hidden (view full) --- 40#include "arch/sparc/isa_traits.hh" 41#include "arch/sparc/faults.hh" 42#include "base/trace.hh" 43#include "cpu/intr_control.hh" 44#include "dev/sparc/iob.hh" 45#include "dev/platform.hh" 46#include "mem/port.hh" 47#include "mem/packet_access.hh" |
48#include "sim/builder.hh" | |
49#include "sim/faults.hh" 50#include "sim/system.hh" 51 | 48#include "sim/faults.hh" 49#include "sim/system.hh" 50 |
52Iob::Iob(Params *p) | 51Iob::Iob(const Params *p) |
53 : PioDevice(p), ic(p->platform->intrctrl) 54{ 55 iobManAddr = ULL(0x9800000000); 56 iobManSize = ULL(0x0100000000); 57 iobJBusAddr = ULL(0x9F00000000); 58 iobJBusSize = ULL(0x0100000000); 59 assert (params()->system->threadContexts.size() <= MaxNiagaraProcs); 60 // Get the interrupt controller from the platform --- 306 unchanged lines hidden (view full) --- 367 paramIn(cp, csprintf("%s.Int%d", name(), x), "pend", intCtl[x].pend); 368 }; 369 for (int x = 0; x < MaxNiagaraProcs; x++) { 370 paramIn(cp, csprintf("%s.jIntBusy%d", name(), x), "busy", jIntBusy[x].busy); 371 paramIn(cp, csprintf("%s.jIntBusy%d", name(), x), "source", jIntBusy[x].source); 372 }; 373} 374 | 52 : PioDevice(p), ic(p->platform->intrctrl) 53{ 54 iobManAddr = ULL(0x9800000000); 55 iobManSize = ULL(0x0100000000); 56 iobJBusAddr = ULL(0x9F00000000); 57 iobJBusSize = ULL(0x0100000000); 58 assert (params()->system->threadContexts.size() <= MaxNiagaraProcs); 59 // Get the interrupt controller from the platform --- 306 unchanged lines hidden (view full) --- 366 paramIn(cp, csprintf("%s.Int%d", name(), x), "pend", intCtl[x].pend); 367 }; 368 for (int x = 0; x < MaxNiagaraProcs; x++) { 369 paramIn(cp, csprintf("%s.jIntBusy%d", name(), x), "busy", jIntBusy[x].busy); 370 paramIn(cp, csprintf("%s.jIntBusy%d", name(), x), "source", jIntBusy[x].source); 371 }; 372} 373 |
375 376 377 378BEGIN_DECLARE_SIM_OBJECT_PARAMS(Iob) 379 Param<Tick> pio_latency; 380 SimObjectParam<Platform *> platform; 381 SimObjectParam<System *> system; 382END_DECLARE_SIM_OBJECT_PARAMS(Iob) 383 384BEGIN_INIT_SIM_OBJECT_PARAMS(Iob) 385 386 INIT_PARAM(pio_latency, "Programmed IO latency"), 387 INIT_PARAM(platform, "platform"), 388 INIT_PARAM(system, "system object") 389 390END_INIT_SIM_OBJECT_PARAMS(Iob) 391 392CREATE_SIM_OBJECT(Iob) | 374Iob * 375IobParams::create() |
393{ | 376{ |
394 Iob::Params *p = new Iob::Params; 395 p->name = getInstanceName(); 396 p->pio_delay = pio_latency; 397 p->platform = platform; 398 p->system = system; 399 return new Iob(p); | 377 return new Iob(this); |
400} | 378} |
401 402REGISTER_SIM_OBJECT("Iob", Iob) | |