Ignore:
Timestamp:
Apr 5, 2007, 4:17:30 PM (17 years ago)
Author:
rosiere
Message:

Interface normalisé
Début du banc de registres multi niveaux

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

    r2 r15  
    1010#define NB_PARAMS 0
    1111
    12 void usage (string exec)
     12void usage (int argc, char * argv[])
    1313{
    14   cerr << "<Usage> " << exec << " name_instance list_params" << endl
    15        << "list_params is :" << endl;
     14  cerr << "<Usage> " << argv[0] << " name_instance list_params" << endl
     15       << "list_params is :" << endl
    1616//     << " - size_data     (unsigned int)" << endl
    1717//     << " - nb_port       (unsigned int)" << endl;
     18       << "" << endl;
     19
     20  for (int i=0; i<argc; i++)
     21    cerr << argv[i] << " ";
     22  cerr << endl;
    1823
    1924  exit (1);
     
    2631#endif
    2732{
    28   if (argc != 2+NB_PARAMS)
    29     usage (argv[0]);
     33  if (argc < 2+NB_PARAMS)
     34    usage (argc, argv);
    3035
    3136  const string   name      = argv[1];
     
    4651    {
    4752      cout << "<" << name << "> : " <<  error.what ();
    48       return;
     53      exit (EXIT_FAILURE);
    4954    }
    5055  catch (...)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/SelfTest/src/test.cpp

    r2 r15  
    99#define NB_ITERATION 1
    1010
     11#define LABEL(str) do {cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; _@COMPONENT->vhdl_testbench_label(str);} while (0)
     12
    1113#include "Behavioural/@DIRECTORY/SelfTest/include/test.h"
    1214#include "Include/Test.h"
    1315
    1416void test (string name,
    15            morpheo::behavioural::@NAMESPACE_USE::Parameters param)
     17           morpheo::behavioural::@NAMESPACE_USE::Parameters _param)
    1618{
    1719  cout << "<" << name << "> : Simulation SystemC" << endl;
     
    2123                                             morpheo::behavioural::Parameters_Statistics(5,50),
    2224#endif
    23                                              param);
     25                                             _param);
    2426 
    2527#ifdef SYSTEMC
     
    2830   *********************************************************************/
    2931  sc_clock                               * CLOCK;
    30 
     32  sc_signal<Tcontrol_t>                  * NRESET;
    3133
    3234  string rename;
    3335
    3436  CLOCK                                  = new sc_clock ("clock", 1.0, 0.5);
     37  NRESET                                 = new sc_signal<Tcontrol_t> ("NRESET");
    3538 
    3639  /********************************************************
     
    4144 
    4245  (*(_@COMPONENT->in_CLOCK))        (*(CLOCK));
     46  (*(_@COMPONENT->in_NRESET))       (*(NRESET));
     47
     48
     49  cout << "<" << name << "> Start Simulation ............" << endl;
    4350
    4451  /********************************************************
     
    4653   ********************************************************/
    4754
    48   cout << "<" << name << "> Start Simulation ............" << endl;
    4955  // Initialisation
    5056
     
    5561
    5662  sc_start(0);
    57   _@COMPONENT->vhdl_testbench_label("Initialisation");
    58   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
     63  LABEL("Initialisation");
    5964
    60 
    61   _@COMPONENT->vhdl_testbench_label("Loop of Test");
    62   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl;
     65  LABEL("Loop of Test");
    6366
    6467  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    6568    {
    66       _@COMPONENT->vhdl_testbench_label("Iteration "+toString(iteration));
     69      LABEL("Iteration "+toString(iteration));
    6770
    6871      sc_start(1);
     
    7578  cout << "<" << name << "> ............ Stop Simulation" << endl;
    7679
     80  delete CLOCK;
     81  delete NRESET;
    7782#endif
    7883
Note: See TracChangeset for help on using the changeset viewer.