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/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_allocation.cpp

    r88 r112  
    77
    88#include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    3637                                                         ,IN
    3738                                                         ,SOUTH,
    38                                                          "Generalist interface"
     39                                                         _("Generalist interface")
    3940#endif
    4041                                                         );
     
    4344     in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
    4445
    45     // ~~~~~[ Interface : "read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     46     // ~~~~~[ Interface : "read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     47     {
     48       ALLOC1_INTERFACE_BEGIN("read",IN,WEST,_("Interface Read"),_param->_nb_port_read);
    4649
    47      in_READ_VAL         = new SC_IN (Tcontrol_t) * [_param->_nb_port_read];
    48     out_READ_ACK         = new SC_OUT(Tcontrol_t) * [_param->_nb_port_read];
    49     if (_param->_have_port_address == true)
    50      in_READ_ADDRESS     = new SC_IN (Taddress_t) * [_param->_nb_port_read];
    51     out_READ_DATA        = new SC_OUT(Tdata_t   ) * [_param->_nb_port_read];
     50       ALLOC1_VALACK_IN ( in_READ_VAL    ,VAL);
     51       ALLOC1_VALACK_OUT(out_READ_ACK    ,ACK);
     52       ALLOC1_SIGNAL_IN ( in_READ_ADDRESS,"address",Taddress_t, _param->_size_address);
     53       ALLOC1_SIGNAL_OUT(out_READ_DATA   ,"data"   ,Tdata_t   , _param->_size_word);
    5254
    53     for (uint32_t i=0; i<_param->_nb_port_read; i++)
    54       {
    55         Interface_fifo * interface = _interfaces->set_interface("read_"+toString(i)
    56 #ifdef POSITION
    57                                                                 , IN 
    58                                                                 ,WEST
    59                                                                 , "Interface Read"
    60 #endif
    61                                                                 );
     55       ALLOC1_INTERFACE_END(_param->_nb_port_read);
     56     }
     57     
     58     // ~~~~~[ Interface : "write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     59     {
     60       ALLOC1_INTERFACE_BEGIN("write",IN,EAST,_("Interface Write"),_param->_nb_port_write);
    6261
    63          in_READ_VAL     [i]  = interface->set_signal_valack_in        ("val"    , VAL);
    64         out_READ_ACK     [i]  = interface->set_signal_valack_out       ("ack"    , ACK);
    65         if (_param->_have_port_address == true)
    66          in_READ_ADDRESS [i]  = interface->set_signal_in  <Taddress_t> ("address", static_cast<uint32_t>(log2(_param->_nb_word)));
    67         out_READ_DATA    [i]  = interface->set_signal_out <Tdata_t   > ("data"   , _param->_size_word);
    68       }
     62       ALLOC1_VALACK_IN ( in_WRITE_VAL    ,VAL);
     63       ALLOC1_VALACK_OUT(out_WRITE_ACK    ,ACK);
     64       ALLOC1_SIGNAL_IN ( in_WRITE_ADDRESS,"address",Taddress_t,_param->_size_address);
     65       ALLOC1_SIGNAL_IN ( in_WRITE_DATA   ,"data"   ,Tdata_t   ,_param->_size_word);
    6966
    70     // ~~~~~[ Interface : "write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    71 
    72      in_WRITE_VAL        = new SC_IN (Tcontrol_t) * [_param->_nb_port_write];
    73     out_WRITE_ACK        = new SC_OUT(Tcontrol_t) * [_param->_nb_port_write];
    74     if (_param->_have_port_address == true)
    75      in_WRITE_ADDRESS    = new SC_IN (Taddress_t) * [_param->_nb_port_write];
    76      in_WRITE_DATA       = new SC_IN (Tdata_t   ) * [_param->_nb_port_write];
    77    
    78     for (uint32_t i=0; i<_param->_nb_port_write; i++)
    79       {
    80         Interface_fifo * interface = _interfaces->set_interface("write_"+toString(i)
    81 #ifdef POSITION
    82                                                                 , IN 
    83                                                                 ,EAST
    84                                                                 , "Interface Write"
    85 #endif
    86                                                                 );
    87 
    88          in_WRITE_VAL     [i]  = interface->set_signal_valack_in        ("val"    , VAL);
    89         out_WRITE_ACK     [i]  = interface->set_signal_valack_out       ("ack"    , ACK);
    90         if (_param->_have_port_address == true)
    91          in_WRITE_ADDRESS [i]  = interface->set_signal_in  <Taddress_t> ("address", static_cast<uint32_t>(log2(_param->_nb_word)));
    92          in_WRITE_DATA    [i]  = interface->set_signal_in  <Tdata_t   > ("data"   , _param->_size_word);
     67       ALLOC1_INTERFACE_END(_param->_nb_port_write);
    9368      }
    9469
    9570    if (usage_is_set(_usage,USE_SYSTEMC))
    9671      {
    97     // ~~~~~[ Registers ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     72        // ~~~~~[ Registers ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     73        ALLOC2(reg_DATA,Tdata_t,_param->_nb_bank,_param->_nb_word);
    9874
    99     reg_DATA = new Tdata_t * [_param->_nb_bank];
    100 
    101     for (uint32_t i=0; i<_param->_nb_bank; i++)
    102       {
    103         reg_DATA [i] = new Tdata_t [_param->_nb_word];
    104       }
    105 
    106     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    107     internal_WRITE_VAL     = new bool       [_param->_nb_port_write];
    108     internal_WRITE_BANK    = new Taddress_t [_param->_nb_port_write];
    109     internal_WRITE_NUM_REG = new Taddress_t [_param->_nb_port_write];
     75        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     76        ALLOC1(internal_WRITE_VAL    ,bool      ,_param->_nb_port_write);
     77        ALLOC1(internal_WRITE_BANK   ,Taddress_t,_param->_nb_port_write);
     78        ALLOC1(internal_WRITE_NUM_REG,Taddress_t,_param->_nb_port_write);
    11079      }
    11180
    11281    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    113 
    11482#ifdef POSITION
    11583    if (usage_is_set(_usage,USE_POSITION))
    11684      _component->generate_file();
    11785#endif
    118 
     86   
    11987    log_printf(FUNC,RegisterFile_Multi_Banked,"allocation","End");
    12088  };
Note: See TracChangeset for help on using the changeset viewer.