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

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction.cpp

    r81 r88  
    3838    log_printf(FUNC,Direction,FUNCTION,"Begin");
    3939
     40#if DEBUG_Direction == true
     41    log_printf(INFO,Direction,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif
     45
    4046    log_printf(INFO,Direction,FUNCTION,"Allocation");
    4147
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    5157        log_printf(INFO,Direction,FUNCTION,"Allocation of statistics");
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
     
    6672
    6773#ifdef SYSTEMC
    68     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    6975      {
    7076        log_printf(INFO,Direction,FUNCTION,"Method - transition");
     
    9096
    9197#ifdef STATISTICS
    92     if (_usage & USE_STATISTICS)
     98    if (usage_is_set(_usage,USE_STATISTICS))
    9399      {
    94100        statistics_deallocation();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_allocation.cpp

    r82 r88  
    6363      ALLOC1_VALACK_IN ( in_PREDICT_VAL        ,VAL);
    6464      ALLOC1_VALACK_OUT(out_PREDICT_ACK        ,ACK);
    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);
     
    7676      ALLOC1_VALACK_IN ( in_UPDATE_VAL      ,VAL);
    7777      ALLOC1_VALACK_OUT(out_UPDATE_ACK      ,ACK);
    78       ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS  ,"address"  ,Taddress_t,_param->_size_address);
     78      ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS  ,"address"  ,Taddress_t,_param->_size_instruction_address);
    7979      ALLOC1_SIGNAL_IN ( in_UPDATE_HISTORY  ,"history"  ,Thistory_t,_param->_size_history);
    8080      ALLOC1_SIGNAL_IN ( in_UPDATE_DIRECTION,"direction",Tcontrol_t,1);
     
    182182
    183183#ifdef POSITION
    184     _component->generate_file();
     184    if (usage_is_set(_usage,USE_POSITION))
     185      _component->generate_file();
    185186#endif
    186187
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_deallocation.cpp

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

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

    r81 r88  
    2929                          uint32_t     pht_size_counter       [3],
    3030                          uint32_t     pht_nb_counter         [3],
    31                           uint32_t     pht_size_address_share [3])
     31                          uint32_t     pht_size_address_share [3],
     32                          bool         is_toplevel)
    3233  {
    3334    log_printf(FUNC,Direction,FUNCTION,"Begin");
     
    3637    _nb_inst_predict        = nb_inst_predict       ;
    3738    _nb_inst_update         = nb_inst_update        ;
    38     _size_address           = size_address          ;
     39//  _size_address           = size_address          ;
    3940   
    4041    for (uint32_t i=0; i<3; i++)
     
    141142    _have_port_history = (_size_history > 0);
    142143
     144    test();
     145
    143146    _param_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Parameters
    144147      (_predictor_scheme,
    145148       _nb_inst_predict ,
    146149       _nb_inst_update  ,
    147        _size_address    ,
     150        size_address    ,
    148151       _size_history    );
    149152
    150     test();
    151 
     153    if (is_toplevel)
     154      {
     155        _size_instruction_address = size_address;
     156
     157        copy ();
     158      }
     159   
    152160    log_printf(FUNC,Direction,FUNCTION,"End");
    153161  };
     
    172180  };
    173181
     182#undef  FUNCTION
     183#define FUNCTION "Direction::copy"
     184  void Parameters::copy (void)
     185  {
     186    log_printf(FUNC,Direction,FUNCTION,"Begin");
     187
     188    COPY(_param_glue);
     189
     190    log_printf(FUNC,Direction,FUNCTION,"End");
     191  };
     192
    174193}; // end namespace direction
    175194}; // end namespace prediction_unit
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Parameters_print.cpp

    r81 r88  
    3030    xml.singleton_begin("nb_inst_predict                   "); xml.attribut("value",toString(_nb_inst_predict )); xml.singleton_end();
    3131    xml.singleton_begin("nb_inst_update                    "); xml.attribut("value",toString(_nb_inst_update  )); xml.singleton_end();
    32     xml.singleton_begin("size_address                      "); xml.attribut("value",toString(_size_address    )); xml.singleton_end();
     32//  xml.singleton_begin("size_address                      "); xml.attribut("value",toString(_size_address    )); xml.singleton_end();
    3333
    3434    xml.comment("predictor_scheme : ");
Note: See TracChangeset for help on using the changeset viewer.