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/Generic/Select/Select_Priority_Fixed/SelfTest/src
Files:
2 edited

Legend:

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

    r10 r15  
    66 */
    77
    8 #include "Behavioural/Generic/Select/Priority_Fixed/SelfTest/include/test.h"
     8#include "Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/include/test.h"
    99
    1010#define NB_PARAMS 3
     
    4242  try
    4343    {
    44       morpheo::behavioural::generic::select::priority_fixed::Parameters param (nb_entity       ,
     44      morpheo::behavioural::generic::select::select_priority_fixed::Parameters param (nb_entity       ,
    4545                                                                               encoding_one_hot,
    4646                                                                               encoding_compact);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp

    r10 r15  
    99#define NB_ITERATION 512
    1010
    11 #include "Behavioural/Generic/Select/Priority_Fixed/SelfTest/include/test.h"
     11#include "Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/include/test.h"
    1212#include "Include/Test.h"
    1313
    1414void test (string name,
    15            morpheo::behavioural::generic::select::priority_fixed::Parameters _param)
     15           morpheo::behavioural::generic::select::select_priority_fixed::Parameters _param)
    1616{
    1717  cout << "<" << name << "> : Simulation SystemC" << endl;
    1818
    19   Priority_Fixed * _Priority_Fixed = new Priority_Fixed (name.c_str(),
     19  Select_Priority_Fixed * _Select_Priority_Fixed = new Select_Priority_Fixed (name.c_str(),
    2020#ifdef STATISTICS
    2121                                             morpheo::behavioural::Parameters_Statistics(5,50),
     
    2828   *********************************************************************/
    2929  sc_clock                         * CLOCK ;
     30  sc_signal<Tcontrol_t>            * NRESET;
    3031  sc_signal<Tcontrol_t>           ** VAL   ;
    3132  sc_signal<Tcontrol_t>           ** ACK   ;
     
    3637
    3738  CLOCK        = new sc_clock ("clock", 1.0, 0.5);
     39  NRESET       = new sc_signal<Tcontrol_t> ("NRESET");
    3840  VAL          = new sc_signal<Tcontrol_t> * [_param._nb_entity];
    3941  ACK          = new sc_signal<Tcontrol_t> * [_param._nb_entity];
     
    5456   ********************************************************/
    5557 
    56   cout << "<" << name << "> Instanciation of _Priority_Fixed" << endl;
     58  cout << "<" << name << "> Instanciation of _Select_Priority_Fixed" << endl;
    5759 
    58   (*(_Priority_Fixed->in_CLOCK))        (*(CLOCK));
     60  (*(_Select_Priority_Fixed->in_CLOCK ))       (*(CLOCK ));
     61  (*(_Select_Priority_Fixed->in_NRESET))       (*(NRESET));
     62
    5963    for (uint32_t i=0; i<_param._nb_entity; i++)
    6064      {
    61         (*(_Priority_Fixed-> in_VAL [i]))        (*(VAL [i]));
     65        (*(_Select_Priority_Fixed-> in_VAL [i]))        (*(VAL [i]));
    6266        if (_param._encoding_one_hot)
    63         (*(_Priority_Fixed->out_ACK [i]))        (*(ACK [i]));
     67        (*(_Select_Priority_Fixed->out_ACK [i]))        (*(ACK [i]));
    6468      }
    6569    if (_param._encoding_compact)
    6670      {
    67     (*(_Priority_Fixed->out_ENTITY    ))        (*(ENTITY    ));
    68     (*(_Priority_Fixed->out_ENTITY_ACK))        (*(ENTITY_ACK));
     71    (*(_Select_Priority_Fixed->out_ENTITY    ))        (*(ENTITY    ));
     72    (*(_Select_Priority_Fixed->out_ENTITY_ACK))        (*(ENTITY_ACK));
    6973      }
    7074  /********************************************************
     
    8690 
    8791  sc_start(0);
    88 //_Priority_Fixed->vhdl_testbench_label("Initialisation");
     92//_Select_Priority_Fixed->vhdl_testbench_label("Initialisation");
    8993//cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
    9094
    91   _Priority_Fixed->vhdl_testbench_label("Loop of Test");
     95  _Select_Priority_Fixed->vhdl_testbench_label("Loop of Test");
    9296  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl;
    9397
    9498  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    9599    {
    96       _Priority_Fixed->vhdl_testbench_label("Iteration "+toString(iteration));
     100      _Select_Priority_Fixed->vhdl_testbench_label("Iteration "+toString(iteration));
    97101
    98102      entity    = 0;
     
    133137  cout << "<" << name << "> ............ Stop Simulation" << endl;
    134138
     139  delete CLOCK;
     140  delete NRESET;
    135141
    136 
    137   delete CLOCK;
    138 
     142  for (uint32_t i=0; i<_param._nb_entity; i++)
     143    {
     144      delete VAL [i];
     145      delete ACK [i];
     146    }
     147 
     148  delete VAL       ;
     149  delete ACK       ;
     150  delete ENTITY    ;
     151  delete ENTITY_ACK;
    139152#endif
    140153
    141   delete _Priority_Fixed;
     154  delete _Select_Priority_Fixed;
    142155}
Note: See TracChangeset for help on using the changeset viewer.