source: trunk/IPs/systemC/Environment/Data/include/Segment.h @ 144

Last change on this file since 144 was 144, checked in by rosiere, 14 years ago

1) compatible gcc 4.4.3
2) Translation file in MORPHEO_PREFIX directory

  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1#ifndef ENVIRONMENT_DATA_SEGMENT_H
2#define ENVIRONMENT_DATA_SEGMENT_H
3
4#include "../../../shared/soclib_segment_table.h"
5#include "Type_target.h"
6
7#include <iomanip>
8#include <stdint.h>
9
10extern "C" void loadexec(void **emem, int *esize, int *eoffset, const char *file, const char ** sections);
11
12namespace environment {
13namespace data {
14
15  class Segment
16  {
17  protected : std::string   name;
18
19  protected : uint32_t      base;
20  protected : uint32_t      index;
21  protected : uint32_t      size;
22  protected : bool          uncached;
23  protected : char        * data;
24  protected : type_target_t type;
25
26//public :  Segment (void);
27  public :  Segment (SEGMENT_TABLE_ENTRY * segment);
28  public : ~Segment (void);
29
30  public : bool                 init          (const char * filename, const  char ** sections);
31  public : void                 define_target (type_target_t type, uint32_t index);
32  public : type_target_t        getType       (void);
33  public : uint32_t             getIndex      (void);
34  public : uint32_t             getBase       (void);
35  public : uint32_t             getSize       (void);
36  public : bool                 getUncached   (void);
37  public : char *               data_addr     (void);
38  public : bool                 test          (std::string name);
39  public : bool                 test          (uint32_t address, uint32_t size);
40  public : void                 read          (uint32_t address, uint32_t size, char * & data_dest);
41  public : void                 write         (uint32_t address, uint32_t size, char * & data_src);
42  public : std::string          print         (uint32_t depth);
43  public : friend std::ostream& operator<<    (std::ostream& output, Segment & x);
44  };
45
46};
47};
48#endif
Note: See TracBrowser for help on using the repository browser.