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

Subversion Repositories w11

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

powered by: WebSVN 2.1.0

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