OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.61/] [tools/] [src/] [librwxxtpp/] [RtclRw11UnitBase.ipp] - Blame information for rev 40

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 wfjm
// $Id: RtclRw11UnitBase.ipp 504 2013-04-13 15:37:24Z mueller $
2
//
3
// Copyright 2013- by Walter F.J. Mueller 
4
//
5
// This program is free software; you may redistribute and/or modify it under
6
// the terms of the GNU General Public License as published by the Free
7
// Software Foundation, either version 2, or at your option any later version.
8
//
9
// This program is distributed in the hope that it will be useful, but
10
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
// for complete details.
13
//
14
// Revision History:
15
// Date         Rev Version  Comment
16
// 2013-03-06   495   1.0    Initial version
17
// 2013-02-16   488   0.1    First draft
18
// ---------------------------------------------------------------------------
19
 
20
/*!
21
  \file
22
  \version $Id: RtclRw11UnitBase.ipp 504 2013-04-13 15:37:24Z mueller $
23
  \brief   Implemenation (all inline) of RtclRw11UnitBase.
24
*/
25
 
26
#include "librtcltools/RtclStats.hpp"
27
 
28
/*!
29
  \class Retro::RtclRw11UnitBase
30
  \brief FIXME_docs
31
*/
32
 
33
// all method definitions in namespace Retro
34
namespace Retro {
35
 
36
//------------------------------------------+-----------------------------------
37
//! Constructor
38
 
39
template 
40
inline RtclRw11UnitBase::RtclRw11UnitBase(const std::string& type,
41
                                     const boost::shared_ptr& spunit)
42
  : RtclRw11Unit(type, &(spunit->Cntl().Cpu())),
43
    fspObj(spunit)
44
{
45
  AddMeth("stats",    boost::bind(&RtclRw11UnitBase::M_stats,   this, _1));
46
  TO* pobj = fspObj.get();
47
  fGets.Add            ("index", boost::bind(&TO::Index, pobj));
48
  fGets.Add       ("name",  boost::bind(&TO::Name,  pobj));
49
}
50
 
51
//------------------------------------------+-----------------------------------
52
//! FIXME_docs
53
 
54
template 
55
inline RtclRw11UnitBase::~RtclRw11UnitBase()
56
{}
57
 
58
//------------------------------------------+-----------------------------------
59
//! FIXME_docs
60
 
61
template 
62
inline TO& RtclRw11UnitBase::Obj()
63
{
64
  return *fspObj;
65
}
66
 
67
//------------------------------------------+-----------------------------------
68
//! FIXME_docs
69
 
70
template 
71
inline const boost::shared_ptr& RtclRw11UnitBase::ObjSPtr()
72
{
73
  return fspObj;
74
}
75
 
76
//------------------------------------------+-----------------------------------
77
//! FIXME_docs
78
 
79
template 
80
int RtclRw11UnitBase::M_stats(RtclArgs& args)
81
{
82
  RtclStats::Context cntx;
83
  if (!RtclStats::GetArgs(args, cntx)) return kERR;
84
  if (!RtclStats::Collect(args, cntx, Obj().Stats())) return kERR;
85
  if (Obj().Virt()) {
86
    if (!RtclStats::Collect(args, cntx, Obj().Virt()->Stats())) return kERR;
87
  }
88
  return kOK;
89
}
90
 
91
} // end namespace Retro

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.