Ignore:
Timestamp:
Sep 28, 2007, 2:58:08 PM (17 years ago)
Author:
rosiere
Message:
  • VHDL - RegisterFile_Multi_Banked (only partial_crossbar)
  • SystemC - modif Component, interface and co -> ajout du type Tusage_T pour instancier un coposant mais ne demander que le VHDL ou le systemC.
  • Séminaire interne
File:
1 edited

Legend:

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

    r44 r57  
    1313
    1414void test (string name,
    15            morpheo::behavioural::generic::select::select_priority_fixed::Parameters _param)
     15           morpheo::behavioural::generic::select::select_priority_fixed::Parameters * _param)
    1616{
    1717  cout << "<" << name << "> : Simulation SystemC" << endl;
    1818
     19
     20#ifdef STATISTICS
     21  morpheo::behavioural::Parameters_Statistics * _param_stat = new morpheo::behavioural::Parameters_Statistics (5,50);
     22#endif
    1923  Select_Priority_Fixed * _Select_Priority_Fixed = new Select_Priority_Fixed (name.c_str(),
    2024#ifdef STATISTICS
    21                                                                               morpheo::behavioural::Parameters_Statistics(5,50),
     25                                                                              _param_stat,
    2226#endif
    2327                                                                              _param);
     
    3842  CLOCK        = new sc_clock ("clock", 1.0, 0.5);
    3943  NRESET       = new sc_signal<Tcontrol_t> ("NRESET");
    40   VAL          = new sc_signal<Tcontrol_t> * [_param._nb_entity];
    41   ACK          = new sc_signal<Tcontrol_t> * [_param._nb_entity];
     44  VAL          = new sc_signal<Tcontrol_t> * [_param->_nb_entity];
     45  ACK          = new sc_signal<Tcontrol_t> * [_param->_nb_entity];
    4246
    43   for (uint32_t i=0; i<_param._nb_entity; i++)
     47  for (uint32_t i=0; i<_param->_nb_entity; i++)
    4448    {
    4549      rename = "VAL_"+toString(i);
     
    6165  (*(_Select_Priority_Fixed->in_NRESET))       (*(NRESET));
    6266
    63     for (uint32_t i=0; i<_param._nb_entity; i++)
     67    for (uint32_t i=0; i<_param->_nb_entity; i++)
    6468      {
    6569        (*(_Select_Priority_Fixed-> in_VAL [i]))        (*(VAL [i]));
    66         if (_param._encoding_one_hot)
     70        if (_param->_encoding_one_hot)
    6771        (*(_Select_Priority_Fixed->out_ACK [i]))        (*(ACK [i]));
    6872      }
    69     if (_param._encoding_compact)
     73    if (_param->_encoding_compact)
    7074      {
    7175    (*(_Select_Priority_Fixed->out_ENTITY    ))        (*(ENTITY    ));
     
    7882  cout << "<" << name << "> Start Simulation ............" << endl;
    7983
    80   if (_param._nb_entity > (8*sizeof (Tentity_t)))
     84  if (_param->_nb_entity > (8*sizeof (Tentity_t)))
    8185    throw ErrorMorpheo("No Selftest with nb_entity higher at "+toString(8*sizeof (Tentity_t)));
    8286
     
    99103      bool find = false;
    100104     
    101       for (uint32_t i=0; i<_param._nb_entity; i++)
     105      for (uint32_t i=0; i<_param->_nb_entity; i++)
    102106        {
    103107          Tcontrol_t val = rand() % 2;
     
    118122      entity = (find)?entity:0;
    119123
    120       if (_param._encoding_one_hot)
     124      if (_param->_encoding_one_hot)
    121125        TEST(Tcontrol_t, ACK   [entity]->read(), find  );
    122       if (_param._encoding_compact)
     126      if (_param->_encoding_compact)
    123127        {
    124128        TEST(Tentity_t , ENTITY        ->read(), entity); // burk
Note: See TracChangeset for help on using the changeset viewer.