iob.cc (4870:fcc39d001154) | iob.cc (4918:3214e3694fb2) |
---|---|
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 --- 305 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 | 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 --- 305 unchanged lines hidden (view full) --- 365 paramIn(cp, csprintf("%s.Int%d", name(), x), "pend", intCtl[x].pend); 366 }; 367 for (int x = 0; x < MaxNiagaraProcs; x++) { 368 paramIn(cp, csprintf("%s.jIntBusy%d", name(), x), "busy", jIntBusy[x].busy); 369 paramIn(cp, csprintf("%s.jIntBusy%d", name(), x), "source", jIntBusy[x].source); 370 }; 371} 372 |
374 375 376 377BEGIN_DECLARE_SIM_OBJECT_PARAMS(Iob) 378 Param<Tick> pio_latency; 379 SimObjectParam<Platform *> platform; 380 SimObjectParam<System *> system; 381END_DECLARE_SIM_OBJECT_PARAMS(Iob) 382 383BEGIN_INIT_SIM_OBJECT_PARAMS(Iob) 384 385 INIT_PARAM(pio_latency, "Programmed IO latency"), 386 INIT_PARAM(platform, "platform"), 387 INIT_PARAM(system, "system object") 388 389END_INIT_SIM_OBJECT_PARAMS(Iob) 390 391CREATE_SIM_OBJECT(Iob) | 373Iob * 374IobParams::create() |
392{ | 375{ |
393 Iob::Params *p = new Iob::Params; 394 p->name = getInstanceName(); 395 p->pio_delay = pio_latency; 396 p->platform = platform; 397 p->system = system; 398 return new Iob(p); | 376 return new Iob(this); |
399} | 377} |
400 401REGISTER_SIM_OBJECT("Iob", Iob) | |