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

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic
Files:
142 added
26 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/include/test.h

    r81 r112  
    1414#include <iostream>
    1515
     16#include "Common/include/Time.h"
    1617#include "Behavioural/Generic/Counter/include/Counter.h"
    1718
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp

    r88 r112  
    8080    }
    8181
     82  Time * _time = new Time();
     83
    8284  /********************************************************
    8385   * Simulation - Begin
     
    147149   ********************************************************/
    148150
     151  delete _time;
     152
    149153  cout << "<" << name << "> ............ Stop Simulation" << endl;
    150154
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp

    r88 r112  
    77
    88#include "Behavioural/Generic/Counter/include/Counter.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    3435                                                         , IN 
    3536                                                         , SOUTH
    36                                                          , "Generalist interface"
     37                                                         , _("Generalist interface")
    3738#endif
    3839                                                         );
     
    4344
    4445    // ~~~~~[ Interface : "counter" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    45      {
    46         in_COUNTER_DATA  = new SC_IN (Tdata_t)    * [_param._nb_port];
    47         in_COUNTER_ADDSUB= new SC_IN (Tcontrol_t) * [_param._nb_port];
    48        out_COUNTER_DATA  = new SC_OUT(Tdata_t)    * [_param._nb_port];
    49        
    50        for (uint32_t i=0; i<_param._nb_port; i++)
    51          {
    52            Interface_fifo * interface = _interfaces->set_interface("counter_"+toString(i)
    53 #ifdef POSITION
    54                                                                    , IN 
    55                                                                    , SOUTH
    56                                                                    , "Counter interface"
    57 #endif
    58                                                                    );
     46    {
     47      ALLOC1_INTERFACE_BEGIN("counter", IN, SOUTH, _("Counter interface"), _param._nb_port);
    5948           
    60             in_COUNTER_DATA   [i] = interface->set_signal_in  <Tdata_t   > ("data"  , _param._size_data);
    61             in_COUNTER_ADDSUB [i] = interface->set_signal_in  <Tcontrol_t> ("addsub", 1                );
    62            out_COUNTER_DATA   [i] = interface->set_signal_out <Tdata_t   > ("data"  , _param._size_data);
    63          }
    64      }
     49      ALLOC1_SIGNAL_IN ( in_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param._size_data);
     50      ALLOC1_SIGNAL_IN ( in_COUNTER_ADDSUB,"addsub",Tcontrol_t,1                );
     51      ALLOC1_SIGNAL_OUT(out_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param._size_data);
    6552
     53      ALLOC1_INTERFACE_END(_param._nb_port);
     54    }
     55   
    6656#ifdef POSITION
    6757     if (usage_is_set(_usage,USE_POSITION))
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_deallocation.cpp

    r88 r112  
    77
    88#include "Behavioural/Generic/Counter/include/Counter.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    2324        delete     in_NRESET;
    2425       
    25         delete []  in_COUNTER_DATA  ;
    26         delete []  in_COUNTER_ADDSUB;
    27         delete [] out_COUNTER_DATA  ;
     26        DELETE1_SIGNAL( in_COUNTER_DATA  , _param._nb_port,_param._size_data);
     27        DELETE1_SIGNAL( in_COUNTER_ADDSUB, _param._nb_port,1                );
     28        DELETE1_SIGNAL(out_COUNTER_DATA  , _param._nb_port,_param._size_data);
    2829      }
    2930
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_allocation.cpp

    r109 r112  
    4949    // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5050    {
    51       ALLOC0_INTERFACE("insert", IN, WEST, _("Interface of data write."));
     51      ALLOC0_INTERFACE_BEGIN("insert", IN, WEST, _("Interface of data write."));
    5252     
    5353      ALLOC0_VALACK_IN ( in_INSERT_VAL  ,VAL);
    5454      ALLOC0_VALACK_OUT(out_INSERT_ACK  ,ACK);
    5555      ALLOC0_SIGNAL_IN ( in_INSERT_DATA ,"data",Tdata_t,_param->_size_data);
     56
     57      ALLOC0_INTERFACE_END();
    5658    }
    5759
    5860    // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5961    {
    60       ALLOC0_INTERFACE("retire", OUT, EAST, _("Interface of data read."));
     62      ALLOC0_INTERFACE_BEGIN("retire", OUT, EAST, _("Interface of data read."));
    6163     
    6264      ALLOC0_VALACK_OUT(out_RETIRE_VAL  ,VAL);
    6365      ALLOC0_VALACK_IN ( in_RETIRE_ACK  ,ACK);
    6466      ALLOC0_SIGNAL_OUT(out_RETIRE_DATA ,"data",Tdata_t,_param->_size_data);
     67
     68      ALLOC0_INTERFACE_END();
    6569    }
    6670
    6771    // ~~~~~[ Interface "slot" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    6872    {
    69       ALLOC1_INTERFACE("slot", OUT, NORTH, _("Internal slot."),_param->_nb_port_slot);
     73      ALLOC1_INTERFACE_BEGIN("slot", OUT, NORTH, _("Internal slot."),_param->_nb_port_slot);
    7074     
    7175      ALLOC1_VALACK_OUT(out_SLOT_VAL  ,VAL);
    7276      ALLOC1_SIGNAL_OUT(out_SLOT_DATA ,"data",Tdata_t,_param->_size_data);
     77
     78      ALLOC1_INTERFACE_END(_param->_nb_port_slot);
    7379    }
    7480
     
    7682    if (_param->_have_port_ptr)
    7783    {
    78       ALLOC0_INTERFACE("ptr", OUT, SOUTH, _("Internal pointer."));
     84      ALLOC0_INTERFACE_BEGIN("ptr", OUT, SOUTH, _("Internal pointer."));
    7985     
    8086      if (_param->_have_port_ptr_write)
     
    8288      if (_param->_have_port_ptr_read )
    8389      ALLOC0_SIGNAL_OUT(out_PTR_READ  ,"read" ,Tptr_t,_param->_size_ptr);
     90
     91      ALLOC0_INTERFACE_END();
    8492    }
    8593     
  • 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
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_deallocation.cpp

    r88 r112  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
    77
    88#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    2223        delete    in_CLOCK;
    2324        delete    in_NRESET;
    24         // ----- Interface Read
    25         delete []  in_READ_VAL    ;
    26         delete [] out_READ_ACK    ;
    27         if (_param->_have_port_address)
    28         delete []  in_READ_ADDRESS;
    29         delete [] out_READ_DATA   ;
    30        
    31         // ----- Interface Write
    32         delete []  in_WRITE_VAL    ;
    33         delete [] out_WRITE_ACK    ;
    34         if (_param->_have_port_address)
    35         delete []  in_WRITE_ADDRESS;
    36         delete []  in_WRITE_DATA   ;
    37        
    38         // ----- Interface Read_Write
    39         delete []  in_READ_WRITE_VAL    ;
    40         delete [] out_READ_WRITE_ACK    ;
    41         delete []  in_READ_WRITE_RW     ;
    42         if (_param->_have_port_address)
    43         delete []  in_READ_WRITE_ADDRESS;
    44         delete []  in_READ_WRITE_WDATA  ;
    45         delete [] out_READ_WRITE_RDATA  ;
    46        
    47         // ----- Register
    48         delete [] reg_DATA;
     25
     26        DELETE1_SIGNAL( in_READ_VAL     ,_param->_nb_port_read,1);
     27        DELETE1_SIGNAL(out_READ_ACK     ,_param->_nb_port_read,1);
     28        DELETE1_SIGNAL( in_READ_ADDRESS ,_param->_nb_port_read,_param->_size_address);
     29        DELETE1_SIGNAL(out_READ_DATA    ,_param->_nb_port_read,_param->_size_word);
     30       
     31        DELETE1_SIGNAL( in_WRITE_VAL    ,_param->_nb_port_write,1);
     32        DELETE1_SIGNAL(out_WRITE_ACK    ,_param->_nb_port_write,1);
     33        DELETE1_SIGNAL( in_WRITE_ADDRESS,_param->_nb_port_write,_param->_size_address);
     34        DELETE1_SIGNAL( in_WRITE_DATA   ,_param->_nb_port_write,_param->_size_word);
     35       
     36        DELETE1_SIGNAL( in_READ_WRITE_VAL    ,_param->_nb_port_read_write,1);
     37        DELETE1_SIGNAL(out_READ_WRITE_ACK    ,_param->_nb_port_read_write,1);
     38        DELETE1_SIGNAL( in_READ_WRITE_RW     ,_param->_nb_port_read_write,1);
     39        DELETE1_SIGNAL( in_READ_WRITE_ADDRESS,_param->_nb_port_read_write,_param->_size_address);
     40        DELETE1_SIGNAL( in_READ_WRITE_WDATA  ,_param->_nb_port_read_write,_param->_size_word);
     41        DELETE1_SIGNAL(out_READ_WRITE_RDATA  ,_param->_nb_port_read_write,_param->_size_word);
     42       
     43        DELETE1(reg_DATA,_param->_nb_word);
    4944      }
    5045  };
  • 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  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_deallocation.cpp

    r88 r112  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
    77
    88#include "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    2324        delete in_CLOCK;
    2425        delete in_NRESET;
     26     
     27        DELETE1_SIGNAL( in_READ_VAL     ,_param->_nb_port_read,1);
     28        DELETE1_SIGNAL(out_READ_ACK     ,_param->_nb_port_read,1);
     29        DELETE1_SIGNAL( in_READ_ADDRESS ,_param->_nb_port_read,_param->_size_address);
     30        DELETE1_SIGNAL(out_READ_DATA    ,_param->_nb_port_read,_param->_size_word);
    2531       
    26         // ----- Interface Read
    27         delete []  in_READ_VAL    ;
    28         delete [] out_READ_ACK    ;
    29         if (_param->_have_port_address == true)
    30         delete []  in_READ_ADDRESS;
    31         delete [] out_READ_DATA   ;
     32        DELETE1_SIGNAL( in_WRITE_VAL    ,_param->_nb_port_write,1);
     33        DELETE1_SIGNAL(out_WRITE_ACK    ,_param->_nb_port_write,1);
     34        DELETE1_SIGNAL( in_WRITE_ADDRESS,_param->_nb_port_write,_param->_size_address);
     35        DELETE1_SIGNAL( in_WRITE_DATA   ,_param->_nb_port_write,_param->_size_word);
    3236       
    33         // ----- Interface Write
    34         delete []  in_WRITE_VAL    ;
    35         delete [] out_WRITE_ACK    ;
    36         if (_param->_have_port_address == true)
    37         delete []  in_WRITE_ADDRESS;
    38         delete []  in_WRITE_DATA   ;
     37        DELETE2(reg_DATA                ,_param->_nb_bank,_param->_nb_word);
    3938       
    40         // ----- Register
    41         delete [] reg_DATA;
    42        
    43         // ----- Internal
    44         delete [] internal_WRITE_VAL;
    45         delete [] internal_WRITE_BANK;
    46         delete [] internal_WRITE_NUM_REG;
     39        DELETE1(internal_WRITE_VAL      ,_param->_nb_port_write);
     40        DELETE1(internal_WRITE_BANK     ,_param->_nb_port_write);
     41        DELETE1(internal_WRITE_NUM_REG  ,_param->_nb_port_write);
    4742      }       
    4843
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/include/test.h

    r81 r112  
    1515#include <sys/time.h>
    1616
     17#include "Common/include/Time.h"
    1718#include "Behavioural/Generic/RegisterFile/include/RegisterFile.h"
    1819
     
    2627              morpheo::behavioural::generic::registerfile::Parameters * param);
    2728
    28 class Time
    29 {
    30 private : timeval time_begin;
    31 // private : timeval time_end;
    32  
    33 public  : Time ()
    34   {
    35     gettimeofday(&time_begin     ,NULL);
    36   };
    37 
    38 public  : ~Time ()
    39   {
    40     cout << *this;
    41   };
    42 
    43 public  : friend ostream& operator<< (ostream& output_stream,
    44                                       const Time & x)
    45   {
    46     timeval time_end;
    47    
    48     gettimeofday(&time_end       ,NULL);
    49    
    50     uint32_t nb_cycles = static_cast<uint32_t>(sc_simulation_time());
    51 
    52     double average = static_cast<double>(nb_cycles) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec);
    53    
    54     output_stream << nb_cycles << "\t(" << average << " cycles / seconds )" << endl;
    55 
    56     return output_stream;
    57   }
    58 };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/RegisterFile.h

    r82 r112  
    5353
    5454  public    : Component                      * _component;
     55  private   : Interfaces                     * _interfaces;
    5556
    5657#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_allocation.cpp

    r88 r112  
    77
    88#include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo{
     
    3536                                                            ,IN 
    3637                                                            ,WEST
    37                                                             ,"Generalist interface"
     38                                                            ,_("Generalist interface")
    3839#endif
    3940                                                            );
     
    4142     in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_NO);
    4243     in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_NO);
     44     
     45     {
     46       ALLOC1_INTERFACE_BEGIN("",IN,SOUTH,_("select interface"),_param->_nb_entity);
    4347
    44      in_VAL          = new SC_IN (Tcontrol_t)           * [_param->_nb_entity];
    45     if (_param->_encoding_one_hot)
    46     out_ACK          = new SC_OUT(Tcontrol_t)           * [_param->_nb_entity];
     48       ALLOC1_SIGNAL_IN ( in_VAL       ,"val"       ,Tcontrol_t,1);
     49       if (_param->_encoding_one_hot)
     50       ALLOC1_SIGNAL_OUT(out_ACK       ,"ack"       ,Tcontrol_t,1);
    4751
    48     for (uint32_t i=0; i<_param->_nb_entity; i++)
    49       {
    50          in_VAL [i]    = interface->set_signal_in  <Tcontrol_t> ("val_"+toString(i),1);
    51         if (_param->_encoding_one_hot)
    52         out_ACK [i]    = interface->set_signal_out <Tcontrol_t> ("ack_"+toString(i),1);
    53       }
     52       ALLOC1_INTERFACE_END(_param->_nb_entity);
     53     }
    5454
    55     if (_param->_encoding_compact)
    56       {
    57         out_ENTITY     = interface->set_signal_out <Tentity_t > ("entity"    , _param->_size_entity);
    58         out_ENTITY_ACK = interface->set_signal_out <Tcontrol_t> ("entity_ack", 1);
    59       }
     55     if (_param->_encoding_compact)
     56     {
     57       ALLOC0_INTERFACE_BEGIN("",OUT,SOUTH,_("select interface"));
    6058
    61     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     59       ALLOC0_SIGNAL_OUT(out_ENTITY    ,"entity"    ,Tentity_t ,_param->_size_entity);
     60       ALLOC0_SIGNAL_OUT(out_ENTITY_ACK,"entity_ack",Tcontrol_t,1);
     61
     62       ALLOC0_INTERFACE_END();
     63     }
     64
     65    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    6266
    6367#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_deallocation.cpp

    r88 r112  
    77
    88#include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    2425        delete     in_NRESET;
    2526       
    26         delete []  in_VAL;
    27         if (_param->_encoding_one_hot)
    28           delete [] out_ACK;
    29        
    30         if (_param->_encoding_compact)
    31           {
    32             delete    out_ENTITY;
    33             delete    out_ENTITY_ACK;
    34           }
     27        DELETE1_SIGNAL( in_VAL       ,_param->_nb_entity,1);
     28        if (_param->_encoding_one_hot)
     29        DELETE1_SIGNAL(out_ACK       ,_param->_nb_entity,1);
     30        if (_param->_encoding_compact)
     31          {
     32        DELETE0_SIGNAL(out_ENTITY    ,_param->_size_entity);
     33        DELETE0_SIGNAL(out_ENTITY_ACK,1);
     34          }
    3535      }
     36
    3637    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    3738   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/include/test.h

    r81 r112  
    1414#include <iostream>
    1515
     16#include "Common/include/Time.h"
    1617#include "Behavioural/Generic/Shifter/include/Shifter.h"
    1718
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/src/test.cpp

    r88 r112  
    9999      (*(_Shifter->out_SHIFTER_DATA      [i])) (SHIFTER_DATA_OUT  [i]);
    100100    }
     101
     102  Time * _time = new Time();
    101103
    102104  /********************************************************
     
    309311   * Simulation - End
    310312   ********************************************************/
     313  delete _time;
    311314
    312315  cout << "<" << name << "> ............ Stop Simulation" << endl;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Parameters.h

    r88 r112  
    2929  public : const uint32_t    _size_data_completion;
    3030  public : const bool        _type_completion_bool;
     31
     32  public : const uint32_t    _size_shift        ;
    3133
    3234  public : const bool        _internal_direction;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters.cpp

    r88 r112  
    2929    _size_data_completion          ((carry != external_completion)?0:((_shift_value==0)?size_data:_shift_value)),
    3030    _type_completion_bool          (type_completion_bool),
     31
     32    _size_shift                    (static_cast<uint32_t>(ceil(log2(_size_data)))),
    3133
    3234    _internal_direction            ((direction == internal_right_shift)?_right :_left      ),
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_allocation.cpp

    r88 r112  
    77
    88#include "Behavioural/Generic/Shifter/include/Shifter.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    3334                                                              , IN 
    3435                                                              , SOUTH
    35                                                               , "Generalist interface"
     36                                                              , _("Generalist interface")
    3637#endif
    3738                                                              );
     
    4344   
    4445    {
    45       // Interface "shifter"
    46        in_SHIFTER_DATA      = new SC_IN (Tdata_t)      * [_param->_nb_port];
     46      ALLOC1_INTERFACE_BEGIN("shifter", IN, SOUTH,_("Generalist interface"),_param->_nb_port);
     47     
     48      ALLOC1_SIGNAL_IN ( in_SHIFTER_DATA       ,"data"      ,Tdata_t     ,_param->_size_data);
    4749      if (_param->_shift_value == 0)
    48        in_SHIFTER_SHIFT     = new SC_IN (Tshift_t)     * [_param->_nb_port];
    49       if (_param->_direction   == external_direction)
    50        in_SHIFTER_DIRECTION = new SC_IN (Tdirection_t) * [_param->_nb_port];
    51       if (_param->_rotate      == external_rotate)
    52        in_SHIFTER_TYPE      = new SC_IN (Ttype_t)      * [_param->_nb_port];
    53       if (_param->_carry       == external_carry)
    54        in_SHIFTER_CARRY     = new SC_IN (Tcarry_t)     * [_param->_nb_port];
    55       if (_param->_carry       == external_completion)
     50      ALLOC1_SIGNAL_IN ( in_SHIFTER_SHIFT      ,"shift"     ,Tshift_t    ,_param->_size_shift);
     51      if (_param->_direction == external_direction)
     52      ALLOC1_SIGNAL_IN ( in_SHIFTER_DIRECTION  ,"direction" ,Tdirection_t,1);
     53      if (_param->_rotate == external_rotate)
     54      ALLOC1_SIGNAL_IN ( in_SHIFTER_TYPE       ,"type"      ,Ttype_t     ,1);
     55      if (_param->_carry == external_carry)
     56      ALLOC1_SIGNAL_IN ( in_SHIFTER_CARRY      ,"carry"     ,Tcarry_t    ,1);
     57      if (_param->_carry == external_completion)
     58      {
    5659      if (_param->_type_completion_bool == true)
    57        in_SHIFTER_CARRY_IN  = new SC_IN (Tcontrol_t)   * [_param->_nb_port];
     60        {
     61      ALLOC1_SIGNAL_IN ( in_SHIFTER_CARRY_IN   ,"carry_in"  ,Tcontrol_t  ,1);
     62        }
    5863      else
    59        in_SHIFTER_COMPLETION= new SC_IN (Tdata_t)      * [_param->_nb_port];
    60       out_SHIFTER_DATA      = new SC_OUT(Tdata_t)      * [_param->_nb_port];
     64        {
     65      ALLOC1_SIGNAL_IN ( in_SHIFTER_COMPLETION ,"completion",Tdata_t     ,_param->_size_data_completion);
     66        }
     67      }
     68      ALLOC1_SIGNAL_OUT(out_SHIFTER_DATA       ,"data"      ,Tdata_t     ,_param->_size_data);
    6169     
    62       for (uint32_t i=0; i<_param->_nb_port; i++)
    63         {
    64           Interface_fifo * interface = _interfaces->set_interface("shifter_"+toString(i)
    65 #ifdef POSITION
    66                                                                   , IN 
    67                                                                   , SOUTH
    68                                                                   , "Generalist interface"
    69 #endif
    70                                                                   );
    71          
    72            in_SHIFTER_DATA       [i] = interface->set_signal_in  <Tdata_t     > ("data"      ,_param->_size_data);
    73           if (_param->_shift_value == 0)
    74            in_SHIFTER_SHIFT      [i] = interface->set_signal_in  <Tshift_t    > ("shift"     ,static_cast<uint32_t>(ceil(log2(_param->_size_data))));
    75           if (_param->_direction == external_direction)
    76            in_SHIFTER_DIRECTION  [i] = interface->set_signal_in  <Tdirection_t> ("direction" ,1);
    77           if (_param->_rotate  == external_rotate)
    78            in_SHIFTER_TYPE       [i] = interface->set_signal_in  <Ttype_t     > ("type"      ,1);
    79           if (_param->_carry == external_carry)
    80            in_SHIFTER_CARRY      [i] = interface->set_signal_in  <Tcarry_t    > ("carry"     ,1);
    81           if (_param->_carry       == external_completion)
    82           if (_param->_type_completion_bool == true)
    83            in_SHIFTER_CARRY_IN   [i] = interface->set_signal_in  <Tcontrol_t  > ("carry_in"  ,1);
    84           else
    85            in_SHIFTER_COMPLETION [i] = interface->set_signal_in  <Tdata_t     > ("completion",_param->_size_data_completion);
    86           out_SHIFTER_DATA       [i] = interface->set_signal_out <Tdata_t     > ("data"      ,_param->_size_data);
    87         }
     70      ALLOC1_INTERFACE_END(_param->_nb_port);
    8871    }
    89 
     72   
    9073#ifdef POSITION
    9174    if (usage_is_set(_usage,USE_POSITION))
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_deallocation.cpp

    r88 r112  
    77
    88#include "Behavioural/Generic/Shifter/include/Shifter.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    1920      {
    2021#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
    21     delete     in_CLOCK;
     22        delete     in_CLOCK;
    2223#endif
    2324
    24     delete []  in_SHIFTER_DATA      ;
    25     if (_param->_shift_value == 0)
    26     delete []  in_SHIFTER_SHIFT     ;
    27     if (_param->_direction   == external_direction )
    28     delete []  in_SHIFTER_DIRECTION ;
    29     if (_param->_rotate      == external_rotate    )
    30     delete []  in_SHIFTER_TYPE      ;
    31     if (_param->_carry       == external_carry     )
    32     delete []  in_SHIFTER_CARRY     ;
    33     if (_param->_carry       == external_completion)
    34     if (_param->_type_completion_bool == true)
    35     delete []  in_SHIFTER_CARRY_IN  ;
    36     else
    37     delete []  in_SHIFTER_COMPLETION;
    38     delete [] out_SHIFTER_DATA      ;
     25        DELETE1_SIGNAL( in_SHIFTER_DATA       ,_param->_nb_port,_param->_size_data);
     26        if (_param->_shift_value == 0)
     27        DELETE1_SIGNAL( in_SHIFTER_SHIFT      ,_param->_nb_port,_param->_size_shift);
     28        if (_param->_direction == external_direction)
     29        DELETE1_SIGNAL( in_SHIFTER_DIRECTION  ,_param->_nb_port,1);
     30        if (_param->_rotate == external_rotate)
     31        DELETE1_SIGNAL( in_SHIFTER_TYPE       ,_param->_nb_port,1);
     32        if (_param->_carry == external_carry)
     33        DELETE1_SIGNAL( in_SHIFTER_CARRY      ,_param->_nb_port,1);
     34        if (_param->_carry == external_completion)
     35        {
     36        if (_param->_type_completion_bool == true)
     37          {
     38        DELETE1_SIGNAL( in_SHIFTER_CARRY_IN   ,_param->_nb_port,1);
     39          }
     40        else
     41          {
     42        DELETE1_SIGNAL( in_SHIFTER_COMPLETION ,_param->_nb_port,_param->_size_data_completion);
     43          }
     44        }
     45        DELETE1_SIGNAL(out_SHIFTER_DATA       ,_param->_nb_port,_param->_size_data);
    3946      }
    4047
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_declaration.cpp

    r81 r112  
    1717  void Shifter::vhdl_declaration (Vhdl * & vhdl)
    1818  {
    19     uint32_t log2_size_data = static_cast<uint32_t>(ceil(log2(_param._size_data)));
     19    uint32_t log2_size_data = static_cast<uint32_t>(ceil(log2(_param->_size_data)));
    2020
    2121    vhdl->set_constant("cst_is_direction_left  ",1,_left      );
     
    2525    vhdl->set_constant("cst_is_carry_arithmetic",1,_arithmetic);
    2626    vhdl->set_constant("cst_is_carry_logic     ",1,_logic     );
    27     vhdl->set_constant("cst_completion         ",_param._size_data,"(others => '1')");
     27    vhdl->set_constant("cst_completion         ",_param->_size_data,"(others => '1')");
    2828   
    29     for (uint32_t i=0; i<_param._nb_port; i++)
     29    for (uint32_t i=0; i<_param->_nb_port; i++)
    3030      {
    31         if (_param._shift_value != 0)
    32           vhdl->set_constant("shift_"+toString(i),log2_size_data, _param._shift_value);
     31        if (_param->_shift_value != 0)
     32          vhdl->set_constant("shift_"+toString(i),log2_size_data, _param->_shift_value);
    3333        else
    3434          vhdl->set_alias   ("shift_"+toString(i),std_logic(log2_size_data), "in_SHIFTER_"+toString(i)+"_SHIFT",std_logic_range(log2_size_data));
    3535       
    36         if (_param._size_data_completion > 0)
     36        if (_param->_size_data_completion > 0)
    3737          {
    38             vhdl->set_signal ("shifter_completion_left_"+toString(i)+" ",_param._size_data);
    39             vhdl->set_signal ("shifter_completion_right_"+toString(i)+"",_param._size_data);
    40             vhdl->set_signal ("mask_completion_left_"+toString(i)+"    ",_param._size_data);
    41             vhdl->set_signal ("mask_completion_right_"+toString(i)+"   ",_param._size_data);
     38            vhdl->set_signal ("shifter_completion_left_"+toString(i)+" ",_param->_size_data);
     39            vhdl->set_signal ("shifter_completion_right_"+toString(i)+"",_param->_size_data);
     40            vhdl->set_signal ("mask_completion_left_"+toString(i)+"    ",_param->_size_data);
     41            vhdl->set_signal ("mask_completion_right_"+toString(i)+"   ",_param->_size_data);
    4242          }
    4343       
    4444        //-----[ Shift logic Left ]--------------------------------------------
    45         if (_param._have_shift_logic_left)
    46           vhdl->set_signal ("shift_logic_left_"+toString(i)+"      ",_param._size_data);
     45        if (_param->_have_shift_logic_left)
     46          vhdl->set_signal ("shift_logic_left_"+toString(i)+"      ",_param->_size_data);
    4747       
    4848        //-----[ Shift logic Right ]-------------------------------------------
    49         if (_param._have_shift_logic_right)
    50           vhdl->set_signal ("shift_logic_right_"+toString(i)+"     ",_param._size_data);
     49        if (_param->_have_shift_logic_right)
     50          vhdl->set_signal ("shift_logic_right_"+toString(i)+"     ",_param->_size_data);
    5151       
    5252        //-----[ Shift arithmetic Left ]---------------------------------------
    53         if (_param._have_shift_arithmetic_left)
    54           vhdl->set_signal ("shift_arithmetic_left_"+toString(i)+" ",_param._size_data);
     53        if (_param->_have_shift_arithmetic_left)
     54          vhdl->set_signal ("shift_arithmetic_left_"+toString(i)+" ",_param->_size_data);
    5555       
    5656        //-----[ Shift arithmetic Right ]--------------------------------------
    57         if (_param._have_shift_arithmetic_right)
    58           vhdl->set_signal ("shift_arithmetic_right_"+toString(i)+"",_param._size_data);
     57        if (_param->_have_shift_arithmetic_right)
     58          vhdl->set_signal ("shift_arithmetic_right_"+toString(i)+"",_param->_size_data);
    5959       
    6060        //-----[ Rotate Left ]-------------------------------------------------
    61         if (_param._have_rotate_left)
    62           vhdl->set_signal ("rotate_left_"+toString(i)+"           ",_param._size_data);
     61        if (_param->_have_rotate_left)
     62          vhdl->set_signal ("rotate_left_"+toString(i)+"           ",_param->_size_data);
    6363       
    6464        //-----[ Rotate Right ]------------------------------------------------
    65         if (_param._have_rotate_right)
    66           vhdl->set_signal ("rotate_right_"+toString(i)+"          ",_param._size_data);
     65        if (_param->_have_rotate_right)
     66          vhdl->set_signal ("rotate_right_"+toString(i)+"          ",_param->_size_data);
    6767      }
    6868  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_allocation.cpp

    r88 r112  
    5353    // ~~~~~[ Interface : "input" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5454    {
    55       ALLOC1_INTERFACE("input", IN, WEST, "List of data unsort",_param->_nb_input);
     55      ALLOC1_INTERFACE_BEGIN("input", IN, WEST, "List of data unsort",_param->_nb_input);
    5656
    5757      ALLOC1_SIGNAL_IN(in_INPUT_VAL ,"val" , Tcontrol_t, 1);
    5858      ALLOC1_SIGNAL_IN(in_INPUT_DATA,"data", Tdata_t   , _param->_size_data);
     59
     60      ALLOC1_INTERFACE_END(_param->_nb_input);
    5961    }
    6062
    6163    // ~~~~~[ Interface : "output" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    6264    {
    63       ALLOC1_INTERFACE("output",OUT, EAST, "List of data sort",_param->_nb_output);
     65      ALLOC1_INTERFACE_BEGIN("output",OUT, EAST, "List of data sort",_param->_nb_output);
    6466
    6567      ALLOC1_SIGNAL_OUT(out_OUTPUT_VAL  ,"val"  ,Tcontrol_t,1);
     
    6870      if (_param->_have_port_data_out)
    6971      ALLOC1_SIGNAL_OUT(out_OUTPUT_DATA ,"data" ,Tdata_t   ,_param->_size_data   );
     72
     73      ALLOC1_INTERFACE_END(_param->_nb_output);
    7074    }
    7175
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_deallocation.cpp

    r88 r112  
    77
    88#include "Behavioural/Generic/Sort/include/Sort.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    2526        delete     in_NRESET;
    2627
    27         delete []  in_INPUT_VAL   ;
    28         delete []  in_INPUT_DATA  ;
    29         delete [] out_OUTPUT_VAL  ;
    30         if (_param->_have_port_index_out)
    31         delete [] out_OUTPUT_INDEX;
    32         if (_param->_have_port_data_out)
    33         delete [] out_OUTPUT_DATA ;
     28        DELETE1_SIGNAL(in_INPUT_VAL ,_param->_nb_input, 1);
     29        DELETE1_SIGNAL(in_INPUT_DATA,_param->_nb_input, _param->_size_data);
     30       
     31        DELETE1_SIGNAL(out_OUTPUT_VAL  ,_param->_nb_output,1);
     32        if (_param->_have_port_index_out)
     33        DELETE1_SIGNAL(out_OUTPUT_INDEX,_param->_nb_output,_param->_size_address);
     34        if (_param->_have_port_data_out)
     35        DELETE1_SIGNAL(out_OUTPUT_DATA ,_param->_nb_output,_param->_size_data   );
    3436      }
     37
    3538    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    3639
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_allocation.cpp

    r95 r112  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
     
    2828    _interfaces = entity->set_interfaces();
    2929
    30     // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     30    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3131    {
    3232      Interface_fifo * interface = _interfaces->set_interface(""
     
    4040    }
    4141
    42     // ~~~~~[ Interface : "access" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     42    // ~~~~~[ Interface : "access" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4343    {
    44       ALLOC1_INTERFACE("access",IN,WEST, "Access", _param->_nb_access);
     44      ALLOC1_INTERFACE_BEGIN("access",IN,WEST, "Access", _param->_nb_access);
    4545
    4646      ALLOC1_VALACK_IN ( in_ACCESS_VAL    ,VAL);
     
    5050      ALLOC1_SIGNAL_IN ( in_ACCESS_ENTITY ,"entity" ,Tentity_t ,log2(_param->_nb_entity   ));
    5151      ALLOC1_SIGNAL_OUT(out_ACCESS_VICTIM ,"victim" ,Tentity_t ,log2(_param->_nb_entity   ));
     52
     53      ALLOC1_INTERFACE_END(_param->_nb_access);
    5254    }
    5355
    5456    if (usage_is_set(_usage,USE_SYSTEMC))
    5557      {
    56     // -----[ Register ]---------------------------------------------------
    57     reg_TABLE = new entry_t *  [_param->_size_table];
    58 
    59     for (uint32_t i=0; i<_param->_size_table; i++)
    60       reg_TABLE [i] = new entry_t (_param->_nb_entity);
    61    
    62     // -----[ Internal ]---------------------------------------------------
    63     internal_ACCESS_ACK    = new Tcontrol_t [_param->_nb_access];
    64     internal_ACCESS_VICTIM = new Tentity_t  [_param->_nb_access];
     58        // -----[ Register ]---------------------------------------------------
     59        reg_TABLE = new entry_t *  [_param->_size_table];
     60       
     61        for (uint32_t i=0; i<_param->_size_table; i++)
     62          reg_TABLE [i] = new entry_t (_param->_nb_entity);
     63       
     64        // -----[ Internal ]---------------------------------------------------
     65        ALLOC1(internal_ACCESS_ACK   ,Tcontrol_t,_param->_nb_access);
     66        ALLOC1(internal_ACCESS_VICTIM,Tentity_t ,_param->_nb_access);
    6567      }
    6668
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_deallocation.cpp

    r88 r112  
    77
    88#include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    2021    delete     in_CLOCK;
    2122    delete     in_NRESET;
    22     // -----[ Interface access ]-------------------------------------------
    23     delete []  in_ACCESS_VAL    ;
    24     delete [] out_ACCESS_ACK    ;
    25     if (_param->_size_address>1)
    26     delete []  in_ACCESS_ADDRESS;
    27     delete []  in_ACCESS_HIT    ;
    28     delete []  in_ACCESS_ENTITY ;
    29     delete [] out_ACCESS_VICTIM ;
    30    
    31     // -----[ Register ]---------------------------------------------------
    32     delete [] reg_TABLE;
    3323
    34     // -----[ Internal ]---------------------------------------------------
    35     delete [] internal_ACCESS_ACK   ;
    36     delete [] internal_ACCESS_VICTIM;
     24    DELETE1_SIGNAL( in_ACCESS_VAL    ,_param->_nb_access,1);
     25    DELETE1_SIGNAL(out_ACCESS_ACK    ,_param->_nb_access,1);
     26    DELETE1_SIGNAL( in_ACCESS_HIT    ,_param->_nb_access,1);
     27    DELETE1_SIGNAL( in_ACCESS_ADDRESS,_param->_nb_access,log2(_param->_size_address));
     28    DELETE1_SIGNAL( in_ACCESS_ENTITY ,_param->_nb_access,log2(_param->_nb_entity   ));
     29    DELETE1_SIGNAL(out_ACCESS_VICTIM ,_param->_nb_access,log2(_param->_nb_entity   ));
     30
     31    DELETE1(reg_TABLE             ,_param->_size_table);
     32    DELETE1(internal_ACCESS_ACK   ,_param->_nb_access);
     33    DELETE1(internal_ACCESS_VICTIM,_param->_nb_access);
    3734      }
    3835
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_allocation.cpp

    r82 r112  
    3131    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3232    {
    33       __ALLOC_SIGNAL(in_CLOCK ,"in_CLOCK" ,SC_CLOCK          );
    34       __ALLOC_SIGNAL(in_NRESET,"in_NRESET",SC_IN (Tcontrol_t));
     33      __ALLOC0_SIGNAL(in_CLOCK ,"in_CLOCK" ,SC_CLOCK          );
     34      __ALLOC0_SIGNAL(in_NRESET,"in_NRESET",SC_IN (Tcontrol_t));
    3535    }
    3636
    3737    // ~~~~~[ Interface : "Access" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3838    {
    39       __ALLOC1_INTERFACE("ACCESS",_param->_nb_access);
     39      __ALLOC1_INTERFACE_BEGIN("ACCESS",_param->_nb_access);
    4040
    4141      __ALLOC1_SIGNAL_IN ( in_ACCESS_VAL    ,"VAL"    ,Tcontrol_t);
     
    4646      __ALLOC1_SIGNAL_IN ( in_ACCESS_ENTITY ,"ENTITY" ,Tentity_t );
    4747      __ALLOC1_SIGNAL_OUT(out_ACCESS_VICTIM ,"VICTIM" ,Tentity_t );
     48
     49      __ALLOC1_INTERFACE_END(_param->_nb_access);
    4850    }
    4951
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_deallocation.cpp

    r88 r112  
    77
    88#include "Behavioural/Generic/Victim/include/Victim.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
Note: See TracChangeset for help on using the changeset viewer.