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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [src/] [librwxxtpp/] [RtclRw11UnitPC11.cpp] - Blame information for rev 36

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

Line No. Rev Author Line
1 27 wfjm
// $Id: RtclRw11UnitPC11.cpp 584 2014-08-22 19:38:12Z mueller $
2 21 wfjm
//
3 27 wfjm
// Copyright 2013-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 21 wfjm
//
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 27 wfjm
// 2014-08-22   584   1.0.1  use nullptr
17 21 wfjm
// 2013-05-03   515   1.0    Initial version
18
// ---------------------------------------------------------------------------
19
 
20
/*!
21
  \file
22 27 wfjm
  \version $Id: RtclRw11UnitPC11.cpp 584 2014-08-22 19:38:12Z mueller $
23 21 wfjm
  \brief   Implemenation of RtclRw11UnitPC11.
24
*/
25
 
26
#include "RtclRw11UnitPC11.hpp"
27
 
28
using namespace std;
29
 
30
/*!
31
  \class Retro::RtclRw11UnitPC11
32
  \brief FIXME_docs
33
*/
34
 
35
// all method definitions in namespace Retro
36
namespace Retro {
37
 
38
//------------------------------------------+-----------------------------------
39
//! Constructor
40
 
41
RtclRw11UnitPC11::RtclRw11UnitPC11(Tcl_Interp* interp,
42
                              const std::string& unitcmd,
43
                              const boost::shared_ptr<Rw11UnitPC11>& spunit)
44
  : RtclRw11UnitBase<Rw11UnitPC11>("Rw11UnitPC11", spunit),
45
    RtclRw11UnitStream(this, spunit.get())
46
{
47
  // create default unit command
48
  CreateObjectCmd(interp, unitcmd.c_str());
49
 
50
  // for 1st PC11, create also alias
51
  //   cpuxpca0 -> cpuxpr
52
  //   cpuxpca1 -> cpuxpp
53
  if (unitcmd.length() == 8) {
54
    size_t ind = spunit->Index();
55
    if (unitcmd.length() == 8 && unitcmd.substr(4,3) == "pca") {
56
      string alias = unitcmd.substr(0,4);
57
      alias += (ind==Rw11CntlPC11::kUnit_PR) ? "pr" : "pp";
58 27 wfjm
      Tcl_CreateAlias(interp, alias.c_str(), interp, unitcmd.c_str(),
59
                      0, nullptr);
60 21 wfjm
    }
61
  }
62
}
63
 
64
//------------------------------------------+-----------------------------------
65
//! Destructor
66
 
67
RtclRw11UnitPC11::~RtclRw11UnitPC11()
68
{}
69
 
70
} // end namespace Retro

powered by: WebSVN 2.1.0

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