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/Common/include/Test.h

    r53 r71  
    55#include <sstream>
    66#include <stdint.h>
     7#include "Common/include/Message.h"
    78#include "Common/include/ErrorMorpheo.h"
    8 using namespace std;
     9#include "Common/include/ToString.h"
    910
    1011//-----[ Routine de test ]---------------------------------------
     
    1213static uint32_t num_test;
    1314
    14 void test_ko_error (void)
     15inline void test_ko_error (void)
    1516{
    16   string msg = "Test ko : error in test \""+toString(num_test)+"\"";
    17   throw (ErrorMorpheo (msg));
     17  string msg = "Test ko : error in test \""+morpheo::toString(num_test)+"\"";
     18  throw (morpheo::ErrorMorpheo (msg));
    1819}
    1920 
    2021template <class T>
    21 void test_ko (char * file, uint32_t line, T exp1, T exp2)
     22inline void test_ko (char * file, uint32_t line, T exp1, T exp2)
    2223{
    2324  cerr << "[" << num_test << "] : Test KO"
     
    2728       << "   - Line : " << line                      << endl
    2829       << " * Expression is different"                << endl
    29        << "   - exp1 : "+toString(exp1)               << endl
    30        << "   - exp2 : "+toString(exp2)               << endl;
     30       << "   - exp1 : "+morpheo::toString(exp1)               << endl
     31       << "   - exp2 : "+morpheo::toString(exp2)               << endl;
    3132
    3233  test_ko_error ();
    3334};
    3435
    35 void test_ko (char * file, uint32_t line)
     36inline void test_ko (char * file, uint32_t line)
    3637{
    3738  cerr << "[" << num_test << "] : Test KO"
     
    4445};
    4546
    46 void test_ok ()
     47inline void test_ok ()
    4748{
    48   cout << "[" << num_test << "] : Test OK"            << endl;
     49  msg (_("[%d] : Test OK\n"), num_test);
    4950
    5051  num_test ++;
    5152};
    5253
    53 void test_ok (char * file, uint32_t line)
     54inline void test_ok (char * file, uint32_t line)
    5455{
    55   cout << "[" << num_test << "] : Test OK"
    56        << "\tline " << line                           << endl
    57 //     << " * Localisation"                           << endl
    58 //     << "   - File : " << file                      << endl
    59 //     << "   - Line : " << line                      << endl
    60     ;
     56  msg (_("[%d] : Test OK\n"), num_test);
     57  msg (_("\tline %d\n"), line);
    6158
    6259  num_test ++;
     
    6461
    6562template <class T>
    66 void test_ok (char * file, uint32_t line, T exp)
     63inline void test_ok (char * file, uint32_t line, T exp)
    6764{
    68   cout << "[" << num_test << "] : Test OK"
    69        << "\tline " << line                           
    70        << "\tvalue : " << toString(exp)               << endl
    71 //     << " * Localisation"                           << endl
    72 //     << "   - File : " << file                      << endl
    73 //     << "   - Line : " << line                      << endl
    74 //     << " * Expression"                             << endl
    75 //     << "   - exp  : "+toString(exp)                << endl
    76     ;
     65  msg (_("[%d] : Test OK\n"), num_test);
     66  msg (_("\tline %d\n"), line);
     67  msg (_("\tvalue %s\n"), (morpheo::toString(exp)).c_str());
    7768
    7869  num_test ++;
     
    8071
    8172template <class T>
    82 void test(char * file, uint32_t line, T exp1, T exp2)
     73inline void test(char * file, uint32_t line, T exp1, T exp2)
    8374{
    8475  if (exp1 != exp2)
Note: See TracChangeset for help on using the changeset viewer.