tlb.cc (4870:fcc39d001154) tlb.cc (4918:3214e3694fb2)
1/*
2 * Copyright (c) 2001-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;

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

34#include "arch/sparc/miscregfile.hh"
35#include "arch/sparc/tlb.hh"
36#include "base/bitfield.hh"
37#include "base/trace.hh"
38#include "cpu/thread_context.hh"
39#include "cpu/base.hh"
40#include "mem/packet_access.hh"
41#include "mem/request.hh"
1/*
2 * Copyright (c) 2001-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;

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

34#include "arch/sparc/miscregfile.hh"
35#include "arch/sparc/tlb.hh"
36#include "base/bitfield.hh"
37#include "base/trace.hh"
38#include "cpu/thread_context.hh"
39#include "cpu/base.hh"
40#include "mem/packet_access.hh"
41#include "mem/request.hh"
42#include "sim/builder.hh"
42#include "params/SparcDTB.hh"
43#include "params/SparcITB.hh"
43#include "sim/system.hh"
44
45/* @todo remove some of the magic constants. -- ali
46 * */
47namespace SparcISA {
48
49TLB::TLB(const std::string &name, int s)
50 : SimObject(name), size(s), usedEntries(0), lastReplaced(0),

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

1381 if (tlb[x].valid)
1382 lookupTable.insert(tlb[x].range, &tlb[x]);
1383
1384 }
1385}
1386
1387/* end namespace SparcISA */ }
1388
44#include "sim/system.hh"
45
46/* @todo remove some of the magic constants. -- ali
47 * */
48namespace SparcISA {
49
50TLB::TLB(const std::string &name, int s)
51 : SimObject(name), size(s), usedEntries(0), lastReplaced(0),

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

1382 if (tlb[x].valid)
1383 lookupTable.insert(tlb[x].range, &tlb[x]);
1384
1385 }
1386}
1387
1388/* end namespace SparcISA */ }
1389
1389using namespace SparcISA;
1390
1391DEFINE_SIM_OBJECT_CLASS_NAME("SparcTLB", TLB)
1392
1393BEGIN_DECLARE_SIM_OBJECT_PARAMS(ITB)
1394
1395 Param<int> size;
1396
1397END_DECLARE_SIM_OBJECT_PARAMS(ITB)
1398
1399BEGIN_INIT_SIM_OBJECT_PARAMS(ITB)
1400
1401 INIT_PARAM_DFLT(size, "TLB size", 48)
1402
1403END_INIT_SIM_OBJECT_PARAMS(ITB)
1404
1405
1406CREATE_SIM_OBJECT(ITB)
1390SparcISA::ITB *
1391SparcITBParams::create()
1407{
1392{
1408 return new ITB(getInstanceName(), size);
1393 return new SparcISA::ITB(name, size);
1409}
1410
1394}
1395
1411REGISTER_SIM_OBJECT("SparcITB", ITB)
1412
1413BEGIN_DECLARE_SIM_OBJECT_PARAMS(DTB)
1414
1415 Param<int> size;
1416
1417END_DECLARE_SIM_OBJECT_PARAMS(DTB)
1418
1419BEGIN_INIT_SIM_OBJECT_PARAMS(DTB)
1420
1421 INIT_PARAM_DFLT(size, "TLB size", 64)
1422
1423END_INIT_SIM_OBJECT_PARAMS(DTB)
1424
1425
1426CREATE_SIM_OBJECT(DTB)
1396SparcISA::DTB *
1397SparcDTBParams::create()
1427{
1398{
1428 return new DTB(getInstanceName(), size);
1399 return new SparcISA::DTB(name, size);
1429}
1400}
1430
1431REGISTER_SIM_OBJECT("SparcDTB", DTB)