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_Monolithic/src/RegisterFile_Monolithic_allocation.cpp

    r109 r112  
    77
    88#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    3334                                                         , IN
    3435                                                         ,SOUTH
    35                                                          , "Generalist interface"
     36                                                         ,_("Generalist interface")
    3637#endif
    3738                                                         );
     
    4041      in_NRESET             = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
    4142    }
     43
    4244    // ~~~~~[ Interface : "read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     45    {
     46      ALLOC1_INTERFACE_BEGIN("read",IN,WEST,_("Interface Read"),_param->_nb_port_read);
    4347
    44      in_READ_VAL         = new SC_IN (Tcontrol_t) * [_param->_nb_port_read];
    45     out_READ_ACK         = new SC_OUT(Tcontrol_t) * [_param->_nb_port_read];
    46     if (_param->_have_port_address)
    47      in_READ_ADDRESS     = new SC_IN (Taddress_t) * [_param->_nb_port_read];
    48     out_READ_DATA        = new SC_OUT(Tdata_t   ) * [_param->_nb_port_read];
     48      ALLOC1_VALACK_IN ( in_READ_VAL    ,VAL);
     49      ALLOC1_VALACK_OUT(out_READ_ACK    ,ACK);
     50      ALLOC1_SIGNAL_IN ( in_READ_ADDRESS,"address",Taddress_t,_param->_size_address);
     51      ALLOC1_SIGNAL_OUT(out_READ_DATA   ,"data"   ,Tdata_t   ,_param->_size_word);
    4952
    50     for (uint32_t i=0; i<_param->_nb_port_read; i++)
    51       {
    52         Interface_fifo * interface = _interfaces->set_interface("read_"+toString(i)
    53 #ifdef POSITION
    54                                                                 , IN 
    55                                                                 ,WEST
    56                                                                 , "Interface Read"
    57 #endif
    58                                                                 );
    59 
    60          in_READ_VAL     [i]  = interface->set_signal_valack_in        ("val"    , VAL);
    61         out_READ_ACK     [i]  = interface->set_signal_valack_out       ("ack"    , ACK);
    62         if (_param->_have_port_address)
    63          in_READ_ADDRESS [i]  = interface->set_signal_in  <Taddress_t> ("address", _param->_size_address);
    64         out_READ_DATA    [i]  = interface->set_signal_out <Tdata_t   > ("data"   , _param->_size_word);
    65       }
     53      ALLOC1_INTERFACE_END(_param->_nb_port_read);
     54    }
    6655
    6756    // ~~~~~[ Interface : "write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     57    {
     58      ALLOC1_INTERFACE_BEGIN("write",IN,EAST,_("Interface Write"),_param->_nb_port_write);
    6859
    69      in_WRITE_VAL        = new SC_IN (Tcontrol_t) * [_param->_nb_port_write];
    70     out_WRITE_ACK        = new SC_OUT(Tcontrol_t) * [_param->_nb_port_write];
    71     if (_param->_have_port_address)
    72      in_WRITE_ADDRESS    = new SC_IN (Taddress_t) * [_param->_nb_port_write];
    73      in_WRITE_DATA       = new SC_IN (Tdata_t   ) * [_param->_nb_port_write];
    74    
    75     for (uint32_t i=0; i<_param->_nb_port_write; i++)
    76       {
    77         Interface_fifo * interface = _interfaces->set_interface("write_"+toString(i)
    78 #ifdef POSITION
    79                                                                 , IN 
    80                                                                 ,EAST
    81                                                                 , "Interface Write"
    82 #endif
    83                                                                 );
     60      ALLOC1_VALACK_IN ( in_WRITE_VAL    ,VAL);
     61      ALLOC1_VALACK_OUT(out_WRITE_ACK    ,ACK);
     62      ALLOC1_SIGNAL_IN ( in_WRITE_ADDRESS,"address",Taddress_t,_param->_size_address);
     63      ALLOC1_SIGNAL_IN ( in_WRITE_DATA   ,"data"   ,Tdata_t   ,_param->_size_word);
    8464
    85          in_WRITE_VAL     [i]  = interface->set_signal_valack_in        ("val"    , VAL);
    86         out_WRITE_ACK     [i]  = interface->set_signal_valack_out       ("ack"    , ACK);
    87         if (_param->_have_port_address)
    88          in_WRITE_ADDRESS [i]  = interface->set_signal_in  <Taddress_t> ("address", _param->_size_address);
    89          in_WRITE_DATA    [i]  = interface->set_signal_in  <Tdata_t   > ("data"   , _param->_size_word);
    90       }
     65      ALLOC1_INTERFACE_END(_param->_nb_port_write);
     66    }
    9167
    9268    // ~~~~~[ Interface : "read_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     69    {
     70      ALLOC1_INTERFACE_BEGIN("read_write",IN,WEST,_("Interface Read_Write"),_param->_nb_port_read_write);
    9371
    94      in_READ_WRITE_VAL         = new SC_IN (Tcontrol_t) * [_param->_nb_port_read_write];
    95     out_READ_WRITE_ACK         = new SC_OUT(Tcontrol_t) * [_param->_nb_port_read_write];
    96      in_READ_WRITE_RW          = new SC_IN (Tcontrol_t) * [_param->_nb_port_read_write];
    97     if (_param->_have_port_address)
    98      in_READ_WRITE_ADDRESS     = new SC_IN (Taddress_t) * [_param->_nb_port_read_write];
    99      in_READ_WRITE_WDATA       = new SC_IN (Tdata_t   ) * [_param->_nb_port_read_write];
    100     out_READ_WRITE_RDATA       = new SC_OUT(Tdata_t   ) * [_param->_nb_port_read_write];
     72      ALLOC1_VALACK_IN ( in_READ_WRITE_VAL    ,VAL);
     73      ALLOC1_VALACK_OUT(out_READ_WRITE_ACK    ,ACK);
     74      ALLOC1_SIGNAL_IN ( in_READ_WRITE_RW     ,"rw"     ,Tcontrol_t,1);
     75      ALLOC1_SIGNAL_IN ( in_READ_WRITE_ADDRESS,"address",Taddress_t,_param->_size_address);
     76      ALLOC1_SIGNAL_IN ( in_READ_WRITE_WDATA  ,"wdata"  ,Tdata_t   ,_param->_size_word);
     77      ALLOC1_SIGNAL_OUT(out_READ_WRITE_RDATA  ,"rdata"  ,Tdata_t   ,_param->_size_word);
    10178
    102     for (uint32_t i=0; i<_param->_nb_port_read_write; i++)
    103       {
    104         Interface_fifo * interface = _interfaces->set_interface("read_write_"+toString(i)
    105 #ifdef POSITION
    106                                                                 , IN 
    107                                                                 ,WEST
    108                                                                 , "Interface Read_Write"
    109 #endif
    110                                                                 );
     79      ALLOC1_INTERFACE_END(_param->_nb_port_read_write);
     80    }
    11181
    112          in_READ_WRITE_VAL     [i]  = interface->set_signal_valack_in        ("val"    , VAL);
    113         out_READ_WRITE_ACK     [i]  = interface->set_signal_valack_out       ("ack"    , ACK);
    114          in_READ_WRITE_RW      [i]  = interface->set_signal_valack_in        ("rw"     , VAL);
    115         if (_param->_have_port_address)
    116          in_READ_WRITE_ADDRESS [i]  = interface->set_signal_in  <Taddress_t> ("address", _param->_size_address);
    117          in_READ_WRITE_WDATA   [i]  = interface->set_signal_in  <Tdata_t   > ("wdata"  , _param->_size_word);
    118         out_READ_WRITE_RDATA   [i]  = interface->set_signal_out <Tdata_t   > ("rdata"  , _param->_size_word);
    119       }
    120 
    121     // ----- Register
    12282    if (usage_is_set(_usage,USE_SYSTEMC))
    123       reg_DATA = new Tdata_t [_param->_nb_word];
     83      ALLOC1(reg_DATA,Tdata_t,_param->_nb_word);
    12484   
    12585#ifdef POSITION
Note: See TracChangeset for help on using the changeset viewer.