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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [src/] [librwxxtpp/] [RtclRw11UnitBase.ipp] - Diff between revs 19 and 24

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 19 Rev 24
// $Id: RtclRw11UnitBase.ipp 504 2013-04-13 15:37:24Z mueller $
// $Id: RtclRw11UnitBase.ipp 504 2013-04-13 15:37:24Z mueller $
//
//
// Copyright 2013- by Walter F.J. Mueller 
// Copyright 2013- by Walter F.J. Mueller 
//
//
// This program is free software; you may redistribute and/or modify it under
// This program is free software; you may redistribute and/or modify it under
// the terms of the GNU General Public License as published by the Free
// the terms of the GNU General Public License as published by the Free
// Software Foundation, either version 2, or at your option any later version.
// Software Foundation, either version 2, or at your option any later version.
//
//
// This program is distributed in the hope that it will be useful, but
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// for complete details.
// for complete details.
//
//
// Revision History:
// Revision History:
// Date         Rev Version  Comment
// Date         Rev Version  Comment
// 2013-03-06   495   1.0    Initial version
// 2013-03-06   495   1.0    Initial version
// 2013-02-16   488   0.1    First draft
// 2013-02-16   488   0.1    First draft
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
/*!
/*!
  \file
  \file
  \version $Id: RtclRw11UnitBase.ipp 504 2013-04-13 15:37:24Z mueller $
  \version $Id: RtclRw11UnitBase.ipp 504 2013-04-13 15:37:24Z mueller $
  \brief   Implemenation (all inline) of RtclRw11UnitBase.
  \brief   Implemenation (all inline) of RtclRw11UnitBase.
*/
*/
#include "librtcltools/RtclStats.hpp"
#include "librtcltools/RtclStats.hpp"
/*!
/*!
  \class Retro::RtclRw11UnitBase
  \class Retro::RtclRw11UnitBase
  \brief FIXME_docs
  \brief FIXME_docs
*/
*/
// all method definitions in namespace Retro
// all method definitions in namespace Retro
namespace Retro {
namespace Retro {
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! Constructor
//! Constructor
template 
template 
inline RtclRw11UnitBase::RtclRw11UnitBase(const std::string& type,
inline RtclRw11UnitBase::RtclRw11UnitBase(const std::string& type,
                                     const boost::shared_ptr& spunit)
                                     const boost::shared_ptr& spunit)
  : RtclRw11Unit(type, &(spunit->Cntl().Cpu())),
  : RtclRw11Unit(type, &(spunit->Cntl().Cpu())),
    fspObj(spunit)
    fspObj(spunit)
{
{
  AddMeth("stats",    boost::bind(&RtclRw11UnitBase::M_stats,   this, _1));
  AddMeth("stats",    boost::bind(&RtclRw11UnitBase::M_stats,   this, _1));
  TO* pobj = fspObj.get();
  TO* pobj = fspObj.get();
  fGets.Add            ("index", boost::bind(&TO::Index, pobj));
  fGets.Add            ("index", boost::bind(&TO::Index, pobj));
  fGets.Add       ("name",  boost::bind(&TO::Name,  pobj));
  fGets.Add       ("name",  boost::bind(&TO::Name,  pobj));
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template 
template 
inline RtclRw11UnitBase::~RtclRw11UnitBase()
inline RtclRw11UnitBase::~RtclRw11UnitBase()
{}
{}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template 
template 
inline TO& RtclRw11UnitBase::Obj()
inline TO& RtclRw11UnitBase::Obj()
{
{
  return *fspObj;
  return *fspObj;
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template 
template 
inline const boost::shared_ptr& RtclRw11UnitBase::ObjSPtr()
inline const boost::shared_ptr& RtclRw11UnitBase::ObjSPtr()
{
{
  return fspObj;
  return fspObj;
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template 
template 
int RtclRw11UnitBase::M_stats(RtclArgs& args)
int RtclRw11UnitBase::M_stats(RtclArgs& args)
{
{
  RtclStats::Context cntx;
  RtclStats::Context cntx;
  if (!RtclStats::GetArgs(args, cntx)) return kERR;
  if (!RtclStats::GetArgs(args, cntx)) return kERR;
  if (!RtclStats::Collect(args, cntx, Obj().Stats())) return kERR;
  if (!RtclStats::Collect(args, cntx, Obj().Stats())) return kERR;
  if (Obj().Virt()) {
  if (Obj().Virt()) {
    if (!RtclStats::Collect(args, cntx, Obj().Virt()->Stats())) return kERR;
    if (!RtclStats::Collect(args, cntx, Obj().Virt()->Stats())) return kERR;
  }
  }
  return kOK;
  return kOK;
}
}
} // end namespace Retro
} // end namespace Retro
 
 

powered by: WebSVN 2.1.0

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