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/include/Allocation.h

    r111 r112  
    1414// =====[ ALLOCATION / DELETE of ARRAY ]=================================
    1515// ======================================================================
     16#define ALLOC0(var,type)                        \
     17  var = new type
     18
    1619#define ALLOC1(var,type,s1)                      \
    1720  var = new type [s1]
     
    103106// ----------------------------------------------------------------------
    104107
    105 #define __ALLOC_SIGNAL(sig, name, type)         \
     108
     109#define __ALLOC0_SIGNAL(sig, name, type)         \
    106110  {                                             \
    107111    sig = new type (name);                      \
     
    109113
    110114#ifdef POSITION
    111 #define ALLOC_INTERFACE( name, direction, localisation, str)            \
     115#define ALLOC0_INTERFACE_BEGIN( name, direction, localisation, str)            \
    112116  INTERFACE_PRINT(name);                                                \
    113117  morpheo::behavioural::Interface_fifo * interface = _interfaces->set_interface( name, direction, localisation, str);
    114118#else
    115 #define ALLOC_INTERFACE( name, direction, localisation, str)            \
     119#define ALLOC0_INTERFACE_BEGIN( name, direction, localisation, str)            \
    116120  INTERFACE_PRINT(name);                                                \
    117121  morpheo::behavioural::Interface_fifo * interface = _interfaces->set_interface( name);
    118122#endif
    119123
    120 #define ALLOC_VAL_ACK_IN(  sig, name, type)                             \
     124#define ALLOC0_INTERFACE_END()
     125
     126#define ALLOC0_VAL_ACK_IN(  sig, name, type)                             \
    121127  {                                                                     \
    122128    sig = interface->set_signal_valack_in (name, type);                 \
    123129  }                                                                     
    124 #define ALLOC_VAL_ACK_OUT( sig, name, type)                             \
     130#define ALLOC0_VAL_ACK_OUT( sig, name, type)                             \
    125131  {                                                                     \
    126132    sig = interface->set_signal_valack_out(name, type);                 \
    127133  }                                                                     
    128 #define ALLOC_VALACK_IN(     sig, type)                                 \
     134#define ALLOC0_VALACK_IN(     sig, type)                                 \
    129135  {                                                                     \
    130136    sig = interface->set_signal_valack_in (type);                       \
    131137  }                                                                     
    132 #define ALLOC_VALACK_OUT(    sig, type)                                 \
     138#define ALLOC0_VALACK_OUT(    sig, type)                                 \
    133139  {                                                                     \
    134140    sig = interface->set_signal_valack_out(type);                       \
    135141  }                                                                     
    136 #define ALLOC_SIGNAL_IN(  sig, name, type, size)                        \
     142#define ALLOC0_SIGNAL_IN(  sig, name, type, size)                        \
    137143  if (size > 0)                                                         \
    138144    {                                                                   \
     
    144150    }
    145151 
    146 #define ALLOC_SIGNAL_OUT( sig, name, type, size)                        \
     152#define ALLOC0_SIGNAL_OUT( sig, name, type, size)                        \
    147153  if (size > 0)                                                         \
    148154    {                                                                   \
     
    154160    }
    155161
    156 #define DELETE_SIGNAL( sig, size)                                       \
     162#define DELETE0_SIGNAL( sig, size)                                       \
    157163  if (size > 0)                                                         \
    158164    {                                                                   \
     
    160166    }
    161167
    162 #define ALLOC_SC_SIGNAL(  sig, name, type)                              \
     168#define ALLOC0_SC_SIGNAL(  sig, name, type)                              \
    163169  sc_signal<type> * sig = new sc_signal<type> (name);                   \
    164170  PRINT_SIGNAL_ADDRESS(name,sig);
    165171
    166 #define INSTANCE_SC_SIGNAL(component, sig)                     \
     172#define INSTANCE0_SC_SIGNAL(component, sig)                     \
    167173  {                                                            \
    168174    TEST_SIGNAL(component->sig->name(),component->sig);        \
     
    171177  }
    172178
    173 #define _INSTANCE_SC_SIGNAL(component, sig1,sig2)                       \
     179#define _INSTANCE0_SC_SIGNAL(component, sig1,sig2)                       \
    174180  {                                                                     \
    175181    TEST_SIGNAL(component->sig1->name(),component->sig1);               \
     
    178184  }
    179185
    180 #define DELETE_SC_SIGNAL( sig)                  \
     186#define DELETE0_SC_SIGNAL( sig)                  \
    181187  {                                             \
    182188    delete sig;                                 \
    183189  }
    184 
    185 
    186 #define __ALLOC0_SIGNAL(sig, name, type)                      __ALLOC_SIGNAL(sig, name, type)
    187 
    188 #define ALLOC0_INTERFACE( name, direction, localisation, str) ALLOC_INTERFACE( name, direction, localisation, str)
    189 
    190 #define ALLOC0_VAL_ACK_IN(  sig, name, type)                  ALLOC_VAL_ACK_IN(  sig, name, type)
    191 #define ALLOC0_VAL_ACK_OUT( sig, name, type)                  ALLOC_VAL_ACK_OUT( sig, name, type)
    192 #define ALLOC0_VALACK_IN(     sig, type)                      ALLOC_VALACK_IN(     sig, type)
    193 #define ALLOC0_VALACK_OUT(    sig, type)                      ALLOC_VALACK_OUT(    sig, type)
    194 #define ALLOC0_SIGNAL_IN(  sig, name, type, size)             ALLOC_SIGNAL_IN(  sig, name, type, size)
    195 #define ALLOC0_SIGNAL_OUT( sig, name, type, size)             ALLOC_SIGNAL_OUT( sig, name, type, size)
    196 #define DELETE0_SIGNAL( sig, size)                            DELETE_SIGNAL( sig, size)
    197 
    198 #define ALLOC0_SC_SIGNAL(  sig, name, type)                   ALLOC_SC_SIGNAL(  sig, name, type)
    199 #define INSTANCE0_SC_SIGNAL(component, sig)                   INSTANCE_SC_SIGNAL(component, sig)
    200 #define _INSTANCE0_SC_SIGNAL(component, sig)                  _INSTANCE_SC_SIGNAL(component, sig)
    201 #define DELETE0_SC_SIGNAL( sig)                               DELETE_SC_SIGNAL( sig)
    202190
    203191// ----------------------------------------------------------------------
     
    205193// ----------------------------------------------------------------------
    206194
    207 #define __ALLOC1_INTERFACE(name, x1)                                    \
     195#define __ALLOC1_INTERFACE_BEGIN(name, x1)                                    \
    208196  INTERFACE_PRINT(name);                                                \
    209197  const std::string interface_name = name;                              \
    210198  const uint32_t iterator_1 = x1;
    211199
     200#define __ALLOC1_INTERFACE_END(x1)
     201
    212202#define __ALLOC1_SIGNAL_IN( sig, name, type)                            \
    213203  {                                                                     \
     
    233223
    234224#ifdef POSITION
    235 #define ALLOC1_INTERFACE( name, direction, localisation, str, x1)       \
     225#define ALLOC1_INTERFACE_BEGIN( name, direction, localisation, str, x1)       \
    236226  INTERFACE_PRINT(name);                                                \
    237227  const uint32_t iterator_1 = x1;                                       \
     
    245235  }
    246236#else
    247 #define ALLOC1_INTERFACE( name, direction, localisation, str, x1)       \
     237#define ALLOC1_INTERFACE_BEGIN( name, direction, localisation, str, x1)       \
    248238  INTERFACE_PRINT(name);                                                \
    249239  const uint32_t iterator_1 = x1;                                       \
     
    257247  }
    258248#endif
     249
     250#define ALLOC1_INTERFACE_END(x1)
    259251
    260252#define ALLOC1_VAL_ACK_IN( sig, name, type)                             \
     
    377369
    378370#ifdef POSITION
    379 #define ALLOC2_INTERFACE( name, direction, localisation, str, x1, x2)   \
     371#define ALLOC2_INTERFACE_BEGIN( name, direction, localisation, str, x1, x2)   \
    380372  INTERFACE_PRINT(name);                                                \
    381373  uint32_t iterator_1 = 0;                                              \
     
    397389  }
    398390#else
    399 #define ALLOC2_INTERFACE( name, direction, localisation, str, x1, x2)   \
     391#define ALLOC2_INTERFACE_BEGIN( name, direction, localisation, str, x1, x2)   \
    400392  INTERFACE_PRINT(name);                                                \
    401393  uint32_t iterator_1 = 0;                                              \
     
    417409  }
    418410#endif
     411
     412#define ALLOC2_INTERFACE_END(x1, x2)                             \
     413  for (uint32_t it1=0; it1<x1; it1++)                                   \
     414    delete interface [it1];                                             \
     415  delete [] interface;
    419416
    420417#define _ALLOC2_VAL_ACK_IN( sig, name, type, x1, x2)                    \
     
    586583
    587584#ifdef POSITION
    588 #define ALLOC3_INTERFACE( name, direction, localisation, str, x1, x2, x3) \
     585#define ALLOC3_INTERFACE_BEGIN( name, direction, localisation, str, x1, x2, x3) \
    589586  INTERFACE_PRINT(name);                                                \
    590587  uint32_t iterator_1 = 0;                                              \
     
    612609  }
    613610#else
    614 #define ALLOC3_INTERFACE( name, direction, localisation, str, x1, x2, x3) \
     611#define ALLOC3_INTERFACE_BEGIN( name, direction, localisation, str, x1, x2, x3) \
    615612  INTERFACE_PRINT(name);                                                \
    616613  uint32_t iterator_1 = 0;                                              \
     
    638635  }
    639636#endif
     637
     638#define ALLOC3_INTERFACE_END(x1, x2, x3)                         \
     639  for (uint32_t it1=0; it1<x1; it1++)                                   \
     640    {                                                                   \
     641      for (uint32_t it2=0; it2<x2; it2++)                               \
     642        delete interface [it1][it2];                                    \
     643      delete [] interface [it1];                                        \
     644    }                                                                   \
     645  delete [] interface;
    640646
    641647// #define _ALLOC3_VAL_ACK_IN( sig, name, type, x1, x2, x3)
Note: See TracChangeset for help on using the changeset viewer.