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

Subversion Repositories w11

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

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

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

powered by: WebSVN 2.1.0

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