Changeset 210 for soft/giet_vm/memo/src
- Timestamp:
- Aug 21, 2012, 9:30:46 AM (12 years ago)
- Location:
- soft/giet_vm/memo/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/memo/src/memo.cpp
r195 r210 507 507 vSO->m_ident = vseg->ident; 508 508 509 //set the lma 510 if ( vseg->ident != 0 ) // identity mapping required 511 ps->addIdent( *vSO ); 512 else 513 ps->add( *vSO ); 514 509 //should we check that we have the same type for the pseg and vobj? 510 if(ps->type() != VOBJ_TYPE_PERI)//take into acount only vseg who are not of the peri type 511 { 512 //set the lma 513 if ( vseg->ident != 0 ) // identity mapping required 514 ps->addIdent( *vSO ); 515 else 516 ps->add( *vSO ); 517 } 515 518 if(!sect) 516 519 return; … … 559 562 //build pseg 560 563 std::string name(pseg[pseg_id].name); 561 PSeg *ps = new PSeg(name, pseg[pseg_id].base, pseg[pseg_id].length );564 PSeg *ps = new PSeg(name, pseg[pseg_id].base, pseg[pseg_id].length, pseg[pseg_id].type); 562 565 563 566 #ifdef DISTRIBUTED_SCHEDULERS … … 567 570 found = 1; 568 571 } 572 if(!found){/* we could imagine a cluster without proc, let the giet choose*/ } 569 573 #endif 570 574 m_psegh.m_pSegs.push_back(*ps); -
soft/giet_vm/memo/src/pseg.cpp
r173 r210 63 63 } 64 64 65 uintptr_t VSeg::length() const65 size_t VSeg::length() const 66 66 { 67 67 return m_length; 68 } 69 70 size_t VSeg::type() const 71 { 72 return m_type; 68 73 } 69 74 … … 152 157 } 153 158 154 uintptr_t PSeg::length() const159 size_t PSeg::length() const 155 160 { 156 161 return m_length; 157 162 } 158 163 164 size_t PSeg::type() const 165 { 166 return m_type; 167 } 168 159 169 uintptr_t PSeg::nextLma() const 160 170 { … … 169 179 void PSeg::check() const 170 180 { 181 182 if(this->m_type == PSEG_TYPE_PERI) 183 return; 184 185 std::vector<VSeg>::const_iterator it; 171 186 size_t size = m_vsegs.size(); 172 187 size_t used[size][2];//lma, lma+length 173 188 size_t i,j,error=0; 174 189 175 std::vector<VSeg>::const_iterator it;176 190 for(it = m_vsegs.begin(), i= 0; it < m_vsegs.end(); it++, i++) 177 191 { … … 179 193 for(j=0; j< i; j++) 180 194 { 181 if( 182 (used[j][0] == (*it).lma() /*and (*it).length()?*/) ) //not the same lma , 195 if( (used[j][0] == (*it).lma() /*and (*it).length()?*/) ) //not the same lma , 183 196 { 184 197 error = 1; 185 198 std::cout << "ok \n"; 186 199 } 187 if( 188 (used[j][1] == it_limit /*and (*it).legth()?*/)) // and not the same limit 200 if( (used[j][1] == it_limit /*and (*it).legth()?*/)) // and not the same limit 189 201 { 190 202 error = 2; 191 203 } 192 if( 193 ((used[j][0] < (*it).lma()) and ((*it).lma() < used[j][1] )) ) //lma within the used slice 204 if( ((used[j][0] < (*it).lma()) and ((*it).lma() < used[j][1] )) ) //lma within the used slice 194 205 { 195 206 error = 3; 196 207 } 197 if( 198 ((used[j][0] < it_limit) and (it_limit < used[j][1] )) )//limit not within the used slice 208 if( ((used[j][0] < it_limit) and (it_limit < used[j][1] )) )//limit not within the used slice 199 209 { 200 210 error = 4; 211 std::cout << "base: " << std::hex << (*it).lma() << std::endl; 201 212 std::cout << "limit: " << std::hex << it_limit << std::endl; 202 213 std::cout << "used[j][0]: " << std::hex << used[j][0] << std::endl; … … 362 373 363 374 PSeg::PSeg( const std::string &name, 364 uintptr_t lma, 365 size_t length) 375 uintptr_t lma, 376 size_t length, 377 size_t type) 366 378 { 367 379 m_name = name; 368 380 m_length = length; 381 m_type = type; 369 382 370 383 setLma(lma);
Note: See TracChangeset
for help on using the changeset viewer.