Changeset 255 for soft/giet_vm/memo/include
- Timestamp:
- Oct 9, 2013, 9:32:41 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/memo/include/pseg.h
r238 r255 58 58 public: 59 59 60 int32_t m_align; // alignment of the first vobj 60 61 bool m_ident; // identity mapping required if true 61 62 … … 66 67 size_t length() const; 67 68 size_t type() const; 68 //void add( VObj& vobj );//add a VObj69 69 70 void print( std::ostream &o) const;70 void print(std::ostream &o) const; 71 71 friend std::ostream &operator<<( std::ostream &o, const VSeg &s ) 72 72 { … … 75 75 } 76 76 77 VSeg& operator=( const VSeg &ref);77 VSeg& operator=(const VSeg &ref); 78 78 79 79 VSeg(); 80 VSeg( const VSeg &ref);80 VSeg(const VSeg &ref); 81 81 VSeg(std::string& binaryName, 82 82 std::string& name, … … 97 97 size_t m_type; 98 98 99 paddr_t m_pageLimit; // m_lma + m_length aligned on page size 100 paddr_t m_nextLma; // next free base 101 102 void confNextLma(); // check m_nextLma is whithin the seg limits 99 static size_t m_pageSize; 103 100 104 101 public: … … 106 103 std::vector<VSeg> m_vsegs; 107 104 108 paddr_t m_limit; // m_lma + m_length109 110 105 const std::string& name() const; 111 106 paddr_t lma() const; 112 107 paddr_t length() const; 113 108 size_t type() const; 114 paddr_t limit() const;115 paddr_t nextLma() const;116 109 117 110 void check() const; 118 111 119 112 void setName(std::string& name); 120 void setLma( 113 void setLma(paddr_t lma); 121 114 void setLength(paddr_t length); 122 115 123 static paddr_t align( 124 static paddr_t pageAlign( paddr_t toAlign);116 static paddr_t align(paddr_t toAlign, unsigned alignPow2); 117 static paddr_t pageAlign(paddr_t toAlign); 125 118 126 static void setPageSize(size_t pg); 119 static void setPageSize(size_t pg) { 120 m_pageSize = pg; 121 } 122 static size_t pageSize() { 123 return m_pageSize; 124 } 127 125 128 static size_t& pageSize(); 126 void add(VSeg& vseg); //add a VSeg 127 void addIdent(VSeg& vseg); 129 128 130 void add( VSeg& vseg ); //add a VSeg131 void addIdent( VSeg& vseg );132 129 133 void setNextLma( paddr_t nextLma); 134 void incNextLma( size_t inc); 130 void print(std::ostream &o) const; 135 131 136 void print( std::ostream &o ) const; 137 138 friend std::ostream &operator<<( std::ostream &o, const PSeg &s ) 132 friend std::ostream &operator<<(std::ostream &o, const PSeg &s ) 139 133 { 140 134 s.print(o); 141 135 return o; 142 136 } 143 PSeg & operator=( const PSeg &ref);137 PSeg & operator=(const PSeg &ref); 144 138 145 139 PSeg(); 146 PSeg( const PSeg &ref ); 147 PSeg( const std::string &name); 148 PSeg( const paddr_t lma); 149 PSeg( const std::string &name, 150 paddr_t lma, 151 paddr_t length, 152 size_t type); 140 PSeg(const PSeg &ref ); 141 PSeg(const std::string &name); 142 PSeg(const std::string &name, 143 paddr_t lma, 144 paddr_t length, 145 size_t type); 153 146 ~PSeg(); 154 147 };
Note: See TracChangeset
for help on using the changeset viewer.