Ignore:
Timestamp:
Apr 15, 2008, 8:40:01 PM (16 years ago)
Author:
rosiere
Message:
  • Finish Environment (and test)
  • Continue predictor_unit
  • Add external tools
  • svn keyword "Id" set
Location:
trunk/IPs/systemC/shared
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/shared/loadexec.c

    • Property svn:keywords set to Id
  • trunk/IPs/systemC/shared/macro.h

    • Property svn:keywords set to Id
  • trunk/IPs/systemC/shared/mapping_memory.h

    • Property svn:keywords set to Id
  • trunk/IPs/systemC/shared/soclib_caches_interfaces.h

    • Property svn:keywords set to Id
  • trunk/IPs/systemC/shared/soclib_generic_fifo.h

    • Property svn:keywords set to Id
  • trunk/IPs/systemC/shared/soclib_segment_table.h

    • Property svn:keywords set to Id
    r2 r81  
    7272
    7373#include <list>
    74 
    75 using namespace std;
     74#include <iostream>
     75// using namespace std;
    7676
    7777//////////////////////////////////////////////
     
    174174//////////////////////////////////////////////////////////
    175175
    176 using namespace std;
     176// using namespace std;
    177177
    178178struct SOCLIB_SEGMENT_TABLE {
     
    206206        if ((number<0)||(number>16))
    207207                {
    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 ;
    210210                //sc_stop();
    211211                }
     
    218218        if ((number<0)||(number>16))
    219219                {
    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 ;
    222222                //sc_stop();
    223223                }
     
    304304void print()
    305305        {
    306         cout << "\n                 SEGMENT_TABLE\n\n" ;
     306          std::cout << "\n                 SEGMENT_TABLE\n\n" ;
    307307        std::list<SEGMENT_TABLE_ENTRY>::iterator iter;
    308308        for (iter = segList.begin() ; iter != segList.end() ; ++iter)
     
    310310                (*iter).print();
    311311                }
    312         cout << "\n" ;
     312        std::cout << "\n" ;
    313313        }
    314314
    315315void printMSBRoutingTable()
    316316        {
    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                 if (tab[index]!=0xFFFFFFFF){
    323                         printf("TAB[%x] = %d\n", index, tab[index]);
    324                 }
    325         }
    326         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         cout << "\n" ;
    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  };
    342342       
    343343
     
    345345void initRoutingTable(unsigned int* tab) {
    346346        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 ;
    349349                //sc_stop();
    350350        }
    351351        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                 LSBNumberCalled=true;
    356                 LSBNumber=0;
     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;
    357357        }
    358358       
    359359       
    360360        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 ;
    363363                //sc_stop();
    364364        }
     
    386386                        if(tab[page] != 0xFFFFFFFF) {
    387387                //              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;
    392392                                //sc_stop();
    393393                        } else {
     
    422422void initGlobalRoutingTable(unsigned int* tab) {
    423423        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 ;
    426426                //sc_stop();
    427427        }
    428428       
    429429        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 ;
    432432                //sc_stop();
    433433        }
     
    455455                        if(tab[page] != 0xFFFFFFFF) {
    456456                //              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;
    461461                                //sc_stop();
    462462                        } else {
     
    493493void initLocalRoutingTable(unsigned int* tab, unsigned int cluster) {
    494494        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 ;
    497497                //sc_stop();
    498498        }
    499499               
    500500        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 ;
    503503                //sc_stop();
    504504        }
     
    526526                          if(tab[page] != 0xFF) {
    527527                          // 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;
    532532                          //sc_stop();
    533533                          } else {
     
    599599        if ((MSBNumberCalled==false)||(LSBNumberCalled==false))
    600600                {
    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 ;
    603603                //sc_stop();
    604604                }
Note: See TracChangeset for help on using the changeset viewer.