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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [src/] [librw11/] [Rw11Unit.hpp] - Blame information for rev 33

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 wfjm
// $Id: Rw11Unit.hpp 680 2015-05-14 13:29:46Z mueller $
2 19 wfjm
//
3 30 wfjm
// Copyright 2013-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 19 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 30 wfjm
// 2015-05-13   680   1.1.1  add Enabled()
17 21 wfjm
// 2013-05-03   515   1.1    use AttachDone(),DetachCleanup(),DetachDone()
18
// 2013-05-01   513   1.0.1  add fAttachOpts, (Set)AttachOpts()
19 19 wfjm
// 2013-03-06   495   1.0    Initial version
20
// 2013-02-13   488   0.1    First draft
21
// ---------------------------------------------------------------------------
22
 
23
 
24
/*!
25
  \file
26 30 wfjm
  \version $Id: Rw11Unit.hpp 680 2015-05-14 13:29:46Z mueller $
27 19 wfjm
  \brief   Declaration of class Rw11Unit.
28
*/
29
 
30
#ifndef included_Retro_Rw11Unit
31
#define included_Retro_Rw11Unit 1
32
 
33 21 wfjm
#include <string>
34
 
35 19 wfjm
#include "boost/utility.hpp"
36
 
37
#include "librtools/Rstats.hpp"
38
#include "librtools/RerrMsg.hpp"
39
#include "librlink/RlinkServer.hpp"
40
 
41
#include "librtools/Rbits.hpp"
42
#include "Rw11Cntl.hpp"
43
 
44
namespace Retro {
45
 
46
  class Rw11Unit : public Rbits, private boost::noncopyable {
47
    public:
48
 
49
                    Rw11Unit(Rw11Cntl* pcntl, size_t index);
50
      virtual      ~Rw11Unit();
51
 
52
      size_t        Index() const;
53
      std::string   Name() const;
54
 
55 21 wfjm
      void          SetAttachOpts(const std::string& opts);
56
      const std::string& AttachOpts() const;
57
 
58 19 wfjm
      Rw11Cntl&     CntlBase() const;
59
      Rw11Cpu&      Cpu() const;
60
      Rw11&         W11() const;
61
      RlinkServer&  Server() const;
62
      RlinkConnect& Connect() const;
63
      RlogFile&     LogFile() const;
64
 
65 30 wfjm
      virtual bool  Enabled() const;
66
 
67 19 wfjm
      virtual bool  Attach(const std::string& url, RerrMsg& emsg);
68
      virtual void  Detach();
69
 
70
      const Rstats& Stats() const;
71
      virtual void  Dump(std::ostream& os, int ind=0, const char* text=0) const;
72
 
73
    // statistics counter indices
74
      enum stats {
75
        kDimStat = 0
76
      };
77
 
78
    protected:
79 21 wfjm
      virtual void  AttachDone();
80 19 wfjm
      virtual void  DetachCleanup();
81 21 wfjm
      virtual void  DetachDone();
82 19 wfjm
 
83
    private:
84
                    Rw11Unit() {}           //!< default ctor blocker
85
 
86
    protected:
87
      Rw11Cntl*     fpCntlBase;             //!< plain Rw11Cntl ptr
88
      size_t        fIndex;                 //!< unit number
89 21 wfjm
      std::string   fAttachOpts;            //!< unit context options for attach
90 19 wfjm
      Rstats        fStats;                 //!< statistics
91
  };
92
 
93
} // end namespace Retro
94
 
95
#include "Rw11Unit.ipp"
96
 
97
#endif

powered by: WebSVN 2.1.0

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