Ignore:
Timestamp:
Mar 27, 2008, 11:04:49 AM (16 years ago)
Author:
rosiere
Message:

Add :

  • Execute_loop (must be test systemC)
  • Prediction
    • Direction : predifined scheme
    • Branch Target Buffer
  • iFetch_unit
    • ifetch_queue
    • pc management
  • Decod_unit
    • coming soon : support for custom operation
  • Rename_unit
    • RAT
    • Free_list
    • Dependence RAW check
    • Load store unit pointer
  • New Environnement (hierarchy_memory will remove in a next version)


Modif :

  • Manage Custom Operation
  • All component in execute_loop to use the new statistics management

Not Finish :

  • Return Address Stack
  • Environnement
Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/main.cpp

    r15 r78  
    1414  cerr << "<Usage> " << exec << " name_instance list_params" << endl
    1515       << "list_params is :" << endl
    16        << " - nb_entity  (unsigned int)" << endl
    17        << " - nb_access  (unsigned int)" << endl
    18        << " - nb_update  (unsigned int)" << endl
    19        << " - size_table (unsigned int)" << endl;
     16       << " - nb_entity     (unsigned int)" << endl
     17       << " - nb_access     (unsigned int)" << endl
     18//        << " - nb_update     (unsigned int)" << endl
     19       << " - size_table    (unsigned int)" << endl
     20       << " - table_global  (bool        )" << endl;
    2021  exit (1);
    2122}
     
    3031    usage (argv[0]);
    3132
    32   const string   name       = argv[1];
    33   const uint32_t nb_entity  = atoi(argv[2]);
    34   const uint32_t nb_access  = atoi(argv[3]);
    35   const uint32_t nb_update  = atoi(argv[4]);
    36   const uint32_t size_table = atoi(argv[5]);
    37  
    38   morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters param (nb_entity ,
    39                                                                        nb_access ,
    40                                                                        nb_update ,
    41                                                                        size_table);
     33  const string   name         = argv[1];
     34  const uint32_t nb_entity    = atoi(argv[2]);
     35  const uint32_t nb_access    = atoi(argv[3]);
     36//   const uint32_t nb_update    = atoi(argv[4]);
     37  const uint32_t size_table   = atoi(argv[4]);
     38  const bool     table_global = atoi(argv[5]); 
     39  morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters param
     40    (nb_entity ,
     41     nb_access ,
     42//      nb_update ,
     43     size_table,
     44     table_global);
    4245
    4346  test (name,param);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/test.cpp

    r75 r78  
    1515  cout << "<" << name << "> : Simulation SystemC" << endl;
    1616
    17   if (param._nb_update < 1)
    18     {
    19       cerr << "<" << name << "> : To test, need a less one update's port" << endl;
    20       exit (EXIT_FAILURE);
    21     }
    22  
    2317  try
    2418    {
     
    4539                                                                  param_stat,
    4640#endif
    47                                                                   param);
     41                                                                  &param);
    4842 
    4943#ifdef SYSTEMC
     
    5751  sc_signal<Tcontrol_t>                    ACCESS_ACK     [param._nb_access];
    5852  sc_signal<Taddress_t>                    ACCESS_ADDRESS [param._nb_access];
     53  sc_signal<Tcontrol_t>                    ACCESS_HIT     [param._nb_access];
    5954  sc_signal<Tentity_t >                    ACCESS_ENTITY  [param._nb_access];
    60  
    61   sc_signal<Tcontrol_t>                    UPDATE_VAL     [param._nb_update];
    62   sc_signal<Tcontrol_t>                    UPDATE_ACK     [param._nb_update];
    63   sc_signal<Taddress_t>                    UPDATE_ADDRESS [param._nb_update];
    64   sc_signal<Tentity_t >                    UPDATE_ENTITY  [param._nb_update];
     55  sc_signal<Tentity_t >                    ACCESS_VICTIM  [param._nb_access];
    6556 
    6657  /********************************************************
     
    7768        (*(_Victim_Pseudo_LRU-> in_ACCESS_VAL     [i])) (ACCESS_VAL     [i]);
    7869        (*(_Victim_Pseudo_LRU->out_ACCESS_ACK     [i])) (ACCESS_ACK     [i]);
    79         if (param._size_table>1)
     70        if (param._size_address>1)
    8071        (*(_Victim_Pseudo_LRU-> in_ACCESS_ADDRESS [i])) (ACCESS_ADDRESS [i]);
    81         (*(_Victim_Pseudo_LRU->out_ACCESS_ENTITY  [i])) (ACCESS_ENTITY  [i]);
     72        (*(_Victim_Pseudo_LRU-> in_ACCESS_HIT     [i])) (ACCESS_HIT     [i]);
     73        (*(_Victim_Pseudo_LRU-> in_ACCESS_ENTITY  [i])) (ACCESS_ENTITY  [i]);
     74        (*(_Victim_Pseudo_LRU->out_ACCESS_VICTIM  [i])) (ACCESS_VICTIM  [i]);
    8275      }
    8376
    84     for (uint32_t i=0; i<param._nb_update; i++)
    85       {
    86         (*(_Victim_Pseudo_LRU-> in_UPDATE_VAL     [i])) (UPDATE_VAL     [i]);
    87         (*(_Victim_Pseudo_LRU->out_UPDATE_ACK     [i])) (UPDATE_ACK     [i]);
    88         if (param._size_table>1)
    89         (*(_Victim_Pseudo_LRU-> in_UPDATE_ADDRESS [i])) (UPDATE_ADDRESS [i]);
    90         (*(_Victim_Pseudo_LRU-> in_UPDATE_ENTITY  [i])) (UPDATE_ENTITY  [i]);
    91       }
    9277  /********************************************************
    9378   * Simulation - Begin
     
    10590      ACCESS_VAL[i].write(0);
    10691    }
    107   for (uint32_t i=0; i<param._nb_update; i++)
    108     {
    109       UPDATE_VAL[i].write(0);
    110     }
    11192
    11293  sc_start(5);
    11394  cout << "-----[ Test Update ]------------------------------" << endl;
    114   for (uint32_t i=0; i<param._nb_update; i++)
    115     {
    116       UPDATE_VAL[i].write(1);
    117     }
    118  
    119   for (uint32_t j=0; j<param._size_table; j+=param._nb_update)
     95  for (uint32_t i=0; i<param._nb_access; i++)
     96    {
     97      ACCESS_VAL[i].write(1);
     98      ACCESS_HIT[i].write(1);
     99    }
     100 
     101  for (uint32_t j=0; j<param._size_table; j+=param._nb_access)
    120102    for (uint32_t k=0; k<param._nb_entity; k++)
    121103      {
    122104        cout << "time : " << static_cast<uint32_t>(sc_simulation_time()) << endl;
    123         for (uint32_t i=0; i<param._nb_update; i++)
     105        for (uint32_t i=0; i<param._nb_access; i++)
    124106          {
    125107           
     
    131113              addr = 0;
    132114            Tentity_t  entity  = (k+1)%param._nb_entity;
    133             UPDATE_VAL     [i].write(val );
    134             if (param._size_table>1)
    135               UPDATE_ADDRESS [i].write(addr);
    136             UPDATE_ENTITY  [i].write(entity);
     115            ACCESS_VAL     [i].write(val );
     116            if (param._size_address>1)
     117              ACCESS_ADDRESS [i].write(addr);
     118            ACCESS_ENTITY  [i].write(entity);
    137119           
    138120            sc_start(0);
    139             cout << "\t[" << i << "] " << val << " - " << UPDATE_ACK[i].read() << " addr : " << addr << " -> " << entity << endl;
     121            cout << "\t[" << i << "] " << val << " - " << ACCESS_ACK[i].read() << " addr : " << addr << " -> " << entity << endl;
    140122          }
    141123        sc_start(1);
     
    143125                   
    144126
    145   for (uint32_t i=0; i<param._nb_update; i++)
    146     {
    147       UPDATE_VAL[i].write(0);
     127  for (uint32_t i=0; i<param._nb_access; i++)
     128    {
     129      ACCESS_VAL[i].write(0);
    148130    }
    149131
     
    151133
    152134  cout << "-----[ Test Access ]------------------------------" << endl;
     135
     136  for (uint32_t i=0; i<param._nb_access; i++)
     137    {
     138      ACCESS_HIT[i].write(0);
     139    }
    153140 
    154141 
     
    171158                addr = 0;
    172159              ACCESS_VAL     [i].write(val );
    173               if (param._size_table>1)
     160              if (param._size_address>1)
    174161                ACCESS_ADDRESS [i].write(addr);
    175162             
    176163              sc_start(0);
    177164             
    178               Tentity_t  entity  = ACCESS_ENTITY [i].read();
     165              Tentity_t  entity  = ACCESS_VICTIM [i].read();
    179166             
    180167              cout << "\t[" << i << "] " << val << " - " << ACCESS_ACK[i].read() << " addr : " << addr << " -> " << entity << endl;
Note: See TracChangeset for help on using the changeset viewer.