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/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • 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.