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/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.