Changeset 81 for trunk/IPs/systemC/shared
- Timestamp:
- Apr 15, 2008, 8:40:01 PM (17 years ago)
- Location:
- trunk/IPs/systemC/shared
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/shared/loadexec.c
-
Property
svn:keywords
set to
Id
-
Property
svn:keywords
set to
-
trunk/IPs/systemC/shared/macro.h
-
Property
svn:keywords
set to
Id
-
Property
svn:keywords
set to
-
trunk/IPs/systemC/shared/mapping_memory.h
-
Property
svn:keywords
set to
Id
-
Property
svn:keywords
set to
-
trunk/IPs/systemC/shared/soclib_caches_interfaces.h
-
Property
svn:keywords
set to
Id
-
Property
svn:keywords
set to
-
trunk/IPs/systemC/shared/soclib_generic_fifo.h
-
Property
svn:keywords
set to
Id
-
Property
svn:keywords
set to
-
trunk/IPs/systemC/shared/soclib_segment_table.h
-
Property
svn:keywords
set to
Id
r2 r81 72 72 73 73 #include <list> 74 75 using namespace std;74 #include <iostream> 75 // using namespace std; 76 76 77 77 ////////////////////////////////////////////// … … 174 174 ////////////////////////////////////////////////////////// 175 175 176 using namespace std;176 // using namespace std; 177 177 178 178 struct SOCLIB_SEGMENT_TABLE { … … 206 206 if ((number<0)||(number>16)) 207 207 { 208 cerr << "ERROR in the Segment Table :" <<endl ;209 cerr << "MSB number must be in the [0..16] range !" <<endl ;208 std::cerr << "ERROR in the Segment Table :" << std::endl ; 209 std::cerr << "MSB number must be in the [0..16] range !" << std::endl ; 210 210 //sc_stop(); 211 211 } … … 218 218 if ((number<0)||(number>16)) 219 219 { 220 cerr << "ERROR in the Segment Table :" <<endl ;221 cerr << "LSB number must be in the [0..16] range !" <<endl ;220 std::cerr << "ERROR in the Segment Table :" << std::endl ; 221 std::cerr << "LSB number must be in the [0..16] range !" << std::endl ; 222 222 //sc_stop(); 223 223 } … … 304 304 void print() 305 305 { 306 cout << "\n SEGMENT_TABLE\n\n" ;306 std::cout << "\n SEGMENT_TABLE\n\n" ; 307 307 std::list<SEGMENT_TABLE_ENTRY>::iterator iter; 308 308 for (iter = segList.begin() ; iter != segList.end() ; ++iter) … … 310 310 (*iter).print(); 311 311 } 312 cout << "\n" ;312 std::cout << "\n" ; 313 313 } 314 314 315 315 void printMSBRoutingTable() 316 316 { 317 cout << "\n MSB ROUTING_TABLE\n\n" ;318 int size = 1 << MSBNumber+LSBNumber;319 unsigned int *tab = new unsigned int[size];320 initRoutingTable(tab);321 for(int index = 0 ; index < size ; index++) {322 323 324 325 }326 cout << "\n" ;327 }; 328 329 void printLSBRoutingTable(int glt)330 331 332 333 334 335 336 337 338 339 340 341 317 std::cout << "\n MSB ROUTING_TABLE\n\n" ; 318 int size = 1 << MSBNumber+LSBNumber; 319 unsigned int *tab = new unsigned int[size]; 320 initRoutingTable(tab); 321 for(int index = 0 ; index < size ; index++) { 322 if (tab[index]!=0xFFFFFFFF){ 323 printf("TAB[%x] = %d\n", index, tab[index]); 324 } 325 } 326 std::cout << "\n" ; 327 }; 328 329 void printLSBRoutingTable(int glt) 330 { 331 printf( "\n LSB_ROUTING_TABLE OF GLOBAL TARGET :%d \n\n", glt ); 332 int size = 1 << MSBNumber+LSBNumber; 333 unsigned int *tab = new unsigned int[size]; 334 initLocalRoutingTable(tab,glt); 335 for(int index = 0 ; index < size ; index++) { 336 if (tab[index]!=0xFFFFFFFF){ 337 printf("TAB[%d] = %d\n", index, tab[index]); 338 } 339 } 340 std::cout << "\n" ; 341 }; 342 342 343 343 … … 345 345 void initRoutingTable(unsigned int* tab) { 346 346 if (MSBNumberCalled==false) { 347 cerr << "ERROR in initMSBRoutingTable:" <<endl ;348 cerr << "MSB number has not been defined !" <<endl ;347 std::cerr << "ERROR in initMSBRoutingTable:" << std::endl ; 348 std::cerr << "MSB number has not been defined !" << std::endl ; 349 349 //sc_stop(); 350 350 } 351 351 if (LSBNumberCalled==false) { 352 cout << "WARNING in initMSBRoutingTable:" <<endl ;353 cout << "LSB number has not been defined !" <<endl ;354 cout << "it is set to 0" <<endl ;355 356 352 std::cout << "WARNING in initMSBRoutingTable:" << std::endl ; 353 std::cout << "LSB number has not been defined !" << std::endl ; 354 std::cout << "it is set to 0" << std::endl ; 355 LSBNumberCalled=true; 356 LSBNumber=0; 357 357 } 358 358 359 359 360 360 if (defaultTargetCalled==false) { 361 cerr << "ERROR in initMSBRoutingTable:" <<endl ;362 cerr << "Default Target has not been defined!" <<endl ;361 std::cerr << "ERROR in initMSBRoutingTable:" << std::endl ; 362 std::cerr << "Default Target has not been defined!" << std::endl ; 363 363 //sc_stop(); 364 364 } … … 386 386 if(tab[page] != 0xFFFFFFFF) { 387 387 // printf("\n page n° %x can not be added to cluster %x because it is already allocated to %x\n",page,globalTarget,tab[page]); 388 cerr << "Error in initMSBRoutingTable:" <<endl ;389 cerr << "Segment " << name << " allocated to VCI target " << globalTarget <<endl;390 cerr << "overlap another segment... or is in the same page" <<endl;391 cerr << "as another segment allocated to another VCI target" <<endl;388 std::cerr << "Error in initMSBRoutingTable:" << std::endl ; 389 std::cerr << "Segment " << name << " allocated to VCI target " << globalTarget << std::endl; 390 std::cerr << "overlap another segment... or is in the same page" << std::endl; 391 std::cerr << "as another segment allocated to another VCI target" << std::endl; 392 392 //sc_stop(); 393 393 } else { … … 422 422 void initGlobalRoutingTable(unsigned int* tab) { 423 423 if (MSBNumberCalled==false) { 424 cerr << "ERROR in initMSBRoutingTable:" <<endl ;425 cerr << "MSB number has not been defined !" <<endl ;424 std::cerr << "ERROR in initMSBRoutingTable:" << std::endl ; 425 std::cerr << "MSB number has not been defined !" << std::endl ; 426 426 //sc_stop(); 427 427 } 428 428 429 429 if (defaultTargetCalled==false) { 430 cerr << "ERROR in initMSBRoutingTable:" <<endl ;431 cerr << "Default Target has not been defined!" <<endl ;430 std::cerr << "ERROR in initMSBRoutingTable:" << std::endl ; 431 std::cerr << "Default Target has not been defined!" << std::endl ; 432 432 //sc_stop(); 433 433 } … … 455 455 if(tab[page] != 0xFFFFFFFF) { 456 456 // printf("\n page n° %x can not be added to cluster %x because it is already allocated to %x\n",page,globalTarget,tab[page]); 457 cerr << "Error in initGlobalRoutingTable:" <<endl ;458 cerr << "Segment " << name << " allocated to VCI target " << globalTarget <<endl;459 cerr << "overlap another segment... or is in the same page" <<endl;460 cerr << "as another segment allocated to another VCI target" <<endl;457 std::cerr << "Error in initGlobalRoutingTable:" << std::endl ; 458 std::cerr << "Segment " << name << " allocated to VCI target " << globalTarget << std::endl; 459 std::cerr << "overlap another segment... or is in the same page" << std::endl; 460 std::cerr << "as another segment allocated to another VCI target" << std::endl; 461 461 //sc_stop(); 462 462 } else { … … 493 493 void initLocalRoutingTable(unsigned int* tab, unsigned int cluster) { 494 494 if (MSBNumberCalled==false) { 495 cerr << "ERROR in initLocalRoutingTable:" <<endl ;496 cerr << "MSB number has not been defined !" <<endl ;495 std::cerr << "ERROR in initLocalRoutingTable:" << std::endl ; 496 std::cerr << "MSB number has not been defined !" << std::endl ; 497 497 //sc_stop(); 498 498 } 499 499 500 500 if (defaultTargetCalled==false) { 501 cerr << "ERROR in initLocalRoutingTable:" <<endl ;502 cerr << "Default Target has not been defined!" <<endl ;501 std::cerr << "ERROR in initLocalRoutingTable:" << std::endl ; 502 std::cerr << "Default Target has not been defined!" << std::endl ; 503 503 //sc_stop(); 504 504 } … … 526 526 if(tab[page] != 0xFF) { 527 527 // printf("\n page n° %x ne peut etre adressée à target n°%x car elle est allouée à %x \n",page,localTarget,tab[page]); 528 cerr << "Error in initLocalRoutingTable:" <<endl ;529 cerr << "Segment " << name << " allocated to VCI target " << localTarget <<endl;530 cerr << "overlap another segment... or is in the same page" <<endl;531 cerr << "as another segment allocated to another VCI target" <<endl;528 std::cerr << "Error in initLocalRoutingTable:" << std::endl ; 529 std::cerr << "Segment " << name << " allocated to VCI target " << localTarget << std::endl; 530 std::cerr << "overlap another segment... or is in the same page" << std::endl; 531 std::cerr << "as another segment allocated to another VCI target" << std::endl; 532 532 //sc_stop(); 533 533 } else { … … 599 599 if ((MSBNumberCalled==false)||(LSBNumberCalled==false)) 600 600 { 601 cerr << "ERROR in initUncachedTable:" <<endl ;602 cerr << "MSB or LSB number has not been defined !" <<endl ;601 std::cerr << "ERROR in initUncachedTable:" << std::endl ; 602 std::cerr << "MSB or LSB number has not been defined !" << std::endl ; 603 603 //sc_stop(); 604 604 } -
Property
svn:keywords
set to
Note: See TracChangeset
for help on using the changeset viewer.