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)

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/SelfTest/src
Files:
2 edited

Legend:

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

    r62 r71  
    1212void usage (int argc, char * argv[])
    1313{
    14   cerr << "<Usage> " << argv[0] << " name_instance list_params" << endl
    15        << "list_params is :" << endl
    16 //     << " - size_data     (unsigned int)" << endl
    17 //     << " - nb_port       (unsigned int)" << endl;
    18        << "" << endl;
    19 
    20   for (int i=0; i<argc; i++)
    21     cerr << argv[i] << " ";
    22   cerr << endl;
     14  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
     15  err (_("list_params is :\n"));
    2316
    2417  exit (1);
     
    4740        );
    4841     
    49       cout << param->print(1);
     42      msg(_("%s"),param->print(1).c_str()):
    5043     
    5144      test (name,param);
     
    5346  catch (morpheo::ErrorMorpheo & error)
    5447    {
    55       cout << "<" << name << "> : " <<  error.what ();
     48      msg (_("<%s> : %s.\n"),name, error.what ());
    5649      exit (EXIT_FAILURE);
    5750    }
    5851  catch (...)
    5952    {
    60       cerr << "<" << name << "> : This test must generate a error" << endl;
     53     
     54      err (_("<%s> : This test must generate a error.\n"),name);
    6155      exit (EXIT_FAILURE);
    6256    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/SelfTest/src/test.cpp

    r67 r71  
    1313#define CYCLE_MAX     (128*NB_ITERATION)
    1414
    15 #define LABEL(str)                                                                       \
    16 {                                                                                        \
    17   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
     15#define LABEL(str)                                                      \
     16  {                                                                     \
     17  msg (_("{%d} %s\n"),static_cast<uint32_t>(sc_simulation_time()),str); \
    1818} while(0)
    1919
    20 static uint32_t cycle = 0;
    21 
    22 #define SC_START(cycle_offset)                                          \
    23 do                                                                      \
    24 {                                                                       \
    25 /*cout << "SC_START (begin)" << endl;*/                                 \
    26                                                                         \
    27   uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
    28   if (cycle_current != cycle)                                           \
    29     {                                                                   \
    30       cycle = cycle_current;                                            \
    31       cout << "##########[ cycle "<< cycle << " ]" << endl;             \
    32     }                                                                   \
    33                                                                         \
    34   if (cycle_current > CYCLE_MAX)                                        \
    35     {                                                                   \
    36       TEST_KO("Maximal cycles Reached");                                \
    37     }                                                                   \
    38   sc_start(cycle_offset);                                               \
    39 /*cout << "SC_START (end  )" << endl;*/                                 \
    40 } while(0)
     20#define SC_START(cycle_offset)                                                       \
     21  do                                                                                 \
     22    {                                                                                \
     23      /*cout << "SC_START (begin)" << endl;*/                                        \
     24                                                                                     \
     25      uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
     26      if (cycle_offset != 0)                                                         \
     27        {                                                                            \
     28          cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
     29        }                                                                            \
     30                                                                                     \
     31      if (cycle_current > CYCLE_MAX)                                                 \
     32        {                                                                            \
     33          TEST_KO("Maximal cycles Reached");                                         \
     34        }                                                                            \
     35                                                                                     \
     36      sc_start(cycle_offset);                                                        \
     37                                                                                     \
     38      /*cout << "SC_START (end  )" << endl;*/                                        \
     39    } while(0)
    4140
    4241void test (string name,
    4342           morpheo::behavioural::@NAMESPACE_USE::Parameters * _param)
    4443{
    45   cout << "<" << name << "> : Simulation SystemC" << endl;
     44  msg(_("<%s> : Simulation SystemC.\n"),name.c_str());
    4645
    4746#ifdef STATISTICS
     
    6867   ********************************************************/
    6968 
    70   cout << "<" << name << "> Instanciation of _@COMPONENT" << endl;
    71  
     69  msg(_("<%s> : Instanciation of _@COMPONENT.\n"),name.c_str());
     70
    7271  (*(_@COMPONENT->in_CLOCK))        (*(in_CLOCK));
    7372  (*(_@COMPONENT->in_NRESET))       (*(in_NRESET));
    7473
    7574
    76   cout << "<" << name << "> Start Simulation ............" << endl;
     75  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     76   
    7777  Time * _time = new Time();
    7878
     
    111111  TEST_OK ("End of Simulation");
    112112  delete _time;
    113   cout << "<" << name << "> ............ Stop Simulation" << endl;
     113
     114  msg(_("<%s> : ............ Stop Simulation\n"),name.c_str());
    114115
    115116  delete in_CLOCK;
Note: See TracChangeset for help on using the changeset viewer.