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

Legend:

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

    r81 r88  
    3737    log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin");
    3838
     39#if DEBUG_Ifetch_unit == true
     40    log_printf(INFO,Ifetch_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     41
     42    std::cout << *param << std::endl;
     43#endif   
     44
    3945    log_printf(INFO,Ifetch_unit,FUNCTION,"Allocation");
    4046
     
    4652
    4753#ifdef STATISTICS
    48     if (_usage & USE_STATISTICS)
     54    if (usage_is_set(_usage,USE_STATISTICS))
    4955      {
    5056        log_printf(INFO,Ifetch_unit,FUNCTION,"Allocation of statistics");
     
    5561
    5662#ifdef VHDL
    57     if (_usage & USE_VHDL)
     63    if (usage_is_set(_usage,USE_VHDL))
    5864      {
    5965        // generate the vhdl
     
    6571
    6672#ifdef SYSTEMC
    67     if (_usage & USE_SYSTEMC)
     73    if (usage_is_set(_usage,USE_SYSTEMC))
    6874      {
    6975        log_printf(INFO,Ifetch_unit,FUNCTION,"Method - transition");
     
    8995
    9096#ifdef STATISTICS
    91     if (_usage & USE_STATISTICS)
     97    if (usage_is_set(_usage,USE_STATISTICS))
    9298      {
    9399        statistics_deallocation();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit_allocation.cpp

    r85 r88  
    5757    // ~~~~~[ Interface "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5858    {
    59       ALLOC_INTERFACE("icache_req",OUT, WEST, "Instruction cache request.");
     59      ALLOC_INTERFACE("icache_req",OUT, WEST, _("Instruction cache request."));
    6060
    6161      ALLOC_VALACK_OUT(out_ICACHE_REQ_VAL      ,VAL);
    6262      ALLOC_VALACK_IN ( in_ICACHE_REQ_ACK      ,ACK);
    6363    //ALLOC_SIGNAL_OUT(out_ICACHE_REQ_THREAD_ID,"thread_id",Tcontext_t           ,_param->_size_context_id );
    64       ALLOC_SIGNAL_OUT(out_ICACHE_REQ_PACKET_ID,"packet_id",Tpacket_t            ,_param->_size_queue_ptr  );
    65       ALLOC_SIGNAL_OUT(out_ICACHE_REQ_ADDRESS  ,"address"  ,Ticache_instruction_t,_param->_size_address    );
     64      ALLOC_SIGNAL_OUT(out_ICACHE_REQ_PACKET_ID,"packet_id",Tpacket_t            ,_param->_size_ifetch_queue_ptr  );
     65      ALLOC_SIGNAL_OUT(out_ICACHE_REQ_ADDRESS  ,"address"  ,Ticache_instruction_t,_param->_size_instruction_address    );
    6666      ALLOC_SIGNAL_OUT(out_ICACHE_REQ_TYPE     ,"type"     ,Ticache_type_t       ,_param->_size_icache_type);
    6767    }
     
    6969    // ~~~~~[ Interface "icache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    7070    {
    71       ALLOC_INTERFACE("icache_rsp",IN , WEST, "Instruction cache respons.");
     71      ALLOC_INTERFACE("icache_rsp",IN , WEST, _("Instruction cache respons."));
    7272
    7373      ALLOC_VALACK_IN  ( in_ICACHE_RSP_VAL        ,VAL);
    7474      ALLOC_VALACK_OUT (out_ICACHE_RSP_ACK        ,ACK);
    7575    //ALLOC_SIGNAL_IN  ( in_ICACHE_RSP_THREAD_ID  ,"thread_id"  ,Tcontext_t           ,_param->_size_context_id  );
    76       ALLOC_SIGNAL_IN  ( in_ICACHE_RSP_PACKET_ID  ,"packet_id"  ,Tpacket_t            ,_param->_size_queue_ptr   );
     76      ALLOC_SIGNAL_IN  ( in_ICACHE_RSP_PACKET_ID  ,"packet_id"  ,Tpacket_t            ,_param->_size_ifetch_queue_ptr   );
    7777      ALLOC_SIGNAL_IN  ( in_ICACHE_RSP_ERROR      ,"error"      ,Ticache_error_t      ,_param->_size_icache_error);
    7878    }
    7979    {
    80       ALLOC1_INTERFACE("icache_rsp",IN , WEST, "Instruction cache respons.",_param->_nb_instruction);
     80      ALLOC1_INTERFACE("icache_rsp",IN , WEST, _("Instruction cache respons."),_param->_nb_instruction);
    8181
    8282      ALLOC1_SIGNAL_IN ( in_ICACHE_RSP_INSTRUCTION,"instruction",Ticache_instruction_t,_param->_size_instruction );
     
    8585    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8686    {
    87       ALLOC_INTERFACE("predict",OUT, NORTH, "Acces Instruction cache respons.");
     87      ALLOC_INTERFACE("predict",OUT, NORTH, _("Predict the next pc."));
    8888
    8989      ALLOC_VALACK_OUT (out_PREDICT_VAL                        ,VAL);
    9090      ALLOC_VALACK_IN  ( in_PREDICT_ACK                        ,ACK);
    91       ALLOC_SIGNAL_OUT (out_PREDICT_PC_PREVIOUS                ,"pc_previous"                ,Tgeneral_address_t,_param->_size_address);
    92       ALLOC_SIGNAL_OUT (out_PREDICT_PC_CURRENT                 ,"pc_current"                 ,Tgeneral_address_t,_param->_size_address);
     91      ALLOC_SIGNAL_OUT (out_PREDICT_PC_PREVIOUS                ,"pc_previous"                ,Tgeneral_address_t,_param->_size_instruction_address);
     92      ALLOC_SIGNAL_OUT (out_PREDICT_PC_CURRENT                 ,"pc_current"                 ,Tgeneral_address_t,_param->_size_instruction_address);
    9393      ALLOC_SIGNAL_OUT (out_PREDICT_PC_CURRENT_IS_DS_TAKE      ,"pc_current_is_ds_take"      ,Tcontrol_t        ,1);
    94       ALLOC_SIGNAL_IN  ( in_PREDICT_PC_NEXT                    ,"pc_next"                    ,Tgeneral_address_t,_param->_size_address);
     94      ALLOC_SIGNAL_IN  ( in_PREDICT_PC_NEXT                    ,"pc_next"                    ,Tgeneral_address_t,_param->_size_instruction_address);
    9595      ALLOC_SIGNAL_IN  ( in_PREDICT_PC_NEXT_IS_DS_TAKE         ,"pc_next_is_ds_take"         ,Tcontrol_t        ,1);
    96       ALLOC_SIGNAL_IN  ( in_PREDICT_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_instruction_ptr);
     96      ALLOC_SIGNAL_IN  ( in_PREDICT_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_inst_ifetch_ptr);
    9797      ALLOC_SIGNAL_IN  ( in_PREDICT_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t   ,_param->_size_branch_state);
    98       ALLOC_SIGNAL_IN  ( in_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_branch_update_prediction);
    99     }
    100     {
    101       ALLOC1_INTERFACE("predict",IN , NORTH, "Acces Instruction cache respons.",_param->_nb_instruction);
     98      ALLOC_SIGNAL_IN  ( in_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_depth);
     99    }
     100    {
     101      ALLOC1_INTERFACE("predict",IN , NORTH, _("Predict the next pc."),_param->_nb_instruction);
    102102
    103103      ALLOC1_SIGNAL_IN ( in_PREDICT_INSTRUCTION_ENABLE         ,"instruction_enable"         ,Tcontrol_t        ,1);
     
    106106    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    107107    {
    108       ALLOC_INTERFACE("decod",OUT , EAST, "Send bundle to the decod unit.");
     108      ALLOC_INTERFACE("decod",OUT , EAST, _("Send bundle to the decod unit."));
    109109
    110110    //ALLOC_SIGNAL_OUT (out_DECOD_CONTEXT_ID                 ,"context_id"                 ,Tcontext_t        ,_param->_size_context_id);
    111       ALLOC_SIGNAL_OUT (out_DECOD_ADDRESS                    ,"address"                    ,Tgeneral_address_t,_param->_size_address);
    112       ALLOC_SIGNAL_OUT (out_DECOD_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_instruction_ptr);
     111      ALLOC_SIGNAL_OUT (out_DECOD_ADDRESS                    ,"address"                    ,Tgeneral_address_t,_param->_size_instruction_address);
     112      ALLOC_SIGNAL_OUT (out_DECOD_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_inst_ifetch_ptr);
    113113      ALLOC_SIGNAL_OUT (out_DECOD_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t   ,_param->_size_branch_state);
    114       ALLOC_SIGNAL_OUT (out_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_branch_update_prediction);
     114      ALLOC_SIGNAL_OUT (out_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_depth);
    115115      ALLOC_SIGNAL_OUT (out_DECOD_EXCEPTION                  ,"exception"                  ,Texception_t      ,_param->_size_exception_ifetch);
    116116    }
    117117    {
    118       ALLOC1_INTERFACE("decod",OUT , EAST, "Send bundle to the decod unit.",_param->_nb_instruction);
     118      ALLOC1_INTERFACE("decod",OUT , EAST, _("Send bundle to the decod unit."),_param->_nb_instruction);
    119119
    120120      ALLOC1_VALACK_OUT(out_DECOD_VAL                        ,VAL);
     
    125125    // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    126126    {
    127       ALLOC_INTERFACE("event",IN , NORTH, "Event interface.");
    128 
    129       ALLOC_VALACK_IN ( in_EVENT_VAL    ,VAL);
    130       ALLOC_VALACK_OUT(out_EVENT_ACK    ,ACK);
    131       ALLOC_SIGNAL_IN ( in_EVENT_ADDRESS,"address",Tgeneral_address_t,_param->_size_address);
     127      ALLOC_INTERFACE("event",IN , NORTH, _("Event interface."));
     128
     129      ALLOC_VALACK_IN ( in_EVENT_VAL              ,VAL);
     130      ALLOC_VALACK_OUT(out_EVENT_ACK              ,ACK);
     131      ALLOC_SIGNAL_IN ( in_EVENT_ADDRESS          ,"address"         ,Tgeneral_address_t,_param->_size_instruction_address);
     132      ALLOC_SIGNAL_IN ( in_EVENT_ADDRESS_NEXT     ,"address_next"    ,Tgeneral_address_t,_param->_size_instruction_address);
     133      ALLOC_SIGNAL_IN ( in_EVENT_ADDRESS_NEXT_VAL ,"address_next_val",Tcontrol_t,1);
     134      ALLOC_SIGNAL_IN ( in_EVENT_IS_DS_TAKE       ,"is_ds_take"      ,Tcontrol_t,1);
    132135    }
    133136   
     
    137140    {
    138141      name = _name+"_address_management";
    139       std::cout << "Create   : " << name << std::endl;
     142      log_printf(Ifetch_unit,Core,FUNCTION,_("Create   : %s"),name.c_str());
    140143     
    141144      _component_address_management = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::address_management::Address_management
     
    156159    {
    157160      name = _name+"_ifetch_queue";
    158       std::cout << "Create   : " << name << std::endl;
     161      log_printf(Ifetch_unit,Core,FUNCTION,_("Create   : %s"),name.c_str());
    159162     
    160163      _component_ifetch_queue = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::Ifetch_queue
     
    175178    {
    176179      name = _name+"_ifetch_unit_glue";
    177       std::cout << "Create   : " << name << std::endl;
     180      log_printf(Ifetch_unit,Core,FUNCTION,_("Create   : %s"),name.c_str());
    178181     
    179182      _component_ifetch_unit_glue = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_unit_glue::Ifetch_unit_Glue
     
    200203    {
    201204      src = _name+"_address_management";
    202       std::cout << "Instance : " << src << std::endl;
     205      log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    203206           
    204207      {
     
    225228          }
    226229
    227         if (_param->_have_port_instruction_ptr)
     230        if (_param->_have_port_inst_ifetch_ptr)
    228231        COMPONENT_MAP(_component,src ,"out_ADDRESS_INST_IFETCH_PTR"            ,
    229232                                 dest, "in_ADDRESS_INST_IFETCH_PTR"            );
    230233        COMPONENT_MAP(_component,src ,"out_ADDRESS_BRANCH_STATE"               ,
    231234                                 dest, "in_ADDRESS_BRANCH_STATE"               );
    232         if (_param->_have_port_branch_update_prediction_id)
     235        if (_param->_have_port_depth)
    233236        COMPONENT_MAP(_component,src ,"out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID",
    234237                                 dest, "in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID");
     
    281284        PORT_MAP(_component,src , "in_PREDICT_PC_NEXT_IS_DS_TAKE"         
    282285                           ,dest, "in_PREDICT_PC_NEXT_IS_DS_TAKE"         );
    283         if (_param->_have_port_instruction_ptr)
     286        if (_param->_have_port_inst_ifetch_ptr)
    284287        PORT_MAP(_component,src , "in_PREDICT_INST_IFETCH_PTR"           
    285288                           ,dest, "in_PREDICT_INST_IFETCH_PTR"            );
    286289        PORT_MAP(_component,src , "in_PREDICT_BRANCH_STATE"               
    287290                           ,dest, "in_PREDICT_BRANCH_STATE"               );
    288         if (_param->_have_port_branch_update_prediction_id)
     291        if (_param->_have_port_depth)
    289292        PORT_MAP(_component,src , "in_PREDICT_BRANCH_UPDATE_PREDICTION_ID"
    290293                           ,dest, "in_PREDICT_BRANCH_UPDATE_PREDICTION_ID");
     
    306309
    307310        dest = _name;
    308         PORT_MAP(_component,src , "in_EVENT_ADDRESS",dest, "in_EVENT_ADDRESS");
     311        PORT_MAP(_component,src , "in_EVENT_ADDRESS"         ,dest , "in_EVENT_ADDRESS"          );
     312        PORT_MAP(_component,src , "in_EVENT_ADDRESS_NEXT"    ,dest , "in_EVENT_ADDRESS_NEXT"     );
     313        PORT_MAP(_component,src , "in_EVENT_ADDRESS_NEXT_VAL",dest , "in_EVENT_ADDRESS_NEXT_VAL" );
     314        PORT_MAP(_component,src , "in_EVENT_IS_DS_TAKE"      ,dest , "in_EVENT_IS_DS_TAKE"       );
    309315      }
    310316    }
     
    315321    {
    316322      src = _name+"_ifetch_queue";
    317       std::cout << "Instance : " << src << std::endl;
     323      log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    318324           
    319325      {
     
    335341#endif
    336342
    337         if (_param->_have_port_queue_ptr)
     343        if (_param->_have_port_ifetch_queue_ptr)
    338344        PORT_MAP(_component,src ,"out_ADDRESS_IFETCH_QUEUE_ID"            ,
    339345                            dest,"out_ICACHE_REQ_PACKET_ID"               );
     
    386392
    387393        PORT_MAP(_component,src ,"out_DECOD_ADDRESS"                    ,dest,"out_DECOD_ADDRESS"                    );
    388         if (_param->_have_port_instruction_ptr)
     394        if (_param->_have_port_inst_ifetch_ptr)
    389395        PORT_MAP(_component,src ,"out_DECOD_INST_IFETCH_PTR"            ,dest,"out_DECOD_INST_IFETCH_PTR"            );
    390396        PORT_MAP(_component,src ,"out_DECOD_BRANCH_STATE"               ,dest,"out_DECOD_BRANCH_STATE"               );
    391         if (_param->_have_port_branch_update_prediction_id)
     397        if (_param->_have_port_depth)
    392398        PORT_MAP(_component,src ,"out_DECOD_BRANCH_UPDATE_PREDICTION_ID",dest,"out_DECOD_BRANCH_UPDATE_PREDICTION_ID");
    393399        PORT_MAP(_component,src ,"out_DECOD_EXCEPTION"                  ,dest,"out_DECOD_EXCEPTION"                  );
     
    404410        PORT_MAP(_component,src , "in_ICACHE_RSP_VAL"      ,dest, "in_ICACHE_RSP_VAL"      );
    405411        PORT_MAP(_component,src ,"out_ICACHE_RSP_ACK"      ,dest,"out_ICACHE_RSP_ACK"      );
    406         if (_param->_have_port_queue_ptr)
     412        if (_param->_have_port_ifetch_queue_ptr)
    407413        PORT_MAP(_component,src , "in_ICACHE_RSP_PACKET_ID",dest, "in_ICACHE_RSP_PACKET_ID");
    408414        PORT_MAP(_component,src , "in_ICACHE_RSP_ERROR"    ,dest, "in_ICACHE_RSP_ERROR"    );
     
    437443    {
    438444      src = _name+"_ifetch_unit_glue";
    439       std::cout << "Instance : " << src << std::endl;
     445      log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    440446           
    441447      {
     
    490496
    491497    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    492     if (DEBUG_Ifetch_unit == true)
    493       _component->test_map();
    494 
    495 #ifdef POSITION
    496     _component->generate_file();
     498#if DEBUG_Ifetch_unit == true
     499    _component->test_map();
     500#endif
     501   
     502#ifdef POSITION
     503    if (usage_is_set(_usage,USE_POSITION))
     504      _component->generate_file();
    497505#endif
    498506
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit_deallocation.cpp

    r81 r88  
    2222    log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin");
    2323
    24     if (_usage & USE_SYSTEMC)
     24    if (usage_is_set(_usage,USE_SYSTEMC))
    2525      {
    2626        delete     in_CLOCK ;
     
    3030        delete     in_ICACHE_REQ_ACK                      ;
    3131      //delete    out_ICACHE_REQ_THREAD_ID                ;
    32         if (_param->_have_port_queue_ptr)
     32        if (_param->_have_port_ifetch_queue_ptr)
    3333        delete    out_ICACHE_REQ_PACKET_ID                ;
    3434        delete    out_ICACHE_REQ_ADDRESS                  ;
     
    3838        delete    out_ICACHE_RSP_ACK                      ;
    3939      //delete     in_ICACHE_RSP_THREAD_ID                ;
    40         if (_param->_have_port_queue_ptr)
     40        if (_param->_have_port_ifetch_queue_ptr)
    4141        delete     in_ICACHE_RSP_PACKET_ID                ;
    4242        delete []  in_ICACHE_RSP_INSTRUCTION              ;
     
    5151        delete     in_PREDICT_PC_NEXT_IS_DS_TAKE          ;
    5252        delete []  in_PREDICT_INSTRUCTION_ENABLE          ;
    53         if (_param->_have_port_instruction_ptr)
     53        if (_param->_have_port_inst_ifetch_ptr)
    5454        delete     in_PREDICT_INST_IFETCH_PTR             ;
    5555        delete     in_PREDICT_BRANCH_STATE                ;
    56         if (_param->_have_port_branch_update_prediction_id)
     56        if (_param->_have_port_depth)
    5757        delete     in_PREDICT_BRANCH_UPDATE_PREDICTION_ID ;
    5858
     
    6262      //delete    out_DECOD_CONTEXT_ID                    ;
    6363        delete    out_DECOD_ADDRESS                       ;
    64         if (_param->_have_port_instruction_ptr)
     64        if (_param->_have_port_inst_ifetch_ptr)
    6565        delete    out_DECOD_INST_IFETCH_PTR               ;
    6666        delete    out_DECOD_BRANCH_STATE                  ;
    67         if (_param->_have_port_branch_update_prediction_id)
     67        if (_param->_have_port_depth)
    6868        delete    out_DECOD_BRANCH_UPDATE_PREDICTION_ID   ;
    6969        delete    out_DECOD_EXCEPTION                     ;
     
    7272        delete    out_EVENT_ACK                           ;
    7373        delete     in_EVENT_ADDRESS                       ;
     74        delete     in_EVENT_ADDRESS_NEXT                  ;
     75        delete     in_EVENT_ADDRESS_NEXT_VAL              ;
     76        delete     in_EVENT_IS_DS_TAKE                    ;
    7477      }
    7578    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit_end_cycle.cpp

    r81 r88  
    2424
    2525#ifdef STATISTICS
    26     _stat->end_cycle();
     26    if (usage_is_set(_usage,USE_STATISTICS))
     27      _stat->end_cycle();
    2728#endif   
    2829
     
    3031    // Evaluation before read the ouput signal
    3132//  sc_start(0);
    32     _interfaces->testbench();
     33    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     34      _interfaces->testbench();
    3335#endif
    3436
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Parameters.cpp

    r85 r88  
    2121                          uint32_t nb_instruction               ,
    2222                          uint32_t size_branch_update_prediction,
    23                           uint32_t size_address                 )
     23                          uint32_t size_address                 ,
     24                          bool     is_toplevel
     25                          )
    2426  {
    2527    log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin");
     
    2729    _size_queue                            = size_queue                   ;
    2830    _nb_instruction                        = nb_instruction               ;
    29     _size_branch_update_prediction         = size_branch_update_prediction;
    30     _size_address                          = size_address                 ;
    31 
    32     _size_queue_ptr                        = log2(size_queue);
    33     _size_instruction_ptr                  = log2(nb_instruction);
    34 
    35     _have_port_queue_ptr                   = _size_queue_ptr > 0;
    36     _have_port_instruction_ptr             = _size_instruction_ptr > 0;
    37     _have_port_branch_update_prediction_id = size_branch_update_prediction > 0;
     31//  _size_branch_update_prediction         = size_branch_update_prediction;
     32//  _size_address                          = size_address                 ;
    3833
    3934    test();
     
    5045    _param_ifetch_unit_glue   = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_unit_glue::  Parameters
    5146      (size_address);
    52    
     47
     48    if (is_toplevel)
     49      {
     50        _size_instruction_address   = size_address;
     51        _size_ifetch_queue_ptr      = log2(size_queue);
     52        _size_inst_ifetch_ptr       = log2(nb_instruction);
     53        _size_depth                 = size_branch_update_prediction;
     54
     55        _have_port_ifetch_queue_ptr = _size_ifetch_queue_ptr > 0;
     56        _have_port_inst_ifetch_ptr  = _size_inst_ifetch_ptr > 0;
     57        _have_port_depth            = _size_depth > 0;
     58
     59        copy ();
     60      }
     61
    5362    log_printf(FUNC,Ifetch_unit,FUNCTION,"End");
    5463  };
     
    7483  };
    7584
     85#undef  FUNCTION
     86#define FUNCTION "Ifetch_unit::copy"
     87  void Parameters::copy (void)
     88  {
     89    log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin");
     90   
     91    COPY(_param_address_management);
     92    COPY(_param_ifetch_queue      );
     93    COPY(_param_ifetch_unit_glue  );
     94
     95    log_printf(FUNC,Ifetch_unit,FUNCTION,"End");
     96  };
     97
    7698}; // end namespace ifetch_unit
    7799}; // end namespace front_end
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Parameters_print.cpp

    r81 r88  
    2323    log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin");
    2424
    25     XML xml ("ifetch_unit");
     25//     XML xml ("ifetch_unit");
    2626
    27     xml.balise_open("ifetch_unit");
    28     xml.singleton_begin("size_queue                   "); xml.attribut("value",toString(_size_queue                   )); xml.singleton_end();
    29     xml.singleton_begin("nb_instruction               "); xml.attribut("value",toString(_nb_instruction               )); xml.singleton_end();
    30     xml.singleton_begin("size_branch_update_prediction"); xml.attribut("value",toString(_size_branch_update_prediction)); xml.singleton_end();
    31     xml.singleton_begin("size_address                 "); xml.attribut("value",toString(_size_address                 )); xml.singleton_end();
    32     xml.balise_close();
     27//     xml.balise_open("ifetch_unit");
     28//     xml.singleton_begin("size_queue                   "); xml.attribut("value",toString(_size_queue                   )); xml.singleton_end();
     29//     xml.singleton_begin("nb_instruction               "); xml.attribut("value",toString(_nb_instruction               )); xml.singleton_end();
     30// //  xml.singleton_begin("size_branch_update_prediction"); xml.attribut("value",toString(_size_branch_update_prediction)); xml.singleton_end();
     31// //  xml.singleton_begin("size_address                 "); xml.attribut("value",toString(_size_address                 )); xml.singleton_end();
     32//     xml.balise_close();
     33
     34//     return xml.get_body(depth);
     35
     36    std::string str = "";
    3337
    3438    log_printf(FUNC,Ifetch_unit,FUNCTION,"End");
     39
     40    return str;
    3541   
    36     return xml.get_body(depth);
    3742  };
    3843
Note: See TracChangeset for help on using the changeset viewer.