Ignore:
Timestamp:
Jan 19, 2008, 12:09:01 PM (16 years ago)
Author:
rosiere
Message:

Modification of Statisctics
Add a new systemC component : Load_Store_Queue (tested with one benchmark and one configuration). Store don't supported the Data Buss Error (Load is supported)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/main.cpp

    r59 r71  
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/test.h"
    99
    10 #define NB_PARAMS 11
     10#define number_of_test 2
     11
     12#define NB_PARAMS 13
    1113
    1214void usage (int argc, char * argv[])
     
    2022       << " - speculative_load        (uint32_t)" << endl
    2123       << " - nb_context              (uint32_t)" << endl
     24       << " - nb_front_end            (uint32_t)" << endl
     25       << " - nb_ooo_engine           (uint32_t)" << endl
    2226       << " - nb_packet               (uint32_t)" << endl
    2327       << " - size_general_data       (uint32_t)" << endl
     
    4044#endif
    4145{
    42   if (argc != 2+NB_PARAMS)
    43     usage (argc, argv);
     46  switch (number_of_test)
     47    {
     48    case 1 :
     49      {
     50       
     51        if (argc != 2+NB_PARAMS)
     52          usage (argc, argv);
     53       
     54        uint32_t x=1;
     55       
     56        const string              name                     = argv[x++];
     57        const uint32_t            _size_store_queue        = atoi(argv[x++]);
     58        const uint32_t            _size_load_queue         = atoi(argv[x++]);
     59        const uint32_t            _size_speculative_access_queue = atoi(argv[x++]);
     60        const uint32_t            _nb_port_check           = atoi(argv[x++]);
     61        const Tspeculative_load_t _speculative_load        = fromString<Tspeculative_load_t>(argv[x++]);
     62        const uint32_t            _nb_context              = atoi(argv[x++]);
     63        const uint32_t            _nb_front_end            = atoi(argv[x++]);
     64        const uint32_t            _nb_ooo_engine           = atoi(argv[x++]);
     65        const uint32_t            _nb_packet               = atoi(argv[x++]);
     66        const uint32_t            _size_general_data       = atoi(argv[x++]);
     67        const uint32_t            _nb_general_register     = atoi(argv[x++]);
     68        const uint32_t            _nb_operation            = atoi(argv[x++]);
     69        const uint32_t            _nb_type                 = atoi(argv[x++]);
     70       
     71        try
     72          {
     73            morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters
     74              (
     75               _size_store_queue       ,
     76               _size_load_queue        ,
     77               _size_speculative_access_queue,
     78               _nb_port_check          ,
     79               _speculative_load       ,
     80               _nb_context             ,
     81               _nb_front_end           ,
     82               _nb_ooo_engine          ,
     83               _nb_packet              ,
     84               _size_general_data      ,
     85               _nb_general_register    ,
     86               _nb_operation           ,
     87               _nb_type               
     88               );
     89           
     90            cout << param->print(1);
     91           
     92            test1 (name,param);
     93           
     94          }
     95        catch (morpheo::ErrorMorpheo & error)
     96          {
     97            cout << "<" << name << "> : " <<  error.what ();
     98            exit (EXIT_FAILURE);
     99          }
     100        catch (...)
     101          {
     102            cerr << "<" << name << "> : This test must generate a error" << endl;
     103            exit (EXIT_FAILURE);
     104          }
     105       
     106        break;
     107      }
     108    case 2 :
     109      {
     110        try
     111          {
     112            test2 ();
     113          }
     114        catch (morpheo::ErrorMorpheo & error)
     115          {
     116            cout << error.what ();
     117            exit (EXIT_FAILURE);
     118          }
     119        catch (...)
     120          {
     121            cerr << "This test must generate a error" << endl;
     122            exit (EXIT_FAILURE);
     123          }
     124       
     125        break;
     126      }
     127    default :
     128      {
     129        std::cerr << "Invalid number of test" << std::endl;
     130        exit (EXIT_FAILURE);
    44131
    45   const string              name                     = argv[1];
    46   const uint32_t            _size_store_queue        = atoi(argv[ 2]);
    47   const uint32_t            _size_load_queue         = atoi(argv[ 3]);
    48   const uint32_t            _size_speculative_access_queue = atoi(argv[ 4]);
    49   const uint32_t            _nb_port_check           = atoi(argv[ 5]);
    50   const Tspeculative_load_t _speculative_load        = fromString<Tspeculative_load_t>(argv[ 6]);
    51   const uint32_t            _nb_context              = atoi(argv[ 7]);
    52   const uint32_t            _nb_packet               = atoi(argv[ 8]);
    53   const uint32_t            _size_general_data       = atoi(argv[ 9]);
    54   const uint32_t            _nb_general_register     = atoi(argv[10]);
    55   const uint32_t            _nb_operation            = atoi(argv[11]);
    56   const uint32_t            _nb_type                 = atoi(argv[12]);
    57 
    58   try
    59     {
    60       morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters
    61         (
    62          _size_store_queue       ,
    63          _size_load_queue        ,
    64          _size_speculative_access_queue,
    65          _nb_port_check          ,
    66          _speculative_load       ,
    67          _nb_context             ,
    68          _nb_packet              ,
    69          _size_general_data      ,
    70          _nb_general_register    ,
    71          _nb_operation           ,
    72          _nb_type               
    73         );
    74      
    75       cout << param->print(1);
    76      
    77       test (name,param);
     132        break;
     133      }
    78134    }
    79   catch (morpheo::ErrorMorpheo & error)
    80     {
    81       cout << "<" << name << "> : " <<  error.what ();
    82       exit (EXIT_FAILURE);
    83     }
    84   catch (...)
    85     {
    86       cerr << "<" << name << "> : This test must generate a error" << endl;
    87       exit (EXIT_FAILURE);
    88     }
    89 
     135 
    90136  return (EXIT_SUCCESS);
    91137}
Note: See TracChangeset for help on using the changeset viewer.