Ignore:
Timestamp:
Mar 18, 2009, 11:36:26 PM (15 years ago)
Author:
rosiere
Message:

1) Stat_list : fix retire old and new register bug
2) Stat_list : remove read_counter and valid flag, because validation of destination is in retire step (not in commit step)
3) Model : add class Model (cf Morpheo.sim)
4) Allocation : alloc_interface_begin and alloc_interface_end to delete temporary array.
5) Script : add distexe.sh
6) Add Comparator, Multiplier, Divider. But this component are not implemented
7) Software : add Dhrystone

File:
1 edited

Legend:

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

    r111 r112  
    5858    // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5959    {
    60       ALLOC1_INTERFACE("branch_event", IN,SOUTH, "branch_event", _param->_nb_context);
     60      ALLOC1_INTERFACE_BEGIN("branch_event", IN,SOUTH, _("branch_event"), _param->_nb_context);
    6161     
    6262      ALLOC1_VALACK_IN ( in_BRANCH_EVENT_VAL                   ,VAL);
     
    6868      ALLOC1_SIGNAL_IN ( in_BRANCH_EVENT_ADDRESS_DEST_VAL      ,"address_dest_val"       ,Tcontrol_t         ,1);
    6969      ALLOC1_SIGNAL_IN ( in_BRANCH_EVENT_ADDRESS_DEST          ,"address_dest"           ,Taddress_t         ,_param->_size_instruction_address);
     70
     71      ALLOC1_INTERFACE_END(_param->_nb_context);
    7072    }
    7173
    7274    // ~~~~~[ Interface : "decod_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    7375    {
    74       ALLOC1_INTERFACE("decod_event",IN ,SOUTH, _("Decod Interface"), _param->_nb_decod_unit);
     76      ALLOC1_INTERFACE_BEGIN("decod_event",IN ,SOUTH, _("Decod Interface"), _param->_nb_decod_unit);
    7577
    7678      ALLOC1_VALACK_IN ( in_DECOD_EVENT_VAL                    ,VAL);
     
    8284      ALLOC1_SIGNAL_IN ( in_DECOD_EVENT_ADDRESS                ,"address"                ,Taddress_t         ,_param->_size_instruction_address);
    8385      ALLOC1_SIGNAL_IN ( in_DECOD_EVENT_ADDRESS_EPCR           ,"address_epcr"           ,Taddress_t         ,_param->_size_instruction_address);
     86
     87      ALLOC1_INTERFACE_END(_param->_nb_decod_unit);   
    8488    }
    8589
    8690    // ~~~~~[ Interface : "commit_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8791    {
    88       ALLOC_INTERFACE("commit_event",IN ,EAST, _("Interface with the Re Order Buffer"));
    89 
    90       ALLOC_VALACK_IN  ( in_COMMIT_EVENT_VAL                   ,VAL);
    91       ALLOC_VALACK_OUT (out_COMMIT_EVENT_ACK                   ,ACK);
    92       ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_CONTEXT_ID            ,"context_id"      ,Tcontext_t         ,_param->_size_context_id);
    93       ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_DEPTH                 ,"depth"           ,Tdepth_t           ,_param->_size_depth);
    94       ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_TYPE                  ,"type"            ,Tevent_type_t      ,_param->_size_event_type);
    95       ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_IS_DELAY_SLOT         ,"is_delay_slot"   ,Tcontrol_t         ,1);
    96       ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS               ,"address"         ,Taddress_t         ,_param->_size_instruction_address);
    97       ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL      ,"address_epcr_val",Tcontrol_t         ,1);
    98       ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EPCR          ,"address_epcr"    ,Taddress_t         ,_param->_size_instruction_address);
    99       ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ,"address_eear_val",Tcontrol_t         ,1);
    100       ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EEAR          ,"address_eear"    ,Tgeneral_data_t    ,_param->_size_general_data);
     92      ALLOC0_INTERFACE_BEGIN("commit_event",IN ,EAST, _("Interface with the Re Order Buffer"));
     93
     94      ALLOC0_VALACK_IN ( in_COMMIT_EVENT_VAL                   ,VAL);
     95      ALLOC0_VALACK_OUT(out_COMMIT_EVENT_ACK                   ,ACK);
     96      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_CONTEXT_ID            ,"context_id"      ,Tcontext_t         ,_param->_size_context_id);
     97      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_DEPTH                 ,"depth"           ,Tdepth_t           ,_param->_size_depth);
     98      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_TYPE                  ,"type"            ,Tevent_type_t      ,_param->_size_event_type);
     99      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_IS_DELAY_SLOT         ,"is_delay_slot"   ,Tcontrol_t         ,1);
     100      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS               ,"address"         ,Taddress_t         ,_param->_size_instruction_address);
     101      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL      ,"address_epcr_val",Tcontrol_t         ,1);
     102      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EPCR          ,"address_epcr"    ,Taddress_t         ,_param->_size_instruction_address);
     103      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ,"address_eear_val",Tcontrol_t         ,1);
     104      ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EEAR          ,"address_eear"    ,Tgeneral_data_t    ,_param->_size_general_data);
     105   
     106      ALLOC0_INTERFACE_END();
    101107    }
    102108
    103109    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    104110    {
    105       ALLOC1_INTERFACE("branch_complete",IN ,NORTH, _("Interface with the prediction_unit."), _param->_nb_inst_branch_complete);
     111      ALLOC1_INTERFACE_BEGIN("branch_complete",IN ,NORTH, _("Interface with the prediction_unit."), _param->_nb_inst_branch_complete);
    106112
    107113      ALLOC1_VALACK_IN ( in_BRANCH_COMPLETE_VAL                ,VAL);
     
    113119//    ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS_SRC        ,"address_src"    ,Taddress_t         ,_param->_size_instruction_address);
    114120//    ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS_DEST       ,"address_dest"   ,Taddress_t         ,_param->_size_instruction_address);
     121
     122      ALLOC1_INTERFACE_END(_param->_nb_inst_branch_complete);
    115123    }
    116124
    117125    // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    118126    {
    119       ALLOC1_INTERFACE("nb_inst",IN ,EAST, _("Interface to count in fligt present instruction."),_param->_nb_context);
     127      ALLOC1_INTERFACE_BEGIN("nb_inst",IN ,EAST, _("Interface to count in fligt present instruction."),_param->_nb_context);
    120128
    121129      ALLOC1_SIGNAL_IN ( in_NB_INST_DECOD_ALL                  ,"decod_all" ,Tcounter_t         ,_param->_size_nb_inst_decod);
    122130      ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_ALL                 ,"commit_all",Tcounter_t         ,_param->_size_nb_inst_commit);
    123131      ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_MEM                 ,"commit_mem",Tcounter_t         ,_param->_size_nb_inst_commit);
     132
     133      ALLOC1_INTERFACE_END(_param->_nb_context);
    124134    }
    125135
    126136    // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    127137    {
    128       ALLOC1_INTERFACE("event",OUT,WEST, _("An event occure : change PC address."), _param->_nb_context);
     138      ALLOC1_INTERFACE_BEGIN("event",OUT,WEST, _("An event occure : change PC address."), _param->_nb_context);
    129139     
    130140      ALLOC1_VALACK_OUT(out_EVENT_VAL                          ,VAL);
     
    137147      ALLOC1_SIGNAL_OUT(out_EVENT_DEPTH                        ,"depth"           ,Tdepth_t          ,_param->_size_depth);
    138148
     149      ALLOC1_INTERFACE_END(_param->_nb_context);
    139150    }
    140151
    141152    // ~~~~~[ Interface "spr_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    142153    {
    143       ALLOC1_INTERFACE("spr_event",OUT,WEST, _("An exception occure : write \"exception PC\"."), _param->_nb_context);
     154      ALLOC1_INTERFACE_BEGIN("spr_event",OUT,WEST, _("An exception occure : write \"exception PC\"."), _param->_nb_context);
    144155
    145156      ALLOC1_VALACK_OUT(out_SPR_EVENT_VAL                      ,VAL);
     
    150161      ALLOC1_SIGNAL_OUT(out_SPR_EVENT_SR_DSX                   ,"sr_dsx"   ,Tcontrol_t,1);
    151162      ALLOC1_SIGNAL_OUT(out_SPR_EVENT_SR_TO_ESR                ,"sr_to_esr",Tcontrol_t,1);
     163
     164      ALLOC1_INTERFACE_END(_param->_nb_context);
    152165    }
    153166
    154167    // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    155168    {
    156       ALLOC1_INTERFACE("context",OUT,SOUTH, _("To decod."), _param->_nb_context);
     169      ALLOC1_INTERFACE_BEGIN("context",OUT,SOUTH, _("To decod."), _param->_nb_context);
    157170     
    158171      ALLOC1_SIGNAL_OUT(out_CONTEXT_DECOD_ENABLE               ,"decod_enable",Tcontrol_t,1);
     172
     173      ALLOC1_INTERFACE_END(_param->_nb_context);
    159174    }
    160175
    161176    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    162177    {
    163       ALLOC1_INTERFACE("depth",IN ,NORTH, _("From prediction_unit."), _param->_nb_context);
     178      ALLOC1_INTERFACE_BEGIN("depth",IN ,NORTH, _("From prediction_unit."), _param->_nb_context);
    164179     
    165180      ALLOC1_SIGNAL_IN ( in_DEPTH_MIN                          ,"min" ,Tdepth_t,_param->_size_depth);
     181
     182      ALLOC1_INTERFACE_END(_param->_nb_context);
    166183    }
    167184
     
    169186    // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
    170187    {
    171       ALLOC1_INTERFACE("spr",IN,EAST,_("Interface with the special registerFile"),_param->_nb_context);
     188      ALLOC1_INTERFACE_BEGIN("spr",IN,EAST,_("Interface with the special registerFile"),_param->_nb_context);
    172189     
    173190      ALLOC1_SIGNAL_IN ( in_SPR_SR_IEE                         ,"SR_IEE",Tcontrol_t,1);
    174191      ALLOC1_SIGNAL_IN ( in_SPR_SR_EPH                         ,"SR_EPH",Tcontrol_t,1);
     192
     193      ALLOC1_INTERFACE_END(_param->_nb_context);
    175194    }
    176195
    177196    // ~~~~~[ Interface : "interrupt" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    178197    {
    179       ALLOC1_INTERFACE("interrupt",IN,NORTH,_("Interrupt Exception"),_param->_nb_context);
     198      ALLOC1_INTERFACE_BEGIN("interrupt",IN,NORTH,_("Interrupt Exception"),_param->_nb_context);
    180199
    181200      ALLOC1_SIGNAL_IN ( in_INTERRUPT_ENABLE                   ,"ENABLE",Tcontrol_t,1);
     201
     202      ALLOC1_INTERFACE_END(_param->_nb_context);
    182203    }
    183204
     
    186207     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    187208       
    188      reg_STATE                  = new context_state_t [_param->_nb_context];
    189      reg_EVENT_ADDRESS          = new Taddress_t      [_param->_nb_context];
    190      reg_EVENT_ADDRESS_EPCR     = new Taddress_t      [_param->_nb_context];
    191      reg_EVENT_ADDRESS_EPCR_VAL = new Tcontrol_t      [_param->_nb_context];
    192      reg_EVENT_ADDRESS_EEAR     = new Taddress_t      [_param->_nb_context];
    193      reg_EVENT_ADDRESS_EEAR_VAL = new Tcontrol_t      [_param->_nb_context];
    194      reg_EVENT_IS_DELAY_SLOT    = new Tcontrol_t      [_param->_nb_context];
    195      reg_EVENT_IS_DS_TAKE       = new Tcontrol_t      [_param->_nb_context];
    196      reg_EVENT_DEPTH            = new Tdepth_t        [_param->_nb_context];
    197      reg_INTERRUPT_ENABLE       = new Tcontrol_t      [_param->_nb_context];
     209     ALLOC1(reg_STATE                 ,context_state_t,_param->_nb_context);
     210     ALLOC1(reg_EVENT_ADDRESS         ,Taddress_t     ,_param->_nb_context);
     211     ALLOC1(reg_EVENT_ADDRESS_EPCR    ,Taddress_t     ,_param->_nb_context);
     212     ALLOC1(reg_EVENT_ADDRESS_EPCR_VAL,Tcontrol_t     ,_param->_nb_context);
     213     ALLOC1(reg_EVENT_ADDRESS_EEAR    ,Taddress_t     ,_param->_nb_context);
     214     ALLOC1(reg_EVENT_ADDRESS_EEAR_VAL,Tcontrol_t     ,_param->_nb_context);
     215     ALLOC1(reg_EVENT_IS_DELAY_SLOT   ,Tcontrol_t     ,_param->_nb_context);
     216     ALLOC1(reg_EVENT_IS_DS_TAKE      ,Tcontrol_t     ,_param->_nb_context);
     217     ALLOC1(reg_EVENT_DEPTH           ,Tdepth_t       ,_param->_nb_context);
     218     ALLOC1(reg_INTERRUPT_ENABLE      ,Tcontrol_t     ,_param->_nb_context);
    198219       
    199220     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    200      internal_BRANCH_EVENT_ACK    = new Tcontrol_t [_param->_nb_context];
    201      internal_DECOD_EVENT_ACK     = new Tcontrol_t [_param->_nb_decod_unit];
    202      internal_BRANCH_COMPLETE_ACK = new Tcontrol_t [_param->_nb_inst_branch_complete];
    203      internal_EVENT_VAL           = new Tcontrol_t [_param->_nb_context];
    204      internal_SPR_EVENT_VAL       = new Tcontrol_t [_param->_nb_context];
     221
     222     ALLOC1(internal_BRANCH_EVENT_ACK   ,Tcontrol_t,_param->_nb_context);
     223     ALLOC1(internal_DECOD_EVENT_ACK    ,Tcontrol_t,_param->_nb_decod_unit);
     224     ALLOC1(internal_BRANCH_COMPLETE_ACK,Tcontrol_t,_param->_nb_inst_branch_complete);
     225     ALLOC1(internal_EVENT_VAL          ,Tcontrol_t,_param->_nb_context);
     226     ALLOC1(internal_SPR_EVENT_VAL      ,Tcontrol_t,_param->_nb_context);
    205227      }
    206228
Note: See TracChangeset for help on using the changeset viewer.