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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.74/] [tools/] [src/] [librlink/] [RlinkCommandList.hpp] - Blame information for rev 27

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

Line No. Rev Author Line
1 27 wfjm
// $Id: RlinkCommandList.hpp 606 2014-11-24 07:08:51Z mueller $
2 10 wfjm
//
3 25 wfjm
// Copyright 2011-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 10 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-11-23   606   1.2    new rlink v4 iface
17 25 wfjm
// 2014-08-02   576   1.1    rename LastExpect->SetLastExpect
18 19 wfjm
// 2013-05-06   495   1.0.1  add RlinkContext to Print() args; drop oper<<()
19 10 wfjm
// 2011-03-05   366   1.0    Initial version
20
// 2011-01-09   354   0.1    First draft
21
// ---------------------------------------------------------------------------
22
 
23
 
24
/*!
25
  \file
26 27 wfjm
  \version $Id: RlinkCommandList.hpp 606 2014-11-24 07:08:51Z mueller $
27 10 wfjm
  \brief   Declaration of class RlinkCommandList.
28
*/
29
 
30
#ifndef included_Retro_RlinkCommandList
31
#define included_Retro_RlinkCommandList 1
32
 
33
#include <cstddef>
34
#include <cstdint>
35
#include <vector>
36
#include <iostream>
37
 
38
#include "RlinkCommandExpect.hpp"
39
#include "RlinkCommand.hpp"
40 19 wfjm
#include "RlinkContext.hpp"
41 10 wfjm
#include "RlinkAddrMap.hpp"
42
 
43
namespace Retro {
44
 
45
  class RlinkCommandList {
46
    public:
47
 
48
                    RlinkCommandList();
49
                    RlinkCommandList(const RlinkCommandList&);
50 19 wfjm
                   ~RlinkCommandList();
51 10 wfjm
 
52
      size_t        AddCommand(RlinkCommand* cmd);
53
      size_t        AddCommand(const RlinkCommand& cmd);
54
      size_t        AddCommand(const RlinkCommandList& clist);
55
      size_t        AddRreg(uint16_t addr);
56
      size_t        AddRblk(uint16_t addr, size_t size);
57
      size_t        AddRblk(uint16_t addr, uint16_t* block, size_t size);
58
      size_t        AddWreg(uint16_t addr, uint16_t data);
59
      size_t        AddWblk(uint16_t addr, std::vector<uint16_t> block);
60
      size_t        AddWblk(uint16_t addr, const uint16_t* block, size_t size);
61 27 wfjm
      size_t        AddLabo();
62 10 wfjm
      size_t        AddAttn();
63
      size_t        AddInit(uint16_t addr, uint16_t data);
64
 
65 25 wfjm
      void          SetLastExpect(RlinkCommandExpect* exp);
66 10 wfjm
 
67 27 wfjm
      void          ClearLaboIndex();
68
      void          SetLaboIndex(int ind);
69
      int           LaboIndex() const;
70
      bool          LaboActive() const;
71
 
72 10 wfjm
      void          Clear();
73
      size_t        Size() const;
74
 
75 19 wfjm
      void          Print(std::ostream& os, const RlinkContext& cntx,
76
                          const RlinkAddrMap* pamap=0, size_t abase=16,
77
                          size_t dbase=16, size_t sbase=16) const;
78 10 wfjm
      void          Dump(std::ostream& os, int ind=0, const char* text=0) const;
79
 
80
      RlinkCommandList& operator=(const RlinkCommandList& rhs);
81
 
82
      RlinkCommand& operator[](size_t ind);
83
      const RlinkCommand& operator[](size_t ind) const;
84
 
85
    protected:
86 27 wfjm
      std::vector<RlinkCommand*> fList;     //!< vector of commands
87
      int           fLaboIndex;             //!< index of active labo (-1 if no)
88 10 wfjm
  };
89
 
90
} // end namespace Retro
91
 
92
#include "RlinkCommandList.ipp"
93
 
94
#endif

powered by: WebSVN 2.1.0

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