Ignore:
Timestamp:
Dec 10, 2008, 7:31:39 PM (16 years ago)
Author:
rosiere
Message:

Almost complete design
with Test and test platform

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Direction_Glue_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/src/main.cpp

    r81 r88  
    4949         _nb_inst_update  ,
    5050         _size_address    ,
    51          _size_history    );
     51         _size_history    ,
     52         true // is_toplevel
     53         );
    5254     
    5355      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/src/test.cpp

    r82 r88  
    2424#endif
    2525
     26  Tusage_t _usage = USE_ALL;
     27
     28//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     29//   _usage = usage_unset(_usage,USE_VHDL                 );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     31//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     32//   _usage = usage_unset(_usage,USE_POSITION             );
     33//   _usage = usage_unset(_usage,USE_STATISTICS           );
     34//   _usage = usage_unset(_usage,USE_INFORMATION          );
     35
    2636  Direction_Glue * _Direction_Glue = new Direction_Glue
    2737    (name.c_str(),
     
    3040#endif
    3141     _param,
    32      USE_ALL);
     42     _usage);
    3343 
    3444#ifdef SYSTEMC
     
    139149        {
    140150          in_PREDICT_VAL                 [i]->write(rand()%2);
    141           in_PREDICT_ADDRESS_SRC         [i]->write(range<Taddress_t>(rand(),_param->_size_address));
     151          in_PREDICT_ADDRESS_SRC         [i]->write(range<Taddress_t>(rand(),_param->_size_instruction_address));
    142152          in_PREDICT_STATIC              [i]->write(rand()%2);
    143153          in_PREDICT_LAST_TAKE           [i]->write(rand()%2);
     
    150160        {
    151161          in_UPDATE_VAL                  [i]->write(rand()%2);
    152           in_UPDATE_ADDRESS              [i]->write(range<Taddress_t>(rand(),_param->_size_address));
     162          in_UPDATE_ADDRESS              [i]->write(range<Taddress_t>(rand(),_param->_size_instruction_address));
    153163          in_UPDATE_HISTORY              [i]->write(range<Thistory_t>(rand(),_param->_size_history));
    154164          in_UPDATE_DIRECTION            [i]->write(rand()%2);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Parameters.h

    r81 r88  
    2929  public : uint32_t     _nb_inst_predict ;
    3030  public : uint32_t     _nb_inst_update  ;
    31   public : uint32_t     _size_address    ;
     31//public : uint32_t     _size_address    ;
    3232  public : uint32_t     _size_history    ;
    3333
     
    4040                        uint32_t     nb_inst_update  ,
    4141                        uint32_t     size_address    ,
    42                         uint32_t     size_history    );
     42                        uint32_t     size_history    ,
     43                        bool         is_toplevel=false
     44                        );
    4345    //   public : Parameters  (Parameters & param) ;
    4446  public : ~Parameters () ;
     47
     48  public :        void            copy       (void);
    4549
    4650  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue.cpp

    r81 r88  
    3939    log_printf(FUNC,Direction_Glue,FUNCTION,"Begin");
    4040
     41
     42#if DEBUG_Direction_Glue == true
     43    log_printf(INFO,Direction_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
     44
     45    std::cout << *param << std::endl;
     46#endif   
     47
    4148    log_printf(INFO,Direction_Glue,FUNCTION,"Allocation");
    4249
     
    4855
    4956#ifdef STATISTICS
    50     if (_usage & USE_STATISTICS)
     57    if (usage_is_set(_usage,USE_STATISTICS))
    5158      {
    5259        log_printf(INFO,Direction_Glue,FUNCTION,"Allocation of statistics");
     
    5764
    5865#ifdef VHDL
    59     if (_usage & USE_VHDL)
     66    if (usage_is_set(_usage,USE_VHDL))
    6067      {
    6168        // generate the vhdl
     
    6774
    6875#ifdef SYSTEMC
    69     if (_usage & USE_SYSTEMC)
     76    if (usage_is_set(_usage,USE_SYSTEMC))
    7077      {
    7178        bool need_genmealy_predict = true;
     
    238245
    239246#ifdef STATISTICS
    240     if (_usage & USE_STATISTICS)
     247    if (usage_is_set(_usage,USE_STATISTICS))
    241248      {
    242249        statistics_deallocation();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_allocation.cpp

    r81 r88  
    6363      ALLOC1_SIGNAL_IN ( in_PREDICT_VAL                  ,"val"                  ,Tcontrol_t,1);
    6464      ALLOC1_SIGNAL_OUT(out_PREDICT_ACK                  ,"ack"                  ,Tcontrol_t,1);
    65       ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS_SRC          ,"address_src"          ,Taddress_t,_param->_size_address);
     65      ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS_SRC          ,"address_src"          ,Taddress_t,_param->_size_instruction_address);
    6666      ALLOC1_SIGNAL_IN ( in_PREDICT_STATIC               ,"static"               ,Tcontrol_t,1);
    6767      ALLOC1_SIGNAL_IN ( in_PREDICT_LAST_TAKE            ,"last_take"            ,Tcontrol_t,1);
     
    7272      ALLOC1_SIGNAL_OUT(out_PREDICT_PREDICTOR_VAL        ,"predictor_val"        ,Tcontrol_t,1);
    7373      ALLOC1_SIGNAL_IN ( in_PREDICT_PREDICTOR_ACK        ,"predictor_ack"        ,Tcontrol_t,1);
    74       ALLOC1_SIGNAL_OUT(out_PREDICT_PREDICTOR_ADDRESS_SRC,"predictor_address_src",Taddress_t,_param->_size_address);
     74      ALLOC1_SIGNAL_OUT(out_PREDICT_PREDICTOR_ADDRESS_SRC,"predictor_address_src",Taddress_t,_param->_size_instruction_address);
    7575      ALLOC1_SIGNAL_IN ( in_PREDICT_PREDICTOR_HISTORY    ,"predictor_history"    ,Thistory_t,_param->_size_history);
    7676      ALLOC1_SIGNAL_IN ( in_PREDICT_PREDICTOR_DIRECTION  ,"predictor_direction"  ,Tcontrol_t,1);
     
    8484      ALLOC1_SIGNAL_IN ( in_UPDATE_VAL                ,"val"                ,Tcontrol_t,1);
    8585      ALLOC1_SIGNAL_OUT(out_UPDATE_ACK                ,"ack"                ,Tcontrol_t,1);
    86       ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS            ,"address"            ,Taddress_t,_param->_size_address);
     86      ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS            ,"address"            ,Taddress_t,_param->_size_instruction_address);
    8787      ALLOC1_SIGNAL_IN ( in_UPDATE_HISTORY            ,"history"            ,Thistory_t,_param->_size_history);
    8888      ALLOC1_SIGNAL_IN ( in_UPDATE_DIRECTION          ,"direction"          ,Tcontrol_t,1);
     
    9191      ALLOC1_SIGNAL_OUT(out_UPDATE_PREDICTOR_VAL      ,"predictor_val"      ,Tcontrol_t,1);
    9292      ALLOC1_SIGNAL_IN ( in_UPDATE_PREDICTOR_ACK      ,"predictor_ack"      ,Tcontrol_t,1);
    93       ALLOC1_SIGNAL_OUT(out_UPDATE_PREDICTOR_ADDRESS  ,"predictor_address"  ,Taddress_t,_param->_size_address);
     93      ALLOC1_SIGNAL_OUT(out_UPDATE_PREDICTOR_ADDRESS  ,"predictor_address"  ,Taddress_t,_param->_size_instruction_address);
    9494      ALLOC1_SIGNAL_OUT(out_UPDATE_PREDICTOR_HISTORY  ,"predictor_history"  ,Thistory_t,_param->_size_history);
    9595      ALLOC1_SIGNAL_OUT(out_UPDATE_PREDICTOR_DIRECTION,"predictor_direction",Tcontrol_t,1);
    9696        }
    9797    }
    98 
     98   
    9999    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    100100
    101101#ifdef POSITION
    102     _component->generate_file();
     102    if (usage_is_set(_usage,USE_POSITION))
     103      _component->generate_file();
    103104#endif
    104105
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_deallocation.cpp

    r81 r88  
    2424    log_printf(FUNC,Direction_Glue,FUNCTION,"Begin");
    2525
    26     if (_usage & USE_SYSTEMC)
     26    if (usage_is_set(_usage,USE_SYSTEMC))
    2727      {
    2828        delete    in_CLOCK ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_end_cycle.cpp

    r81 r88  
    2626
    2727#ifdef STATISTICS
    28     _stat->end_cycle();
     28    if (usage_is_set(_usage,USE_STATISTICS))
     29      _stat->end_cycle();
    2930#endif   
    3031
     
    3233    // Evaluation before read the ouput signal
    3334//  sc_start(0);
    34     _interfaces->testbench();
     35    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     36      _interfaces->testbench();
    3537#endif
    3638
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Parameters.cpp

    r81 r88  
    2323                          uint32_t     nb_inst_update  ,
    2424                          uint32_t     size_address    ,
    25                           uint32_t     size_history    )
     25                          uint32_t     size_history    ,
     26                          bool         is_toplevel     )
    2627  {
    2728    log_printf(FUNC,Direction_Glue,FUNCTION,"Begin");
     
    3031    _nb_inst_predict  = nb_inst_predict ;
    3132    _nb_inst_update   = nb_inst_update  ;
    32     _size_address     = size_address    ;
    3333
    3434    switch (predictor_scheme)
     
    5858
    5959    test();
     60
     61    if (is_toplevel)
     62      {
     63        _size_instruction_address = size_address;
     64
     65        copy();
     66      }
     67
    6068    log_printf(FUNC,Direction_Glue,FUNCTION,"End");
    6169  };
     
    7886  };
    7987
     88#undef  FUNCTION
     89#define FUNCTION "Direction_Glue::copy"
     90  void Parameters::copy (void)
     91  {
     92    log_printf(FUNC,Direction_Glue,FUNCTION,"Begin");
     93    log_printf(FUNC,Direction_Glue,FUNCTION,"End");
     94  };
     95
     96
     97
    8098}; // end namespace direction_glue
    8199}; // end namespace direction
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Parameters_print.cpp

    r81 r88  
    3131    xml.singleton_begin("nb_inst_predict "); xml.attribut("value",toString(_nb_inst_predict )); xml.singleton_end();
    3232    xml.singleton_begin("nb_inst_update  "); xml.attribut("value",toString(_nb_inst_update  )); xml.singleton_end();
    33     xml.singleton_begin("size_address    "); xml.attribut("value",toString(_size_address    )); xml.singleton_end();
     33//  xml.singleton_begin("size_address    "); xml.attribut("value",toString(_size_address    )); xml.singleton_end();
    3434    xml.singleton_begin("size_history    "); xml.attribut("value",toString(_size_history    )); xml.singleton_end();
    3535    xml.balise_close();
Note: See TracChangeset for help on using the changeset viewer.