Ignore:
Timestamp:
Apr 14, 2009, 8:39:12 PM (15 years ago)
Author:
rosiere
Message:

1) Add modelsim simulation systemC
2) Modelsim cosimulation systemC / VHDL is not finish !!!! (cf execute_queue and write_unit)
3) Add multi architecture
5) Add template for comparator, multiplier and divider
6) Change Message
Warning) Various test macro have change, many selftest can't compile

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
Files:
15 added
1 deleted
49 edited
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/Makefile.defs

    r112 r113  
    77#
    88
     9ENTITY                          = Comparator
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/include/test.h

    r112 r113  
    1111#endif
    1212
    13 #define NB_ITERATION  1
     13#define NB_ITERATION  1024
    1414#define CYCLE_MAX     (1024*NB_ITERATION)
    1515
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/src/main.cpp

    r112 r113  
    1919  err (_(" * type      (Tcomparator_scheme_t)\n"));
    2020
    21 
    2221  exit (1);
    2322}
     
    3433  uint32_t x = 1;
    3534
     35  string name = argv[x++];
    3636  uint32_t             _size_data;
    3737  bool                 _is_signed;
     
    4141  SELFTEST0(_is_signed,bool                ,argv,x);
    4242  SELFTEST0(_type     ,Tcomparator_scheme_t,argv,x);
    43 
    44   string name = argv[x++];
    4543
    4644  int _return = EXIT_SUCCESS;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/src/test.cpp

    r112 r113  
    99#include "Behavioural/Generic/Comparator/SelfTest/include/test.h"
    1010#include "Behavioural/include/Allocation.h"
     11#include "Common/include/BitManipulation.h"
    1112
    1213void test (string name,
     
    5051  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    5152  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     53
     54  sc_signal<Tdata_t   > *  in_COMPARE_DATA_0;
     55  sc_signal<Tdata_t   > *  in_COMPARE_DATA_1;
     56  sc_signal<Tcontrol_t> * out_COMPARE_TEST  ;
     57
     58  ALLOC0_SC_SIGNAL( in_COMPARE_DATA_0," in_COMPARE_DATA_0",Tdata_t   );
     59  ALLOC0_SC_SIGNAL( in_COMPARE_DATA_1," in_COMPARE_DATA_1",Tdata_t   );
     60  ALLOC0_SC_SIGNAL(out_COMPARE_TEST  ,"out_COMPARE_TEST  ",Tcontrol_t);
    5261 
    5362  /********************************************************
     
    6069  (*(_Comparator->in_NRESET))       (*(in_NRESET));
    6170
    62 
     71  INSTANCE0_SC_SIGNAL(_Comparator, in_COMPARE_DATA_0);
     72  INSTANCE0_SC_SIGNAL(_Comparator, in_COMPARE_DATA_1);
     73  INSTANCE0_SC_SIGNAL(_Comparator,out_COMPARE_TEST  );
     74 
    6375  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
    6476   
     
    90102      LABEL("Iteration %d",iteration);
    91103
     104      uint64_t data0 = range<uint64_t>(rand(),_param->_size_data);
     105      uint64_t data1 = range<uint64_t>(rand(),_param->_size_data);
     106
     107      in_COMPARE_DATA_0->write(static_cast<Tdata_t>(data0));
     108      in_COMPARE_DATA_1->write(static_cast<Tdata_t>(data1));
     109     
     110      SC_START(0);
     111     
     112      Tcontrol_t test = false;
     113      switch (_param->_size_data)
     114        {
     115        case 8 :
     116          {
     117            if (_param->_is_signed)
     118              switch (_param->_type)
     119                {
     120                case COMPARATOR_EQUAL            : test = static_cast< int8_t>(data0) == static_cast< int8_t>(data1); break;
     121                case COMPARATOR_NOT_EQUAL        : test = static_cast< int8_t>(data0) != static_cast< int8_t>(data1); break;
     122                case COMPARATOR_GREATER          : test = static_cast< int8_t>(data0) >  static_cast< int8_t>(data1); break;
     123                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast< int8_t>(data0) >= static_cast< int8_t>(data1); break;
     124                case COMPARATOR_LESS             : test = static_cast< int8_t>(data0) <  static_cast< int8_t>(data1); break;
     125                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast< int8_t>(data0) <= static_cast< int8_t>(data1); break;
     126                }
     127            else
     128              switch (_param->_type)
     129                {
     130                case COMPARATOR_EQUAL            : test = static_cast<uint8_t>(data0) == static_cast<uint8_t>(data1); break;
     131                case COMPARATOR_NOT_EQUAL        : test = static_cast<uint8_t>(data0) != static_cast<uint8_t>(data1); break;
     132                case COMPARATOR_GREATER          : test = static_cast<uint8_t>(data0) >  static_cast<uint8_t>(data1); break;
     133                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast<uint8_t>(data0) >= static_cast<uint8_t>(data1); break;
     134                case COMPARATOR_LESS             : test = static_cast<uint8_t>(data0) <  static_cast<uint8_t>(data1); break;
     135                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast<uint8_t>(data0) <= static_cast<uint8_t>(data1); break;
     136                }
     137            break;
     138          }
     139        case 16 :
     140          {
     141            if (_param->_is_signed)
     142              switch (_param->_type)
     143                {
     144                case COMPARATOR_EQUAL            : test = static_cast< int16_t>(data0) == static_cast< int16_t>(data1); break;
     145                case COMPARATOR_NOT_EQUAL        : test = static_cast< int16_t>(data0) != static_cast< int16_t>(data1); break;
     146                case COMPARATOR_GREATER          : test = static_cast< int16_t>(data0) >  static_cast< int16_t>(data1); break;
     147                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast< int16_t>(data0) >= static_cast< int16_t>(data1); break;
     148                case COMPARATOR_LESS             : test = static_cast< int16_t>(data0) <  static_cast< int16_t>(data1); break;
     149                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast< int16_t>(data0) <= static_cast< int16_t>(data1); break;
     150                }
     151            else
     152              switch (_param->_type)
     153                {
     154                case COMPARATOR_EQUAL            : test = static_cast<uint16_t>(data0) == static_cast<uint16_t>(data1); break;
     155                case COMPARATOR_NOT_EQUAL        : test = static_cast<uint16_t>(data0) != static_cast<uint16_t>(data1); break;
     156                case COMPARATOR_GREATER          : test = static_cast<uint16_t>(data0) >  static_cast<uint16_t>(data1); break;
     157                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast<uint16_t>(data0) >= static_cast<uint16_t>(data1); break;
     158                case COMPARATOR_LESS             : test = static_cast<uint16_t>(data0) <  static_cast<uint16_t>(data1); break;
     159                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast<uint16_t>(data0) <= static_cast<uint16_t>(data1); break;
     160                }
     161            break;
     162          }
     163        case 32 :
     164          {
     165            if (_param->_is_signed)
     166              switch (_param->_type)
     167                {
     168                case COMPARATOR_EQUAL            : test = static_cast< int32_t>(data0) == static_cast< int32_t>(data1); break;
     169                case COMPARATOR_NOT_EQUAL        : test = static_cast< int32_t>(data0) != static_cast< int32_t>(data1); break;
     170                case COMPARATOR_GREATER          : test = static_cast< int32_t>(data0) >  static_cast< int32_t>(data1); break;
     171                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast< int32_t>(data0) >= static_cast< int32_t>(data1); break;
     172                case COMPARATOR_LESS             : test = static_cast< int32_t>(data0) <  static_cast< int32_t>(data1); break;
     173                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast< int32_t>(data0) <= static_cast< int32_t>(data1); break;
     174                }
     175            else
     176              switch (_param->_type)
     177                {
     178                case COMPARATOR_EQUAL            : test = static_cast<uint32_t>(data0) == static_cast<uint32_t>(data1); break;
     179                case COMPARATOR_NOT_EQUAL        : test = static_cast<uint32_t>(data0) != static_cast<uint32_t>(data1); break;
     180                case COMPARATOR_GREATER          : test = static_cast<uint32_t>(data0) >  static_cast<uint32_t>(data1); break;
     181                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast<uint32_t>(data0) >= static_cast<uint32_t>(data1); break;
     182                case COMPARATOR_LESS             : test = static_cast<uint32_t>(data0) <  static_cast<uint32_t>(data1); break;
     183                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast<uint32_t>(data0) <= static_cast<uint32_t>(data1); break;
     184                }
     185            break;
     186          }
     187        case 64 :
     188          {
     189            if (_param->_is_signed)
     190              switch (_param->_type)
     191                {
     192                case COMPARATOR_EQUAL            : test = static_cast< int64_t>(data0) == static_cast< int64_t>(data1); break;
     193                case COMPARATOR_NOT_EQUAL        : test = static_cast< int64_t>(data0) != static_cast< int64_t>(data1); break;
     194                case COMPARATOR_GREATER          : test = static_cast< int64_t>(data0) >  static_cast< int64_t>(data1); break;
     195                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast< int64_t>(data0) >= static_cast< int64_t>(data1); break;
     196                case COMPARATOR_LESS             : test = static_cast< int64_t>(data0) <  static_cast< int64_t>(data1); break;
     197                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast< int64_t>(data0) <= static_cast< int64_t>(data1); break;
     198                }
     199            else
     200              switch (_param->_type)
     201                {
     202                case COMPARATOR_EQUAL            : test = static_cast<uint64_t>(data0) == static_cast<uint64_t>(data1); break;
     203                case COMPARATOR_NOT_EQUAL        : test = static_cast<uint64_t>(data0) != static_cast<uint64_t>(data1); break;
     204                case COMPARATOR_GREATER          : test = static_cast<uint64_t>(data0) >  static_cast<uint64_t>(data1); break;
     205                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast<uint64_t>(data0) >= static_cast<uint64_t>(data1); break;
     206                case COMPARATOR_LESS             : test = static_cast<uint64_t>(data0) <  static_cast<uint64_t>(data1); break;
     207                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast<uint64_t>(data0) <= static_cast<uint64_t>(data1); break;
     208                }
     209            break;
     210          }
     211        default :
     212          {
     213            TEST_KO("Invalid size for the test.");
     214          }
     215        }
     216
     217      TEST(Tcontrol_t,out_COMPARE_TEST->read(),test);
     218
    92219      SC_START(1);
    93220    }
     
    104231  delete in_CLOCK;
    105232  delete in_NRESET;
     233  DELETE0_SC_SIGNAL( in_COMPARE_DATA_0);
     234  DELETE0_SC_SIGNAL( in_COMPARE_DATA_1);
     235  DELETE0_SC_SIGNAL(out_COMPARE_TEST  );
    106236    }
    107237#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/include/Comparator.h

    r112 r113  
    6464  public    : SC_IN (Tdata_t   )            *  in_COMPARE_DATA_0;
    6565  public    : SC_IN (Tdata_t   )            *  in_COMPARE_DATA_1;
    66   public    : SC_OUT(Tcontrol_t)            *  in_COMPARE_TEST  ;
    67    
     66  public    : SC_OUT(Tcontrol_t)            * out_COMPARE_TEST  ;
    6867
    6968    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     
    105104#ifdef SYSTEMC                                 
    106105  public  : void        transition                (void);
    107 //public  : void        genMoore                  (void);
     106  public  : void        genMealy                  (void);
    108107#endif                                         
    109108
     
    112111  private : void        vhdl_declaration          (Vhdl * & vhdl);
    113112  private : void        vhdl_body                 (Vhdl * & vhdl);
     113
     114  private : void        vhdl_xilinx_declaration   (Vhdl * & vhdl);
     115  private : void        vhdl_xilinx_body          (Vhdl * & vhdl);
    114116#endif                                         
    115117
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/include/Parameters.h

    r112 r113  
    2626  public : Tcomparator_scheme_t _type;
    2727
     28  public : int64_t              _extends;
     29  public : int64_t              _mask_sign;
     30
    2831    //-----[ methods ]-----------------------------------------------------------
    2932  public : Parameters  (uint32_t             size_data,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator.cpp

    r112 r113  
    7777# endif   
    7878
    79 //      log_printf(INFO,Comparator,FUNCTION,_("<%s> : Method - genMoore"),_name.c_str());
     79        log_printf(INFO,Comparator,FUNCTION,_("<%s> : Method - genMealy"),_name.c_str());
    8080
    81 //      SC_METHOD (genMoore);
    82 //      dont_initialize ();
    83 //      sensitive << (*(in_CLOCK)).neg(); // need internal register
     81        SC_METHOD (genMealy);
     82        dont_initialize ();
     83//      sensitive << (*(in_CLOCK)).neg(); // don't need internal register
     84        sensitive << (*(in_COMPARE_DATA_0))
     85                  << (*(in_COMPARE_DATA_1));
    8486       
    85 // # ifdef SYSTEMCASS_SPECIFIC
    86 //      // List dependency information
    87 // # endif   
     87# ifdef SYSTEMCASS_SPECIFIC
     88        // List dependency information
     89# endif   
    8890       
    8991#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_allocation.cpp

    r112 r113  
    5353      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
    5454    }
     55
     56    // ~~~~~[ Interface : "compare" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     57    {
     58      ALLOC0_INTERFACE_BEGIN("compare",IN,SOUTH,_("Compare interface"));
     59
     60      ALLOC0_SIGNAL_IN ( in_COMPARE_DATA_0,"DATA_0",Tdata_t   ,_param->_size_data);
     61      ALLOC0_SIGNAL_IN ( in_COMPARE_DATA_1,"DATA_1",Tdata_t   ,_param->_size_data);
     62      ALLOC0_SIGNAL_OUT(out_COMPARE_TEST  ,"TEST"  ,Tcontrol_t,1);
     63
     64      ALLOC0_INTERFACE_END();
     65    }
     66
    5567    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    5668
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_deallocation.cpp

    r112 r113  
    2525        delete    in_CLOCK ;
    2626        delete    in_NRESET;
     27
     28        DELETE0_SIGNAL( in_COMPARE_DATA_0,_param->_size_data);
     29        DELETE0_SIGNAL( in_COMPARE_DATA_1,_param->_size_data);
     30        DELETE0_SIGNAL(out_COMPARE_TEST  ,1);
    2731      }
    2832    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_vhdl.cpp

    r112 r113  
    2727    _component->vhdl_instance(vhdl);
    2828
     29    // default architecture
    2930    vhdl_declaration (vhdl);
    3031    vhdl_body        (vhdl);
     32
     33    // Xilinx architecture
     34    vhdl->set_architecture("xilinx");
     35    vhdl_xilinx_declaration (vhdl);
     36    vhdl_xilinx_body        (vhdl);
    3137
    3238    vhdl->generate_file();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Parameters.cpp

    r112 r113  
    77
    88#include "Behavioural/Generic/Comparator/include/Parameters.h"
     9#include "Common/include/BitManipulation.h"
    910
    1011namespace morpheo {
     
    1213namespace generic {
    1314namespace comparator {
    14 
    1515
    1616#undef  FUNCTION
     
    2828
    2929    test();
     30
     31    _extends   = gen_mask_not<int64_t>(_size_data);
     32    _mask_sign = (1<<(_size_data-1));
    3033
    3134    if (is_toplevel)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Parameters_msg_error.cpp

    r112 r113  
    2424    Parameters_test test ("Comparator");
    2525
     26    if (_size_data > 64)
     27      test.error(_("Max size is 64 bits.\n"));
     28
    2629    log_end(Comparator,FUNCTION);
    2730
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = Counter
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/include/top.h

    r112 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    6  * Test "RegisterFile"
     6 * Test "Counter"
    77 */
    88
     
    1111#endif
    1212
    13 #include <string>
    14 #include <iostream>
     13#define NB_ITERATION  1024
     14#define CYCLE_MAX     (1024*NB_ITERATION)
    1515
     16#include "Common/include/Test.h"
    1617#include "Common/include/Time.h"
    1718#include "Behavioural/Generic/Counter/include/Counter.h"
     
    2122using namespace morpheo::behavioural;
    2223using namespace morpheo::behavioural::generic;
    23 
    2424using namespace morpheo::behavioural::generic::counter;
    2525
    26 void test   (string name,
    27              morpheo::behavioural::generic::counter::Parameters param);
     26SC_MODULE(top)
     27{
     28#ifdef SYSTEMC
     29 private: sc_clock               *  in_CLOCK ;
     30 private: sc_signal<Tcontrol_t>  *  in_NRESET;
     31 private: sc_signal<Tdata_t>    **  in_COUNTER_DATA  ;// [param->_nb_port]
     32 private: sc_signal<Tcontrol_t> **  in_COUNTER_ADDSUB;// [param->_nb_port]
     33 private: sc_signal<Tdata_t>    ** out_COUNTER_DATA  ;// [param->_nb_port]
     34#endif
     35
     36 private: std::string                                          name ;
     37 private: morpheo::behavioural::generic::counter::Parameters * param;
     38#ifdef STATISTICS
     39 private: morpheo::behavioural::Parameters_Statistics        * param_stat;
     40#endif
     41 private: Counter                                            * component;
     42
     43 private: void usage        (string exec);
     44 private: void allocation   (void);
     45 private: void deallocation (void);
     46 public : void test         (void);
     47
     48#ifdef MTI_SYSTEMC
     49  SC_CTOR(top::top);
     50#else
     51 public : top (sc_module_name module_name,int argc, char * argv[]);
     52#endif
     53 public : ~top(void);
     54};
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/main.cpp

    r81 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
    77
    8 #include "Behavioural/Generic/Counter/SelfTest/include/test.h"
     8#include "Behavioural/Generic/Counter/SelfTest/include/top.h"
    99
    10 #define NB_PARAMS 2
     10#ifndef MTI_SYSTEMC
     11# ifndef SYSTEMC
     12int main    (int argc, char * argv[])
     13# else
     14int sc_main (int argc, char * argv[])
     15# endif
     16{
     17  int _return = EXIT_SUCCESS;
    1118
    12 void usage (string exec)
    13 {
    14   cerr << "<Usage> " << exec << " name_instance list_params" << endl
    15        << "list_params is :" << endl
    16        << " - size_data     (unsigned int)" << endl
    17        << " - nb_port       (unsigned int)" << endl;
     19  try
     20    {
     21      top * my_top = new top ("my_top",argc,argv);
    1822
    19   exit (1);
     23      my_top->test();
     24
     25      delete my_top;
     26    }
     27  catch (morpheo::ErrorMorpheo & error)
     28    {
     29      msg (_("%s\n"),error.what ());
     30      _return = EXIT_FAILURE;
     31    }
     32 
     33  try
     34    {
     35      if (_return == EXIT_SUCCESS)
     36        TEST_OK("Counter : no error");
     37      else
     38        TEST_KO("Counter : a lot of error");
     39    }
     40  catch (morpheo::ErrorMorpheo & error)
     41    {
     42//       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
     43      _return = EXIT_FAILURE;
     44    }
     45
     46  return _return;
    2047}
    21 
    22 #ifndef SYSTEMC
    23 int main    (int argc, char * argv[])
    24 #else
    25 int sc_main (int argc, char * argv[])
    2648#endif
    27 {
    28   if (argc != 2+NB_PARAMS)
    29     usage (argv[0]);
    30 
    31   cout << "<test0> : Classic usage" << endl;
    32   cout << "<test0> : Typical parameters" << endl;
    33   const string   name      = argv[1];
    34   const uint32_t size_data = atoi(argv[2]);
    35   const uint32_t nb_port   = atoi(argv[3]);
    36 
    37   morpheo::behavioural::generic::counter::Parameters param (size_data,
    38                                                             nb_port  );
    39 
    40   test (name,param);
    41 
    42   return (EXIT_SUCCESS);
    43 }
    44 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top_test.cpp

    r112 r113  
    77 */
    88
    9 #define NB_ITERATION 1024
    10 #define CYCLE_MAX    1024*NB_ITERATION
     9#include "Behavioural/Generic/Counter/SelfTest/include/top.h"
    1110
    12 #include "Behavioural/Generic/Counter/SelfTest/include/test.h"
    13 #include "Common/include/Test.h"
    14 
    15 void test (string name,
    16            morpheo::behavioural::generic::counter::Parameters param)
     11void top::test (void)
    1712{
    18   cout << "<" << name << "> : Simulation SystemC" << endl;
    19 
    20   try
    21     {
    22       cout << param.print(1);
    23       param.test();
    24     }
    25   catch (morpheo::ErrorMorpheo & error)
    26     {
    27       cout << "<" << name << "> : " <<  error.what ();
    28       return;
    29     }
    30   catch (...)
    31     {
    32       cerr << "<" << name << "> : This test must generate a error" << endl;
    33       exit (EXIT_FAILURE);
    34     }
    35 #ifdef STATISTICS
    36   morpheo::behavioural::Parameters_Statistics * param_stat = new morpheo::behavioural::Parameters_Statistics (5,50);
    37 #endif
    38 
    39   Tusage_t _usage = USE_ALL;
    40 
    41 //   _usage = usage_unset(_usage,USE_SYSTEMC              );
    42 //   _usage = usage_unset(_usage,USE_VHDL                 );
    43 //   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
    44 //   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
    45 //   _usage = usage_unset(_usage,USE_POSITION             );
    46 //   _usage = usage_unset(_usage,USE_STATISTICS           );
    47 //   _usage = usage_unset(_usage,USE_INFORMATION          );
    48 
    49   Counter * _Counter = new Counter (name.c_str(),
    50 #ifdef STATISTICS
    51                                     param_stat,
    52 #endif
    53                                     param,
    54                                     _usage);
    55  
    5613#ifdef SYSTEMC
    57   /*********************************************************************
    58    * Déclarations des signaux
    59    *********************************************************************/
    60   sc_clock                                 CLOCK ("clock", 1.0, 0.5);
    61   sc_signal<Tcontrol_t>                    RESET;
    62   sc_signal<Tdata_t>                       DATA_IN  [param._nb_port];
    63   sc_signal<Tcontrol_t>                    ADDSUB   [param._nb_port];
    64   sc_signal<Tdata_t>                       DATA_OUT [param._nb_port];
    65 
    66   /********************************************************
    67    * Instanciation
    68    ********************************************************/
    69  
    70   cout << "<" << name << "> Instanciation of _Counter" << endl;
    71  
    72   (*(_Counter->in_CLOCK))        (CLOCK);
    73   (*(_Counter->in_NRESET))       (RESET);
    74 
    75   for (uint32_t i=0; i<param._nb_port; i++)
    76     {
    77       (*(_Counter-> in_COUNTER_DATA  [i]))        (DATA_IN  [i]);
    78       (*(_Counter-> in_COUNTER_ADDSUB[i]))        (ADDSUB   [i]);
    79       (*(_Counter->out_COUNTER_DATA  [i]))        (DATA_OUT [i]);
    80     }
    81 
    8214  Time * _time = new Time();
    8315
     
    9224  //srand(TIME(NULL));
    9325
    94   Tdata_t    data_in  [param._nb_port];
    95   Tdata_t    data_out [param._nb_port];
    96   Tcontrol_t addsub   [param._nb_port];
     26  Tdata_t    data_in  [param->_nb_port];
     27  Tdata_t    data_out [param->_nb_port];
     28  Tcontrol_t addsub   [param->_nb_port];
    9729
    98   sc_start(0);
     30  SC_CYCLE(0);
    9931
    100   RESET.write(1);
     32  in_NRESET->write(1);
    10133
    102   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
     34  LABEL("Initialisation");
    10335
    104   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl;
     36  LABEL("Loop of Test");
    10537
    10638  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    10739    {
    108       cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Itération " << iteration << endl;
    109       for (uint32_t i=0; i<param._nb_port; i++)
     40      LABEL("Iteration %d",iteration);
     41
     42      for (uint32_t i=0; i<param->_nb_port; i++)
    11043        {
    111           Tdata_t data = rand()%param._data_max;
     44          Tdata_t data = rand()%param->_data_max;
    11245          data_in  [i] = data;
    11346          addsub   [i] = (rand()%2)==1;
    11447         
    115           DATA_IN  [i].write(data      );
    116           ADDSUB   [i].write(addsub [i]);
     48          LABEL("in_COUNTER_DATA   [%d] = %d",i,data      );
     49          LABEL("in_COUNTER_ADDSUB [%d] = %d"  ,i,addsub [i]);
    11750
    118           data_out [i] = (addsub[i]==1)?((data<param._data_max)?data+1:data):((data>0)?data-1:data);
     51          in_COUNTER_DATA   [i]->write(data      );
     52          in_COUNTER_ADDSUB [i]->write(addsub [i]);
     53
     54          data_out [i] = (addsub[i]==1)?((data<param->_data_max)?data+1:data):((data>0)?data-1:data);
    11955        }
    12056
    121       sc_start(0);
    122      
    123       for (uint32_t i=0; i<param._nb_port; i++)
     57      SC_CYCLE(0);
     58
     59      for (uint32_t i=0; i<param->_nb_port; i++)
    12460        {
    125           cout << hex
    126                << "    [" << i << "] "
    127                << data_in [i];
     61          string op = (addsub[i] == 1)?"++":"--";
     62          LABEL("0x%d %s = 0x%d",i,op.c_str(),out_COUNTER_DATA [i]->read());
    12863
    129           if (addsub[i] == 1)
    130             cout << " ++";
    131           else
    132             cout << " --";
    133 
    134           cout << " = "
    135                << DATA_OUT [i].read();
    136 
    137           TEST(Tdata_t,DATA_OUT [i].read(),data_out [i]);
    138            
    139           cout << std::dec << endl;
     64          TEST(Tdata_t,out_COUNTER_DATA [i]->read(),data_out [i]);
    14065        }
    14166     
    142       sc_start(1);
     67      SC_CYCLE(1);
    14368    }
    14469
    145   sc_start(1);
     70  SC_CYCLE(1);
    14671
    14772  /********************************************************
     
    14974   ********************************************************/
    15075
     76  sc_stop();
     77
    15178  delete _time;
    15279
    15380  cout << "<" << name << "> ............ Stop Simulation" << endl;
    154 
    15581#endif
    156 
    157   delete _Counter;
    158 #ifdef STATISTICS
    159   delete param_stat;
    160 #endif
    161 
    16282}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h

    r88 r113  
    4040    // -----[ fields ]----------------------------------------------------
    4141    // Parameters
    42   protected : const std::string _name;
    43   protected : const Parameters  _param;
    44   private   : const Tusage_t    _usage;
     42  protected : const std::string   _name;
     43  protected : const Parameters  * _param;
     44  private   : const Tusage_t      _usage;
    4545
    4646#ifdef STATISTICS
     
    7979                                           morpheo::behavioural::Parameters_Statistics * param_statistics,
    8080#endif
    81                                            Parameters param,
    82                                            Tusage_t   usage);
     81                                           Parameters * param,
     82                                           Tusage_t     usage);
    8383                                               
    84   public  :          Counter              (Parameters param );
     84// public  :          Counter              (Parameters param );
    8585  public  :          ~Counter             (void);
    8686                                               
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter.cpp

    r88 r113  
    1313namespace counter {
    1414
    15 
     15#undef FUNCTION
     16#define FUNCTION "Counter::Counter"
    1617  Counter::Counter
    1718  (
     
    2425  morpheo::behavioural::Parameters_Statistics * param_statistics,
    2526#endif
    26   morpheo::behavioural::generic::counter::Parameters param,
     27  morpheo::behavioural::generic::counter::Parameters * param,
    2728   Tusage_t usage):
    2829    _name  (name),
     
    3031    _usage (usage)
    3132  {
    32     log_printf(FUNC,Counter,"Counter","Begin");
     33    log_begin(Counter,FUNCTION);
    3334
    34 #if DEBUG_Counter == true
    35     log_printf(INFO,Counter,FUNCTION,_("<%s> Parameters"),_name.c_str());
     35// #if DEBUG_Counter == true
     36//     log_printf(INFO,Counter,FUNCTION,_("<%s> Parameters"),_name.c_str());
    3637
    37     std::cout << param << std::endl;
    38 #endif   
     38//     std::cout << *param << std::endl;
     39// #endif   
    3940
    4041    log_printf(INFO,Core,FUNCTION,_("<%s> Allocation"),_name.c_str());
     
    7677        SC_METHOD (genMealy);
    7778        dont_initialize ();
    78         for (uint32_t i=0; i<_param._nb_port; i++)
     79        for (uint32_t i=0; i<_param->_nb_port; i++)
    7980          sensitive << *(in_COUNTER_DATA   [i])
    8081                    << *(in_COUNTER_ADDSUB [i]);
     
    8283#ifdef SYSTEMCASS_SPECIFIC
    8384        // List dependency information
    84         for (uint32_t i=0; i<_param._nb_port; i++)
     85        for (uint32_t i=0; i<_param->_nb_port; i++)
    8586          {
    8687            (*(out_COUNTER_DATA [i])) (*(in_COUNTER_DATA   [i]));
     
    9192
    9293#endif
    93     log_printf(FUNC,Counter,"Counter","End");
     94    log_end(Counter,FUNCTION);
    9495  };
    9596 
     97#undef FUNCTION
     98#define FUNCTION "Counter::~Counter"
    9699  Counter::~Counter (void)
    97100  {
    98     log_printf(FUNC,Counter,"~Counter","Begin");
     101    log_begin(Counter,FUNCTION);
    99102
    100103#ifdef STATISTICS
     
    108111    deallocation ();
    109112
    110     log_printf(FUNC,Counter,"~Counter","End");
     113    log_end(Counter,FUNCTION);
    111114  };
    112115
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp

    r112 r113  
    2121
    2222    Entity * entity = _component->set_entity (_name     
    23                                              ,"Counter" 
     23                                             ,_param->_type
    2424#ifdef POSITION
    2525                                             ,COMBINATORY
     
    4545    // ~~~~~[ Interface : "counter" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4646    {
    47       ALLOC1_INTERFACE_BEGIN("counter", IN, SOUTH, _("Counter interface"), _param._nb_port);
     47      ALLOC1_INTERFACE_BEGIN("counter", IN, SOUTH, _("Counter interface"), _param->_nb_port);
    4848           
    49       ALLOC1_SIGNAL_IN ( in_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param._size_data);
     49      ALLOC1_SIGNAL_IN ( in_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param->_size_data);
    5050      ALLOC1_SIGNAL_IN ( in_COUNTER_ADDSUB,"addsub",Tcontrol_t,1                );
    51       ALLOC1_SIGNAL_OUT(out_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param._size_data);
     51      ALLOC1_SIGNAL_OUT(out_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param->_size_data);
    5252
    53       ALLOC1_INTERFACE_END(_param._nb_port);
     53      ALLOC1_INTERFACE_END(_param->_nb_port);
    5454    }
    5555   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_deallocation.cpp

    r112 r113  
    2424        delete     in_NRESET;
    2525       
    26         DELETE1_SIGNAL( in_COUNTER_DATA  , _param._nb_port,_param._size_data);
    27         DELETE1_SIGNAL( in_COUNTER_ADDSUB, _param._nb_port,1                );
    28         DELETE1_SIGNAL(out_COUNTER_DATA  , _param._nb_port,_param._size_data);
     26        DELETE1_SIGNAL( in_COUNTER_DATA  , _param->_nb_port,_param->_size_data);
     27        DELETE1_SIGNAL( in_COUNTER_ADDSUB, _param->_nb_port,1                );
     28        DELETE1_SIGNAL(out_COUNTER_DATA  , _param->_nb_port,_param->_size_data);
    2929      }
    3030
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_genMealy.cpp

    r81 r113  
    1818    log_printf(FUNC,Counter,"genMealy","Begin");
    1919
    20     for (uint32_t i=0; i<_param._nb_port; i++)
     20    for (uint32_t i=0; i<_param->_nb_port; i++)
    2121      {
    2222        Tcontrol_t addsub  = PORT_READ(in_COUNTER_ADDSUB [i]);
     
    2828        if (addsub == 1)
    2929          {
    30             if (data_out < _param._data_max)
     30            if (data_out < _param->_data_max)
    3131              data_out++;
    3232          }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_statistics_declaration.cpp

    r81 r113  
    2121
    2222    _stat = new Stat (static_cast<std::string>(_name),
    23                       "Counter",
     23                      _param->_type,
    2424                      param_statistics);
    2525   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_body.cpp

    r81 r113  
    1919    vhdl->set_body ("");
    2020   
    21     for (uint32_t i=0; i<_param._nb_port; i++)
     21    for (uint32_t i=0; i<_param->_nb_port; i++)
    2222      {
    2323        std::string counter_inc, counter_dec;
    2424
    25         if (_param._size_data > 1)
     25        if (_param->_size_data > 1)
    2626          {
    2727            counter_inc = "in_COUNTER_"+toString(i)+"_DATA+1";
     
    3535
    3636        vhdl->set_body ("out_COUNTER_"+toString(i)+"_DATA <=");
    37         if (_param._size_data > 1)
     37        if (_param->_size_data > 1)
    3838          {
    3939            vhdl->set_body ("\tin_COUNTER_"+toString(i)+"_DATA+1 when in_COUNTER_"+toString(i)+"_ADDSUB = '1' and in_COUNTER_"+toString(i)+"_DATA < cst_max else");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_declaration.cpp

    r81 r113  
    1919    log_printf(FUNC,Counter,"vhdl_declaration","Begin");
    2020   
    21     if (_param._size_data > 1)
     21    if (_param->_size_data > 1)
    2222      {
    23         vhdl->set_constant ("cst_min",_param._size_data,std_logic_others(_param._size_data,0));
    24         vhdl->set_constant ("cst_max",_param._size_data,std_logic_others(_param._size_data,1));
     23        vhdl->set_constant ("cst_min",_param->_size_data,std_logic_others(_param->_size_data,0));
     24        vhdl->set_constant ("cst_max",_param->_size_data,std_logic_others(_param->_size_data,1));
    2525      }
    2626
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Parameters.cpp

    r88 r113  
    1616  Parameters::Parameters (uint32_t size_data,
    1717                          uint32_t nb_port  ):
     18    behavioural::Parameters("Counter"),
    1819    _size_data(size_data),
    1920    _nb_port  (nb_port  ),
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Divider/Makefile.defs

    r112 r113  
    77#
    88
     9ENTITY                          = Divider
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Multiplier/Makefile.defs

    r112 r113  
    77#
    88
     9ENTITY                          = Multiplier
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Priority/Makefile.defs

    r88 r113  
    77#
    88
     9ENTITY                          = Priority
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = Queue
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/main.cpp

    r101 r113  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
    77
    8 #include "Behavioural/Generic/Queue/SelfTest/include/test.h"
     8#include "Behavioural/Generic/Queue/SelfTest/include/top.h"
    99
    10 #define NB_PARAMS 5
     10#ifndef MTI_SYSTEMC
     11# ifndef SYSTEMC
     12int main    (int argc, char * argv[])
     13# else
     14int sc_main (int argc, char * argv[])
     15# endif
     16{
     17  int _return = EXIT_SUCCESS;
    1118
    12 void usage (int argc, char * argv[])
    13 {
    14   cerr << "<Usage> " << argv[0] << " name_instance list_params" << endl
    15        << "list_params is :" << endl
    16        << " - size_queue      (uint32_t)" << endl
    17        << " - size_data       (uint32_t)" << endl
    18        << " - nb_port_slot    (uint32_t)" << endl
    19        << " - have_port_write (bool    )" << endl
    20        << " - have_port_read  (bool    )" << endl
    21        << "" << endl;
    22 
    23   for (int i=0; i<argc; i++)
    24     cerr << argv[i] << " ";
    25   cerr << endl;
    26 
    27   exit (1);
    28 }
    29 
    30 #ifndef SYSTEMC
    31 int main    (int argc, char * argv[])
    32 #else
    33 int sc_main (int argc, char * argv[])
    34 #endif
    35 {
    36   if (argc != 2+NB_PARAMS)
    37     usage (argc, argv);
    38 
    39   uint32_t       x = 1;
    40  
    41   const string   name            =      argv[x++];
    42   const uint32_t size_queue      = fromString<uint32_t>(argv[x++]);
    43   const uint32_t size_data       = fromString<uint32_t>(argv[x++]);
    44   const uint32_t nb_port_slot    = fromString<uint32_t>(argv[x++]);
    45   const bool     have_port_write = fromString<bool>(argv[x++]);
    46   const bool     have_port_read  = fromString<bool>(argv[x++]);
    4719  try
    4820    {
    49       morpheo::behavioural::generic::queue::Parameters * param = new morpheo::behavioural::generic::queue::Parameters
    50         (size_queue,
    51          size_data ,
    52          nb_port_slot,
    53          have_port_write,
    54          have_port_read
    55         );
    56      
    57       cout << param->print(1);
    58      
    59       test (name,param);
     21      top * my_top = new top ("my_top",argc,argv);
     22
     23      my_top->test();
     24
     25      delete my_top;
    6026    }
    6127  catch (morpheo::ErrorMorpheo & error)
    6228    {
    63       cout << "<" << name << "> : " <<  error.what ();
    64       exit (EXIT_FAILURE);
     29      msgError(_("%s\n"),error.what ());
     30      _return = EXIT_FAILURE;
    6531    }
    66   catch (...)
     32 
     33  try
    6734    {
    68       cerr << "<" << name << "> : This test must generate a error" << endl;
    69       exit (EXIT_FAILURE);
     35      if (_return == EXIT_SUCCESS)
     36        TEST_OK("Queue : no error");
     37      else
     38        TEST_KO("Queue : a lot of error");
     39    }
     40  catch (morpheo::ErrorMorpheo & error)
     41    {
     42//    msgError(_("<%s> :\n%s"),name.c_str(), error.what ());
     43      _return = EXIT_FAILURE;
    7044    }
    7145
    72   return (EXIT_SUCCESS);
     46  return _return;
    7347}
    74 
     48#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_test.cpp

    r111 r113  
    77 */
    88
    9 #define NB_ITERATION  1
    10 #define CYCLE_MAX     (2048*NB_ITERATION)
     9#include "Behavioural/Generic/Queue/SelfTest/include/top.h"
     10#include "Behavioural/include/Allocation.h"
    1111
    12 #include "Behavioural/Generic/Queue/SelfTest/include/test.h"
    13 #include "Behavioural/include/Allocation.h"
    14 #include "Common/include/Test.h"
    15 
    16 void test (string name,
    17            morpheo::behavioural::generic::queue::Parameters * _param)
     12void top::test (void)
    1813{
    19   cout << "<" << name << "> : Simulation SystemC" << endl;
    20 
    21 #ifdef STATISTICS
    22   morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50);
    23 #endif
    24 
    25   Tusage_t _usage = USE_ALL;
    26 
    27 //   _usage = usage_unset(_usage,USE_SYSTEMC              );
    28 //   _usage = usage_unset(_usage,USE_VHDL                 );
    29 //   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
    30 //   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
    31 //   _usage = usage_unset(_usage,USE_POSITION             );
    32 //   _usage = usage_unset(_usage,USE_STATISTICS           );
    33 //   _usage = usage_unset(_usage,USE_INFORMATION          );
    34 
    35   Queue * _Queue = new Queue
    36     (name.c_str(),
    37 #ifdef STATISTICS
    38      _parameters_statistics,
    39 #endif
    40      _param,
    41      _usage);
    42  
    4314#ifdef SYSTEMC
    44   /*********************************************************************
    45    * Déclarations des signaux
    46    *********************************************************************/
    47   string rename;
    48 
    49   sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    50   sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    51 
    52   ALLOC0_SC_SIGNAL( in_INSERT_VAL , "in_INSERT_VAL" ,Tcontrol_t);
    53   ALLOC0_SC_SIGNAL(out_INSERT_ACK ,"out_INSERT_ACK" ,Tcontrol_t);
    54   ALLOC0_SC_SIGNAL( in_INSERT_DATA, "in_INSERT_DATA",Tdata_t   );
    55   ALLOC0_SC_SIGNAL(out_RETIRE_VAL ,"out_RETIRE_VAL" ,Tcontrol_t);
    56   ALLOC0_SC_SIGNAL( in_RETIRE_ACK , "in_RETIRE_ACK" ,Tcontrol_t);
    57   ALLOC0_SC_SIGNAL(out_RETIRE_DATA,"out_RETIRE_DATA",Tdata_t   );
    58   ALLOC1_SC_SIGNAL(out_SLOT_VAL   ,"out_SLOT_VAL"   ,Tcontrol_t,_param->_nb_port_slot);
    59   ALLOC1_SC_SIGNAL(out_SLOT_DATA  ,"out_SLOT_DATA"  ,Tdata_t   ,_param->_nb_port_slot);
    60   ALLOC0_SC_SIGNAL(out_PTR_WRITE  ,"out_PTR_WRITE"  ,Tptr_t    );
    61   ALLOC0_SC_SIGNAL(out_PTR_READ   ,"out_PTR_READ"   ,Tptr_t    );
    62  
    63   /********************************************************
    64    * Instanciation
    65    ********************************************************/
    66  
    67   cout << "<" << name << "> Instanciation of _Queue" << endl;
    68  
    69   (*(_Queue->in_CLOCK))        (*(in_CLOCK));
    70   (*(_Queue->in_NRESET))       (*(in_NRESET));
    71 
    72   INSTANCE0_SC_SIGNAL(_Queue, in_INSERT_VAL );
    73   INSTANCE0_SC_SIGNAL(_Queue,out_INSERT_ACK );
    74   INSTANCE0_SC_SIGNAL(_Queue, in_INSERT_DATA);
    75   INSTANCE0_SC_SIGNAL(_Queue,out_RETIRE_VAL );
    76   INSTANCE0_SC_SIGNAL(_Queue, in_RETIRE_ACK );
    77   INSTANCE0_SC_SIGNAL(_Queue,out_RETIRE_DATA);
    78   INSTANCE1_SC_SIGNAL(_Queue,out_SLOT_VAL   ,_param->_nb_port_slot);
    79   INSTANCE1_SC_SIGNAL(_Queue,out_SLOT_DATA  ,_param->_nb_port_slot);
    80   if (_param->_have_port_ptr_write)
    81   INSTANCE0_SC_SIGNAL(_Queue,out_PTR_WRITE  );
    82   if (_param->_have_port_ptr_read )
    83   INSTANCE0_SC_SIGNAL(_Queue,out_PTR_READ   );
    84 
    85   cout << "<" << name << "> Start Simulation ............" << endl;
    86   Time * _time = new Time();
    87 
    88   /********************************************************
    89    * Simulation - Begin
    90    ********************************************************/
    91 
    92   // Initialisation
    93   const  int32_t percent_insert_transaction = 75;
    94   const  int32_t percent_retire_transaction = 75;
    95   const uint32_t nb_request = 3*_param->_size_queue;
    96 
    97   const uint32_t seed = 0;
    98 //const uint32_t seed = static_cast<uint32_t>(time(NULL));
    99 
    100   srand(seed);
    101 
    102   SC_START(0);
    103   LABEL("Initialisation");
    104 
    105   in_INSERT_VAL -> write(0);
    106   in_RETIRE_ACK -> write(0);
    107 
    108   LABEL("Reset");
    109   in_NRESET->write(0);
    110   SC_START(5);
    111   in_NRESET->write(1); 
    112 
    113   LABEL("Loop of Test");
    114 
    115   uint32_t data_in  = 0;
    116   uint32_t data_out = 0;
    117   uint32_t nb_elt   = 0;
    118 
    119   for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
     15  if (usage_is_set(_usage,USE_SYSTEMC))
    12016    {
    121       LABEL("Iteration %d",iteration);
    122 
    123       while (data_out <= nb_request)
    124         {
    125           in_INSERT_VAL  -> write((rand()%100)<percent_insert_transaction);
    126           in_INSERT_DATA -> write(data_in);
    127           in_RETIRE_ACK  -> write((rand()%100)<percent_retire_transaction);
    128 
    129           SC_START(0); // genMoore
    130 
    131           for (uint32_t i=0; i<_param->_nb_port_slot; ++i)
     17      msgInformation(_("<%s> : Start Simulation ............\n"),name.c_str());
     18     
     19      Time * _time = new Time();
     20     
     21      /********************************************************
     22       * Simulation - Begin
     23       ********************************************************/
     24     
     25      // Initialisation
     26      const  int32_t percent_insert_transaction = 75;
     27      const  int32_t percent_retire_transaction = 75;
     28      const uint32_t nb_request = 3*_param->_size_queue;
     29     
     30      const uint32_t seed = 0;
     31      //const uint32_t seed = static_cast<uint32_t>(time(NULL));
     32     
     33      srand(seed);
     34     
     35      SC_CYCLE(0);
     36      LABEL("Initialisation");
     37     
     38      in_INSERT_VAL -> write(0);
     39      in_RETIRE_ACK -> write(0);
     40     
     41      LABEL("Reset");
     42      in_NRESET->write(0);
     43      SC_CYCLE(5);
     44      in_NRESET->write(1); 
     45     
     46      LABEL("Loop of Test");
     47     
     48      uint32_t data_in  = 0;
     49      uint32_t data_out = 0;
     50      uint32_t nb_elt   = 0;
     51     
     52      for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
     53        {
     54          LABEL("Iteration %d",iteration);
     55         
     56          while (data_out <= nb_request)
    13257            {
    133               TEST(Tcontrol_t, out_SLOT_VAL [i]->read(), (i<nb_elt));
    134               if (i<nb_elt)
    135               TEST(Tdata_t   , out_SLOT_DATA[i]->read(), data_out+i);
    136                
     58              in_INSERT_VAL  -> write((rand()%100)<percent_insert_transaction);
     59              in_INSERT_DATA -> write(data_in);
     60              in_RETIRE_ACK  -> write((rand()%100)<percent_retire_transaction);
     61             
     62              SC_CYCLE(0); // genMoore
     63             
     64              for (uint32_t i=0; i<_param->_nb_port_slot; ++i)
     65                {
     66                  TEST(Tcontrol_t, out_SLOT_VAL [i]->read(), (i<nb_elt));
     67                  if (i<nb_elt)
     68                    TEST(Tdata_t   , out_SLOT_DATA[i]->read(), data_out+i);
     69                 
     70                }
     71             
     72              if ( in_INSERT_VAL->read() and out_INSERT_ACK->read())
     73                {
     74                  LABEL ("Transaction with interface : INSERT");
     75                  data_in ++;
     76                  nb_elt ++;
     77                }
     78              if (out_RETIRE_VAL->read() and  in_RETIRE_ACK->read())
     79                {
     80                  LABEL ("Transaction with interface : RETIRE");
     81                  TEST(Tdata_t, out_RETIRE_DATA->read(), data_out);
     82                  data_out++;
     83                  nb_elt --;
     84                }
     85             
     86              SC_CYCLE(1);
    13787            }
    138 
    139           if ( in_INSERT_VAL->read() and out_INSERT_ACK->read())
    140             {
    141               LABEL ("Transaction with interface : INSERT");
    142               data_in ++;
    143               nb_elt ++;
    144             }
    145           if (out_RETIRE_VAL->read() and  in_RETIRE_ACK->read())
    146             {
    147               LABEL ("Transaction with interface : RETIRE");
    148               TEST(Tdata_t, out_RETIRE_DATA->read(), data_out);
    149               data_out++;
    150               nb_elt --;
    151             }
    152 
    153           SC_START(1);
    154         }
     88        }
     89     
     90      /********************************************************
     91       * Simulation - End
     92       ********************************************************/
     93     
     94      TEST_OK ("");
     95     
     96      sc_stop();
     97      delete _time;
     98     
     99      msgInformation(_("<%s> : ............ Stop Simulation\n"),name.c_str());
    155100    }
    156 
    157   /********************************************************
    158    * Simulation - End
    159    ********************************************************/
    160 
    161   TEST_OK ("End of Simulation");
    162   delete _time;
    163   cout << "<" << name << "> ............ Stop Simulation" << endl;
    164 
    165   delete in_CLOCK;
    166   delete in_NRESET;
    167 
    168   DELETE0_SC_SIGNAL( in_INSERT_VAL );
    169   DELETE0_SC_SIGNAL(out_INSERT_ACK );
    170   DELETE0_SC_SIGNAL( in_INSERT_DATA);
    171   DELETE0_SC_SIGNAL(out_RETIRE_VAL );
    172   DELETE0_SC_SIGNAL( in_RETIRE_ACK );
    173   DELETE0_SC_SIGNAL(out_RETIRE_DATA);
    174   DELETE1_SC_SIGNAL(out_SLOT_VAL   ,_param->_nb_port_slot);
    175   DELETE1_SC_SIGNAL(out_SLOT_DATA  ,_param->_nb_port_slot);
    176   DELETE0_SC_SIGNAL(out_PTR_WRITE  );
    177   DELETE0_SC_SIGNAL(out_PTR_READ   );
    178 #endif
    179 
    180   delete _Queue;
    181 #ifdef STATISTICS
    182   delete _parameters_statistics;
    183101#endif
    184102}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Parameters.cpp

    r101 r113  
    2121                          bool     have_port_ptr_write,
    2222                          bool     have_port_ptr_read ):
     23    behavioural::Parameters("Queue"),
    2324    _size_queue          (size_queue),
    2425    _size_data           (size_data ),
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue.cpp

    r88 r113  
    3333    ,_usage            (usage)
    3434  {
    35     log_printf(FUNC,Queue,FUNCTION,"Begin");
     35    log_begin(Queue,FUNCTION);
     36   
     37// #if DEBUG_Core == true
     38//     log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str());
    3639
    37 #if DEBUG_Core == true
    38     log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str());
     40//     std::cout << *param << std::endl;
     41// #endif   
    3942
    40     std::cout << *param << std::endl;
    41 #endif   
    42 
    43     log_printf(INFO,Queue,FUNCTION,"Allocation");
     43    log_printf(INFO,Queue,FUNCTION,_("<%s> Allocation"),_name.c_str());
    4444    allocation ();
    4545
     
    4747    if (usage_is_set(_usage,USE_STATISTICS))
    4848      {
    49         log_printf(INFO,Queue,FUNCTION,"Allocation of statistics");
     49        log_printf(INFO,Queue,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str());
    5050       
    5151        statistics_declaration(param_statistics);
     
    5757      {
    5858        // generate the vhdl
    59         log_printf(INFO,Queue,FUNCTION,"Generate the vhdl");
     59        log_printf(INFO,Queue,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
    6060       
    6161        vhdl();
     
    6666    if (usage_is_set(_usage,USE_SYSTEMC))
    6767      {
    68         log_printf(INFO,Queue,FUNCTION,"Method - transition");
     68        log_printf(INFO,Queue,FUNCTION,_("<%s> Method - transition"),_name.c_str());
    6969       
    7070        SC_METHOD (transition);
     
    7676# endif   
    7777       
    78         log_printf(INFO,Queue,FUNCTION,"Method - genMoore");
     78        log_printf(INFO,Queue,FUNCTION,_("<%s> Method - genMoore"),_name.c_str());
    7979       
    8080        SC_METHOD (genMoore);
     
    8888#endif
    8989      }
    90     log_printf(FUNC,Queue,FUNCTION,"End");
     90    log_end(Queue,FUNCTION);
    9191  };
    9292 
     
    9595  Queue::~Queue (void)
    9696  {
    97     log_printf(FUNC,Queue,FUNCTION,"Begin");
     97    log_begin(Queue,FUNCTION);
    9898
    9999#ifdef STATISTICS
    100100    if (usage_is_set(_usage,USE_STATISTICS))
    101101      {
    102         log_printf(INFO,Queue,FUNCTION,"Generate Statistics file");
     102        log_printf(INFO,Queue,FUNCTION,_("<%s> Generate Statistics file"),_name.c_str());
    103103       
    104104        delete _stat;
     
    106106#endif
    107107
    108     log_printf(INFO,Queue,FUNCTION,"Deallocation");
     108    log_printf(INFO,Queue,FUNCTION,_("<%s> Deallocation"),_name.c_str());
    109109    deallocation ();
    110110
    111     log_printf(FUNC,Queue,FUNCTION,"End");
     111    log_end(Queue,FUNCTION);
    112112  };
    113113
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_allocation.cpp

    r112 r113  
    99#include "Behavioural/include/Allocation.h"
    1010
    11 namespace morpheo                    {
     11namespace morpheo {
    1212namespace behavioural {
    1313namespace generic {
    1414namespace queue {
    15 
    16 
    1715
    1816#undef  FUNCTION
     
    2523
    2624    Entity * entity = _component->set_entity (_name       
    27                                               ,"Queue"
     25                                              ,_param->_type
    2826#ifdef POSITION
    2927                                              ,COMBINATORY
     
    111109}; // end namespace queue
    112110}; // end namespace generic
    113 
    114111}; // end namespace behavioural
    115112}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_deallocation.cpp

    r101 r113  
    2121    log_printf(FUNC,Queue,FUNCTION,"Begin");
    2222
    23     if (usage_is_set(_usage,USE_SYSTEMC))
     23//     if (usage_is_set(_usage,USE_SYSTEMC))
    2424      {
    25         delete    in_CLOCK ;
    26         delete    in_NRESET;
     25        DELETE0_SIGNAL( in_CLOCK ,1);
     26        DELETE0_SIGNAL( in_NRESET,1);
    2727
    2828        DELETE0_SIGNAL( in_INSERT_VAL                        ,1);
     
    4141        if (_param->_have_port_ptr_read )
    4242        DELETE0_SIGNAL(out_PTR_READ    ,_param->_size_ptr);
     43      }
    4344       
    44         // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     45      if (usage_is_set(_usage,USE_SYSTEMC))
     46      {
     47        // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    4548        delete _queue_control;
    4649        delete _queue_data;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_statistics_declaration.cpp

    r81 r113  
    2121
    2222    _stat = new Stat (static_cast<std::string>(_name),
    23                       "Queue",
     23                      _param->_type,
    2424                      param_statistics);
    2525   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/Makefile

    r81 r113  
    88
    99#-----[ Directory ]----------------------------------------
    10 DIR_MORPHEO                     = ../../..
     10DIR_COMPONENT                   = ./
     11include                         $(DIR_COMPONENT)/Makefile.defs
    1112
    1213#-----[ Library ]------------------------------------------
    1314LIBRARY                         = $(DIR_LIB)/libQueue_Control.a
    1415
     16
    1517#-----[ include ]------------------------------------------
    1618
    17 all                             : $(LIBRARY_NEED)
     19all                             :
    1820                                @$(MAKE) all_component
    1921
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/Makefile.deps

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
     
    88# DIR_MORPHEO must be defined
    99
    10 Queue_Control                   = yes
     10Queue_Control                   = yes
    1111
    12 #-----[ Library ]------------------------------------------
    13 Queue_Control_LIBRARY           = -lQueue_Control
     12ifndef Behavioural
     13include                         $(DIR_MORPHEO)/Behavioural/Makefile.deps
     14endif
    1415
    15 Queue_Control_DIR_LIBRARY       = -L$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control/lib
     16#-----[ Library ]------------------------------------------
     17Queue_Control_LIBRARY           =       -lQueue_Control \
     18                                $(Behavioural_LIBRARY) 
    1619
    17 #-----[ Rules ]--------------------------------------------
     20Queue_Control_DIR_LIBRARY       =       -L$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control/lib  \
     21                                $(Behavioural_DIR_LIBRARY)
     22
     23#-----[ Rules ]--------------------------------------------
     24
     25#.NOTPARALLEL                   : Queue_Control_library Queue_Control_library_clean
    1826
    1927Queue_Control_library           :
    2028                                @\
    21                                 $(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control --makefile=Makefile ;
    22        
     29                                $(MAKE) Behavioural_library;\
     30                                $(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control --makefile=Makefile;
     31
    2332Queue_Control_library_clean     :
    2433                                @\
     34                                $(MAKE) Behavioural_library_clean;\
    2535                                $(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control --makefile=Makefile clean;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = RegisterFile
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = RegisterFile_Monolithic
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp

    r94 r113  
    159159      while (nb_ack < _param->_nb_word)
    160160        {
    161           cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
     161          cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
    162162
    163163          for (uint32_t num_port=0; num_port < _param->_nb_port_write; num_port ++)
     
    232232      while (nb_ack < _param->_nb_word)
    233233        {
    234           cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
     234          cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
    235235         
    236236          for (uint32_t num_port=0; num_port < _param->_nb_port_read; num_port ++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = RegisterFile_Multi_Banked
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/src/test.cpp

    r88 r113  
    136136      while (nb_ack < nb_request)
    137137        {
    138           cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
     138          cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
    139139
    140140          for (uint32_t num_port=0; num_port < _param->_nb_port_write; num_port ++)
     
    183183        while (nb_ack < nb_request)
    184184          {
    185             cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
     185            cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
    186186           
    187187            for (uint32_t num_port=0; num_port < _param->_nb_port_read; num_port ++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/src/test.cpp

    r88 r113  
    136136      while (nb_ack < nb_request)
    137137        {
    138           cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
     138          cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
    139139
    140140          for (uint32_t num_port=0; num_port < _param->_nb_port_write; num_port ++)
     
    184184          while (nb_ack < nb_request)
    185185            {
    186               cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
     186              cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
    187187             
    188188              for (uint32_t num_port=0; num_port < _param->_nb_port_read; num_port ++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = Select_Priority_Fixed
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp

    r97 r113  
    108108 
    109109  sc_start(0);
    110 //cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
     110//cout << "{"+toString(static_cast<uint32_t>(simulation_cycle()))+"} Initialisation" << endl;
    111111
    112   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl;
     112  cout << "{"+toString(static_cast<uint32_t>(simulation_cycle()))+"} Loop of Test" << endl;
    113113
    114114  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = Shifter
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/src/test.cpp

    r112 r113  
    147147          if (param._have_shift_logic_left)
    148148            {
    149               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Shift   Left  Logic" << endl;
     149              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Shift   Left  Logic" << endl;
    150150              direction = _left ;
    151151              type      = _shift;
     
    156156          else
    157157            {
    158               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Shift   Left  Logic" << endl;
     158              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Shift   Left  Logic" << endl;
    159159              continue;
    160160            }
     
    162162          if (param._have_shift_logic_right)
    163163            {
    164               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Shift   Right Logic" << endl;
     164              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Shift   Right Logic" << endl;
    165165              direction = _right;
    166166              type      = _shift;
     
    171171          else
    172172            {
    173               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Shift   Right Logic" << endl;
     173              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Shift   Right Logic" << endl;
    174174              continue;
    175175            }
     
    177177          if (param._have_shift_arithmetic_left)
    178178            {
    179               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Shift   Left  Arithmetic" << endl;
     179              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Shift   Left  Arithmetic" << endl;
    180180              direction = _left      ;
    181181              type      = _shift     ;
     
    186186          else
    187187            {
    188               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Shift   Left  Arithmetic" << endl;
     188              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Shift   Left  Arithmetic" << endl;
    189189              continue;
    190190            }
     
    192192          if (param._have_shift_arithmetic_right)
    193193            {
    194               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Shift   Right Arithmetic" << endl;
     194              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Shift   Right Arithmetic" << endl;
    195195              direction = _right;
    196196              type      = _shift;
     
    201201          else
    202202            {
    203               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Shift   Right Arithmetic" << endl;
     203              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Shift   Right Arithmetic" << endl;
    204204              continue;
    205205            }
     
    207207          if ( param._have_rotate_left)
    208208            {
    209               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Rotate  Left" << endl;
     209              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Rotate  Left" << endl;
    210210              direction = _left  ;
    211211              type      = _rotate;
     
    216216          else
    217217            {
    218               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Rotate  Left" << endl;
     218              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Rotate  Left" << endl;
    219219              continue;
    220220            }
     
    222222          if (param._have_rotate_right)
    223223            {
    224               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Rotate  Right" << endl;
     224              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Rotate  Right" << endl;
    225225              direction = _right;
    226226              type      = _rotate;
     
    231231          else
    232232            {
    233               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Rotate  Right" << endl;
     233              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Rotate  Right" << endl;
    234234              continue;
    235235            }
     
    283283              sc_start(0);
    284284             
    285               cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "}" << endl;
     285              cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "}" << endl;
    286286             
    287287              for (uint32_t i=0; i<param._nb_port; i++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Sort
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Makefile.defs

    r81 r113  
    77#
    88
     9ENTITY                          = Victim
     10
    911#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../..
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/Makefile.defs

    r81 r113  
    22# $Id$
    33#
    4 # [ Description ]
     4# [ Description ]
    55#
    66# Makefile
    77#
    88
    9 #-----[ Directory ]----------------------------------------
     9ENTITY                          = Victim_Pseudo_LRU
     10
     11#-----[ Directory ]----------------------------------------
    1012DIR_COMPONENT_MORPHEO           = ../../../..
    1113DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/test.cpp

    r95 r113  
    119119    for (uint32_t k=0; k<param._nb_entity; k++)
    120120      {
    121         cout << "time : " << static_cast<uint32_t>(sc_simulation_time()) << endl;
     121        cout << "time : " << static_cast<uint32_t>(simulation_cycle()) << endl;
    122122        for (uint32_t i=0; i<param._nb_access; i++)
    123123          {
     
    165165        {
    166166         
    167           cout << "time : " << static_cast<uint32_t>(sc_simulation_time()) << endl;
     167          cout << "time : " << static_cast<uint32_t>(simulation_cycle()) << endl;
    168168          for (uint32_t i=0; i<param._nb_access; i++)
    169169            {
Note: See TracChangeset for help on using the changeset viewer.