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

Subversion Repositories w11

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

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

Line No. Rev Author Line
1 20 wfjm
// $Id: Rw11Cntl.hpp 508 2013-04-20 18:43:28Z 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
// 2013-03-06   495   1.0    Initial version
17
// 2013-02-05   483   0.1    First draft
18
// ---------------------------------------------------------------------------
19
 
20
 
21
/*!
22
  \file
23 20 wfjm
  \version $Id: Rw11Cntl.hpp 508 2013-04-20 18:43:28Z mueller $
24 19 wfjm
  \brief   Declaration of class Rw11Cntl.
25
*/
26
 
27
#ifndef included_Retro_Rw11Cntl
28
#define included_Retro_Rw11Cntl 1
29
 
30
#include <string>
31
 
32
#include "boost/utility.hpp"
33
 
34
#include "librtools/Rstats.hpp"
35
#include "librlink/RlinkConnect.hpp"
36
#include "librlink/RlinkServer.hpp"
37
#include "Rw11Probe.hpp"
38
 
39
#include "librtools/Rbits.hpp"
40
#include "Rw11Cpu.hpp"
41
 
42
namespace Retro {
43
 
44
  class Rw11Cntl : public Rbits, private boost::noncopyable {
45
    public:
46
 
47
      explicit      Rw11Cntl(const std::string& type);
48
      virtual      ~Rw11Cntl();
49
 
50
      void          SetCpu(Rw11Cpu* pcpu);
51
      Rw11Cpu&      Cpu() const;
52
      Rw11&         W11() const;
53
      RlinkServer&  Server() const;
54
      RlinkConnect& Connect() const;
55
      RlogFile&     LogFile() const;
56
 
57
      const std::string&   Type() const;
58
      const std::string&   Name() const;
59
      uint16_t      Base() const;
60
      int           Lam() const;
61
 
62
      void          SetEnable(bool ena);
63
      bool          Enable() const;
64
 
65
      virtual bool  Probe();
66
      const Rw11Probe& ProbeStatus() const;
67
 
68
      virtual void  Start();
69
      bool          IsStarted() const;
70
 
71
      virtual bool  BootCode(size_t unit, std::vector<uint16_t>& code,
72
                             uint16_t& aload, uint16_t& astart);
73
 
74
      void          SetTraceLevel(uint32_t level);
75
      uint32_t      TraceLevel() const;
76
 
77
      std::string   UnitName(size_t index) const;
78
 
79
      const Rstats& Stats() const;
80
      virtual void  Dump(std::ostream& os, int ind=0, const char* text=0) const;
81
 
82
    // statistics counter indices
83
      enum stats {
84
        kStatNAttnHdl = 0,
85
        kStatNPrimFused,
86
        kStatNAttnNoAct,
87
        kDimStat
88
      };
89
 
90
    protected:
91
      void          ConfigCntl(const std::string& name, uint16_t base, int lam,
92
                               uint16_t probeoff, bool probeint, bool proberem);
93
      void          GetPrimInfo(const RlinkServer::AttnArgs& args,
94
                                RlinkCommandList*& pclist, size_t& offset);
95
 
96
    private:
97
                    Rw11Cntl() {}           //!< default ctor blocker
98
 
99
    protected:
100
      Rw11Cpu*      fpCpu;                  //!< cpu back pointer
101
      std::string   fType;                  //!< controller type
102
      std::string   fName;                  //!< controller name
103
      uint16_t      fBase;                  //!< controller base address
104
      int           fLam;                   //!< attn bit number (-1 of none)
105
      bool          fEnable;                //!< enable flag
106
      bool          fStarted;               //!< true if Start() called
107
      Rw11Probe     fProbe;                 //!< controller probe context
108 20 wfjm
      uint32_t      fTraceLevel;            //!< trace level; 0=off;1=cntl
109 19 wfjm
      RlinkCommandList fPrimClist;          //!< clist for attn primary info 
110
      Rstats        fStats;                 //!< statistics
111
  };
112
 
113
} // end namespace Retro
114
 
115
#include "Rw11Cntl.ipp"
116
 
117
#endif

powered by: WebSVN 2.1.0

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