Ignore:
Timestamp:
May 1, 2008, 6:48:45 PM (17 years ago)
Author:
rosiere
Message:
  • support locale (now must "just" translate)
  • update all component with new test format
  • update all component with usage
  • New component : decod queue and prediction_unit
Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural
Files:
68 added
278 edited
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/configuration.cfg

    r81 r82  
    331       1       +1      # nb_front_end       
    442       2       +1      # nb_ooo_engine     
    5 1024    1024    +1      # nb_packet         
     5256     256     +1      # nb_packet         
    6632      32      +1      # size_general_data 
    7732      32      +1      # nb_general_register
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (1024*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    11 
    12 #define NB_ITERATION  1
    13 #define CYCLE_MAX     (1024*NB_ITERATION)
    14 
    15 #define LABEL(str...)                                                   \
    16   {                                                                     \
    17     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    18     msg (str);                                                          \
    19     msg (_("\n"));                                                      \
    20   } while(0)
    21 
    22 #define SC_START(cycle_offset)                                                       \
    23   do                                                                                 \
    24     {                                                                                \
    25       /*cout << "SC_START (begin)" << endl;*/                                        \
    26                                                                                      \
    27       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    28       if (cycle_offset != 0)                                                         \
    29         {                                                                            \
    30           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    31         }                                                                            \
    32                                                                                      \
    33       if (cycle_current > CYCLE_MAX)                                                 \
    34         {                                                                            \
    35           TEST_KO("Maximal cycles Reached");                                         \
    36         }                                                                            \
    37                                                                                      \
    38       sc_start(cycle_offset);                                                        \
    39                                                                                      \
    40       /*cout << "SC_START (end  )" << endl;*/                                        \
    41     } while(0)
    4214
    4315class execute_transaction
     
    12193  Functionnal_unit * _Functionnal_unit = new Functionnal_unit (name.c_str(),
    12294#ifdef STATISTICS
    123                                              _parameters_statistics,
     95                                                               _parameters_statistics,
    12496#endif
    125                                              _param);
     97                                                               _param,
     98                                                               USE_ALL);
    12699 
    127100#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Functionnal_unit.h

    r81 r82  
    148148#endif
    149149   Parameters                                  * param,
    150    morpheo::behavioural::Tusage_t                usage=USE_ALL
     150   morpheo::behavioural::Tusage_t                usage
    151151   );
    152152  public  :             ~Functionnal_unit         (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/test.h

    r81 r82  
    77 */
    88
     9#define CYCLE_MAX     1024
    910
    1011#include "Common/include/Time.h"
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test1.cpp

    r81 r82  
    77 */
    88
     9  /*
     10
    911#include <queue>
    1012#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/test.h"
    11 
    12 #define NB_ITERATION  1
    13 #define CYCLE_MAX     (1024*NB_ITERATION)
    14 
    15 #define LABEL(str)                                                      \
    16   {                                                                     \
    17     cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
    18   } while(0)
    19 
    20 #define SC_START(cycle_offset)                                          \
    21   do                                                                    \
    22     {                                                                   \
    23       /*cout << "SC_START (begin)" << endl;*/                           \
    24                                                                         \
    25       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
    26       if (cycle_offset != 0)                                            \
    27         {                                                               \
    28           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    29         }                                                               \
    30                                                                         \
    31       if (cycle_current > CYCLE_MAX)                                    \
    32         {                                                               \
    33           TEST_KO("Maximal cycles Reached");                            \
    34         }                                                               \
    35       sc_start(cycle_offset);                                           \
    36       /*cout << "SC_START (end  )" << endl;*/                           \
    37     } while(0)
    3813
    3914
     
    5530 
    5631#ifdef SYSTEMC
    57   /*********************************************************************
    58    * Déclarations des signaux
    59    *********************************************************************/
     32
    6033  string rename = "";
    6134
     
    129102    }
    130103 
    131   /********************************************************
    132    * Instanciation
    133    ********************************************************/
     104  // Instanciation
    134105 
    135106  cout << "<" << name << "> Instanciation of _Load_store_unit" << endl;
     
    215186  Time * _time = new Time();
    216187
    217   /********************************************************
    218    * Simulation - Begin
    219    ********************************************************/
     188  // Simulation - Begin
    220189
    221190  // Initialisation
     
    656625                }
    657626
    658               LABEL("DCACHE_RSP : "+toString(in_DCACHE_RSP_VAL->read())+" - "+toString(out_DCACHE_RSP_ACK ->read()));
     627                LABEL("DCACHE_RSP : "+toString(in_DCACHE_RSP_VAL->read())+" - "+toString(out_DCACHE_RSP_ACK ->read()));
    659628              if (in_DCACHE_RSP_VAL->read() and out_DCACHE_RSP_ACK->read())
    660629                {
     
    677646
    678647 
    679   /********************************************************
    680    * Simulation - End
    681    ********************************************************/
     648  // Simulation - End
    682649
    683650  TEST_OK ("End of Simulation");
     
    755722#endif
    756723}
     724  */
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test2.cpp

    r81 r82  
    99#include <queue>
    1010#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/test.h"
    11 
    12 #define CYCLE_MAX     1024
    13 
    14 #define LABEL(str)                                                      \
    15   {                                                                     \
    16     cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
    17   } while(0)
    18 
    19 #define SC_START(cycle_offset)                                          \
    20   do                                                                    \
    21     {                                                                   \
    22       /*cout << "SC_START (begin)" << endl;*/                           \
    23                                                                         \
    24       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
    25       if (cycle_offset != 0)                                            \
    26         {                                                               \
    27           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    28         }                                                               \
    29                                                                         \
    30       if (cycle_current > CYCLE_MAX)                                    \
    31         {                                                               \
    32           TEST_KO("Maximal cycles Reached");                            \
    33         }                                                               \
    34       sc_start(cycle_offset);                                           \
    35       /*cout << "SC_START (end  )" << endl;*/                           \
    36     } while(0)
    37 
    3811
    3912//===================================================================={test}
     
    7144                                                            _parameters_statistics,
    7245#endif
    73                                                             _param);
     46                                                            _param,
     47                                                            USE_ALL);
    7448 
    7549#ifdef SYSTEMC
     
    487461              SC_START(0);
    488462
    489               LABEL("MEMORY_IN  : "+toString(in_MEMORY_IN_VAL ->read())+" - "+toString(out_MEMORY_IN_ACK ->read()));
     463              LABEL("MEMORY_IN  : %d - %d",in_MEMORY_IN_VAL ->read(),out_MEMORY_IN_ACK ->read());
    490464              if ( in_MEMORY_IN_VAL ->read() and out_MEMORY_IN_ACK ->read())
    491465                {
    492466                  Tpacket_t  packet_id = in_MEMORY_IN_PACKET_ID->read();
    493467
    494                   LABEL(" * Accepted MEMORY_IN  : " + toString(packet_id));
     468                  LABEL(" * Accepted MEMORY_IN  : %d",packet_id);
    495469                  cout << fifo_request.top();
    496470
     
    509483                }
    510484
    511               LABEL("MEMORY_OUT : "+toString(out_MEMORY_OUT_VAL->read())+" - "+toString(in_MEMORY_OUT_ACK ->read()));
     485              LABEL("MEMORY_OUT : %d - %d",out_MEMORY_OUT_VAL->read(),in_MEMORY_OUT_ACK ->read());
    512486              if (out_MEMORY_OUT_VAL->read() and  in_MEMORY_OUT_ACK->read())
    513487                {
    514488                  Tpacket_t  packet_id = out_MEMORY_OUT_PACKET_ID->read();
    515489
    516                   LABEL(" * Accepted MEMORY_OUT : " + toString(packet_id));
     490                  LABEL(" * Accepted MEMORY_OUT : %d",packet_id);
    517491
    518492                  if (is_operation_memory_store(tab_request[packet_id]._operation))
     
    650624                }
    651625
    652               LABEL("DCACHE_REQ : "+toString(out_DCACHE_REQ_VAL->read())+" - "+toString(in_DCACHE_REQ_ACK ->read()));
     626              LABEL("DCACHE_REQ : %d - %d",out_DCACHE_REQ_VAL->read(),in_DCACHE_REQ_ACK ->read());
    653627              if (out_DCACHE_REQ_VAL->read() and  in_DCACHE_REQ_ACK->read())
    654628                {
     
    665639                  packet_id  = (out_DCACHE_REQ_PACKET_ID ->read())>>1;
    666640             
    667                   LABEL(" * Accepted DCACHE_REQ : " + toString(packet_id));
     641                  LABEL(" * Accepted DCACHE_REQ : %d",packet_id);
    668642
    669643                  if (address >= size_memory)
     
    676650                    {
    677651                      rdata = _memory->access (context_id, address, out_DCACHE_REQ_TYPE->read(), out_DCACHE_REQ_WDATA->read());
    678                       LABEL("   * rdata : " + toString(rdata));
     652                      LABEL("   * rdata : 0x%x",rdata);
    679653                    }
    680654
     
    699673                }
    700674
    701               LABEL("DCACHE_RSP : "+toString(in_DCACHE_RSP_VAL->read())+" - "+toString(out_DCACHE_RSP_ACK ->read()));
     675              LABEL("DCACHE_RSP : %d - %d",in_DCACHE_RSP_VAL->read(),out_DCACHE_RSP_ACK ->read());
    702676              if (in_DCACHE_RSP_VAL->read() and out_DCACHE_RSP_ACK->read())
    703677                {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h

    r81 r82  
    3030#include "Behavioural/include/Vhdl.h"
    3131#endif
     32#include "Behavioural/include/Usage.h"
    3233
    3334namespace morpheo {
     
    4849    // -----[ fields ]----------------------------------------------------
    4950    // Parameters
    50   protected : const std::string       _name;
    51 
     51  protected : const std::string  _name;
    5252  protected : const Parameters * _param;
     53  private   : const Tusage_t     _usage;
    5354
    5455#ifdef STATISTICS
     
    202203   morpheo::behavioural::Parameters_Statistics * param_statistics,
    203204#endif
    204    Parameters                                  * param );
     205   Parameters                                  * param,
     206   morpheo::behavioural::Tusage_t                usage );
    205207  public  :          ~Load_store_unit             (void);
    206208                                               
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit.cpp

    r81 r82  
    2020#undef  FUNCTION
    2121#define FUNCTION "Load_store_unit::Load_store_unit"
     22  Load_store_unit::Load_store_unit
     23  (
    2224#ifdef SYSTEMC
    23   Load_store_unit::Load_store_unit (sc_module_name name,
     25   sc_module_name name,
    2426#else
    25   Load_store_unit::Load_store_unit (string name,
     27   std::string name,
    2628#endif
    2729#ifdef STATISTICS
    28                           morpheo::behavioural::Parameters_Statistics * param_statistics,
     30   morpheo::behavioural::Parameters_Statistics * param_statistics,
    2931#endif
    30                           morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters * param ):
    31                               _name              (name)
    32                               ,_param            (param)
     32   morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters * param ,
     33   morpheo::behavioural::Tusage_t usage
     34   ):
     35    _name              (name)
     36    ,_param            (param)
     37    ,_usage (usage)
    3338  {
    3439    log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_allocation.cpp

    r81 r82  
    2626    log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
    2727
    28     _component   = new Component ();
     28    _component   = new Component (_usage);
    2929
    3030    Entity * entity = _component->set_entity (_name       
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
    9 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/include/test.h"
    10 #include "Common/include/Test.h"
    11 
    129#define NB_ITERATION  1
    1310//64
    1411#define CYCLE_MAX     (1024*NB_ITERATION)
    1512
    16 #define LABEL(str)                                                                       \
    17 {                                                                                        \
    18   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
    19 } while(0)
    20 
    21 static uint32_t cycle = 0;
    22 
    23 #define SC_START(cycle_offset)                                          \
    24 do                                                                      \
    25 {                                                                       \
    26 /*cout << "SC_START (begin)" << endl;*/                                 \
    27                                                                         \
    28   uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
    29   if (cycle_current != cycle)                                           \
    30     {                                                                   \
    31       cycle = cycle_current;                                            \
    32       cout << "##########[ cycle "<< cycle << " ]" << endl;             \
    33     }                                                                   \
    34                                                                         \
    35   if (cycle_current > CYCLE_MAX)                                        \
    36     {                                                                   \
    37       TEST_KO("Maximal cycles Reached");                                \
    38     }                                                                   \
    39   sc_start(cycle_offset);                                               \
    40 /*cout << "SC_START (end  )" << endl;*/                                 \
    41 } while(0)
     13#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/include/test.h"
     14#include "Common/include/Test.h"
    4215
    4316void test (string name,
     
    5427                                             _parameters_statistics,
    5528#endif
    56                                              _param);
     29                                             _param,
     30                                             USE_ALL);
    5731 
    5832#ifdef SYSTEMC
     
    362336  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    363337    {
    364       LABEL("Iteration "+toString(iteration));
     338      LABEL("Iteration %d",iteration);
    365339      int32_t percent_transaction_queue_in     = (rand()%45)+30;
    366340      int32_t percent_transaction_queue_out    = (rand()%45)+30;
     
    518492          SC_START(0);
    519493         
    520           LABEL("Test     READ_QUEUE_IN  : "+toString(READ_QUEUE_IN_VAL->read())+","+toString(READ_QUEUE_IN_ACK->read()));
     494          LABEL("Test     READ_QUEUE_IN  : %d,%d",READ_QUEUE_IN_VAL->read(),READ_QUEUE_IN_ACK->read());
    521495          if ((READ_QUEUE_IN_VAL->read() == 1) and
    522496              (READ_QUEUE_IN_ACK->read() == 1))
    523497            {
    524               LABEL("Accepted READ_QUEUE_IN  ["+toString(request_in)+"]");
     498              LABEL("Accepted READ_QUEUE_IN  [%d]",request_in);
    525499              request_in  ++;
    526500            }
    527           LABEL("Test     READ_QUEUE_OUT : "+toString(READ_QUEUE_OUT_VAL->read())+","+toString(READ_QUEUE_OUT_ACK->read()));
     501          LABEL("Test     READ_QUEUE_OUT : %d,%d",READ_QUEUE_OUT_VAL->read(),READ_QUEUE_OUT_ACK->read());
    528502          if ((READ_QUEUE_OUT_VAL->read() == 1) and
    529503              (READ_QUEUE_OUT_ACK->read() == 1))
     
    535509                rob_id = 0;
    536510              Tcontext_t ctxt   = _ooo_engine_id [rob_id];
    537               LABEL("Accepted READ_QUEUE_OUT ["+toString(rob_id)+"]");
     511              LABEL("Accepted READ_QUEUE_OUT [%d]",rob_id);
    538512             
    539513              TEST(uint32_t          , rob_id ,request_out);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Read_queue.h

    r81 r82  
    1717#include "Common/include/ToString.h"
    1818#include "Common/include/Debug.h"
    19 #include "Behavioural/include/Types.h"
    2019
    2120#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Parameters.h"
     21#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Types.h"
    2222#ifdef STATISTICS
    2323#include "Behavioural/include/Stat.h"
     
    2727#include "Behavioural/include/Vhdl.h"
    2828#endif
     29#include "Behavioural/include/Usage.h"
    2930
    3031namespace morpheo {
     
    3637namespace read_unit {
    3738namespace read_queue {
    38  
    39   class Tread_queue_entry_t
    40   {
    41   public    : Tcontext_t         _context_id   ;
    42   public    : Tcontext_t         _front_end_id ;
    43   public    : Tcontext_t         _ooo_engine_id;
    44   public    : Tpacket_t          _rob_id       ;
    45   public    : Toperation_t       _operation    ;
    46   public    : Ttype_t            _type         ;
    47   public    : Tlsq_ptr_t         _store_queue_ptr_write;
    48   public    : Tlsq_ptr_t         _load_queue_ptr_write;
    49   public    : Tcontrol_t         _has_immediat ;
    50   public    : Tgeneral_data_t    _immediat     ;
    51   public    : Tcontrol_t         _read_ra      ;
    52   public    : Tgeneral_address_t _num_reg_ra   ;
    53   public    : Tcontrol_t         _read_rb      ;
    54   public    : Tgeneral_address_t _num_reg_rb   ;
    55   public    : Tcontrol_t         _read_rc      ;
    56   public    : Tspecial_address_t _num_reg_rc   ;
    57   public    : Tcontrol_t         _write_rd     ;
    58   public    : Tgeneral_address_t _num_reg_rd   ;
    59   public    : Tcontrol_t         _write_re     ;
    60   public    : Tspecial_address_t _num_reg_re   ;
    61 
    62     friend std::ostream& operator<< (std::ostream& output_stream,
    63                                 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Tread_queue_entry_t & x)
    64     {
    65       output_stream << " * _context_id            : " << toString(x._context_id   ) << std::endl
    66                     << " * _front_end_id          : " << toString(x._front_end_id ) << std::endl
    67                     << " * _ooo_engine_id         : " << toString(x._ooo_engine_id) << std::endl
    68                     << " * _rob_id                : " << toString(x._rob_id       ) << std::endl
    69                     << " * _operation             : " << toString(x._operation    ) << std::endl
    70                     << " * _type                  : " << toString(x._type         ) << std::endl
    71                     << " * _store_queue_ptr_write : " << toString(x._store_queue_ptr_write) << std::endl
    72                     << " * _load_queue_ptr_write  : " << toString(x._load_queue_ptr_write ) << std::endl
    73                     << " * _has_immediat          : " << toString(x._has_immediat ) << std::endl
    74                     << " * _immediat              : " << toString(x._immediat     ) << std::endl
    75                     << " * _read_ra               : " << toString(x._read_ra      ) << std::endl
    76                     << " * _num_reg_ra            : " << toString(x._num_reg_ra   ) << std::endl
    77                     << " * _read_rb               : " << toString(x._read_rb      ) << std::endl
    78                     << " * _num_reg_rb            : " << toString(x._num_reg_rb   ) << std::endl
    79                     << " * _read_rc               : " << toString(x._read_rc      ) << std::endl
    80                     << " * _num_reg_rc            : " << toString(x._num_reg_rc   ) << std::endl
    81                     << " * _write_rd              : " << toString(x._write_rd     ) << std::endl
    82                     << " * _num_reg_rd            : " << toString(x._num_reg_rd   ) << std::endl
    83                     << " * _write_re              : " << toString(x._write_re     ) << std::endl
    84                     << " * _num_reg_re            : " << toString(x._num_reg_re   ) << std::endl;
    85 
    86       return output_stream;
    87     }
    88 
    89   };
    90 
    91   class Tread_queue_head_entry_t
    92   {
    93   public    : Tcontext_t         _context_id   ;
    94   public    : Tcontext_t         _front_end_id ;
    95   public    : Tcontext_t         _ooo_engine_id;
    96   public    : Tpacket_t          _rob_id       ;
    97   public    : Toperation_t       _operation    ;
    98   public    : Ttype_t            _type         ;
    99   public    : Tlsq_ptr_t         _store_queue_ptr_write;
    100   public    : Tlsq_ptr_t         _load_queue_ptr_write;
    101   public    : Tcontrol_t         _has_immediat ;
    102   public    : Tgeneral_data_t    _immediat     ;
    103   public    : Tcontrol_t         _read_ra      ;
    104   public    : Tcontrol_t         _read_ra_val  ; // 1 : must access at the registerFile (after access, is set at 0)
    105   public    : Tgeneral_address_t _num_reg_ra   ;
    106   public    : Tcontrol_t         _data_ra_val  ; // 1 : the read of registerFile is valid
    107   public    : Tgeneral_data_t    _data_ra      ;
    108   public    : Tcontrol_t         _read_rb      ;
    109   public    : Tcontrol_t         _read_rb_val  ;
    110   public    : Tgeneral_address_t _num_reg_rb   ;
    111   public    : Tcontrol_t         _data_rb_val  ;
    112   public    : Tgeneral_data_t    _data_rb      ;
    113   public    : Tcontrol_t         _read_rc      ;
    114   public    : Tcontrol_t         _read_rc_val  ;
    115   public    : Tspecial_address_t _num_reg_rc   ;
    116   public    : Tcontrol_t         _data_rc_val  ;
    117   public    : Tspecial_data_t    _data_rc      ;
    118   public    : Tcontrol_t         _write_rd     ;
    119   public    : Tgeneral_address_t _num_reg_rd   ;
    120   public    : Tcontrol_t         _write_re     ;
    121   public    : Tspecial_address_t _num_reg_re   ;
    122 
    123 #undef  FUNCTION
    124 #define FUNCTION "Tread_queue_head_entry_t::operator="
    125   public    : Tread_queue_head_entry_t& operator=(Tread_queue_entry_t x)
    126     {
    127       log_printf(FUNC,Read_queue,FUNCTION,"Begin");
    128          
    129       _context_id   = x._context_id   ;
    130       _front_end_id = x._front_end_id ;
    131       _ooo_engine_id= x._ooo_engine_id;
    132       _rob_id       = x._rob_id       ;
    133       _operation    = x._operation    ;
    134       _type         = x._type         ;
    135       _store_queue_ptr_write = x._store_queue_ptr_write;
    136       _load_queue_ptr_write  = x._load_queue_ptr_write ;
    137       _has_immediat = x._has_immediat ;
    138       _immediat     = x._immediat     ;
    139       _read_ra      = x._read_ra      ;
    140       _read_ra_val  = x._read_ra == 1 ; //if not must read, the registerFile is already access
    141       _num_reg_ra   = x._num_reg_ra   ;
    142       _data_ra_val  = x._read_ra == 0 ; //if not must read, the data is already valid
    143       _data_ra      = 0               ;
    144       _read_rb      = x._read_rb      ;
    145       _read_rb_val  = x._read_rb == 1 ;
    146       _num_reg_rb   = x._num_reg_rb   ;
    147       _data_rb_val  = x._read_rb == 0 ;
    148       _data_rb      = 0               ;
    149       _read_rc      = x._read_rc      ;
    150       _read_rc_val  = x._read_rc == 1 ;
    151       _num_reg_rc   = x._num_reg_rc   ;
    152       _data_rc_val  = x._read_rc == 0 ;
    153       _data_rc      = 0               ;
    154       _write_rd     = x._write_rd     ;
    155       _num_reg_rd   = x._num_reg_rd   ;
    156       _write_re     = x._write_re     ;
    157       _num_reg_re   = x._num_reg_re   ;
    158 
    159       log_printf(FUNC,Read_queue,FUNCTION,"End");
    160 
    161       return *this;
    162     }
    163 
    164     friend std::ostream& operator<< (std::ostream& output_stream,
    165                                 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Tread_queue_head_entry_t & x)
    166     {
    167       output_stream << " * _context_id            : " << x._context_id   << std::endl
    168                     << " * _front_end_id          : " << x._front_end_id << std::endl
    169                     << " * _ooo_engine_id         : " << x._ooo_engine_id<< std::endl
    170                     << " * _rob_id                : " << x._rob_id       << std::endl
    171                     << " * _operation             : " << x._operation    << std::endl
    172                     << " * _type                  : " << x._type         << std::endl
    173                     << " * _store_queue_ptr_write : " << toString(x._store_queue_ptr_write) << std::endl
    174                     << " * _load_queue_ptr_write  : " << toString(x._load_queue_ptr_write ) << std::endl
    175                     << " * _has_immediat          : " << x._has_immediat << std::endl
    176                     << " * _immediat              : " << x._immediat     << std::endl
    177                     << " * _read_ra               : " << x._read_ra      << std::endl
    178                     << " * _read_ra_val           : " << x._read_ra_val  << std::endl
    179                     << " * _num_reg_ra            : " << x._num_reg_ra   << std::endl
    180                     << " * _data_ra_val           : " << x._data_ra_val  << std::endl
    181                     << " * _data_ra               : " << x._data_ra      << std::endl
    182                     << " * _read_rb               : " << x._read_rb      << std::endl
    183                     << " * _read_rb_val           : " << x._read_rb_val  << std::endl
    184                     << " * _num_reg_rb            : " << x._num_reg_rb   << std::endl
    185                     << " * _data_rb_val           : " << x._data_rb_val  << std::endl
    186                     << " * _data_rb               : " << x._data_rb      << std::endl
    187                     << " * _read_rc               : " << x._read_rc      << std::endl
    188                     << " * _read_rc_val           : " << x._read_rc_val  << std::endl
    189                     << " * _num_reg_rc            : " << x._num_reg_rc   << std::endl
    190                     << " * _data_rc_val           : " << x._data_rc_val  << std::endl
    191                     << " * _data_rc               : " << x._data_rc      << std::endl
    192                     << " * _write_rd              : " << x._write_rd     << std::endl
    193                     << " * _num_reg_rd            : " << x._num_reg_rd   << std::endl
    194                     << " * _write_re              : " << x._write_re     << std::endl
    195                     << " * _num_reg_re            : " << x._num_reg_re   << std::endl;
    196 
    197       return output_stream;
    198     }
    199   };
    20039
    20140  class Read_queue
     
    20645    // -----[ fields ]----------------------------------------------------
    20746    // Parameters
    208   protected : const std::string                _name;
    209   protected : const Parameters               * _param;
     47  protected : const std::string  _name;
     48  protected : const Parameters * _param;
     49  private   : const Tusage_t     _usage;
    21050
    21151#ifdef STATISTICS
     
    345185                                              morpheo::behavioural::Parameters_Statistics * param_statistics,
    346186#endif
    347                                               Parameters                                  * param );
     187                                              Parameters                                  * param,
     188                                              morpheo::behavioural::Tusage_t                usage);
    348189                                               
    349190  public  :          Read_queue              (Parameters * param );
     
    381222}; // end namespace multi_execute_loop
    382223}; // end namespace core
    383 
    384224}; // end namespace behavioural
    385225}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue.cpp

    r81 r82  
    1818
    1919
    20 #ifdef SYSTEMC
    21   Read_queue::Read_queue (sc_module_name name,
     20  Read_queue::Read_queue
     21  (
     22#ifdef SYSTEMC
     23   sc_module_name name,
    2224#else
    23   Read_queue::Read_queue (string name,
     25   std::string name,
    2426#endif
    2527#ifdef STATISTICS
    26                               morpheo::behavioural::Parameters_Statistics            * param_statistics,
    27 #endif
    28                               morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters * param ):
    29                               _name              (name)
    30                               ,_param            (param)
     28   morpheo::behavioural::Parameters_Statistics            * param_statistics,
     29#endif
     30   morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters * param,
     31   morpheo::behavioural::Tusage_t usage ):
     32    _name              (name)
     33    ,_param            (param)
     34    ,_usage (usage)
    3135  {
    3236    log_printf(FUNC,Read_queue,"Read_queue","Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_allocation.cpp

    r81 r82  
    2323    log_printf(FUNC,Read_queue,"allocation","Begin");
    2424
    25     _component   = new Component ();
     25    _component   = new Component (_usage);
    2626
    2727    Entity * entity = _component->set_entity (_name       
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/src/test.cpp

    r81 r82  
    66 * Test
    77 */
     8#define NB_ITERATION  2
     9#define CYCLE_MAX     (2048*NB_ITERATION)
    810
    911#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/include/test.h"
    1012#include "Common/include/Test.h"
    1113#include "Common/include/BitManipulation.h"
    12 
    13 #define NB_ITERATION  2
    14 #define CYCLE_MAX     (2048*NB_ITERATION)
    15 
    16 #define LABEL(str)                                                                       \
    17 {                                                                                        \
    18   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
    19 } while(0)
    20 
    21 static uint32_t cycle = 0;
    22 
    23 #define SC_START(cycle_offset)                                          \
    24 do                                                                      \
    25 {                                                                       \
    26 /*cout << "SC_START (begin)" << endl;*/                                 \
    27                                                                         \
    28   uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
    29   sc_start(cycle_offset);                                               \
    30   if (cycle_current != cycle)                                           \
    31     {                                                                   \
    32       cycle = cycle_current;                                            \
    33       cout << "##########[ cycle "<< cycle << " ]" << endl;             \
    34     }                                                                   \
    35                                                                         \
    36   if (cycle_current > CYCLE_MAX)                                        \
    37     {                                                                   \
    38       TEST_KO("Maximal cycles Reached");                                \
    39     }                                                                   \
    40 /*cout << "SC_START (end  )" << endl;*/                                 \
    41 } while(0)
    4214
    4315void test (string name,
     
    5022#endif
    5123
    52   Reservation_station * _Reservation_station = new Reservation_station (name.c_str(),
     24  Reservation_station * _Reservation_station = new Reservation_station
     25    (name.c_str(),
    5326#ifdef STATISTICS
    54                                              _parameters_statistics,
     27     _parameters_statistics,
    5528#endif
    56                                              _param);
     29     _param,
     30     USE_ALL);
    5731 
    5832#ifdef SYSTEMC
     
    354328  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    355329    {
    356       LABEL("Iteration "+toString(iteration));
     330      LABEL("Iteration %d",iteration);
    357331
    358332      int32_t percent_transaction_queue_in     = (rand()%50)+25;
     
    507481              if (val)
    508482                {
    509                   LABEL(" * GPR_WRITE     ["+toString(i)+"] - gpr["+toString(num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(data));
     483                  LABEL(" * GPR_WRITE     [%d] - gpr[%d][%d] <- 0x%x",i,num_reg,ooo_engine,data);
    510484                  can_gpr_use [ooo_engine][num_reg] = false;
    511485                  need_gpr [ooo_engine][num_reg]    = false;
     
    533507              if (val == 1)
    534508                {
    535                   LABEL(" * SPR_WRITE     ["+toString(i)+"] - spr["+toString(num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(data));
     509                  LABEL(" * SPR_WRITE     [%d] - spr[%d][%d] <- 0x%x",i,num_reg,ooo_engine,data);
     510
    536511                  can_spr_use [ooo_engine][num_reg] = false;
    537512                  need_spr[ooo_engine][num_reg]     = false;
     
    560535              if (gpr_val)
    561536                {
    562                   LABEL(" * BYPASS_WRITE  ["+toString(i)+"] - gpr["+toString(gpr_num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(gpr_data));
     537                  LABEL(" * BYPASS_WRITE  [%d] - gpr[%d][%d] <- 0x%x",i,gpr_num_reg,ooo_engine,gpr_data);
    563538                  can_gpr_use [ooo_engine][gpr_num_reg] = false;
    564539                  need_gpr[ooo_engine][gpr_num_reg]     = false;
     
    580555              if (spr_val)
    581556                {
    582                   LABEL(" * BYPASS_WRITE  ["+toString(i)+"] - spr["+toString(spr_num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(spr_data));
     557                  LABEL(" * BYPASS_WRITE  [%d] - spr[%d][%d] <- 0x%x",i,spr_num_reg,ooo_engine,spr_data);
     558
    583559                  can_spr_use [ooo_engine][spr_num_reg] = false;
    584560                  need_spr[ooo_engine][spr_num_reg]     = false;
     
    608584              if (val)
    609585                {
    610                   LABEL(" * BYPASS_MEMORY ["+toString(i)+"] - gpr["+toString(num_reg)+"]["+toString(ooo_engine)+"] <- "+toString(data));
     586                  LABEL(" * BYPASS_MEMORY [%d] - spr[%d][%d] <- 0x%x",i,num_reg,ooo_engine,data);
     587
    611588                  can_gpr_use [ooo_engine][num_reg] = false;
    612589                  need_gpr [ooo_engine][num_reg] = false;
     
    622599              (out_INSERT_ACK->read() == 1))
    623600            {
    624               LABEL("Accepted INSERT  number : "+toString(request_in));
     601              LABEL("Accepted INSERT  number : %d",request_in);
    625602              request_in  ++;
    626603            }
     
    628605          for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
    629606            {
    630               LABEL("Test     RETIRE "+toString(i)+" : "+toString(out_RETIRE_VAL[i]->read())+","+toString(in_RETIRE_ACK[i]->read()));
     607              LABEL("Test     RETIRE %d : %d,%d",i,out_RETIRE_VAL[i]->read(),in_RETIRE_ACK[i]->read());
    631608              if ((out_RETIRE_VAL [i]->read() == 1) and
    632609                  ( in_RETIRE_ACK [i]->read() == 1))
     
    637614                  else
    638615                    rob_id = 0;
    639                   LABEL("Accepted RETIRE ["+toString(i)+"] number : "+toString(rob_id)+", request number : "+toString(request_out));
     616                  LABEL("Accepted RETIRE [%d] number : %d, request number : %d",i,rob_id,request_out);
    640617                  TEST(bool, request_out_wait [rob_id] , true);
    641618
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Reservation_station.h

    r81 r82  
    2121#endif
    2222#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Parameters.h"
    23 #include "Behavioural/include/Types.h"
     23#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Types.h"
    2424#ifdef STATISTICS
    2525#include "Behavioural/include/Stat.h"
     
    2929#include "Behavioural/include/Vhdl.h"
    3030#endif
     31#include "Behavioural/include/Usage.h"
    3132
    3233namespace morpheo {
     
    3940namespace reservation_station {
    4041
    41   class Treservation_station_entry_t
    42   {
    43   public    : Tcontext_t         _context_id     ;
    44   public    : Tcontext_t         _front_end_id   ;
    45   public    : Tcontext_t         _ooo_engine_id  ;
    46   public    : Tpacket_t          _rob_id         ;
    47   public    : Toperation_t       _operation   ;
    48   public    : Ttype_t            _type        ;
    49   public    : Tlsq_ptr_t         _store_queue_ptr_write;
    50   public    : Tlsq_ptr_t         _load_queue_ptr_write ;
    51   public    : Tcontrol_t         _has_immediat;
    52   public    : Tgeneral_data_t    _immediat    ;
    53 //public    : Tcontrol_t         _read_ra     ;
    54   public    : Tgeneral_address_t _num_reg_ra  ;
    55   public    : Tcontrol_t         _data_ra_val ;
    56   public    : Tgeneral_data_t    _data_ra     ;
    57 //public    : Tcontrol_t         _read_rb     ;
    58   public    : Tgeneral_address_t _num_reg_rb  ;
    59   public    : Tcontrol_t         _data_rb_val ;
    60   public    : Tgeneral_data_t    _data_rb     ;
    61 //public    : Tcontrol_t         _read_rc     ;
    62   public    : Tspecial_address_t _num_reg_rc  ;
    63   public    : Tcontrol_t         _data_rc_val ;
    64   public    : Tspecial_data_t    _data_rc     ;
    65   public    : Tcontrol_t         _write_rd    ;
    66   public    : Tgeneral_address_t _num_reg_rd  ;
    67   public    : Tcontrol_t         _write_re    ;
    68   public    : Tspecial_address_t _num_reg_re  ;
    69 
    70     friend std::ostream& operator<< (std::ostream& output_stream,
    71                                 morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Treservation_station_entry_t & x)
    72     {
    73       output_stream << " * _context_id            : " << toString(x._context_id     ) << std::endl
    74                     << " * _front_end_id          : " << toString(x._front_end_id   ) << std::endl
    75                     << " * _ooo_engine_id         : " << toString(x._ooo_engine_id  ) << std::endl
    76                     << " * _rob_id                : " << toString(x._rob_id         ) << std::endl
    77                     << " * _operation             : " << toString(x._operation      ) << std::endl
    78                     << " * _type                  : " << toString(x._type           ) << std::endl
    79                     << " * _store_queue_ptr_write : " << toString(x._store_queue_ptr_write) << std::endl
    80                     << " * _load_queue_ptr_write  : " << toString(x._load_queue_ptr_write ) << std::endl
    81                     << " * _has_immediat          : " << toString(x._has_immediat   ) << std::endl
    82                     << " * _immediat              : " << toString(x._immediat       ) << std::endl
    83 //                  << " * _read_ra               : " << toString(x._read_ra        ) << std::endl
    84                     << " * _num_reg_ra            : " << toString(x._num_reg_ra     ) << std::endl
    85                     << " * _data_ra_val           : " << toString(x._data_ra_val    ) << std::endl
    86                     << " * _data_ra               : " << toString(x._data_ra        ) << std::endl
    87 //                  << " * _read_rb               : " << toString(x._read_rb        ) << std::endl
    88                     << " * _num_reg_rb            : " << toString(x._num_reg_rb     ) << std::endl
    89                     << " * _data_rb_val           : " << toString(x._data_rb_val    ) << std::endl
    90                     << " * _data_rb               : " << toString(x._data_rb        ) << std::endl
    91 //                  << " * _read_rc               : " << toString(x._read_rc        ) << std::endl
    92                     << " * _num_reg_rc            : " << toString(x._num_reg_rc     ) << std::endl
    93                     << " * _data_rc_val           : " << toString(x._data_rc_val    ) << std::endl
    94                     << " * _data_rc               : " << toString(x._data_rc        ) << std::endl
    95                     << " * _write_rd              : " << toString(x._write_rd       ) << std::endl
    96                     << " * _num_reg_rd            : " << toString(x._num_reg_rd     ) << std::endl
    97                     << " * _write_re              : " << toString(x._write_re       ) << std::endl
    98                     << " * _num_reg_re            : " << toString(x._num_reg_re     ) << std::endl;
    99 
    100       return output_stream;
    101     }
    102   };
    103 
    10442  class Reservation_station
    10543#if SYSTEMC
     
    10947    // -----[ fields ]----------------------------------------------------
    11048    // Parameters
    111   protected : const std::string       _name;
    112 
     49  protected : const std::string  _name;
    11350  protected : const Parameters * _param;
     51  private   : const Tusage_t     _usage;
    11452
    11553#ifdef STATISTICS
     
    241179                                                       morpheo::behavioural::Parameters_Statistics * param_statistics,
    242180#endif
    243                                                        Parameters                                  * param );
     181                                                       Parameters                                  * param,
     182                                                       morpheo::behavioural::Tusage_t                usage );
     183
    244184  public  :          ~Reservation_station             (void);
    245185                                               
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station.cpp

    r81 r82  
    2020#undef  FUNCTION
    2121#define FUNCTION "Reservation_station::Reservation_station"
     22
     23  Reservation_station::Reservation_station
     24  (
    2225#ifdef SYSTEMC
    23   Reservation_station::Reservation_station (sc_module_name name,
     26   sc_module_name name,
    2427#else
    25   Reservation_station::Reservation_station (string name,
     28   std::string name,
    2629#endif
    2730#ifdef STATISTICS
    28                           morpheo::behavioural::Parameters_Statistics * param_statistics,
     31   morpheo::behavioural::Parameters_Statistics * param_statistics,
    2932#endif
    30                           morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters * param ):
    31                               _name              (name)
    32                               ,_param            (param)
     33   morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters * param,
     34   morpheo::behavioural::Tusage_t                usage ):
     35    _name   (name)
     36    ,_param (param)
     37    ,_usage (usage)
    3338  {
    3439    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_allocation.cpp

    r81 r82  
    2626    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
    2727
    28     _component   = new Component ();
     28    _component   = new Component (_usage);
    2929
    3030    Entity * entity = _component->set_entity (_name       
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Behavioural/include/Allocation.h"
    12 
    13 #define NB_ITERATION  1
    14 #define CYCLE_MAX     (128*NB_ITERATION)
    15 
    16 #define LABEL(str...)                                                   \
    17   {                                                                     \
    18     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    19     msg (str);                                                          \
    20     msg (_("\n"));                                                      \
    21   } while(0)
    22 
    23 #define SC_START(cycle_offset)                                                       \
    24   do                                                                                 \
    25     {                                                                                \
    26       /*cout << "SC_START (begin)" << endl;*/                                        \
    27                                                                                      \
    28       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    29       if (cycle_offset != 0)                                                         \
    30         {                                                                            \
    31           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    32         }                                                                            \
    33                                                                                      \
    34       if (cycle_current > CYCLE_MAX)                                                 \
    35         {                                                                            \
    36           TEST_KO("Maximal cycles Reached");                                         \
    37         }                                                                            \
    38                                                                                      \
    39       sc_start(cycle_offset);                                                        \
    40                                                                                      \
    41       /*cout << "SC_START (end  )" << endl;*/                                        \
    42     } while(0)
    4315
    4416void test (string name,
     
    5123#endif
    5224
    53   Read_unit * _Read_unit = new Read_unit (name.c_str(),
     25  Read_unit * _Read_unit = new Read_unit
     26    (name.c_str(),
    5427#ifdef STATISTICS
    55                                              _parameters_statistics,
    56 #endif
    57                                              _param);
     28     _parameters_statistics,
     29#endif
     30     _param,
     31     USE_ALL);
    5832 
    5933#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/include/Read_unit.h

    r81 r82  
    178178#endif
    179179   Parameters                                  * param,
    180    morpheo::behavioural::Tusage_t                usage=USE_ALL
     180   morpheo::behavioural::Tusage_t                usage
    181181   );
    182182  public  :          ~Read_unit             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Read_unit_allocation.cpp

    r81 r82  
    184184       name = _name+"_read_queue";
    185185       
    186        _component_read_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Read_queue (name.c_str()
     186       _component_read_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Read_queue
     187         (name.c_str()
    187188#ifdef STATISTICS
    188                                                                                                                                                       ,param_statistics
    189 #endif
    190                                                                                                                                                       ,_param->_param_read_queue);
     189          ,param_statistics
     190#endif
     191          ,_param->_param_read_queue
     192          ,_usage);
    191193       
    192194       _component->set_component (_component_read_queue->_component
     
    199201       name = _name+"_reservation_station";
    200202       
    201        _component_reservation_station  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Reservation_station (name.c_str()
     203       _component_reservation_station  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Reservation_station
     204         (name.c_str()
    202205#ifdef STATISTICS
    203                                                                                                                                                                                  ,param_statistics
    204 #endif
    205                                                                                                                                                                                  ,_param->_param_reservation_station);
     206          ,param_statistics
     207#endif
     208          ,_param->_param_reservation_station
     209          ,_usage);
    206210       
    207211       _component->set_component (_component_reservation_station->_component
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Behavioural/include/Allocation.h"
    1215#include "Common/include/BitManipulation.h"
    13 
    14 #define NB_ITERATION  1
    15 #define CYCLE_MAX     (128*NB_ITERATION)
    16 
    17 #define LABEL(str...)                                                   \
    18   {                                                                     \
    19     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    20     msg (str);                                                          \
    21     msg (_("\n"));                                                      \
    22   } while(0)
    23 
    24 #define SC_START(cycle_offset)                                                       \
    25   do                                                                                 \
    26     {                                                                                \
    27       /*cout << "SC_START (begin)" << endl;*/                                        \
    28                                                                                      \
    29       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    30       if (cycle_offset != 0)                                                         \
    31         {                                                                            \
    32           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    33         }                                                                            \
    34                                                                                      \
    35       if (cycle_current > CYCLE_MAX)                                                 \
    36         {                                                                            \
    37           TEST_KO("Maximal cycles Reached");                                         \
    38         }                                                                            \
    39                                                                                      \
    40       sc_start(cycle_offset);                                                        \
    41                                                                                      \
    42       /*cout << "SC_START (end  )" << endl;*/                                        \
    43     } while(0)
    4416
    4517  class entry_t
     
    10981#endif
    11082
    111   Execute_queue * _Execute_queue = new Execute_queue (name.c_str(),
     83  Execute_queue * _Execute_queue = new Execute_queue
     84    (name.c_str(),
    11285#ifdef STATISTICS
    113                                              _parameters_statistics,
     86     _parameters_statistics,
    11487#endif
    115                                              _param);
     88     _param,
     89     USE_ALL);
    11690 
    11791#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h

    r81 r82  
    1717#include "Common/include/ToString.h"
    1818#include "Common/include/Debug.h"
    19 #include "Behavioural/include/Types.h"
    2019
    2120#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h"
     21#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Types.h"
    2222#ifdef STATISTICS
    2323#include "Behavioural/include/Stat.h"
     
    3131namespace morpheo {
    3232namespace behavioural {
    33 
    3433namespace core {
    3534namespace multi_execute_loop {
     
    3837namespace write_unit {
    3938namespace execute_queue {
    40 
    41 
    42   class execute_queue_entry_t
    43   {
    44   public  : Tcontext_t         _context_id   ;
    45   public  : Tcontext_t         _front_end_id ;
    46   public  : Tcontext_t         _ooo_engine_id;
    47   public  : Tpacket_t          _packet_id    ;
    48 //public  : Toperation_t       _operation    ;
    49 //public  : Ttype_t            _type         ;
    50   public  : Tspecial_data_t    _flags        ;
    51   public  : Texception_t       _exception    ;
    52   public  : Tcontrol_t         _no_sequence  ;
    53   public  : Tgeneral_data_t    _address      ;
    54    
    55   public  : execute_queue_entry_t (Tcontext_t         context_id   ,
    56                                    Tcontext_t         front_end_id ,
    57                                    Tcontext_t         ooo_engine_id,
    58                                    Tpacket_t          packet_id    ,
    59                                  //Toperation_t       operation    ,
    60                                  //Ttype_t            type         ,
    61                                    Tspecial_data_t    flags        ,
    62                                    Texception_t       exception    ,
    63                                    Tcontrol_t         no_sequence  ,
    64                                    Tgeneral_data_t    address      )
    65     {
    66       _context_id    = context_id   ;
    67       _front_end_id  = front_end_id ;
    68       _ooo_engine_id = ooo_engine_id;
    69       _packet_id     = packet_id    ;
    70     //_operation     = operation    ;
    71     //_type          = type         ;
    72       _flags         = flags        ;
    73       _exception     = exception    ;
    74       _no_sequence   = no_sequence  ;
    75       _address       = address      ;
    76     };
    77   };
    78 
    7939
    8040  class Execute_queue
     
    159119#endif
    160120   Parameters                                  * param,
    161    morpheo::behavioural::Tusage_t                usage=USE_ALL
     121   morpheo::behavioural::Tusage_t                usage
    162122   );
    163123  public  :          ~Execute_queue             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Common/include/BitManipulation.h"
    1215#include "Behavioural/include/Allocation.h"
    13 
    14 #define NB_ITERATION  1
    15 #define CYCLE_MAX     (128*NB_ITERATION)
    16 
    17 #define LABEL(str...)                                                   \
    18   {                                                                     \
    19     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    20     msg (str);                                                          \
    21     msg (_("\n"));                                                      \
    22   } while(0)
    23 
    24 #define SC_START(cycle_offset)                                                       \
    25   do                                                                                 \
    26     {                                                                                \
    27       /*cout << "SC_START (begin)" << endl;*/                                        \
    28                                                                                      \
    29       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    30       if (cycle_offset != 0)                                                         \
    31         {                                                                            \
    32           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    33         }                                                                            \
    34                                                                                      \
    35       if (cycle_current > CYCLE_MAX)                                                 \
    36         {                                                                            \
    37           TEST_KO("Maximal cycles Reached");                                         \
    38         }                                                                            \
    39                                                                                      \
    40       sc_start(cycle_offset);                                                        \
    41                                                                                      \
    42       /*cout << "SC_START (end  )" << endl;*/                                        \
    43     } while(0)
    4416
    4517  class entry_t
     
    12799#endif
    128100
    129   Write_unit * _Write_unit = new Write_unit (name.c_str(),
     101  Write_unit * _Write_unit = new Write_unit
     102    (name.c_str(),
    130103#ifdef STATISTICS
    131                                              _parameters_statistics,
     104     _parameters_statistics,
    132105#endif
    133                                              _param);
     106     _param,
     107     USE_ALL);
    134108 
    135109#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Common/include/BitManipulation.h"
    1215#include "Behavioural/include/Allocation.h"
    13 
    14 #define NB_ITERATION  1
    15 #define CYCLE_MAX     (128*NB_ITERATION)
    16 
    17 #define LABEL(str...)                                                   \
    18   {                                                                     \
    19     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    20     msg (str);                                                          \
    21     msg (_("\n"));                                                      \
    22   } while(0)
    23 
    24 #define SC_START(cycle_offset)                                                       \
    25   do                                                                                 \
    26     {                                                                                \
    27       /*cout << "SC_START (begin)" << endl;*/                                        \
    28                                                                                      \
    29       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    30       if (cycle_offset != 0)                                                         \
    31         {                                                                            \
    32           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    33         }                                                                            \
    34                                                                                      \
    35       if (cycle_current > CYCLE_MAX)                                                 \
    36         {                                                                            \
    37           TEST_KO("Maximal cycles Reached");                                         \
    38         }                                                                            \
    39                                                                                      \
    40       sc_start(cycle_offset);                                                        \
    41                                                                                      \
    42       /*cout << "SC_START (end  )" << endl;*/                                        \
    43     } while(0)
    4416
    4517  class entry_t
     
    12799
    128100
    129   Write_queue * _Write_queue = new Write_queue (name.c_str(),
     101  Write_queue * _Write_queue = new Write_queue
     102    (name.c_str(),
    130103#ifdef STATISTICS
    131                                              _parameters_statistics,
     104     _parameters_statistics,
    132105#endif
    133                                              _param);
     106     _param,
     107     USE_ALL);
    134108 
    135109#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h

    r81 r82  
    1717#include "Common/include/ToString.h"
    1818#include "Common/include/Debug.h"
    19 #include "Behavioural/include/Types.h"
    2019
    2120#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Parameters.h"
     21#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Types.h"
     22
    2223#ifdef STATISTICS
    2324#include "Behavioural/include/Stat.h"
     
    3738namespace write_unit {
    3839namespace write_queue {
    39 
    40   class write_queue_entry_t
    41   {
    42   public  : Tcontext_t         _context_id   ;
    43   public  : Tcontext_t         _front_end_id ;
    44   public  : Tcontext_t         _ooo_engine_id;
    45   public  : Tpacket_t          _packet_id    ;
    46 //public  : Toperation_t       _operation    ;
    47   public  : Ttype_t            _type         ;
    48   public  : Tcontrol_t         _write_rd     ;
    49   public  : Tgeneral_address_t _num_reg_rd   ;
    50   public  : Tgeneral_data_t    _data_rd      ;
    51   public  : Tcontrol_t         _write_re     ;
    52   public  : Tspecial_address_t _num_reg_re   ;
    53   public  : Tspecial_data_t    _data_re      ;
    54   public  : Texception_t       _exception    ;
    55   public  : Tcontrol_t         _no_sequence  ;
    56   public  : Tgeneral_data_t    _address      ;
    57    
    58   public  : write_queue_entry_t (Tcontext_t         context_id   ,
    59                                  Tcontext_t         front_end_id ,
    60                                  Tcontext_t         ooo_engine_id,
    61                                  Tpacket_t          packet_id    ,
    62                                //Toperation_t       operation    ,
    63                                  Ttype_t            type         ,
    64                                  Tcontrol_t         write_rd     ,
    65                                  Tgeneral_address_t num_reg_rd   ,
    66                                  Tgeneral_data_t    data_rd      ,
    67                                  Tcontrol_t         write_re     ,
    68                                  Tspecial_address_t num_reg_re   ,
    69                                  Tspecial_data_t    data_re      ,
    70                                  Texception_t       exception    ,
    71                                  Tcontrol_t         no_sequence  ,
    72                                  Tgeneral_data_t    address      )
    73     {
    74       _context_id    = context_id   ;
    75       _front_end_id  = front_end_id ;
    76       _ooo_engine_id = ooo_engine_id;
    77       _packet_id     = packet_id    ;
    78     //_operation     = operation    ;
    79       _type          = type         ;
    80       _write_rd      = write_rd     ;
    81       _num_reg_rd    = num_reg_rd   ;
    82       _data_rd       = data_rd      ;
    83       _write_re      = write_re     ;
    84       _num_reg_re    = num_reg_re   ;
    85       _data_re       = data_re      ;
    86       _exception     = exception    ;
    87       _no_sequence   = no_sequence  ;
    88       _address       = address      ;
    89     };
    90   };
    91 
    9240
    9341  class Write_queue
     
    204152#endif
    205153   Parameters                                  * param,
    206    morpheo::behavioural::Tusage_t                usage=USE_ALL
     154   morpheo::behavioural::Tusage_t                usage
    207155   );
    208156  public  :          ~Write_queue             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/include/Write_unit.h

    r81 r82  
    145145#endif
    146146   Parameters                                  * param,
    147    morpheo::behavioural::Tusage_t                usage=USE_ALL
     147   morpheo::behavioural::Tusage_t                usage
    148148   );
    149149  public  :          ~Write_unit             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_allocation.cpp

    r81 r82  
    139139       name = _name+"_write_queue";
    140140       
    141        component_write_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Write_queue (name.c_str()
     141       component_write_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Write_queue
     142         (name.c_str()
    142143#ifdef STATISTICS
    143                                                                                                                                                           ,param_statistics
    144 #endif
    145                                                                                                                                                           ,_param->_param_write_queue);
     144          ,param_statistics
     145#endif
     146          ,_param->_param_write_queue
     147          ,_usage);
    146148       
    147149       _component->set_component (component_write_queue->_component
     
    156158       name = _name+"_execute_queue";
    157159       
    158        component_execute_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Execute_queue (name.c_str()
     160       component_execute_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Execute_queue
     161         (name.c_str()
    159162#ifdef STATISTICS
    160                                                                                                                                                                 ,param_statistics
    161 #endif
    162                                                                                                                                                                 ,_param->_param_execute_queue);
     163          ,param_statistics
     164#endif
     165          ,_param->_param_execute_queue
     166          ,_usage);
    163167       
    164168       _component->set_component (component_execute_queue->_component
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
     
    1215#include "Behavioural/include/Allocation.h"
    1316#include <set>
    14 
    15 #define NB_ITERATION  1
    16 #define CYCLE_MAX     (128*NB_ITERATION)
    17 
    18 #define LABEL(str...)                                                   \
    19   {                                                                     \
    20     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    21     msg (str);                                                          \
    22     msg (_("\n"));                                                      \
    23   } while(0)
    24 
    25 #define SC_START(cycle_offset)                                                       \
    26   do                                                                                 \
    27     {                                                                                \
    28       /*cout << "SC_START (begin)" << endl;*/                                        \
    29                                                                                      \
    30       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    31       if (cycle_offset != 0)                                                         \
    32         {                                                                            \
    33           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    34         }                                                                            \
    35                                                                                      \
    36       if (cycle_current > CYCLE_MAX)                                                 \
    37         {                                                                            \
    38           TEST_KO("Maximal cycles Reached");                                         \
    39         }                                                                            \
    40                                                                                      \
    41       sc_start(cycle_offset);                                                        \
    42                                                                                      \
    43       /*cout << "SC_START (end  )" << endl;*/                                        \
    44     } while(0)
    4517
    4618
     
    10678#endif
    10779
    108   Execution_unit_to_Write_unit * _Execution_unit_to_Write_unit = new Execution_unit_to_Write_unit (name.c_str(),
     80  Execution_unit_to_Write_unit * _Execution_unit_to_Write_unit = new Execution_unit_to_Write_unit
     81    (name.c_str(),
    10982#ifdef STATISTICS
    110                                              _parameters_statistics,
     83     _parameters_statistics,
    11184#endif
    112                                              _param);
     85     _param,
     86     USE_ALL);
    11387 
    11488#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Execution_unit_to_Write_unit.h

    r81 r82  
    126126#endif
    127127   Parameters                                  * param,
    128    morpheo::behavioural::Tusage_t                usage=USE_ALL
     128   morpheo::behavioural::Tusage_t                usage
    129129   );
    130130  public  :          ~Execution_unit_to_Write_unit             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
     
    1316#include <list>
    1417#include <set>
    15 
    16 #define NB_ITERATION  1
    17 #define CYCLE_MAX     (128*NB_ITERATION)
    18 
    19 #define LABEL(str...)                                                   \
    20   {                                                                     \
    21     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    22     msg (str);                                                          \
    23     msg (_("\n"));                                                      \
    24   } while(0)
    25 
    26 #define SC_START(cycle_offset)                                                       \
    27   do                                                                                 \
    28     {                                                                                \
    29       /*cout << "SC_START (begin)" << endl;*/                                        \
    30                                                                                      \
    31       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    32       if (cycle_offset != 0)                                                         \
    33         {                                                                            \
    34           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    35         }                                                                            \
    36                                                                                      \
    37       if (cycle_current > CYCLE_MAX)                                                 \
    38         {                                                                            \
    39           TEST_KO("Maximal cycles Reached");                                         \
    40         }                                                                            \
    41                                                                                      \
    42       sc_start(cycle_offset);                                                        \
    43                                                                                      \
    44       /*cout << "SC_START (end  )" << endl;*/                                        \
    45     } while(0)
    46 
    4718
    4819class entry_t
     
    11384#endif
    11485
    115   Read_unit_to_Execution_unit * _Read_unit_to_Execution_unit = new Read_unit_to_Execution_unit (name.c_str(),
     86  Read_unit_to_Execution_unit * _Read_unit_to_Execution_unit = new Read_unit_to_Execution_unit
     87    (name.c_str(),
    11688#ifdef STATISTICS
    117                                              _parameters_statistics,
     89     _parameters_statistics,
    11890#endif
    119                                              _param);
     91     _param,
     92     USE_ALL);
    12093 
    12194#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/include/Read_unit_to_Execution_unit.h

    r81 r82  
    130130#endif
    131131   Parameters                                  * param,
    132    morpheo::behavioural::Tusage_t                usage=USE_ALL
     132   morpheo::behavioural::Tusage_t                usage
    133133   );
    134134  public  :          ~Read_unit_to_Execution_unit             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  128
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    11 
    12 #define NB_ITERATION  128
    13 #define CYCLE_MAX     (128*NB_ITERATION)
    14 
    15 #define LABEL(str)                                                                       \
    16 {                                                                                        \
    17   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
    18 } while(0)
    19 
    20 static uint32_t cycle = 0;
    21 
    22 #define SC_START(cycle_offset)                                          \
    23 do                                                                      \
    24 {                                                                       \
    25 /*cout << "SC_START (begin)" << endl;*/                                 \
    26                                                                         \
    27   uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
    28   if (cycle_current != cycle)                                           \
    29     {                                                                   \
    30       cycle = cycle_current;                                            \
    31       cout << "##########[ cycle "<< cycle << " ]" << endl;             \
    32     }                                                                   \
    33                                                                         \
    34   if (cycle_current > CYCLE_MAX)                                        \
    35     {                                                                   \
    36       TEST_KO("Maximal cycles Reached");                                \
    37     }                                                                   \
    38   sc_start(cycle_offset);                                               \
    39 /*cout << "SC_START (end  )" << endl;*/                                 \
    40 } while(0)
    4114
    4215void test (string name,
     
    4922#endif
    5023
    51   Register_unit_Glue * _Register_unit_Glue = new Register_unit_Glue (name.c_str(),
     24  Register_unit_Glue * _Register_unit_Glue = new Register_unit_Glue
     25    (name.c_str(),
    5226#ifdef STATISTICS
    53                                              _parameters_statistics,
     27     _parameters_statistics,
    5428#endif
    55                                              _param);
     29     _param,
     30     USE_ALL);
    5631 
    5732#ifdef SYSTEMC
     
    575550  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    576551    {
    577       LABEL("Iteration "+toString(iteration));
     552      LABEL("Iteration %d",iteration);
    578553
    579554      if (test_read == true)
     
    584559              Tcontrol_t      val = (rand()%100)<=percent_transaction;
    585560             
    586               LABEL("GPR_READ  ["+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));
     561              LABEL("GPR_READ  [%d] : %d - %d",j,val,context);
    587562             
    588563              in_GPR_READ_VAL           [j] ->write(val);
     
    623598              Tcontrol_t      val = (rand()%100)<=percent_transaction;
    624599             
    625               LABEL("SPR_READ  ["+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));
     600              LABEL("SPR_READ  [%d] : %d - %d",j,val,context);
    626601             
    627602              in_SPR_READ_VAL           [j] ->write(val);
     
    666641              Tcontrol_t      val = (rand()%100)<=percent_transaction;
    667642             
    668               LABEL("GPR_WRITE ["+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));
    669              
     643              LABEL("GPR_WRITE [%d] : %d - %d",j,val,context);
     644
    670645              in_GPR_WRITE_VAL           [j] ->write(val);
    671646              in_GPR_WRITE_OOO_ENGINE_ID [j] ->write(context);
     
    701676              Tcontrol_t      val = (rand()%100)<=percent_transaction;
    702677             
    703               LABEL("SPR_WRITE ["+toString(j)+"] : "+toString(val)+" - " +toString(static_cast<uint32_t>(context)));
     678              LABEL("SPR_WRITE [%d] : %d - %d",j,val,context);
    704679             
    705680              in_SPR_WRITE_VAL           [j] ->write(val);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h

    r81 r82  
    169169#endif
    170170   Parameters                                  * param,
    171    morpheo::behavioural::Tusage_t                usage=USE_ALL
     171   morpheo::behavioural::Tusage_t                usage
    172172   );
    173173  public  :          ~Register_unit_Glue             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_allocation.cpp

    r81 r82  
    2424    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
    2525
    26     _component   = new Component ();
     26    _component   = new Component (_usage);
    2727
    2828    Entity * entity = _component->set_entity (_name       
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (10240*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    11 
    12 #define NB_ITERATION  1
    13 #define CYCLE_MAX     (10240*NB_ITERATION)
    14 
    15 #define LABEL(str)                                                                       \
    16 {                                                                                        \
    17   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
    18 } while(0)
    19 
    20 static uint32_t cycle = 0;
    21 
    22 #define SC_START(cycle_offset)                                          \
    23 do                                                                      \
    24 {                                                                       \
    25 /*cout << "SC_START (begin)" << endl;*/                                 \
    26                                                                         \
    27   uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
    28   if (cycle_current != cycle)                                           \
    29     {                                                                   \
    30       cycle = cycle_current;                                            \
    31       cout << "##########[ cycle "<< cycle << " ]" << endl;             \
    32     }                                                                   \
    33                                                                         \
    34   if (cycle_current > CYCLE_MAX)                                        \
    35     {                                                                   \
    36       TEST_KO("Maximal cycles Reached");                                \
    37     }                                                                   \
    38   sc_start(cycle_offset);                                               \
    39 /*cout << "SC_START (end  )" << endl;*/                                 \
    40 } while(0)
    4114
    4215void test (string name,
     
    4922#endif
    5023
    51   Register_unit * _Register_unit = new Register_unit (name.c_str(),
     24  Register_unit * _Register_unit = new Register_unit
     25    (name.c_str(),
    5226#ifdef STATISTICS
    53                                              _parameters_statistics,
     27     _parameters_statistics,
    5428#endif
    55                                              _param);
     29     _param,
     30     USE_ALL);
    5631 
    5732#ifdef SYSTEMC
     
    406381  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    407382    {
    408       LABEL("Iteration "+toString(iteration));
     383      LABEL("Iteration %d",iteration);
    409384
    410385      LABEL("(GPR) Write default value");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Register_unit.h

    r81 r82  
    142142#endif
    143143   Parameters                                  * param,
    144    morpheo::behavioural::Tusage_t                usage=USE_ALL
     144   morpheo::behavioural::Tusage_t                usage
    145145   );
    146146  public  :          ~Register_unit             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp

    r81 r82  
    2929    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
    3030
    31     _component   = new Component ();
     31    _component   = new Component (_usage);
    3232
    3333    Entity * entity = _component->set_entity (_name       
     
    270270#endif
    271271           ,_param->_param_gpr [i]
     272           ,_usage
    272273           );
    273274         
     
    290291#endif
    291292           ,_param->_param_gpr_status [i]
     293           ,_usage
    292294           );
    293295
     
    310312#endif
    311313           ,_param->_param_spr [i]
     314           ,_usage
    312315           );
    313316
     
    329332#endif
    330333           ,_param->_param_spr_status [i]
     334           ,_usage
    331335           );
    332336
     
    350354#endif
    351355       ,_param->_param_glue
     356       ,_usage
    352357       );
    353358
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Behavioural/include/Allocation.h"
    1215
    13 #define NB_ITERATION  1
    14 #define CYCLE_MAX     (128*NB_ITERATION)
    15 
    16 #define LABEL(str...)                                                   \
    17   {                                                                     \
    18     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    19     msg (str);                                                          \
    20     msg (_("\n"));                                                      \
    21   } while(0)
    22 
    23 #define SC_START(cycle_offset)                                                       \
    24   do                                                                                 \
    25     {                                                                                \
    26       /*cout << "SC_START (begin)" << endl;*/                                        \
    27                                                                                      \
    28       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    29       if (cycle_offset != 0)                                                         \
    30         {                                                                            \
    31           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    32         }                                                                            \
    33                                                                                      \
    34       if (cycle_current > CYCLE_MAX)                                                 \
    35         {                                                                            \
    36           TEST_KO("Maximal cycles Reached");                                         \
    37         }                                                                            \
    38                                                                                      \
    39       sc_start(cycle_offset);                                                        \
    40                                                                                      \
    41       /*cout << "SC_START (end  )" << endl;*/                                        \
    42     } while(0)
    4316
    4417void test (string name,
     
    5124#endif
    5225
    53   Execute_loop * _Execute_loop = new Execute_loop (name.c_str(),
     26  Execute_loop * _Execute_loop = new Execute_loop
     27    (name.c_str(),
    5428#ifdef STATISTICS
    55                                              _parameters_statistics,
     29     _parameters_statistics,
    5630#endif
    57                                              _param);
     31     _param,
     32     USE_ALL);
    5833 
    5934#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Execute_loop.h

    r81 r82  
    176176#endif
    177177   Parameters                                  * param,
    178    morpheo::behavioural::Tusage_t                usage=USE_ALL
     178   morpheo::behavioural::Tusage_t                usage
    179179   );
    180180  public  :          ~Execute_loop             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Execute_loop_allocation.cpp

    r81 r82  
    164164            ,param_statistics
    165165#endif
    166             ,_param->_param_read_unit[i]);
     166            ,_param->_param_read_unit[i]
     167            ,_usage);
    167168
    168169         _component->set_component (_component_read_unit [i]->_component
     
    184185            ,param_statistics
    185186#endif
    186             ,_param->_param_functionnal_unit[i]);
     187            ,_param->_param_functionnal_unit[i]
     188            ,_usage);
    187189
    188190         _component->set_component (_component_functionnal_unit [i]->_component
     
    204206            ,param_statistics
    205207#endif
    206             ,_param->_param_load_store_unit[i]);
     208            ,_param->_param_load_store_unit[i]
     209            ,_usage);
    207210
    208211         _component->set_component (_component_load_store_unit [i]->_component
     
    224227            ,param_statistics
    225228#endif
    226             ,_param->_param_write_unit[i]);
     229            ,_param->_param_write_unit[i]
     230            ,_usage);
    227231
    228232         _component->set_component (_component_write_unit [i]->_component
     
    242246          ,param_statistics
    243247#endif
    244           ,_param->_param_read_unit_to_execution_unit);
     248          ,_param->_param_read_unit_to_execution_unit
     249          ,_usage);
    245250       
    246251       _component->set_component (_component_read_unit_to_execution_unit->_component
     
    260265          ,param_statistics
    261266#endif
    262           ,_param->_param_execution_unit_to_write_unit);
     267          ,_param->_param_execution_unit_to_write_unit
     268          ,_usage);
    263269       
    264270       _component->set_component (_component_execution_unit_to_write_unit->_component
     
    278284          ,param_statistics
    279285#endif
    280           ,_param->_param_register_unit);
     286          ,_param->_param_register_unit
     287          ,_usage);
    281288       
    282289       _component->set_component (_component_register_unit->_component
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (2048*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/include/test.h"
    1013#include <list>
    1114#include "Common/include/Test.h"
    1215#include "Behavioural/include/Allocation.h"
    13 
    14 #define NB_ITERATION  1
    15 #define CYCLE_MAX     (2048*NB_ITERATION)
    16 
    17 #define LABEL(str...)                                                   \
    18   {                                                                     \
    19     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    20     msg (str);                                                          \
    21     msg (_("\n"));                                                      \
    22   } while(0)
    23 
    24 #define SC_START(cycle_offset)                                                       \
    25   do                                                                                 \
    26     {                                                                                \
    27       /*cout << "SC_START (begin)" << endl;*/                                        \
    28                                                                                      \
    29       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    30       if (cycle_offset != 0)                                                         \
    31         {                                                                            \
    32           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    33         }                                                                            \
    34                                                                                      \
    35       if (cycle_current > CYCLE_MAX)                                                 \
    36         {                                                                            \
    37           TEST_KO("Maximal cycles Reached");                                         \
    38         }                                                                            \
    39                                                                                      \
    40       sc_start(cycle_offset);                                                        \
    41                                                                                      \
    42       /*cout << "SC_START (end  )" << endl;*/                                        \
    43     } while(0)
    4416
    4517  class entry_t
     
    151123#endif
    152124
    153   Decod * _Decod = new Decod (name.c_str(),
     125  Decod * _Decod = new Decod
     126    (name.c_str(),
    154127#ifdef STATISTICS
    155                               _parameters_statistics,
     128     _parameters_statistics,
    156129#endif
    157                               _param);
     130     _param,
     131     USE_ALL);
    158132 
    159133#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h

    r81 r82  
    159159#endif
    160160   Parameters                                  * param,
    161    morpheo::behavioural::Tusage_t                usage=USE_ALL
     161   morpheo::behavioural::Tusage_t                usage
    162162   );
    163163  public  :          ~Decod             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Parameters.h

    r81 r82  
    6666  public : ~Parameters () ;
    6767
    68   public :        std::string  msg_error  (void);
     68  public :        Parameters_test msg_error  (void);
    6969
    70   public :        std::string   print      (uint32_t depth);
    71   public : friend std::ostream& operator<< (std::ostream& output_stream,
    72                                             morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::Parameters & x);
     70  public :        std::string     print      (uint32_t depth);
     71  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     72                                              morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::Parameters & x);
    7373  };
    7474
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Parameters_msg_error.cpp

    r81 r82  
    2121#undef  FUNCTION
    2222#define FUNCTION "Decod::msg_error"
    23   std::string Parameters::msg_error(void)
     23  Parameters_test Parameters::msg_error(void)
    2424  {
    2525    log_printf(FUNC,Decod,FUNCTION,"Begin");
    26 
    27     std::string msg = "";
     26   
     27    Parameters_test test("Decod");
    2828
    2929    if (_nb_inst_decod == 0)
    30       msg += "  - nb_inst_decod must be > 0.\n";
     30      test.error(_("nb_inst_decod must be > 0.\n"));
    3131
    3232    if ((_size_general_data != 32) and
    3333        (_size_general_data != 64))
    34       msg += "  - size_general_data must be equal at 32 or 64 bits.\n";
     34      test.error(_("size_general_data must be equal at 32 or 64 bits.\n"));
    3535
    3636    if ((_nb_branch_speculated == 0) or
    3737        (_nb_branch_speculated > _nb_context))
    38       msg += "  - nb_branch_speculated must be in [1:nb_context].\n";
     38      test.error(_("nb_branch_speculated must be in [1:nb_context].\n"));
    3939
    4040    if ((_nb_context_select == 0) or
    4141        (_nb_context_select > _nb_context))
    42       msg += "  - nb_context_select must be in [1:nb_context].\n";
     42      test.error(_("nb_context_select must be in [1:nb_context].\n"));
    4343
    4444    if ((_priority != PRIORITY_ROUND_ROBIN))
    45       msg += "  - Unsupported priority scheme. Supported scheme are : "+toString(PRIORITY_ROUND_ROBIN)+".\n";
     45      test.error(toString(_("Unsupported priority scheme. Supported scheme are : %s.\n"),toString(PRIORITY_ROUND_ROBIN).c_str()));
    4646   
    4747    if ((_load_balancing != LOAD_BALANCING_MAXIMUM_FOR_PRIORITY))
    48       msg += "  - Unsupported load_balancing scheme. Supported scheme are : "+toString(LOAD_BALANCING_MAXIMUM_FOR_PRIORITY)+".\n";
     48      test.error(toString(_("Unsupported load_balancing scheme. Supported scheme are : %s.\n"),toString(LOAD_BALANCING_MAXIMUM_FOR_PRIORITY).c_str()));
    4949
    50     return msg;
     50    return test;
    5151
    5252    log_printf(FUNC,Decod,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9
     10#define NB_ITERATION  1024
     11#define CYCLE_MAX     (128*NB_ITERATION)
     12
    913#include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/include/test.h"
    1014#include "Common/include/Test.h"
    1115#include "Behavioural/include/Allocation.h"
    12 
    13 #define NB_ITERATION  1024
    14 #define CYCLE_MAX     (128*NB_ITERATION)
    15 
    16 #define LABEL(str...)                                                   \
    17   {                                                                     \
    18     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    19     msg (str);                                                          \
    20     msg (_("\n"));                                                      \
    21   } while(0)
    22 
    23 #define SC_START(cycle_offset)                                                       \
    24   do                                                                                 \
    25     {                                                                                \
    26       /*cout << "SC_START (begin)" << endl;*/                                        \
    27                                                                                      \
    28       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    29       if (cycle_offset != 0)                                                         \
    30         {                                                                            \
    31           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    32         }                                                                            \
    33                                                                                      \
    34       if (cycle_current > CYCLE_MAX)                                                 \
    35         {                                                                            \
    36           TEST_KO("Maximal cycles Reached");                                         \
    37         }                                                                            \
    38                                                                                      \
    39       sc_start(cycle_offset);                                                        \
    40                                                                                      \
    41       /*cout << "SC_START (end  )" << endl;*/                                        \
    42     } while(0)
    4316
    4417void test (string name,
     
    5124#endif
    5225
    53   Address_management * _Address_management = new Address_management (name.c_str(),
     26  Address_management * _Address_management = new Address_management
     27    (name.c_str(),
    5428#ifdef STATISTICS
    55                                              _parameters_statistics,
     29     _parameters_statistics,
    5630#endif
    57                                              _param);
     31     _param,
     32     USE_ALL);
    5833 
    5934#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/include/Address_management.h

    r81 r82  
    132132#endif
    133133   Parameters                                  * param,
    134    morpheo::behavioural::Tusage_t                usage=USE_ALL
     134   morpheo::behavioural::Tusage_t                usage
    135135   );
    136136  public  :          ~Address_management             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_transition.cpp

    r81 r82  
    7979              reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID = PORT_READ(in_PREDICT_BRANCH_UPDATE_PREDICTION_ID);
    8080
    81 #error "INSTRUCTION_ENABLE : ERROR implémentation, remplacer PC_PREVIOUS par PC_NEXT_NEXT"
     81// #error "INSTRUCTION_ENABLE : ERROR implémentation, remplacer PC_PREVIOUS par PC_NEXT_NEXT"
    8282
    8383              for (uint32_t i=0; i<_param->_nb_instruction; i++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (2048*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
     
    1215#include <list>
    1316#include <set>
    14 
    15 #define NB_ITERATION  1
    16 #define CYCLE_MAX     (2048*NB_ITERATION)
    17 
    18 #define LABEL(str...)                                                   \
    19   {                                                                     \
    20     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    21     msg (str);                                                          \
    22     msg (_("\n"));                                                      \
    23   } while(0)
    24 
    25 #define SC_START(cycle_offset)                                                       \
    26   do                                                                                 \
    27     {                                                                                \
    28       /*cout << "SC_START (begin)" << endl;*/                                        \
    29                                                                                      \
    30       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    31       if (cycle_offset != 0)                                                         \
    32         {                                                                            \
    33           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    34         }                                                                            \
    35                                                                                      \
    36       if (cycle_current > CYCLE_MAX)                                                 \
    37         {                                                                            \
    38           TEST_KO("Maximal cycles Reached");                                         \
    39         }                                                                            \
    40                                                                                      \
    41       sc_start(cycle_offset);                                                        \
    42                                                                                      \
    43       /*cout << "SC_START (end  )" << endl;*/                                        \
    44     } while(0)
    45 
    4617
    4718class entry_t
     
    7041#endif
    7142
    72   Ifetch_queue * _Ifetch_queue = new Ifetch_queue (name.c_str(),
     43  Ifetch_queue * _Ifetch_queue = new Ifetch_queue
     44    (name.c_str(),
    7345#ifdef STATISTICS
    74                                              _parameters_statistics,
     46     _parameters_statistics,
    7547#endif
    76                                              _param);
     48     _param,
     49     USE_ALL);
    7750 
    7851#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/include/Ifetch_queue.h

    r81 r82  
    131131#endif
    132132   Parameters                                  * param,
    133    morpheo::behavioural::Tusage_t                usage=USE_ALL
     133   morpheo::behavioural::Tusage_t                usage
    134134   );
    135135  public  :          ~Ifetch_queue             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Behavioural/include/Allocation.h"
    12 
    13 #define NB_ITERATION  1
    14 #define CYCLE_MAX     (128*NB_ITERATION)
    15 
    16 #define LABEL(str...)                                                   \
    17   {                                                                     \
    18     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    19     msg (str);                                                          \
    20     msg (_("\n"));                                                      \
    21   } while(0)
    22 
    23 #define SC_START(cycle_offset)                                                       \
    24   do                                                                                 \
    25     {                                                                                \
    26       /*cout << "SC_START (begin)" << endl;*/                                        \
    27                                                                                      \
    28       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    29       if (cycle_offset != 0)                                                         \
    30         {                                                                            \
    31           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    32         }                                                                            \
    33                                                                                      \
    34       if (cycle_current > CYCLE_MAX)                                                 \
    35         {                                                                            \
    36           TEST_KO("Maximal cycles Reached");                                         \
    37         }                                                                            \
    38                                                                                      \
    39       sc_start(cycle_offset);                                                        \
    40                                                                                      \
    41       /*cout << "SC_START (end  )" << endl;*/                                        \
    42     } while(0)
    4315
    4416void test (string name,
     
    5123#endif
    5224
    53   Ifetch_unit_Glue * _Ifetch_unit_Glue = new Ifetch_unit_Glue (name.c_str(),
     25  Ifetch_unit_Glue * _Ifetch_unit_Glue = new Ifetch_unit_Glue
     26    (name.c_str(),
    5427#ifdef STATISTICS
    55                                              _parameters_statistics,
     28     _parameters_statistics,
    5629#endif
    57                                              _param);
     30     _param,
     31     USE_ALL);
    5832 
    5933#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/include/Ifetch_unit_Glue.h

    r81 r82  
    105105#endif
    106106   Parameters                                  * param,
    107    morpheo::behavioural::Tusage_t                usage=USE_ALL
     107   morpheo::behavioural::Tusage_t                usage
    108108   );
    109109  public  :          ~Ifetch_unit_Glue             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Behavioural/include/Allocation.h"
    12 
    13 #define NB_ITERATION  1
    14 #define CYCLE_MAX     (128*NB_ITERATION)
    15 
    16 #define LABEL(str...)                                                   \
    17   {                                                                     \
    18     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    19     msg (str);                                                          \
    20     msg (_("\n"));                                                      \
    21   } while(0)
    22 
    23 #define SC_START(cycle_offset)                                                       \
    24   do                                                                                 \
    25     {                                                                                \
    26       /*cout << "SC_START (begin)" << endl;*/                                        \
    27                                                                                      \
    28       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    29       if (cycle_offset != 0)                                                         \
    30         {                                                                            \
    31           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    32         }                                                                            \
    33                                                                                      \
    34       if (cycle_current > CYCLE_MAX)                                                 \
    35         {                                                                            \
    36           TEST_KO("Maximal cycles Reached");                                         \
    37         }                                                                            \
    38                                                                                      \
    39       sc_start(cycle_offset);                                                        \
    40                                                                                      \
    41       /*cout << "SC_START (end  )" << endl;*/                                        \
    42     } while(0)
    4315
    4416void test (string name,
     
    5123#endif
    5224
    53   Ifetch_unit * _Ifetch_unit = new Ifetch_unit (name.c_str(),
     25  Ifetch_unit * _Ifetch_unit = new Ifetch_unit
     26    (name.c_str(),
    5427#ifdef STATISTICS
    55                                              _parameters_statistics,
    56 #endif
    57                                              _param);
     28     _parameters_statistics,
     29#endif
     30     _param,
     31     USE_ALL);
    5832 
    5933#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/include/Ifetch_unit.h

    r81 r82  
    136136#endif
    137137   Parameters                                  * param,
    138    morpheo::behavioural::Tusage_t                usage=USE_ALL
     138   morpheo::behavioural::Tusage_t                usage
    139139   );
    140140  public  :          ~Ifetch_unit             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit_allocation.cpp

    r81 r82  
    144144         ,param_statistics
    145145#endif
    146          ,_param->_param_address_management);
     146         ,_param->_param_address_management
     147         ,_usage);
    147148     
    148149      _component->set_component (_component_address_management->_component
     
    162163         ,param_statistics
    163164#endif
    164          ,_param->_param_ifetch_queue);
     165         ,_param->_param_ifetch_queue
     166         ,_usage);
    165167     
    166168      _component->set_component (_component_ifetch_queue->_component
     
    180182         ,param_statistics
    181183#endif
    182          ,_param->_param_ifetch_unit_glue);
     184         ,_param->_param_ifetch_unit_glue
     185         ,_usage);
    183186     
    184187      _component->set_component (_component_ifetch_unit_glue->_component
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Behavioural/include/Allocation.h"
    12 
    13 #define NB_ITERATION  1
    14 #define CYCLE_MAX     (128*NB_ITERATION)
    15 
    16 #define LABEL(str...)                                                   \
    17   {                                                                     \
    18     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    19     msg (str);                                                          \
    20     msg (_("\n"));                                                      \
    21   } while(0)
    22 
    23 #define SC_START(cycle_offset)                                                       \
    24   do                                                                                 \
    25     {                                                                                \
    26       /*cout << "SC_START (begin)" << endl;*/                                        \
    27                                                                                      \
    28       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    29       if (cycle_offset != 0)                                                         \
    30         {                                                                            \
    31           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    32         }                                                                            \
    33                                                                                      \
    34       if (cycle_current > CYCLE_MAX)                                                 \
    35         {                                                                            \
    36           TEST_KO("Maximal cycles Reached");                                         \
    37         }                                                                            \
    38                                                                                      \
    39       sc_start(cycle_offset);                                                        \
    40                                                                                      \
    41       /*cout << "SC_START (end  )" << endl;*/                                        \
    42     } while(0)
    4315
    4416void test (string name,
     
    5123#endif
    5224
    53   Branch_Target_Buffer_Glue * _Branch_Target_Buffer_Glue = new Branch_Target_Buffer_Glue (name.c_str(),
     25  Branch_Target_Buffer_Glue * _Branch_Target_Buffer_Glue = new Branch_Target_Buffer_Glue
     26    (name.c_str(),
    5427#ifdef STATISTICS
    55                                              _parameters_statistics,
    56 #endif
    57                                              _param);
     28     _parameters_statistics,
     29#endif
     30     _param,
     31     USE_ALL);
    5832 
    5933#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/include/Branch_Target_Buffer_Glue.h

    r81 r82  
    139139#endif
    140140   Parameters                                  * param,
    141    morpheo::behavioural::Tusage_t                usage=USE_ALL
     141   morpheo::behavioural::Tusage_t                usage
    142142   );
    143143  public  :          ~Branch_Target_Buffer_Glue             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1024
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Common/include/BitManipulation.h"
    1215#include "Behavioural/include/Allocation.h"
    13 
    14 #define NB_ITERATION  1024
    15 #define CYCLE_MAX     (128*NB_ITERATION)
    16 
    17 #define LABEL(str...)                                                   \
    18   {                                                                     \
    19     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    20     msg (str);                                                          \
    21     msg (_("\n"));                                                      \
    22   } while(0)
    23 
    24 #define SC_START(cycle_offset)                                                       \
    25   do                                                                                 \
    26     {                                                                                \
    27       /*cout << "SC_START (begin)" << endl;*/                                        \
    28                                                                                      \
    29       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    30       if (cycle_offset != 0)                                                         \
    31         {                                                                            \
    32           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    33         }                                                                            \
    34                                                                                      \
    35       if (cycle_current > CYCLE_MAX)                                                 \
    36         {                                                                            \
    37           TEST_KO("Maximal cycles Reached");                                         \
    38         }                                                                            \
    39                                                                                      \
    40       sc_start(cycle_offset);                                                        \
    41                                                                                      \
    42       /*cout << "SC_START (end  )" << endl;*/                                        \
    43     } while(0)
    44 
    4516
    4617  class entry_t
     
    12091#endif
    12192
    122   Branch_Target_Buffer_Register * _Branch_Target_Buffer_Register = new Branch_Target_Buffer_Register (name.c_str(),
     93  Branch_Target_Buffer_Register * _Branch_Target_Buffer_Register = new Branch_Target_Buffer_Register
     94    (name.c_str(),
    12395#ifdef STATISTICS
    124                                              _parameters_statistics,
     96     _parameters_statistics,
    12597#endif
    126                                              _param);
     98     _param,
     99     USE_ALL);
    127100 
    128101#ifdef SYSTEMC
     
    156129  ALLOC1_SC_SIGNAL( in_DECOD_LAST_TAKE       ," in_DECOD_LAST_TAKE       ",Tcontrol_t         ,_param->_nb_inst_decod);
    157130  ALLOC1_SC_SIGNAL( in_DECOD_MISS_PREDICTION ," in_DECOD_MISS_PREDICTION ",Tcontrol_t         ,_param->_nb_inst_decod);
     131  ALLOC1_SC_SIGNAL( in_DECOD_IS_ACCURATE     ," in_DECOD_IS_ACCURATE     ",Tcontrol_t         ,_param->_nb_inst_decod);
    158132  ALLOC1_SC_SIGNAL( in_UPDATE_VAL            ," in_UPDATE_VAL            ",Tcontrol_t         ,_param->_nb_inst_update);
    159133  ALLOC1_SC_SIGNAL(out_UPDATE_ACK            ,"out_UPDATE_ACK            ",Tcontrol_t         ,_param->_nb_inst_update);
     
    191165  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_VAL             ,_param->_nb_inst_decod);
    192166  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_DECOD_ACK             ,_param->_nb_inst_decod);
     167  if (_param->_have_port_victim)
     168    {
    193169  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_DECOD_HIT             ,_param->_nb_inst_decod);
    194   if (_param->_have_port_victim)
    195170  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_DECOD_HIT_INDEX       ,_param->_nb_inst_decod);
    196   if (_param->_have_port_victim)
    197171  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_VICTIM          ,_param->_nb_inst_decod);
     172    }
    198173  if (_param->_have_port_context_id)
    199174  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_CONTEXT_ID      ,_param->_nb_inst_decod);
     
    203178  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_LAST_TAKE       ,_param->_nb_inst_decod);
    204179  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_MISS_PREDICTION ,_param->_nb_inst_decod);
     180  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_IS_ACCURATE     ,_param->_nb_inst_decod);
    205181
    206182  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_UPDATE_VAL            ,_param->_nb_inst_update);
    207183  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_UPDATE_ACK            ,_param->_nb_inst_update);
     184  if (_param->_have_port_victim)
     185    {
    208186  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_UPDATE_HIT            ,_param->_nb_inst_update);
    209   if (_param->_have_port_victim)
    210187  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_UPDATE_HIT_INDEX      ,_param->_nb_inst_update);
    211   if (_param->_have_port_victim)
    212188  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_UPDATE_VICTIM         ,_param->_nb_inst_update);
     189    }
    213190  if (_param->_have_port_context_id)
    214191  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_UPDATE_CONTEXT_ID     ,_param->_nb_inst_update);
     
    297274          in_DECOD_LAST_TAKE       [i]->write(rand()%2);
    298275          in_DECOD_MISS_PREDICTION [i]->write(rand()%2);
     276          in_DECOD_IS_ACCURATE     [i]->write(rand()%2);
    299277        }
    300278
     
    478456  delete []  in_DECOD_LAST_TAKE       ;
    479457  delete []  in_DECOD_MISS_PREDICTION ;
     458  delete []  in_DECOD_IS_ACCURATE     ;
    480459  delete []  in_UPDATE_VAL            ;
    481460  delete [] out_UPDATE_ACK            ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Branch_Target_Buffer_Register.h

    r81 r82  
    8787  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_LAST_TAKE       ; //[nb_inst_decod]
    8888  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_MISS_PREDICTION ; //[nb_inst_decod]
     89  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_IS_ACCURATE     ; //[nb_inst_decod]
    8990
    9091    // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    134135#endif
    135136   Parameters                                  * param,
    136    morpheo::behavioural::Tusage_t                usage=USE_ALL
     137   morpheo::behavioural::Tusage_t                usage
    137138   );
    138139  public  :          ~Branch_Target_Buffer_Register             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register.cpp

    r81 r82  
    139139# endif
    140140
     141        if (_param->_have_port_victim)
     142          {
    141143        log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,"Method - genMealy_decod");
    142144
     
    161163            (*(out_DECOD_HIT [i])) (*(in_DECOD_CONTEXT_ID  [i]));
    162164
    163             if (_param->_have_port_victim)
    164               {
    165165            (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_VAL         [i]));
    166166            (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_ADDRESS_SRC [i]));
    167167            if (_param->_have_port_context_id)
    168168            (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_CONTEXT_ID  [i]));
    169               }
    170           }
    171 #endif
    172 
     169          }
     170          }
     171#endif
     172
     173        if (_param->_have_port_victim)
     174          {
    173175        log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,"Method - genMealy_update");
    174176
     
    193195            (*(out_UPDATE_HIT [i])) (*(in_UPDATE_CONTEXT_ID  [i]));
    194196
    195             if (_param->_have_port_victim)
    196               {
    197197            (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_VAL         [i]));
    198198            (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_ADDRESS_SRC [i]));
    199199            if (_param->_have_port_context_id)
    200200            (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_CONTEXT_ID  [i]));
    201               }
     201          }
    202202          }
    203203# endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_allocation.cpp

    r81 r82  
    8484      ALLOC1_VALACK_IN ( in_DECOD_VAL            ,VAL);
    8585      ALLOC1_VALACK_OUT(out_DECOD_ACK            ,ACK);
     86      if (_param->_have_port_victim)
     87        {
    8688      ALLOC1_SIGNAL_OUT(out_DECOD_HIT            ,"hit"            ,Tcontrol_t         ,1);
    8789      ALLOC1_SIGNAL_OUT(out_DECOD_HIT_INDEX      ,"hit_index"      ,Tptr_t             ,_param->_size_victim);
    8890      ALLOC1_SIGNAL_IN ( in_DECOD_VICTIM         ,"victim"         ,Tptr_t             ,_param->_size_victim);
     91        }
    8992      ALLOC1_SIGNAL_IN ( in_DECOD_CONTEXT_ID     ,"context_id"     ,Tcontext_t         ,_param->_size_context_id);
    9093      ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_SRC    ,"address_src"    ,Tgeneral_data_t    ,_param->_size_address);
     
    9396      ALLOC1_SIGNAL_IN ( in_DECOD_LAST_TAKE      ,"last_take"      ,Tcontrol_t         ,1);
    9497      ALLOC1_SIGNAL_IN ( in_DECOD_MISS_PREDICTION,"miss_prediction",Tcontrol_t         ,1);
     98      ALLOC1_SIGNAL_IN ( in_DECOD_IS_ACCURATE    ,"is_accurate"    ,Tcontrol_t         ,1);
    9599    }
    96100
     
    101105      ALLOC1_VALACK_IN ( in_UPDATE_VAL            ,VAL);
    102106      ALLOC1_VALACK_OUT(out_UPDATE_ACK            ,ACK);
     107      if (_param->_have_port_victim)
     108        {
    103109      ALLOC1_SIGNAL_OUT(out_UPDATE_HIT            ,"hit"            ,Tcontrol_t         ,1);
    104110      ALLOC1_SIGNAL_OUT(out_UPDATE_HIT_INDEX      ,"hit_index"      ,Tptr_t             ,_param->_size_victim);
    105111      ALLOC1_SIGNAL_IN ( in_UPDATE_VICTIM         ,"victim"         ,Tptr_t             ,_param->_size_victim);
     112        }
    106113      ALLOC1_SIGNAL_IN ( in_UPDATE_CONTEXT_ID     ,"context_id"     ,Tcontext_t         ,_param->_size_context_id);
    107114      ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS_SRC    ,"address_src"    ,Tgeneral_data_t    ,_param->_size_address);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_deallocation.cpp

    r81 r82  
    5454        delete []  in_DECOD_LAST_TAKE       ;
    5555        delete []  in_DECOD_MISS_PREDICTION ;
     56        delete []  in_DECOD_IS_ACCURATE     ;
    5657        delete []  in_UPDATE_VAL            ;
    5758        delete [] out_UPDATE_ACK            ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_decod.cpp

    r81 r82  
    4848        internal_DECOD_NUM_ENTRY [i] = num_entry;
    4949
     50        if (_param->_have_port_victim)
     51          {
    5052        PORT_WRITE(out_DECOD_HIT       [i], hit);
    51         if (_param->_have_port_victim)
    5253        PORT_WRITE(out_DECOD_HIT_INDEX [i], num_entry);
     54          }
    5355      }
    5456
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_update.cpp

    r81 r82  
    4848        internal_UPDATE_NUM_ENTRY [i] = num_entry;
    4949
     50        if (_param->_have_port_victim)
     51          {
    5052        PORT_WRITE(out_UPDATE_HIT [i], hit);
    51         if (_param->_have_port_victim)
    5253        PORT_WRITE(out_UPDATE_HIT_INDEX [i], num_entry);
     54          }
    5355      }
    5456
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_transition.cpp

    r81 r82  
    3232    else
    3333      {
     34        if (not _param->_have_port_victim)
     35          {
     36            genMealy_decod  ();
     37            genMealy_update ();
     38          }
     39
    3440        // =======================================================
    3541        // =====[ PREDICT ]=======================================
     
    6672                  reg_BTB[num_bank][num_entry]._condition        = cond;
    6773                  reg_BTB[num_bank][num_entry]._last_take        = PORT_READ(in_DECOD_LAST_TAKE    [i]);
    68                   reg_BTB[num_bank][num_entry]._accurate         = _param->_first_accurate_if_hit;
     74                  reg_BTB[num_bank][num_entry]._accurate         = (PORT_READ(in_DECOD_IS_ACCURATE [i]))?_param->_first_accurate_if_hit:_param->_first_accurate_if_miss;
    6975                }
    7076              // else (hit) : no update -> it's not the last result of the branch
     
    116122
    117123                  accurate_new =  (miss_pred)?_param->_first_accurate_if_miss:_param->_first_accurate_if_hit;
     124
     125                  reg_BTB[num_bank][num_entry]._val              = 1;
     126                  reg_BTB[num_bank][num_entry]._context          = (_param->_have_port_context_id)?PORT_READ(in_UPDATE_CONTEXT_ID [i]):0;
     127                  reg_BTB[num_bank][num_entry]._address_src      = PORT_READ(in_UPDATE_ADDRESS_SRC  [i]);
     128                  reg_BTB[num_bank][num_entry]._condition        = PORT_READ(in_UPDATE_CONDITION    [i]);
     129                  reg_BTB[num_bank][num_entry]._last_take        = PORT_READ(in_UPDATE_LAST_TAKE    [i]);
    118130                }
    119131
    120132              // =====[ All Case ]
    121               reg_BTB[num_bank][num_entry]._val              = 1;
    122               reg_BTB[num_bank][num_entry]._context          = (_param->_have_port_context_id)?PORT_READ(in_UPDATE_CONTEXT_ID [i]):0;
    123               reg_BTB[num_bank][num_entry]._address_src      = PORT_READ(in_UPDATE_ADDRESS_SRC  [i]);
    124               reg_BTB[num_bank][num_entry]._condition        = PORT_READ(in_UPDATE_CONDITION    [i]);
    125 
    126               reg_BTB[num_bank][num_entry]._address_dest_val = 1;
    127               reg_BTB[num_bank][num_entry]._address_dest     = PORT_READ(in_UPDATE_ADDRESS_DEST [i]);
    128               reg_BTB[num_bank][num_entry]._last_take        = PORT_READ(in_UPDATE_LAST_TAKE    [i]);
     133              if (reg_BTB[num_bank][num_entry]._address_dest_val == 0)
     134                {
     135                  reg_BTB[num_bank][num_entry]._address_dest_val = 1;
     136                  reg_BTB[num_bank][num_entry]._address_dest     = PORT_READ(in_UPDATE_ADDRESS_DEST [i]);
     137                }
    129138              reg_BTB[num_bank][num_entry]._accurate         = accurate_new;
    130139            }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1024
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Behavioural/include/Allocation.h"
    12 
    13 #define NB_ITERATION  1024
    14 #define CYCLE_MAX     (128*NB_ITERATION)
    15 
    16 #define LABEL(str...)                                                   \
    17   {                                                                     \
    18     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    19     msg (str);                                                          \
    20     msg (_("\n"));                                                      \
    21   } while(0)
    22 
    23 #define SC_START(cycle_offset)                                                       \
    24   do                                                                                 \
    25     {                                                                                \
    26       /*cout << "SC_START (begin)" << endl;*/                                        \
    27                                                                                      \
    28       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    29       if (cycle_offset != 0)                                                         \
    30         {                                                                            \
    31           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    32         }                                                                            \
    33                                                                                      \
    34       if (cycle_current > CYCLE_MAX)                                                 \
    35         {                                                                            \
    36           TEST_KO("Maximal cycles Reached");                                         \
    37         }                                                                            \
    38                                                                                      \
    39       sc_start(cycle_offset);                                                        \
    40                                                                                      \
    41       /*cout << "SC_START (end  )" << endl;*/                                        \
    42     } while(0)
    4315
    4416void test (string name,
     
    5123#endif
    5224
    53   Branch_Target_Buffer * _Branch_Target_Buffer = new Branch_Target_Buffer (name.c_str(),
     25  Branch_Target_Buffer * _Branch_Target_Buffer = new Branch_Target_Buffer
     26    (name.c_str(),
    5427#ifdef STATISTICS
    55                                              _parameters_statistics,
     28     _parameters_statistics,
    5629#endif
    57                                              _param);
     30     _param,
     31     USE_ALL);
    5832 
    5933#ifdef SYSTEMC
     
    8458  ALLOC1_SC_SIGNAL( in_DECOD_LAST_TAKE       ," in_DECOD_LAST_TAKE       ",Tcontrol_t         ,_param->_nb_inst_decod);
    8559  ALLOC1_SC_SIGNAL( in_DECOD_MISS_PREDICTION ," in_DECOD_MISS_PREDICTION ",Tcontrol_t         ,_param->_nb_inst_decod);
     60  ALLOC1_SC_SIGNAL( in_DECOD_IS_ACCURATE     ," in_DECOD_IS_ACCURATE     ",Tcontrol_t         ,_param->_nb_inst_decod);
    8661  ALLOC1_SC_SIGNAL( in_UPDATE_VAL            ," in_UPDATE_VAL            ",Tcontrol_t         ,_param->_nb_inst_update);
    8762  ALLOC1_SC_SIGNAL(out_UPDATE_ACK            ,"out_UPDATE_ACK            ",Tcontrol_t         ,_param->_nb_inst_update);
     
    12297  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_DECOD_LAST_TAKE       ,_param->_nb_inst_decod);
    12398  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_DECOD_MISS_PREDICTION ,_param->_nb_inst_decod);
     99  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_DECOD_IS_ACCURATE     ,_param->_nb_inst_decod);
    124100  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_UPDATE_VAL            ,_param->_nb_inst_update);
    125101  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer,out_UPDATE_ACK            ,_param->_nb_inst_update);
     
    195171  delete []  in_DECOD_LAST_TAKE       ;
    196172  delete []  in_DECOD_MISS_PREDICTION ;
     173  delete []  in_DECOD_IS_ACCURATE     ;
    197174 
    198175  delete []  in_UPDATE_VAL            ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/include/Branch_Target_Buffer.h

    r81 r82  
    9090  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_LAST_TAKE       ; //[nb_inst_decod]
    9191  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_MISS_PREDICTION ; //[nb_inst_decod]
     92  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_IS_ACCURATE     ; //[nb_inst_decod]
    9293
    9394    // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    130131#endif
    131132   Parameters                                  * param,
    132    morpheo::behavioural::Tusage_t                usage=USE_ALL
     133   morpheo::behavioural::Tusage_t                usage
    133134   );
    134135  public  :          ~Branch_Target_Buffer             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_allocation.cpp

    r81 r82  
    8585      ALLOC1_SIGNAL_IN ( in_DECOD_LAST_TAKE      ,"last_take"      ,Tcontrol_t         ,1);
    8686      ALLOC1_SIGNAL_IN ( in_DECOD_MISS_PREDICTION,"miss_prediction",Tcontrol_t         ,1);
     87      ALLOC1_SIGNAL_IN ( in_DECOD_IS_ACCURATE    ,"is_accurate"    ,Tcontrol_t         ,1);
    8788    }
    8889
     
    111112          {
    112113            name = _name+"_sort_"+toString(i);
    113             std::cout << "Create   : " << name << std::endl;
     114            log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
    114115           
    115116            _component_sort [i] = new morpheo::behavioural::generic::sort::Sort
     
    118119               ,param_statistics
    119120#endif
    120                ,_param->_param_sort);
     121               ,_param->_param_sort
     122               ,_usage);
    121123           
    122124            _component->set_component (_component_sort [i] ->_component
     
    129131        {
    130132          name = _name+"_victim";
    131           std::cout << "Create   : " << name << std::endl;
     133          log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
    132134         
    133135          _component_victim = new morpheo::behavioural::generic::victim::Victim
     
    136138             ,param_statistics
    137139#endif
    138              ,_param->_param_victim);
     140             ,_param->_param_victim
     141             ,_usage);
    139142         
    140143          _component->set_component (_component_victim->_component
     
    148151    {
    149152      name = _name+"_glue";
    150       std::cout << "Create   : " << name << std::endl;
     153      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
    151154     
    152155      _component_branch_target_buffer_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer::branch_target_buffer_glue::Branch_Target_Buffer_Glue
     
    155158         ,param_statistics
    156159#endif
    157          ,_param->_param_branch_target_buffer_glue);
     160         ,_param->_param_branch_target_buffer_glue
     161         ,_usage);
    158162     
    159163      _component->set_component (_component_branch_target_buffer_glue->_component
     
    166170    {
    167171      name = _name+"_register";
    168       std::cout << "Create   : " << name << std::endl;
     172      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
    169173     
    170174      _component_branch_target_buffer_register = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer::branch_target_buffer_register::Branch_Target_Buffer_Register
     
    173177         ,param_statistics
    174178#endif
    175          ,_param->_param_branch_target_buffer_register);
     179         ,_param->_param_branch_target_buffer_register
     180         ,_usage);
    176181     
    177182      _component->set_component (_component_branch_target_buffer_register->_component
     
    194199        {
    195200          src = _name+"_sort_"+toString(i);
    196           std::cout << "Instance : " << src << std::endl;
     201          log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
    197202         
    198203          {
     
    230235        {
    231236          src = _name+"_victim";
    232           std::cout << "Instance : " << src << std::endl;
     237          log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
    233238         
    234239          {
     
    256261    {
    257262      src = _name+"_glue";
    258       std::cout << "Instance : " << src << std::endl;
     263      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
    259264     
    260265      {
     
    312317
    313318            COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_HIT"         ,
    314                           dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_HIT"         );
     319                                     dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+         "_HIT"         );
    315320            COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_ADDRESS_SRC" ,
    316                           dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_ADDRESS_SRC" );
     321                                     dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+         "_ADDRESS_SRC" );
    317322            COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_ADDRESS_DEST",
    318                           dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_ADDRESS_DEST");
     323                                     dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+         "_ADDRESS_DEST");
    319324            COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_CONDITION"   ,
    320                           dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_CONDITION"   );
     325                                     dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+         "_CONDITION"   );
    321326            COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_LAST_TAKE"   ,
    322                           dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_LAST_TAKE"   );
     327                                     dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+         "_LAST_TAKE"   );
    323328            COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_IS_ACCURATE" ,
    324                  dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_IS_ACCURATE" );
     329                                     dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+         "_IS_ACCURATE" );
    325330          }
    326331
     
    460465    {
    461466      src = _name+"_register";
    462       std::cout << "Instance : " << src << std::endl;
     467      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
    463468     
    464469      {
     
    519524        PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_MISS_PREDICTION",
    520525                            dest, "in_DECOD_"+toString(i)+"_MISS_PREDICTION");
     526        PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_IS_ACCURATE",
     527                            dest, "in_DECOD_"+toString(i)+"_IS_ACCURATE");
    521528
    522529        if (_param->_have_component_victim)
     
    583590    }
    584591    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    585      _component->test_map();
     592//      _component->test_map();
    586593
    587594#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_deallocation.cpp

    r81 r82  
    4949        delete []  in_DECOD_LAST_TAKE       ;
    5050        delete []  in_DECOD_MISS_PREDICTION ;
     51        delete []  in_DECOD_IS_ACCURATE     ;
    5152
    5253        delete []  in_UPDATE_VAL            ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1024
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
     
    1215#include "Behavioural/include/Allocation.h"
    1316
    14 #define NB_ITERATION  1024
    15 #define CYCLE_MAX     (128*NB_ITERATION)
    16 
    17 #define LABEL(str...)                                                   \
    18   {                                                                     \
    19     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    20     msg (str);                                                          \
    21     msg (_("\n"));                                                      \
    22   } while(0)
    23 
    24 #define SC_START(cycle_offset)                                                       \
    25   do                                                                                 \
    26     {                                                                                \
    27       /*cout << "SC_START (begin)" << endl;*/                                        \
    28                                                                                      \
    29       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    30       if (cycle_offset != 0)                                                         \
    31         {                                                                            \
    32           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    33         }                                                                            \
    34                                                                                      \
    35       if (cycle_current > CYCLE_MAX)                                                 \
    36         {                                                                            \
    37           TEST_KO("Maximal cycles Reached");                                         \
    38         }                                                                            \
    39                                                                                      \
    40       sc_start(cycle_offset);                                                        \
    41                                                                                      \
    42       /*cout << "SC_START (end  )" << endl;*/                                        \
    43     } while(0)
    44 
    4517void test (string name,
    4618           morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Parameters * _param)
     
    5224#endif
    5325
    54   Direction_Glue * _Direction_Glue = new Direction_Glue (name.c_str(),
     26  Direction_Glue * _Direction_Glue = new Direction_Glue
     27    (name.c_str(),
    5528#ifdef STATISTICS
    56                                              _parameters_statistics,
    57 #endif
    58                                              _param);
     29     _parameters_statistics,
     30#endif
     31     _param,
     32     USE_ALL);
    5933 
    6034#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Direction_Glue.h

    r81 r82  
    114114#endif
    115115   Parameters                                  * param,
    116    morpheo::behavioural::Tusage_t                usage=USE_ALL
     116   morpheo::behavioural::Tusage_t                usage
    117117   );
    118118  public  :          ~Direction_Glue             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1024
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
     
    1215#include "Behavioural/include/Allocation.h"
    1316
    14 #define NB_ITERATION  1024
    15 #define CYCLE_MAX     (128*NB_ITERATION)
    16 
    17 #define LABEL(str...)                                                   \
    18   {                                                                     \
    19     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    20     msg (str);                                                          \
    21     msg (_("\n"));                                                      \
    22   } while(0)
    23 
    24 #define SC_START(cycle_offset)                                                       \
    25   do                                                                                 \
    26     {                                                                                \
    27       /*cout << "SC_START (begin)" << endl;*/                                        \
    28                                                                                      \
    29       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    30       if (cycle_offset != 0)                                                         \
    31         {                                                                            \
    32           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    33         }                                                                            \
    34                                                                                      \
    35       if (cycle_current > CYCLE_MAX)                                                 \
    36         {                                                                            \
    37           TEST_KO("Maximal cycles Reached");                                         \
    38         }                                                                            \
    39                                                                                      \
    40       sc_start(cycle_offset);                                                        \
    41                                                                                      \
    42       /*cout << "SC_START (end  )" << endl;*/                                        \
    43     } while(0)
    44 
    4517void test (string name,
    4618           morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::Parameters * _param)
     
    5224#endif
    5325
    54   Direction * _Direction = new Direction (name.c_str(),
     26  Direction * _Direction = new Direction
     27    (name.c_str(),
    5528#ifdef STATISTICS
    56                                              _parameters_statistics,
    57 #endif
    58                                              _param);
     29     _parameters_statistics,
     30#endif
     31     _param,
     32     USE_ALL);
    5933 
    6034#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Direction.h

    r81 r82  
    102102#endif
    103103   Parameters                                  * param,
    104    morpheo::behavioural::Tusage_t                usage=USE_ALL
     104   morpheo::behavioural::Tusage_t                usage
    105105   );
    106106  public  :          ~Direction             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_allocation.cpp

    r81 r82  
    2121#undef  FUNCTION
    2222#define FUNCTION "Direction::allocation"
    23   void Direction::allocation (
     23  void Direction::allocation
     24  (
    2425#ifdef STATISTICS
    25                                morpheo::behavioural::Parameters_Statistics * param_statistics
     26   morpheo::behavioural::Parameters_Statistics * param_statistics
    2627#else
    27                                void
     28   void
    2829#endif
    29                                )
     30   )
    3031  {
    3132    log_printf(FUNC,Direction,FUNCTION,"Begin");
     
    8586    {
    8687      name = _name+"_glue";
    87       std::cout << "Create   : " << name << std::endl;
     88      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
    8889     
    8990      _component_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Direction_Glue
     
    9293         ,param_statistics
    9394#endif
    94          ,_param->_param_glue);
     95         ,_param->_param_glue
     96         ,_usage);
    9597     
    9698      _component->set_component (_component_glue->_component
     
    106108    {
    107109      src = _name+"_glue";
    108       std::cout << "Instance : " << src << std::endl;
     110      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
    109111     
    110112      {
     
    177179    }
    178180    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    179      _component->test_map();
     181//      _component->test_map();
    180182
    181183#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Makefile.deps

    r81 r82  
    2525include                         $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/Makefile.deps
    2626endif
     27ifndef Prediction_unit_Glue
     28include                         $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/Makefile.deps
     29endif
    2730
    2831#-----[ Directory ]----------------------------------------
     
    3740                                                $(Direction_LIBRARY)                    \
    3841                                                $(Return_Address_Stack_LIBRARY)         \
    39                                                 $(Update_Prediction_Table_LIBRARY)     
    40 
     42                                                $(Update_Prediction_Table_LIBRARY)      \
     43                                                $(Prediction_unit_Glue_LIBRARY)
    4144
    4245Prediction_unit_DIR_LIBRARY             =       -L$(Prediction_unit_DIR)/lib            \
     
    4548                                                $(Direction_DIR_LIBRARY)                \
    4649                                                $(Return_Address_Stack_DIR_LIBRARY)     \
    47                                                 $(Update_Prediction_Table_DIR_LIBRARY) 
     50                                                $(Update_Prediction_Table_DIR_LIBRARY)  \
     51                                                $(Prediction_unit_Glue_DIR_LIBRARY)
    4852
    4953
     
    5761                                $(MAKE) Return_Address_Stack_library;           \
    5862                                $(MAKE) Update_Prediction_Table_library;        \
     63                                $(MAKE) Prediction_unit_Glue_library;           \
    5964                                $(MAKE) --directory=$(Prediction_unit_DIR) --makefile=Makefile;
    6065
     
    6671                                $(MAKE) Return_Address_Stack_library_clean;     \
    6772                                $(MAKE) Update_Prediction_Table_library_clean;  \
     73                                $(MAKE) Prediction_unit_Glue_library_clean;     \
    6874                                $(MAKE) --directory=$(Prediction_unit_DIR) --makefile=Makefile clean;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/config_mono_context.cfg

    r81 r82  
    11Prediction_unit_Glue
    2 1       1       +1      # nb_context     
    3 30      30      +32     # size_address   
    4 1       4       *4      # nb_instruction  [0] [nb_context]
    5 1       4       *4      # size_depth      [0] [nb_context]
    6 1       1       *4      # nb_inst_predict
    7 4       4       *4      # nb_inst_decod 
    8 4       4       *4      # nb_inst_update
     21       1       *4      # nb_context         
     31       1       *4      # nb_decod_unit     
     430      30      +32     # size_address       
     51       1       *4      # nb_instruction  [0] [nb_context]
     61       1       *4      # size_depth      [0] [nb_context]
     74       4       *4      # nb_inst_decod   [0] [nb_decod_unit]
     81       1       *4      # nb_inst_branch_predict     
     94       4       *4      # nb_inst_branch_decod
     104       4       *4      # nb_inst_branch_update
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/config_multi_context.cfg

    r81 r82  
    11Prediction_unit_Glue
    2 4       4       +1      # nb_context     
    3 30      30      +32     # size_address   
     24       4       *4      # nb_context         
     31       1       *4      # nb_decod_unit     
     430      30      +32     # size_address       
    451       1       *4      # nb_instruction  [0] [nb_context]
    562       2       *4      # nb_instruction  [1] [nb_context]
     
    892       2       *4      # size_depth      [0] [nb_context]
    9101       1       *4      # size_depth      [1] [nb_context]
    10 8       8       *4      # size_depth      [2] [nb_context]
     117       7       *4      # size_depth      [2] [nb_context]
    11124       4       *4      # size_depth      [3] [nb_context]
    12 1       4       *4      # nb_inst_predict
    13 4       4       *4      # nb_inst_decod 
    14 4       4       *4      # nb_inst_update
     134       4       *4      # nb_inst_decod   [0] [nb_decod_unit]
     141       4       *4      # nb_inst_branch_predict     
     154       4       *4      # nb_inst_branch_decod
     164       4       *4      # nb_inst_branch_update
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/src/main.cpp

    r81 r82  
    88#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/include/test.h"
    99
    10 #define NB_PARAMS 5
     10#define NB_PARAMS 6
    1111
    1212void usage (int argc, char * argv[])
     
    1414  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
    1515  err (_("list_params is :\n"));
    16   err (_(" * nb_context                   (uint32_t)\n"));
    17   err (_(" * size_address                 (uint32_t)\n"));
    18   err (_(" * nb_instruction  [nb_context] (uint32_t)\n"));
    19   err (_(" * size_depth      [nb_context] (uint32_t)\n"));
    20   err (_(" * nb_inst_predict              (uint32_t)\n"));
    21   err (_(" * nb_inst_decod                (uint32_t)\n"));
    22   err (_(" * nb_inst_update               (uint32_t)\n"));
     16  err (_(" * nb_context                             (uint32_t)\n"));
     17  err (_(" * nb_decod_unit                          (uint32_t)\n"));
     18//   err (_(" * nb_ooo_engine                          (uint32_t)\n"));
     19  err (_(" * size_address                           (uint32_t)\n"));
     20  err (_(" * nb_instruction         [nb_context]    (uint32_t)\n"));
     21  err (_(" * size_depth             [nb_context]    (uint32_t)\n"));
     22  err (_(" * nb_inst_decod          [nb_decod_unit] (uint32_t)\n"));
     23//   err (_(" * nb_inst_update         [nb_ooo_engine] (uint32_t)\n"));
     24  err (_(" * nb_inst_branch_predict                 (uint32_t)\n"));
     25  err (_(" * nb_inst_branch_decod                   (uint32_t)\n"));
     26  err (_(" * nb_inst_branch_update                  (uint32_t)\n"));
    2327
    2428  exit (1);
     
    3943
    4044  uint32_t   _nb_context      = fromString<uint32_t>(argv[x++]);
     45  uint32_t   _nb_decod_unit   = fromString<uint32_t>(argv[x++]);
     46//   uint32_t   _nb_ooo_engine   = fromString<uint32_t>(argv[x++]);
    4147  uint32_t   _size_address    = fromString<uint32_t>(argv[x++]);
    4248 
    43   if (argc != static_cast<int>(2+NB_PARAMS+2*_nb_context))
     49  if (argc != static_cast<int>(2+NB_PARAMS+2*_nb_context+_nb_decod_unit// +_nb_ooo_engine
     50                               ))
    4451    usage (argc, argv);
    4552
     
    5057  for (uint32_t i=0; i<_nb_context; i++)
    5158    _size_depth     [i] = fromString<uint32_t>(argv[x++]);
    52   uint32_t   _nb_inst_predict = fromString<uint32_t>(argv[x++]);
    53   uint32_t   _nb_inst_decod   = fromString<uint32_t>(argv[x++]);
    54   uint32_t   _nb_inst_update  = fromString<uint32_t>(argv[x++]);
     59  uint32_t * _nb_inst_decod   = new uint32_t [_nb_decod_unit];
     60  for (uint32_t i=0; i<_nb_decod_unit; i++)
     61    _nb_inst_decod  [i] = fromString<uint32_t>(argv[x++]);
     62//   uint32_t * _nb_inst_update  = new uint32_t [_nb_ooo_engine];
     63//   for (uint32_t i=0; i<_nb_ooo_engine; i++)
     64//     _nb_inst_update [i] = fromString<uint32_t>(argv[x++]);
     65  uint32_t   _nb_inst_branch_predict = fromString<uint32_t>(argv[x++]);
     66  uint32_t   _nb_inst_branch_update  = fromString<uint32_t>(argv[x++]);
     67  uint32_t   _nb_inst_branch_decod   = fromString<uint32_t>(argv[x++]);
    5568
    5669  int _return = EXIT_SUCCESS;
     
    5871    {
    5972      morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue::Parameters
    60         (_nb_context     ,
    61          _size_address   ,
    62          _nb_instruction ,
    63          _size_depth     ,
    64          _nb_inst_predict,
    65          _nb_inst_decod  ,
    66          _nb_inst_update );
     73        (_nb_context            ,
     74         _nb_decod_unit         ,
     75//       _nb_ooo_engine         ,
     76         _size_address          ,
     77         _nb_instruction        ,
     78         _size_depth            ,
     79         _nb_inst_decod         ,
     80//       _nb_inst_update        ,
     81         _nb_inst_branch_predict,
     82         _nb_inst_branch_decod  ,
     83         _nb_inst_branch_update );
    6784     
    6885      msg(_("%s"),param->print(1).c_str());
     
    83100  delete [] _nb_instruction;
    84101  delete [] _size_depth    ;
     102  delete [] _nb_inst_decod ;
     103//   delete [] _nb_inst_update;
    85104
    86105  return (_return);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/src/test.cpp

    r81 r82  
    6363  ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_STATE                ,"out_PREDICT_BRANCH_STATE               ",Tbranch_state_t    ,_param->_nb_context);
    6464  ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID ,"out_PREDICT_BRANCH_UPDATE_PREDICTION_ID",Tprediction_ptr_t  ,_param->_nb_context);
    65   ALLOC1_SC_SIGNAL(out_PREDICT_BTB_VAL                     ,"out_PREDICT_BTB_VAL                    ",Tcontrol_t         ,_param->_nb_inst_predict);
    66   ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ACK                     ," in_PREDICT_BTB_ACK                    ",Tcontrol_t         ,_param->_nb_inst_predict);
    67   ALLOC1_SC_SIGNAL(out_PREDICT_BTB_CONTEXT_ID              ,"out_PREDICT_BTB_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_predict);
    68   ALLOC1_SC_SIGNAL(out_PREDICT_BTB_ADDRESS                 ,"out_PREDICT_BTB_ADDRESS                ",Taddress_t         ,_param->_nb_inst_predict);
    69   ALLOC1_SC_SIGNAL( in_PREDICT_BTB_HIT                     ," in_PREDICT_BTB_HIT                    ",Tcontrol_t         ,_param->_nb_inst_predict);
    70   ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC             ," in_PREDICT_BTB_ADDRESS_SRC            ",Taddress_t         ,_param->_nb_inst_predict);
    71   ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST            ," in_PREDICT_BTB_ADDRESS_DEST           ",Taddress_t         ,_param->_nb_inst_predict);
    72   ALLOC1_SC_SIGNAL( in_PREDICT_BTB_CONDITION               ," in_PREDICT_BTB_CONDITION              ",Tbranch_condition_t,_param->_nb_inst_predict);
    73 //ALLOC1_SC_SIGNAL( in_PREDICT_BTB_LAST_TAKE               ," in_PREDICT_BTB_LAST_TAKE              ",Tcontrol_t         ,_param->_nb_inst_predict);
    74   ALLOC1_SC_SIGNAL( in_PREDICT_BTB_IS_ACCURATE             ," in_PREDICT_BTB_IS_ACCURATE            ",Tcontrol_t         ,_param->_nb_inst_predict);
    75   ALLOC1_SC_SIGNAL(out_PREDICT_DIR_VAL                     ,"out_PREDICT_DIR_VAL                    ",Tcontrol_t         ,_param->_nb_inst_predict);
    76   ALLOC1_SC_SIGNAL( in_PREDICT_DIR_ACK                     ," in_PREDICT_DIR_ACK                    ",Tcontrol_t         ,_param->_nb_inst_predict);
    77   ALLOC1_SC_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC             ,"out_PREDICT_DIR_ADDRESS_SRC            ",Taddress_t         ,_param->_nb_inst_predict);
    78   ALLOC1_SC_SIGNAL(out_PREDICT_DIR_STATIC                  ,"out_PREDICT_DIR_STATIC                 ",Tcontrol_t         ,_param->_nb_inst_predict);
    79 //ALLOC1_SC_SIGNAL(out_PREDICT_DIR_LAST_TAKE               ,"out_PREDICT_DIR_LAST_TAKE              ",Tcontrol_t         ,_param->_nb_inst_predict);
    80 //ALLOC1_SC_SIGNAL( in_PREDICT_DIR_HISTORY                 ," in_PREDICT_DIR_HISTORY                ",Thistory_t         ,_param->_nb_inst_predict);
    81   ALLOC1_SC_SIGNAL( in_PREDICT_DIR_DIRECTION               ," in_PREDICT_DIR_DIRECTION              ",Tcontrol_t         ,_param->_nb_inst_predict);
    82   ALLOC1_SC_SIGNAL(out_PREDICT_RAS_VAL                     ,"out_PREDICT_RAS_VAL                    ",Tcontrol_t         ,_param->_nb_inst_predict);
    83   ALLOC1_SC_SIGNAL( in_PREDICT_RAS_ACK                     ," in_PREDICT_RAS_ACK                    ",Tcontrol_t         ,_param->_nb_inst_predict);
    84   ALLOC1_SC_SIGNAL(out_PREDICT_RAS_CONTEXT_ID              ,"out_PREDICT_RAS_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_predict);
    85   ALLOC1_SC_SIGNAL( in_PREDICT_RAS_HIT                     ," in_PREDICT_RAS_HIT                    ",Tcontrol_t         ,_param->_nb_inst_predict);
    86   ALLOC1_SC_SIGNAL(out_PREDICT_RAS_PUSH                    ,"out_PREDICT_RAS_PUSH                   ",Tcontrol_t         ,_param->_nb_inst_predict);
    87   ALLOC1_SC_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH            ,"out_PREDICT_RAS_ADDRESS_PUSH           ",Taddress_t         ,_param->_nb_inst_predict);
    88   ALLOC1_SC_SIGNAL( in_PREDICT_RAS_ADDRESS_POP             ," in_PREDICT_RAS_ADDRESS_POP            ",Taddress_t         ,_param->_nb_inst_predict);
    89 //ALLOC1_SC_SIGNAL( in_PREDICT_RAS_INDEX                   ," in_PREDICT_RAS_INDEX                  ",Tptr_t             ,_param->_nb_inst_predict);
    90   ALLOC1_SC_SIGNAL(out_PREDICT_UPT_VAL                     ,"out_PREDICT_UPT_VAL                    ",Tcontrol_t         ,_param->_nb_inst_predict);
    91   ALLOC1_SC_SIGNAL( in_PREDICT_UPT_ACK                     ," in_PREDICT_UPT_ACK                    ",Tcontrol_t         ,_param->_nb_inst_predict);
    92   ALLOC1_SC_SIGNAL(out_PREDICT_UPT_CONTEXT_ID              ,"out_PREDICT_UPT_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_predict);
    93   ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC         ,"out_PREDICT_UPT_BTB_ADDRESS_SRC        ",Taddress_t         ,_param->_nb_inst_predict);
    94   ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST        ,"out_PREDICT_UPT_BTB_ADDRESS_DEST       ",Taddress_t         ,_param->_nb_inst_predict);
    95   ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_CONDITION           ,"out_PREDICT_UPT_BTB_CONDITION          ",Tbranch_condition_t,_param->_nb_inst_predict);
    96   ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE           ,"out_PREDICT_UPT_BTB_LAST_TAKE          ",Tcontrol_t         ,_param->_nb_inst_predict);
    97   ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE         ,"out_PREDICT_UPT_BTB_IS_ACCURATE        ",Tcontrol_t         ,_param->_nb_inst_predict);
    98 //ALLOC1_SC_SIGNAL(out_PREDICT_UPT_DIR_HISTORY             ,"out_PREDICT_UPT_DIR_HISTORY            ",Thistory_t         ,_param->_nb_inst_predict);
    99   ALLOC1_SC_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS             ,"out_PREDICT_UPT_RAS_ADDRESS            ",Taddress_t         ,_param->_nb_inst_predict);
    100 //ALLOC1_SC_SIGNAL(out_PREDICT_UPT_RAS_INDEX               ,"out_PREDICT_UPT_RAS_INDEX              ",Tptr_t             ,_param->_nb_inst_predict);
     65  ALLOC1_SC_SIGNAL(out_PREDICT_BTB_VAL                     ,"out_PREDICT_BTB_VAL                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     66  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ACK                     ," in_PREDICT_BTB_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     67  ALLOC1_SC_SIGNAL(out_PREDICT_BTB_CONTEXT_ID              ,"out_PREDICT_BTB_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_branch_predict);
     68  ALLOC1_SC_SIGNAL(out_PREDICT_BTB_ADDRESS                 ,"out_PREDICT_BTB_ADDRESS                ",Taddress_t         ,_param->_nb_inst_branch_predict);
     69  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_HIT                     ," in_PREDICT_BTB_HIT                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     70  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC             ," in_PREDICT_BTB_ADDRESS_SRC            ",Taddress_t         ,_param->_nb_inst_branch_predict);
     71  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST            ," in_PREDICT_BTB_ADDRESS_DEST           ",Taddress_t         ,_param->_nb_inst_branch_predict);
     72  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_CONDITION               ," in_PREDICT_BTB_CONDITION              ",Tbranch_condition_t,_param->_nb_inst_branch_predict);
     73//ALLOC1_SC_SIGNAL( in_PREDICT_BTB_LAST_TAKE               ," in_PREDICT_BTB_LAST_TAKE              ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     74  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_IS_ACCURATE             ," in_PREDICT_BTB_IS_ACCURATE            ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     75  ALLOC1_SC_SIGNAL(out_PREDICT_DIR_VAL                     ,"out_PREDICT_DIR_VAL                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     76  ALLOC1_SC_SIGNAL( in_PREDICT_DIR_ACK                     ," in_PREDICT_DIR_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     77  ALLOC1_SC_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC             ,"out_PREDICT_DIR_ADDRESS_SRC            ",Taddress_t         ,_param->_nb_inst_branch_predict);
     78  ALLOC1_SC_SIGNAL(out_PREDICT_DIR_STATIC                  ,"out_PREDICT_DIR_STATIC                 ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     79//ALLOC1_SC_SIGNAL(out_PREDICT_DIR_LAST_TAKE               ,"out_PREDICT_DIR_LAST_TAKE              ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     80//ALLOC1_SC_SIGNAL( in_PREDICT_DIR_HISTORY                 ," in_PREDICT_DIR_HISTORY                ",Thistory_t         ,_param->_nb_inst_branch_predict);
     81  ALLOC1_SC_SIGNAL( in_PREDICT_DIR_DIRECTION               ," in_PREDICT_DIR_DIRECTION              ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     82  ALLOC1_SC_SIGNAL(out_PREDICT_RAS_VAL                     ,"out_PREDICT_RAS_VAL                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     83  ALLOC1_SC_SIGNAL( in_PREDICT_RAS_ACK                     ," in_PREDICT_RAS_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     84  ALLOC1_SC_SIGNAL(out_PREDICT_RAS_CONTEXT_ID              ,"out_PREDICT_RAS_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_branch_predict);
     85  ALLOC1_SC_SIGNAL( in_PREDICT_RAS_HIT                     ," in_PREDICT_RAS_HIT                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     86  ALLOC1_SC_SIGNAL(out_PREDICT_RAS_PUSH                    ,"out_PREDICT_RAS_PUSH                   ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     87  ALLOC1_SC_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH            ,"out_PREDICT_RAS_ADDRESS_PUSH           ",Taddress_t         ,_param->_nb_inst_branch_predict);
     88  ALLOC1_SC_SIGNAL( in_PREDICT_RAS_ADDRESS_POP             ," in_PREDICT_RAS_ADDRESS_POP            ",Taddress_t         ,_param->_nb_inst_branch_predict);
     89//ALLOC1_SC_SIGNAL( in_PREDICT_RAS_INDEX                   ," in_PREDICT_RAS_INDEX                  ",Tptr_t             ,_param->_nb_inst_branch_predict);
     90  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_VAL                     ,"out_PREDICT_UPT_VAL                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     91  ALLOC1_SC_SIGNAL( in_PREDICT_UPT_ACK                     ," in_PREDICT_UPT_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     92  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_CONTEXT_ID              ,"out_PREDICT_UPT_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_branch_predict);
     93  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC         ,"out_PREDICT_UPT_BTB_ADDRESS_SRC        ",Taddress_t         ,_param->_nb_inst_branch_predict);
     94  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST        ,"out_PREDICT_UPT_BTB_ADDRESS_DEST       ",Taddress_t         ,_param->_nb_inst_branch_predict);
     95  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_CONDITION           ,"out_PREDICT_UPT_BTB_CONDITION          ",Tbranch_condition_t,_param->_nb_inst_branch_predict);
     96  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE           ,"out_PREDICT_UPT_BTB_LAST_TAKE          ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     97  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE         ,"out_PREDICT_UPT_BTB_IS_ACCURATE        ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
     98//ALLOC1_SC_SIGNAL(out_PREDICT_UPT_DIR_HISTORY             ,"out_PREDICT_UPT_DIR_HISTORY            ",Thistory_t         ,_param->_nb_inst_branch_predict);
     99  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS             ,"out_PREDICT_UPT_RAS_ADDRESS            ",Taddress_t         ,_param->_nb_inst_branch_predict);
     100//ALLOC1_SC_SIGNAL(out_PREDICT_UPT_RAS_INDEX               ,"out_PREDICT_UPT_RAS_INDEX              ",Tptr_t             ,_param->_nb_inst_branch_predict);
    101101  ALLOC1_SC_SIGNAL( in_DEPTH_UPT_NB_BRANCH                 ," in_DEPTH_UPT_NB_BRANCH                ",Tdepth_t           ,_param->_nb_context);
    102102  ALLOC1_SC_SIGNAL( in_DEPTH_UPT_TAIL                      ," in_DEPTH_UPT_TAIL                     ",Tdepth_t           ,_param->_nb_context);
     103  ALLOC1_SC_SIGNAL(out_DEPTH_NB_BRANCH                     ,"out_DEPTH_NB_BRANCH                    ",Tdepth_t           ,_param->_nb_context);
     104  ALLOC1_SC_SIGNAL(out_DEPTH_TAIL                          ,"out_DEPTH_TAIL                         ",Tdepth_t           ,_param->_nb_context);
     105
     106  ALLOC2_SC_SIGNAL( in_DECOD_VAL                        ," in_DECOD_VAL                        ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     107  ALLOC2_SC_SIGNAL(out_DECOD_ACK                        ,"out_DECOD_ACK                        ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     108  ALLOC2_SC_SIGNAL( in_DECOD_CONTEXT_ID                 ," in_DECOD_CONTEXT_ID                 ",Tcontext_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     109  ALLOC2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR      ," in_DECOD_MATCH_INST_IFETCH_PTR      ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     110  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_STATE               ," in_DECOD_BRANCH_STATE               ",Tbranch_state_t    ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     111  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID," in_DECOD_BRANCH_UPDATE_PREDICTION_ID",Tprediction_ptr_t  ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     112  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION           ," in_DECOD_BRANCH_CONDITION           ",Tbranch_condition_t,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     113  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION           ," in_DECOD_BRANCH_DIRECTION           ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     114  ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_SRC                ," in_DECOD_ADDRESS_SRC                ",Taddress_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     115  ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_DEST               ," in_DECOD_ADDRESS_DEST               ",Taddress_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     116  ALLOC1_SC_SIGNAL(out_DECOD_BTB_VAL                    ,"out_DECOD_BTB_VAL                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     117  ALLOC1_SC_SIGNAL( in_DECOD_BTB_ACK                    ," in_DECOD_BTB_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     118  ALLOC1_SC_SIGNAL(out_DECOD_BTB_CONTEXT_ID             ,"out_DECOD_BTB_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_branch_decod);
     119  ALLOC1_SC_SIGNAL(out_DECOD_BTB_ADDRESS_SRC            ,"out_DECOD_BTB_ADDRESS_SRC            ",Taddress_t         ,_param->_nb_inst_branch_decod);
     120  ALLOC1_SC_SIGNAL(out_DECOD_BTB_ADDRESS_DEST           ,"out_DECOD_BTB_ADDRESS_DEST           ",Taddress_t         ,_param->_nb_inst_branch_decod);
     121  ALLOC1_SC_SIGNAL(out_DECOD_BTB_CONDITION              ,"out_DECOD_BTB_CONDITION              ",Tbranch_condition_t,_param->_nb_inst_branch_decod);
     122  ALLOC1_SC_SIGNAL(out_DECOD_BTB_LAST_TAKE              ,"out_DECOD_BTB_LAST_TAKE              ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     123  ALLOC1_SC_SIGNAL(out_DECOD_BTB_MISS_PREDICTION        ,"out_DECOD_BTB_MISS_PREDICTION        ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     124  ALLOC1_SC_SIGNAL(out_DECOD_BTB_IS_ACCURATE            ,"out_DECOD_BTB_IS_ACCURATE            ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     125  ALLOC1_SC_SIGNAL(out_DECOD_RAS_VAL                    ,"out_DECOD_RAS_VAL                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     126  ALLOC1_SC_SIGNAL( in_DECOD_RAS_ACK                    ," in_DECOD_RAS_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     127  ALLOC1_SC_SIGNAL(out_DECOD_RAS_CONTEXT_ID             ,"out_DECOD_RAS_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_branch_decod);
     128  ALLOC1_SC_SIGNAL( in_DECOD_RAS_HIT                    ," in_DECOD_RAS_HIT                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     129  ALLOC1_SC_SIGNAL(out_DECOD_RAS_PUSH                   ,"out_DECOD_RAS_PUSH                   ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     130  ALLOC1_SC_SIGNAL(out_DECOD_RAS_ADDRESS_PUSH           ,"out_DECOD_RAS_ADDRESS_PUSH           ",Taddress_t         ,_param->_nb_inst_branch_decod);
     131  ALLOC1_SC_SIGNAL( in_DECOD_RAS_ADDRESS_POP            ," in_DECOD_RAS_ADDRESS_POP            ",Taddress_t         ,_param->_nb_inst_branch_decod);
     132//ALLOC1_SC_SIGNAL( in_DECOD_RAS_INDEX                  ," in_DECOD_RAS_INDEX                  ",Tptr_t             ,_param->_nb_inst_branch_decod);
     133  ALLOC1_SC_SIGNAL(out_DECOD_RAS_MISS_PREDICTION        ,"out_DECOD_RAS_MISS_PREDICTION        ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     134  ALLOC1_SC_SIGNAL(out_DECOD_UPT_VAL                    ,"out_DECOD_UPT_VAL                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     135  ALLOC1_SC_SIGNAL( in_DECOD_UPT_ACK                    ," in_DECOD_UPT_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     136  ALLOC1_SC_SIGNAL(out_DECOD_UPT_CONTEXT_ID             ,"out_DECOD_UPT_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_branch_decod);
     137  ALLOC1_SC_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_SRC        ,"out_DECOD_UPT_BTB_ADDRESS_SRC        ",Taddress_t         ,_param->_nb_inst_branch_decod);
     138  ALLOC1_SC_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_DEST       ,"out_DECOD_UPT_BTB_ADDRESS_DEST       ",Taddress_t         ,_param->_nb_inst_branch_decod);
     139  ALLOC1_SC_SIGNAL(out_DECOD_UPT_BTB_CONDITION          ,"out_DECOD_UPT_BTB_CONDITION          ",Tbranch_condition_t,_param->_nb_inst_branch_decod);
     140  ALLOC1_SC_SIGNAL(out_DECOD_UPT_BTB_LAST_TAKE          ,"out_DECOD_UPT_BTB_LAST_TAKE          ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     141  ALLOC1_SC_SIGNAL(out_DECOD_UPT_RAS_ADDRESS            ,"out_DECOD_UPT_RAS_ADDRESS            ",Taddress_t         ,_param->_nb_inst_branch_decod);
     142//ALLOC1_SC_SIGNAL(out_DECOD_UPT_RAS_INDEX              ,"out_DECOD_UPT_RAS_INDEX              ",Tptr_t             ,_param->_nb_inst_branch_decod);
     143  ALLOC1_SC_SIGNAL(out_DECOD_UPT_MISS_IFETCH            ,"out_DECOD_UPT_MISS_IFETCH            ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     144  ALLOC1_SC_SIGNAL(out_DECOD_UPT_MISS_DECOD             ,"out_DECOD_UPT_MISS_DECOD             ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     145  ALLOC1_SC_SIGNAL(out_DECOD_UPT_UPDATE_PREDICTION_ID   ,"out_DECOD_UPT_UPDATE_PREDICTION_ID   ",Tprediction_ptr_t  ,_param->_nb_inst_branch_decod);
    103146 
     147  ALLOC1_SC_SIGNAL(out_UPDATE_BTB_VAL                  ,"out_UPDATE_BTB_VAL                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     148  ALLOC1_SC_SIGNAL( in_UPDATE_BTB_ACK                  ," in_UPDATE_BTB_ACK                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     149//ALLOC1_SC_SIGNAL(out_UPDATE_BTB_CONTEXT_ID           ,"out_UPDATE_BTB_CONTEXT_ID           ",Tcontext_t         ,_param->_nb_inst_branch_update);
     150//ALLOC1_SC_SIGNAL(out_UPDATE_BTB_ADDRESS_SRC          ,"out_UPDATE_BTB_ADDRESS_SRC          ",Taddress_t         ,_param->_nb_inst_branch_update);
     151//ALLOC1_SC_SIGNAL(out_UPDATE_BTB_ADDRESS_DEST         ,"out_UPDATE_BTB_ADDRESS_DEST         ",Taddress_t         ,_param->_nb_inst_branch_update);
     152//ALLOC1_SC_SIGNAL(out_UPDATE_BTB_CONDITION            ,"out_UPDATE_BTB_CONDITION            ",Tbranch_condition_t,_param->_nb_inst_branch_update);
     153//ALLOC1_SC_SIGNAL(out_UPDATE_BTB_LAST_TAKE            ,"out_UPDATE_BTB_LAST_TAKE            ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     154//ALLOC1_SC_SIGNAL(out_UPDATE_BTB_MISS_PREDICTION      ,"out_UPDATE_BTB_MISS_PREDICTION      ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     155  ALLOC1_SC_SIGNAL(out_UPDATE_DIR_VAL                  ,"out_UPDATE_DIR_VAL                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     156  ALLOC1_SC_SIGNAL( in_UPDATE_DIR_ACK                  ," in_UPDATE_DIR_ACK                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     157//ALLOC1_SC_SIGNAL(out_UPDATE_DIR_ADDRESS              ,"out_UPDATE_DIR_ADDRESS              ",Taddress_t         ,_param->_nb_inst_branch_update);
     158//ALLOC1_SC_SIGNAL(out_UPDATE_DIR_HISTORY              ,"out_UPDATE_DIR_HISTORY              ",Thistory_t         ,_param->_nb_inst_branch_update);
     159//ALLOC1_SC_SIGNAL(out_UPDATE_DIR_DIRECTION            ,"out_UPDATE_DIR_DIRECTION            ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     160  ALLOC1_SC_SIGNAL(out_UPDATE_RAS_VAL                  ,"out_UPDATE_RAS_VAL                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     161  ALLOC1_SC_SIGNAL( in_UPDATE_RAS_ACK                  ," in_UPDATE_RAS_ACK                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     162//ALLOC1_SC_SIGNAL(out_UPDATE_RAS_CONTEXT_ID           ,"out_UPDATE_RAS_CONTEXT_ID           ",Tcontext_t         ,_param->_nb_inst_branch_update);
     163//ALLOC1_SC_SIGNAL(out_UPDATE_RAS_PUSH                 ,"out_UPDATE_RAS_PUSH                 ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     164//ALLOC1_SC_SIGNAL(out_UPDATE_RAS_ADDRESS              ,"out_UPDATE_RAS_ADDRESS              ",Taddress_t         ,_param->_nb_inst_branch_update);
     165//ALLOC1_SC_SIGNAL(out_UPDATE_RAS_INDEX                ,"out_UPDATE_RAS_INDEX                ",Tptr_t             ,_param->_nb_inst_branch_update);
     166//ALLOC1_SC_SIGNAL(out_UPDATE_RAS_MISS_PREDICTION      ,"out_UPDATE_RAS_MISS_PREDICTION      ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     167//ALLOC1_SC_SIGNAL(out_UPDATE_RAS_PREDICTION_IFETCH    ,"out_UPDATE_RAS_PREDICTION_IFETCH    ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     168  ALLOC1_SC_SIGNAL( in_UPDATE_UPT_VAL                  ," in_UPDATE_UPT_VAL                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     169  ALLOC1_SC_SIGNAL(out_UPDATE_UPT_ACK                  ,"out_UPDATE_UPT_ACK                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     170//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_CONTEXT_ID           ," in_UPDATE_UPT_CONTEXT_ID           ",Tcontext_t         ,_param->_nb_inst_branch_update);
     171//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_MISS_PREDICTION      ," in_UPDATE_UPT_MISS_PREDICTION      ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     172//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_DIRECTION_GOOD       ," in_UPDATE_UPT_DIRECTION_GOOD       ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     173  ALLOC1_SC_SIGNAL( in_UPDATE_UPT_BTB_VAL              ," in_UPDATE_UPT_BTB_VAL              ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     174//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_SRC      ," in_UPDATE_UPT_BTB_ADDRESS_SRC      ",Taddress_t         ,_param->_nb_inst_branch_update);
     175//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_DEST     ," in_UPDATE_UPT_BTB_ADDRESS_DEST     ",Taddress_t         ,_param->_nb_inst_branch_update);
     176//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_BTB_CONDITION        ," in_UPDATE_UPT_BTB_CONDITION        ",Tbranch_condition_t,_param->_nb_inst_branch_update);
     177  ALLOC1_SC_SIGNAL( in_UPDATE_UPT_DIR_VAL              ," in_UPDATE_UPT_DIR_VAL              ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     178//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_DIR_HISTORY          ," in_UPDATE_UPT_DIR_HISTORY          ",Thistory_t         ,_param->_nb_inst_branch_update);
     179  ALLOC1_SC_SIGNAL( in_UPDATE_UPT_RAS_VAL              ," in_UPDATE_UPT_RAS_VAL              ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     180//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_RAS_PUSH             ," in_UPDATE_UPT_RAS_PUSH             ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     181//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_RAS_ADDRESS          ," in_UPDATE_UPT_RAS_ADDRESS          ",Taddress_t         ,_param->_nb_inst_branch_update);
     182//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_RAS_INDEX            ," in_UPDATE_UPT_RAS_INDEX            ",Tptr_t             ,_param->_nb_inst_branch_update);
     183//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_RAS_PREDICTION_IFETCH," in_UPDATE_UPT_RAS_PREDICTION_IFETCH",Tcontrol_t         ,_param->_nb_inst_branch_update);
     184
    104185  /********************************************************
    105186   * Instanciation
     
    119200  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_PC_NEXT_IS_DS_TAKE          ,_param->_nb_context);
    120201  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_INSTRUCTION_ENABLE          ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
     202  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BRANCH_STATE                ,_param->_nb_context);
    121203  for (uint32_t i=0; i<_param->_nb_context; i++)
    122204    {
     
    126208        INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i]);
    127209    }
    128   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BRANCH_STATE                ,_param->_nb_context);
    129   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_VAL                     ,_param->_nb_inst_predict);
    130   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ACK                     ,_param->_nb_inst_predict);
     210
     211  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_VAL                     ,_param->_nb_inst_branch_predict);
     212  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ACK                     ,_param->_nb_inst_branch_predict);
    131213  if (_param->_have_port_context_id)
    132   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_CONTEXT_ID              ,_param->_nb_inst_predict);
    133   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_ADDRESS                 ,_param->_nb_inst_predict);
    134   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_HIT                     ,_param->_nb_inst_predict);
    135   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ADDRESS_SRC             ,_param->_nb_inst_predict);
    136   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ADDRESS_DEST            ,_param->_nb_inst_predict);
    137   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_CONDITION               ,_param->_nb_inst_predict);
    138 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_LAST_TAKE               ,_param->_nb_inst_predict);
    139   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_IS_ACCURATE             ,_param->_nb_inst_predict);
    140   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_VAL                     ,_param->_nb_inst_predict);
    141   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_ACK                     ,_param->_nb_inst_predict);
    142   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_ADDRESS_SRC             ,_param->_nb_inst_predict);
    143   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_STATIC                  ,_param->_nb_inst_predict);
    144 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_LAST_TAKE               ,_param->_nb_inst_predict);
    145 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_HISTORY                 ,_param->_nb_inst_predict);
    146   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_DIRECTION               ,_param->_nb_inst_predict);
    147   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_VAL                     ,_param->_nb_inst_predict);
    148   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_ACK                     ,_param->_nb_inst_predict);
     214  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_CONTEXT_ID              ,_param->_nb_inst_branch_predict);
     215  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_ADDRESS                 ,_param->_nb_inst_branch_predict);
     216  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_HIT                     ,_param->_nb_inst_branch_predict);
     217  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ADDRESS_SRC             ,_param->_nb_inst_branch_predict);
     218  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ADDRESS_DEST            ,_param->_nb_inst_branch_predict);
     219  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_CONDITION               ,_param->_nb_inst_branch_predict);
     220//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_LAST_TAKE               ,_param->_nb_inst_branch_predict);
     221  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_IS_ACCURATE             ,_param->_nb_inst_branch_predict);
     222
     223  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_VAL                     ,_param->_nb_inst_branch_predict);
     224  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_ACK                     ,_param->_nb_inst_branch_predict);
     225  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_ADDRESS_SRC             ,_param->_nb_inst_branch_predict);
     226  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_STATIC                  ,_param->_nb_inst_branch_predict);
     227//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_LAST_TAKE               ,_param->_nb_inst_branch_predict);
     228//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_HISTORY                 ,_param->_nb_inst_branch_predict);
     229  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_DIRECTION               ,_param->_nb_inst_branch_predict);
     230
     231  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_VAL                     ,_param->_nb_inst_branch_predict);
     232  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_ACK                     ,_param->_nb_inst_branch_predict);
     233
    149234  if (_param->_have_port_context_id)
    150   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_CONTEXT_ID              ,_param->_nb_inst_predict);
    151   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_HIT                     ,_param->_nb_inst_predict);
    152   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_PUSH                    ,_param->_nb_inst_predict);
    153   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_ADDRESS_PUSH            ,_param->_nb_inst_predict);
    154   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_ADDRESS_POP             ,_param->_nb_inst_predict);
    155 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_INDEX                   ,_param->_nb_inst_predict);
    156   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_VAL                     ,_param->_nb_inst_predict);
    157   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_UPT_ACK                     ,_param->_nb_inst_predict);
     235  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_CONTEXT_ID              ,_param->_nb_inst_branch_predict);
     236  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_HIT                     ,_param->_nb_inst_branch_predict);
     237  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_PUSH                    ,_param->_nb_inst_branch_predict);
     238  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_ADDRESS_PUSH            ,_param->_nb_inst_branch_predict);
     239  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_ADDRESS_POP             ,_param->_nb_inst_branch_predict);
     240//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_INDEX                   ,_param->_nb_inst_branch_predict);
     241  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_VAL                     ,_param->_nb_inst_branch_predict);
     242  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_UPT_ACK                     ,_param->_nb_inst_branch_predict);
    158243  if (_param->_have_port_context_id)
    159   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_CONTEXT_ID              ,_param->_nb_inst_predict);
    160   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_ADDRESS_SRC         ,_param->_nb_inst_predict);
    161   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_ADDRESS_DEST        ,_param->_nb_inst_predict);
    162   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_CONDITION           ,_param->_nb_inst_predict);
    163   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_LAST_TAKE           ,_param->_nb_inst_predict);
    164   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_IS_ACCURATE         ,_param->_nb_inst_predict);
    165 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_DIR_HISTORY             ,_param->_nb_inst_predict);
    166   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_RAS_ADDRESS             ,_param->_nb_inst_predict);
    167 //INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_RAS_INDEX               ,_param->_nb_inst_predict);
     244  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_CONTEXT_ID              ,_param->_nb_inst_branch_predict);
     245  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_ADDRESS_SRC         ,_param->_nb_inst_branch_predict);
     246  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_ADDRESS_DEST        ,_param->_nb_inst_branch_predict);
     247  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_CONDITION           ,_param->_nb_inst_branch_predict);
     248  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_LAST_TAKE           ,_param->_nb_inst_branch_predict);
     249  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_IS_ACCURATE         ,_param->_nb_inst_branch_predict);
     250//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_DIR_HISTORY             ,_param->_nb_inst_branch_predict);
     251  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_RAS_ADDRESS             ,_param->_nb_inst_branch_predict);
     252//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_RAS_INDEX               ,_param->_nb_inst_branch_predict);
     253
     254  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     255  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     256  if (_param->_have_port_context_id)
     257  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     258  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     259  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     260  if (_param->_have_port_max_depth)
     261  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     262  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     263  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     264  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     265  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     266  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_VAL                    ,_param->_nb_inst_branch_decod);
     267  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BTB_ACK                    ,_param->_nb_inst_branch_decod);
     268  if (_param->_have_port_context_id)
     269  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_CONTEXT_ID             ,_param->_nb_inst_branch_decod);
     270  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_ADDRESS_SRC            ,_param->_nb_inst_branch_decod);
     271  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_ADDRESS_DEST           ,_param->_nb_inst_branch_decod);
     272  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_CONDITION              ,_param->_nb_inst_branch_decod);
     273  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_LAST_TAKE              ,_param->_nb_inst_branch_decod);
     274  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_MISS_PREDICTION        ,_param->_nb_inst_branch_decod);
     275  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_IS_ACCURATE            ,_param->_nb_inst_branch_decod);
     276  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_RAS_VAL                    ,_param->_nb_inst_branch_decod);
     277  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_RAS_ACK                    ,_param->_nb_inst_branch_decod);
     278  if (_param->_have_port_context_id)
     279  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_RAS_CONTEXT_ID             ,_param->_nb_inst_branch_decod);
     280  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_RAS_HIT                    ,_param->_nb_inst_branch_decod);
     281  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_RAS_PUSH                   ,_param->_nb_inst_branch_decod);
     282  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_RAS_ADDRESS_PUSH           ,_param->_nb_inst_branch_decod);
     283  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_RAS_ADDRESS_POP            ,_param->_nb_inst_branch_decod);
     284//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_RAS_INDEX                  ,_param->_nb_inst_branch_decod);
     285  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_RAS_MISS_PREDICTION        ,_param->_nb_inst_branch_decod);
     286  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_VAL                    ,_param->_nb_inst_branch_decod);
     287  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_UPT_ACK                    ,_param->_nb_inst_branch_decod);
     288  if (_param->_have_port_context_id)
     289  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_CONTEXT_ID             ,_param->_nb_inst_branch_decod);
     290  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_BTB_ADDRESS_SRC        ,_param->_nb_inst_branch_decod);
     291  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_BTB_ADDRESS_DEST       ,_param->_nb_inst_branch_decod);
     292  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_BTB_CONDITION          ,_param->_nb_inst_branch_decod);
     293  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_BTB_LAST_TAKE          ,_param->_nb_inst_branch_decod);
     294  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_RAS_ADDRESS            ,_param->_nb_inst_branch_decod);
     295//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_RAS_INDEX              ,_param->_nb_inst_branch_decod);
     296  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_MISS_IFETCH            ,_param->_nb_inst_branch_decod);
     297  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_MISS_DECOD             ,_param->_nb_inst_branch_decod);
     298  if (_param->_have_port_max_depth)
     299  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_UPDATE_PREDICTION_ID   ,_param->_nb_inst_branch_decod);
     300
     301  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_VAL                  ,_param->_nb_inst_branch_update);
     302  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_BTB_ACK                  ,_param->_nb_inst_branch_update);
     303//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_CONTEXT_ID           ,_param->_nb_inst_branch_update);
     304//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_ADDRESS_SRC          ,_param->_nb_inst_branch_update);
     305//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_ADDRESS_DEST         ,_param->_nb_inst_branch_update);
     306//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_CONDITION            ,_param->_nb_inst_branch_update);
     307//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_LAST_TAKE            ,_param->_nb_inst_branch_update);
     308//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_MISS_PREDICTION      ,_param->_nb_inst_branch_update);
     309  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_DIR_VAL                  ,_param->_nb_inst_branch_update);
     310  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_DIR_ACK                  ,_param->_nb_inst_branch_update);
     311//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_DIR_ADDRESS              ,_param->_nb_inst_branch_update);
     312//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_DIR_HISTORY              ,_param->_nb_inst_branch_update);
     313//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_DIR_DIRECTION            ,_param->_nb_inst_branch_update);
     314  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_VAL                  ,_param->_nb_inst_branch_update);
     315  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_RAS_ACK                  ,_param->_nb_inst_branch_update);
     316//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_CONTEXT_ID           ,_param->_nb_inst_branch_update);
     317//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_PUSH                 ,_param->_nb_inst_branch_update);
     318//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_ADDRESS              ,_param->_nb_inst_branch_update);
     319//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_INDEX                ,_param->_nb_inst_branch_update);
     320//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_MISS_PREDICTION      ,_param->_nb_inst_branch_update);
     321//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_PREDICTION_IFETCH    ,_param->_nb_inst_branch_update);
     322  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_VAL                  ,_param->_nb_inst_branch_update);
     323  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_UPT_ACK                  ,_param->_nb_inst_branch_update);
     324//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_CONTEXT_ID           ,_param->_nb_inst_branch_update);
     325//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_MISS_PREDICTION      ,_param->_nb_inst_branch_update);
     326//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_DIRECTION_GOOD       ,_param->_nb_inst_branch_update);
     327  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_BTB_VAL              ,_param->_nb_inst_branch_update);
     328//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_BTB_ADDRESS_SRC      ,_param->_nb_inst_branch_update);
     329//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_BTB_ADDRESS_DEST     ,_param->_nb_inst_branch_update);
     330//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_BTB_CONDITION        ,_param->_nb_inst_branch_update);
     331  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_DIR_VAL              ,_param->_nb_inst_branch_update);
     332//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_DIR_HISTORY          ,_param->_nb_inst_branch_update);
     333  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_VAL              ,_param->_nb_inst_branch_update);
     334//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_PUSH             ,_param->_nb_inst_branch_update);
     335//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_ADDRESS          ,_param->_nb_inst_branch_update);
     336//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_INDEX            ,_param->_nb_inst_branch_update);
     337//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_PREDICTION_IFETCH,_param->_nb_inst_branch_update);
     338
    168339  for (uint32_t i=0; i<_param->_nb_context; i++)
    169340    {
    170341      if (_param->_have_port_depth [i])
    171342        {
     343          INSTANCE_SC_SIGNAL(_Prediction_unit_Glue, in_DEPTH_UPT_TAIL      [i]);
     344          INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_DEPTH_TAIL          [i]);
     345        }
    172346          INSTANCE_SC_SIGNAL(_Prediction_unit_Glue, in_DEPTH_UPT_NB_BRANCH [i]);
    173           INSTANCE_SC_SIGNAL(_Prediction_unit_Glue, in_DEPTH_UPT_TAIL      [i]);
    174         }
     347          INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_DEPTH_NB_BRANCH     [i]);
    175348    }
    176349
     
    191364
    192365  int32_t percent_transaction_predict =  75;
     366  int32_t percent_transaction_decod   =  75;
    193367
    194368  SC_START(0);
     
    199373  for (uint32_t i=0; i<_param->_nb_context; i++)
    200374    in_PREDICT_VAL [i]->write(0);
    201   for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     375  for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    202376    {
    203377      in_PREDICT_BTB_ACK         [i]->write(0);
     
    208382      in_PREDICT_BTB_IS_ACCURATE [i]->write(1);
    209383    }
     384  for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     385    for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     386      in_DECOD_VAL [i][j]->write(0);
    210387
    211388  in_NRESET->write(0);
     
    237414            do
    238415              {
    239                 for (uint32_t j=0; j<_param->_nb_inst_predict; j++)
     416                for (uint32_t j=0; j<_param->_nb_inst_branch_predict; j++)
    240417                  in_PREDICT_BTB_ACK [j]->write(0);
    241418
     
    245422
    246423                uint32_t port;
    247                 for (port=0; port<_param->_nb_inst_predict; port++)
     424                for (port=0; port<_param->_nb_inst_branch_predict; port++)
    248425                  {
    249426                    if (_param->_have_port_context_id)
     
    289466            for (uint32_t i=0; i<_param->_nb_context; i++)
    290467              in_PREDICT_VAL [i]->write(0);
    291             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     468            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    292469              {
    293470                in_PREDICT_BTB_ACK [i]->write(0);
     
    319496            do
    320497              {
    321                 for (uint32_t j=0; j<_param->_nb_inst_predict; j++)
     498                for (uint32_t j=0; j<_param->_nb_inst_branch_predict; j++)
    322499                  in_PREDICT_BTB_ACK [j]->write(0);
    323500
     
    327504
    328505                uint32_t port;
    329                 for (port=0; port<_param->_nb_inst_predict; port++)
     506                for (port=0; port<_param->_nb_inst_branch_predict; port++)
    330507                  {
    331508                    if (_param->_have_port_context_id)
     
    355532
    356533                    TEST(Taddress_t        ,out_PREDICT_PC_NEXT                     [context]->read(),addr_dest);
    357 //                  TEST(Tcontrol_t        ,out_PREDICT_PC_NEXT_IS_DS_TAKE          [context]->read(),0);
     534                    TEST(Tcontrol_t        ,out_PREDICT_PC_NEXT_IS_DS_TAKE          [context]->read(),i==(_param->_nb_instruction [context]-1));
    358535                    TEST(Tinst_ifetch_ptr_t,out_PREDICT_INST_IFETCH_PTR             [context]->read(),i);
    359536                    TEST(Tbranch_state_t   ,out_PREDICT_BRANCH_STATE                [context]->read(),BRANCH_STATE_NSPEC_TAKE);
    360537//                  TEST(Tprediction_ptr_t ,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [context]->read(),0);
    361                    
    362 //                  for (uint32_t j=0; j<i; j++)
    363 //                    TEST(Tcontrol_t        ,out_PREDICT_INSTRUCTION_ENABLE [context][j]->read(),0);
    364 //                  for (uint32_t j=i; j<_param->_nb_instruction[context]; j++)
    365 //                    TEST(Tcontrol_t        ,out_PREDICT_INSTRUCTION_ENABLE [context][j]->read(),1);
    366                    
     538
     539                    uint32_t k=((addr_src%_param->_nb_instruction[context])==_param->_nb_instruction[context]-1)?_param->_nb_instruction[context]:((addr_src%_param->_nb_instruction[context])+2);
     540                    LABEL("instruction enable : ");
     541                    LABEL("  [0:%d[ = 1",k);
     542                    LABEL("  [%d:%d[ = 1",k,_param->_nb_instruction[context]);
     543                    for (uint32_t j=0; j<k; j++)
     544                      TEST(Tcontrol_t        ,out_PREDICT_INSTRUCTION_ENABLE [context][j]->read(),1);
     545                    for (uint32_t j=k; j<_param->_nb_instruction[context]; j++)
     546                      TEST(Tcontrol_t        ,out_PREDICT_INSTRUCTION_ENABLE [context][j]->read(),0);
     547
    367548                    TEST(Tcontrol_t        ,out_PREDICT_BTB_VAL        [port]->read(),1);
    368549                    TEST(Tcontext_t        ,out_PREDICT_BTB_CONTEXT_ID [port]->read(),context);
    369550                    TEST(Taddress_t        ,out_PREDICT_BTB_ADDRESS    [port]->read(),addr);
    370551                  }
    371 
     552               
    372553                SC_START(1);
    373554
     
    376557            for (uint32_t i=0; i<_param->_nb_context; i++)
    377558              in_PREDICT_VAL [i]->write(0);
    378             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     559            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    379560              {
    380561                in_PREDICT_BTB_ACK [i]->write(0);
     
    386567      }
    387568
     569      {
     570        LABEL("Decod - Ok");
     571        uint32_t decod_unit = rand()%_param->_nb_decod_unit;
     572        LABEL("decod_unit : %d",decod_unit);
     573
     574        for (uint32_t i=0; i<_param->_nb_inst_decod[i];i++)
     575          {
     576            Tcontext_t context = i%_param->_nb_context;
     577            in_DECOD_CONTEXT_ID                  [decod_unit][i]->write(context);
     578            in_DECOD_MATCH_INST_IFETCH_PTR       [decod_unit][i]->write(1);
     579            in_DECOD_BRANCH_STATE                [decod_unit][i]->write(BRANCH_STATE_NSPEC_TAKE);
     580
     581            bool find = false;
     582            do
     583              {
     584                in_DECOD_VAL                         [decod_unit][i]->write((rand()%100)<percent_transaction_decod);
     585                in_DECOD_BRANCH_UPDATE_PREDICTION_ID [decod_unit][i]->write(rand()%_param->_size_depth[context]);
     586               
     587                in_DECOD_BTB_ACK[0]->write((rand()%100)<percent_transaction_decod);
     588                in_DECOD_RAS_ACK[0]->write((rand()%100)<percent_transaction_decod);
     589                in_DECOD_UPT_ACK[0]->write((rand()%100)<percent_transaction_decod);
     590               
     591                SC_START(0);
     592           
     593                LABEL("DECOD[%d][%d] - %d %d",decod_unit,i,in_DECOD_VAL[decod_unit][i]->read(),out_DECOD_ACK[decod_unit][i]->read());
     594                if (in_DECOD_VAL[decod_unit][i]->read() and out_DECOD_ACK[decod_unit][i]->read())
     595                  {
     596                    LABEL("DECOD[%d][%d] - Transaction Accepted",decod_unit,i);
     597                    TEST(Tcontrol_t, in_DECOD_UPT_ACK[0]->read(),1);
     598                    TEST(Tcontrol_t,out_DECOD_BTB_VAL[0]->read(),0);
     599                    TEST(Tcontrol_t,out_DECOD_RAS_VAL[0]->read(),0);
     600                    TEST(Tcontrol_t,out_DECOD_UPT_VAL[0]->read(),1);
     601                    find = true;
     602                  }
     603
     604                SC_START(1);
     605
     606              } while (not find);
     607
     608            in_DECOD_VAL    [decod_unit][i]->write(0);
     609            in_DECOD_BTB_ACK[0]->write(0);
     610            in_DECOD_RAS_ACK[0]->write(0);
     611            in_DECOD_UPT_ACK[0]->write(0);
     612          }
     613      }
     614
     615      {
     616        LABEL("Decod - Ko");
     617        uint32_t decod_unit = rand()%_param->_nb_decod_unit;
     618        LABEL("decod_unit : %d",decod_unit);
     619
     620        for (uint32_t i=0; i<_param->_nb_inst_decod[i];i++)
     621          {
     622            Tcontext_t context = i%_param->_nb_context;
     623            in_DECOD_CONTEXT_ID                  [decod_unit][i]->write(context);
     624            in_DECOD_MATCH_INST_IFETCH_PTR       [decod_unit][i]->write(0);
     625            in_DECOD_BRANCH_STATE                [decod_unit][i]->write(BRANCH_STATE_SPEC_TAKE);
     626            in_DECOD_BRANCH_UPDATE_PREDICTION_ID [decod_unit][i]->write(i%_param->_max_size_depth);
     627            in_DECOD_BRANCH_CONDITION            [decod_unit][i]->write(BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK);
     628            in_DECOD_BRANCH_DIRECTION            [decod_unit][i]->write(1);
     629            in_DECOD_ADDRESS_SRC                 [decod_unit][i]->write(0xdeadbeef+i);
     630            in_DECOD_ADDRESS_DEST                [decod_unit][i]->write(0x11061979+i);
     631
     632                                                                                     
     633            bool find = false;
     634            do
     635              {
     636                in_DECOD_VAL                         [decod_unit][i]->write((rand()%100)<percent_transaction_decod);
     637               
     638                in_DECOD_BTB_ACK[0]->write((rand()%100)<percent_transaction_decod);
     639                in_DECOD_RAS_ACK[0]->write((rand()%100)<percent_transaction_decod);
     640                in_DECOD_UPT_ACK[0]->write((rand()%100)<percent_transaction_decod);
     641
     642                in_DECOD_RAS_HIT[0]->write(1);
     643                in_DECOD_RAS_ADDRESS_POP[0]->write(0xdadedead+i);
     644
     645               
     646                SC_START(0);
     647           
     648                LABEL("DECOD[%d][%d] - %d %d",decod_unit,i,in_DECOD_VAL[decod_unit][i]->read(),out_DECOD_ACK[decod_unit][i]->read());
     649                if (in_DECOD_VAL[decod_unit][i]->read() and out_DECOD_ACK[decod_unit][i]->read())
     650                  {
     651                    LABEL("DECOD[%d][%d] - Transaction Accepted",decod_unit,i);
     652                    TEST(Tcontrol_t         , in_DECOD_UPT_ACK                  [0]->read(),1);
     653                    TEST(Tcontrol_t         ,out_DECOD_BTB_VAL                  [0]->read(),1);
     654                    TEST(Tcontrol_t         ,out_DECOD_RAS_VAL                  [0]->read(),1);
     655                    TEST(Tcontrol_t         ,out_DECOD_UPT_VAL                  [0]->read(),1);
     656
     657                    TEST(Tcontext_t         ,out_DECOD_BTB_CONTEXT_ID           [0]->read(),context);
     658                    TEST(Taddress_t         ,out_DECOD_BTB_ADDRESS_SRC          [0]->read(),0xdeadbeef+i);
     659                    TEST(Taddress_t         ,out_DECOD_BTB_ADDRESS_DEST         [0]->read(),0x11061979+i);
     660                    TEST(Tbranch_condition_t,out_DECOD_BTB_CONDITION            [0]->read(),BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK);
     661                    TEST(Tcontrol_t         ,out_DECOD_BTB_LAST_TAKE            [0]->read(),1);
     662                    TEST(Tcontrol_t         ,out_DECOD_BTB_MISS_PREDICTION      [0]->read(),1);
     663                    TEST(Tcontrol_t         ,out_DECOD_BTB_IS_ACCURATE          [0]->read(),0);
     664                    TEST(Tcontext_t         ,out_DECOD_RAS_CONTEXT_ID           [0]->read(),context);
     665                    TEST(Tcontrol_t         ,out_DECOD_RAS_PUSH                 [0]->read(),1);
     666                    TEST(Taddress_t         ,out_DECOD_RAS_ADDRESS_PUSH         [0]->read(),0x11061979+i);
     667                    TEST(Tcontrol_t         ,out_DECOD_RAS_MISS_PREDICTION      [0]->read(),1);
     668                    TEST(Tcontext_t         ,out_DECOD_UPT_CONTEXT_ID           [0]->read(),context);
     669                    TEST(Taddress_t         ,out_DECOD_UPT_BTB_ADDRESS_SRC      [0]->read(),0xdeadbeef+i);
     670                    TEST(Taddress_t         ,out_DECOD_UPT_BTB_ADDRESS_DEST     [0]->read(),0x11061979+i);
     671                    TEST(Tbranch_condition_t,out_DECOD_UPT_BTB_CONDITION        [0]->read(),BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK);
     672                    TEST(Tcontrol_t         ,out_DECOD_UPT_BTB_LAST_TAKE        [0]->read(),1);
     673                    TEST(Taddress_t         ,out_DECOD_UPT_RAS_ADDRESS          [0]->read(),0xdadedead+i);
     674                    TEST(Tcontrol_t         ,out_DECOD_UPT_MISS_IFETCH          [0]->read(),1);
     675                    TEST(Tcontrol_t         ,out_DECOD_UPT_MISS_DECOD           [0]->read(),0);
     676                    TEST(Tprediction_ptr_t  ,out_DECOD_UPT_UPDATE_PREDICTION_ID [0]->read(),i%_param->_max_size_depth);
     677
     678                    find = true;
     679                  }
     680
     681                SC_START(1);
     682
     683              } while (not find);
     684
     685            in_DECOD_VAL    [decod_unit][i]->write(0);
     686            in_DECOD_BTB_ACK[0]->write(0);
     687            in_DECOD_RAS_ACK[0]->write(0);
     688            in_DECOD_UPT_ACK[0]->write(0);
     689          }
     690      }
    388691
    389692      SC_START(1);
     
    413716  DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_STATE                ,_param->_nb_context);
    414717  DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID ,_param->_nb_context);
    415   DELETE1_SC_SIGNAL(out_PREDICT_BTB_VAL                     ,_param->_nb_inst_predict);
    416   DELETE1_SC_SIGNAL( in_PREDICT_BTB_ACK                     ,_param->_nb_inst_predict);
    417   DELETE1_SC_SIGNAL(out_PREDICT_BTB_CONTEXT_ID              ,_param->_nb_inst_predict);
    418   DELETE1_SC_SIGNAL(out_PREDICT_BTB_ADDRESS                 ,_param->_nb_inst_predict);
    419   DELETE1_SC_SIGNAL( in_PREDICT_BTB_HIT                     ,_param->_nb_inst_predict);
    420   DELETE1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC             ,_param->_nb_inst_predict);
    421   DELETE1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST            ,_param->_nb_inst_predict);
    422   DELETE1_SC_SIGNAL( in_PREDICT_BTB_CONDITION               ,_param->_nb_inst_predict);
    423 //DELETE1_SC_SIGNAL( in_PREDICT_BTB_LAST_TAKE               ,_param->_nb_inst_predict);
    424   DELETE1_SC_SIGNAL( in_PREDICT_BTB_IS_ACCURATE             ,_param->_nb_inst_predict);
    425   DELETE1_SC_SIGNAL(out_PREDICT_DIR_VAL                     ,_param->_nb_inst_predict);
    426   DELETE1_SC_SIGNAL( in_PREDICT_DIR_ACK                     ,_param->_nb_inst_predict);
    427   DELETE1_SC_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC             ,_param->_nb_inst_predict);
    428   DELETE1_SC_SIGNAL(out_PREDICT_DIR_STATIC                  ,_param->_nb_inst_predict);
    429 //DELETE1_SC_SIGNAL(out_PREDICT_DIR_LAST_TAKE               ,_param->_nb_inst_predict);
    430 //DELETE1_SC_SIGNAL( in_PREDICT_DIR_HISTORY                 ,_param->_nb_inst_predict);
    431   DELETE1_SC_SIGNAL( in_PREDICT_DIR_DIRECTION               ,_param->_nb_inst_predict);
    432   DELETE1_SC_SIGNAL(out_PREDICT_RAS_VAL                     ,_param->_nb_inst_predict);
    433   DELETE1_SC_SIGNAL( in_PREDICT_RAS_ACK                     ,_param->_nb_inst_predict);
    434   DELETE1_SC_SIGNAL(out_PREDICT_RAS_CONTEXT_ID              ,_param->_nb_inst_predict);
    435   DELETE1_SC_SIGNAL( in_PREDICT_RAS_HIT                     ,_param->_nb_inst_predict);
    436   DELETE1_SC_SIGNAL(out_PREDICT_RAS_PUSH                    ,_param->_nb_inst_predict);
    437   DELETE1_SC_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH            ,_param->_nb_inst_predict);
    438   DELETE1_SC_SIGNAL( in_PREDICT_RAS_ADDRESS_POP             ,_param->_nb_inst_predict);
    439 //DELETE1_SC_SIGNAL( in_PREDICT_RAS_INDEX                   ,_param->_nb_inst_predict);
    440   DELETE1_SC_SIGNAL(out_PREDICT_UPT_VAL                     ,_param->_nb_inst_predict);
    441   DELETE1_SC_SIGNAL( in_PREDICT_UPT_ACK                     ,_param->_nb_inst_predict);
    442   DELETE1_SC_SIGNAL(out_PREDICT_UPT_CONTEXT_ID              ,_param->_nb_inst_predict);
    443   DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC         ,_param->_nb_inst_predict);
    444   DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST        ,_param->_nb_inst_predict);
    445   DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_CONDITION           ,_param->_nb_inst_predict);
    446   DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE           ,_param->_nb_inst_predict);
    447   DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE         ,_param->_nb_inst_predict);
    448 //DELETE1_SC_SIGNAL(out_PREDICT_UPT_DIR_HISTORY             ,_param->_nb_inst_predict);
    449   DELETE1_SC_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS             ,_param->_nb_inst_predict);
    450 //DELETE1_SC_SIGNAL(out_PREDICT_UPT_RAS_INDEX               ,_param->_nb_inst_predict);
     718  DELETE1_SC_SIGNAL(out_PREDICT_BTB_VAL                     ,_param->_nb_inst_branch_predict);
     719  DELETE1_SC_SIGNAL( in_PREDICT_BTB_ACK                     ,_param->_nb_inst_branch_predict);
     720  DELETE1_SC_SIGNAL(out_PREDICT_BTB_CONTEXT_ID              ,_param->_nb_inst_branch_predict);
     721  DELETE1_SC_SIGNAL(out_PREDICT_BTB_ADDRESS                 ,_param->_nb_inst_branch_predict);
     722  DELETE1_SC_SIGNAL( in_PREDICT_BTB_HIT                     ,_param->_nb_inst_branch_predict);
     723  DELETE1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC             ,_param->_nb_inst_branch_predict);
     724  DELETE1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST            ,_param->_nb_inst_branch_predict);
     725  DELETE1_SC_SIGNAL( in_PREDICT_BTB_CONDITION               ,_param->_nb_inst_branch_predict);
     726//DELETE1_SC_SIGNAL( in_PREDICT_BTB_LAST_TAKE               ,_param->_nb_inst_branch_predict);
     727  DELETE1_SC_SIGNAL( in_PREDICT_BTB_IS_ACCURATE             ,_param->_nb_inst_branch_predict);
     728  DELETE1_SC_SIGNAL(out_PREDICT_DIR_VAL                     ,_param->_nb_inst_branch_predict);
     729  DELETE1_SC_SIGNAL( in_PREDICT_DIR_ACK                     ,_param->_nb_inst_branch_predict);
     730  DELETE1_SC_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC             ,_param->_nb_inst_branch_predict);
     731  DELETE1_SC_SIGNAL(out_PREDICT_DIR_STATIC                  ,_param->_nb_inst_branch_predict);
     732//DELETE1_SC_SIGNAL(out_PREDICT_DIR_LAST_TAKE               ,_param->_nb_inst_branch_predict);
     733//DELETE1_SC_SIGNAL( in_PREDICT_DIR_HISTORY                 ,_param->_nb_inst_branch_predict);
     734  DELETE1_SC_SIGNAL( in_PREDICT_DIR_DIRECTION               ,_param->_nb_inst_branch_predict);
     735  DELETE1_SC_SIGNAL(out_PREDICT_RAS_VAL                     ,_param->_nb_inst_branch_predict);
     736  DELETE1_SC_SIGNAL( in_PREDICT_RAS_ACK                     ,_param->_nb_inst_branch_predict);
     737  DELETE1_SC_SIGNAL(out_PREDICT_RAS_CONTEXT_ID              ,_param->_nb_inst_branch_predict);
     738  DELETE1_SC_SIGNAL( in_PREDICT_RAS_HIT                     ,_param->_nb_inst_branch_predict);
     739  DELETE1_SC_SIGNAL(out_PREDICT_RAS_PUSH                    ,_param->_nb_inst_branch_predict);
     740  DELETE1_SC_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH            ,_param->_nb_inst_branch_predict);
     741  DELETE1_SC_SIGNAL( in_PREDICT_RAS_ADDRESS_POP             ,_param->_nb_inst_branch_predict);
     742//DELETE1_SC_SIGNAL( in_PREDICT_RAS_INDEX                   ,_param->_nb_inst_branch_predict);
     743  DELETE1_SC_SIGNAL(out_PREDICT_UPT_VAL                     ,_param->_nb_inst_branch_predict);
     744  DELETE1_SC_SIGNAL( in_PREDICT_UPT_ACK                     ,_param->_nb_inst_branch_predict);
     745  DELETE1_SC_SIGNAL(out_PREDICT_UPT_CONTEXT_ID              ,_param->_nb_inst_branch_predict);
     746  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC         ,_param->_nb_inst_branch_predict);
     747  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST        ,_param->_nb_inst_branch_predict);
     748  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_CONDITION           ,_param->_nb_inst_branch_predict);
     749  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE           ,_param->_nb_inst_branch_predict);
     750  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE         ,_param->_nb_inst_branch_predict);
     751//DELETE1_SC_SIGNAL(out_PREDICT_UPT_DIR_HISTORY             ,_param->_nb_inst_branch_predict);
     752  DELETE1_SC_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS             ,_param->_nb_inst_branch_predict);
     753//DELETE1_SC_SIGNAL(out_PREDICT_UPT_RAS_INDEX               ,_param->_nb_inst_branch_predict);
    451754  DELETE1_SC_SIGNAL( in_DEPTH_UPT_NB_BRANCH                 ,_param->_nb_context);
    452755  DELETE1_SC_SIGNAL( in_DEPTH_UPT_TAIL                      ,_param->_nb_context);
     756  DELETE1_SC_SIGNAL(out_DEPTH_NB_BRANCH                     ,_param->_nb_context);
     757  DELETE1_SC_SIGNAL(out_DEPTH_TAIL                          ,_param->_nb_context);
     758
     759  DELETE2_SC_SIGNAL( in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     760  DELETE2_SC_SIGNAL(out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     761  DELETE2_SC_SIGNAL( in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     762  DELETE2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     763  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     764  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     765  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     766  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     767  DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     768  DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     769  DELETE1_SC_SIGNAL(out_DECOD_BTB_VAL                    ,_param->_nb_inst_branch_decod);
     770  DELETE1_SC_SIGNAL( in_DECOD_BTB_ACK                    ,_param->_nb_inst_branch_decod);
     771  DELETE1_SC_SIGNAL(out_DECOD_BTB_CONTEXT_ID             ,_param->_nb_inst_branch_decod);
     772  DELETE1_SC_SIGNAL(out_DECOD_BTB_ADDRESS_SRC            ,_param->_nb_inst_branch_decod);
     773  DELETE1_SC_SIGNAL(out_DECOD_BTB_ADDRESS_DEST           ,_param->_nb_inst_branch_decod);
     774  DELETE1_SC_SIGNAL(out_DECOD_BTB_CONDITION              ,_param->_nb_inst_branch_decod);
     775  DELETE1_SC_SIGNAL(out_DECOD_BTB_LAST_TAKE              ,_param->_nb_inst_branch_decod);
     776  DELETE1_SC_SIGNAL(out_DECOD_BTB_MISS_PREDICTION        ,_param->_nb_inst_branch_decod);
     777  DELETE1_SC_SIGNAL(out_DECOD_BTB_IS_ACCURATE            ,_param->_nb_inst_branch_decod);
     778  DELETE1_SC_SIGNAL(out_DECOD_RAS_VAL                    ,_param->_nb_inst_branch_decod);
     779  DELETE1_SC_SIGNAL( in_DECOD_RAS_ACK                    ,_param->_nb_inst_branch_decod);
     780  DELETE1_SC_SIGNAL(out_DECOD_RAS_CONTEXT_ID             ,_param->_nb_inst_branch_decod);
     781  DELETE1_SC_SIGNAL( in_DECOD_RAS_HIT                    ,_param->_nb_inst_branch_decod);
     782  DELETE1_SC_SIGNAL(out_DECOD_RAS_PUSH                   ,_param->_nb_inst_branch_decod);
     783  DELETE1_SC_SIGNAL(out_DECOD_RAS_ADDRESS_PUSH           ,_param->_nb_inst_branch_decod);
     784  DELETE1_SC_SIGNAL( in_DECOD_RAS_ADDRESS_POP            ,_param->_nb_inst_branch_decod);
     785//DELETE1_SC_SIGNAL( in_DECOD_RAS_INDEX                  ,_param->_nb_inst_branch_decod);
     786  DELETE1_SC_SIGNAL(out_DECOD_RAS_MISS_PREDICTION        ,_param->_nb_inst_branch_decod);
     787  DELETE1_SC_SIGNAL(out_DECOD_UPT_VAL                    ,_param->_nb_inst_branch_decod);
     788  DELETE1_SC_SIGNAL( in_DECOD_UPT_ACK                    ,_param->_nb_inst_branch_decod);
     789  DELETE1_SC_SIGNAL(out_DECOD_UPT_CONTEXT_ID             ,_param->_nb_inst_branch_decod);
     790  DELETE1_SC_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_SRC        ,_param->_nb_inst_branch_decod);
     791  DELETE1_SC_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_DEST       ,_param->_nb_inst_branch_decod);
     792  DELETE1_SC_SIGNAL(out_DECOD_UPT_BTB_CONDITION          ,_param->_nb_inst_branch_decod);
     793  DELETE1_SC_SIGNAL(out_DECOD_UPT_BTB_LAST_TAKE          ,_param->_nb_inst_branch_decod);
     794  DELETE1_SC_SIGNAL(out_DECOD_UPT_RAS_ADDRESS            ,_param->_nb_inst_branch_decod);
     795//DELETE1_SC_SIGNAL(out_DECOD_UPT_RAS_INDEX              ,_param->_nb_inst_branch_decod);
     796  DELETE1_SC_SIGNAL(out_DECOD_UPT_MISS_IFETCH            ,_param->_nb_inst_branch_decod);
     797  DELETE1_SC_SIGNAL(out_DECOD_UPT_MISS_DECOD             ,_param->_nb_inst_branch_decod);
     798  DELETE1_SC_SIGNAL(out_DECOD_UPT_UPDATE_PREDICTION_ID   ,_param->_nb_inst_branch_decod);
     799
     800  DELETE1_SC_SIGNAL(out_UPDATE_BTB_VAL                  ,_param->_nb_inst_branch_update);
     801  DELETE1_SC_SIGNAL( in_UPDATE_BTB_ACK                  ,_param->_nb_inst_branch_update);
     802//DELETE1_SC_SIGNAL(out_UPDATE_BTB_CONTEXT_ID           ,_param->_nb_inst_branch_update);
     803//DELETE1_SC_SIGNAL(out_UPDATE_BTB_ADDRESS_SRC          ,_param->_nb_inst_branch_update);
     804//DELETE1_SC_SIGNAL(out_UPDATE_BTB_ADDRESS_DEST         ,_param->_nb_inst_branch_update);
     805//DELETE1_SC_SIGNAL(out_UPDATE_BTB_CONDITION            ,_param->_nb_inst_branch_update);
     806//DELETE1_SC_SIGNAL(out_UPDATE_BTB_LAST_TAKE            ,_param->_nb_inst_branch_update);
     807//DELETE1_SC_SIGNAL(out_UPDATE_BTB_MISS_PREDICTION      ,_param->_nb_inst_branch_update);
     808  DELETE1_SC_SIGNAL(out_UPDATE_DIR_VAL                  ,_param->_nb_inst_branch_update);
     809  DELETE1_SC_SIGNAL( in_UPDATE_DIR_ACK                  ,_param->_nb_inst_branch_update);
     810//DELETE1_SC_SIGNAL(out_UPDATE_DIR_ADDRESS              ,_param->_nb_inst_branch_update);
     811//DELETE1_SC_SIGNAL(out_UPDATE_DIR_HISTORY              ,_param->_nb_inst_branch_update);
     812//DELETE1_SC_SIGNAL(out_UPDATE_DIR_DIRECTION            ,_param->_nb_inst_branch_update);
     813  DELETE1_SC_SIGNAL(out_UPDATE_RAS_VAL                  ,_param->_nb_inst_branch_update);
     814  DELETE1_SC_SIGNAL( in_UPDATE_RAS_ACK                  ,_param->_nb_inst_branch_update);
     815//DELETE1_SC_SIGNAL(out_UPDATE_RAS_CONTEXT_ID           ,_param->_nb_inst_branch_update);
     816//DELETE1_SC_SIGNAL(out_UPDATE_RAS_PUSH                 ,_param->_nb_inst_branch_update);
     817//DELETE1_SC_SIGNAL(out_UPDATE_RAS_ADDRESS              ,_param->_nb_inst_branch_update);
     818//DELETE1_SC_SIGNAL(out_UPDATE_RAS_INDEX                ,_param->_nb_inst_branch_update);
     819//DELETE1_SC_SIGNAL(out_UPDATE_RAS_MISS_PREDICTION      ,_param->_nb_inst_branch_update);
     820//DELETE1_SC_SIGNAL(out_UPDATE_RAS_PREDICTION_IFETCH    ,_param->_nb_inst_branch_update);
     821  DELETE1_SC_SIGNAL( in_UPDATE_UPT_VAL                  ,_param->_nb_inst_branch_update);
     822  DELETE1_SC_SIGNAL(out_UPDATE_UPT_ACK                  ,_param->_nb_inst_branch_update);
     823//DELETE1_SC_SIGNAL( in_UPDATE_UPT_CONTEXT_ID           ,_param->_nb_inst_branch_update);
     824//DELETE1_SC_SIGNAL( in_UPDATE_UPT_MISS_PREDICTION      ,_param->_nb_inst_branch_update);
     825//DELETE1_SC_SIGNAL( in_UPDATE_UPT_DIRECTION_GOOD       ,_param->_nb_inst_branch_update);
     826  DELETE1_SC_SIGNAL( in_UPDATE_UPT_BTB_VAL              ,_param->_nb_inst_branch_update);
     827//DELETE1_SC_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_SRC      ,_param->_nb_inst_branch_update);
     828//DELETE1_SC_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_DEST     ,_param->_nb_inst_branch_update);
     829//DELETE1_SC_SIGNAL( in_UPDATE_UPT_BTB_CONDITION        ,_param->_nb_inst_branch_update);
     830  DELETE1_SC_SIGNAL( in_UPDATE_UPT_DIR_VAL              ,_param->_nb_inst_branch_update);
     831//DELETE1_SC_SIGNAL( in_UPDATE_UPT_DIR_HISTORY          ,_param->_nb_inst_branch_update);
     832  DELETE1_SC_SIGNAL( in_UPDATE_UPT_RAS_VAL              ,_param->_nb_inst_branch_update);
     833//DELETE1_SC_SIGNAL( in_UPDATE_UPT_RAS_PUSH             ,_param->_nb_inst_branch_update);
     834//DELETE1_SC_SIGNAL( in_UPDATE_UPT_RAS_ADDRESS          ,_param->_nb_inst_branch_update);
     835//DELETE1_SC_SIGNAL( in_UPDATE_UPT_RAS_INDEX            ,_param->_nb_inst_branch_update);
     836//DELETE1_SC_SIGNAL( in_UPDATE_UPT_RAS_PREDICTION_IFETCH,_param->_nb_inst_branch_update);
     837
    453838    }
    454839#endif
    455840
    456841  delete _Prediction_unit_Glue;
     842
    457843#ifdef STATISTICS
    458844  delete _parameters_statistics;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Parameters.h

    r81 r82  
    2424  {
    2525    //-----[ fields ]------------------------------------------------------------
    26   public : uint32_t   _nb_context               ;
     26  public : uint32_t   _nb_context               ;// == nb_ifetch_unit
     27  public : uint32_t   _nb_decod_unit            ;
     28//public : uint32_t   _nb_ooo_engine            ;
    2729  public : uint32_t   _size_address             ;
    28   public : uint32_t * _nb_instruction           ;
    29   public : uint32_t * _size_depth               ;
    30   public : uint32_t   _nb_inst_predict          ;
    31   public : uint32_t   _nb_inst_decod            ;
    32   public : uint32_t   _nb_inst_update           ;
     30  public : uint32_t * _nb_instruction           ;//[nb_context]
     31  public : uint32_t * _size_depth               ;//[nb_context]
     32  public : uint32_t * _nb_inst_decod            ;//[nb_decod_unit]
     33//public : uint32_t * _nb_inst_update           ;//[nb_ooo_engine]
     34  public : uint32_t   _nb_inst_branch_predict   ;
     35  public : uint32_t   _nb_inst_branch_decod     ;
     36  public : uint32_t   _nb_inst_branch_update    ;
    3337//public : uint32_t   _nb_inst_branch_complete  ;
    3438
    3539  public : uint32_t   _size_context_id          ;
    36   public : uint32_t * _size_inst_ifetch_ptr     ;
     40  public : uint32_t * _size_inst_ifetch_ptr     ;//[nb_context]
     41  public : uint32_t   _max_size_depth           ;
    3742
    3843  public : bool       _have_port_context_id     ;
    39   public : bool     * _have_port_depth          ;   
    40   public : bool     * _have_port_inst_ifetch_ptr;
     44  public : bool       _have_port_max_depth      ;
     45  public : bool     * _have_port_depth          ;//[nb_context]
     46  public : bool     * _have_port_inst_ifetch_ptr;//[nb_context]
    4147
    4248    //-----[ methods ]-----------------------------------------------------------
    43   public : Parameters  (uint32_t   nb_context     ,
    44                         uint32_t   size_address   ,
    45                         uint32_t * nb_instruction ,
    46                         uint32_t * size_depth     ,
    47                         uint32_t   nb_inst_predict,
    48                         uint32_t   nb_inst_decod  ,
    49                         uint32_t   nb_inst_update );
     49  public : Parameters  (uint32_t   nb_context            ,
     50                        uint32_t   nb_decod_unit         ,
     51//                      uint32_t   nb_ooo_engine         ,
     52                        uint32_t   size_address          ,
     53                        uint32_t * nb_instruction        ,
     54                        uint32_t * size_depth            ,
     55                        uint32_t * nb_inst_decod         ,
     56//                      uint32_t * nb_inst_update        ,
     57                        uint32_t   nb_inst_branch_predict,
     58                        uint32_t   nb_inst_branch_decod  ,
     59                        uint32_t   nb_inst_branch_update );
    5060//   public : Parameters  (Parameters & param) ;
    5161  public : ~Parameters () ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Prediction_unit_Glue.h

    r81 r82  
    7575  public    : SC_OUT(Tprediction_ptr_t  )  ** out_PREDICT_BRANCH_UPDATE_PREDICTION_ID ; //[nb_context]
    7676
    77   public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_BTB_VAL                     ; //[nb_inst_predict]
    78   public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_ACK                     ; //[nb_inst_predict]
    79   public    : SC_OUT(Tcontext_t         )  ** out_PREDICT_BTB_CONTEXT_ID              ; //[nb_inst_predict]
    80   public    : SC_OUT(Taddress_t         )  ** out_PREDICT_BTB_ADDRESS                 ; //[nb_inst_predict]
    81   public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_HIT                     ; //[nb_inst_predict]
    82   public    : SC_IN (Taddress_t         )  **  in_PREDICT_BTB_ADDRESS_SRC             ; //[nb_inst_predict]
    83   public    : SC_IN (Taddress_t         )  **  in_PREDICT_BTB_ADDRESS_DEST            ; //[nb_inst_predict]
    84   public    : SC_IN (Tbranch_condition_t)  **  in_PREDICT_BTB_CONDITION               ; //[nb_inst_predict]
    85 //public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_LAST_TAKE               ; //[nb_inst_predict]  DIR.LAST_TAKE
    86   public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_IS_ACCURATE             ; //[nb_inst_predict]
     77  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_BTB_VAL                     ; //[nb_inst_branch_predict]
     78  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_ACK                     ; //[nb_inst_branch_predict]
     79  public    : SC_OUT(Tcontext_t         )  ** out_PREDICT_BTB_CONTEXT_ID              ; //[nb_inst_branch_predict]
     80  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_BTB_ADDRESS                 ; //[nb_inst_branch_predict]
     81  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_HIT                     ; //[nb_inst_branch_predict]
     82  public    : SC_IN (Taddress_t         )  **  in_PREDICT_BTB_ADDRESS_SRC             ; //[nb_inst_branch_predict]
     83  public    : SC_IN (Taddress_t         )  **  in_PREDICT_BTB_ADDRESS_DEST            ; //[nb_inst_branch_predict]
     84  public    : SC_IN (Tbranch_condition_t)  **  in_PREDICT_BTB_CONDITION               ; //[nb_inst_branch_predict]
     85//public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_LAST_TAKE               ; //[nb_inst_branch_predict]  DIR.LAST_TAKE
     86  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_IS_ACCURATE             ; //[nb_inst_branch_predict]
    8787                                                                                                       
    88   public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_DIR_VAL                     ; //[nb_inst_predict]
    89   public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_DIR_ACK                     ; //[nb_inst_predict]
    90   public    : SC_OUT(Taddress_t         )  ** out_PREDICT_DIR_ADDRESS_SRC             ; //[nb_inst_predict]
    91   public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_DIR_STATIC                  ; //[nb_inst_predict]
    92 //public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_DIR_LAST_TAKE               ; //[nb_inst_predict]  BTB.LAST_TAKE
    93 //public    : SC_IN (Thistory_t         )  **  in_PREDICT_DIR_HISTORY                 ; //[nb_inst_predict]  UPT.DIR_HISTORY
    94   public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_DIR_DIRECTION               ; //[nb_inst_predict]
    95 
    96   public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_RAS_VAL                     ; //[nb_inst_predict]
    97   public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_RAS_ACK                     ; //[nb_inst_predict]
    98   public    : SC_OUT(Tcontext_t         )  ** out_PREDICT_RAS_CONTEXT_ID              ; //[nb_inst_predict]
    99   public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_RAS_HIT                     ; //[nb_inst_predict] 
    100   public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_RAS_PUSH                    ; //[nb_inst_predict]
    101   public    : SC_OUT(Taddress_t         )  ** out_PREDICT_RAS_ADDRESS_PUSH            ; //[nb_inst_predict]
    102   public    : SC_IN (Taddress_t         )  **  in_PREDICT_RAS_ADDRESS_POP             ; //[nb_inst_predict]
    103 //public    : SC_IN (Tptr_t             )  **  in_PREDICT_RAS_INDEX                   ; //[nb_inst_predict]  UPT.RAS_INDEX
     88  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_DIR_VAL                     ; //[nb_inst_branch_predict]
     89  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_DIR_ACK                     ; //[nb_inst_branch_predict]
     90  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_DIR_ADDRESS_SRC             ; //[nb_inst_branch_predict]
     91  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_DIR_STATIC                  ; //[nb_inst_branch_predict]
     92//public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_DIR_LAST_TAKE               ; //[nb_inst_branch_predict]  BTB.LAST_TAKE
     93//public    : SC_IN (Thistory_t         )  **  in_PREDICT_DIR_HISTORY                 ; //[nb_inst_branch_predict]  UPT.DIR_HISTORY
     94  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_DIR_DIRECTION               ; //[nb_inst_branch_predict]
     95
     96  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_RAS_VAL                     ; //[nb_inst_branch_predict]
     97  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_RAS_ACK                     ; //[nb_inst_branch_predict]
     98  public    : SC_OUT(Tcontext_t         )  ** out_PREDICT_RAS_CONTEXT_ID              ; //[nb_inst_branch_predict]
     99  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_RAS_HIT                     ; //[nb_inst_branch_predict] 
     100  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_RAS_PUSH                    ; //[nb_inst_branch_predict]
     101  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_RAS_ADDRESS_PUSH            ; //[nb_inst_branch_predict]
     102  public    : SC_IN (Taddress_t         )  **  in_PREDICT_RAS_ADDRESS_POP             ; //[nb_inst_branch_predict]
     103//public    : SC_IN (Tptr_t             )  **  in_PREDICT_RAS_INDEX                   ; //[nb_inst_branch_predict]  UPT.RAS_INDEX
    104104                                                                                                       
    105   public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_UPT_VAL                     ; //[nb_inst_predict]
    106   public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_UPT_ACK                     ; //[nb_inst_predict]
    107   public    : SC_OUT(Tcontext_t         )  ** out_PREDICT_UPT_CONTEXT_ID              ; //[nb_inst_predict]
    108   public    : SC_OUT(Taddress_t         )  ** out_PREDICT_UPT_BTB_ADDRESS_SRC         ; //[nb_inst_predict]* BTB.ADDRESS_SRC
    109   public    : SC_OUT(Taddress_t         )  ** out_PREDICT_UPT_BTB_ADDRESS_DEST        ; //[nb_inst_predict]
    110   public    : SC_OUT(Tbranch_condition_t)  ** out_PREDICT_UPT_BTB_CONDITION           ; //[nb_inst_predict]* BTB.CONDITION
    111   public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_UPT_BTB_LAST_TAKE           ; //[nb_inst_predict]
    112   public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_UPT_BTB_IS_ACCURATE         ; //[nb_inst_predict]
    113 //public    : SC_OUT(Thistory_t         )  ** out_PREDICT_UPT_DIR_HISTORY             ; //[nb_inst_predict]  DIR.HISTORY
    114   public    : SC_OUT(Taddress_t         )  ** out_PREDICT_UPT_RAS_ADDRESS             ; //[nb_inst_predict]* RAS.ADDRESS_POP
    115 //public    : SC_OUT(Tptr_t             )  ** out_PREDICT_UPT_RAS_INDEX               ; //[nb_inst_predict]  RAS.INDEX
     105  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_UPT_VAL                     ; //[nb_inst_branch_predict]
     106  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_UPT_ACK                     ; //[nb_inst_branch_predict]
     107  public    : SC_OUT(Tcontext_t         )  ** out_PREDICT_UPT_CONTEXT_ID              ; //[nb_inst_branch_predict]
     108  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_UPT_BTB_ADDRESS_SRC         ; //[nb_inst_branch_predict]* BTB.ADDRESS_SRC
     109  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_UPT_BTB_ADDRESS_DEST        ; //[nb_inst_branch_predict]
     110  public    : SC_OUT(Tbranch_condition_t)  ** out_PREDICT_UPT_BTB_CONDITION           ; //[nb_inst_branch_predict]* BTB.CONDITION
     111  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_UPT_BTB_LAST_TAKE           ; //[nb_inst_branch_predict]
     112  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_UPT_BTB_IS_ACCURATE         ; //[nb_inst_branch_predict]
     113//public    : SC_OUT(Thistory_t         )  ** out_PREDICT_UPT_DIR_HISTORY             ; //[nb_inst_branch_predict]  DIR.HISTORY
     114  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_UPT_RAS_ADDRESS             ; //[nb_inst_branch_predict]* RAS.ADDRESS_POP
     115//public    : SC_OUT(Tptr_t             )  ** out_PREDICT_UPT_RAS_INDEX               ; //[nb_inst_branch_predict]  RAS.INDEX
    116116                                                                                     
    117117    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
    118   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_BTB_VAL                       ; //[nb_inst_decod]
    119   public    : SC_IN (Tcontrol_t         )  **  in_DECOD_BTB_ACK                       ; //[nb_inst_decod]
    120   public    : SC_OUT(Tcontext_t         )  ** out_DECOD_BTB_CONTEXT_ID                ; //[nb_inst_decod]
    121   public    : SC_OUT(Taddress_t         )  ** out_DECOD_BTB_ADDRESS_SRC               ; //[nb_inst_decod]
    122   public    : SC_OUT(Taddress_t         )  ** out_DECOD_BTB_ADDRESS_DEST              ; //[nb_inst_decod]
    123   public    : SC_OUT(Tbranch_condition_t)  ** out_DECOD_BTB_CONDITION                 ; //[nb_inst_decod]
    124   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_BTB_LAST_TAKE                 ; //[nb_inst_decod]
    125   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_BTB_MISS_PREDICTION           ; //[nb_inst_decod]
     118  public    : SC_IN (Tcontrol_t         ) ***  in_DECOD_VAL                           ; //[nb_decod_unit][nb_inst_decod]
     119  public    : SC_OUT(Tcontrol_t         ) *** out_DECOD_ACK                           ; //[nb_decod_unit][nb_inst_decod]
     120  public    : SC_IN (Tcontext_t         ) ***  in_DECOD_CONTEXT_ID                    ; //[nb_decod_unit][nb_inst_decod]
     121  public    : SC_IN (Tcontrol_t         ) ***  in_DECOD_MATCH_INST_IFETCH_PTR         ; //[nb_decod_unit][nb_inst_decod]
     122  public    : SC_IN (Tbranch_state_t    ) ***  in_DECOD_BRANCH_STATE                  ; //[nb_decod_unit][nb_inst_decod]
     123  public    : SC_IN (Tprediction_ptr_t  ) ***  in_DECOD_BRANCH_UPDATE_PREDICTION_ID   ; //[nb_decod_unit][nb_inst_decod]
     124  public    : SC_IN (Tbranch_condition_t) ***  in_DECOD_BRANCH_CONDITION              ; //[nb_decod_unit][nb_inst_decod]
     125  public    : SC_IN (Tcontrol_t         ) ***  in_DECOD_BRANCH_DIRECTION              ; //[nb_decod_unit][nb_inst_decod]
     126  public    : SC_IN (Taddress_t         ) ***  in_DECOD_ADDRESS_SRC                   ; //[nb_decod_unit][nb_inst_decod]
     127  public    : SC_IN (Taddress_t         ) ***  in_DECOD_ADDRESS_DEST                  ; //[nb_decod_unit][nb_inst_decod]
     128
     129  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_BTB_VAL                       ; //[nb_inst_branch_decod]
     130  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_BTB_ACK                       ; //[nb_inst_branch_decod]
     131  public    : SC_OUT(Tcontext_t         )  ** out_DECOD_BTB_CONTEXT_ID                ; //[nb_inst_branch_decod]
     132  public    : SC_OUT(Taddress_t         )  ** out_DECOD_BTB_ADDRESS_SRC               ; //[nb_inst_branch_decod]
     133  public    : SC_OUT(Taddress_t         )  ** out_DECOD_BTB_ADDRESS_DEST              ; //[nb_inst_branch_decod]
     134  public    : SC_OUT(Tbranch_condition_t)  ** out_DECOD_BTB_CONDITION                 ; //[nb_inst_branch_decod]
     135  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_BTB_LAST_TAKE                 ; //[nb_inst_branch_decod]
     136  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_BTB_MISS_PREDICTION           ; //[nb_inst_branch_decod]
     137  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_BTB_IS_ACCURATE               ; //[nb_inst_branch_decod]
    126138                                                                                     
    127   public    : SC_OUT(Tcontrol_t)           ** out_DECOD_RAS_VAL                       ; //[nb_inst_decod]
    128   public    : SC_IN (Tcontrol_t)           **  in_DECOD_RAS_ACK                       ; //[nb_inst_decod]
    129   public    : SC_OUT(Tcontext_t)           ** out_DECOD_RAS_CONTEXT_ID                ; //[nb_inst_decod]
    130   public    : SC_IN (Tcontrol_t)           **  in_DECOD_RAS_HIT                       ; //[nb_inst_decod]
    131   public    : SC_OUT(Tcontrol_t)           ** out_DECOD_RAS_PUSH                      ; //[nb_inst_decod]
    132   public    : SC_OUT(Taddress_t)           ** out_DECOD_RAS_ADDRESS_PUSH              ; //[nb_inst_decod]
    133   public    : SC_IN (Taddress_t)           **  in_DECOD_RAS_ADDRESS_POP               ; //[nb_inst_decod]
    134   public    : SC_IN (Tptr_t    )           **  in_DECOD_RAS_INDEX                     ; //[nb_inst_decod]
    135   public    : SC_OUT(Tcontrol_t)           ** out_DECOD_RAS_MISS_PREDICTION           ; //[nb_inst_decod]
    136                                                                                      
    137   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_VAL                       ; //[nb_inst_decod]
    138   public    : SC_IN (Tcontrol_t         )  **  in_DECOD_UPT_ACK                       ; //[nb_inst_decod]
    139   public    : SC_OUT(Tcontext_t         )  ** out_DECOD_UPT_CONTEXT_ID                ; //[nb_inst_decod]
    140   public    : SC_OUT(Taddress_t         )  ** out_DECOD_UPT_BTB_ADDRESS_SRC           ; //[nb_inst_decod]
    141   public    : SC_OUT(Taddress_t         )  ** out_DECOD_UPT_BTB_ADDRESS_DEST          ; //[nb_inst_decod]
    142   public    : SC_OUT(Tbranch_condition_t)  ** out_DECOD_UPT_BTB_CONDITION             ; //[nb_inst_decod]
    143   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_BTB_LAST_TAKE             ; //[nb_inst_decod]
    144   public    : SC_OUT(Taddress_t         )  ** out_DECOD_UPT_RAS_ADDRESS               ; //[nb_inst_decod]
    145   public    : SC_OUT(Tptr_t             )  ** out_DECOD_UPT_RAS_INDEX                 ; //[nb_inst_decod]
    146   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_MISS_PREDICTION           ; //[nb_inst_decod]
    147   public    : SC_OUT(Tprediction_ptr_t  )  ** out_DECOD_UPT_UPDATE_PREDICTION_ID      ; //[nb_inst_decod]
     139  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_RAS_VAL                       ; //[nb_inst_branch_decod]
     140  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_RAS_ACK                       ; //[nb_inst_branch_decod]
     141  public    : SC_OUT(Tcontext_t         )  ** out_DECOD_RAS_CONTEXT_ID                ; //[nb_inst_branch_decod]
     142  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_RAS_HIT                       ; //[nb_inst_branch_decod]
     143  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_RAS_PUSH                      ; //[nb_inst_branch_decod]
     144  public    : SC_OUT(Taddress_t         )  ** out_DECOD_RAS_ADDRESS_PUSH              ; //[nb_inst_branch_decod]
     145  public    : SC_IN (Taddress_t         )  **  in_DECOD_RAS_ADDRESS_POP               ; //[nb_inst_branch_decod]
     146//public    : SC_IN (Tptr_t             )  **  in_DECOD_RAS_INDEX                     ; //[nb_inst_branch_decod] UPT.RAS_INDEX
     147  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_RAS_MISS_PREDICTION           ; //[nb_inst_branch_decod]
     148                                                                                     
     149  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_VAL                       ; //[nb_inst_branch_decod]
     150  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_UPT_ACK                       ; //[nb_inst_branch_decod]
     151  public    : SC_OUT(Tcontext_t         )  ** out_DECOD_UPT_CONTEXT_ID                ; //[nb_inst_branch_decod]
     152  public    : SC_OUT(Taddress_t         )  ** out_DECOD_UPT_BTB_ADDRESS_SRC           ; //[nb_inst_branch_decod]
     153  public    : SC_OUT(Taddress_t         )  ** out_DECOD_UPT_BTB_ADDRESS_DEST          ; //[nb_inst_branch_decod]
     154  public    : SC_OUT(Tbranch_condition_t)  ** out_DECOD_UPT_BTB_CONDITION             ; //[nb_inst_branch_decod]
     155  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_BTB_LAST_TAKE             ; //[nb_inst_branch_decod]
     156  public    : SC_OUT(Taddress_t         )  ** out_DECOD_UPT_RAS_ADDRESS               ; //[nb_inst_branch_decod]
     157//public    : SC_OUT(Tptr_t             )  ** out_DECOD_UPT_RAS_INDEX                 ; //[nb_inst_branch_decod] RAS.INDEX
     158  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_MISS_IFETCH               ; //[nb_inst_branch_decod]
     159  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_MISS_DECOD                ; //[nb_inst_branch_decod]
     160  public    : SC_OUT(Tprediction_ptr_t  )  ** out_DECOD_UPT_UPDATE_PREDICTION_ID      ; //[nb_inst_branch_decod]
    148161                                                                                     
    149162    // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
    150   public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_BTB_VAL                      ; //[nb_inst_update]
    151   public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_BTB_ACK                      ; //[nb_inst_update]
    152   public    : SC_OUT(Tcontext_t         )  ** out_UPDATE_BTB_CONTEXT_ID               ; //[nb_inst_update]
    153   public    : SC_OUT(Taddress_t         )  ** out_UPDATE_BTB_ADDRESS_SRC              ; //[nb_inst_update]
    154   public    : SC_OUT(Taddress_t         )  ** out_UPDATE_BTB_ADDRESS_DEST             ; //[nb_inst_update]
    155   public    : SC_OUT(Tbranch_condition_t)  ** out_UPDATE_BTB_CONDITION                ; //[nb_inst_update]
    156   public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_BTB_LAST_TAKE                ; //[nb_inst_update]
    157   public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_BTB_MISS_PREDICTION          ; //[nb_inst_update]
    158                                                                                      
    159   public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_DIR_VAL                      ; //[nb_inst_update]
    160   public    : SC_IN (Tcontrol_t)           **  in_UPDATE_DIR_ACK                      ; //[nb_inst_update]
    161   public    : SC_OUT(Taddress_t)           ** out_UPDATE_DIR_ADDRESS                  ; //[nb_inst_update]
    162   public    : SC_OUT(Thistory_t)           ** out_UPDATE_DIR_HISTORY                  ; //[nb_inst_update]
    163   public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_DIR_DIRECTION                ; //[nb_inst_update]
    164                                                                                      
    165   public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_RAS_VAL                      ; //[nb_inst_update]
    166   public    : SC_IN (Tcontrol_t)           **  in_UPDATE_RAS_ACK                      ; //[nb_inst_update]
    167   public    : SC_OUT(Tcontext_t)           ** out_UPDATE_RAS_CONTEXT_ID               ; //[nb_inst_update]
    168   public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_RAS_PUSH                     ; //[nb_inst_update]
    169   public    : SC_OUT(Taddress_t)           ** out_UPDATE_RAS_ADDRESS                  ; //[nb_inst_update]
    170   public    : SC_OUT(Tptr_t    )           ** out_UPDATE_RAS_INDEX                    ; //[nb_inst_update]
    171   public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_RAS_MISS_PREDICTION          ; //[nb_inst_update]
    172   public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_RAS_PREDICTION_IFETCH        ; //[nb_inst_update]
    173                                                                                      
    174   public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_VAL                      ; //[nb_inst_update]
    175   public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_UPT_ACK                      ; //[nb_inst_update]
    176   public    : SC_IN (Tcontext_t         )  **  in_UPDATE_UPT_CONTEXT_ID               ; //[nb_inst_update]
    177   public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_MISS_PREDICTION          ; //[nb_inst_update]
    178   public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_DIRECTION_GOOD           ; //[nb_inst_update]
    179   public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_BTB_VAL                  ; //[nb_inst_update]
    180   public    : SC_IN (Taddress_t         )  **  in_UPDATE_UPT_BTB_ADDRESS_SRC          ; //[nb_inst_update]
    181   public    : SC_IN (Taddress_t         )  **  in_UPDATE_UPT_BTB_ADDRESS_DEST         ; //[nb_inst_update]
    182   public    : SC_IN (Tbranch_condition_t)  **  in_UPDATE_UPT_BTB_CONDITION            ; //[nb_inst_update]
    183   public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_DIR_VAL                  ; //[nb_inst_update]
    184   public    : SC_IN (Thistory_t         )  **  in_UPDATE_UPT_DIR_HISTORY              ; //[nb_inst_update]
    185   public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_RAS_VAL                  ; //[nb_inst_update]
    186   public    : SC_IN (Taddress_t         )  **  in_UPDATE_UPT_RAS_ADDRESS              ; //[nb_inst_update]
    187   public    : SC_IN (Tptr_t             )  **  in_UPDATE_UPT_RAS_INDEX                ; //[nb_inst_update]
    188   public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_RAS_PREDICTION_IFETCH    ; //[nb_inst_update]
     163  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_BTB_VAL                      ; //[nb_inst_branch_update]
     164  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_BTB_ACK                      ; //[nb_inst_branch_update]
     165//public    : SC_OUT(Tcontext_t         )  ** out_UPDATE_BTB_CONTEXT_ID               ; //[nb_inst_branch_update] UPT.CONTEXT_ID
     166//public    : SC_OUT(Taddress_t         )  ** out_UPDATE_BTB_ADDRESS_SRC              ; //[nb_inst_branch_update] UPT.BTB_ADDRESS_SRC
     167//public    : SC_OUT(Taddress_t         )  ** out_UPDATE_BTB_ADDRESS_DEST             ; //[nb_inst_branch_update] UPT.BTB_ADDRESS_DEST
     168//public    : SC_OUT(Tbranch_condition_t)  ** out_UPDATE_BTB_CONDITION                ; //[nb_inst_branch_update]*UPT.BTB_CONDITION
     169//public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_BTB_LAST_TAKE                ; //[nb_inst_branch_update] UPT.DIRECTION_GOOD
     170//public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_BTB_MISS_PREDICTION          ; //[nb_inst_branch_update] UPT.MISS_PREDICTION
     171                                                                                     
     172  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_DIR_VAL                      ; //[nb_inst_branch_update]
     173  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_DIR_ACK                      ; //[nb_inst_branch_update]
     174//public    : SC_OUT(Taddress_t         )  ** out_UPDATE_DIR_ADDRESS                  ; //[nb_inst_branch_update] UPT.BTB_ADDRESS_SRC
     175//public    : SC_OUT(Thistory_t         )  ** out_UPDATE_DIR_HISTORY                  ; //[nb_inst_branch_update] UPT.DIR_HISTORY
     176//public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_DIR_DIRECTION                ; //[nb_inst_branch_update] UPT.DIRECTION_GOOD
     177                                                                                     
     178  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_VAL                      ; //[nb_inst_branch_update]
     179  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_RAS_ACK                      ; //[nb_inst_branch_update]
     180//public    : SC_OUT(Tcontext_t         )  ** out_UPDATE_RAS_CONTEXT_ID               ; //[nb_inst_branch_update] UPT.CONTEXT_ID
     181//public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_PUSH                     ; //[nb_inst_branch_update] UPT.RAS_PUSH
     182//public    : SC_OUT(Taddress_t         )  ** out_UPDATE_RAS_ADDRESS                  ; //[nb_inst_branch_update] UPT.RAS_ADDRESS
     183//public    : SC_OUT(Tptr_t             )  ** out_UPDATE_RAS_INDEX                    ; //[nb_inst_branch_update] UPT.RAS_INDEX
     184//public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_MISS_PREDICTION          ; //[nb_inst_branch_update] UPT.MISS_PREDICTION
     185//public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_PREDICTION_IFETCH        ; //[nb_inst_branch_update] UPT.RAS_PREDICTION_IFETCH
     186                                                                                     
     187  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_VAL                      ; //[nb_inst_branch_update]
     188  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_UPT_ACK                      ; //[nb_inst_branch_update]
     189//public    : SC_IN (Tcontext_t         )  **  in_UPDATE_UPT_CONTEXT_ID               ; //[nb_inst_branch_update] BTB.CONTEXT_ID, RAS.CONTEXT_ID
     190//public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_MISS_PREDICTION          ; //[nb_inst_branch_update] BTB.MISS_PREDICTION, RAS.MISS_PREDICTION
     191//public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_DIRECTION_GOOD           ; //[nb_inst_branch_update] BTB.LAST_TAKE, DIR.DIRECTION
     192  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_BTB_VAL                  ; //[nb_inst_branch_update]
     193//public    : SC_IN (Taddress_t         )  **  in_UPDATE_UPT_BTB_ADDRESS_SRC          ; //[nb_inst_branch_update] DIR.ADDRESS, BTB.ADDRESS_SRC
     194//public    : SC_IN (Taddress_t         )  **  in_UPDATE_UPT_BTB_ADDRESS_DEST         ; //[nb_inst_branch_update] BTB.ADDRESS_DEST
     195//public    : SC_IN (Tbranch_condition_t)  **  in_UPDATE_UPT_BTB_CONDITION            ; //[nb_inst_branch_update]*BTB.CONDITION
     196  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_DIR_VAL                  ; //[nb_inst_branch_update]
     197//public    : SC_IN (Thistory_t         )  **  in_UPDATE_UPT_DIR_HISTORY              ; //[nb_inst_branch_update] DIR.HISTORY
     198  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_RAS_VAL                  ; //[nb_inst_branch_update]
     199//public    : SC_IN (Taddress_t         )  **  in_UPDATE_UPT_RAS_ADDRESS              ; //[nb_inst_branch_update] RAS.ADDRESS
     200//public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_RAS_PUSH                 ; //[nb_inst_branch_update] RAS.PUSH
     201//public    : SC_IN (Tptr_t             )  **  in_UPDATE_UPT_RAS_INDEX                ; //[nb_inst_branch_update] RAS.INDEX
     202//public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_RAS_PREDICTION_IFETCH    ; //[nb_inst_branch_update] RAS.PREDICTION_IFETCH
    189203                                                                                     
    190204    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
    191205  public    : SC_IN (Tdepth_t           )  **  in_DEPTH_UPT_NB_BRANCH                 ; //[nb_context]
    192206  public    : SC_IN (Tdepth_t           )  **  in_DEPTH_UPT_TAIL                      ; //[nb_context]
     207  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_NB_BRANCH                     ; //[nb_context]
     208  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_TAIL                          ; //[nb_context]
    193209
    194210    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     
    196212    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    197213  private   : uint32_t                         reg_PREDICT_PRIORITY;
     214  private   : uint32_t                         reg_DECOD_PRIORITY;
    198215
    199216    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    233250//public  : void        genMoore                  (void);
    234251  public  : void        genMealy_predict          (void);
    235 //   public  : void        genMealy_decod            (void);
    236 //   public  : void        genMealy_update           (void);
     252  public  : void        genMealy_decod            (void);
     253  public  : void        genMealy_update           (void);
    237254#endif                                         
    238255
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters.cpp

    r81 r82  
    77
    88#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Parameters.h"
     9#include "Common/include/Max.h"
    910
    1011namespace morpheo {
     
    1920#undef  FUNCTION
    2021#define FUNCTION "Prediction_unit_Glue::Parameters"
    21   Parameters::Parameters (uint32_t   nb_context     ,
    22                           uint32_t   size_address   ,
    23                           uint32_t * nb_instruction ,
    24                           uint32_t * size_depth     ,
    25                           uint32_t   nb_inst_predict,
    26                           uint32_t   nb_inst_decod  ,
    27                           uint32_t   nb_inst_update )
     22  Parameters::Parameters (uint32_t   nb_context            ,
     23                          uint32_t   nb_decod_unit         ,
     24//                        uint32_t   nb_ooo_engine         ,
     25                          uint32_t   size_address          ,
     26                          uint32_t * nb_instruction        ,
     27                          uint32_t * size_depth            ,
     28                          uint32_t * nb_inst_decod         ,
     29//                        uint32_t * nb_inst_update        ,
     30                          uint32_t   nb_inst_branch_predict,
     31                          uint32_t   nb_inst_branch_decod  ,
     32                          uint32_t   nb_inst_branch_update )
    2833  {
    2934    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin");
    3035
    31     _nb_context                = nb_context             ;
    32     _size_address              = size_address           ;
    33     _nb_instruction            = nb_instruction         ;
    34     _size_depth                = size_depth             ;
    35     _nb_inst_predict           = nb_inst_predict        ;
    36     _nb_inst_decod             = nb_inst_decod          ;
    37     _nb_inst_update            = nb_inst_update         ;
    38 
     36    _nb_context                = nb_context     ;
     37    _size_address              = size_address   ;
     38    _nb_instruction            = nb_instruction ;
     39    _size_depth                = size_depth     ;
     40    _nb_decod_unit             = nb_decod_unit  ;
     41    _nb_inst_decod             = nb_inst_decod  ;
     42//     _nb_ooo_engine             = nb_ooo_engine  ;
     43//     _nb_inst_update            = nb_inst_update ;
     44    _nb_inst_branch_predict    = nb_inst_branch_predict;
     45    _nb_inst_branch_decod      = nb_inst_branch_decod  ;
     46    _nb_inst_branch_update     = nb_inst_branch_update ;
     47     
    3948    _size_context_id           = log2(_nb_context);
    4049    _size_inst_ifetch_ptr      = new uint32_t [_nb_context];
     50    _max_size_depth            = max<uint32_t>(_size_depth,_nb_context);
    4151
    4252    _have_port_context_id      = (_size_context_id>0);
     53    _have_port_max_depth       = (_max_size_depth>0);
    4354    _have_port_depth           = new bool [_nb_context];
    4455    _have_port_inst_ifetch_ptr = new bool [_nb_context];
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters_msg_error.cpp

    r81 r82  
    2727    Parameters_test test ("Prediction_unit_Glue");
    2828
    29     if (_nb_inst_predict > _nb_context)
     29    if (_nb_inst_branch_predict > _nb_context)
    3030      test.error("nb_inst_predict must be <= nb_context\n");
    3131
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters_print.cpp

    r81 r82  
    2727
    2828    xml.balise_open("prediction_unit_glue");
    29     xml.singleton_begin("nb_context     "); xml.attribut("value",toString(_nb_context     )); xml.singleton_end();
    30     xml.singleton_begin("size_address   "); xml.attribut("value",toString(_size_address   )); xml.singleton_end();
    31     xml.singleton_begin("nb_inst_predict"); xml.attribut("value",toString(_nb_inst_predict)); xml.singleton_end();
    32     xml.singleton_begin("nb_inst_decod  "); xml.attribut("value",toString(_nb_inst_decod  )); xml.singleton_end();
    33     xml.singleton_begin("nb_inst_update "); xml.attribut("value",toString(_nb_inst_update )); xml.singleton_end();
     29    xml.singleton_begin("nb_context            "); xml.attribut("value",toString(_nb_context            )); xml.singleton_end();
     30    xml.singleton_begin("nb_decod_unit         "); xml.attribut("value",toString(_nb_decod_unit         )); xml.singleton_end();
     31//     xml.singleton_begin("nb_ooo_engine         "); xml.attribut("value",toString(_nb_ooo_engine         )); xml.singleton_end();
     32    xml.singleton_begin("size_address          "); xml.attribut("value",toString(_size_address          )); xml.singleton_end();
     33    xml.singleton_begin("nb_inst_branch_predict"); xml.attribut("value",toString(_nb_inst_branch_predict)); xml.singleton_end();
     34    xml.singleton_begin("nb_inst_branch_decod  "); xml.attribut("value",toString(_nb_inst_branch_decod  )); xml.singleton_end();
     35    xml.singleton_begin("nb_inst_branch_update "); xml.attribut("value",toString(_nb_inst_branch_update )); xml.singleton_end();
     36
     37//     xml.singleton_begin("nb_inst_decod  "); xml.attribut("value",toString(_nb_inst_decod  )); xml.singleton_end();
     38//     xml.singleton_begin("nb_inst_update "); xml.attribut("value",toString(_nb_inst_update )); xml.singleton_end();
    3439    for (uint32_t i=0;i<_nb_context; i++)
    3540      {
     
    3843        xml.  attribut("id"  ,toString(i));
    3944        xml. balise_open_end();
    40         xml.  singleton_begin("nb_instruction "); xml.attribut("value",toString(_nb_instruction [i])); xml.singleton_end();
    41         xml.  singleton_begin("size_depth     "); xml.attribut("value",toString(_size_depth     [i])); xml.singleton_end();
     45        xml.  singleton_begin("nb_instruction        "); xml.attribut("value",toString(_nb_instruction        [i])); xml.singleton_end();
     46        xml.  singleton_begin("size_depth            "); xml.attribut("value",toString(_size_depth            [i])); xml.singleton_end();
    4247        xml. balise_close();
    4348      }
     49    for (uint32_t i=0;i<_nb_decod_unit; i++)
     50      {
     51        xml. balise_open_begin("component");
     52        xml.  attribut("type","decod_unit");
     53        xml.  attribut("id"  ,toString(i));
     54        xml. balise_open_end();
     55        xml.  singleton_begin("nb_inst_decod         "); xml.attribut("value",toString(_nb_inst_decod         [i])); xml.singleton_end();
     56        xml. balise_close();
     57      }
     58//     for (uint32_t i=0;i<_nb_ooo_engine; i++)
     59//       {
     60//         xml. balise_open_begin("component");
     61//         xml.  attribut("type","ooo_engine");
     62//         xml.  attribut("id"  ,toString(i));
     63//         xml. balise_open_end();
     64//      xml.  singleton_begin("nb_inst_update        "); xml.attribut("value",toString(_nb_inst_update        [i])); xml.singleton_end();
     65//         xml. balise_close();
     66//       }
     67
    4468    xml.balise_close();
    4569
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue.cpp

    r81 r82  
    9292                      << (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    9393          }
    94         for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     94        for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    9595          {
    9696            sensitive << (*( in_PREDICT_BTB_ACK              [i]))
     
    110110                      << (*( in_PREDICT_UPT_ACK              [i]));
    111111          }
     112        for (uint32_t i=0; i<_param->_nb_context; i++)
     113          {
     114            sensitive << (*(in_DEPTH_UPT_NB_BRANCH [i]));
     115            if (_param->_have_port_depth[i])
     116              sensitive << (*(in_DEPTH_UPT_TAIL      [i]));
     117          }
    112118
    113119# ifdef SYSTEMCASS_SPECIFIC
     
    115121        for (uint32_t x=0; x<_param->_nb_context; x++)
    116122          {
     123            if (_param->_have_port_depth[x])
     124              {
     125                (*(out_DEPTH_TAIL                          [x])) (*( in_DEPTH_UPT_TAIL                      [x]));
     126              }
     127                (*(out_DEPTH_NB_BRANCH                     [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [x]));
     128
    117129            for (uint32_t i=0; i<_param->_nb_context; i++)
    118130              {
     
    121133                (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    122134                (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    123               }
    124             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     135                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     136                  {
     137                (*(out_PREDICT_ACK                         [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     138                  }
     139                (*(out_PREDICT_ACK                         [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     140              }
     141            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    125142              {
    126143                (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    147164                (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    148165                (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    149               }
    150             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     166                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     167                  {
     168                (*(out_PREDICT_PC_NEXT                     [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     169                  }
     170                (*(out_PREDICT_PC_NEXT                     [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     171              }
     172            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    151173              {
    152174                (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    173195                (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    174196                (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    175               }
    176             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     197                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     198                  {
     199                (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     200                  }
     201                (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     202              }
     203            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    177204              {
    178205                (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    201228                (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    202229                (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    203               }
    204             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     230                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     231                  {
     232                (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     233                  }
     234                (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     235              }
     236            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    205237              {
    206238                (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    228260                (*(out_PREDICT_BRANCH_STATE                [x]))(*( in_PREDICT_PC_CURRENT                  [i]));
    229261                (*(out_PREDICT_BRANCH_STATE                [x]))(*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    230               }
    231             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     262                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     263                  {
     264                (*(out_PREDICT_BRANCH_STATE                [x]))(*( in_DEPTH_UPT_TAIL                      [i]));
     265                  }
     266                (*(out_PREDICT_BRANCH_STATE                [x]))(*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     267              }
     268            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    232269              {
    233270                (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    256293                (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    257294                (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    258               }
    259             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     295                if (_param->_have_port_depth [i])
     296                  {
     297                (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     298                  }
     299                (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     300              }
     301            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    260302              {
    261303                (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    285327                    (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_PC_CURRENT                  [i]));
    286328                    (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    287                   }
    288                 for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     329                    if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     330                      {
     331                    (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_DEPTH_UPT_TAIL                      [i]));
     332                      }
     333                    (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     334                  }
     335                for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    289336                  {
    290337                    (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_ACK              [i]));
     
    307354          }
    308355
    309         for (uint32_t x=0; x<_param->_nb_inst_predict; x++)
     356        for (uint32_t x=0; x<_param->_nb_inst_branch_predict; x++)
    310357          {
    311358            for (uint32_t i=0; i<_param->_nb_context; i++)
     
    315362                (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    316363                (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    317               }
    318             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     364                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     365                  {
     366                (*(out_PREDICT_BTB_VAL              [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     367                  }
     368                (*(out_PREDICT_BTB_VAL              [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     369              }
     370            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    319371              {
    320372                (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    343395                (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    344396                (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    345               }
    346             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     397                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     398                  {
     399                (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     400                  }
     401                (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     402              }
     403            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    347404              {
    348405                (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    370427                (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    371428                (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    372               }
    373             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     429                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     430                  {
     431                (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     432                  }
     433                (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     434              }
     435            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    374436              {
    375437                (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    396458                (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    397459                (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    398               }
    399             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     460                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     461                  {
     462                (*(out_PREDICT_DIR_VAL              [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     463                  }
     464                (*(out_PREDICT_DIR_VAL              [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     465              }
     466            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    400467              {
    401468                (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    422489                (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    423490                (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    424               }
    425             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     491                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     492                  {
     493                (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     494                  }
     495                (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     496              }
     497            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    426498              {
    427499                (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    448520                (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    449521                (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    450               }
    451             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     522                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     523                  {
     524                (*(out_PREDICT_DIR_STATIC           [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     525                  }
     526                (*(out_PREDICT_DIR_STATIC           [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     527              }
     528            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    452529              {
    453530                (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    474551//              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    475552//              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     553//              if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     554//                {
     555//              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     556//                }
     557//              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
    476558//            }
    477 //          for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     559//          for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    478560//            {
    479561//              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    500582                (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    501583                (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    502               }
    503             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     584                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     585                  {
     586                (*(out_PREDICT_RAS_VAL              [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     587                  }
     588                (*(out_PREDICT_RAS_VAL              [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     589              }
     590            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    504591              {
    505592                (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    528615                (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    529616                (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    530               }
    531             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     617                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     618                  {
     619                (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     620                  }
     621                (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     622              }
     623            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    532624              {
    533625                (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    555647                (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    556648                (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    557               }
    558             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     649                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     650                  {
     651                (*(out_PREDICT_RAS_PUSH             [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     652                  }
     653                (*(out_PREDICT_RAS_PUSH             [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     654              }
     655            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    559656              {
    560657                (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    581678                (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    582679                (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    583               }
    584             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     680                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     681                  {
     682                (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     683                  }
     684                (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     685              }
     686            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    585687              {
    586688                (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    607709                (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    608710                (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    609               }
    610             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     711                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     712                  {
     713                (*(out_PREDICT_UPT_VAL              [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     714                  }
     715                (*(out_PREDICT_UPT_VAL              [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     716              }
     717            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    611718              {
    612719                (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    635742                (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    636743                (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    637               }
    638             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     744                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     745                  {
     746                (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     747                  }
     748                (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     749              }
     750            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    639751              {
    640752                (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    662774                (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    663775                (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    664               }
    665             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     776                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     777                  {
     778                (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     779                  }
     780                (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     781              }
     782            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    666783              {
    667784                (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    688805                (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    689806                (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    690               }
    691             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     807                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     808                  {
     809                (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     810                  }
     811                (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     812              }
     813            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    692814              {
    693815                (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    714836                (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    715837                (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    716               }
    717             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     838                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     839                  {
     840                (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     841                  }
     842                (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     843              }
     844            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    718845              {
    719846                (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    740867                (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    741868                (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    742               }
    743             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     869                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     870                  {
     871                (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     872                  }
     873                (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     874              }
     875            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    744876              {
    745877                (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    766898                (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    767899                (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    768               }
    769             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     900                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     901                  {
     902                (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     903                  }
     904                (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     905              }
     906            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    770907              {
    771908                (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    792929//              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    793930//              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     931//              if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     932//                {
     933//              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     934//                }
     935//              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
    794936//            }
    795 //          for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     937//          for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    796938//            {
    797939//              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    818960                (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    819961                (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    820               }
    821             for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     962                if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     963                  {
     964                (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     965                  }
     966                (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     967              }
     968            for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    822969              {
    823970                (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    844991//              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    845992//              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     993//              if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
     994//                {
     995//              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     996//                }
     997//              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
    846998//            }
    847 //          for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     999//          for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    8481000//            {
    8491001//              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_ACK              [i]));
     
    8651017          }
    8661018# endif   
     1019
     1020        log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Method - genMealy_decod");
     1021
     1022        SC_METHOD (genMealy_decod);
     1023        dont_initialize ();
     1024        sensitive << (*(in_CLOCK)).neg(); // use internal register
     1025        for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1026          for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1027            {
     1028              sensitive << (*(in_DECOD_VAL                         [i][j]))
     1029                        << (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]))
     1030                        << (*(in_DECOD_BRANCH_STATE                [i][j]))
     1031                        << (*(in_DECOD_BRANCH_CONDITION            [i][j]))
     1032                        << (*(in_DECOD_BRANCH_DIRECTION            [i][j]))
     1033                        << (*(in_DECOD_ADDRESS_SRC                 [i][j]))
     1034                        << (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1035
     1036              if (_param->_have_port_context_id)
     1037                sensitive << (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1038              if (_param->_have_port_max_depth)
     1039                sensitive << (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1040            }
     1041        for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1042          {
     1043            sensitive << (*(in_DECOD_BTB_ACK                     [i]   ))
     1044                      << (*(in_DECOD_RAS_ACK                     [i]   ))
     1045                      << (*(in_DECOD_RAS_HIT                     [i]   )) 
     1046                      << (*(in_DECOD_RAS_ADDRESS_POP             [i]   ))
     1047//                    << (*(in_DECOD_RAS_INDEX                   [i]   ))
     1048                      << (*(in_DECOD_UPT_ACK                     [i]   )) ;
     1049          }
     1050
     1051# ifdef SYSTEMCASS_SPECIFIC
     1052        // List dependency information
    8671053       
     1054        for (uint32_t x=0; x<_param->_nb_decod_unit; x++)
     1055          for (uint32_t y=0; y<_param->_nb_inst_decod[x]; y++)
     1056            {
     1057              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1058                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1059                  {
     1060                    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_VAL                         [i][j]));
     1061                    if (_param->_have_port_context_id)
     1062                    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1063                    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1064                    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1065                    if (_param->_have_port_max_depth)
     1066                    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1067                    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1068                    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1069                    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1070                    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1071                  }
     1072              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1073                {
     1074                    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1075                    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1076                    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1077                    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1078//                  (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1079                    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1080                }
     1081            }
     1082
     1083        for (uint32_t x=0; x<_param->_nb_inst_branch_decod; x++)
     1084          {
     1085              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1086                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1087                  {
     1088                    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_VAL                         [i][j]));
     1089                    if (_param->_have_port_context_id)
     1090                    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1091                    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1092                    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1093                    if (_param->_have_port_max_depth)
     1094                    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1095                    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1096                    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1097                    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1098                    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1099                  }
     1100              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1101                {
     1102                    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1103                    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1104                    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1105                    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1106//                  (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1107                    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1108                  }
     1109
     1110              if (_param->_have_port_context_id)
     1111                {
     1112              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1113                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1114                  {
     1115                    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_VAL                         [i][j]));
     1116                    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1117                    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1118                    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1119                    if (_param->_have_port_max_depth)
     1120                    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1121                    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1122                    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1123                    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1124                    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1125                  }
     1126              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1127                {
     1128                    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1129                    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1130                    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1131                    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1132//                  (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1133                    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1134                }
     1135                }
     1136
     1137              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1138                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1139                  {
     1140                    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_VAL                         [i][j]));
     1141                    if (_param->_have_port_context_id)
     1142                    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1143                    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1144                    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1145                    if (_param->_have_port_max_depth)
     1146                    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1147                    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1148                    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1149                    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1150                    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1151                  }
     1152              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1153                {
     1154                    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1155                    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1156                    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1157                    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1158//                  (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1159                    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1160                  }
     1161
     1162              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1163                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1164                  {
     1165                    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_VAL                         [i][j]));
     1166                    if (_param->_have_port_context_id)
     1167                    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1168                    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1169                    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1170                    if (_param->_have_port_max_depth)
     1171                    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1172                    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1173                    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1174                    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1175                    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1176                  }
     1177              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1178                {
     1179                    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1180                    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1181                    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1182                    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1183//                  (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1184                    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1185                  }
     1186
     1187              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1188                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1189                  {
     1190                    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_VAL                         [i][j]));
     1191                    if (_param->_have_port_context_id)
     1192                    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1193                    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1194                    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1195                    if (_param->_have_port_max_depth)
     1196                    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1197                    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1198                    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1199                    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1200                    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1201                  }
     1202              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1203                {
     1204                    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1205                    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1206                    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1207                    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1208//                  (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1209                    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1210                  }
     1211
     1212              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1213                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1214                  {
     1215                    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_VAL                         [i][j]));
     1216                    if (_param->_have_port_context_id)
     1217                    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1218                    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1219                    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1220                    if (_param->_have_port_max_depth)
     1221                    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1222                    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1223                    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1224                    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1225                    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1226                  }
     1227              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1228                {
     1229                    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1230                    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1231                    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1232                    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1233//                  (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1234                    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1235                  }
     1236
     1237              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1238                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1239                  {
     1240                    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_VAL                         [i][j]));
     1241                    if (_param->_have_port_context_id)
     1242                    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1243                    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1244                    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1245                    if (_param->_have_port_max_depth)
     1246                    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1247                    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1248                    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1249                    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1250                    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1251                  }
     1252              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1253                {
     1254                    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1255                    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1256                    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1257                    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1258//                  (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1259                    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1260                  }
     1261
     1262              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1263                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1264                  {
     1265                    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_VAL                         [i][j]));
     1266                    if (_param->_have_port_context_id)
     1267                    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1268                    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1269                    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1270                    if (_param->_have_port_max_depth)
     1271                    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1272                    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1273                    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1274                    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1275                    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1276                  }
     1277              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1278                {
     1279                    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1280                    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1281                    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1282                    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1283//                  (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1284                    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1285                  }
     1286
     1287              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1288                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1289                  {
     1290                    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_VAL                         [i][j]));
     1291                    if (_param->_have_port_context_id)
     1292                    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1293                    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1294                    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1295                    if (_param->_have_port_max_depth)
     1296                    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1297                    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1298                    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1299                    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1300                    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1301                  }
     1302              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1303                {
     1304                    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1305                    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1306                    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1307                    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1308//                  (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1309                    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1310                  }
     1311
     1312              if (_param->_have_port_context_id)
     1313                {   
     1314              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1315                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1316                  {
     1317                    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_VAL                         [i][j]));
     1318                    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1319                    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1320                    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1321                    if (_param->_have_port_max_depth)
     1322                    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1323                    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1324                    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1325                    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1326                    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1327                  }
     1328              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1329                {
     1330                    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1331                    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1332                    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1333                    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1334//                  (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1335                    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1336                  }
     1337                }
     1338
     1339              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1340                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1341                  {
     1342                    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_VAL                         [i][j]));
     1343                    if (_param->_have_port_context_id)
     1344                    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1345                    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1346                    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1347                    if (_param->_have_port_max_depth)
     1348                    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1349                    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1350                    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1351                    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1352                    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1353                  }
     1354              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1355                {
     1356                    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1357                    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1358                    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1359                    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1360//                  (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1361                    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1362                  }
     1363
     1364              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1365                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1366                  {
     1367                    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_VAL                         [i][j]));
     1368                    if (_param->_have_port_context_id)
     1369                    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1370                    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1371                    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1372                    if (_param->_have_port_max_depth)
     1373                    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1374                    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1375                    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1376                    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1377                    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1378                  }
     1379              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1380                {
     1381                    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1382                    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1383                    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1384                    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1385//                  (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1386                    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1387                  }
     1388
     1389              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1390                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1391                  {
     1392                    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_VAL                         [i][j]));
     1393                    if (_param->_have_port_context_id)
     1394                    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1395                    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1396                    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1397                    if (_param->_have_port_max_depth)
     1398                    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1399                    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1400                    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1401                    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1402                    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1403                  }
     1404              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1405                {
     1406                    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1407                    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1408                    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1409                    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1410//                  (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1411                    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1412                  }
     1413
     1414              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1415                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1416                  {
     1417                    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_VAL                         [i][j]));
     1418                    if (_param->_have_port_context_id)
     1419                    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1420                    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1421                    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1422                    if (_param->_have_port_max_depth)
     1423                    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1424                    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1425                    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1426                    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1427                    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1428                  }
     1429              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1430                {
     1431                    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1432                    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1433                    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1434                    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1435//                  (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1436                    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1437                  }
     1438
     1439              if (_param->_have_port_context_id)
     1440                {
     1441              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1442                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1443                  {
     1444                    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_VAL                         [i][j]));
     1445                    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1446                    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1447                    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1448                    if (_param->_have_port_max_depth)
     1449                    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1450                    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1451                    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1452                    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1453                    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1454                  }
     1455              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1456                {
     1457                    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1458                    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1459                    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1460                    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1461//                  (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1462                    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1463                  }
     1464                }
     1465
     1466              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1467                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1468                  {
     1469                    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_VAL                         [i][j]));
     1470                    if (_param->_have_port_context_id)
     1471                    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1472                    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1473                    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1474                    if (_param->_have_port_max_depth)
     1475                    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1476                    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1477                    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1478                    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1479                    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1480                  }
     1481              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1482                {
     1483                    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1484                    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1485                    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1486                    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1487//                  (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1488                    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1489                  }
     1490
     1491              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1492                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1493                  {
     1494                    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_VAL                         [i][j]));
     1495                    if (_param->_have_port_context_id)
     1496                    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1497                    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1498                    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1499                    if (_param->_have_port_max_depth)
     1500                    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1501                    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1502                    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1503                    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1504                    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1505                  }
     1506              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1507                {
     1508                    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1509                    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1510                    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1511                    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1512//                  (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1513                    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1514                  }
     1515
     1516              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1517                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1518                  {
     1519                    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_VAL                         [i][j]));
     1520                    if (_param->_have_port_context_id)
     1521                    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1522                    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1523                    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1524                    if (_param->_have_port_max_depth)
     1525                    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1526                    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1527                    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1528                    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1529                    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1530                  }
     1531              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1532                {
     1533                    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1534                    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1535                    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1536                    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1537//                  (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1538                    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1539                  }
     1540
     1541              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1542                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1543                  {
     1544                    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_VAL                         [i][j]));
     1545                    if (_param->_have_port_context_id)
     1546                    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1547                    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1548                    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1549                    if (_param->_have_port_max_depth)
     1550                    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1551                    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1552                    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1553                    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1554                    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1555                  }
     1556              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1557                {
     1558                    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1559                    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1560                    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1561                    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1562//                  (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1563                    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1564                  }
     1565
     1566              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1567                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1568                  {
     1569                    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_VAL                         [i][j]));
     1570                    if (_param->_have_port_context_id)
     1571                    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1572                    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1573                    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1574                    if (_param->_have_port_max_depth)
     1575                    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1576                    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1577                    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1578                    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1579                    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1580                  }
     1581              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1582                {
     1583                    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1584                    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1585                    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1586                    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1587//                  (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1588                    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1589                  }
     1590
     1591//            for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1592//              for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1593//                {
     1594//                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_VAL                         [i][j]));
     1595//                  if (_param->_have_port_context_id)
     1596//                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1597//                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1598//                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1599//                  if (_param->_have_port_max_depth)
     1600//                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1601//                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1602//                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1603//                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1604//                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1605//                }
     1606//            for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1607//              {
     1608//                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1609//                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1610//                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1611//                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1612//                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1613//                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1614//                }
     1615
     1616              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1617                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1618                  {
     1619                    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_VAL                         [i][j]));
     1620                    if (_param->_have_port_context_id)
     1621                    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1622                    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1623                    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1624                    if (_param->_have_port_max_depth)
     1625                    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1626                    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1627                    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1628                    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1629                    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1630                  }
     1631              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1632                {
     1633                    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1634                    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1635                    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1636                    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1637//                  (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1638                    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1639                  }
     1640
     1641              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1642                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1643                  {
     1644                    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_VAL                         [i][j]));
     1645                    if (_param->_have_port_context_id)
     1646                    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1647                    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1648                    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1649                    if (_param->_have_port_max_depth)
     1650                    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1651                    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1652                    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1653                    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1654                    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1655                  }
     1656              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1657                {
     1658                    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1659                    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1660                    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1661                    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1662//                  (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1663                    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1664                  }
     1665
     1666              if (_param->_have_port_max_depth)
     1667                {
     1668              for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1669                for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1670                  {
     1671                    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_VAL                         [i][j]));
     1672                    if (_param->_have_port_context_id)
     1673                    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1674                    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1675                    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1676                    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1677                    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1678                    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1679                    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1680                    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1681                  }
     1682              for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1683                {
     1684                    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1685                    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1686                    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1687                    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1688//                  (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1689                    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1690                }
     1691                }
     1692          }
     1693# endif
     1694
     1695        log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Method - genMealy_update");
     1696
     1697        SC_METHOD (genMealy_update);
     1698        dont_initialize ();
     1699//      sensitive << (*(in_CLOCK)).neg(); // don't use internal register
     1700        for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
     1701          sensitive << (*(in_UPDATE_BTB_ACK           [i]))
     1702                    << (*(in_UPDATE_DIR_ACK           [i]))
     1703                    << (*(in_UPDATE_RAS_ACK           [i]))
     1704                    << (*(in_UPDATE_UPT_VAL           [i]))
     1705                    << (*(in_UPDATE_UPT_BTB_VAL       [i]))
     1706                    << (*(in_UPDATE_UPT_DIR_VAL       [i]))
     1707                    << (*(in_UPDATE_UPT_RAS_VAL       [i]));
     1708
     1709# ifdef SYSTEMCASS_SPECIFIC
     1710        // List dependency information
     1711        for (uint32_t x=0; x<_param->_nb_inst_branch_update; x++)
     1712//        for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
     1713            {
     1714              uint32_t i=x;
     1715
     1716              (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_BTB_ACK           [i]));
     1717              (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_DIR_ACK           [i]));
     1718              (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_RAS_ACK           [i]));
     1719              (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_UPT_VAL           [i]));
     1720              (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_UPT_BTB_VAL       [i]));
     1721              (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_UPT_DIR_VAL       [i]));
     1722              (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_UPT_RAS_VAL       [i]));
     1723
     1724              (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_BTB_ACK           [i]));
     1725              (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_DIR_ACK           [i]));
     1726              (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_RAS_ACK           [i]));
     1727              (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_UPT_VAL           [i]));
     1728              (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_UPT_BTB_VAL       [i]));
     1729              (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_UPT_DIR_VAL       [i]));
     1730              (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_UPT_RAS_VAL       [i]));
     1731
     1732              (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_BTB_ACK           [i]));
     1733              (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_DIR_ACK           [i]));
     1734              (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_RAS_ACK           [i]));
     1735              (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_UPT_VAL           [i]));
     1736              (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_UPT_BTB_VAL       [i]));
     1737              (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_UPT_DIR_VAL       [i]));
     1738              (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_UPT_RAS_VAL       [i]));
     1739
     1740              (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_BTB_ACK           [i]));
     1741              (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_DIR_ACK           [i]));
     1742              (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_RAS_ACK           [i]));
     1743              (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_UPT_VAL           [i]));
     1744              (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_UPT_BTB_VAL       [i]));
     1745              (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_UPT_DIR_VAL       [i]));
     1746              (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_UPT_RAS_VAL       [i]));
     1747            }
     1748# endif
    8681749#endif
    8691750      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_allocation.cpp

    r81 r82  
    1616namespace prediction_unit {
    1717namespace prediction_unit_glue {
    18 
    19 
    2018
    2119#undef  FUNCTION
     
    7977     
    8078      {
    81         ALLOC1_INTERFACE("predict_btb",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_predict);
     79        ALLOC1_INTERFACE("predict_btb",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
    8280       
    8381        ALLOC1_VALACK_OUT(out_PREDICT_BTB_VAL         ,VAL);
     
    9492     
    9593      {
    96         ALLOC1_INTERFACE("predict_dir",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_predict);
     94        ALLOC1_INTERFACE("predict_dir",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
    9795       
    9896        ALLOC1_VALACK_OUT(out_PREDICT_DIR_VAL        ,VAL);
     
    106104     
    107105      {
    108         ALLOC1_INTERFACE("predict_ras",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_predict);
     106        ALLOC1_INTERFACE("predict_ras",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
    109107       
    110108        ALLOC1_VALACK_OUT(out_PREDICT_RAS_VAL         ,VAL);
     
    119117     
    120118      {
    121         ALLOC1_INTERFACE("predict_upt",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_predict);
     119        ALLOC1_INTERFACE("predict_upt",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
    122120       
    123121        ALLOC1_VALACK_OUT(out_PREDICT_UPT_VAL             ,VAL);
     
    135133    }
    136134   
     135    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     136    {
     137      {
     138        ALLOC2_INTERFACE("decod",IN,SOUTH,"Interface with decod unit",_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_interface_it1]);
     139       
     140        _ALLOC2_VALACK_IN ( in_DECOD_VAL                        ,VAL,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     141        _ALLOC2_VALACK_OUT(out_DECOD_ACK                        ,ACK,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     142        _ALLOC2_SIGNAL_IN ( in_DECOD_CONTEXT_ID                 ,"context_id"                 ,Tcontext_t         ,_param->_size_context_id      ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     143        _ALLOC2_SIGNAL_IN ( in_DECOD_MATCH_INST_IFETCH_PTR      ,"match_inst_ifetch_ptr"      ,Tcontrol_t         ,1                             ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     144        _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state    ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     145        _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_max_size_depth       ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     146        _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_CONDITION           ,"branch_condition"           ,Tbranch_condition_t,_param->_size_branch_condition,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     147        _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_DIRECTION           ,"branch_direction"           ,Tcontrol_t         ,1                             ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     148        _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_SRC                ,"address_src"                ,Taddress_t         ,_param->_size_address         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     149        _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_DEST               ,"address_dest"               ,Taddress_t         ,_param->_size_address         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     150      }
     151
     152      {
     153        ALLOC1_INTERFACE("decod_btb",OUT,NORTH,"Interface with decod unit",_param->_nb_inst_branch_decod);
     154
     155        ALLOC1_VALACK_OUT(out_DECOD_BTB_VAL            ,VAL);
     156        ALLOC1_VALACK_IN ( in_DECOD_BTB_ACK            ,ACK);
     157        ALLOC1_SIGNAL_OUT(out_DECOD_BTB_CONTEXT_ID     ,"context_id"     ,Tcontext_t         ,_param->_size_context_id);
     158        ALLOC1_SIGNAL_OUT(out_DECOD_BTB_ADDRESS_SRC    ,"address_src"    ,Taddress_t         ,_param->_size_address);
     159        ALLOC1_SIGNAL_OUT(out_DECOD_BTB_ADDRESS_DEST   ,"address_dest"   ,Taddress_t         ,_param->_size_address);
     160        ALLOC1_SIGNAL_OUT(out_DECOD_BTB_CONDITION      ,"condition"      ,Tbranch_condition_t,_param->_size_branch_condition);
     161        ALLOC1_SIGNAL_OUT(out_DECOD_BTB_LAST_TAKE      ,"last_take"      ,Tcontrol_t         ,1);
     162        ALLOC1_SIGNAL_OUT(out_DECOD_BTB_MISS_PREDICTION,"miss_prediction",Tcontrol_t         ,1);
     163        ALLOC1_SIGNAL_OUT(out_DECOD_BTB_IS_ACCURATE    ,"is_accurate"    ,Tcontrol_t         ,1);
     164      }
     165
     166      {
     167        ALLOC1_INTERFACE("decod_ras",OUT,NORTH,"Interface with decod unit",_param->_nb_inst_branch_decod);
     168                                                                                     
     169        ALLOC1_VALACK_OUT(out_DECOD_RAS_VAL            ,VAL);
     170        ALLOC1_VALACK_IN ( in_DECOD_RAS_ACK            ,ACK);
     171        ALLOC1_SIGNAL_OUT(out_DECOD_RAS_CONTEXT_ID     ,"context_id"     ,Tcontext_t,_param->_size_context_id);
     172        ALLOC1_SIGNAL_IN ( in_DECOD_RAS_HIT            ,"hit"            ,Tcontrol_t,1);
     173        ALLOC1_SIGNAL_OUT(out_DECOD_RAS_PUSH           ,"push"           ,Tcontrol_t,1);
     174        ALLOC1_SIGNAL_OUT(out_DECOD_RAS_ADDRESS_PUSH   ,"address_push"   ,Taddress_t,_param->_size_address);
     175        ALLOC1_SIGNAL_IN ( in_DECOD_RAS_ADDRESS_POP    ,"address_pop"    ,Taddress_t,_param->_size_address);
     176//      ALLOC1_SIGNAL_IN ( in_DECOD_RAS_INDEX          ,"index"          ,Tptr_t    ,_param->_size_ras_index);
     177        ALLOC1_SIGNAL_OUT(out_DECOD_RAS_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
     178      }
     179
     180      {
     181        ALLOC1_INTERFACE("decod_upt",OUT,NORTH,"Interface with decod unit",_param->_nb_inst_branch_decod);
     182                                                                                     
     183        ALLOC1_VALACK_OUT(out_DECOD_UPT_VAL                 ,VAL);
     184        ALLOC1_VALACK_IN ( in_DECOD_UPT_ACK                 ,ACK);
     185        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_CONTEXT_ID          ,"context_id"          ,Tcontext_t         ,_param->_size_context_id);
     186        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_ADDRESS_SRC     ,"btb_address_src"     ,Taddress_t         ,_param->_size_address);
     187        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_ADDRESS_DEST    ,"btb_address_dest"    ,Taddress_t         ,_param->_size_address);
     188        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_CONDITION       ,"btb_condition"       ,Tbranch_condition_t,_param->_size_branch_condition);
     189        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_LAST_TAKE       ,"btb_last_take"       ,Tcontrol_t         ,1);
     190        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_RAS_ADDRESS         ,"ras_address"         ,Taddress_t         ,_param->_size_address);
     191//      ALLOC1_SIGNAL_OUT(out_DECOD_UPT_RAS_INDEX           ,"ras_index"           ,Tptr_t             ,_param->_size_ras_index);
     192        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_MISS_IFETCH         ,"miss_ifetch"         ,Tcontrol_t         ,1);
     193        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_MISS_DECOD          ,"miss_decod"          ,Tcontrol_t         ,1);
     194        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_UPDATE_PREDICTION_ID,"update_prediction_id",Tprediction_ptr_t  ,_param->_max_size_depth);
     195      }
     196    }
     197
     198    // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     199    {
     200      {
     201        ALLOC1_INTERFACE("update_btb",OUT,SOUTH,"Interface with update unit",_param->_nb_inst_branch_update);
     202
     203        ALLOC1_VALACK_OUT(out_UPDATE_BTB_VAL                  ,VAL);
     204        ALLOC1_VALACK_IN ( in_UPDATE_BTB_ACK                  ,ACK);
     205//      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_CONTEXT_ID           ,"context_id"           ,Tcontext_t         ,_param->_size_context_id);
     206//      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_ADDRESS_SRC          ,"address_src"          ,Taddress_t         ,_param->_size_address);
     207//      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_ADDRESS_DEST         ,"address_dest"         ,Taddress_t         ,_param->_size_address);
     208//      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_CONDITION            ,"condition"            ,Tbranch_condition_t,_param->_size_branch_condition);
     209//      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_LAST_TAKE            ,"last_take"            ,Tcontrol_t         ,1);
     210//      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_MISS_PREDICTION      ,"miss_prediction"      ,Tcontrol_t         ,1);
     211      }
     212
     213      {
     214        ALLOC1_INTERFACE("update_dir",OUT,NORTH,"Interface with update unit",_param->_nb_inst_branch_update);
     215
     216        ALLOC1_VALACK_OUT(out_UPDATE_DIR_VAL                  ,VAL);
     217        ALLOC1_VALACK_IN ( in_UPDATE_DIR_ACK                  ,ACK);
     218//      ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_ADDRESS              ,"address"              ,Taddress_t         ,_param->_size_address);
     219//      ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_HISTORY              ,"history"              ,Thistory_t         ,_param->_size_history);
     220//      ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_DIRECTION            ,"direction"            ,Tcontrol_t         ,1);
     221      }
     222
     223      {
     224        ALLOC1_INTERFACE("update_ras",OUT,NORTH,"Interface with update unit",_param->_nb_inst_branch_update);
     225
     226        ALLOC1_VALACK_OUT(out_UPDATE_RAS_VAL                  ,VAL);
     227        ALLOC1_VALACK_IN ( in_UPDATE_RAS_ACK                  ,ACK);
     228//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_CONTEXT_ID           ,"context_id"           ,Tcontext_t         ,_param->_size_context_id);
     229//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_PUSH                 ,"push"                 ,Tcontrol_t         ,1);
     230//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_ADDRESS              ,"address"              ,Taddress_t         ,_param->_size_address);
     231//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_INDEX                ,"index"                ,Tptr_t             ,_param->_size_ras_index);
     232//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_MISS_PREDICTION      ,"miss_prediction"      ,Tcontrol_t         ,1);
     233//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_PREDICTION_IFETCH    ,"prediction_ifetch"    ,Tcontrol_t         ,1);
     234      }
     235
     236      {
     237        ALLOC1_INTERFACE("update_upt",IN ,NORTH,"Interface with update unit",_param->_nb_inst_branch_update);
     238
     239        ALLOC1_VALACK_IN ( in_UPDATE_UPT_VAL                  ,VAL);
     240        ALLOC1_VALACK_OUT(out_UPDATE_UPT_ACK                  ,ACK);
     241//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_CONTEXT_ID           ,"context_id"           ,Tcontext_t         ,_param->_size_context_id);
     242//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_MISS_PREDICTION      ,"miss_prediction"      ,Tcontrol_t         ,1);
     243//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_DIRECTION_GOOD       ,"direction_good"       ,Tcontrol_t         ,1);
     244        ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_VAL              ,"btb_val"              ,Tcontrol_t         ,1);
     245//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_ADDRESS_SRC      ,"btb_address_src"      ,Taddress_t         ,_param->_size_address);
     246//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_ADDRESS_DEST     ,"btb_address_dest"     ,Taddress_t         ,_param->_size_address);
     247//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_CONDITION        ,"btb_condition"        ,Tbranch_condition_t,_param->_size_branch_condition);
     248        ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_DIR_VAL              ,"dir_val"              ,Tcontrol_t         ,1);
     249//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_DIR_HISTORY          ,"dir_history"          ,Thistory_t         ,_param->_size_history);
     250        ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_VAL              ,"ras_val"              ,Tcontrol_t         ,1);
     251//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_PUSH             ,"ras_push"             ,Tcontrol_t         ,1);
     252//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_ADDRESS          ,"ras_address"          ,Taddress_t         ,_param->_size_address);
     253//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_INDEX            ,"ras_index"            ,Tptr_t             ,_param->_size_ras_index);
     254//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_PREDICTION_IFETCH,"ras_prediction_ifetch",Tcontrol_t         ,1);
     255      }
     256    }
     257
    137258    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
    138259    {
    139260      ALLOC1_INTERFACE("depth",IN,NORTH,"Interface with depth",_param->_nb_context);
    140      
    141       ALLOC1_SIGNAL_IN (in_DEPTH_UPT_NB_BRANCH,"upt_nb_branch",Tdepth_t,_param->_size_depth[alloc_signal_it1]);
    142       ALLOC1_SIGNAL_IN (in_DEPTH_UPT_TAIL     ,"upt_tail"     ,Tdepth_t,_param->_size_depth[alloc_signal_it1]);
    143     }
     261
     262      ALLOC1_SIGNAL_IN ( in_DEPTH_UPT_NB_BRANCH,"upt_nb_branch",Tdepth_t,_param->_size_depth[alloc_signal_it1]+1);
     263      ALLOC1_SIGNAL_IN ( in_DEPTH_UPT_TAIL     ,"upt_tail"     ,Tdepth_t,_param->_size_depth[alloc_signal_it1]);
     264      ALLOC1_SIGNAL_OUT(out_DEPTH_NB_BRANCH    ,"nb_branch"    ,Tdepth_t,_param->_size_depth[alloc_signal_it1]+1);
     265      ALLOC1_SIGNAL_OUT(out_DEPTH_TAIL         ,"tail"         ,Tdepth_t,_param->_size_depth[alloc_signal_it1]);
     266    }
     267
     268    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     269
     270#ifndef NO_INIT
     271    reg_PREDICT_PRIORITY = 0;
     272    reg_DECOD_PRIORITY   = 0;
     273#endif
    144274
    145275    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_deallocation.cpp

    r81 r82  
    2929        delete    in_NRESET;
    3030
     31
    3132        // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3233        DELETE1_SIGNAL( in_PREDICT_VAL                        ,_param->_nb_context     ,1);
     
    4142        DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context     ,_param->_size_depth [alloc_signal_it1]);
    4243        DELETE2_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE         ,_param->_nb_context     ,_param->_nb_instruction[alloc_signal_it1],1);
    43         DELETE1_SIGNAL(out_PREDICT_BTB_VAL                    ,_param->_nb_inst_predict,1);
    44         DELETE1_SIGNAL( in_PREDICT_BTB_ACK                    ,_param->_nb_inst_predict,1);
    45         DELETE1_SIGNAL(out_PREDICT_BTB_CONTEXT_ID             ,_param->_nb_inst_predict,_param->_size_context_id);
    46         DELETE1_SIGNAL(out_PREDICT_BTB_ADDRESS                ,_param->_nb_inst_predict,_param->_size_address);
    47         DELETE1_SIGNAL( in_PREDICT_BTB_HIT                    ,_param->_nb_inst_predict,1);
    48         DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC            ,_param->_nb_inst_predict,_param->_size_address);
    49         DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST           ,_param->_nb_inst_predict,_param->_size_address);
    50         DELETE1_SIGNAL( in_PREDICT_BTB_CONDITION              ,_param->_nb_inst_predict,_param->_size_branch_condition);
    51 //      DELETE1_SIGNAL( in_PREDICT_BTB_LAST_TAKE              ,_param->_nb_inst_predict,1);
    52         DELETE1_SIGNAL( in_PREDICT_BTB_IS_ACCURATE            ,_param->_nb_inst_predict,1);
    53         DELETE1_SIGNAL(out_PREDICT_DIR_VAL                    ,_param->_nb_inst_predict,1);
    54         DELETE1_SIGNAL( in_PREDICT_DIR_ACK                    ,_param->_nb_inst_predict,1);
    55         DELETE1_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC            ,_param->_nb_inst_predict,_param->_size_address);
    56         DELETE1_SIGNAL(out_PREDICT_DIR_STATIC                 ,_param->_nb_inst_predict,1);
    57 //      DELETE1_SIGNAL(out_PREDICT_DIR_LAST_TAKE              ,_param->_nb_inst_predict,1);
    58 //      DELETE1_SIGNAL( in_PREDICT_DIR_HISTORY                ,_param->_nb_inst_predict,_param->_size_history);
    59         DELETE1_SIGNAL( in_PREDICT_DIR_DIRECTION              ,_param->_nb_inst_predict,1);
    60         DELETE1_SIGNAL(out_PREDICT_RAS_VAL                    ,_param->_nb_inst_predict,1);
    61         DELETE1_SIGNAL( in_PREDICT_RAS_ACK                    ,_param->_nb_inst_predict,1);
    62         DELETE1_SIGNAL(out_PREDICT_RAS_CONTEXT_ID             ,_param->_nb_inst_predict,_param->_size_context_id);
    63         DELETE1_SIGNAL( in_PREDICT_RAS_HIT                    ,_param->_nb_inst_predict,1);
    64         DELETE1_SIGNAL(out_PREDICT_RAS_PUSH                   ,_param->_nb_inst_predict,1);
    65         DELETE1_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH           ,_param->_nb_inst_predict,_param->_size_address);
    66         DELETE1_SIGNAL( in_PREDICT_RAS_ADDRESS_POP            ,_param->_nb_inst_predict,_param->_size_address);
    67 //      DELETE1_SIGNAL( in_PREDICT_RAS_INDEX                  ,_param->_nb_inst_predict,_param->_size_ras_index);
    68         DELETE1_SIGNAL(out_PREDICT_UPT_VAL                    ,_param->_nb_inst_predict,1);
    69         DELETE1_SIGNAL( in_PREDICT_UPT_ACK                    ,_param->_nb_inst_predict,1);
    70         DELETE1_SIGNAL(out_PREDICT_UPT_CONTEXT_ID             ,_param->_nb_inst_predict,_param->_size_context_id);
    71         DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC        ,_param->_nb_inst_predict,_param->_size_address);
    72         DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST       ,_param->_nb_inst_predict,_param->_size_address);
    73         DELETE1_SIGNAL(out_PREDICT_UPT_BTB_CONDITION          ,_param->_nb_inst_predict,_param->_size_branch_condition);
    74         DELETE1_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE          ,_param->_nb_inst_predict,1);
    75         DELETE1_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE        ,_param->_nb_inst_predict,1);
    76 //      DELETE1_SIGNAL(out_PREDICT_UPT_DIR_HISTORY            ,_param->_nb_inst_predict,_param->_size_history);
    77         DELETE1_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS            ,_param->_nb_inst_predict,_param->_size_address);
    78 //      DELETE1_SIGNAL(out_PREDICT_UPT_RAS_INDEX              ,_param->_nb_inst_predict,_param->_size_ras_index);
     44        DELETE1_SIGNAL(out_PREDICT_BTB_VAL                    ,_param->_nb_inst_branch_predict,1);
     45        DELETE1_SIGNAL( in_PREDICT_BTB_ACK                    ,_param->_nb_inst_branch_predict,1);
     46        DELETE1_SIGNAL(out_PREDICT_BTB_CONTEXT_ID             ,_param->_nb_inst_branch_predict,_param->_size_context_id);
     47        DELETE1_SIGNAL(out_PREDICT_BTB_ADDRESS                ,_param->_nb_inst_branch_predict,_param->_size_address);
     48        DELETE1_SIGNAL( in_PREDICT_BTB_HIT                    ,_param->_nb_inst_branch_predict,1);
     49        DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC            ,_param->_nb_inst_branch_predict,_param->_size_address);
     50        DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST           ,_param->_nb_inst_branch_predict,_param->_size_address);
     51        DELETE1_SIGNAL( in_PREDICT_BTB_CONDITION              ,_param->_nb_inst_branch_predict,_param->_size_branch_condition);
     52//      DELETE1_SIGNAL( in_PREDICT_BTB_LAST_TAKE              ,_param->_nb_inst_branch_predict,1);
     53        DELETE1_SIGNAL( in_PREDICT_BTB_IS_ACCURATE            ,_param->_nb_inst_branch_predict,1);
     54        DELETE1_SIGNAL(out_PREDICT_DIR_VAL                    ,_param->_nb_inst_branch_predict,1);
     55        DELETE1_SIGNAL( in_PREDICT_DIR_ACK                    ,_param->_nb_inst_branch_predict,1);
     56        DELETE1_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC            ,_param->_nb_inst_branch_predict,_param->_size_address);
     57        DELETE1_SIGNAL(out_PREDICT_DIR_STATIC                 ,_param->_nb_inst_branch_predict,1);
     58//      DELETE1_SIGNAL(out_PREDICT_DIR_LAST_TAKE              ,_param->_nb_inst_branch_predict,1);
     59//      DELETE1_SIGNAL( in_PREDICT_DIR_HISTORY                ,_param->_nb_inst_branch_predict,_param->_size_history);
     60        DELETE1_SIGNAL( in_PREDICT_DIR_DIRECTION              ,_param->_nb_inst_branch_predict,1);
     61        DELETE1_SIGNAL(out_PREDICT_RAS_VAL                    ,_param->_nb_inst_branch_predict,1);
     62        DELETE1_SIGNAL( in_PREDICT_RAS_ACK                    ,_param->_nb_inst_branch_predict,1);
     63        DELETE1_SIGNAL(out_PREDICT_RAS_CONTEXT_ID             ,_param->_nb_inst_branch_predict,_param->_size_context_id);
     64        DELETE1_SIGNAL( in_PREDICT_RAS_HIT                    ,_param->_nb_inst_branch_predict,1);
     65        DELETE1_SIGNAL(out_PREDICT_RAS_PUSH                   ,_param->_nb_inst_branch_predict,1);
     66        DELETE1_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH           ,_param->_nb_inst_branch_predict,_param->_size_address);
     67        DELETE1_SIGNAL( in_PREDICT_RAS_ADDRESS_POP            ,_param->_nb_inst_branch_predict,_param->_size_address);
     68//      DELETE1_SIGNAL( in_PREDICT_RAS_INDEX                  ,_param->_nb_inst_branch_predict,_param->_size_ras_index);
     69        DELETE1_SIGNAL(out_PREDICT_UPT_VAL                    ,_param->_nb_inst_branch_predict,1);
     70        DELETE1_SIGNAL( in_PREDICT_UPT_ACK                    ,_param->_nb_inst_branch_predict,1);
     71        DELETE1_SIGNAL(out_PREDICT_UPT_CONTEXT_ID             ,_param->_nb_inst_branch_predict,_param->_size_context_id);
     72        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC        ,_param->_nb_inst_branch_predict,_param->_size_address);
     73        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST       ,_param->_nb_inst_branch_predict,_param->_size_address);
     74        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_CONDITION          ,_param->_nb_inst_branch_predict,_param->_size_branch_condition);
     75        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE          ,_param->_nb_inst_branch_predict,1);
     76        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE        ,_param->_nb_inst_branch_predict,1);
     77//      DELETE1_SIGNAL(out_PREDICT_UPT_DIR_HISTORY            ,_param->_nb_inst_branch_predict,_param->_size_history);
     78        DELETE1_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS            ,_param->_nb_inst_branch_predict,_param->_size_address);
     79//      DELETE1_SIGNAL(out_PREDICT_UPT_RAS_INDEX              ,_param->_nb_inst_branch_predict,_param->_size_ras_index);
     80
     81        // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     82        DELETE2_SIGNAL( in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1);
     83        DELETE2_SIGNAL(out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1);
     84        DELETE2_SIGNAL( in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_context_id      );
     85        DELETE2_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1                             );
     86        DELETE2_SIGNAL( in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_branch_state    );
     87        DELETE2_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_max_size_depth       );
     88        DELETE2_SIGNAL( in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_branch_condition);
     89        DELETE2_SIGNAL( in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1                             );
     90        DELETE2_SIGNAL( in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_address         );
     91        DELETE2_SIGNAL( in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_address         );
     92        DELETE1_SIGNAL(out_DECOD_BTB_VAL            ,_param->_nb_inst_branch_decod,1);
     93        DELETE1_SIGNAL( in_DECOD_BTB_ACK            ,_param->_nb_inst_branch_decod,1);
     94        DELETE1_SIGNAL(out_DECOD_BTB_CONTEXT_ID     ,_param->_nb_inst_branch_decod,_param->_size_context_id);
     95        DELETE1_SIGNAL(out_DECOD_BTB_ADDRESS_SRC    ,_param->_nb_inst_branch_decod,_param->_size_address);
     96        DELETE1_SIGNAL(out_DECOD_BTB_ADDRESS_DEST   ,_param->_nb_inst_branch_decod,_param->_size_address);
     97        DELETE1_SIGNAL(out_DECOD_BTB_CONDITION      ,_param->_nb_inst_branch_decod,_param->_size_branch_condition);
     98        DELETE1_SIGNAL(out_DECOD_BTB_LAST_TAKE      ,_param->_nb_inst_branch_decod,1);
     99        DELETE1_SIGNAL(out_DECOD_BTB_MISS_PREDICTION,_param->_nb_inst_branch_decod,1);
     100        DELETE1_SIGNAL(out_DECOD_BTB_IS_ACCURATE    ,_param->_nb_inst_branch_decod,1);
     101
     102        DELETE1_SIGNAL(out_DECOD_RAS_VAL            ,_param->_nb_inst_branch_decod,1);
     103        DELETE1_SIGNAL( in_DECOD_RAS_ACK            ,_param->_nb_inst_branch_decod,1);
     104        DELETE1_SIGNAL(out_DECOD_RAS_CONTEXT_ID     ,_param->_nb_inst_branch_decod,_param->_size_context_id);
     105        DELETE1_SIGNAL( in_DECOD_RAS_HIT            ,_param->_nb_inst_branch_decod,1);
     106        DELETE1_SIGNAL(out_DECOD_RAS_PUSH           ,_param->_nb_inst_branch_decod,1);
     107        DELETE1_SIGNAL(out_DECOD_RAS_ADDRESS_PUSH   ,_param->_nb_inst_branch_decod,_param->_size_address);
     108        DELETE1_SIGNAL( in_DECOD_RAS_ADDRESS_POP    ,_param->_nb_inst_branch_decod,_param->_size_address);
     109//      DELETE1_SIGNAL( in_DECOD_RAS_INDEX          ,_param->_nb_inst_branch_decod,_param->_size_ras_index);
     110        DELETE1_SIGNAL(out_DECOD_RAS_MISS_PREDICTION,_param->_nb_inst_branch_decod,1);
     111
     112        DELETE1_SIGNAL(out_DECOD_UPT_VAL                 ,_param->_nb_inst_branch_decod,1);
     113        DELETE1_SIGNAL( in_DECOD_UPT_ACK                 ,_param->_nb_inst_branch_decod,1);
     114        DELETE1_SIGNAL(out_DECOD_UPT_CONTEXT_ID          ,_param->_nb_inst_branch_decod,_param->_size_context_id);
     115        DELETE1_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_SRC     ,_param->_nb_inst_branch_decod,_param->_size_address);
     116        DELETE1_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_DEST    ,_param->_nb_inst_branch_decod,_param->_size_address);
     117        DELETE1_SIGNAL(out_DECOD_UPT_BTB_CONDITION       ,_param->_nb_inst_branch_decod,_param->_size_branch_condition);
     118        DELETE1_SIGNAL(out_DECOD_UPT_BTB_LAST_TAKE       ,_param->_nb_inst_branch_decod,1);
     119        DELETE1_SIGNAL(out_DECOD_UPT_RAS_ADDRESS         ,_param->_nb_inst_branch_decod,_param->_size_address);
     120//      DELETE1_SIGNAL(out_DECOD_UPT_RAS_INDEX           ,_param->_nb_inst_branch_decod,_param->_size_ras_index);
     121        DELETE1_SIGNAL(out_DECOD_UPT_MISS_IFETCH         ,_param->_nb_inst_branch_decod,1);
     122        DELETE1_SIGNAL(out_DECOD_UPT_MISS_DECOD          ,_param->_nb_inst_branch_decod,1);
     123        DELETE1_SIGNAL(out_DECOD_UPT_UPDATE_PREDICTION_ID,_param->_nb_inst_branch_decod,_param->_max_size_depth);
     124
     125        // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
     126        DELETE1_SIGNAL(out_UPDATE_BTB_VAL                  ,_param->_nb_inst_branch_update,1);
     127        DELETE1_SIGNAL( in_UPDATE_BTB_ACK                  ,_param->_nb_inst_branch_update,1);
     128//      DELETE1_SIGNAL(out_UPDATE_BTB_CONTEXT_ID           ,_param->_nb_inst_branch_update,_param->_size_context_id);
     129//      DELETE1_SIGNAL(out_UPDATE_BTB_ADDRESS_SRC          ,_param->_nb_inst_branch_update,_param->_size_address);
     130//      DELETE1_SIGNAL(out_UPDATE_BTB_ADDRESS_DEST         ,_param->_nb_inst_branch_update,_param->_size_address);
     131//      DELETE1_SIGNAL(out_UPDATE_BTB_CONDITION            ,_param->_nb_inst_branch_update,_param->_size_branch_condition);
     132//      DELETE1_SIGNAL(out_UPDATE_BTB_LAST_TAKE            ,_param->_nb_inst_branch_update,1);
     133//      DELETE1_SIGNAL(out_UPDATE_BTB_MISS_PREDICTION      ,_param->_nb_inst_branch_update,1);
     134
     135        DELETE1_SIGNAL(out_UPDATE_DIR_VAL                  ,_param->_nb_inst_branch_update,1);
     136        DELETE1_SIGNAL( in_UPDATE_DIR_ACK                  ,_param->_nb_inst_branch_update,1);
     137//      DELETE1_SIGNAL(out_UPDATE_DIR_ADDRESS              ,_param->_nb_inst_branch_update,_param->_size_address);
     138//      DELETE1_SIGNAL(out_UPDATE_DIR_HISTORY              ,_param->_nb_inst_branch_update,_param->_size_history);
     139//      DELETE1_SIGNAL(out_UPDATE_DIR_DIRECTION            ,_param->_nb_inst_branch_update,1);
     140
     141        DELETE1_SIGNAL(out_UPDATE_RAS_VAL                  ,_param->_nb_inst_branch_update,1);
     142        DELETE1_SIGNAL( in_UPDATE_RAS_ACK                  ,_param->_nb_inst_branch_update,1);
     143//      DELETE1_SIGNAL(out_UPDATE_RAS_CONTEXT_ID           ,_param->_nb_inst_branch_update,_param->_size_context_id);
     144//      DELETE1_SIGNAL(out_UPDATE_RAS_PUSH                 ,_param->_nb_inst_branch_update,1);
     145//      DELETE1_SIGNAL(out_UPDATE_RAS_ADDRESS              ,_param->_nb_inst_branch_update,_param->_size_address);
     146//      DELETE1_SIGNAL(out_UPDATE_RAS_INDEX                ,_param->_nb_inst_branch_update,_param->_size_ras_index);
     147//      DELETE1_SIGNAL(out_UPDATE_RAS_MISS_PREDICTION      ,_param->_nb_inst_branch_update,1);
     148//      DELETE1_SIGNAL(out_UPDATE_RAS_PREDICTION_IFETCH    ,_param->_nb_inst_branch_update,1);
     149
     150        DELETE1_SIGNAL( in_UPDATE_UPT_VAL                  ,_param->_nb_inst_branch_update,1);
     151        DELETE1_SIGNAL(out_UPDATE_UPT_ACK                  ,_param->_nb_inst_branch_update,1);
     152//      DELETE1_SIGNAL( in_UPDATE_UPT_CONTEXT_ID           ,_param->_nb_inst_branch_update,_param->_size_context_id);
     153//      DELETE1_SIGNAL( in_UPDATE_UPT_MISS_PREDICTION      ,_param->_nb_inst_branch_update,1);
     154//      DELETE1_SIGNAL( in_UPDATE_UPT_DIRECTION_GOOD       ,_param->_nb_inst_branch_update,1);
     155        DELETE1_SIGNAL( in_UPDATE_UPT_BTB_VAL              ,_param->_nb_inst_branch_update,1);
     156//      DELETE1_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_SRC      ,_param->_nb_inst_branch_update,_param->_size_address);
     157//      DELETE1_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_DEST     ,_param->_nb_inst_branch_update,_param->_size_address);
     158//      DELETE1_SIGNAL( in_UPDATE_UPT_BTB_CONDITION        ,_param->_nb_inst_branch_update,_param->_size_branch_condition);
     159        DELETE1_SIGNAL( in_UPDATE_UPT_DIR_VAL              ,_param->_nb_inst_branch_update,1);
     160//      DELETE1_SIGNAL( in_UPDATE_UPT_DIR_HISTORY          ,_param->_nb_inst_branch_update,_param->_size_history);
     161        DELETE1_SIGNAL( in_UPDATE_UPT_RAS_VAL              ,_param->_nb_inst_branch_update,1);
     162//      DELETE1_SIGNAL( in_UPDATE_UPT_RAS_PUSH             ,_param->_nb_inst_branch_update,1);
     163//      DELETE1_SIGNAL( in_UPDATE_UPT_RAS_ADDRESS          ,_param->_nb_inst_branch_update,_param->_size_address);
     164//      DELETE1_SIGNAL( in_UPDATE_UPT_RAS_INDEX            ,_param->_nb_inst_branch_update,_param->_size_ras_index);
     165//      DELETE1_SIGNAL( in_UPDATE_UPT_RAS_PREDICTION_IFETCH,_param->_nb_inst_branch_update,1);
    79166
    80167        // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
    81         DELETE1_SIGNAL( in_DEPTH_UPT_NB_BRANCH,_param->_nb_context,_param->_size_depth[alloc_signal_it1]);
     168        DELETE1_SIGNAL( in_DEPTH_UPT_NB_BRANCH,_param->_nb_context,_param->_size_depth[alloc_signal_it1]+1);
    82169        DELETE1_SIGNAL( in_DEPTH_UPT_TAIL     ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]);
     170        DELETE1_SIGNAL(out_DEPTH_NB_BRANCH    ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]+1);
     171        DELETE1_SIGNAL(out_DEPTH_TAIL         ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]);
    83172      }
    84173    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp

    r81 r82  
    2626    Tcontrol_t ack [_param->_nb_context];
    2727    for (uint32_t i=0; i<_param->_nb_context; i++)
    28       ack [i] = 0;
    29    
    30     for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     28      {
     29        ack [i] = 0;
     30
     31        if (_param->_have_port_depth[i])
     32          {
     33            PORT_WRITE(out_DEPTH_TAIL      [i],PORT_READ(in_DEPTH_UPT_TAIL      [i]));
     34          }
     35            PORT_WRITE(out_DEPTH_NB_BRANCH [i],PORT_READ(in_DEPTH_UPT_NB_BRANCH [i]));
     36      }
     37
     38    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    3139      {
    3240        log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"PREDICT [%d]",i);
     
    136144                        {
    137145                          branch_state = BRANCH_STATE_SPEC_NTAKE;
    138                           pc_next      = address_src+8; // +4 = delay slot
     146                          pc_next      = address_src+2; // +1 = delay slot
    139147                        }
    140148                      break;
     
    191199                    PORT_WRITE(out_PREDICT_RAS_CONTEXT_ID   [i], context);
    192200                    PORT_WRITE(out_PREDICT_RAS_PUSH         [i], push);
    193                     PORT_WRITE(out_PREDICT_RAS_ADDRESS_PUSH [i], address_src+8);
     201                    PORT_WRITE(out_PREDICT_RAS_ADDRESS_PUSH [i], address_src+2);
    194202
    195203                    is_accurate &= PORT_READ(in_PREDICT_RAS_HIT [i]); // if miss - prediction is not accurate
     
    221229//                               (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i])));
    222230
    223                 dir_val = (PORT_READ(in_PREDICT_BTB_ACK [i]) and
    224                            (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i])) and
    225                            (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i])));
    226 
    227                 ras_val = (PORT_READ(in_PREDICT_BTB_ACK [i]) and
    228                            (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i])) and
    229                            (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i])));
    230 
    231                 upt_val = (PORT_READ(in_PREDICT_BTB_ACK [i]) and
    232                            (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i])) and
    233                            (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i])));
     231                dir_val = (use_dir and
     232                           PORT_READ(in_PREDICT_BTB_ACK [i]) and
     233                           (not use_ras or (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i]))) and
     234                           (not use_upt or (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i]))));
     235
     236                ras_val = (use_ras and
     237                           PORT_READ(in_PREDICT_BTB_ACK [i]) and
     238                           (not use_dir or (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i]))) and
     239                           (not use_upt or (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i]))));
     240
     241                upt_val = (use_upt and
     242                           PORT_READ(in_PREDICT_BTB_ACK [i]) and
     243                           (not use_dir or (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i]))) and
     244                           (not use_ras or (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i]))));
    234245
    235246//              pc_next      - is previously computed
     
    238249                Taddress_t address_src_lsb  = address_src%_param->_nb_instruction [context];
    239250
     251                log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * address_src     : 0x%x",address_src);
     252                log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * address_src_lsb : %d",address_src_lsb);
    240253                if (address_src_lsb == (_param->_nb_instruction [context]-1))
    241254                  {
    242255                    // branch is in the last slot of the packet
     256                    log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * branch is in the last slot of the packet");
     257               
    243258                    address_msb        = _param->_nb_instruction [context]; // == (address_src_lsb+1)
    244259                    pc_next_is_ds_take = 1;
     
    250265                    pc_next_is_ds_take = 0;
    251266                  }
     267                log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * address_msb     : %d",address_msb);
    252268
    253269                inst_ifetch_ptr             = address_src_lsb;
    254                 branch_update_prediction_id = (PORT_READ(in_DEPTH_UPT_TAIL[context])+PORT_READ(in_DEPTH_UPT_NB_BRANCH [context]))%_param->_size_depth[context];
     270                branch_update_prediction_id = (_param->_have_port_depth[context])?((PORT_READ(in_DEPTH_UPT_TAIL[context])+PORT_READ(in_DEPTH_UPT_NB_BRANCH [context]))%_param->_size_depth[context]):0;
    255271              }
    256272            else
     
    270286              PORT_WRITE(out_PREDICT_PC_NEXT                     [context]   , pc_next                    );
    271287              PORT_WRITE(out_PREDICT_PC_NEXT_IS_DS_TAKE          [context]   , pc_next_is_ds_take         );
     288
     289              log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"  * instruction enable :");
     290              log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * nb_inst : %d",_param->_nb_instruction [context]);
     291              log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * [0:%d[ = 0",address_lsb);
     292              log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * [%d:%d[ = 1",address_lsb,((pc_current_is_ds_take)?1:address_msb));
     293              log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * [%d:%d[ = 0",((pc_current_is_ds_take)?1:address_msb),_param->_nb_instruction [context]);
     294
    272295              for (uint32_t j=0; j<address_lsb; j++)
    273296              PORT_WRITE(out_PREDICT_INSTRUCTION_ENABLE          [context][j], 0); // Before the address : not valid
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_transition.cpp

    r81 r82  
    2727      {
    2828        reg_PREDICT_PRIORITY = 0;
     29        reg_DECOD_PRIORITY   = 0;
    2930      }
    3031    else
    3132      {
    3233        // Round robin priority
    33         reg_PREDICT_PRIORITY = (reg_PREDICT_PRIORITY+_param->_nb_inst_predict)%_param->_nb_context;
     34        reg_PREDICT_PRIORITY = (reg_PREDICT_PRIORITY+_param->_nb_inst_branch_predict)%_param->_nb_context;
     35        reg_DECOD_PRIORITY   = (reg_DECOD_PRIORITY  +1)%_param->_nb_decod_unit;
    3436      }
    3537#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  16
     10#define CYCLE_MAX     (1024*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Behavioural/include/Allocation.h"
    12 
    13 #define NB_ITERATION  16
    14 #define CYCLE_MAX     (1024*NB_ITERATION)
    15 
    16 #define LABEL(str...)                                                   \
    17   {                                                                     \
    18     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    19     msg (str);                                                          \
    20     msg (_("\n"));                                                      \
    21   } while(0)
    22 
    23 #define SC_START(cycle_offset)                                          \
    24   do                                                                    \
    25     {                                                                   \
    26       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
    27       if (cycle_offset != 0)                                            \
    28         {                                                               \
    29           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]"; \
    30           cout << " (" << __LINE__ << ")" << endl;                      \
    31         }                                                               \
    32                                                                         \
    33       if (cycle_current > CYCLE_MAX)                                    \
    34         {                                                               \
    35           TEST_KO("Maximal cycles Reached");                            \
    36         }                                                               \
    37                                                                         \
    38       sc_start(cycle_offset);                                           \
    39                                                                         \
    40     } while(0)
    4115
    4216void test (string name,
     
    4923#endif
    5024
    51   Return_Address_Stack * _Return_Address_Stack = new Return_Address_Stack (name.c_str(),
     25  Return_Address_Stack * _Return_Address_Stack = new Return_Address_Stack
     26    (name.c_str(),
    5227#ifdef STATISTICS
    53                                              _parameters_statistics,
     28     _parameters_statistics,
    5429#endif
    55                                              _param);
     30     _param,
     31     USE_ALL);
    5632 
    5733#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Return_Address_Stack.h

    r81 r82  
    128128#endif
    129129   Parameters                                  * param,
    130    morpheo::behavioural::Tusage_t                usage=USE_ALL
     130   morpheo::behavioural::Tusage_t                usage
    131131   );
    132132  public  :          ~Return_Address_Stack             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_mono_context.cfg

    r81 r82  
    11Prediction_unit
     21       1       +1 # nb_context                 
     31       1       +1 # nb_decod_unit             
     430      30      +1 # size_address               
     51       4       *4 # nb_instruction             [0] [nb_context]
     61       1       +1 # nb_inst_decod              [0] [nb_decod_unit]
     71       1       +1 # nb_inst_branch_predict     
     81       1       +1 # nb_inst_branch_decod       
     91       1       +1 # nb_inst_branch_update     
     101       1       +1 # nb_inst_branch_complete   
     112       8       *4 # btb_size_queue             
     122       2       +1 # btb_associativity         
     132       2       +1 # btb_size_counter           
     143       3       +1 # btb_victim_scheme         
     151       1       +1 # dir_predictor_scheme       
     161       1       +1 # dir_have_bht               [0] [3]
     171       1       +1 # dir_have_bht               [1] [3]
     181       1       +1 # dir_have_bht               [2] [3]
     191       1       +1 # dir_bht_size_shifter       [0] [3]
     201       1       +1 # dir_bht_size_shifter       [1] [3]
     211       1       +1 # dir_bht_size_shifter       [2] [3]
     221       1       +1 # dir_bht_nb_shifter         [0] [3]
     231       1       +1 # dir_bht_nb_shifter         [1] [3]
     241       1       +1 # dir_bht_nb_shifter         [2] [3]
     251       1       +1 # dir_have_pht               [0] [3]
     261       1       +1 # dir_have_pht               [1] [3]
     271       1       +1 # dir_have_pht               [2] [3]
     281       1       +1 # dir_pht_size_counter       [0] [3]
     291       1       +1 # dir_pht_size_counter       [1] [3]
     301       1       +1 # dir_pht_size_counter       [2] [3]
     311       1       +1 # dir_pht_nb_counter         [0] [3]
     321       1       +1 # dir_pht_nb_counter         [1] [3]
     331       1       +1 # dir_pht_nb_counter         [2] [3]
     341       1       +1 # dir_pht_size_address_share [0] [3]
     351       1       +1 # dir_pht_size_address_share [1] [3]
     361       1       +1 # dir_pht_size_address_share [2] [3]
     372       4       *2 # ras_size_queue             [0] [nb_context]
     381       4       *4 # upt_size_queue             [0] [nb_context]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/main.cpp

    r81 r82  
    88#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/include/test.h"
    99
    10 #define NB_PARAMS 0
     10#define NB_PARAMS (12+3*7)
    1111
    1212void usage (int argc, char * argv[])
     
    1414  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
    1515  err (_("list_params is :\n"));
    16   err (_(" * ()\n"));
     16  err (_(" * nb_context                                (uint32_t    )\n"));
     17  err (_(" * nb_decod_unit                             (uint32_t    )\n"));
     18  err (_(" * size_address                              (uint32_t    )\n"));
     19  err (_(" * nb_instruction             [nb_context]   (uint32_t    )\n"));
     20  err (_(" * nb_inst_decod              [nb_decod_unit](uint32_t    )\n"));
     21  err (_(" * nb_inst_branch_predict                    (uint32_t    )\n"));
     22  err (_(" * nb_inst_branch_decod                      (uint32_t    )\n"));
     23  err (_(" * nb_inst_branch_update                     (uint32_t    )\n"));
     24  err (_(" * nb_inst_branch_complete                   (uint32_t    )\n"));
     25  err (_(" * btb_size_queue                            (uint32_t    )\n"));
     26  err (_(" * btb_associativity                         (uint32_t    )\n"));
     27  err (_(" * btb_size_counter                          (uint32_t    )\n"));
     28  err (_(" * btb_victim_scheme                         (Tvictim_t   )\n"));
     29  err (_(" * dir_predictor_scheme                      (Tpredictor_t)\n"));
     30  err (_(" * dir_have_bht               [3]            (bool        )\n"));
     31  err (_(" * dir_bht_size_shifter       [3]            (uint32_t    )\n"));
     32  err (_(" * dir_bht_nb_shifter         [3]            (uint32_t    )\n"));
     33  err (_(" * dir_have_pht               [3]            (bool        )\n"));
     34  err (_(" * dir_pht_size_counter       [3]            (uint32_t    )\n"));
     35  err (_(" * dir_pht_nb_counter         [3]            (uint32_t    )\n"));
     36  err (_(" * dir_pht_size_address_share [3]            (uint32_t    )\n"));
     37  err (_(" * ras_size_queue             [nb_context]   (uint32_t    )\n"));
     38  err (_(" * upt_size_queue             [nb_context]   (uint32_t    )\n"));
    1739
    1840  exit (1);
     
    2547#endif
    2648{
    27   if (argc != static_cast<int>(2+NB_PARAMS))
     49  if (argc < static_cast<int>(2+NB_PARAMS))
    2850    usage (argc, argv);
    2951
     
    3153
    3254  string name = argv[x++];
    33 //const uint32_t size_data = atoi(argv[x++]);
    34 //const uint32_t nb_port   = atoi(argv[x++]);
     55  uint32_t     _nb_context                     = fromString<uint32_t>(argv[x++]);
     56  uint32_t     _nb_decod_unit                  = fromString<uint32_t>(argv[x++]);
     57  uint32_t     _size_address                   = fromString<uint32_t>(argv[x++]);
     58
     59  if (argc != static_cast<int>(2+NB_PARAMS+3*_nb_context+_nb_decod_unit))
     60    usage (argc, argv);
     61
     62  uint32_t *   _nb_instruction                 = new uint32_t [_nb_context];
     63  for (uint32_t i=0; i<_nb_context; i++)
     64    _nb_instruction [i]                        = fromString<uint32_t    >(argv[x++]);
     65  uint32_t *   _nb_inst_decod                  = new uint32_t [_nb_decod_unit];
     66  for (uint32_t i=0; i<_nb_decod_unit; i++)
     67    _nb_inst_decod [i]                         = fromString<uint32_t    >(argv[x++]);
     68  uint32_t     _nb_inst_branch_predict         = fromString<uint32_t    >(argv[x++]);
     69  uint32_t     _nb_inst_branch_decod           = fromString<uint32_t    >(argv[x++]);
     70  uint32_t     _nb_inst_branch_update          = fromString<uint32_t    >(argv[x++]);
     71  uint32_t     _nb_inst_branch_complete        = fromString<uint32_t    >(argv[x++]);
     72  uint32_t     _btb_size_queue                 = fromString<uint32_t    >(argv[x++]);
     73  uint32_t     _btb_associativity              = fromString<uint32_t    >(argv[x++]);
     74  uint32_t     _btb_size_counter               = fromString<uint32_t    >(argv[x++]);
     75  Tvictim_t    _btb_victim_scheme              = fromString<Tvictim_t   >(argv[x++]);
     76  Tpredictor_t _dir_predictor_scheme           = fromString<Tpredictor_t>(argv[x++]);
     77  bool         _dir_have_bht               [3];
     78  for (uint32_t i=0; i<3; i++)
     79    _dir_have_bht [i]                          = fromString<bool        >(argv[x++]);
     80  uint32_t     _dir_bht_size_shifter       [3];
     81  for (uint32_t i=0; i<3; i++)
     82    _dir_bht_size_shifter [i]                  = fromString<uint32_t    >(argv[x++]);
     83  uint32_t     _dir_bht_nb_shifter         [3];
     84  for (uint32_t i=0; i<3; i++)
     85    _dir_bht_nb_shifter [i]                    = fromString<uint32_t    >(argv[x++]);
     86  bool         _dir_have_pht               [3];
     87  for (uint32_t i=0; i<3; i++)
     88    _dir_have_pht [i]                          = fromString<bool        >(argv[x++]);
     89  uint32_t     _dir_pht_size_counter       [3];
     90  for (uint32_t i=0; i<3; i++)
     91    _dir_pht_size_counter [i]                  = fromString<uint32_t    >(argv[x++]);
     92  uint32_t     _dir_pht_nb_counter         [3];
     93  for (uint32_t i=0; i<3; i++)
     94    _dir_pht_nb_counter [i]                    = fromString<uint32_t    >(argv[x++]);
     95  uint32_t     _dir_pht_size_address_share [3];
     96  for (uint32_t i=0; i<3; i++)
     97    _dir_pht_size_address_share [i]            = fromString<uint32_t    >(argv[x++]);
     98  uint32_t *   _ras_size_queue                 = new uint32_t    [_nb_context];
     99  for (uint32_t i=0; i<_nb_context; i++)
     100    _ras_size_queue [i]                        = fromString<uint32_t    >(argv[x++]);
     101  uint32_t *   _upt_size_queue                 = new uint32_t    [_nb_context];
     102  for (uint32_t i=0; i<_nb_context; i++)
     103    _upt_size_queue [i]                        = fromString<uint32_t    >(argv[x++]);
    35104
    36105  int _return = EXIT_SUCCESS;
     
    38107    {
    39108      morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Parameters
    40         (//size_data,
    41          //nb_port 
    42         );
     109        (_nb_context                ,
     110         _nb_decod_unit             ,
     111         _size_address              ,
     112         _nb_instruction            ,
     113         _nb_inst_decod             ,
     114         _nb_inst_branch_predict    ,
     115         _nb_inst_branch_decod      ,
     116         _nb_inst_branch_update     ,
     117         _nb_inst_branch_complete   ,
     118         _btb_size_queue            ,
     119         _btb_associativity         ,
     120         _btb_size_counter          ,
     121         _btb_victim_scheme         ,
     122         _dir_predictor_scheme      ,
     123         _dir_have_bht              ,
     124         _dir_bht_size_shifter      ,
     125         _dir_bht_nb_shifter        ,
     126         _dir_have_pht              ,
     127         _dir_pht_size_counter      ,
     128         _dir_pht_nb_counter        ,
     129         _dir_pht_size_address_share,
     130         _ras_size_queue            ,
     131         _upt_size_queue           
     132         );
    43133     
    44134      msg(_("%s"),param->print(1).c_str());
     
    57147    }
    58148
     149  delete [] _nb_instruction            ;
     150  delete [] _nb_inst_decod             ;
     151  delete [] _ras_size_queue            ;
     152  delete [] _upt_size_queue            ;
     153
    59154  return (_return);
    60155}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/test.cpp

    r81 r82  
    2323#endif
    2424
    25   Prediction_unit * _Prediction_unit = new Prediction_unit (name.c_str(),
     25  Prediction_unit * _Prediction_unit = new Prediction_unit
     26    (name.c_str(),
    2627#ifdef STATISTICS
    27                                              _parameters_statistics,
    28 #endif
    29                                              _param);
     28     _parameters_statistics,
     29#endif
     30     _param,
     31     USE_ALL);
    3032 
    3133#ifdef SYSTEMC
     
    3739  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);         
    3840  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
     41
     42
     43  ALLOC1_SC_SIGNAL( in_PREDICT_VAL                        ," in_PREDICT_VAL                        ",Tcontrol_t         ,_param->_nb_context);
     44  ALLOC1_SC_SIGNAL(out_PREDICT_ACK                        ,"out_PREDICT_ACK                        ",Tcontrol_t         ,_param->_nb_context);
     45  ALLOC1_SC_SIGNAL( in_PREDICT_PC_PREVIOUS                ," in_PREDICT_PC_PREVIOUS                ",Taddress_t         ,_param->_nb_context);
     46  ALLOC1_SC_SIGNAL( in_PREDICT_PC_CURRENT                 ," in_PREDICT_PC_CURRENT                 ",Taddress_t         ,_param->_nb_context);
     47  ALLOC1_SC_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE      ," in_PREDICT_PC_CURRENT_IS_DS_TAKE      ",Tcontrol_t         ,_param->_nb_context);
     48  ALLOC1_SC_SIGNAL(out_PREDICT_PC_NEXT                    ,"out_PREDICT_PC_NEXT                    ",Taddress_t         ,_param->_nb_context);
     49  ALLOC1_SC_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE         ,"out_PREDICT_PC_NEXT_IS_DS_TAKE         ",Tcontrol_t         ,_param->_nb_context);
     50  ALLOC2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE         ,"out_PREDICT_INSTRUCTION_ENABLE         ",Tcontrol_t         ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
     51  ALLOC1_SC_SIGNAL(out_PREDICT_INST_IFETCH_PTR            ,"out_PREDICT_INST_IFETCH_PTR            ",Tinst_ifetch_ptr_t ,_param->_nb_context);
     52  ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_STATE               ,"out_PREDICT_BRANCH_STATE               ",Tbranch_state_t    ,_param->_nb_context);
     53  ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"out_PREDICT_BRANCH_UPDATE_PREDICTION_ID",Tprediction_ptr_t  ,_param->_nb_context);
     54                                                                                                                         
     55  ALLOC2_SC_SIGNAL( in_DECOD_VAL                          ," in_DECOD_VAL                          ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     56  ALLOC2_SC_SIGNAL(out_DECOD_ACK                          ,"out_DECOD_ACK                          ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     57  ALLOC2_SC_SIGNAL( in_DECOD_CONTEXT_ID                   ," in_DECOD_CONTEXT_ID                   ",Tcontext_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     58  ALLOC2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR        ," in_DECOD_MATCH_INST_IFETCH_PTR        ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     59  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_STATE                 ," in_DECOD_BRANCH_STATE                 ",Tbranch_state_t    ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     60  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID  ," in_DECOD_BRANCH_UPDATE_PREDICTION_ID  ",Tprediction_ptr_t  ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     61  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION             ," in_DECOD_BRANCH_CONDITION             ",Tbranch_condition_t,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     62  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION             ," in_DECOD_BRANCH_DIRECTION             ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     63  ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_SRC                  ," in_DECOD_ADDRESS_SRC                  ",Taddress_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     64  ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_DEST                 ," in_DECOD_ADDRESS_DEST                 ",Taddress_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     65                                                                                                                         
     66  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL                ," in_BRANCH_COMPLETE_VAL                ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
     67  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ACK                ,"out_BRANCH_COMPLETE_ACK                ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
     68  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_CONTEXT_ID         ," in_BRANCH_COMPLETE_CONTEXT_ID         ",Tcontext_t         ,_param->_nb_inst_branch_complete);
     69  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH              ," in_BRANCH_COMPLETE_DEPTH              ",Tdepth_t           ,_param->_nb_inst_branch_complete);
     70  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS            ," in_BRANCH_COMPLETE_ADDRESS            ",Taddress_t         ,_param->_nb_inst_branch_complete);
     71  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_FLAG               ," in_BRANCH_COMPLETE_FLAG               ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
     72  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION    ,"out_BRANCH_COMPLETE_MISS_PREDICTION    ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
     73  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE               ,"out_BRANCH_COMPLETE_TAKE               ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
     74  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC        ,"out_BRANCH_COMPLETE_ADDRESS_SRC        ",Taddress_t         ,_param->_nb_inst_branch_complete);
     75  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST       ,"out_BRANCH_COMPLETE_ADDRESS_DEST       ",Taddress_t         ,_param->_nb_inst_branch_complete);
     76                                                                                                                         
     77  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_VAL                   ,"out_BRANCH_EVENT_VAL                   ",Tcontrol_t         ,_param->_nb_context);
     78  ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_ACK                   ," in_BRANCH_EVENT_ACK                   ",Tcontrol_t         ,_param->_nb_context);
     79//ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID            ,"out_BRANCH_EVENT_CONTEXT_ID            ",Tcontext_t         ,_param->_nb_context);
     80//ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH                 ,"out_BRANCH_EVENT_DEPTH                 ",Tdepth_t           ,_param->_nb_context);
     81//ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION       ,"out_BRANCH_EVENT_MISS_PREDICTION       ",Tcontrol_t         ,_param->_nb_context);
     82  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC           ,"out_BRANCH_EVENT_ADDRESS_SRC           ",Taddress_t         ,_param->_nb_context);
     83  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST          ,"out_BRANCH_EVENT_ADDRESS_DEST          ",Taddress_t         ,_param->_nb_context);
     84                                                                                                                         
     85  ALLOC1_SC_SIGNAL(out_DEPTH_NB_BRANCH                    ,"out_DEPTH_NB_BRANCH                    ",Tdepth_t           ,_param->_nb_context);
     86  ALLOC1_SC_SIGNAL(out_DEPTH_TAIL                         ,"out_DEPTH_TAIL                         ",Tdepth_t           ,_param->_nb_context);
    3987 
    4088  /********************************************************
     
    4795  (*(_Prediction_unit->in_NRESET))       (*(in_NRESET));
    4896
     97  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_VAL                        ,_param->_nb_context);
     98  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_ACK                        ,_param->_nb_context);
     99  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_PC_PREVIOUS                ,_param->_nb_context);
     100  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_PC_CURRENT                 ,_param->_nb_context);
     101  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_PC_CURRENT_IS_DS_TAKE      ,_param->_nb_context);
     102  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_PC_NEXT                    ,_param->_nb_context);
     103  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_PC_NEXT_IS_DS_TAKE         ,_param->_nb_context);
     104  INSTANCE2_SC_SIGNAL(_Prediction_unit,out_PREDICT_INSTRUCTION_ENABLE         ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
     105  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_BRANCH_STATE               ,_param->_nb_context);
     106
     107  for (uint32_t i=0; i<_param->_nb_context; i++)
     108    {
     109      if (_param->_have_port_inst_ifetch_ptr [i])
     110        INSTANCE_SC_SIGNAL(_Prediction_unit,out_PREDICT_INST_IFETCH_PTR [i]);
     111      if (_param->_have_port_depth [i])
     112        INSTANCE_SC_SIGNAL(_Prediction_unit,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i]);
     113    }
     114
     115  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_VAL                          ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     116  INSTANCE2_SC_SIGNAL(_Prediction_unit,out_DECOD_ACK                          ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     117  if (_param->_have_port_context_id)
     118  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_CONTEXT_ID                   ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     119  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_MATCH_INST_IFETCH_PTR        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     120  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_STATE                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     121  if (_param->_have_port_max_depth)
     122  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_UPDATE_PREDICTION_ID  ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     123  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_CONDITION             ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     124  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_DIRECTION             ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     125  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_ADDRESS_SRC                  ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     126  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_ADDRESS_DEST                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     127
     128  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_VAL                ,_param->_nb_inst_branch_complete);
     129  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ACK                ,_param->_nb_inst_branch_complete);
     130  if (_param->_have_port_context_id)
     131  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_CONTEXT_ID         ,_param->_nb_inst_branch_complete);
     132  if (_param->_have_port_max_depth)
     133  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_DEPTH              ,_param->_nb_inst_branch_complete);
     134  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_ADDRESS            ,_param->_nb_inst_branch_complete);
     135  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_FLAG               ,_param->_nb_inst_branch_complete);
     136  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_MISS_PREDICTION    ,_param->_nb_inst_branch_complete);
     137  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_TAKE               ,_param->_nb_inst_branch_complete);
     138  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_SRC        ,_param->_nb_inst_branch_complete);
     139  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_DEST       ,_param->_nb_inst_branch_complete);
     140
     141  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_VAL                   ,_param->_nb_context);
     142  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_EVENT_ACK                   ,_param->_nb_context);
     143//if (_param->_have_port_context_id)
     144//INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_CONTEXT_ID            ,_param->_nb_context);
     145//INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_DEPTH                 ,_param->_nb_context);
     146//INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_MISS_PREDICTION       ,_param->_nb_context);
     147  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_ADDRESS_SRC           ,_param->_nb_context);
     148  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_ADDRESS_DEST          ,_param->_nb_context);
     149
     150  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_NB_BRANCH                    ,_param->_nb_context);
     151  for (uint32_t i=0; i<_param->_nb_context; i++)
     152    if (_param->_have_port_depth[i])
     153      INSTANCE_SC_SIGNAL(_Prediction_unit,out_DEPTH_TAIL [i]);
    49154
    50155  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    91196  delete in_CLOCK;
    92197  delete in_NRESET;
     198
     199  DELETE1_SC_SIGNAL( in_PREDICT_VAL                        ,_param->_nb_context);
     200  DELETE1_SC_SIGNAL(out_PREDICT_ACK                        ,_param->_nb_context);
     201  DELETE1_SC_SIGNAL( in_PREDICT_PC_PREVIOUS                ,_param->_nb_context);
     202  DELETE1_SC_SIGNAL( in_PREDICT_PC_CURRENT                 ,_param->_nb_context);
     203  DELETE1_SC_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE      ,_param->_nb_context);
     204  DELETE1_SC_SIGNAL(out_PREDICT_PC_NEXT                    ,_param->_nb_context);
     205  DELETE1_SC_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE         ,_param->_nb_context);
     206  DELETE1_SC_SIGNAL(out_PREDICT_INST_IFETCH_PTR            ,_param->_nb_context);
     207  DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_STATE               ,_param->_nb_context);
     208  DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context);
     209
     210  DELETE2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE       ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
     211  DELETE2_SC_SIGNAL( in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     212  DELETE2_SC_SIGNAL(out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     213  DELETE2_SC_SIGNAL( in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     214  DELETE2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     215  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     216  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     217  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     218  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     219  DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     220  DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     221
     222  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL            ,_param->_nb_inst_branch_complete);
     223  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ACK            ,_param->_nb_inst_branch_complete);
     224  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_CONTEXT_ID     ,_param->_nb_inst_branch_complete);
     225  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH          ,_param->_nb_inst_branch_complete);
     226  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS        ,_param->_nb_inst_branch_complete);
     227  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_FLAG           ,_param->_nb_inst_branch_complete);
     228  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete);
     229  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE           ,_param->_nb_inst_branch_complete);
     230  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC    ,_param->_nb_inst_branch_complete);
     231  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST   ,_param->_nb_inst_branch_complete);
     232
     233  DELETE1_SC_SIGNAL(out_BRANCH_EVENT_VAL            ,_param->_nb_context);
     234  DELETE1_SC_SIGNAL( in_BRANCH_EVENT_ACK            ,_param->_nb_context);
     235//DELETE1_SC_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID     ,_param->_nb_context);
     236//DELETE1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH          ,_param->_nb_context);
     237//DELETE1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context);
     238  DELETE1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC    ,_param->_nb_context);
     239  DELETE1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST   ,_param->_nb_context);
     240
     241  DELETE1_SC_SIGNAL(out_DEPTH_NB_BRANCH    ,_param->_nb_context);
     242  DELETE1_SC_SIGNAL(out_DEPTH_TAIL         ,_param->_nb_context);
    93243#endif
    94244
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp

    r81 r82  
    7171  ALLOC1_SC_SIGNAL( in_DECOD_RAS_ADDRESS              ," in_DECOD_RAS_ADDRESS              ",Taddress_t         ,_param->_nb_inst_decod);
    7272  ALLOC1_SC_SIGNAL( in_DECOD_RAS_INDEX                ," in_DECOD_RAS_INDEX                ",Tptr_t             ,_param->_nb_inst_decod);
    73   ALLOC1_SC_SIGNAL( in_DECOD_MISS_PREDICTION          ," in_DECOD_MISS_PREDICTION          ",Tcontrol_t         ,_param->_nb_inst_decod);
     73  ALLOC1_SC_SIGNAL( in_DECOD_MISS_IFETCH              ," in_DECOD_MISS_IFETCH              ",Tcontrol_t         ,_param->_nb_inst_decod);
     74  ALLOC1_SC_SIGNAL( in_DECOD_MISS_DECOD               ," in_DECOD_MISS_DECOD               ",Tcontrol_t         ,_param->_nb_inst_decod);
    7475  ALLOC1_SC_SIGNAL( in_DECOD_UPDATE_PREDICTION_ID     ," in_DECOD_UPDATE_PREDICTION_ID     ",Tprediction_ptr_t  ,_param->_nb_inst_decod);
    7576//ALLOC1_SC_SIGNAL(out_DECOD_DEPTH                    ,"out_DECOD_DEPTH                    ",Tdepth_t           ,_param->_nb_inst_decod);
     77
    7678  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL            ," in_BRANCH_COMPLETE_VAL            ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
    7779  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ACK            ,"out_BRANCH_COMPLETE_ACK            ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
     
    8486  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC    ,"out_BRANCH_COMPLETE_ADDRESS_SRC    ",Taddress_t         ,_param->_nb_inst_branch_complete);
    8587  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST   ,"out_BRANCH_COMPLETE_ADDRESS_DEST   ",Taddress_t         ,_param->_nb_inst_branch_complete);
     88
     89  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_VAL            ,"out_BRANCH_EVENT_VAL            ",Tcontrol_t         ,_param->_nb_context);
     90  ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_ACK            ," in_BRANCH_EVENT_ACK            ",Tcontrol_t         ,_param->_nb_context);
     91//   ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_CONTEXT_ID     ," in_BRANCH_EVENT_CONTEXT_ID     ",Tcontext_t         ,_param->_nb_context);
     92//   ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_DEPTH          ," in_BRANCH_EVENT_DEPTH          ",Tdepth_t           ,_param->_nb_context);
     93//   ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION,"out_BRANCH_EVENT_MISS_PREDICTION",Tcontrol_t         ,_param->_nb_context);
     94  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC    ,"out_BRANCH_EVENT_ADDRESS_SRC    ",Taddress_t         ,_param->_nb_context);
     95  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST   ,"out_BRANCH_EVENT_ADDRESS_DEST   ",Taddress_t         ,_param->_nb_context);
     96
    8697  ALLOC1_SC_SIGNAL(out_UPDATE_VAL                     ,"out_UPDATE_VAL                     ",Tcontrol_t         ,_param->_nb_inst_update);
    8798  ALLOC1_SC_SIGNAL( in_UPDATE_ACK                     ," in_UPDATE_ACK                     ",Tcontrol_t         ,_param->_nb_inst_update);
     
    96107  ALLOC1_SC_SIGNAL(out_UPDATE_DIR_HISTORY             ,"out_UPDATE_DIR_HISTORY             ",Thistory_t         ,_param->_nb_inst_update);
    97108  ALLOC1_SC_SIGNAL(out_UPDATE_RAS_VAL                 ,"out_UPDATE_RAS_VAL                 ",Tcontrol_t         ,_param->_nb_inst_update);
     109  ALLOC1_SC_SIGNAL(out_UPDATE_RAS_PUSH                ,"out_UPDATE_RAS_PUSH                ",Tcontrol_t         ,_param->_nb_inst_update);
    98110  ALLOC1_SC_SIGNAL(out_UPDATE_RAS_ADDRESS             ,"out_UPDATE_RAS_ADDRESS             ",Taddress_t         ,_param->_nb_inst_update);
    99111  ALLOC1_SC_SIGNAL(out_UPDATE_RAS_INDEX               ,"out_UPDATE_RAS_INDEX               ",Tptr_t             ,_param->_nb_inst_update);
     
    136148  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_RAS_ADDRESS              ,_param->_nb_inst_decod);
    137149  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_RAS_INDEX                ,_param->_nb_inst_decod);
    138   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_MISS_PREDICTION          ,_param->_nb_inst_decod);
    139   if (_param->_have_port_depth)
     150  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_MISS_IFETCH              ,_param->_nb_inst_decod);
     151  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_MISS_DECOD               ,_param->_nb_inst_decod);
     152  if (_param->_have_port_max_depth)
    140153  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_UPDATE_PREDICTION_ID     ,_param->_nb_inst_decod);
    141154//if (_param->_have_port_depth)
     
    145158  if (_param->_have_port_context_id)
    146159  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_CONTEXT_ID     ,_param->_nb_inst_branch_complete);
    147   if (_param->_have_port_depth)
     160  if (_param->_have_port_max_depth)
    148161  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_DEPTH          ,_param->_nb_inst_branch_complete);
    149162  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_ADDRESS        ,_param->_nb_inst_branch_complete);
     
    153166  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_ADDRESS_SRC    ,_param->_nb_inst_branch_complete);
    154167  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_ADDRESS_DEST   ,_param->_nb_inst_branch_complete);
     168
     169  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_VAL            ,_param->_nb_context);
     170  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_ACK            ,_param->_nb_context);
     171//   if (_param->_have_port_context_id)
     172//   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_CONTEXT_ID     ,_param->_nb_context);
     173//   if (_param->_have_port_max_depth)
     174//   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_DEPTH          ,_param->_nb_context);
     175//   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_ADDRESS        ,_param->_nb_context);
     176//   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context);
     177  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_ADDRESS_SRC    ,_param->_nb_context);
     178  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_ADDRESS_DEST   ,_param->_nb_context);
     179
    155180  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_VAL                     ,_param->_nb_inst_update);
    156181  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_UPDATE_ACK                     ,_param->_nb_inst_update);
     
    167192  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_DIR_HISTORY             ,_param->_nb_inst_update);
    168193  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_VAL                 ,_param->_nb_inst_update);
     194  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_PUSH                ,_param->_nb_inst_update);
    169195  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_ADDRESS             ,_param->_nb_inst_update);
    170196  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_INDEX               ,_param->_nb_inst_update);
    171197  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_PREDICTION_IFETCH   ,_param->_nb_inst_update);
    172   if (_param->_have_port_depth)
    173   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_NB_BRANCH                ,_param->_nb_context);
    174   if (_param->_have_port_depth)
    175   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_TAIL                     ,_param->_nb_context);
     198  for (uint32_t i=0; i<_param->_nb_context; i++)
     199    {
     200      if (_param->_have_port_depth[i])
     201        {
     202          INSTANCE_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_TAIL      [i]);
     203        }
     204      INSTANCE_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_NB_BRANCH [i]);
     205    }
    176206
    177207  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    202232  SC_START(5);
    203233  in_NRESET->write(1); 
     234
     235  for (uint32_t i=0; i<_param->_nb_context; i++)
     236    {
     237      PORT_WRITE(in_BRANCH_EVENT_ACK [i],1);
     238    }
    204239
    205240  LABEL("Loop of Test");
     
    236271                  in_PREDICT_RAS_INDEX        [port]->write((0x12345678+i)%_param->_size_ras_index[context]);
    237272                 
    238                   if (_param->_have_port_depth)
     273                  if (_param->_have_port_depth[context])
    239274                    {
    240275                      TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
     276                    }
    241277                      TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i);
    242                     }
     278                     
    243279                  SC_START(0);
    244280                 
     
    256292              in_PREDICT_VAL              [port]->write(0);
    257293             
    258               if (_param->_have_port_depth)
     294              if (_param->_have_port_depth[context])
    259295                {
    260296                  TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
     297                }
    261298                  TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i+1);
    262                 }
     299
    263300            }
    264301        }
     
    283320                  in_DECOD_RAS_ADDRESS          [port]->write(0xdeaddead+i);
    284321                  in_DECOD_RAS_INDEX            [port]->write((0x12345678+i)%_param->_size_ras_index[context]);
    285                   in_DECOD_MISS_PREDICTION      [port]->write(false);
     322                  in_DECOD_MISS_IFETCH          [port]->write(false);
     323                  in_DECOD_MISS_DECOD           [port]->write(false);
    286324                  in_DECOD_UPDATE_PREDICTION_ID [port]->write(i);
    287325                 
    288                   if (_param->_have_port_depth)
     326                  if (_param->_have_port_depth[context])
    289327                    {
    290328                      TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
     329                    }
    291330                      TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
    292                     }
    293331                 
    294332                  SC_START(0);
     
    307345              in_DECOD_VAL              [port]->write(0);
    308346             
    309               if (_param->_have_port_depth)
     347              if (_param->_have_port_depth[context])
    310348                {
    311349                  TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
     350                }
    312351                  TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
    313                 }
    314352            }
    315353        }
     
    331369                  in_BRANCH_COMPLETE_FLAG                 [port]->write(1);
    332370                 
    333                   if (_param->_have_port_depth)
     371                  if (_param->_have_port_depth[context])
    334372                    {
    335373                      TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
     374                    }
    336375                      TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
    337                     }
    338376                 
    339377                  SC_START(0);
     
    357395              in_BRANCH_COMPLETE_VAL              [port]->write(0);
    358396             
    359               if (_param->_have_port_depth)
     397              if (_param->_have_port_depth[context])
    360398                {
    361399                  TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
     400                }
    362401                  TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
    363                 }
    364402            }
    365403        }
     
    396434                        TEST(Thistory_t         ,out_UPDATE_DIR_HISTORY           [port]->read(), i);
    397435                      TEST(Tcontrol_t         ,out_UPDATE_RAS_VAL               [port]->read(), 0);
     436                      TEST(Tcontrol_t         ,out_UPDATE_RAS_PUSH              [port]->read(), 0);
    398437                      TEST(Taddress_t         ,out_UPDATE_RAS_ADDRESS           [port]->read(), 0xdeaddead+i);
    399438                      TEST(Tptr_t             ,out_UPDATE_RAS_INDEX             [port]->read(), (0x12345678+i)%_param->_size_ras_index[context]);
     
    411450 
    412451          // wait the garbage collector
    413           if (_param->_have_port_depth)
    414             while ((out_DEPTH_TAIL     [context]->read() != 0) and
    415                    (out_DEPTH_NB_BRANCH[context]->read() != 0))
    416               {
    417                 LABEL("DEPTH [%d] nb_branch : %d - tail : %d",context,out_DEPTH_NB_BRANCH[context]->read(), out_DEPTH_TAIL [context]->read());
    418                 SC_START(1);
    419               }
     452          while ((not (_param->_have_port_depth[context]) or (out_DEPTH_TAIL     [context]->read() != 0)) and
     453                 (out_DEPTH_NB_BRANCH[context]->read() != 0))
     454            {
     455              LABEL("DEPTH [%d] nb_branch : %d - tail : %d",context,out_DEPTH_NB_BRANCH[context]->read(), out_DEPTH_TAIL [context]->read());
     456              SC_START(1);
     457            }
    420458        }
    421459      }
     
    448486                  in_PREDICT_RAS_INDEX        [port]->write((0x12345678+i)%_param->_size_ras_index[context]);
    449487                 
    450                   if (_param->_have_port_depth)
     488                  if (_param->_have_port_depth[context])
    451489                    {
    452490                      TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
     491                    }
    453492                      TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i);
    454                     }
     493
    455494                  SC_START(0);
    456495                 
     
    468507              in_PREDICT_VAL              [port]->write(0);
    469508             
    470               if (_param->_have_port_depth)
     509              if (_param->_have_port_depth[context])
    471510                {
    472511                  TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
     512                }
    473513                  TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i+1);
    474                 }
    475514            }
    476515        }
     
    495534                  in_DECOD_RAS_ADDRESS          [port]->write(0xdeaddead+i);
    496535                  in_DECOD_RAS_INDEX            [port]->write((0x12345678+i)%_param->_size_ras_index[context]);
    497                   in_DECOD_MISS_PREDICTION      [port]->write(false);
     536                  in_DECOD_MISS_IFETCH          [port]->write(false);
     537                  in_DECOD_MISS_DECOD           [port]->write(false);
    498538                  in_DECOD_UPDATE_PREDICTION_ID [port]->write(i);
    499539                 
    500                   if (_param->_have_port_depth)
     540                  if (_param->_have_port_depth[context])
    501541                    {
    502542                      TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
     543                    }
    503544                      TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
    504                     }
    505545                 
    506546                  SC_START(0);
     
    519559              in_DECOD_VAL              [port]->write(0);
    520560             
    521               if (_param->_have_port_depth)
     561              if (_param->_have_port_depth[context])
    522562                {
    523563                  TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
     564                }
    524565                  TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
    525                 }
    526566            }
    527567        }
     
    543583                  in_BRANCH_COMPLETE_FLAG                 [port]->write(0);
    544584                 
    545                   if (_param->_have_port_depth)
     585                  if (_param->_have_port_depth[context])
    546586                    {
    547587                      TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
     588                    }
    548589                      TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
    549                     }
    550590                 
    551591                  SC_START(0);
     
    604644                        TEST(Thistory_t         ,out_UPDATE_DIR_HISTORY           [port]->read(), i);
    605645                      TEST(Tcontrol_t         ,out_UPDATE_RAS_VAL               [port]->read(), 0);
     646                      TEST(Tcontrol_t         ,out_UPDATE_RAS_PUSH              [port]->read(), 0);
    606647                      TEST(Taddress_t         ,out_UPDATE_RAS_ADDRESS           [port]->read(), 0xdeaddead+i);
    607648                      TEST(Tptr_t             ,out_UPDATE_RAS_INDEX             [port]->read(), (0x12345678+i)%_param->_size_ras_index[context]);
     
    619660           
    620661            // wait the garbage collector
    621             if (_param->_have_port_depth)
    622               while ((out_DEPTH_TAIL     [context]->read() != 0) and
    623                      (out_DEPTH_NB_BRANCH[context]->read() != 0))
     662            while (((not (_param->_have_port_depth[context])) or (out_DEPTH_TAIL     [context]->read() != 0)) and
     663                   (out_DEPTH_NB_BRANCH[context]->read() != 0))
    624664                {
    625665                  LABEL("DEPTH [%d] nb_branch : %d - tail : %d",context,out_DEPTH_NB_BRANCH[context]->read(), out_DEPTH_TAIL [context]->read());
     
    671711  delete []  in_DECOD_RAS_ADDRESS           ;
    672712  delete []  in_DECOD_RAS_INDEX             ;
    673   delete []  in_DECOD_MISS_PREDICTION       ;
     713  delete []  in_DECOD_MISS_IFETCH           ;
     714  delete []  in_DECOD_MISS_DECOD            ;
    674715  delete []  in_DECOD_UPDATE_PREDICTION_ID  ;
    675716//delete [] out_DECOD_DEPTH                 ;
     
    686727  delete [] out_BRANCH_COMPLETE_ADDRESS_SRC    ;
    687728  delete [] out_BRANCH_COMPLETE_ADDRESS_DEST   ;
     729
     730  // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     731  delete [] out_BRANCH_EVENT_VAL            ;
     732  delete []  in_BRANCH_EVENT_ACK            ;
     733//   delete []  in_BRANCH_EVENT_CONTEXT_ID     ;
     734//   delete []  in_BRANCH_EVENT_DEPTH          ;
     735//   delete [] out_BRANCH_EVENT_MISS_PREDICTION;
     736  delete [] out_BRANCH_EVENT_ADDRESS_SRC    ;
     737  delete [] out_BRANCH_EVENT_ADDRESS_DEST   ;
    688738 
    689739  // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    700750  delete [] out_UPDATE_DIR_HISTORY          ;
    701751  delete [] out_UPDATE_RAS_VAL              ;
     752  delete [] out_UPDATE_RAS_PUSH             ;
    702753  delete [] out_UPDATE_RAS_ADDRESS          ;
    703754  delete [] out_UPDATE_RAS_INDEX            ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Parameters.h

    r81 r82  
    3535
    3636  public : uint32_t   _size_context_id        ;
    37   public : uint32_t   _size_depth             ;
     37  public : uint32_t * _size_depth             ; // [nb_context]
     38  public : uint32_t   _max_size_depth         ;
    3839  public : uint32_t   _max_size_ras_index     ;
    3940                     
    4041  public : bool       _have_port_context_id   ;
    41   public : bool       _have_port_depth        ;
     42  public : bool     * _have_port_depth        ; // [nb_context]
     43  public : bool       _have_port_max_depth    ;
    4244  public : bool       _have_port_history      ;
    4345   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h

    r81 r82  
    2424      UPDATE_PREDICTION_STATE_WAIT_DECOD , // Fetch have access at the predictor
    2525      UPDATE_PREDICTION_STATE_WAITEND    , // Have make a prediction, wait branch_complete
     26      UPDATE_PREDICTION_STATE_EVENT      , // have a event - must signal at the context_unit
    2627      UPDATE_PREDICTION_STATE_OK         , // branch is complete and can update predictor
    2728      UPDATE_PREDICTION_STATE_KO         , // have a event - must update predictor unit
     
    5859      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_WAIT_DECOD : return "wait_decod"; break;
    5960      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_WAITEND    : return "waitend"   ; break;
     61      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_EVENT      : return "event"     ; break;
    6062      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_OK         : return "ok"        ; break;
    6163      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_KO         : return "ko"        ; break;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h

    r81 r82  
    8888  public    : SC_IN (Taddress_t         )  **  in_DECOD_RAS_ADDRESS           ; //[nb_inst_decod]
    8989  public    : SC_IN (Tptr_t             )  **  in_DECOD_RAS_INDEX             ; //[nb_inst_decod]
    90   public    : SC_IN (Tcontrol_t         )  **  in_DECOD_MISS_PREDICTION       ; //[nb_inst_decod] // ifetch is a miss pred
     90  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_MISS_IFETCH           ; //[nb_inst_decod]
     91  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_MISS_DECOD            ; //[nb_inst_decod]
    9192  public    : SC_IN (Tprediction_ptr_t  )  **  in_DECOD_UPDATE_PREDICTION_ID  ; //[nb_inst_decod]
    9293//public    : SC_OUT(Tdepth_t           )  ** out_DECOD_DEPTH                 ; //[nb_inst_decod]
     
    103104  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_COMPLETE_ADDRESS_SRC    ; //[nb_inst_branch_complete]
    104105  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_COMPLETE_ADDRESS_DEST   ; //[nb_inst_branch_complete]
     106
     107    // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     108  public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_EVENT_VAL            ; //[nb_context]
     109  public    : SC_IN (Tcontrol_t         )  **  in_BRANCH_EVENT_ACK            ; //[nb_context]
     110//public    : SC_OUT(Tcontext_t         )  ** out_BRANCH_EVENT_CONTEXT_ID     ; //[nb_context]
     111//public    : SC_OUT(Tdepth_t           )  ** out_BRANCH_EVENT_DEPTH          ; //[nb_context]
     112//public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_EVENT_MISS_PREDICTION; //[nb_context] is always miss prediction
     113  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_EVENT_ADDRESS_SRC    ; //[nb_context]
     114  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_EVENT_ADDRESS_DEST   ; //[nb_context]
    105115
    106116    // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    117127  public    : SC_OUT(Thistory_t         )  ** out_UPDATE_DIR_HISTORY          ; //[nb_inst_update]
    118128  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_VAL              ; //[nb_inst_update]
     129  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_PUSH             ; //[nb_inst_update]
    119130  public    : SC_OUT(Taddress_t         )  ** out_UPDATE_RAS_ADDRESS          ; //[nb_inst_update]
    120131  public    : SC_OUT(Tptr_t             )  ** out_UPDATE_RAS_INDEX            ; //[nb_inst_update]
     
    131142  private   : uint32_t                      * reg_BOTTOM                 ; //[nb_context]
    132143  private   : uint32_t                      * reg_NB_ELT                 ; //[nb_context]
     144  private   : uint32_t                      * reg_NB_ELT_UPDATE          ; //[nb_context]
    133145  private   : uint32_t                      * reg_NB_ELT_NEED_UPDATE     ; //[nb_context]
    134146  private   : entry_t                      ** reg_UPDATE_PREDICTION_TABLE; //[nb_context][size_queue]
     
    142154  private   : Tcontrol_t                    * internal_BRANCH_COMPLETE_TAKE           ; //[nb_inst_branch_complete]
    143155  private   : Taddress_t                    * internal_BRANCH_COMPLETE_ADDRESS_DEST   ; //[nb_inst_branch_complete]
     156  private   : Tcontrol_t                    * internal_BRANCH_EVENT_VAL               ; //[nb_context]
     157  private   : Tdepth_t                      * internal_BRANCH_EVENT_DEPTH             ; //[nb_context]
    144158  private   : Tcontrol_t                    * internal_UPDATE_VAL                     ; //[nb_inst_update]
    145159  private   : Tcontext_t                    * internal_UPDATE_CONTEXT_ID              ; //[nb_inst_update]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters.cpp

    r81 r82  
    4343   
    4444    _size_context_id         = log2(nb_context);
    45     _size_depth              = log2(max<uint32_t>(size_queue,nb_context));
     45    _size_depth              = new uint32_t[_nb_context];
     46    _have_port_depth         = new bool    [_nb_context];
     47    for (uint32_t i=0; i<_nb_context; i++)
     48      {
     49        _size_depth      [i] = log2(_size_queue[i]);
     50        _have_port_depth [i] = (_size_depth [i] > 0);
     51      }
     52    _max_size_depth          = max<uint32_t>(_size_depth,_nb_context);
    4653    _max_size_ras_index      = max<uint32_t>(_size_ras_index,nb_context);
    4754
    4855    _have_port_context_id    = _size_context_id> 0;
    49     _have_port_depth         = _size_depth    > 0;
     56    _have_port_max_depth     = _max_size_depth > 0;
    5057    _have_port_history       = _size_history   > 0;
    5158   
     
    6875  {
    6976    log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin");
     77    delete [] _size_depth     ;
     78    delete [] _have_port_depth;
    7079    log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
    7180  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters_msg_error.cpp

    r81 r82  
    2727    Parameters_test test ("Update_Prediction_Table");
    2828
    29     if (morpheo::behavioural::test<Tdepth_t>(_size_depth) == false)
     29    if (morpheo::behavioural::test<Tdepth_t>(_max_size_depth) == false)
    3030      test.error("type \"Tdepth_t\" is too small.");
    3131
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp

    r81 r82  
    128128            if (_param->_have_port_context_id)
    129129              sensitive << (*(in_DECOD_CONTEXT_ID [i]));
    130             sensitive << (*(in_DECOD_MISS_PREDICTION [i]));
     130            sensitive << (*(in_DECOD_MISS_IFETCH [i]))
     131                      << (*(in_DECOD_MISS_DECOD  [i]));
    131132          }
    132133       
     
    135136        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    136137          {
    137             (*(out_DECOD_ACK                  [i])) (*(in_DECOD_MISS_PREDICTION [i]));
    138             if (_param->_have_port_context_id)
    139             (*(out_DECOD_ACK                  [i])) (*(in_DECOD_CONTEXT_ID      [i]));
     138            (*(out_DECOD_ACK                  [i])) (*(in_DECOD_MISS_IFETCH [i]));
     139            (*(out_DECOD_ACK                  [i])) (*(in_DECOD_MISS_DECOD  [i]));
     140            if (_param->_have_port_context_id)
     141            (*(out_DECOD_ACK                  [i])) (*(in_DECOD_CONTEXT_ID  [i]));
    140142          }
    141143# endif   
     
    150152            if (_param->_have_port_context_id)
    151153            sensitive << (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));
    152             if (_param->_have_port_depth)
     154            if (_param->_have_port_max_depth)
    153155            sensitive << (*(in_BRANCH_COMPLETE_DEPTH [i]));
    154156            sensitive << (*(in_BRANCH_COMPLETE_FLAG    [i]))
     
    162164            if (_param->_have_port_context_id)
    163165            (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));
    164             if (_param->_have_port_depth)
     166            if (_param->_have_port_max_depth)
    165167            (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_DEPTH      [i]));
    166168            (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_FLAG       [i]));
     
    169171            if (_param->_have_port_context_id)
    170172            (*(out_BRANCH_COMPLETE_TAKE            [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));
    171             if (_param->_have_port_depth)
     173            if (_param->_have_port_max_depth)
    172174            (*(out_BRANCH_COMPLETE_TAKE            [i])) (*(in_BRANCH_COMPLETE_DEPTH      [i]));
    173175            (*(out_BRANCH_COMPLETE_TAKE            [i])) (*(in_BRANCH_COMPLETE_FLAG       [i]));
     
    175177            if (_param->_have_port_context_id)
    176178            (*(out_BRANCH_COMPLETE_ADDRESS_SRC     [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));
    177             if (_param->_have_port_depth)
     179            if (_param->_have_port_max_depth)
    178180            (*(out_BRANCH_COMPLETE_ADDRESS_SRC     [i])) (*(in_BRANCH_COMPLETE_DEPTH      [i]));
    179181
    180182            if (_param->_have_port_context_id)
    181183            (*(out_BRANCH_COMPLETE_ADDRESS_DEST    [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));
    182             if (_param->_have_port_depth)
     184            if (_param->_have_port_max_depth)
    183185            (*(out_BRANCH_COMPLETE_ADDRESS_DEST    [i])) (*(in_BRANCH_COMPLETE_DEPTH      [i]));
    184186            (*(out_BRANCH_COMPLETE_ADDRESS_DEST    [i])) (*(in_BRANCH_COMPLETE_ADDRESS    [i]));
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp

    r81 r82  
    7676    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    7777    {
    78       ALLOC1_INTERFACE("predict", IN,SOUTH, "predict", _param->_nb_inst_predict);
     78      ALLOC1_INTERFACE("decod", IN,SOUTH, "decod", _param->_nb_inst_predict);
    7979
    8080      ALLOC1_VALACK_IN ( in_DECOD_VAL                 ,VAL);
     
    8787      ALLOC1_SIGNAL_IN ( in_DECOD_RAS_ADDRESS         ,"ras_address"         ,Taddress_t         ,_param->_size_address);
    8888      ALLOC1_SIGNAL_IN ( in_DECOD_RAS_INDEX           ,"ras_index"           ,Tptr_t             ,_param->_max_size_ras_index);
    89       ALLOC1_SIGNAL_IN ( in_DECOD_MISS_PREDICTION     ,"miss_prediction"     ,Tcontrol_t         ,1);
    90       ALLOC1_SIGNAL_IN ( in_DECOD_UPDATE_PREDICTION_ID,"update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth);
     89      ALLOC1_SIGNAL_IN ( in_DECOD_MISS_IFETCH         ,"miss_ifetch"         ,Tcontrol_t         ,1);
     90      ALLOC1_SIGNAL_IN ( in_DECOD_MISS_DECOD          ,"miss_decod"          ,Tcontrol_t         ,1);
     91      ALLOC1_SIGNAL_IN ( in_DECOD_UPDATE_PREDICTION_ID,"update_prediction_id",Tprediction_ptr_t  ,_param->_max_size_depth);
    9192//    ALLOC1_SIGNAL_OUT(out_DECOD_DEPTH               ,"depth"               ,Tdepth_t           ,_param->_size_depth);
    9293    }
     
    9596    {
    9697      ALLOC1_INTERFACE("branch_complete", IN,SOUTH, "branch_complete", _param->_nb_inst_branch_complete);
    97 
    9898     
    9999      ALLOC1_VALACK_IN ( in_BRANCH_COMPLETE_VAL            ,VAL);
    100100      ALLOC1_VALACK_OUT(out_BRANCH_COMPLETE_ACK            ,ACK);
    101101      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_CONTEXT_ID     ,"context_id"     ,Tcontext_t,_param->_size_context_id);
    102       ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH          ,"depth"          ,Tdepth_t  ,_param->_size_depth);
     102      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH          ,"depth"          ,Tdepth_t  ,_param->_max_size_depth);
    103103      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS        ,"address"        ,Taddress_t,_param->_size_address);
    104104      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_FLAG           ,"flag"           ,Tcontrol_t,1);
     
    107107      ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_SRC    ,"address_src"    ,Taddress_t,_param->_size_address);
    108108      ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_DEST   ,"address_dest"   ,Taddress_t,_param->_size_address);
     109    }
     110
     111    // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     112    {
     113      ALLOC1_INTERFACE("branch_event", IN,SOUTH, "branch_event", _param->_nb_context);
     114     
     115      ALLOC1_VALACK_OUT(out_BRANCH_EVENT_VAL            ,VAL);
     116      ALLOC1_VALACK_IN ( in_BRANCH_EVENT_ACK            ,ACK);
     117//    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_CONTEXT_ID     ,"context_id"     ,Tcontext_t,_param->_size_context_id);
     118//    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_DEPTH          ,"depth"          ,Tdepth_t  ,_param->_max_size_depth);
     119//    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
     120      ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_SRC    ,"address_src"    ,Taddress_t,_param->_size_address);
     121      ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_DEST   ,"address_dest"   ,Taddress_t,_param->_size_address);
    109122    }
    110123
     
    125138      ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_HISTORY          ,"dir_history"          ,Thistory_t         ,_param->_size_history);
    126139      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_VAL              ,"ras_val"              ,Tcontrol_t         ,1);
     140      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_PUSH             ,"ras_push"             ,Tcontrol_t         ,1);
    127141      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_ADDRESS          ,"ras_address"          ,Taddress_t         ,_param->_size_address);
    128142      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_INDEX            ,"ras_index"            ,Tptr_t             ,_param->_max_size_ras_index);
     
    134148      ALLOC1_INTERFACE("depth",OUT,SOUTH, "depth", _param->_nb_context);
    135149
    136       ALLOC1_SIGNAL_OUT(out_DEPTH_NB_BRANCH,"NB_BRANCH",Tdepth_t,_param->_size_depth);
    137       ALLOC1_SIGNAL_OUT(out_DEPTH_TAIL,"TAIL",Tdepth_t,_param->_size_depth);
     150      ALLOC1_SIGNAL_OUT(out_DEPTH_TAIL     ,"TAIL"     ,Tdepth_t,_param->_size_depth[alloc_signal_it1]);
     151      ALLOC1_SIGNAL_OUT(out_DEPTH_NB_BRANCH,"NB_BRANCH",Tdepth_t,_param->_size_depth[alloc_signal_it1]+1);
    138152    }
    139153
     
    145159    internal_BRANCH_COMPLETE_TAKE            = new Tcontrol_t [_param->_nb_inst_branch_complete];
    146160    internal_BRANCH_COMPLETE_ADDRESS_DEST    = new Taddress_t [_param->_nb_inst_branch_complete];
     161    internal_BRANCH_EVENT_VAL                = new Tcontrol_t [_param->_nb_context];
     162    internal_BRANCH_EVENT_DEPTH              = new Tdepth_t   [_param->_nb_context];
    147163    internal_UPDATE_VAL                      = new Tcontrol_t [_param->_nb_inst_update];
    148164    internal_UPDATE_CONTEXT_ID               = new Tcontext_t [_param->_nb_inst_update];
     
    153169    reg_BOTTOM                  = new uint32_t  [_param->_nb_context];
    154170    reg_NB_ELT                  = new uint32_t  [_param->_nb_context];
     171    reg_NB_ELT_UPDATE           = new uint32_t  [_param->_nb_context];
    155172    reg_NB_ELT_NEED_UPDATE      = new uint32_t  [_param->_nb_context];
    156173    reg_UPDATE_PREDICTION_TABLE = new entry_t * [_param->_nb_context];
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp

    r81 r82  
    5656        delete []  in_DECOD_RAS_ADDRESS           ;
    5757        delete []  in_DECOD_RAS_INDEX             ;
    58         delete []  in_DECOD_MISS_PREDICTION       ;
    59         if (_param->_have_port_depth)
     58        delete []  in_DECOD_MISS_IFETCH           ;
     59        delete []  in_DECOD_MISS_DECOD            ;
     60        if (_param->_have_port_max_depth)
    6061        delete []  in_DECOD_UPDATE_PREDICTION_ID  ;
    6162//      if (_param->_have_port_depth)
     
    6768        if (_param->_have_port_context_id)
    6869        delete []  in_BRANCH_COMPLETE_CONTEXT_ID     ;
    69         if (_param->_have_port_depth)
     70        if (_param->_have_port_max_depth)
    7071        delete []  in_BRANCH_COMPLETE_DEPTH          ;
    7172        delete []  in_BRANCH_COMPLETE_ADDRESS        ;
     
    7576        delete [] out_BRANCH_COMPLETE_ADDRESS_SRC    ;
    7677        delete [] out_BRANCH_COMPLETE_ADDRESS_DEST   ;
     78
     79        // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     80        delete [] out_BRANCH_EVENT_VAL            ;
     81        delete []  in_BRANCH_EVENT_ACK            ;
     82//      if (_param->_have_port_context_id)
     83//      delete []  in_BRANCH_EVENT_CONTEXT_ID     ;
     84//      if (_param->_have_port_max_depth)
     85//      delete []  in_BRANCH_EVENT_DEPTH          ;
     86//      delete [] out_BRANCH_EVENT_MISS_PREDICTION;
     87        delete [] out_BRANCH_EVENT_ADDRESS_SRC    ;
     88        delete [] out_BRANCH_EVENT_ADDRESS_DEST   ;
    7789       
    7890        // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    91103        delete [] out_UPDATE_DIR_HISTORY          ;
    92104        delete [] out_UPDATE_RAS_VAL              ;
     105        delete [] out_UPDATE_RAS_PUSH             ;
    93106        delete [] out_UPDATE_RAS_ADDRESS          ;
    94107        delete [] out_UPDATE_RAS_INDEX            ;
     
    96109
    97110        // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    98         if (_param->_have_port_depth)
     111        if (_param->_have_port_max_depth)
    99112          {
    100113        delete [] out_DEPTH_NB_BRANCH;
     
    110123    delete [] internal_BRANCH_COMPLETE_TAKE            ;
    111124    delete [] internal_BRANCH_COMPLETE_ADDRESS_DEST    ;
     125    delete [] internal_BRANCH_EVENT_VAL                ;
     126    delete [] internal_BRANCH_EVENT_DEPTH              ;
    112127    delete [] internal_UPDATE_VAL                      ;
    113128    delete [] internal_UPDATE_CONTEXT_ID               ;
     
    118133    delete [] reg_BOTTOM;
    119134    delete [] reg_NB_ELT;
     135    delete [] reg_NB_ELT_UPDATE;
    120136    delete [] reg_NB_ELT_NEED_UPDATE;
    121137    for (uint32_t i=0; i<_param->_nb_context; i++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_branch_complete.cpp

    r81 r82  
    2727      {
    2828        Tcontext_t          context   = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0;
    29         Tdepth_t            depth     = (_param->_have_port_depth    )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
     29        Tdepth_t            depth     = (_param->_have_port_max_depth )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
    3030        Tcontrol_t          miss      = false;
    3131        Tcontrol_t          take      = reg_UPDATE_PREDICTION_TABLE [context][depth]._last_take   ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_decod.cpp

    r81 r82  
    2626    for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    2727      {
    28         Tcontrol_t miss = PORT_READ(in_DECOD_MISS_PREDICTION [i]);
     28        Tcontrol_t miss = PORT_READ(in_DECOD_MISS_DECOD [i]);
    2929
    3030        if (miss)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp

    r81 r82  
    2828    // ===================================================================
    2929
    30     if (_param->_have_port_depth)
    31       for (uint32_t i=0; i<_param->_nb_context; i++)
    32         {
    33           PORT_WRITE(out_DEPTH_NB_BRANCH [i], reg_NB_ELT [i]);
    34           PORT_WRITE(out_DEPTH_TAIL      [i], reg_BOTTOM [i]);
    35         }
    36 
     30    for (uint32_t i=0; i<_param->_nb_context; i++)
     31      {
     32        if (_param->_have_port_depth [i])
     33          {
     34            PORT_WRITE(out_DEPTH_TAIL      [i], reg_BOTTOM [i]);
     35          }
     36        PORT_WRITE(out_DEPTH_NB_BRANCH [i], reg_NB_ELT [i]);
     37      }
    3738    // ===================================================================
    3839    // =====[ UPDATE ]====================================================
     
    7273                                           (cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK) or
    7374                                           (cond == BRANCH_CONDITION_READ_STACK));
    74              
     75           
     76            Tcontrol_t          push = ((cond == BRANCH_CONDITION_NONE_WITH_WRITE_STACK) or
     77                                        (cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK));
     78
    7579            if (_param->_have_port_context_id)
    7680            PORT_WRITE(out_UPDATE_CONTEXT_ID            [i],context);
     
    8589            PORT_WRITE(out_UPDATE_DIR_HISTORY           [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._history     );
    8690            PORT_WRITE(out_UPDATE_RAS_VAL               [i],ras_val);
     91            PORT_WRITE(out_UPDATE_RAS_PUSH              [i],push);
    8792            PORT_WRITE(out_UPDATE_RAS_ADDRESS           [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._address_ras );
    8893            PORT_WRITE(out_UPDATE_RAS_INDEX             [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._index_ras   );
     
    99104      }
    100105
     106    // ===================================================================
     107    // =====[ BRANCH_EVENT ]==============================================
     108    // ===================================================================
     109    for (uint32_t i=0; i<_param->_nb_context; i++)
     110      {
     111        Tdepth_t   depth   = (reg_BOTTOM [i] + reg_NB_ELT_UPDATE [i])%_param->_size_queue [i];
     112        state_t    state   = reg_UPDATE_PREDICTION_TABLE [i][depth]._state;
     113       
     114        Tcontrol_t val     = (state == UPDATE_PREDICTION_STATE_EVENT);
     115
     116        if (val)
     117          {
     118            PORT_WRITE(out_BRANCH_EVENT_ADDRESS_SRC  [i], reg_UPDATE_PREDICTION_TABLE [i][depth]._address_src );
     119            PORT_WRITE(out_BRANCH_EVENT_ADDRESS_DEST [i], reg_UPDATE_PREDICTION_TABLE [i][depth]._address_dest);
     120            internal_BRANCH_EVENT_DEPTH [i] = depth;
     121          }
     122
     123        internal_BRANCH_EVENT_VAL   [i] = val;
     124        PORT_WRITE(out_BRANCH_EVENT_VAL [i], internal_BRANCH_EVENT_VAL [i]);
     125      }
    101126    log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
    102127  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp

    r81 r82  
    3131            reg_BOTTOM             [i] = 0;
    3232            reg_NB_ELT             [i] = 0;
     33            reg_NB_ELT_UPDATE      [i] = 0;
    3334            reg_NB_ELT_NEED_UPDATE [i] = 0;
    3435            for (uint32_t j=0; j<_param->_size_queue[i]; j++)
     
    7475          if (PORT_READ(in_DECOD_VAL[i]) and internal_DECOD_ACK [i])
    7576            {
    76               Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_DECOD_CONTEXT_ID [i]):0;
    77               Tcontrol_t miss    = PORT_READ(in_DECOD_MISS_PREDICTION [i]);
     77              Tcontext_t context     = (_param->_have_port_context_id)?PORT_READ(in_DECOD_CONTEXT_ID [i]):0;
     78              Tcontrol_t miss_ifetch = PORT_READ(in_DECOD_MISS_IFETCH [i]);
     79              Tcontrol_t miss_decod  = PORT_READ(in_DECOD_MISS_DECOD  [i]);
    7880
    7981              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"DECOD[%d] - Accepted",i);
    80               log_printf(TRACE,Update_Prediction_Table,FUNCTION," * context : %d",context);
    81               log_printf(TRACE,Update_Prediction_Table,FUNCTION," * miss    : %d",miss);
    82               log_printf(TRACE,Update_Prediction_Table,FUNCTION," * nb_elt  : %d",reg_NB_ELT[context]);
     82              log_printf(TRACE,Update_Prediction_Table,FUNCTION," * context     : %d",context);
     83              log_printf(TRACE,Update_Prediction_Table,FUNCTION," * miss_ifetch : %d",miss_ifetch);
     84              log_printf(TRACE,Update_Prediction_Table,FUNCTION," * miss_decod  : %d",miss_decod);
     85              log_printf(TRACE,Update_Prediction_Table,FUNCTION," * nb_elt      : %d",reg_NB_ELT[context]);
    8386             
    8487              // Test if miss ifetch
    8588              //   miss ifetch = decod a branch and the predict unit have not predict this branch ... gloup :P
    86               if (miss)
     89              if (miss_ifetch or miss_decod)
    8790                {
    88                   Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_DECOD_UPDATE_PREDICTION_ID [i]):0;
     91                  Tdepth_t depth = (_param->_have_port_max_depth)?PORT_READ(in_DECOD_UPDATE_PREDICTION_ID [i]):0;
    8992                  Tdepth_t top   = reg_TOP [context];
    9093
     
    127130                        }
    128131                    }
     132                  reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_EVENT; // rewrite
    129133
    130134                  reg_TOP                [context] = (depth+1)%_param->_size_queue [context];
     
    135139                {
    136140                  // Normal case : branch is previous predicated, change state of branch
    137                   Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_DECOD_UPDATE_PREDICTION_ID [i]):0;
     141                  Tdepth_t depth = (_param->_have_port_max_depth)?PORT_READ(in_DECOD_UPDATE_PREDICTION_ID [i]):0;
    138142
    139143                  reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_WAITEND;
     
    148152            {
    149153              Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0;
    150               Tdepth_t   depth   = (_param->_have_port_depth     )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
     154              Tdepth_t   depth   = (_param->_have_port_max_depth     )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
    151155
    152156              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"BRANCH_COMPLETE[%d] - Accepted",i);
     
    158162                {
    159163                  // Miss case
    160                   reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_KO;
     164                  reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_EVENT;
    161165
    162166                  // Another prediction (prediction with depth higer)
     
    231235
    232236        // ===================================================================
     237        // =====[ BRANCH_EVENT ]==============================================
     238        // ===================================================================
     239        for (uint32_t i=0; i<_param->_nb_context; i++)
     240          if (internal_BRANCH_EVENT_VAL [i] and PORT_READ(in_BRANCH_EVENT_ACK [i]))
     241          {
     242            Tdepth_t depth = internal_BRANCH_EVENT_DEPTH [i];
     243           
     244            reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_KO;
     245          }
     246
     247        // ===================================================================
    233248        // =====[ GARBAGE COLLECTOR ]=========================================
    234249        // ===================================================================
     
    253268      }
    254269
    255 // #if (DEBUG >= DEBUG_TRACE)
     270#if (DEBUG >= DEBUG_TRACE)
    256271    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"Dump Update_Prediction_Table");
    257272    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * reg_UPDATE_PRIORITY      : %d",reg_UPDATE_PRIORITY);
    258273    for (uint32_t i=0; i<_param->_nb_context; i++)
    259274      {
    260         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * Update_Prediction_Table [%d]",i);
     275        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * Update_Prediction_Table   [%d]",i);
    261276        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_TOP                : %d",reg_TOP                [i]);
    262277        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_BOTTOM             : %d",reg_BOTTOM             [i]);
     
    266281          log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      [%d] %s %x",j,toString(reg_UPDATE_PREDICTION_TABLE [i][j]._state).c_str(),reg_UPDATE_PREDICTION_TABLE [i][j]._address_src);
    267282      }
    268 // #endif
     283#endif
    269284
    270285
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Parameters.h

    r81 r82  
    1111#include "Common/include/Debug.h"
    1212#include "Behavioural/include/Parameters.h"
     13#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/include/Parameters.h"
     14#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Parameters.h"
     15#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Parameters.h"
     16#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Parameters.h"
     17#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Parameters.h"
    1318
    1419namespace morpheo {
     
    2328  {
    2429    //-----[ fields ]------------------------------------------------------------
     30  public : uint32_t     _nb_context                    ;
     31  public : uint32_t     _nb_decod_unit                 ;
     32  public : uint32_t     _size_address                  ;
     33  public : uint32_t *   _nb_instruction                ;//[nb_context]
     34  public : uint32_t *   _nb_inst_decod                 ;//[nb_decod_unit]
     35  public : uint32_t     _nb_inst_branch_predict        ;
     36  public : uint32_t     _nb_inst_branch_decod          ;
     37  public : uint32_t     _nb_inst_branch_update         ;
     38  public : uint32_t     _nb_inst_branch_complete       ;
     39  public : uint32_t     _btb_size_queue                ;
     40  public : uint32_t     _btb_associativity             ;
     41  public : uint32_t     _btb_size_counter              ;
     42  public : Tvictim_t    _btb_victim_scheme             ;
     43  public : Tpredictor_t _dir_predictor_scheme          ;
     44  public : bool         _dir_have_bht               [3];
     45  public : uint32_t     _dir_bht_size_shifter       [3];
     46  public : uint32_t     _dir_bht_nb_shifter         [3];
     47  public : bool         _dir_have_pht               [3];
     48  public : uint32_t     _dir_pht_size_counter       [3];
     49  public : uint32_t     _dir_pht_nb_counter         [3];
     50  public : uint32_t     _dir_pht_size_address_share [3];
     51  public : uint32_t *   _ras_size_queue                ;//[nb_context]
     52  public : uint32_t *   _upt_size_queue                ;//[nb_context]
     53
     54  public : uint32_t     _size_context_id               ;
     55  public : uint32_t *   _size_depth                    ;//[nb_context]
     56  public : uint32_t     _max_size_depth                ;
     57  public : uint32_t *   _size_inst_ifetch_ptr          ;//[nb_context]
     58  public : uint32_t     _size_history                  ;
     59  public : uint32_t *   _size_ras_index                ;//[nb_context]
     60                                                       
     61  public : bool         _have_port_context_id          ;
     62  public : bool         _have_port_max_depth           ;
     63  public : bool     *   _have_port_depth               ;//[nb_context]
     64  public : bool     *   _have_port_inst_ifetch_ptr     ;//[nb_context]
     65  public : bool         _have_port_history             ;
     66  public : bool     *   _have_port_ras_index           ;//[nb_context]
     67
     68  public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer   ::Parameters * _param_btb;
     69  public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction              ::Parameters * _param_dir;
     70  public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::return_address_stack   ::Parameters * _param_ras;
     71  public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::Parameters * _param_upt;
     72  public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue   ::Parameters * _param_glue;
    2573
    2674    //-----[ methods ]-----------------------------------------------------------
    27   public : Parameters  ();
     75  public : Parameters  (uint32_t     nb_context                    ,
     76                        uint32_t     nb_decod_unit                 ,
     77                        uint32_t     size_address                  ,
     78                        uint32_t *   nb_instruction                ,//[nb_context]
     79                        uint32_t *   nb_inst_decod                 ,//[nb_decod_unit]
     80                        uint32_t     nb_inst_branch_predict        ,
     81                        uint32_t     nb_inst_branch_decod          ,
     82                        uint32_t     nb_inst_branch_update         ,
     83                        uint32_t     nb_inst_branch_complete       ,
     84                        uint32_t     btb_size_queue                ,
     85                        uint32_t     btb_associativity             ,
     86                        uint32_t     btb_size_counter              ,
     87                        Tvictim_t    btb_victim_scheme             ,
     88                        Tpredictor_t dir_predictor_scheme          ,
     89                        bool         dir_have_bht               [3],
     90                        uint32_t     dir_bht_size_shifter       [3],
     91                        uint32_t     dir_bht_nb_shifter         [3],
     92                        bool         dir_have_pht               [3],
     93                        uint32_t     dir_pht_size_counter       [3],
     94                        uint32_t     dir_pht_nb_counter         [3],
     95                        uint32_t     dir_pht_size_address_share [3],
     96                        uint32_t *   ras_size_queue                ,//[nb_context]
     97                        uint32_t *   upt_size_queue                 //[nb_context]
     98                        );
    2899//   public : Parameters  (Parameters & param) ;
    29100  public : ~Parameters () ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Prediction_unit.h

    r81 r82  
    2727#endif
    2828#include "Behavioural/include/Usage.h"
     29
     30#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/include/Branch_Target_Buffer.h"
     31#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Direction.h"
     32#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Return_Address_Stack.h"
     33#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h"
     34#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Prediction_unit_Glue.h"
    2935
    3036namespace morpheo {
     
    6167  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
    6268
     69    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     70  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_VAL                         ; //[nb_context]
     71  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_ACK                         ; //[nb_context]
     72  public    : SC_IN (Taddress_t         )  **  in_PREDICT_PC_PREVIOUS                 ; //[nb_context]
     73  public    : SC_IN (Taddress_t         )  **  in_PREDICT_PC_CURRENT                  ; //[nb_context]
     74  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_PC_CURRENT_IS_DS_TAKE       ; //[nb_context]
     75  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_PC_NEXT                     ; //[nb_context]
     76  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_PC_NEXT_IS_DS_TAKE          ; //[nb_context]
     77  public    : SC_OUT(Tcontrol_t         ) *** out_PREDICT_INSTRUCTION_ENABLE          ; //[nb_context][nb_instruction]
     78  public    : SC_OUT(Tinst_ifetch_ptr_t )  ** out_PREDICT_INST_IFETCH_PTR             ; //[nb_context]
     79  public    : SC_OUT(Tbranch_state_t    )  ** out_PREDICT_BRANCH_STATE                ; //[nb_context]
     80  public    : SC_OUT(Tprediction_ptr_t  )  ** out_PREDICT_BRANCH_UPDATE_PREDICTION_ID ; //[nb_context]
     81
     82    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     83  public    : SC_IN (Tcontrol_t         ) ***  in_DECOD_VAL                           ; //[nb_decod_unit][nb_inst_decod]
     84  public    : SC_OUT(Tcontrol_t         ) *** out_DECOD_ACK                           ; //[nb_decod_unit][nb_inst_decod]
     85  public    : SC_IN (Tcontext_t         ) ***  in_DECOD_CONTEXT_ID                    ; //[nb_decod_unit][nb_inst_decod]
     86  public    : SC_IN (Tcontrol_t         ) ***  in_DECOD_MATCH_INST_IFETCH_PTR         ; //[nb_decod_unit][nb_inst_decod]
     87  public    : SC_IN (Tbranch_state_t    ) ***  in_DECOD_BRANCH_STATE                  ; //[nb_decod_unit][nb_inst_decod]
     88  public    : SC_IN (Tprediction_ptr_t  ) ***  in_DECOD_BRANCH_UPDATE_PREDICTION_ID   ; //[nb_decod_unit][nb_inst_decod]
     89  public    : SC_IN (Tbranch_condition_t) ***  in_DECOD_BRANCH_CONDITION              ; //[nb_decod_unit][nb_inst_decod]
     90  public    : SC_IN (Tcontrol_t         ) ***  in_DECOD_BRANCH_DIRECTION              ; //[nb_decod_unit][nb_inst_decod]
     91  public    : SC_IN (Taddress_t         ) ***  in_DECOD_ADDRESS_SRC                   ; //[nb_decod_unit][nb_inst_decod]
     92  public    : SC_IN (Taddress_t         ) ***  in_DECOD_ADDRESS_DEST                  ; //[nb_decod_unit][nb_inst_decod]
     93
     94    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     95  public    : SC_IN (Tcontrol_t         )  **  in_BRANCH_COMPLETE_VAL                 ; //[nb_inst_branch_complete]
     96  public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_COMPLETE_ACK                 ; //[nb_inst_branch_complete]
     97  public    : SC_IN (Tcontext_t         )  **  in_BRANCH_COMPLETE_CONTEXT_ID          ; //[nb_inst_branch_complete]
     98  public    : SC_IN (Tdepth_t           )  **  in_BRANCH_COMPLETE_DEPTH               ; //[nb_inst_branch_complete]
     99  public    : SC_IN (Taddress_t         )  **  in_BRANCH_COMPLETE_ADDRESS             ; //[nb_inst_branch_complete]
     100  public    : SC_IN (Tcontrol_t         )  **  in_BRANCH_COMPLETE_FLAG                ; //[nb_inst_branch_complete]
     101  public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_COMPLETE_MISS_PREDICTION     ; //[nb_inst_branch_complete]
     102  public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_COMPLETE_TAKE                ; //[nb_inst_branch_complete]
     103  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_COMPLETE_ADDRESS_SRC         ; //[nb_inst_branch_complete]
     104  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_COMPLETE_ADDRESS_DEST        ; //[nb_inst_branch_complete]
     105
     106    // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     107  public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_EVENT_VAL                    ; //[nb_context]
     108  public    : SC_IN (Tcontrol_t         )  **  in_BRANCH_EVENT_ACK                    ; //[nb_context]
     109//public    : SC_OUT(Tcontext_t         )  ** out_BRANCH_EVENT_CONTEXT_ID             ; //[nb_context]
     110//public    : SC_OUT(Tdepth_t           )  ** out_BRANCH_EVENT_DEPTH                  ; //[nb_context]
     111//public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_EVENT_MISS_PREDICTION        ; //[nb_context]
     112  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_EVENT_ADDRESS_SRC            ; //[nb_context]
     113  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_EVENT_ADDRESS_DEST           ; //[nb_context]
     114
     115    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     116  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_NB_BRANCH                     ; //[nb_context]
     117  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_TAIL                          ; //[nb_context]
     118
    63119    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     120  public    : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer   ::Branch_Target_Buffer    * _component_btb;
     121  public    : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction              ::Direction               * _component_dir;
     122  public    : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::return_address_stack   ::Return_Address_Stack    * _component_ras;
     123  public    : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::Update_Prediction_Table * _component_upt;
     124  public    : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue   ::Prediction_unit_Glue    * _component_glue;
    64125
    65126    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     
    84145#endif
    85146   Parameters                                  * param,
    86    morpheo::behavioural::Tusage_t                usage=USE_ALL
     147   morpheo::behavioural::Tusage_t                usage
    87148   );
    88149  public  :          ~Prediction_unit             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters.cpp

    r81 r82  
    77
    88#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Parameters.h"
     9#include "Common/include/Max.h"
    910
    1011namespace morpheo {
     
    1819#undef  FUNCTION
    1920#define FUNCTION "Prediction_unit::Parameters"
    20   Parameters::Parameters ()
     21  Parameters::Parameters (uint32_t     nb_context                    ,
     22                          uint32_t     nb_decod_unit                 ,
     23                          uint32_t     size_address                  ,
     24                          uint32_t *   nb_instruction                ,//[nb_context]
     25                          uint32_t *   nb_inst_decod                 ,//[nb_decod_unit]
     26                          uint32_t     nb_inst_branch_predict        ,
     27                          uint32_t     nb_inst_branch_decod          ,
     28                          uint32_t     nb_inst_branch_update         ,
     29                          uint32_t     nb_inst_branch_complete       ,
     30                          uint32_t     btb_size_queue                ,
     31                          uint32_t     btb_associativity             ,
     32                          uint32_t     btb_size_counter              ,
     33                          Tvictim_t    btb_victim_scheme             ,
     34                          Tpredictor_t dir_predictor_scheme          ,
     35                          bool         dir_have_bht               [3],
     36                          uint32_t     dir_bht_size_shifter       [3],
     37                          uint32_t     dir_bht_nb_shifter         [3],
     38                          bool         dir_have_pht               [3],
     39                          uint32_t     dir_pht_size_counter       [3],
     40                          uint32_t     dir_pht_nb_counter         [3],
     41                          uint32_t     dir_pht_size_address_share [3],
     42                          uint32_t *   ras_size_queue                ,//[nb_context]
     43                          uint32_t *   upt_size_queue                 //[nb_context]
     44                          )
    2145  {
    2246    log_printf(FUNC,Prediction_unit,FUNCTION,"Begin");
     47   
     48    _nb_context                 = nb_context                ;
     49    _nb_decod_unit              = nb_decod_unit             ;
     50    _size_address               = size_address              ;
     51    _nb_instruction             = nb_instruction            ;
     52    _nb_inst_decod              = nb_inst_decod             ;
     53    _nb_inst_branch_predict     = nb_inst_branch_predict    ;
     54    _nb_inst_branch_decod       = nb_inst_branch_decod      ;
     55    _nb_inst_branch_update      = nb_inst_branch_update     ;
     56    _nb_inst_branch_complete    = nb_inst_branch_complete   ;
     57    _btb_size_queue             = btb_size_queue            ;
     58    _btb_associativity          = btb_associativity         ;
     59    _btb_size_counter           = btb_size_counter          ;
     60    _btb_victim_scheme          = btb_victim_scheme         ;
     61    _dir_predictor_scheme       = dir_predictor_scheme      ;
     62    for (uint32_t i=0; i<3; i++)
     63      {
     64        _dir_have_bht               [i] = dir_have_bht               [i];
     65        _dir_bht_size_shifter       [i] = dir_bht_size_shifter       [i];
     66        _dir_bht_nb_shifter         [i] = dir_bht_nb_shifter         [i];
     67        _dir_have_pht               [i] = dir_have_pht               [i];
     68        _dir_pht_size_counter       [i] = dir_pht_size_counter       [i];
     69        _dir_pht_nb_counter         [i] = dir_pht_nb_counter         [i];
     70        _dir_pht_size_address_share [i] = dir_pht_size_address_share [i];
     71      }
     72    _ras_size_queue             = ras_size_queue            ;
     73    _upt_size_queue             = upt_size_queue            ;
     74
     75    _size_context_id            = log2(_nb_context);
     76//   public : uint32_t *   _size_inst_ifetch_ptr          ;//[nb_context]
     77
     78    _size_depth                 = new uint32_t [_nb_context];
     79    _size_ras_index             = new uint32_t [_nb_context];
     80    for (uint32_t i=0; i<_nb_context; i++)
     81      {
     82        _size_depth     [i] = log2(_upt_size_queue [i]);
     83        _size_ras_index [i] = log2(_ras_size_queue [i]);
     84      }
     85
     86    _max_size_depth             = max<uint32_t>(_size_depth,_nb_context);
     87    _have_port_context_id       = (_size_context_id > 0);
     88    _have_port_max_depth        = (_max_size_depth  > 0);
     89//   public : bool     *   _have_port_inst_ifetch_ptr     ;//[nb_context]
     90
     91    _param_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue   ::Parameters
     92      (_nb_context            ,
     93       _nb_decod_unit         ,
     94       _size_address          ,
     95       _nb_instruction        ,
     96       _size_depth            ,
     97       _nb_inst_decod         ,
     98       _nb_inst_branch_predict,
     99       _nb_inst_branch_decod  ,
     100       _nb_inst_branch_update );
     101
     102    _size_inst_ifetch_ptr      = _param_glue->_size_inst_ifetch_ptr     ;
     103    _have_port_depth           = _param_glue->_have_port_depth;
     104    _have_port_inst_ifetch_ptr = _param_glue->_have_port_inst_ifetch_ptr;
     105    _have_port_history         = (_size_history > 0);
     106   
     107    _param_btb  = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer   ::Parameters
     108      (_nb_context            ,
     109       _nb_instruction        ,
     110       _btb_size_queue        ,
     111       _btb_associativity     ,
     112       _size_address          ,
     113       _btb_size_counter      ,
     114       _nb_inst_branch_predict,
     115       _nb_inst_branch_decod  ,
     116       _nb_inst_branch_update ,
     117       _btb_victim_scheme     );
     118
     119    _param_dir  = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction              ::Parameters
     120      (_dir_predictor_scheme      ,
     121       _nb_inst_branch_predict    ,
     122       _nb_inst_branch_update     ,
     123       _size_address              ,
     124       _dir_have_bht              ,
     125       _dir_bht_size_shifter      ,
     126       _dir_bht_nb_shifter        ,
     127       _dir_have_pht              ,
     128       _dir_pht_size_counter      ,
     129       _dir_pht_nb_counter        ,
     130       _dir_pht_size_address_share);
     131
     132    _size_history = _param_dir->_size_history;
     133
     134    _param_ras  = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::return_address_stack   ::Parameters
     135      (_nb_context            ,
     136       _ras_size_queue        ,
     137       _size_address          ,
     138       _nb_inst_branch_predict,
     139       _nb_inst_branch_decod  ,
     140       _nb_inst_branch_update );
     141
     142    _param_upt  = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::Parameters
     143      (_nb_context             ,
     144       _upt_size_queue         ,
     145       _size_address           ,
     146       _nb_inst_branch_predict ,
     147       _nb_inst_branch_decod   ,
     148       _nb_inst_branch_complete,
     149       _nb_inst_branch_update  ,
     150       _size_history           ,
     151       _size_ras_index         );
     152
    23153    test();
    24154    log_printf(FUNC,Prediction_unit,FUNCTION,"End");
     
    39169  {
    40170    log_printf(FUNC,Prediction_unit,FUNCTION,"Begin");
     171 
     172    delete _param_btb;
     173    delete _param_dir;
     174    delete _param_ras;
     175    delete _param_upt;
     176    delete _param_glue;
     177
     178    delete [] _size_depth    ;
     179    delete [] _size_ras_index;
     180
    41181    log_printf(FUNC,Prediction_unit,FUNCTION,"End");
    42182  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters_print.cpp

    r81 r82  
    2626
    2727    xml.balise_open("prediction_unit");
    28 //  xml.singleton_begin(""); xml.attribut("value",toString(_)); xml.singleton_end();
     28    xml.singleton_begin("nb_context                            "); xml.attribut("value",toString(_nb_context                            )); xml.singleton_end();
     29    xml.singleton_begin("nb_decod_unit                         "); xml.attribut("value",toString(_nb_decod_unit                         )); xml.singleton_end();
     30    xml.singleton_begin("size_address                          "); xml.attribut("value",toString(_size_address                          )); xml.singleton_end();
     31    xml.singleton_begin("nb_inst_branch_predict                "); xml.attribut("value",toString(_nb_inst_branch_predict                )); xml.singleton_end();
     32    xml.singleton_begin("nb_inst_branch_decod                  "); xml.attribut("value",toString(_nb_inst_branch_decod                  )); xml.singleton_end();
     33    xml.singleton_begin("nb_inst_branch_update                 "); xml.attribut("value",toString(_nb_inst_branch_update                 )); xml.singleton_end();
     34    xml.singleton_begin("nb_inst_branch_complete               "); xml.attribut("value",toString(_nb_inst_branch_complete               )); xml.singleton_end();
     35    xml.singleton_begin("btb_size_queue                        "); xml.attribut("value",toString(_btb_size_queue                        )); xml.singleton_end();
     36    xml.singleton_begin("btb_associativity                     "); xml.attribut("value",toString(_btb_associativity                     )); xml.singleton_end();
     37    xml.singleton_begin("btb_size_counter                      "); xml.attribut("value",toString(_btb_size_counter                      )); xml.singleton_end();
     38    xml.singleton_begin("btb_victim_scheme                     "); xml.attribut("value",toString(_btb_victim_scheme                     )); xml.singleton_end();
     39    xml.singleton_begin("dir_predictor_scheme                  "); xml.attribut("value",toString(_dir_predictor_scheme                  )); xml.singleton_end();
     40    xml.comment("predictor_scheme : ");
     41    xml.comment(" * predictor_never_take  : don't use \"predictor_{0,1,2}\" parameters.");
     42    xml.comment(" * predictor_always_take : don't use \"predictor_{0,1,2}\" parameters.");
     43    xml.comment(" * predictor_static      : don't use \"predictor_{0,1,2}\" parameters.");
     44    xml.comment(" * predictor_last_take   : don't use \"predictor_{0,1,2}\" parameters.");
     45    xml.comment(" * predictor_counter     :       use \"predictor_0\"       parameters.");
     46    xml.comment(" * predictor_local       :       use \"predictor_0\"       parameters.");
     47    xml.comment(" * predictor_global      :       use \"predictor_0\"       parameters.");
     48    xml.comment(" * predictor_meta        :       use \"predictor_{0,1,2}\" parameters.");
     49    xml.comment(" * predictor_custom      :       use \"predictor_{0,1,2}\" parameters.");
     50    for (uint32_t i=0; i<3; i++)
     51      {
     52        xml.singleton_begin("dir_predictor_"+toString(i)+"_have_bht              "); xml.attribut("value",toString(_dir_have_bht               [i])); xml.singleton_end();
     53        xml.singleton_begin("dir_predictor_"+toString(i)+"_bht_size_shifter      "); xml.attribut("value",toString(_dir_bht_size_shifter       [i])); xml.singleton_end();
     54        xml.singleton_begin("dir_predictor_"+toString(i)+"_bht_nb_shifter        "); xml.attribut("value",toString(_dir_bht_nb_shifter         [i])); xml.singleton_end();
     55        xml.singleton_begin("dir_predictor_"+toString(i)+"_have_pht              "); xml.attribut("value",toString(_dir_have_pht               [i])); xml.singleton_end();
     56        xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_size_counter      "); xml.attribut("value",toString(_dir_pht_size_counter       [i])); xml.singleton_end();
     57        xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_nb_counter        "); xml.attribut("value",toString(_dir_pht_nb_counter         [i])); xml.singleton_end();
     58        xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_size_address_share"); xml.attribut("value",toString(_dir_pht_size_address_share [i])); xml.singleton_end();
     59      }
     60
     61    for (uint32_t i=0;i<_nb_context; i++)
     62      {
     63        xml. balise_open_begin("component");
     64        xml.  attribut("type","context");
     65        xml.  attribut("id"  ,toString(i));
     66        xml. balise_open_end();
     67        xml.  singleton_begin("nb_instruction                        "); xml.attribut("value",toString(_nb_instruction                     [i])); xml.singleton_end();
     68        xml.  singleton_begin("ras_size_queue                        "); xml.attribut("value",toString(_ras_size_queue                     [i])); xml.singleton_end();
     69        xml.  singleton_begin("upt_size_queue                        "); xml.attribut("value",toString(_upt_size_queue                     [i])); xml.singleton_end();
     70        xml. balise_close();
     71      }
     72
     73    for (uint32_t i=0;i<_nb_decod_unit; i++)
     74      {
     75        xml. balise_open_begin("component");
     76        xml.  attribut("type","decod_unit");
     77        xml.  attribut("id"  ,toString(i));
     78        xml. balise_open_end();
     79        xml.  singleton_begin("nb_inst_decod                         "); xml.attribut("value",toString(_nb_inst_decod                      [i])); xml.singleton_end();
     80        xml. balise_close();
     81      }
     82
     83
    2984    xml.balise_close();
    3085
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_allocation.cpp

    r81 r82  
    1515namespace front_end {
    1616namespace prediction_unit {
    17 
    18 
    1917
    2018#undef  FUNCTION
     
    5452      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
    5553    }
     54
     55    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     56    {
     57      {
     58        ALLOC1_INTERFACE("predict",IN,SOUTH,"Interface with ifetch unit",_param->_nb_context);
     59       
     60        ALLOC1_VALACK_IN ( in_PREDICT_VAL                        ,VAL);
     61        ALLOC1_VALACK_OUT(out_PREDICT_ACK                        ,ACK);
     62        ALLOC1_SIGNAL_IN ( in_PREDICT_PC_PREVIOUS                ,"pc_previous"                ,Taddress_t         ,_param->_size_address);
     63        ALLOC1_SIGNAL_IN ( in_PREDICT_PC_CURRENT                 ,"pc_current"                 ,Taddress_t         ,_param->_size_address);
     64        ALLOC1_SIGNAL_IN ( in_PREDICT_PC_CURRENT_IS_DS_TAKE      ,"pc_current_is_ds_take"      ,Tcontrol_t         ,1);
     65        ALLOC1_SIGNAL_OUT(out_PREDICT_PC_NEXT                    ,"pc_next"                    ,Taddress_t         ,_param->_size_address);
     66        ALLOC1_SIGNAL_OUT(out_PREDICT_PC_NEXT_IS_DS_TAKE         ,"pc_next_is_ds_take"         ,Tcontrol_t         ,1);
     67        ALLOC1_SIGNAL_OUT(out_PREDICT_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t ,_param->_size_inst_ifetch_ptr [alloc_signal_it1]);
     68        ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state);
     69        ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth [alloc_signal_it1]);
     70      }
     71      {
     72        ALLOC2_INTERFACE("predict",IN,SOUTH,"Interface with ifetch unit",_param->_nb_context,_param->_nb_instruction[alloc_interface_it1]);
     73        _ALLOC2_SIGNAL_OUT(out_PREDICT_INSTRUCTION_ENABLE         ,"instruction_enable"         ,Tcontrol_t         ,1,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
     74      }
     75    }
     76
     77    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     78    {
     79      {
     80        ALLOC2_INTERFACE("decod",IN,SOUTH,"Interface with decod unit",_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_interface_it1]);
     81       
     82        _ALLOC2_VALACK_IN ( in_DECOD_VAL                        ,VAL,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     83        _ALLOC2_VALACK_OUT(out_DECOD_ACK                        ,ACK,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     84        _ALLOC2_SIGNAL_IN ( in_DECOD_CONTEXT_ID                 ,"context_id"                 ,Tcontext_t         ,_param->_size_context_id      ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     85        _ALLOC2_SIGNAL_IN ( in_DECOD_MATCH_INST_IFETCH_PTR      ,"match_inst_ifetch_ptr"      ,Tcontrol_t         ,1                             ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     86        _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state    ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     87        _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_max_size_depth       ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     88        _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_CONDITION           ,"branch_condition"           ,Tbranch_condition_t,_param->_size_branch_condition,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     89        _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_DIRECTION           ,"branch_direction"           ,Tcontrol_t         ,1                             ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     90        _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_SRC                ,"address_src"                ,Taddress_t         ,_param->_size_address         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     91        _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_DEST               ,"address_dest"               ,Taddress_t         ,_param->_size_address         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
     92      }
     93    }
     94
     95    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     96    {
     97      ALLOC1_INTERFACE("branch_complete", IN,SOUTH, "branch_complete", _param->_nb_inst_branch_complete);
     98     
     99      ALLOC1_VALACK_IN ( in_BRANCH_COMPLETE_VAL            ,VAL);
     100      ALLOC1_VALACK_OUT(out_BRANCH_COMPLETE_ACK            ,ACK);
     101      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_CONTEXT_ID     ,"context_id"     ,Tcontext_t,_param->_size_context_id);
     102      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH          ,"depth"          ,Tdepth_t  ,_param->_max_size_depth);
     103      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS        ,"address"        ,Taddress_t,_param->_size_address);
     104      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_FLAG           ,"flag"           ,Tcontrol_t,1);
     105      ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
     106      ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_TAKE           ,"take"           ,Tcontrol_t,1);
     107      ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_SRC    ,"address_src"    ,Taddress_t,_param->_size_address);
     108      ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_DEST   ,"address_dest"   ,Taddress_t,_param->_size_address);
     109    }
     110
     111    // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     112    {
     113      ALLOC1_INTERFACE("branch_event", IN,SOUTH, "branch_event", _param->_nb_context);
     114     
     115      ALLOC1_VALACK_OUT(out_BRANCH_EVENT_VAL            ,VAL);
     116      ALLOC1_VALACK_IN ( in_BRANCH_EVENT_ACK            ,ACK);
     117//    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_CONTEXT_ID     ,"context_id"     ,Tcontext_t,_param->_size_context_id);
     118//    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_DEPTH          ,"depth"          ,Tdepth_t  ,_param->_max_size_depth);
     119//    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
     120      ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_SRC    ,"address_src"    ,Taddress_t,_param->_size_address);
     121      ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_DEST   ,"address_dest"   ,Taddress_t,_param->_size_address);
     122    }
     123
     124    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     125    {
     126      ALLOC1_INTERFACE("depth",OUT,SOUTH,"Interface with depth",_param->_nb_context);
     127
     128      ALLOC1_SIGNAL_OUT(out_DEPTH_NB_BRANCH    ,"nb_branch"    ,Tdepth_t,_param->_size_depth[alloc_signal_it1]+1);
     129      ALLOC1_SIGNAL_OUT(out_DEPTH_TAIL         ,"tail"         ,Tdepth_t,_param->_size_depth[alloc_signal_it1]);
     130    }
     131
     132    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     133    std::string name;
     134
     135    {
     136      name = _name+"_branch_target_buffer";
     137      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
     138     
     139      _component_btb = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer::Branch_Target_Buffer
     140        (name.c_str()
     141#ifdef STATISTICS
     142         ,param_statistics
     143#endif
     144         ,_param->_param_btb
     145         ,_usage);
     146     
     147      _component->set_component (_component_btb->_component
     148#ifdef POSITION
     149                                 , 50, 50, 10, 10
     150#endif
     151                                 );
     152    }
     153
     154    {
     155      name = _name+"_direction";
     156      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
     157     
     158      _component_dir = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::Direction
     159        (name.c_str()
     160#ifdef STATISTICS
     161         ,param_statistics
     162#endif
     163         ,_param->_param_dir
     164         ,_usage);
     165     
     166      _component->set_component (_component_dir->_component
     167#ifdef POSITION
     168                                 , 50, 50, 10, 10
     169#endif
     170                                 );
     171    }
    56172   
    57     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     173    {
     174      name = _name+"_return_address_stack";
     175      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
     176     
     177      _component_ras = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::return_address_stack::Return_Address_Stack
     178        (name.c_str()
     179#ifdef STATISTICS
     180         ,param_statistics
     181#endif
     182         ,_param->_param_ras
     183         ,_usage);
     184     
     185      _component->set_component (_component_ras->_component
     186#ifdef POSITION
     187                                 , 50, 50, 10, 10
     188#endif
     189                                 );
     190    }
     191   
     192    {
     193      name = _name+"_update_prediction_table";
     194      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
     195     
     196      _component_upt = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::Update_Prediction_Table
     197        (name.c_str()
     198#ifdef STATISTICS
     199         ,param_statistics
     200#endif
     201         ,_param->_param_upt
     202         ,_usage);
     203     
     204      _component->set_component (_component_upt->_component
     205#ifdef POSITION
     206                                 , 50, 50, 10, 10
     207#endif
     208                                 );
     209    }
     210
     211    {
     212      name = _name+"_prediction_unit_glue";
     213      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
     214     
     215      _component_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue::Prediction_unit_Glue
     216        (name.c_str()
     217#ifdef STATISTICS
     218         ,param_statistics
     219#endif
     220         ,_param->_param_glue
     221         ,_usage);
     222     
     223      _component->set_component (_component_glue->_component
     224#ifdef POSITION
     225                                 , 50, 50, 10, 10
     226#endif
     227                                 );
     228    }
    58229   
    59230    // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    60231    std::string src,dest;
    61232
     233    // ===================================================================
     234    // =====[ branch_target_buffer ]======================================
     235    // ===================================================================
     236    {
     237      src = _name+"_branch_target_buffer";
     238      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
     239           
     240      {
     241        dest = _name;
     242#ifdef POSITION
     243        _component->interface_map (src ,"",
     244                                   dest,"");
     245#endif
     246        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     247        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     248      }
     249
     250      for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     251        {
     252          dest = _name+"_prediction_unit_glue";
     253#ifdef POSITION
     254          _component->interface_map (src ,"predict_"+toString(i),
     255                                     dest,"predict_btb_"+toString(i));
     256#endif
     257
     258          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_VAL"         ,
     259                                   dest,"out_PREDICT_BTB_"+toString(i)+"_VAL"         );
     260          COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_ACK"         ,
     261                                   dest, "in_PREDICT_BTB_"+toString(i)+"_ACK"         );
     262          if (_param->_have_port_context_id)
     263          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_CONTEXT_ID"  ,
     264                                   dest,"out_PREDICT_BTB_"+toString(i)+"_CONTEXT_ID"  );
     265          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_ADDRESS"     ,
     266                                   dest,"out_PREDICT_BTB_"+toString(i)+"_ADDRESS"     );
     267          COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_HIT"         ,
     268                                   dest, "in_PREDICT_BTB_"+toString(i)+"_HIT"         );
     269          COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_ADDRESS_SRC" ,
     270                                   dest, "in_PREDICT_BTB_"+toString(i)+"_ADDRESS_SRC" );
     271          COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_ADDRESS_DEST",
     272                                   dest, "in_PREDICT_BTB_"+toString(i)+"_ADDRESS_DEST");
     273          COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_CONDITION"   ,
     274                                   dest, "in_PREDICT_BTB_"+toString(i)+"_CONDITION"   );
     275          COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_IS_ACCURATE" ,
     276                                   dest, "in_PREDICT_BTB_"+toString(i)+"_IS_ACCURATE" );
     277
     278          dest = _name+"_direction";
     279          COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_LAST_TAKE" ,
     280                                   dest, "in_PREDICT_"+toString(i)+"_LAST_TAKE" );
     281        }
     282
     283      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     284        {
     285          dest = _name+"_prediction_unit_glue";
     286#ifdef POSITION
     287          _component->interface_map (src ,"decod_"+toString(i),
     288                                     dest,"decod_btb_"+toString(i));
     289#endif
     290
     291          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_VAL"            ,
     292                                   dest,"out_DECOD_BTB_"+toString(i)+"_VAL"            );
     293          COMPONENT_MAP(_component,src ,"out_DECOD_"    +toString(i)+"_ACK"            ,
     294                                   dest, "in_DECOD_BTB_"+toString(i)+"_ACK"            );
     295          if (_param->_have_port_context_id)
     296          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_CONTEXT_ID"     ,
     297                                   dest,"out_DECOD_BTB_"+toString(i)+"_CONTEXT_ID"     );
     298          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_ADDRESS_SRC"    ,
     299                                   dest,"out_DECOD_BTB_"+toString(i)+"_ADDRESS_SRC"    );
     300          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_ADDRESS_DEST"   ,
     301                                   dest,"out_DECOD_BTB_"+toString(i)+"_ADDRESS_DEST"   );
     302          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_CONDITION"      ,
     303                                   dest,"out_DECOD_BTB_"+toString(i)+"_CONDITION"      );
     304          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_LAST_TAKE"      ,
     305                                   dest,"out_DECOD_BTB_"+toString(i)+"_LAST_TAKE"      );
     306          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_MISS_PREDICTION",
     307                                   dest,"out_DECOD_BTB_"+toString(i)+"_MISS_PREDICTION");
     308          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_IS_ACCURATE"    ,
     309                                   dest,"out_DECOD_BTB_"+toString(i)+"_IS_ACCURATE"    );
     310        }
     311
     312      for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
     313        {
     314          dest = _name+"_prediction_unit_glue";
     315
     316          COMPONENT_MAP(_component,src , "in_UPDATE_"    +toString(i)+"_VAL",
     317                                   dest,"out_UPDATE_BTB_"+toString(i)+"_VAL");
     318          COMPONENT_MAP(_component,src ,"out_UPDATE_"    +toString(i)+"_ACK",
     319                                   dest, "in_UPDATE_BTB_"+toString(i)+"_ACK");
     320
     321          dest = _name+"_update_prediction_table";
     322#ifdef POSITION
     323          _component->interface_map (src ,"update_"+toString(i),
     324                                     dest,"update_"+toString(i));
     325#endif
     326
     327          if (_param->_have_port_context_id)
     328          COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_CONTEXT_ID"     ,
     329                                   dest,"out_UPDATE_"+toString(i)+    "_CONTEXT_ID"     );
     330          COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_ADDRESS_SRC"    ,
     331                                   dest,"out_UPDATE_"+toString(i)+"_BTB_ADDRESS_SRC"    );
     332          COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_ADDRESS_DEST"   ,
     333                                   dest,"out_UPDATE_"+toString(i)+"_BTB_ADDRESS_DEST"   );
     334          COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_CONDITION"      ,
     335                                   dest,"out_UPDATE_"+toString(i)+"_BTB_CONDITION"      );
     336          COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_LAST_TAKE"      ,
     337                                   dest,"out_UPDATE_"+toString(i)+    "_DIRECTION_GOOD" );
     338          COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_MISS_PREDICTION",
     339                                   dest,"out_UPDATE_"+toString(i)+    "_MISS_PREDICTION");
     340        }
     341    }
     342
     343    // ===================================================================
     344    // =====[ direction ]=================================================
     345    // ===================================================================
     346    {
     347      src = _name+"_direction";
     348      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
     349           
     350      {
     351        dest = _name;
     352#ifdef POSITION
     353        _component->interface_map (src ,"",
     354                                   dest,"");
     355#endif
     356        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     357        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     358      }
     359
     360      for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     361        {
     362          dest = _name+"_prediction_unit_glue";
     363#ifdef POSITION
     364          _component->interface_map (src ,"predict_"+toString(i),
     365                                     dest,"predict_dir_"+toString(i));
     366#endif
     367
     368          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_VAL"        ,
     369                                   dest,"out_PREDICT_DIR_"+toString(i)+"_VAL"        );
     370          COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_ACK"        ,
     371                                   dest, "in_PREDICT_DIR_"+toString(i)+"_ACK"        );
     372          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_ADDRESS_SRC",
     373                                   dest,"out_PREDICT_DIR_"+toString(i)+"_ADDRESS_SRC");
     374          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_STATIC"     ,
     375                                   dest,"out_PREDICT_DIR_"+toString(i)+"_STATIC"     );
     376          COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_DIRECTION"  ,
     377                                   dest, "in_PREDICT_DIR_"+toString(i)+"_DIRECTION"  );
     378
     379          dest = _name+"_update_prediction_table";
     380          if (_param->_have_port_history)
     381          COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_HISTORY"  ,
     382                                   dest, "in_PREDICT_"    +toString(i)+"_HISTORY"  );
     383          //out_PREDICT_DIR_LAST_TAKE - component_map branch_target_buffer
     384        }
     385
     386      for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
     387        {
     388          dest = _name+"_prediction_unit_glue";
     389
     390          COMPONENT_MAP(_component,src , "in_UPDATE_"    +toString(i)+"_VAL",
     391                                   dest,"out_UPDATE_DIR_"+toString(i)+"_VAL");
     392          COMPONENT_MAP(_component,src ,"out_UPDATE_"    +toString(i)+"_ACK",
     393                                   dest, "in_UPDATE_DIR_"+toString(i)+"_ACK");
     394
     395          dest = _name+"_update_prediction_table";
     396#ifdef POSITION
     397          _component->interface_map (src ,"update_"+toString(i),
     398                                     dest,"update_"+toString(i));
     399#endif
     400
     401          COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_ADDRESS"  ,
     402                                   dest,"out_UPDATE_"+toString(i)+"_BTB_ADDRESS_SRC");
     403          if (_param->_have_port_history)
     404          COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_HISTORY"  ,
     405                                   dest,"out_UPDATE_"+toString(i)+"_DIR_HISTORY"  );
     406          COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_DIRECTION",
     407                                   dest,"out_UPDATE_"+toString(i)+    "_DIRECTION_GOOD");
     408         
     409        }
     410    }
     411
     412    // ===================================================================
     413    // =====[ return_address_stack ]======================================
     414    // ===================================================================
     415    {
     416      src = _name+"_return_address_stack";
     417      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
     418
     419           
     420      {
     421        dest = _name;
     422#ifdef POSITION
     423        _component->interface_map (src ,"",
     424                                   dest,"");
     425#endif
     426        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     427        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     428      }
     429
     430      for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     431        {
     432          dest = _name+"_prediction_unit_glue";
     433#ifdef POSITION
     434          _component->interface_map (src ,"predict_"+toString(i),
     435                                     dest,"predict_dir_"+toString(i));
     436#endif
     437         
     438          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_VAL"         ,
     439                                   dest,"out_PREDICT_RAS_"+toString(i)+"_VAL"         );
     440          COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_ACK"         ,
     441                                   dest, "in_PREDICT_RAS_"+toString(i)+"_ACK"         );
     442          if (_param->_have_port_context_id)
     443          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_CONTEXT_ID"  ,
     444                                   dest,"out_PREDICT_RAS_"+toString(i)+"_CONTEXT_ID"  );
     445          COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_HIT"         ,
     446                                   dest, "in_PREDICT_RAS_"+toString(i)+"_HIT"         );
     447          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_PUSH"        ,
     448                                   dest,"out_PREDICT_RAS_"+toString(i)+"_PUSH"        );
     449          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_ADDRESS_PUSH",
     450                                   dest,"out_PREDICT_RAS_"+toString(i)+"_ADDRESS_PUSH");
     451          COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_ADDRESS_POP" ,
     452                                   dest, "in_PREDICT_RAS_"+toString(i)+"_ADDRESS_POP" );
     453
     454          dest = _name+"_update_prediction_table";
     455          COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_INDEX",
     456                                   dest, "in_PREDICT_"    +toString(i)+"_RAS_INDEX");
     457        }
     458     
     459      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     460        {
     461          dest = _name+"_prediction_unit_glue";
     462#ifdef POSITION
     463          _component->interface_map (src ,"decod_"+toString(i),
     464                                     dest,"decod_ras_"+toString(i));
     465#endif
     466         
     467          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_VAL"            ,
     468                                   dest,"out_DECOD_RAS_"+toString(i)+"_VAL"            );
     469          COMPONENT_MAP(_component,src ,"out_DECOD_"    +toString(i)+"_ACK"            ,
     470                                   dest, "in_DECOD_RAS_"+toString(i)+"_ACK"            );
     471          if (_param->_have_port_context_id)
     472          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_CONTEXT_ID"     ,
     473                                   dest,"out_DECOD_RAS_"+toString(i)+"_CONTEXT_ID"     );
     474          COMPONENT_MAP(_component,src ,"out_DECOD_"    +toString(i)+"_HIT"            ,
     475                                   dest, "in_DECOD_RAS_"+toString(i)+"_HIT"            );
     476          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_PUSH"           ,
     477                                   dest,"out_DECOD_RAS_"+toString(i)+"_PUSH"           );
     478          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_ADDRESS_PUSH"   ,
     479                                   dest,"out_DECOD_RAS_"+toString(i)+"_ADDRESS_PUSH"   );
     480          COMPONENT_MAP(_component,src ,"out_DECOD_"    +toString(i)+"_ADDRESS_POP"    ,
     481                                   dest, "in_DECOD_RAS_"+toString(i)+"_ADDRESS_POP"    );
     482          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_MISS_PREDICTION",
     483                                   dest,"out_DECOD_RAS_"+toString(i)+"_MISS_PREDICTION");
     484
     485          dest = _name+"_update_prediction_table";
     486          COMPONENT_MAP(_component,src ,"out_DECOD_"    +toString(i)+"_INDEX"          ,
     487                                   dest, "in_DECOD_"    +toString(i)+"_RAS_INDEX"      );
     488        }
     489
     490      for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
     491        {
     492          dest = _name+"_prediction_unit_glue";
     493
     494          COMPONENT_MAP(_component,src , "in_UPDATE_"    +toString(i)+"_VAL",
     495                                   dest,"out_UPDATE_RAS_"+toString(i)+"_VAL");
     496          COMPONENT_MAP(_component,src ,"out_UPDATE_"    +toString(i)+"_ACK",
     497                                   dest, "in_UPDATE_RAS_"+toString(i)+"_ACK");
     498
     499          dest = _name+"_update_prediction_table";
     500#ifdef POSITION
     501          _component->interface_map (src ,"update_"+toString(i),
     502                                     dest,"update_"+toString(i));
     503#endif
     504
     505          if (_param->_have_port_context_id)
     506          COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_CONTEXT_ID"       ,
     507                                   dest,"out_UPDATE_"+toString(i)+    "_CONTEXT_ID"       );
     508          COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_PUSH"             ,
     509                                   dest,"out_UPDATE_"+toString(i)+"_RAS_PUSH"             );
     510          COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_ADDRESS"          ,
     511                                   dest,"out_UPDATE_"+toString(i)+"_RAS_ADDRESS"          );
     512          COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_INDEX"            ,
     513                                   dest,"out_UPDATE_"+toString(i)+"_RAS_INDEX"            );
     514          COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_MISS_PREDICTION"  ,
     515                                   dest,"out_UPDATE_"+toString(i)+    "_MISS_PREDICTION"  );
     516          COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_PREDICTION_IFETCH",
     517                                   dest,"out_UPDATE_"+toString(i)+"_RAS_PREDICTION_IFETCH");
     518        }
     519    }
     520
     521    // ===================================================================
     522    // =====[ update_prediction_table ]===================================
     523    // ===================================================================
     524    {
     525      src = _name+"_update_prediction_table";
     526      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
     527           
     528      {
     529        dest = _name;
     530#ifdef POSITION
     531        _component->interface_map (src ,"",
     532                                   dest,"");
     533#endif
     534        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     535        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     536      }
     537
     538      for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     539        {
     540          dest = _name+"_prediction_unit_glue";
     541#ifdef POSITION
     542          _component->interface_map (src ,"predict_"+toString(i),
     543                                     dest,"predict_dir_"+toString(i));
     544#endif
     545     
     546          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_VAL"             ,
     547                                   dest,"out_PREDICT_UPT_"+toString(i)+"_VAL"             );
     548          COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_ACK"             ,
     549                                   dest, "in_PREDICT_UPT_"+toString(i)+"_ACK"             );
     550          if (_param->_have_port_context_id)
     551          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_CONTEXT_ID"      ,
     552                                   dest,"out_PREDICT_UPT_"+toString(i)+"_CONTEXT_ID"      );
     553          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_BTB_ADDRESS_SRC" ,
     554                                   dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_ADDRESS_SRC" );
     555          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_BTB_ADDRESS_DEST",
     556                                   dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_ADDRESS_DEST");
     557          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_BTB_CONDITION"   ,
     558                                   dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_CONDITION"   );
     559          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_BTB_LAST_TAKE"   ,
     560                                   dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_LAST_TAKE"   );
     561          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_BTB_IS_ACCURATE" ,
     562                                   dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_IS_ACCURATE" );
     563          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_RAS_ADDRESS"     ,
     564                                   dest,"out_PREDICT_UPT_"+toString(i)+"_RAS_ADDRESS"     );
     565
     566          //out_PREDICT_HISTORY   - component_map direction
     567          // in_PREDICT_RAS_INDEX - component_map return_address_stack
     568        }
     569
     570      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     571        {
     572          dest = _name+"_prediction_unit_glue";
     573         
     574          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_VAL"                 ,
     575                                   dest,"out_DECOD_UPT_"+toString(i)+"_VAL"                 );
     576          COMPONENT_MAP(_component,src ,"out_DECOD_"    +toString(i)+"_ACK"                 ,
     577                                   dest, "in_DECOD_UPT_"+toString(i)+"_ACK"                 );
     578          if (_param->_have_port_context_id)
     579          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_CONTEXT_ID"          ,
     580                                   dest,"out_DECOD_UPT_"+toString(i)+"_CONTEXT_ID"          );
     581          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_BTB_ADDRESS_SRC"     ,
     582                                   dest,"out_DECOD_UPT_"+toString(i)+"_BTB_ADDRESS_SRC"     );
     583          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_BTB_ADDRESS_DEST"    ,
     584                                   dest,"out_DECOD_UPT_"+toString(i)+"_BTB_ADDRESS_DEST"    );
     585          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_BTB_CONDITION"       ,
     586                                   dest,"out_DECOD_UPT_"+toString(i)+"_BTB_CONDITION"       );
     587          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_BTB_LAST_TAKE"       ,
     588                                   dest,"out_DECOD_UPT_"+toString(i)+"_BTB_LAST_TAKE"       );
     589          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_RAS_ADDRESS"         ,
     590                                   dest,"out_DECOD_UPT_"+toString(i)+"_RAS_ADDRESS"         );
     591          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_MISS_IFETCH"         ,
     592                                   dest,"out_DECOD_UPT_"+toString(i)+"_MISS_IFETCH"         );
     593          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_MISS_DECOD"          ,
     594                                   dest,"out_DECOD_UPT_"+toString(i)+"_MISS_DECOD"          );
     595          if (_param->_have_port_max_depth)
     596          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_UPDATE_PREDICTION_ID",
     597                                   dest,"out_DECOD_UPT_"+toString(i)+"_UPDATE_PREDICTION_ID");
     598         
     599          //out_DECOD_UPT_RAS_INDEX - component_map return_address_stack
     600        }
     601
     602      for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
     603        {
     604          dest = _name+"_prediction_unit_glue";
     605
     606#ifdef POSITION
     607          _component->interface_map (src ,"update_"+toString(i),
     608                                     dest,"update_upt_"+toString(i));
     609#endif
     610
     611          COMPONENT_MAP(_component,src ,"out_UPDATE_"    +toString(i)+"_VAL",
     612                                   dest, "in_UPDATE_UPT_"+toString(i)+"_VAL");
     613          COMPONENT_MAP(_component,src , "in_UPDATE_"    +toString(i)+"_ACK",
     614                                   dest,"out_UPDATE_UPT_"+toString(i)+"_ACK");
     615
     616          COMPONENT_MAP(_component,src ,"out_UPDATE_"    +toString(i)+"_BTB_VAL",
     617                                   dest, "in_UPDATE_UPT_"+toString(i)+"_BTB_VAL");
     618          COMPONENT_MAP(_component,src ,"out_UPDATE_"    +toString(i)+"_DIR_VAL",
     619                                   dest, "in_UPDATE_UPT_"+toString(i)+"_DIR_VAL");
     620          COMPONENT_MAP(_component,src ,"out_UPDATE_"    +toString(i)+"_RAS_VAL",
     621                                   dest, "in_UPDATE_UPT_"+toString(i)+"_RAS_VAL");
     622
     623          //in_UPDATE_UPT_CONTEXT_ID            - component_map branch_target_buffer
     624          //in_UPDATE_UPT_MISS_PREDICTION       - component_map branch_target_buffer
     625          //in_UPDATE_UPT_DIRECTION_GOOD        - component_map branch_target_buffer
     626          //in_UPDATE_UPT_BTB_ADDRESS_SRC       - component_map branch_target_buffer
     627          //in_UPDATE_UPT_BTB_ADDRESS_DEST      - component_map branch_target_buffer
     628          //in_UPDATE_UPT_BTB_CONDITION         - component_map branch_target_buffer
     629          //in_UPDATE_UPT_DIR_HISTORY           - component_map direction
     630          //in_UPDATE_UPT_RAS_ADDRESS           - component_map return_address_stack
     631          //in_UPDATE_UPT_RAS_PUSH              - component_map return_address_stack
     632          //in_UPDATE_UPT_RAS_INDEX             - component_map return_address_stack
     633          //in_UPDATE_UPT_RAS_PREDICTION_IFETCH - component_map return_address_stack
     634        }
     635
     636      for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
     637        {
     638          dest = _name;
     639
     640#ifdef POSITION
     641          _component->interface_map (src ,"complete_"+toString(i),
     642                                     dest,"complete_"+toString(i));
     643#endif
     644
     645          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"            ,
     646                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"            );
     647          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"            ,
     648                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"            );
     649          if (_param->_have_port_context_id)
     650          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID"     ,
     651                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID"     );
     652          if (_param->_have_port_max_depth)
     653          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"          ,
     654                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"          );
     655          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"        ,
     656                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"        );
     657          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_FLAG"           ,
     658                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_FLAG"           );
     659          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION",
     660                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION");
     661          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE"           ,
     662                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE"           );
     663          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC"    ,
     664                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC"    );
     665          PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST"   ,
     666                              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST"   );
     667        }
     668
     669      for (uint32_t i=0; i<_param->_nb_context; i++)
     670        {
     671          dest = _name;
     672
     673#ifdef POSITION
     674          _component->interface_map (src ,"branch_event_"+toString(i),
     675                                     dest,"branch_event_"+toString(i));
     676#endif
     677
     678          PORT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_VAL"         ,dest,"out_BRANCH_EVENT_"+toString(i)+"_VAL"         );
     679          PORT_MAP(_component,src , "in_BRANCH_EVENT_"+toString(i)+"_ACK"         ,dest, "in_BRANCH_EVENT_"+toString(i)+"_ACK"         );
     680          PORT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_SRC" ,dest,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_SRC" );
     681          PORT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST",dest,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST");
     682        }
     683
     684      for (uint32_t i=0; i<_param->_nb_context; i++)
     685        {
     686          dest = _name+"_prediction_unit_glue";
     687         
     688#ifdef POSITION
     689          _component->interface_map (src ,"depth_"+toString(i),
     690                                     dest,"depth_"+toString(i));
     691#endif
     692         
     693          COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+    "_NB_BRANCH",
     694                                   dest, "in_DEPTH_"+toString(i)+"_UPT_NB_BRANCH");
     695
     696          if (_param->_have_port_depth[i])
     697          COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+    "_TAIL"     ,
     698                                   dest, "in_DEPTH_"+toString(i)+"_UPT_TAIL"     );
     699        }
     700
     701    }
     702
     703    // ===================================================================
     704    // =====[ prediction_unit_glue ]======================================
     705    // ===================================================================
     706    {
     707      src = _name+"_prediction_unit_glue";
     708      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
     709           
     710      {
     711        dest = _name;
     712#ifdef POSITION
     713        _component->interface_map (src ,"",
     714                                   dest,"");
     715#endif
     716
     717        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     718        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     719      }
     720
     721      for (uint32_t i=0; i<_param->_nb_context; i++)
     722        {
     723          dest = _name;
     724#ifdef POSITION
     725          _component->interface_map (src ,"predict_"+toString(i),
     726                                     dest,"predict_"+toString(i));
     727#endif
     728         
     729          PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_VAL"                        ,
     730                              dest, "in_PREDICT_"+toString(i)+"_VAL"                        );
     731          PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_ACK"                        ,
     732                              dest,"out_PREDICT_"+toString(i)+"_ACK"                        );
     733          PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_PC_PREVIOUS"                ,
     734                              dest, "in_PREDICT_"+toString(i)+"_PC_PREVIOUS"                );
     735          PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_PC_CURRENT"                 ,
     736                              dest, "in_PREDICT_"+toString(i)+"_PC_CURRENT"                 );
     737          PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_PC_CURRENT_IS_DS_TAKE"      ,
     738                              dest, "in_PREDICT_"+toString(i)+"_PC_CURRENT_IS_DS_TAKE"      );
     739          PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_PC_NEXT"                    ,
     740                              dest,"out_PREDICT_"+toString(i)+"_PC_NEXT"                    );
     741          PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_PC_NEXT_IS_DS_TAKE"         ,
     742                              dest,"out_PREDICT_"+toString(i)+"_PC_NEXT_IS_DS_TAKE"         );
     743          if (_param->_have_port_inst_ifetch_ptr [i])
     744          PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_INST_IFETCH_PTR"            ,
     745                              dest,"out_PREDICT_"+toString(i)+"_INST_IFETCH_PTR"            );
     746          PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_BRANCH_STATE"               ,
     747                              dest,"out_PREDICT_"+toString(i)+"_BRANCH_STATE"               );
     748          if (_param->_have_port_depth [i])
     749          PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID",
     750                              dest,"out_PREDICT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID");
     751         
     752          for (uint32_t j=0; j<_param->_nb_instruction[i]; j++)
     753            {
     754              dest = _name;
     755#ifdef POSITION
     756              _component->interface_map (src ,"predict_"+toString(i)+"_"+toString(j),
     757                                         dest,"predict_"+toString(i)+"_"+toString(j));
     758#endif
     759             
     760              PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_INSTRUCTION_ENABLE",
     761                                  dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_INSTRUCTION_ENABLE");
     762            }
     763        }
     764
     765      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     766        for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     767          {
     768            dest = _name;
     769#ifdef POSITION
     770            _component->interface_map (src ,"decod_"+toString(i),
     771                                       dest,"decod_"+toString(i));
     772#endif
     773           
     774            PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_VAL"                        ,
     775                                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_VAL"                        );
     776            PORT_MAP(_component,src ,"out_DECOD_"+toString(i)+"_"+toString(j)+"_ACK"                        ,
     777                                dest,"out_DECOD_"+toString(i)+"_"+toString(j)+"_ACK"                        );
     778            if (_param->_have_port_context_id)
     779            PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"                 ,
     780                                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"                 );
     781            PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_MATCH_INST_IFETCH_PTR"      ,
     782                                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_MATCH_INST_IFETCH_PTR"      );
     783            PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_STATE"               ,
     784                                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_STATE"               );
     785            if (_param->_have_port_max_depth)
     786            PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_UPDATE_PREDICTION_ID",
     787                                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_UPDATE_PREDICTION_ID");
     788            PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_CONDITION"           ,
     789                                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_CONDITION"           );
     790            PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_DIRECTION"           ,
     791                                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_DIRECTION"           );
     792            PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_ADDRESS_SRC"                ,
     793                                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_ADDRESS_SRC"                );
     794            PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_ADDRESS_DEST"               ,
     795                                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_ADDRESS_DEST"               );
     796          }
     797
     798      for (uint32_t i=0; i<_param->_nb_context; i++)
     799        {
     800          dest = _name;
     801#ifdef POSITION
     802          _component->interface_map (src ,"depth_"+toString(i),
     803                                     dest,"depth_"+toString(i));
     804#endif
     805         
     806          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_NB_BRANCH",dest,"out_DEPTH_"+toString(i)+"_NB_BRANCH");
     807          if (_param->_have_port_depth[i])
     808          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_TAIL"     ,dest,"out_DEPTH_"+toString(i)+"_TAIL"     );
     809        }
     810    }
    62811
    63812    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    64      _component->test_map();
     813    _component->test_map(false);
    65814
    66815#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp

    r81 r82  
    77
    88#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Prediction_unit.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    2627        delete    in_CLOCK ;
    2728        delete    in_NRESET;
     29
     30        DELETE1_SIGNAL( in_PREDICT_VAL                        ,_param->_nb_context,1);
     31        DELETE1_SIGNAL(out_PREDICT_ACK                        ,_param->_nb_context,1);
     32        DELETE1_SIGNAL( in_PREDICT_PC_PREVIOUS                ,_param->_nb_context,_param->_size_address);
     33        DELETE1_SIGNAL( in_PREDICT_PC_CURRENT                 ,_param->_nb_context,_param->_size_address);
     34        DELETE1_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE      ,_param->_nb_context,1);
     35        DELETE1_SIGNAL(out_PREDICT_PC_NEXT                    ,_param->_nb_context,_param->_size_address);
     36        DELETE1_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE         ,_param->_nb_context,1);
     37        DELETE1_SIGNAL(out_PREDICT_INST_IFETCH_PTR            ,_param->_nb_context,_param->_size_inst_ifetch_ptr [alloc_signal_it1]);
     38        DELETE1_SIGNAL(out_PREDICT_BRANCH_STATE               ,_param->_nb_context,_param->_size_branch_state);
     39        DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context,_param->_size_depth [alloc_signal_it1]);
     40
     41        DELETE2_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE       ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1],1);
     42        DELETE2_SIGNAL( in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1);
     43        DELETE2_SIGNAL(out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1);
     44        DELETE2_SIGNAL( in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_context_id      );
     45        DELETE2_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1                             );
     46        DELETE2_SIGNAL( in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_branch_state    );
     47        DELETE2_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_max_size_depth       );
     48        DELETE2_SIGNAL( in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_branch_condition);
     49        DELETE2_SIGNAL( in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1                             );
     50        DELETE2_SIGNAL( in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_address         );
     51        DELETE2_SIGNAL( in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_address         );
     52     
     53        DELETE1_SIGNAL( in_BRANCH_COMPLETE_VAL            ,_param->_nb_inst_branch_complete,1);
     54        DELETE1_SIGNAL(out_BRANCH_COMPLETE_ACK            ,_param->_nb_inst_branch_complete,1);
     55        DELETE1_SIGNAL( in_BRANCH_COMPLETE_CONTEXT_ID     ,_param->_nb_inst_branch_complete,_param->_size_context_id);
     56        DELETE1_SIGNAL( in_BRANCH_COMPLETE_DEPTH          ,_param->_nb_inst_branch_complete,_param->_max_size_depth);
     57        DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS        ,_param->_nb_inst_branch_complete,_param->_size_address);
     58        DELETE1_SIGNAL( in_BRANCH_COMPLETE_FLAG           ,_param->_nb_inst_branch_complete,1);
     59        DELETE1_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete,1);
     60        DELETE1_SIGNAL(out_BRANCH_COMPLETE_TAKE           ,_param->_nb_inst_branch_complete,1);
     61        DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC    ,_param->_nb_inst_branch_complete,_param->_size_address);
     62        DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST   ,_param->_nb_inst_branch_complete,_param->_size_address);
     63
     64        DELETE1_SIGNAL(out_BRANCH_EVENT_VAL            ,_param->_nb_context,1);
     65        DELETE1_SIGNAL( in_BRANCH_EVENT_ACK            ,_param->_nb_context,1);
     66//      DELETE1_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID     ,_param->_nb_context,_param->_size_context_id);
     67//      DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH          ,_param->_nb_context,_param->_max_size_depth);
     68//      DELETE1_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context,1);
     69        DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC    ,_param->_nb_context,_param->_size_address);
     70        DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST   ,_param->_nb_context,_param->_size_address);
     71
     72        DELETE1_SIGNAL(out_DEPTH_NB_BRANCH    ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]+1);
     73        DELETE1_SIGNAL(out_DEPTH_TAIL         ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]);
    2874      }
    2975    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    3076
    3177    delete _component;
     78
     79    delete _component_btb;
     80    delete _component_dir;
     81    delete _component_ras;
     82    delete _component_upt;
     83    delete _component_glue;
    3284
    3385    log_printf(FUNC,Prediction_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  256
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
     
    1215#include "Behavioural/include/Allocation.h"
    1316#include <list>
    14 
    15 #define NB_ITERATION  256
    16 #define CYCLE_MAX     (128*NB_ITERATION)
    17 
    18 #define LABEL(str...)                                                   \
    19   {                                                                     \
    20     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    21     msg (str);                                                          \
    22     msg (_("\n"));                                                      \
    23   } while(0)
    24 
    25 #define SC_START(cycle_offset)                                                       \
    26   do                                                                                 \
    27     {                                                                                \
    28       /*cout << "SC_START (begin)" << endl;*/                                        \
    29                                                                                      \
    30       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    31       if (cycle_offset != 0)                                                         \
    32         {                                                                            \
    33           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    34         }                                                                            \
    35                                                                                      \
    36       if (cycle_current > CYCLE_MAX)                                                 \
    37         {                                                                            \
    38           TEST_KO("Maximal cycles Reached");                                         \
    39         }                                                                            \
    40                                                                                      \
    41       sc_start(cycle_offset);                                                        \
    42                                                                                      \
    43       /*cout << "SC_START (end  )" << endl;*/                                        \
    44     } while(0)
    4517
    4618class request_t
     
    7850#endif
    7951
    80   Load_Store_pointer_unit * _Load_Store_pointer_unit = new Load_Store_pointer_unit (name.c_str(),
     52  Load_Store_pointer_unit * _Load_Store_pointer_unit = new Load_Store_pointer_unit
     53    (name.c_str(),
    8154#ifdef STATISTICS
    82                                              _parameters_statistics,
     55     _parameters_statistics,
    8356#endif
    84                                              _param);
     57     _param,
     58     USE_ALL);
    8559 
    8660#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Load_Store_pointer_unit.h

    r81 r82  
    120120#endif
    121121   Parameters                                  * param,
    122    morpheo::behavioural::Tusage_t                usage=USE_ALL
     122   morpheo::behavioural::Tusage_t                usage
    123123   );
    124124  public  :          ~Load_Store_pointer_unit             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Parameters.h

    r81 r82  
    5555  public : ~Parameters () ;
    5656
    57   public :        std::string  msg_error  (void);
     57  public :        Parameters_test msg_error  (void);
    5858
    59   public :        std::string   print      (uint32_t depth);
    60   public : friend std::ostream& operator<< (std::ostream& output_stream,
    61                                             morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::load_store_pointer_unit::Parameters & x);
     59  public :        std::string     print      (uint32_t depth);
     60  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     61                                              morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::load_store_pointer_unit::Parameters & x);
    6262  };
    6363
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Parameters_msg_error.cpp

    r81 r82  
    2121#undef  FUNCTION
    2222#define FUNCTION "Load_Store_pointer_unit::msg_error"
    23   std::string Parameters::msg_error(void)
     23  Parameters_test Parameters::msg_error(void)
    2424  {
    2525    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin");
    2626
    27     std::string msg = "";
     27    Parameters_test test ("Load_Store_pointer_unit");
    2828
    2929    for (uint32_t i=0; i<_nb_load_store_queue; i++)
    3030      {
    3131        if (not (_size_store_queue [i] > 1))
    32           msg += "  - The size of store_queue["+toString(i)+"] must be greater or equal at 2.\n";
     32          test.error(toString(_("The size of store_queue[%d] must be greater or equal at 2.\n"),i));
    3333        if (not (_size_load_queue  [i] > 0))
    34           msg += "  - The size of load_queue["+toString(i)+"] must be greater or equal at 1.\n";
     34          test.error(toString(_("The size of load_queue[%d] must be greater or equal at 1.\n"),i));
    3535      }
    3636
     
    4343          map_lsq [_link_load_store_unit_with_thread[i][j]] = true;
    4444        else
    45           msg += "  - The number of load_store_unit for the thread ["+toString(i)+"]["+toString(j)+"] is too high.\n";
     45          test.error(toString(_("The number of load_store_unit for the thread [%d][%d] is too high.\n"),i,j));
    4646         
    4747    for (uint32_t i=0; i<_nb_load_store_queue; i++)
    4848      if (map_lsq [i] == false)
    49         msg += "  - The load store unit ["+toString(i)+"] is not linked with a thread.\n";
     49        test.error(toString(_("The load store unit [%d] is not linked with a thread.\n"),i));
    5050   
    51     return msg;
     51    return test;
    5252
    5353    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  32
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
     
    1215#include <list>
    1316
    14 #define NB_ITERATION  32
    15 #define CYCLE_MAX     (128*NB_ITERATION)
    16 
    17 #define LABEL(str...)                                                   \
    18   {                                                                     \
    19     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    20     msg (str);                                                          \
    21     msg (_("\n"));                                                      \
    22   } while(0)
    23 
    24 #define SC_START(cycle_offset)                                                       \
    25   do                                                                                 \
    26     {                                                                                \
    27       /*cout << "SC_START (begin)" << endl;*/                                        \
    28                                                                                      \
    29       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    30       if (cycle_offset != 0)                                                         \
    31         {                                                                            \
    32           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    33         }                                                                            \
    34                                                                                      \
    35       if (cycle_current > CYCLE_MAX)                                                 \
    36         {                                                                            \
    37           TEST_KO("Maximal cycles Reached");                                         \
    38         }                                                                            \
    39                                                                                      \
    40       sc_start(cycle_offset);                                                        \
    41                                                                                      \
    42       /*cout << "SC_START (end  )" << endl;*/                                        \
    43     } while(0)
    44 
    4517void test (string name,
    4618           morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::dependency_checking_unit::Parameters * _param)
     
    5224#endif
    5325
    54   Dependency_checking_unit * _Dependency_checking_unit = new Dependency_checking_unit (name.c_str(),
     26  Dependency_checking_unit * _Dependency_checking_unit = new Dependency_checking_unit
     27    (name.c_str(),
    5528#ifdef STATISTICS
    56                                              _parameters_statistics,
     29     _parameters_statistics,
    5730#endif
    58                                              _param);
     31     _param,
     32     USE_ALL);
    5933 
    6034#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/include/Dependency_checking_unit.h

    r81 r82  
    132132#endif
    133133   Parameters                                  * param,
    134    morpheo::behavioural::Tusage_t                usage=USE_ALL
     134   morpheo::behavioural::Tusage_t                usage
    135135   );
    136136  public  :          ~Dependency_checking_unit             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/include/Parameters.h

    r81 r82  
    4848  public : ~Parameters () ;
    4949
    50   public :        std::string  msg_error  (void);
     50  public :        Parameters_test msg_error  (void);
    5151
    52   public :        std::string   print      (uint32_t depth);
    53   public : friend std::ostream& operator<< (std::ostream& output_stream,
    54                                             morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::dependency_checking_unit::Parameters & x);
     52  public :        std::string     print      (uint32_t depth);
     53  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     54                                              morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::dependency_checking_unit::Parameters & x);
    5555  };
    5656
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/src/Parameters_msg_error.cpp

    r81 r82  
    2222#undef  FUNCTION
    2323#define FUNCTION "Dependency_checking_unit::msg_error"
    24   std::string Parameters::msg_error(void)
     24  Parameters_test Parameters::msg_error(void)
    2525  {
    2626    log_printf(FUNC,Dependency_checking_unit,FUNCTION,"Begin");
    2727
    28     std::string msg = "";
     28    Parameters_test test ("Dependency_checking_unit");
    2929
    30     return msg;
     30    return test;
    3131
    3232    log_printf(FUNC,Dependency_checking_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Behavioural/include/Allocation.h"
    12 
    13 #define NB_ITERATION  1
    14 #define CYCLE_MAX     (128*NB_ITERATION)
    15 
    16 #define LABEL(str...)                                                   \
    17   {                                                                     \
    18     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    19     msg (str);                                                          \
    20     msg (_("\n"));                                                      \
    21   } while(0)
    22 
    23 #define SC_START(cycle_offset)                                                       \
    24   do                                                                                 \
    25     {                                                                                \
    26       /*cout << "SC_START (begin)" << endl;*/                                        \
    27                                                                                      \
    28       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    29       if (cycle_offset != 0)                                                         \
    30         {                                                                            \
    31           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    32         }                                                                            \
    33                                                                                      \
    34       if (cycle_current > CYCLE_MAX)                                                 \
    35         {                                                                            \
    36           TEST_KO("Maximal cycles Reached");                                         \
    37         }                                                                            \
    38                                                                                      \
    39       sc_start(cycle_offset);                                                        \
    40                                                                                      \
    41       /*cout << "SC_START (end  )" << endl;*/                                        \
    42     } while(0)
    4315
    4416void test (string name,
     
    5123#endif
    5224
    53   Free_List_unit * _Free_List_unit = new Free_List_unit (name.c_str(),
     25  Free_List_unit * _Free_List_unit = new Free_List_unit
     26    (name.c_str(),
    5427#ifdef STATISTICS
    55                                              _parameters_statistics,
    56 #endif
    57                                              _param);
     28     _parameters_statistics,
     29#endif
     30     _param,
     31     USE_ALL);
    5832 
    5933#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Free_List_unit.h

    r81 r82  
    117117#endif
    118118   Parameters                                  * param,
    119    morpheo::behavioural::Tusage_t                usage=USE_ALL
     119   morpheo::behavioural::Tusage_t                usage
    120120   );
    121121  public  :          ~Free_List_unit             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Parameters.h

    r81 r82  
    5656  public : ~Parameters () ;
    5757
    58   public :        std::string  msg_error  (void);
     58  public :        Parameters_test msg_error  (void);
    5959
    60   public :        std::string   print      (uint32_t depth);
    61   public : friend std::ostream& operator<< (std::ostream& output_stream,
    62                                             morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::free_list_unit::Parameters & x);
     60  public :        std::string     print      (uint32_t depth);
     61  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     62                                              morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::free_list_unit::Parameters & x);
    6363  };
    6464
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Parameters_msg_error.cpp

    r81 r82  
    2222#undef  FUNCTION
    2323#define FUNCTION "Free_List_unit::msg_error"
    24   std::string Parameters::msg_error(void)
     24  Parameters_test Parameters::msg_error(void)
    2525  {
    2626    log_printf(FUNC,Free_List_unit,FUNCTION,"Begin");
    2727
    28     std::string msg = "";
     28    Parameters_test test ("Free_List_unit");
    2929
    3030    if (_nb_general_register <= _nb_thread*_nb_general_register_logic)
    31       msg += "  - The number of physical general register is insufficient.\n";
     31      test.error(_("The number of physical general register is insufficient.\n"));
    3232    if (_nb_special_register <= _nb_thread*_nb_special_register_logic)
    33       msg += "  - The number of physical special register is insufficient.\n";
     33      test.error(_("The number of physical special register is insufficient.\n"));
    3434    if (not is_multiple (_nb_bank, _nb_pop))
    35       msg += "  - Number of pop must be a multiple of number of bank.\n";
     35      test.error(_("Number of pop must be a multiple of number of bank.\n"));
    3636    if (not is_power2 (_nb_bank))
    37       msg += "  - Number of bank must be a power of 2.\n";
     37      test.error(_("Number of bank must be a power of 2.\n"));
    3838
    3939    if ((_priority != PRIORITY_STATIC) and
    4040        (_priority != PRIORITY_ROUND_ROBIN))
    41       msg += "  - Unsupported priority scheme. Supported scheme are "+toString(PRIORITY_STATIC)+" and "+toString(PRIORITY_ROUND_ROBIN)+".\n";
     41      test.error(toString(_("Unsupported priority scheme. Supported scheme are %s and %s.\n"),toString(PRIORITY_STATIC).c_str(),toString(PRIORITY_ROUND_ROBIN).c_str()));
    4242
    43     return msg;
     43    return test;
    4444
    4545    log_printf(FUNC,Free_List_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  64
     10#define CYCLE_MAX     (1024*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
     
    1215#include "Behavioural/include/Allocation.h"
    1316
    14 #define NB_ITERATION  64
    15 #define CYCLE_MAX     (1024*NB_ITERATION)
    16 
    17 #define LABEL(str...)                                                   \
    18   {                                                                     \
    19     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    20     msg (str);                                                          \
    21     msg (_("\n"));                                                      \
    22   } while(0)
    23 
    24 #define SC_START(cycle_offset)                                                       \
    25   do                                                                                 \
    26     {                                                                                \
    27       /*cout << "SC_START (begin)" << endl;*/                                        \
    28                                                                                      \
    29       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    30       if (cycle_offset != 0)                                                         \
    31         {                                                                            \
    32           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    33         }                                                                            \
    34                                                                                      \
    35       if (cycle_current > CYCLE_MAX)                                                 \
    36         {                                                                            \
    37           TEST_KO("Maximal cycles Reached");                                         \
    38         }                                                                            \
    39                                                                                      \
    40       sc_start(cycle_offset);                                                        \
    41                                                                                      \
    42       /*cout << "SC_START (end  )" << endl;*/                                        \
    43     } while(0)
    44 
    4517void test (string name,
    4618           morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_address_translation_unit::Parameters * _param)
     
    5224#endif
    5325
    54   Register_Address_Translation_unit * _Register_Address_Translation_unit = new Register_Address_Translation_unit (name.c_str(),
     26  Register_Address_Translation_unit * _Register_Address_Translation_unit = new Register_Address_Translation_unit
     27    (name.c_str(),
    5528#ifdef STATISTICS
    56                                              _parameters_statistics,
     29     _parameters_statistics,
    5730#endif
    58                                              _param);
     31     _param,
     32     USE_ALL);
    5933 
    6034#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Parameters.h

    r81 r82  
    5151  public : ~Parameters () ;
    5252
    53   public :        std::string  msg_error  (void);
     53  public :        Parameters_test msg_error  (void);
    5454
    55   public :        std::string   print      (uint32_t depth);
    56   public : friend std::ostream& operator<< (std::ostream& output_stream,
    57                                             morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_address_translation_unit::Parameters & x);
     55  public :        std::string     print      (uint32_t depth);
     56  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     57                                              morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_address_translation_unit::Parameters & x);
    5858  };
    5959
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Register_Address_Translation_unit.h

    r81 r82  
    135135#endif
    136136   Parameters                                  * param,
    137    morpheo::behavioural::Tusage_t                usage=USE_ALL
     137   morpheo::behavioural::Tusage_t                usage
    138138   );
    139139  public  :          ~Register_Address_Translation_unit             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Parameters_msg_error.cpp

    r81 r82  
    1919namespace register_address_translation_unit {
    2020
    21 
    2221#undef  FUNCTION
    2322#define FUNCTION "Register_Address_Translation_unit::msg_error"
    24   std::string Parameters::msg_error(void)
     23  Parameters_test Parameters::msg_error(void)
    2524  {
    2625    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
    2726
    28     std::string msg = "";
     27    Parameters_test test ("Register_Address_Translation_unit");
    2928
    30     return msg;
     29    return test;
    3130
    3231    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  256
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Behavioural/include/Allocation.h"
    12 
    13 #define NB_ITERATION  256
    14 #define CYCLE_MAX     (128*NB_ITERATION)
    15 
    16 #define LABEL(str...)                                                   \
    17   {                                                                     \
    18     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    19     msg (str);                                                          \
    20     msg (_("\n"));                                                      \
    21   } while(0)
    22 
    23 #define SC_START(cycle_offset)                                                       \
    24   do                                                                                 \
    25     {                                                                                \
    26       /*cout << "SC_START (begin)" << endl;*/                                        \
    27                                                                                      \
    28       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    29       if (cycle_offset != 0)                                                         \
    30         {                                                                            \
    31           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    32         }                                                                            \
    33                                                                                      \
    34       if (cycle_current > CYCLE_MAX)                                                 \
    35         {                                                                            \
    36           TEST_KO("Maximal cycles Reached");                                         \
    37         }                                                                            \
    38                                                                                      \
    39       sc_start(cycle_offset);                                                        \
    40                                                                                      \
    41       /*cout << "SC_START (end  )" << endl;*/                                        \
    42     } while(0)
    4315
    4416void test (string name,
     
    5123#endif
    5224
    53   Register_translation_unit_Glue * _Register_translation_unit_Glue = new Register_translation_unit_Glue (name.c_str(),
     25  Register_translation_unit_Glue * _Register_translation_unit_Glue = new Register_translation_unit_Glue
     26    (name.c_str(),
    5427#ifdef STATISTICS
    55                                              _parameters_statistics,
    56 #endif
    57                                              _param);
     28     _parameters_statistics,
     29#endif
     30     _param,
     31     USE_ALL);
    5832 
    5933#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/include/Parameters.h

    r81 r82  
    3535  public : ~Parameters () ;
    3636
    37   public :        std::string  msg_error  (void);
     37  public :        Parameters_test msg_error  (void);
    3838
    39   public :        std::string   print      (uint32_t depth);
    40   public : friend std::ostream& operator<< (std::ostream& output_stream,
    41                                             morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_translation_unit_glue::Parameters & x);
     39  public :        std::string     print      (uint32_t depth);
     40  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     41                                              morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_translation_unit_glue::Parameters & x);
    4242  };
    4343
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/include/Register_translation_unit_Glue.h

    r81 r82  
    107107#endif
    108108   Parameters                                  * param,
    109    morpheo::behavioural::Tusage_t                usage=USE_ALL
     109   morpheo::behavioural::Tusage_t                usage
    110110   );
    111111  public  :          ~Register_translation_unit_Glue             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/src/Parameters_msg_error.cpp

    r81 r82  
    2222#undef  FUNCTION
    2323#define FUNCTION "Register_translation_unit_Glue::msg_error"
    24   std::string Parameters::msg_error(void)
     24  Parameters_test Parameters::msg_error(void)
    2525  {
    2626    log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"Begin");
    2727
    28     std::string msg = "";
     28    Parameters_test test ("Register_translation_unit_Glue");
    2929
    30     return msg;
     30    return test;
    3131
    3232    log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Behavioural/include/Allocation.h"
    12 
    13 #define NB_ITERATION  1
    14 #define CYCLE_MAX     (128*NB_ITERATION)
    15 
    16 #define LABEL(str...)                                                   \
    17   {                                                                     \
    18     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    19     msg (str);                                                          \
    20     msg (_("\n"));                                                      \
    21   } while(0)
    22 
    23 #define SC_START(cycle_offset)                                                       \
    24   do                                                                                 \
    25     {                                                                                \
    26       /*cout << "SC_START (begin)" << endl;*/                                        \
    27                                                                                      \
    28       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    29       if (cycle_offset != 0)                                                         \
    30         {                                                                            \
    31           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    32         }                                                                            \
    33                                                                                      \
    34       if (cycle_current > CYCLE_MAX)                                                 \
    35         {                                                                            \
    36           TEST_KO("Maximal cycles Reached");                                         \
    37         }                                                                            \
    38                                                                                      \
    39       sc_start(cycle_offset);                                                        \
    40                                                                                      \
    41       /*cout << "SC_START (end  )" << endl;*/                                        \
    42     } while(0)
    4315
    4416void test (string name,
     
    5123#endif
    5224
    53   Register_translation_unit * _Register_translation_unit = new Register_translation_unit (name.c_str(),
     25  Register_translation_unit * _Register_translation_unit = new Register_translation_unit
     26    (name.c_str(),
    5427#ifdef STATISTICS
    55                                              _parameters_statistics,
    56 #endif
    57                                              _param);
     28     _parameters_statistics,
     29#endif
     30     _param,
     31     USE_ALL);
    5832 
    5933#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Behavioural/include/Allocation.h"
    1215#include <list>
    13 
    14 #define NB_ITERATION  1
    15 #define CYCLE_MAX     (128*NB_ITERATION)
    16 
    17 #define LABEL(str...)                                                   \
    18   {                                                                     \
    19     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    20     msg (str);                                                          \
    21     msg (_("\n"));                                                      \
    22   } while(0)
    23 
    24 #define SC_START(cycle_offset)                                                       \
    25   do                                                                                 \
    26     {                                                                                \
    27       /*cout << "SC_START (begin)" << endl;*/                                        \
    28                                                                                      \
    29       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    30       if (cycle_offset != 0)                                                         \
    31         {                                                                            \
    32           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    33         }                                                                            \
    34                                                                                      \
    35       if (cycle_current > CYCLE_MAX)                                                 \
    36         {                                                                            \
    37           TEST_KO("Maximal cycles Reached");                                         \
    38         }                                                                            \
    39                                                                                      \
    40       sc_start(cycle_offset);                                                        \
    41                                                                                      \
    42       /*cout << "SC_START (end  )" << endl;*/                                        \
    43     } while(0)
    4416
    4517
     
    6234#endif
    6335
    64   Stat_List_unit * _Stat_List_unit = new Stat_List_unit (name.c_str(),
     36  Stat_List_unit * _Stat_List_unit = new Stat_List_unit
     37    (name.c_str(),
    6538#ifdef STATISTICS
    66                                              _parameters_statistics,
     39     _parameters_statistics,
    6740#endif
    68                                              _param);
     41     _param,
     42     USE_ALL);
    6943 
    7044#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Parameters.h

    r81 r82  
    6868  public : ~Parameters () ;
    6969
    70   public :        std::string  msg_error  (void);
     70  public :        Parameters_test msg_error  (void);
    7171
    72   public :        std::string   print      (uint32_t depth);
    73   public : friend std::ostream& operator<< (std::ostream& output_stream,
    74                                             morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::stat_list_unit::Parameters & x);
     72  public :        std::string     print      (uint32_t depth);
     73  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     74                                              morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::stat_list_unit::Parameters & x);
    7575  };
    7676
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Stat_List_unit.h

    r81 r82  
    136136#endif
    137137   Parameters                                  * param,
    138    morpheo::behavioural::Tusage_t                usage=USE_ALL
     138   morpheo::behavioural::Tusage_t                usage
    139139   );
    140140  public  :          ~Stat_List_unit             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Parameters_msg_error.cpp

    r81 r82  
    2222#undef  FUNCTION
    2323#define FUNCTION "Stat_List_unit::msg_error"
    24   std::string Parameters::msg_error(void)
     24  Parameters_test Parameters::msg_error(void)
    2525  {
    2626    log_printf(FUNC,Stat_List_unit,FUNCTION,"Begin");
    2727
    28     std::string msg = "";
     28    Parameters_test test("Stat_List_unit");
    2929
    3030    if (not is_multiple(_nb_bank, _nb_reg_free))
    31       msg += "  - nb_bank must be a multiple of nb_reg_free.\n";
     31      test.error(_("nb_bank must be a multiple of nb_reg_free.\n"));
    3232
    3333    if (_nb_general_register < _nb_gpr_use_init)
    34       msg += "  - the number of physical general register is insuffisant. (you need less "+toString(_nb_gpr_use_init)+" registers.\n";
     34      test.error(toString(_("the number of physical general register is insuffisant. (you need less %d registers.\n"),_nb_gpr_use_init));
    3535
    3636    if (_nb_special_register < _nb_spr_use_init)
    37       msg += "  - the number of physical special register is insuffisant. (you need less "+toString(_nb_spr_use_init)+" registers.\n";
     37      test.error(toString(_("the number of physical special register is insuffisant. (you need less %d registers.\n"),_nb_spr_use_init));
    3838   
    3939    if (not is_power2(_nb_general_register))
    40       msg += "  - the number of physical general register must be a power of 2.\n";
     40      test.error(_("the number of physical general register must be a power of 2.\n"));
    4141
    4242    if (not is_power2(_nb_special_register))
    43       msg += "  - the number of physical special register must be a power of 2.\n";
     43      test.error(_("the number of physical special register must be a power of 2.\n"));
    4444
    4545    if (not is_power2(_nb_bank))
    46       msg += "  - the number of bank must be a power of 2.\n";
     46      test.error(_("the number of bank must be a power of 2.\n"));
    4747
    48     return msg;
     48    return test;
    4949
    5050    log_printf(FUNC,Stat_List_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/include/Parameters.h

    r81 r82  
    6666  public : ~Parameters () ;
    6767
    68   public :        std::string  msg_error  (void);
     68  public :        Parameters_test msg_error  (void);
    6969
    70   public :        std::string   print      (uint32_t depth);
    71   public : friend std::ostream& operator<< (std::ostream& output_stream,
    72                                             morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::Parameters & x);
     70  public :        std::string     print      (uint32_t depth);
     71  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     72                                              morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::Parameters & x);
    7373  };
    7474
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/include/Register_translation_unit.h

    r81 r82  
    155155#endif
    156156   Parameters                                  * param,
    157    morpheo::behavioural::Tusage_t                usage=USE_ALL
     157   morpheo::behavioural::Tusage_t                usage
    158158   );
    159159  public  :          ~Register_translation_unit             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Parameters_msg_error.cpp

    r81 r82  
    2121#undef  FUNCTION
    2222#define FUNCTION "Register_translation_unit::msg_error"
    23   std::string Parameters::msg_error(void)
     23  Parameters_test Parameters::msg_error(void)
    2424  {
    2525    log_printf(FUNC,Register_translation_unit,FUNCTION,"Begin");
    2626
    27     std::string msg = "";
     27    Parameters_test test("Register_translation_unit");
    2828
    29     return msg;
     29    return test;
    3030
    3131    log_printf(FUNC,Register_translation_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_allocation.cpp

    r81 r82  
    137137          ,param_statistics
    138138#endif
    139           ,_param->_param_dependency_checking_unit);
     139          ,_param->_param_dependency_checking_unit
     140          ,_usage);
    140141       
    141142       _component->set_component (_component_dependency_checking_unit->_component
     
    155156          ,param_statistics
    156157#endif
    157           ,_param->_param_free_list_unit);
     158          ,_param->_param_free_list_unit
     159          ,_usage);
    158160       
    159161       _component->set_component (_component_free_list_unit->_component
     
    173175          ,param_statistics
    174176#endif
    175           ,_param->_param_register_address_translation_unit);
     177          ,_param->_param_register_address_translation_unit
     178          ,_usage);
    176179       
    177180       _component->set_component (_component_register_address_translation_unit->_component
     
    191194          ,param_statistics
    192195#endif
    193           ,_param->_param_stat_list_unit);
     196          ,_param->_param_stat_list_unit
     197          ,_usage);
    194198       
    195199       _component->set_component (_component_stat_list_unit->_component
     
    209213          ,param_statistics
    210214#endif
    211           ,_param->_param_register_translation_unit_glue);
     215          ,_param->_param_register_translation_unit_glue
     216          ,_usage);
    212217       
    213218       _component->set_component (_component_register_translation_unit_glue->_component
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/src/test.cpp

    r81 r82  
    66 * Test
    77 */
     8#define NB_ITERATION  256
     9#define CYCLE_MAX     (128*NB_ITERATION)
    810
    911#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/include/test.h"
     
    1214#include "Behavioural/include/Allocation.h"
    1315
    14 #define NB_ITERATION  256
    15 #define CYCLE_MAX     (128*NB_ITERATION)
    16 
    17 #define LABEL(str...)                                                   \
    18   {                                                                     \
    19     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    20     msg (str);                                                          \
    21     msg (_("\n"));                                                      \
    22   } while(0)
    23 
    24 #define SC_START(cycle_offset)                                                       \
    25   do                                                                                 \
    26     {                                                                                \
    27       /*cout << "SC_START (begin)" << endl;*/                                        \
    28                                                                                      \
    29       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    30       if (cycle_offset != 0)                                                         \
    31         {                                                                            \
    32           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    33         }                                                                            \
    34                                                                                      \
    35       if (cycle_current > CYCLE_MAX)                                                 \
    36         {                                                                            \
    37           TEST_KO("Maximal cycles Reached");                                         \
    38         }                                                                            \
    39                                                                                      \
    40       sc_start(cycle_offset);                                                        \
    41                                                                                      \
    42       /*cout << "SC_START (end  )" << endl;*/                                        \
    43     } while(0)
    44 
    4516void test (string name,
    4617           morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::rename_select::Parameters * _param)
     
    5223#endif
    5324
    54   Rename_select * _Rename_select = new Rename_select (name.c_str(),
     25  Rename_select * _Rename_select = new Rename_select
     26    (name.c_str(),
    5527#ifdef STATISTICS
    56                                              _parameters_statistics,
     28     _parameters_statistics,
    5729#endif
    58                                              _param);
     30     _param,
     31     USE_ALL);
    5932 
    6033#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Parameters.h

    r81 r82  
    5858  public : ~Parameters () ;
    5959
    60   public :        std::string  msg_error  (void);
     60  public :        Parameters_test msg_error  (void);
    6161
    62   public :        std::string   print      (uint32_t depth);
    63   public : friend std::ostream& operator<< (std::ostream& output_stream,
    64                                             morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::rename_select::Parameters & x);
     62  public :        std::string     print      (uint32_t depth);
     63  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     64                                              morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::rename_select::Parameters & x);
    6565  };
    6666
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Rename_select.h

    r81 r82  
    134134#endif
    135135   Parameters                                  * param,
    136    morpheo::behavioural::Tusage_t                usage=USE_ALL
     136   morpheo::behavioural::Tusage_t                usage
    137137   );
    138138  public  :          ~Rename_select             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Parameters_msg_error.cpp

    r81 r82  
    2121#undef  FUNCTION
    2222#define FUNCTION "Rename_select::msg_error"
    23   std::string Parameters::msg_error(void)
     23  Parameters_test Parameters::msg_error(void)
    2424  {
    2525    log_printf(FUNC,Rename_select,FUNCTION,"Begin");
    2626
    27     std::string msg = "";
     27    Parameters_test test("Rename_select");
    2828
    2929    if ((_nb_front_end_select == 0) or
    3030        (_nb_front_end_select > _nb_front_end))
    31       msg += "  - nb_front_end_select must be in [1:nb_front_end].\n";
     31      test.error(_("nb_front_end_select must be in [1:nb_front_end].\n"));
    3232
    3333    if ((_priority != PRIORITY_STATIC) and
    3434        (_priority != PRIORITY_ROUND_ROBIN))
    35       msg += "  - Unsupported priority scheme. Supported scheme are : "+toString(PRIORITY_STATIC)+" and "+toString(PRIORITY_ROUND_ROBIN)+".\n";
     35      test.error(toString(_("Unsupported priority scheme. Supported scheme are : %s and %s.\n"),toString(PRIORITY_STATIC).c_str(),toString(PRIORITY_ROUND_ROBIN).c_str()));
    3636   
    3737    if ((_load_balancing != LOAD_BALANCING_BALANCE) and
    3838        (_load_balancing != LOAD_BALANCING_MAXIMUM_FOR_PRIORITY))
    39       msg += "  - Unsupported load_balancing scheme. Supported scheme are : "+toString(LOAD_BALANCING_BALANCE)+" and "+toString(LOAD_BALANCING_MAXIMUM_FOR_PRIORITY)+".\n";
     39      test.error(toString(_("Unsupported load_balancing scheme. Supported scheme are : %s and %s.\n"),toString(LOAD_BALANCING_BALANCE).c_str(),toString(LOAD_BALANCING_MAXIMUM_FOR_PRIORITY).c_str()));
    4040
    41     return msg;
     41    return test;
    4242
    4343    log_printf(FUNC,Rename_select,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/include/Random.h

    r81 r82  
    3434  public  : custom_execute_transition_t * get_custom_execute_transition (void);
    3535  public  : custom_execute_transition_t * get_custom_execute_reset      (void);
     36   
     37  private : static void function_transition
     38  (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t  * reg,
     39   morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t     * param);
    3640
    37   private : static void Random::function_transition (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t  * reg,
    38                                                       morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t     * param);
    39   private : static void Random::function_reset      (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t  * reg,
    40                                                       morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t     * param);
    41     };
     41  private : static void function_reset     
     42  (morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_register_t  * reg,
     43   morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::execute_param_t     * param);
     44  };
    4245 
    4346}; // end namespace random
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp

    r81 r82  
    88
    99#define NB_ITERATION 1024
     10#define CYCLE_MAX    1024*NB_ITERATION
    1011
    1112#include "Behavioural/Generic/Counter/SelfTest/include/test.h"
     
    4041                                    param_stat,
    4142#endif
    42                                     param);
     43                                    param,
     44                                    USE_ALL);
    4345 
    4446#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h

    r81 r82  
    2626#endif
    2727#include "Behavioural/include/Component.h"
     28#include "Behavioural/include/Usage.h"
    2829
    2930namespace morpheo {
     
    3940    // -----[ fields ]----------------------------------------------------
    4041    // Parameters
    41   protected : const std::string     _name;
    42 
    43   protected : const Parameters _param;
     42  protected : const std::string _name;
     43  protected : const Parameters  _param;
     44  private   : const Tusage_t    _usage;
    4445
    4546#ifdef STATISTICS
     
    7879                                           morpheo::behavioural::Parameters_Statistics * param_statistics,
    7980#endif
    80                                            Parameters                                  param );
     81                                           Parameters param,
     82                                           Tusage_t   usage);
    8183                                               
    8284  public  :          Counter              (Parameters param );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter.cpp

    r81 r82  
    1414
    1515
     16  Counter::Counter
     17  (
    1618#ifdef SYSTEMC
    17   Counter::Counter (sc_module_name name,
     19  sc_module_name name,
    1820#else
    19   Counter::Counter (string name,
     21  std::string name,
    2022#endif
    2123#ifdef STATISTICS
    22                               morpheo::behavioural::Parameters_Statistics * param_statistics,
     24  morpheo::behavioural::Parameters_Statistics * param_statistics,
    2325#endif
    24                               morpheo::behavioural::generic::counter::Parameters param ):
    25                               _name              (name)
    26                               ,_param            (param)
     26  morpheo::behavioural::generic::counter::Parameters param,
     27   Tusage_t usage):
     28    _name  (name),
     29    _param (param),
     30    _usage (usage)
    2731  {
    2832    log_printf(FUNC,Counter,"Counter","Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp

    r81 r82  
    1414namespace counter {
    1515
    16 
    1716  void Counter::allocation (void)
    1817  {
    1918    log_printf(FUNC,Counter,"allocation","Begin");
    2019
    21     _component   = new Component ();
     20    _component   = new Component (_usage);
    2221
    2322    Entity * entity = _component->set_entity (_name     
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
    9 #include "Behavioural/Generic/Queue/SelfTest/include/test.h"
    10 #include "Common/include/Test.h"
    11 
    129#define NB_ITERATION  1
    1310#define CYCLE_MAX     (2048*NB_ITERATION)
    1411
    15 #define LABEL(str)                                                                       \
    16 {                                                                                        \
    17   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
    18 } while(0)
    19 
    20 static uint32_t cycle = 0;
    21 
    22 #define SC_START(cycle_offset)                                          \
    23 do                                                                      \
    24 {                                                                       \
    25 /*cout << "SC_START (begin)" << endl;*/                                 \
    26                                                                         \
    27   uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
    28   if (cycle_current != cycle)                                           \
    29     {                                                                   \
    30       cycle = cycle_current;                                            \
    31       cout << "##########[ cycle "<< cycle << " ]" << endl;             \
    32     }                                                                   \
    33                                                                         \
    34   if (cycle_current > CYCLE_MAX)                                        \
    35     {                                                                   \
    36       TEST_KO("Maximal cycles Reached");                                \
    37     }                                                                   \
    38   sc_start(cycle_offset);                                               \
    39 /*cout << "SC_START (end  )" << endl;*/                                 \
    40 } while(0)
     12#include "Behavioural/Generic/Queue/SelfTest/include/test.h"
     13#include "Common/include/Test.h"
    4114
    4215void test (string name,
     
    4922#endif
    5023
    51   Queue * _Queue = new Queue (name.c_str(),
     24  Queue * _Queue = new Queue
     25    (name.c_str(),
    5226#ifdef STATISTICS
    53                                              _parameters_statistics,
     27     _parameters_statistics,
    5428#endif
    55                                              _param);
     29     _param,
     30     USE_ALL);
    5631 
    5732#ifdef SYSTEMC
     
    12196  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    12297    {
    123       LABEL("Iteration "+toString(iteration));
     98      LABEL("Iteration %d",iteration);
    12499
    125100      while (data_out <= nb_request)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/include/Queue.h

    r81 r82  
    102102#endif
    103103   Parameters                                  * param,
    104    morpheo::behavioural::Tusage_t                usage=USE_ALL
     104   morpheo::behavioural::Tusage_t                usage
    105105   );
    106106  public  :          ~Queue             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp

    r81 r82  
    88
    99#define NB_ITERATION 16
    10 
     10#define CYCLE_MAX    1024*NB_ITERATION
    1111#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/include/test.h"
    1212#include "Common/include/Test.h"
     
    3636  morpheo::behavioural::Parameters_Statistics * _param_stat = new morpheo::behavioural::Parameters_Statistics (5,100);
    3737#endif
    38   RegisterFile_Monolithic * registerfile = new RegisterFile_Monolithic (name.c_str()
     38  RegisterFile_Monolithic * registerfile = new RegisterFile_Monolithic
     39    (name.c_str()
    3940#ifdef STATISTICS
    40                                                                         ,_param_stat
     41     ,_param_stat
    4142#endif
    42                                                                         ,_param);
     43     ,_param
     44     ,USE_ALL);
    4345 
    4446#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h

    r81 r82  
    105105#endif
    106106   ,Parameters                                  * param
    107    ,morpheo::behavioural::Tusage_t                usage=USE_ALL
     107   ,morpheo::behavioural::Tusage_t                usage
    108108   );
    109109
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h

    r81 r82  
    1717namespace registerfile_monolithic    {
    1818
    19   typedef uint32_t Taddress_t;
     19//   typedef uint32_t Taddress_t;
    2020  typedef uint32_t Tdata_t;
    2121 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/src/test.cpp

    r81 r82  
    1313#include "Common/include/Test.h"
    1414
    15 
    16 #define LABEL(str)                                                                       \
    17 {                                                                                        \
    18   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
    19 } while(0)
    20 
    21 #define SC_START(cycle)                                        \
    22 do                                                             \
    23 {                                                              \
    24   if (static_cast<uint32_t>(sc_simulation_time()) > CYCLE_MAX) \
    25     {                                                          \
    26       TEST_KO("Maximal cycles Reached");                       \
    27     }                                                          \
    28   sc_start(cycle);                                             \
    29 } while(0)
    30 
    3115void test (string name,
    3216           morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * _param)
     
    3923#endif
    4024
    41   RegisterFile_Multi_Banked * _RegisterFile_Multi_Banked = new RegisterFile_Multi_Banked (name.c_str(),
     25  RegisterFile_Multi_Banked * _RegisterFile_Multi_Banked = new RegisterFile_Multi_Banked
     26    (name.c_str(),
    4227#ifdef STATISTICS
    43                                                                                           _param_stat,
     28     _param_stat,
    4429#endif
    45                                                                                           _param);
     30     _param,
     31     USE_ALL);
    4632 
    4733#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h

    r81 r82  
    2626#include "Behavioural/include/Vhdl.h"
    2727#endif
     28#include "Behavioural/include/Usage.h"
    2829
    2930namespace morpheo {
     
    4142    // -----[ fields ]----------------------------------------------------
    4243    // Parameters
    43   protected : const std::string       _name;
    44 
     44  protected : const std::string  _name;
    4545  protected : const Parameters * _param;
    46 
     46  private   : const Tusage_t     _usage;
     47   
    4748#ifdef STATISTICS
    4849  public    : Stat                           * _stat;
     
    100101                                              morpheo::behavioural::Parameters_Statistics * param_statistics,
    101102#endif
    102                                               Parameters                                  * param );
     103                                              Parameters * param,
     104                                              Tusage_t     usage);
    103105                                               
    104106  public  :          ~RegisterFile_Multi_Banked             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h

    r81 r82  
    1818namespace registerfile_multi_banked {
    1919
    20   typedef uint32_t Taddress_t;
     20//typedef uint32_t Taddress_t;
    2121  typedef uint32_t Tdata_t;
    2222
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked.cpp

    r81 r82  
    1414namespace registerfile_multi_banked {
    1515
    16 
     16  RegisterFile_Multi_Banked::RegisterFile_Multi_Banked
     17  (
    1718#ifdef SYSTEMC
    18   RegisterFile_Multi_Banked::RegisterFile_Multi_Banked (sc_module_name name,
     19   sc_module_name name,
    1920#else
    20   RegisterFile_Multi_Banked::RegisterFile_Multi_Banked (string name,
     21   std::string name,
    2122#endif
    2223#ifdef STATISTICS
    23                               morpheo::behavioural::Parameters_Statistics * param_statistics,
     24   morpheo::behavioural::Parameters_Statistics * param_statistics,
    2425#endif
    25                               morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * param ):
    26                               _name              (name)
    27                               ,_param            (param)
     26   morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * param,
     27   Tusage_t usage):
     28    _name              (name)
     29    ,_param            (param)
     30    ,_usage (usage)
    2831  {
    2932    log_printf(FUNC,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_allocation.cpp

    r81 r82  
    2020    log_printf(FUNC,RegisterFile_Multi_Banked,"allocation","Begin");
    2121
    22     _component   = new Component ();
     22    _component   = new Component (_usage);
    2323
    2424    Entity * entity = _component->set_entity (_name       
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (256*NB_ITERATION)
     11
    912#include "Behavioural/Generic/RegisterFile/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    11 
    12 #define NB_ITERATION  1
    13 #define CYCLE_MAX     (256*NB_ITERATION)
    14 
    15 #define LABEL(str)                                                                       \
    16 {                                                                                        \
    17   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} " << str << endl; \
    18 } while(0)
    19 
    20 #define SC_START(cycle)                                        \
    21 do                                                             \
    22 {                                                              \
    23   if (static_cast<uint32_t>(sc_simulation_time()) > CYCLE_MAX) \
    24     {                                                          \
    25       TEST_KO("Maximal cycles Reached");                       \
    26     }                                                          \
    27   sc_start(cycle);                                             \
    28 } while(0)
    2914
    3015void test (string name,
     
    4126                                                   _param_stat,
    4227#endif
    43                                                    _param);
     28                                                   _param,
     29                                                   USE_ALL);
    4430 
    4531#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/RegisterFile.h

    r81 r82  
    2929#include "Behavioural/include/Vhdl.h"
    3030#endif
     31#include "Behavioural/include/Usage.h"
    3132
    3233namespace morpheo {
     
    4344    // -----[ fields ]----------------------------------------------------
    4445    // Parameters
    45   protected : const std::string       _name;
    46 
     46  protected : const std::string  _name;
    4747  protected : const Parameters * _param;
     48  private   : const Tusage_t     _usage;
    4849
    4950#ifdef STATISTICS
     
    9596                                                morpheo::behavioural::Parameters_Statistics * param_statistics,
    9697#endif
    97                                                 Parameters                                  * param );
     98                                                Parameters                                  * param ,
     99                                                Tusage_t usage);
    98100   
    99101  public  :          ~RegisterFile             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile.cpp

    r81 r82  
    1414
    1515
     16  RegisterFile::RegisterFile (
    1617#ifdef SYSTEMC
    17   RegisterFile::RegisterFile (sc_module_name name,
     18                              sc_module_name name,
    1819#else
    19   RegisterFile::RegisterFile (string name,
     20                              std::string name,
    2021#endif
    2122#ifdef STATISTICS
    2223                              morpheo::behavioural::Parameters_Statistics             * param_statistics,
    2324#endif
    24                               morpheo::behavioural::generic::registerfile::Parameters * param ):
    25                               _name              (name)
    26                               ,_param            (param)
     25                              morpheo::behavioural::generic::registerfile::Parameters * param,
     26                              Tusage_t usage):
     27    _name              (name)
     28    ,_param            (param)
     29    ,_usage (usage)
    2730  {
    2831    log_printf(FUNC,RegisterFile,"RegisterFile","Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_allocation.cpp

    r81 r82  
    8787#endif
    8888                                                                                                                                                                               ,_param->_param_registerfile_monolithic
    89                                                                                                                                                                                );
     89                                                                                                                                                                               ,_usage);
    9090       
    9191      }
     
    9898#endif
    9999                                                                                                                                                                                ,_param->_param_registerfile_multi_banked
    100                                                                                                                                                                                 );
     100                                                                                                                                                                                ,_usage);
    101101       
    102102      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp

    r81 r82  
    88
    99#define NB_ITERATION 512
     10#define CYCLE_MAX    (1024*NB_ITERATION)
    1011
    1112#include "Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/include/test.h"
     
    2122  morpheo::behavioural::Parameters_Statistics * _param_stat = new morpheo::behavioural::Parameters_Statistics (5,50);
    2223#endif
    23   Select_Priority_Fixed * _Select_Priority_Fixed = new Select_Priority_Fixed (name.c_str(),
     24  Select_Priority_Fixed * _Select_Priority_Fixed = new Select_Priority_Fixed
     25    (name.c_str(),
    2426#ifdef STATISTICS
    25                                                                               _param_stat,
     27     _param_stat,
    2628#endif
    27                                                                               _param);
     29     _param,
     30     USE_ALL);
    2831 
    2932#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h

    r81 r82  
    9191#endif
    9292   Parameters                                  * param ,
    93    morpheo::behavioural::Tusage_t                usage=USE_ALL);
     93   morpheo::behavioural::Tusage_t                usage);
    9494   
    9595  public  :          ~Select_Priority_Fixed             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION 64
     10#define CYCLE_MAX    (1024*NB_ITERATION)
     11
    912#include "Behavioural/Generic/Shifter/SelfTest/include/test.h"
    1013#include "Common/include/BitManipulation.h"
    1114#include "Common/include/Test.h"
    12 
    13 #define NB_ITERATION 64
    1415
    1516void test (string name,
     
    4142                                    param_stat,
    4243#endif
    43                                     param);
     44                                    &param,
     45                                    USE_ALL);
    4446 
    4547#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Parameters.h

    r81 r82  
    5959  public : ~Parameters () ;
    6060
    61   public :        std::string  msg_error  (void);
    62   public :        std::string   print      (uint32_t depth);
    63   public : friend std::ostream& operator<< (std::ostream& output_stream,
    64                                             morpheo::behavioural::generic::shifter::Parameters & x);
     61  public :        Parameters_test msg_error  (void);
     62  public :        std::string     print      (uint32_t depth);
     63  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     64                                              morpheo::behavioural::generic::shifter::Parameters & x);
    6565  };
    6666
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Shifter.h

    r81 r82  
    2525#endif
    2626#include "Behavioural/include/Component.h"
     27#include "Behavioural/include/Usage.h"
    2728
    2829namespace morpheo                    {
     
    3940    // -----[ fields ]----------------------------------------------------
    4041    // Parameters
    41   protected : const std::string     _name;
     42  protected : const std::string  _name;
     43  protected : const Parameters * _param;
     44  private   : const Tusage_t     _usage;
    4245
    43   protected : const Parameters _param;
    4446#ifdef STATISTICS
    4547  public    : Stat                           * _stat;
     
    8486                                           morpheo::behavioural::Parameters_Statistics * param_statistics,
    8587#endif
    86                                            Parameters                                    param );
     88                                           Parameters                                  * param,
     89                                           morpheo::behavioural::Tusage_t                usage
     90                                           );
    8791   
    8892  public  :          Shifter              (Parameters param );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters_msg_error.cpp

    r81 r82  
    1515namespace shifter {
    1616
    17   std::string Parameters::msg_error(void)
     17  Parameters_test Parameters::msg_error(void)
    1818  {
    19     std::string msg = "";
     19    Parameters_test test ("Shifter");
    2020
    2121    if (_size_data < 2)
    22       {
    23         msg += "  - size_data must be > 1\n";
    24         msg += "    * size_data                       : " + toString(_size_data) + "\n";
    25       }
    26 
     22      test.error("size_data must be > 1\n");
     23   
    2724    if (is_positive(_nb_port) == false)
    28       {
    29         msg += "  - nb_port must be > 0\n";
    30         msg += "    * nb_port                         : " + toString(_nb_port) + "\n";
    31       }
    32 
     25      test.error("nb_port must be > 0\n");
     26   
    3327    if (_shift_value > _size_data)
    34       {
    35         msg += "  - shift_value must be < size_data\n";
    36         msg += "    * shift_value                     : " + toString(_shift_value) + "\n";
    37         msg += "    * size_data                       : " + toString(_size_data)   + "\n";
    38       }   
    39 
     28      test.error("shift_value must be < size_data\n"); 
     29   
    4030    if ( (_rotate == internal_rotate) && (_carry != internal_logic))
    41       {
    42         msg += "  - Incompatible parameters : internal_rotate have never carry (must be set at \"internal_logic\"\n";
    43         msg += "    * rotate                          : " + toString(_rotate) + "\n";
    44         msg += "    * carry                           : " + toString(_carry ) + "\n";
    45       }   
    46 
     31      test.error("Incompatible parameters : internal_rotate have never carry (must be set at \"internal_logic\"\n");
     32   
    4733    if (_type_completion_bool && (_size_data_completion != 1))
    48       {
    49         msg += "  - Incompatible parameters : you can't have the type of port in_SHIFTER_COMPLETION at bool. Because, This port must be more bits\n";
    50         msg += "    * size_data_completion            : " + toString (_size_data_completion) + "\n";
    51       }
     34      test.error("Incompatible parameters : you can't have the type of port in_SHIFTER_COMPLETION at bool. Because, This port must be more bits\n");
    5235     
    53     return msg;
     36    return test;
    5437  };
    5538
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter.cpp

    r81 r82  
    1414
    1515
     16  Shifter::Shifter (
    1617#ifdef SYSTEMC
    17   Shifter::Shifter (sc_module_name name
     18                    sc_module_name name
    1819#else
    19   Shifter::Shifter (string name
     20                    std::string name
    2021#endif
    2122#ifdef STATISTICS
    2223                    ,morpheo::behavioural::Parameters_Statistics * param_statistics
    2324#endif
    24                     ,morpheo::behavioural::generic::shifter::Parameters param ):
    25                     _name   (name)
    26                     ,_param (param)
     25                    ,morpheo::behavioural::generic::shifter::Parameters *param
     26                    ,morpheo::behavioural::Tusage_t                usage ):
     27    _name   (name)
     28    ,_param (param)
     29    ,_usage (usage)
    2730  {
    2831#ifdef SYSTEMC
     
    5053    dont_initialize ();
    5154    sensitive << (*(in_CLOCK)).neg();
    52     for (uint32_t i=0; i<param._nb_port; i++)
     55    for (uint32_t i=0; i<param->_nb_port; i++)
    5356      {
    5457        sensitive << (*(in_SHIFTER_DATA      [i]));
    55         if (param._shift_value == 0)
     58        if (param->_shift_value == 0)
    5659        sensitive << (*(in_SHIFTER_SHIFT     [i]));
    57         if (param._direction   == external_direction)
     60        if (param->_direction   == external_direction)
    5861        sensitive << (*(in_SHIFTER_DIRECTION [i]));
    59         if (_param._rotate     == external_rotate)
     62        if (_param->_rotate     == external_rotate)
    6063        sensitive << (*(in_SHIFTER_TYPE      [i]));
    61         if (param._carry       == external_carry)
     64        if (param->_carry       == external_carry)
    6265        sensitive << (*(in_SHIFTER_CARRY     [i]));
    63         if (param._carry       == external_completion)
    64           if (_param._type_completion_bool == true)
     66        if (param->_carry       == external_completion)
     67          if (_param->_type_completion_bool == true)
    6568            sensitive << (*(in_SHIFTER_CARRY_IN  [i]));
    6669          else
     
    7073#ifdef SYSTEMCASS_SPECIFIC
    7174    // List dependency information
    72     for (uint32_t i=0; i<param._nb_port; i++)
     75    for (uint32_t i=0; i<param->_nb_port; i++)
    7376      {
    7477        (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_DATA      [i]));
    75         if (param._shift_value == 0)
     78        if (param->_shift_value == 0)
    7679        (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_SHIFT     [i]));
    77         if (param._direction   == external_direction)
     80        if (param->_direction   == external_direction)
    7881        (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_DIRECTION [i]));
    79         if (_param._rotate     == external_rotate)
     82        if (_param->_rotate     == external_rotate)
    8083        (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_TYPE      [i]));
    81         if (param._carry       == external_carry)
     84        if (param->_carry       == external_carry)
    8285        (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_CARRY     [i]));
    83         if (param._carry       == external_completion)
    84         if (_param._type_completion_bool == true)
     86        if (param->_carry       == external_completion)
     87        if (_param->_type_completion_bool == true)
    8588        (*(out_SHIFTER_DATA [i])) (*(in_SHIFTER_CARRY_IN  [i]));
    8689        else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_allocation.cpp

    r81 r82  
    1717  void Shifter::allocation (void)
    1818  {
    19     _component   = new Component ();
     19    _component   = new Component (_usage);
    2020
    2121    Entity * entity = _component->set_entity (_name       
     
    4545    {
    4646      // Interface "shifter"
    47        in_SHIFTER_DATA      = new SC_IN (Tdata_t)      * [_param._nb_port];
    48       if (_param._shift_value == 0)
    49        in_SHIFTER_SHIFT     = new SC_IN (Tshift_t)     * [_param._nb_port];
    50       if (_param._direction   == external_direction)
    51        in_SHIFTER_DIRECTION = new SC_IN (Tdirection_t) * [_param._nb_port];
    52       if (_param._rotate      == external_rotate)
    53        in_SHIFTER_TYPE      = new SC_IN (Ttype_t)      * [_param._nb_port];
    54       if (_param._carry       == external_carry)
    55        in_SHIFTER_CARRY     = new SC_IN (Tcarry_t)     * [_param._nb_port];
    56       if (_param._carry       == external_completion)
    57       if (_param._type_completion_bool == true)
    58        in_SHIFTER_CARRY_IN  = new SC_IN (Tcontrol_t)   * [_param._nb_port];
     47       in_SHIFTER_DATA      = new SC_IN (Tdata_t)      * [_param->_nb_port];
     48      if (_param->_shift_value == 0)
     49       in_SHIFTER_SHIFT     = new SC_IN (Tshift_t)     * [_param->_nb_port];
     50      if (_param->_direction   == external_direction)
     51       in_SHIFTER_DIRECTION = new SC_IN (Tdirection_t) * [_param->_nb_port];
     52      if (_param->_rotate      == external_rotate)
     53       in_SHIFTER_TYPE      = new SC_IN (Ttype_t)      * [_param->_nb_port];
     54      if (_param->_carry       == external_carry)
     55       in_SHIFTER_CARRY     = new SC_IN (Tcarry_t)     * [_param->_nb_port];
     56      if (_param->_carry       == external_completion)
     57      if (_param->_type_completion_bool == true)
     58       in_SHIFTER_CARRY_IN  = new SC_IN (Tcontrol_t)   * [_param->_nb_port];
    5959      else
    60        in_SHIFTER_COMPLETION= new SC_IN (Tdata_t)      * [_param._nb_port];
    61       out_SHIFTER_DATA      = new SC_OUT(Tdata_t)      * [_param._nb_port];
     60       in_SHIFTER_COMPLETION= new SC_IN (Tdata_t)      * [_param->_nb_port];
     61      out_SHIFTER_DATA      = new SC_OUT(Tdata_t)      * [_param->_nb_port];
    6262     
    63       for (uint32_t i=0; i<_param._nb_port; i++)
     63      for (uint32_t i=0; i<_param->_nb_port; i++)
    6464        {
    6565          Interface_fifo * interface = _interfaces->set_interface("shifter_"+toString(i)
     
    7171                                                                  );
    7272         
    73            in_SHIFTER_DATA       [i] = interface->set_signal_in  <Tdata_t     > ("data"      ,_param._size_data);
    74           if (_param._shift_value == 0)
    75            in_SHIFTER_SHIFT      [i] = interface->set_signal_in  <Tshift_t    > ("shift"     ,static_cast<uint32_t>(ceil(log2(_param._size_data))));
    76           if (_param._direction == external_direction)
     73           in_SHIFTER_DATA       [i] = interface->set_signal_in  <Tdata_t     > ("data"      ,_param->_size_data);
     74          if (_param->_shift_value == 0)
     75           in_SHIFTER_SHIFT      [i] = interface->set_signal_in  <Tshift_t    > ("shift"     ,static_cast<uint32_t>(ceil(log2(_param->_size_data))));
     76          if (_param->_direction == external_direction)
    7777           in_SHIFTER_DIRECTION  [i] = interface->set_signal_in  <Tdirection_t> ("direction" ,1);
    78           if (_param._rotate  == external_rotate)
     78          if (_param->_rotate  == external_rotate)
    7979           in_SHIFTER_TYPE       [i] = interface->set_signal_in  <Ttype_t     > ("type"      ,1);
    80           if (_param._carry == external_carry)
     80          if (_param->_carry == external_carry)
    8181           in_SHIFTER_CARRY      [i] = interface->set_signal_in  <Tcarry_t    > ("carry"     ,1);
    82           if (_param._carry       == external_completion)
    83           if (_param._type_completion_bool == true)
     82          if (_param->_carry       == external_completion)
     83          if (_param->_type_completion_bool == true)
    8484           in_SHIFTER_CARRY_IN   [i] = interface->set_signal_in  <Tcontrol_t  > ("carry_in"  ,1);
    8585          else
    86            in_SHIFTER_COMPLETION [i] = interface->set_signal_in  <Tdata_t     > ("completion",_param._size_data_completion);
    87           out_SHIFTER_DATA       [i] = interface->set_signal_out <Tdata_t     > ("data"      ,_param._size_data);
     86           in_SHIFTER_COMPLETION [i] = interface->set_signal_in  <Tdata_t     > ("completion",_param->_size_data_completion);
     87          out_SHIFTER_DATA       [i] = interface->set_signal_out <Tdata_t     > ("data"      ,_param->_size_data);
    8888        }                                                                                                                       
    8989    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_deallocation.cpp

    r81 r82  
    2222
    2323    delete []  in_SHIFTER_DATA      ;
    24     if (_param._shift_value == 0)
     24    if (_param->_shift_value == 0)
    2525    delete []  in_SHIFTER_SHIFT     ;
    26     if (_param._direction   == external_direction )
     26    if (_param->_direction   == external_direction )
    2727    delete []  in_SHIFTER_DIRECTION ;
    28     if (_param._rotate      == external_rotate    )
     28    if (_param->_rotate      == external_rotate    )
    2929    delete []  in_SHIFTER_TYPE      ;
    30     if (_param._carry       == external_carry     )
     30    if (_param->_carry       == external_carry     )
    3131    delete []  in_SHIFTER_CARRY     ;
    32     if (_param._carry       == external_completion)
    33     if (_param._type_completion_bool == true)
     32    if (_param->_carry       == external_completion)
     33    if (_param->_type_completion_bool == true)
    3434    delete []  in_SHIFTER_CARRY_IN  ;
    3535    else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_genMealy_shift.cpp

    r81 r82  
    1818  void Shifter::genMealy_shift (void)
    1919  {
    20     for (uint32_t i=0; i<_param._nb_port; i++)
     20    for (uint32_t i=0; i<_param->_nb_port; i++)
    2121      {
    2222        // Read
    2323        Tdata_t      data_in     = PORT_READ(in_SHIFTER_DATA [i]);
    2424        Tdata_t      data_out    = data_in;
    25         Tshift_t     shift_value = _param._shift_value;
     25        Tshift_t     shift_value = _param->_shift_value;
    2626        if (shift_value == 0)
    2727          shift_value = PORT_READ(in_SHIFTER_SHIFT [i]);
    2828
    2929        Tdirection_t direction;
    30         if (_param._direction == external_direction)
     30        if (_param->_direction == external_direction)
    3131          direction = PORT_READ(in_SHIFTER_DIRECTION [i]);
    3232        else
    33           direction = _param._internal_direction;
     33          direction = _param->_internal_direction;
    3434
    3535        Ttype_t      type;
    36         if (_param._rotate    == external_rotate)
     36        if (_param->_rotate    == external_rotate)
    3737          type      = PORT_READ(in_SHIFTER_TYPE      [i]);
    3838        else
    39           type      = _param._internal_type;
     39          type      = _param->_internal_type;
    4040
    4141        Tcarry_t     carry;     
    42         if (_param._carry     == external_carry)
     42        if (_param->_carry     == external_carry)
    4343          carry     = PORT_READ(in_SHIFTER_CARRY     [i]);
    4444        else
    45           carry     = _param._internal_carry;
     45          carry     = _param->_internal_carry;
    4646       
    4747        if (type == _shift)
    4848          {
    49             data_out = shift  <Tdata_t> (_param._size_data, data_in, shift_value, direction == _left, carry == _arithmetic);
     49            data_out = shift  <Tdata_t> (_param->_size_data, data_in, shift_value, direction == _left, carry == _arithmetic);
    5050
    51             if (_param._size_data_completion > 0)
     51            if (_param->_size_data_completion > 0)
    5252              {
    5353                Tdata_t completion;
    5454
    55                 if (_param._type_completion_bool == true)
     55                if (_param->_type_completion_bool == true)
    5656                  completion = (PORT_READ(in_SHIFTER_CARRY_IN   [i])==true)?1:0;
    5757                else
     
    6666                else
    6767                  {
    68                     mask       = gen_mask<Tdata_t> (shift_value)      << (_param._size_data-shift_value);
     68                    mask       = gen_mask<Tdata_t> (shift_value)      << (_param->_size_data-shift_value);
    6969                  }
    7070                 
     
    7373          }
    7474        else
    75           data_out = rotate <Tdata_t> (_param._size_data, data_in, shift_value, direction == _left);
     75          data_out = rotate <Tdata_t> (_param->_size_data, data_in, shift_value, direction == _left);
    7676
    7777        // Write
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_vhdl_body.cpp

    r81 r82  
    1717  void Shifter::vhdl_body (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_body ("-- Compute all case of shift");
    2222
    23     for (uint32_t i=0; i<_param._nb_port; i++)
     23    for (uint32_t i=0; i<_param->_nb_port; i++)
    2424      {
    2525        //-----[ Shift logic Left ]--------------------------------------------
    26         if (_param._have_shift_logic_left)
     26        if (_param->_have_shift_logic_left)
    2727          vhdl->set_body ("shift_logic_left_"+toString(i)+"        <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) sll CONV_INTEGER(shift_"+toString(i)+"));");
    2828        //-----[ Shift logic Right ]-------------------------------------------
    29         if (_param._have_shift_logic_right)
     29        if (_param->_have_shift_logic_right)
    3030          vhdl->set_body ("shift_logic_right_"+toString(i)+"       <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) srl CONV_INTEGER(shift_"+toString(i)+"));");
    3131        //-----[ Shift arithmetic Left ]---------------------------------------
    32         if (_param._have_shift_arithmetic_left)
     32        if (_param->_have_shift_arithmetic_left)
    3333          vhdl->set_body ("shift_arithmetic_left_"+toString(i)+"   <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) sla CONV_INTEGER(shift_"+toString(i)+"));");
    3434        //-----[ Shift arithmetic Right ]--------------------------------------
    35         if (_param._have_shift_arithmetic_right)
     35        if (_param->_have_shift_arithmetic_right)
    3636          vhdl->set_body ("shift_arithmetic_right_"+toString(i)+"  <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) sra CONV_INTEGER(shift_"+toString(i)+"));");
    3737        //-----[ Rotate Left ]-------------------------------------------------
    38         if (_param._have_rotate_left)
     38        if (_param->_have_rotate_left)
    3939          vhdl->set_body ("rotate_left_"+toString(i)+"             <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) rol CONV_INTEGER(shift_"+toString(i)+"));");
    4040        //-----[ Rotate Right ]------------------------------------------------
    41         if (_param._have_rotate_right)
     41        if (_param->_have_rotate_right)
    4242          vhdl->set_body ("rotate_right_"+toString(i)+"            <= TO_STDLOGICVECTOR(TO_BITVECTOR(in_SHIFTER_"+toString(i)+"_DATA) ror CONV_INTEGER(shift_"+toString(i)+"));");
    4343      }
    4444
    45     if (_param._size_data_completion > 0)
     45    if (_param->_size_data_completion > 0)
    4646      {
    4747        vhdl->set_body ("");
    4848        vhdl->set_body ("-- Mask");
    4949
    50         for (uint32_t i=0; i<_param._nb_port; i++)
     50        for (uint32_t i=0; i<_param->_nb_port; i++)
    5151          {
    5252            std::string print_shifter_completion;
    5353           
    54             if (_param._type_completion_bool == true)
     54            if (_param->_type_completion_bool == true)
    5555              print_shifter_completion = "in_SHIFTER_"+toString(i)+"_CARRY_IN";
    5656            else
    5757              print_shifter_completion = "in_SHIFTER_"+toString(i)+"_COMPLETION";
    5858
    59             if (_param._size_data == _param._size_data_completion)
     59            if (_param->_size_data == _param->_size_data_completion)
    6060              {
    6161                vhdl->set_body ("shifter_completion_left_"+toString(i)+"  <= "+print_shifter_completion+";");
     
    6464            else
    6565              {
    66                 vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param._size_data-1,_param._size_data_completion)+"  <= "+std_logic_others(_param._size_data-_param._size_data_completion,0)+";");
    67                 vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param._size_data_completion                    )+"  <= "+print_shifter_completion+";");
    68 
    69                 vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param._size_data-1,_param._size_data-_param._size_data_completion)+" <= "+print_shifter_completion+";");
    70                 vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param._size_data-_param._size_data_completion                    )+" <= "+std_logic_others(_param._size_data-_param._size_data_completion,0)+";");
     66                vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param->_size_data-1,_param->_size_data_completion)+"  <= "+std_logic_others(_param->_size_data-_param->_size_data_completion,0)+";");
     67                vhdl->set_body ("shifter_completion_left_"+toString(i)+std_logic_range(_param->_size_data_completion                    )+"  <= "+print_shifter_completion+";");
     68
     69                vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param->_size_data-1,_param->_size_data-_param->_size_data_completion)+" <= "+print_shifter_completion+";");
     70                vhdl->set_body ("shifter_completion_right_"+toString(i)+std_logic_range(_param->_size_data-_param->_size_data_completion                    )+" <= "+std_logic_others(_param->_size_data-_param->_size_data_completion,0)+";");
    7171              }
    7272           
     
    8080    vhdl->set_body ("-- Multiplexor");
    8181
    82     for (uint32_t i=0; i<_param._nb_port; i++)
     82    for (uint32_t i=0; i<_param->_nb_port; i++)
    8383      {
    8484        vhdl->set_body ("out_SHIFTER_"+toString(i)+"_DATA       <=");
     
    8686
    8787        //-----[ Shift arithmetic Left ]---------------------------------------
    88         if (_param._have_shift_arithmetic_left)
    89           {
    90             bool   have_when  = false;
    91             std::string print_when = "";
    92             std::string print_and  = "";
    93            
    94             if (_param._direction   == external_direction)
     88        if (_param->_have_shift_arithmetic_left)
     89          {
     90            bool   have_when  = false;
     91            std::string print_when = "";
     92            std::string print_and  = "";
     93           
     94            if (_param->_direction   == external_direction)
    9595              {
    9696                have_when = true;
     
    9898                print_and = " and ";
    9999              }
    100             if (_param._rotate      == external_rotate)
     100            if (_param->_rotate      == external_rotate)
    101101              {
    102102                have_when = true;
     
    104104                print_and = " and ";
    105105              }
    106             if (_param._carry       == external_carry)
     106            if (_param->_carry       == external_carry)
    107107              {
    108108                have_when = true;
     
    117117          }
    118118        //-----[ Shift arithmetic Right ]--------------------------------------
    119         if (_param._have_shift_arithmetic_right)
    120           {
    121             bool   have_when  = false;
    122             std::string print_when = "";
    123             std::string print_and  = "";
    124            
    125             if (_param._direction   == external_direction)
     119        if (_param->_have_shift_arithmetic_right)
     120          {
     121            bool   have_when  = false;
     122            std::string print_when = "";
     123            std::string print_and  = "";
     124           
     125            if (_param->_direction   == external_direction)
    126126              {
    127127                have_when = true;
     
    129129                print_and = " and ";
    130130              }
    131             if (_param._rotate      == external_rotate)
     131            if (_param->_rotate      == external_rotate)
    132132              {
    133133                have_when = true;
     
    135135                print_and = " and ";
    136136              }
    137             if (_param._carry       == external_carry)
     137            if (_param->_carry       == external_carry)
    138138              {
    139139                have_when = true;
     
    148148          }
    149149        //-----[ Shift logic Left ]--------------------------------------------
    150         if (_param._have_shift_logic_left)
    151           {
    152             bool   have_when  = false;
    153             std::string print_when = "";
    154             std::string print_and  = "";
    155            
    156             if (_param._direction   == external_direction)
     150        if (_param->_have_shift_logic_left)
     151          {
     152            bool   have_when  = false;
     153            std::string print_when = "";
     154            std::string print_and  = "";
     155           
     156            if (_param->_direction   == external_direction)
    157157              {
    158158                have_when = true;
     
    160160                print_and = " and ";
    161161              }
    162             if (_param._rotate      == external_rotate)
     162            if (_param->_rotate      == external_rotate)
    163163              {
    164164                have_when = true;
     
    166166                print_and = " and ";
    167167              }
    168             if (_param._carry       == external_carry)
     168            if (_param->_carry       == external_carry)
    169169              {
    170170                have_when = true;
     
    177177            std::string print_expr_completion;
    178178
    179             if (_param._size_data_completion == 0)
     179            if (_param->_size_data_completion == 0)
    180180              print_expr_completion = "shift_logic_left_"+toString(i)+" ";
    181181            else
     
    186186          }
    187187        //-----[ Shift logic Right ]-------------------------------------------
    188         if (_param._have_shift_logic_right)
    189           {
    190             bool   have_when  = false;
    191             std::string print_when = "";
    192             std::string print_and  = "";
    193            
    194             if (_param._direction   == external_direction)
     188        if (_param->_have_shift_logic_right)
     189          {
     190            bool   have_when  = false;
     191            std::string print_when = "";
     192            std::string print_and  = "";
     193           
     194            if (_param->_direction   == external_direction)
    195195              {
    196196                have_when = true;
     
    198198                print_and = " and ";
    199199              }
    200             if (_param._rotate      == external_rotate)
     200            if (_param->_rotate      == external_rotate)
    201201              {
    202202                have_when = true;
     
    204204                print_and = " and ";
    205205              }
    206             if (_param._carry       == external_carry)
     206            if (_param->_carry       == external_carry)
    207207              {
    208208                have_when = true;
     
    215215            std::string print_expr_completion;
    216216
    217             if (_param._size_data_completion == 0)
     217            if (_param->_size_data_completion == 0)
    218218              print_expr_completion = "shift_logic_right_"+toString(i);
    219219            else
     
    224224          }
    225225        //-----[ Rotate Left ]-------------------------------------------------
    226         if (_param._have_rotate_left)
    227           {
    228             bool   have_when  = false;
    229             std::string print_when = "";
    230             std::string print_and  = "";
    231            
    232             if (_param._direction   == external_direction)
     226        if (_param->_have_rotate_left)
     227          {
     228            bool   have_when  = false;
     229            std::string print_when = "";
     230            std::string print_and  = "";
     231           
     232            if (_param->_direction   == external_direction)
    233233              {
    234234                have_when = true;
     
    236236                print_and = " and ";
    237237              }
    238             if (_param._rotate      == external_rotate)
     238            if (_param->_rotate      == external_rotate)
    239239              {
    240240                have_when = true;
     
    250250          }
    251251        //-----[ Rotate Right ]------------------------------------------------
    252         if (_param._have_rotate_right)
    253           {
    254             bool   have_when  = false;
    255             std::string print_when = "";
    256             std::string print_and  = "";
    257            
    258             if (_param._direction   == external_direction)
     252        if (_param->_have_rotate_right)
     253          {
     254            bool   have_when  = false;
     255            std::string print_when = "";
     256            std::string print_and  = "";
     257           
     258            if (_param->_direction   == external_direction)
    259259              {
    260260                have_when = true;
     
    262262                print_and = " and ";
    263263              }
    264             if (_param._rotate      == external_rotate)
     264            if (_param->_rotate      == external_rotate)
    265265              {
    266266                have_when = true;
     
    281281  /*
    282282  //-----[ Shift logic Left ]--------------------------------------------
    283   if (_param._have_shift_logic_left)
     283  if (_param->_have_shift_logic_left)
    284284    {
    285285
     
    287287
    288288  //-----[ Shift logic Right ]-------------------------------------------
    289   if (_param._have_shift_logic_right)
     289  if (_param->_have_shift_logic_right)
    290290    {
    291291     
     
    293293
    294294  //-----[ Shift arithmetic Left ]---------------------------------------
    295   if (_param._have_shift_arithmetic_left)
     295  if (_param->_have_shift_arithmetic_left)
    296296    {
    297297
     
    299299
    300300  //-----[ Shift arithmetic Right ]--------------------------------------
    301   if (_param._have_shift_arithmetic_right)
     301  if (_param->_have_shift_arithmetic_right)
    302302    {
    303303     
     
    305305 
    306306  //-----[ Rotate Left ]-------------------------------------------------
    307   if (_param._have_rotate_left)
     307  if (_param->_have_rotate_left)
    308308    {
    309309     
     
    311311 
    312312  //-----[ Rotate Right ]------------------------------------------------
    313   if (_param._have_rotate_right)
     313  if (_param->_have_rotate_right)
    314314    {
    315315     
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1024
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Generic/Sort/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Common/include/BitManipulation.h"
    1215#include "Behavioural/include/Allocation.h"
    13 
    14 #define NB_ITERATION  1024
    15 #define CYCLE_MAX     (128*NB_ITERATION)
    16 
    17 #define LABEL(str...)                                                   \
    18   {                                                                     \
    19     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    20     msg (str);                                                          \
    21     msg (_("\n"));                                                      \
    22   } while(0)
    23 
    24 #define SC_START(cycle_offset)                                                       \
    25   do                                                                                 \
    26     {                                                                                \
    27       /*cout << "SC_START (begin)" << endl;*/                                        \
    28                                                                                      \
    29       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    30       if (cycle_offset != 0)                                                         \
    31         {                                                                            \
    32           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    33         }                                                                            \
    34                                                                                      \
    35       if (cycle_current > CYCLE_MAX)                                                 \
    36         {                                                                            \
    37           TEST_KO("Maximal cycles Reached");                                         \
    38         }                                                                            \
    39                                                                                      \
    40       sc_start(cycle_offset);                                                        \
    41                                                                                      \
    42       /*cout << "SC_START (end  )" << endl;*/                                        \
    43     } while(0)
    44 
    4516
    4617class entry_t
     
    6233  Sort * _Sort = new Sort (name.c_str(),
    6334#ifdef STATISTICS
    64                                              _parameters_statistics,
     35                           _parameters_statistics,
    6536#endif
    66                                              _param);
     37                           _param,
     38                           USE_ALL);
    6739 
    6840#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/include/Sort.h

    r81 r82  
    9191#endif
    9292   Parameters                                  * param,
    93    morpheo::behavioural::Tusage_t                usage=USE_ALL
     93   morpheo::behavioural::Tusage_t                usage
    9494   );
    9595  public  :          ~Sort             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/include/Types.h

    r81 r82  
    1616namespace sort {
    1717
    18   typedef uint32_t Taddress_t;
     18//   typedef uint32_t Taddress_t;
    1919  typedef uint32_t Tdata_t;
    2020
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  10
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Generic/Victim/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
    1114#include "Behavioural/include/Allocation.h"
    12 
    13 #define NB_ITERATION  10
    14 #define CYCLE_MAX     (128*NB_ITERATION)
    15 
    16 #define LABEL(str...)                                                   \
    17   {                                                                     \
    18     msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));       \
    19     msg (str);                                                          \
    20     msg (_("\n"));                                                      \
    21   } while(0)
    22 
    23 #define SC_START(cycle_offset)                                                       \
    24   do                                                                                 \
    25     {                                                                                \
    26       /*cout << "SC_START (begin)" << endl;*/                                        \
    27                                                                                      \
    28       uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
    29       if (cycle_offset != 0)                                                         \
    30         {                                                                            \
    31           cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
    32         }                                                                            \
    33                                                                                      \
    34       if (cycle_current > CYCLE_MAX)                                                 \
    35         {                                                                            \
    36           TEST_KO("Maximal cycles Reached");                                         \
    37         }                                                                            \
    38                                                                                      \
    39       sc_start(cycle_offset);                                                        \
    40                                                                                      \
    41       /*cout << "SC_START (end  )" << endl;*/                                        \
    42     } while(0)
    4315
    4416void test (string name,
     
    5325  Victim * _Victim = new Victim (name.c_str(),
    5426#ifdef STATISTICS
    55                                             _parameters_statistics,
     27                                _parameters_statistics,
    5628#endif
    57                                              _param);
     29                                 _param,
     30                                 USE_ALL);
    5831 
    5932#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/test.cpp

    r81 r82  
    77 */
    88
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (128*NB_ITERATION)
     11
    912#include "Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/include/test.h"
    1013#include "Common/include/Test.h"
     
    3942                                                                  param_stat,
    4043#endif
    41                                                                   &param);
     44                                                                  &param,
     45                                                                  USE_ALL);
    4246 
    4347#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h

    r81 r82  
    4141#endif
    4242#include "Behavioural/include/Component.h"
     43#include "Behavioural/include/Usage.h"
    4344
    4445namespace morpheo {
     
    5556    // -----[ fields ]----------------------------------------------------
    5657    // Parameters
    57   protected : const std::string   _name;
     58  protected : const std::string  _name;
     59  protected : const Parameters * _param;
     60  private   : const Tusage_t     _usage;
    5861
    59   protected : const Parameters  * _param;
    6062#ifdef STATISTICS
    6163  public    : Stat                           * _stat;
     
    104106   morpheo::behavioural::Parameters_Statistics * param_statistics,
    105107#endif
    106    Parameters                                  * param );
     108   Parameters                                  * param ,
     109   morpheo::behavioural::Tusage_t                usage);
    107110                                               
    108111  public  :          Victim_Pseudo_LRU              (Parameters param );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU.cpp

    r81 r82  
    1414namespace victim_pseudo_lru {
    1515
     16  Victim_Pseudo_LRU::Victim_Pseudo_LRU
     17  (
    1618#ifdef SYSTEMC
    17   Victim_Pseudo_LRU::Victim_Pseudo_LRU (sc_module_name name,
     19   sc_module_name name,
    1820#else
    19   Victim_Pseudo_LRU::Victim_Pseudo_LRU (std::string name,
     21   std::string name,
    2022#endif
    2123#ifdef STATISTICS
    22                           morpheo::behavioural::Parameters_Statistics * param_statistics,
     24   morpheo::behavioural::Parameters_Statistics * param_statistics,
    2325#endif
    24                           morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters * param ):
    25                           _name   (name)
    26                           ,_param (param)
     26   morpheo::behavioural::generic::victim::victim_pseudo_lru::Parameters * param ,
     27   morpheo::behavioural::Tusage_t usage):
     28    _name   (name)
     29    ,_param (param)
     30    ,_usage (usage)
    2731  {
    2832    log_printf(FUNC,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_allocation.cpp

    r81 r82  
    1818  void Victim_Pseudo_LRU::allocation (void)
    1919  {
    20     _component   = new Component ();
     20    _component   = new Component (_usage);
    2121
    2222    Entity * entity = _component->set_entity (_name                 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/include/Types.h

    r81 r82  
    1616namespace victim {
    1717
    18   typedef uint32_t Taddress_t;
     18//   typedef uint32_t Taddress_t;
    1919  typedef uint32_t Tentity_t;
    2020
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/include/Victim.h

    r81 r82  
    102102#endif
    103103   Parameters                                  * param,
    104    morpheo::behavioural::Tusage_t                usage=USE_ALL
     104   morpheo::behavioural::Tusage_t                usage
    105105   );
    106106  public  :          ~Victim             (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_allocation.cpp

    r81 r82  
    6565             ,param_statistics
    6666#endif
    67              ,_param->_param_victim_pseudo_lru);
     67             ,_param->_param_victim_pseudo_lru
     68             ,_usage);
    6869          break;
    6970        }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest

    r81 r82  
    3737
    3838execute                         : all_selftest
    39                                 @$(MAKE) $(EXEC_LOG);
     39                                @\
     40                                $(MAKE) $(EXEC_LOG);                                    \
     41                                declare -i all_ok=1;                                    \
     42                                for i in $(EXEC_LOG); do                                \
     43                                    $(GREP) -q "Test OK" $$i;                           \
     44                                    declare -i test_ok=$$?;                             \
     45                                    $(GREP) -q "Test KO" $$i;                           \
     46                                    declare -i test_ko=$$?;                             \
     47                                    if $(TEST) $$test_ko -eq 0 -o $$test_ok -ne 0;      \
     48                                    then all_ok=0;                                      \
     49                                    fi;                                                 \
     50                                done;                                                   \
     51                                if $(TEST) $$all_ok -eq 1;                              \
     52                                then echo "-------------------| Test OK"; exit 0;       \
     53                                else echo "-------------------| Test KO"; exit 1;       \
     54                                fi;
    4055
    4156reconfig                        :
     
    117132                                @\
    118133                                $(ECHO) "Execute            : $*";\
    119                                 export SYSTEMC=$(SYSTEMC_$(SIMULATOR)) ; $(EXEC_PREFIX) ./$(DIR_BIN)/$(EXEC).x $(EXEC_PARAMS) $* `$(CAT) $<` &> $@
    120                                 declare -i count=`$(GREP) -ch "Test OK" $@`;            \
    121                                 declare    timing=`$(GREP) -h "Timing"  $@`;            \
    122                                 if $(TEST) $$count -ne 0;                               \
     134                                export SYSTEMC=$(SYSTEMC_$(SIMULATOR)) ; $(EXEC_PREFIX) ./$(DIR_BIN)/$(EXEC).x $(EXEC_PARAMS) $* `$(CAT) $<` &> $@; \
     135                                declare timing=`$(GREP) -h "Timing"  $@`;               \
     136                                $(GREP) -q "Test OK" $@;                                \
     137                                declare -i test_ok=$$?;                                 \
     138                                $(GREP) -q "Test KO" $@;                                \
     139                                declare -i test_ko=$$?;                                 \
     140                                if $(TEST) $$test_ko -ne 0 -a $$test_ok -eq 0;          \
    123141                                then echo -e "                     $* ... OK\t$$timing";\
    124                                 else echo    "                     $* ... KO"; exit 1;     \
     142                                else echo    "                     $* ... KO";          \
    125143                                fi;
    126144
     
    128146                                @\
    129147                                $(ECHO) "Execute            : $*";\
    130                                 export SYSTEMC=$(SYSTEMC_$(SIMULATOR)) ; $(EXEC_PREFIX) ./$(DIR_BIN)/$(EXEC).x $(EXEC_PARAMS) $* `$(CAT) $<` &> $@
    131                                 declare -i count=`$(GREP) -ch "Test OK" $@`;            \
    132                                 if $(TEST) $$count -ne 0;                               \
    133                                 then echo "                     $* ... OK";             \
    134                                 else echo "                     $* ... KO"; exit 1;     \
     148                                export SYSTEMC=$(SYSTEMC_$(SIMULATOR)) ; $(EXEC_PREFIX) ./$(DIR_BIN)/$(EXEC).x $(EXEC_PARAMS) $* `$(CAT) $<` &> $@; \
     149                                declare timing=`$(GREP) -h "Timing"  $@`;               \
     150                                $(GREP) -q "Test OK" $@;                                \
     151                                declare -i test_ok=$$?;                                 \
     152                                $(GREP) -q "Test KO" $@;                                \
     153                                declare -i test_ko=$$?;                                 \
     154                                if $(TEST) $$test_ko -ne 0 -a $$test_ok -eq 0;          \
     155                                then echo -e "                     $* ... OK\t$$timing";\
     156                                else echo    "                     $* ... KO";          \
    135157                                fi;
    136158
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.flags

    r81 r82  
    66
    77#-----[ Simulator ]----------------------------------------
    8 SIMULATOR                       = systemcass_deps
     8SIMULATOR                       = systemcass
    99#SIMULATOR                      = systemc
    1010
     
    2323#                                       -DVHDL_TESTBENCH_ASSERT \
    2424#                                       -DPOSITION              \
    25 #                                       -DNO_TRANSLAT        \
     25#                                       -DNO_TRANSLATION        \
    2626
    2727# Flags :
     
    3939#                                             * Dynamique : at the runtime
    4040#                                                * consomation
    41 # NO_TRANSLAT                          - No translate message
     41# NO_TRANSLATION                          - No translate message
    4242# NO_INIT                                 - No init a lot of register
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/Makefile

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/Makefile.defs

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/Makefile.deps

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/Makefile

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/configuration.cfg

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/include/test.h

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/main.cpp

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/test.cpp

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/Makefile

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/New_Component.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\documentclass[10pt,a4paper,twocolumn]{article}
    26
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/sty/header.sty

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\def\review{YYYY/MM/DD}
    26%\def\review{\number\day/\number\month/\number\year\xspace}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/01_introduction.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Introduction}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/02_features.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Features}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/03_description.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Functional Description}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/04_pinout.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Pin out}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/05_parameters.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Parameters}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/06_performance.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Performance}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/07_details.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Details}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/08_history.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Revision History}
    26
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/doc/tex/root.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\input{\dirdoc/01_introduction}
    26\input{\dirdoc/02_features}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/New_Component.h

    • Property svn:keywords deleted
    r81 r82  
    1313#endif
    1414
    15 #include <iostream>
    16 #include "Common/include/ToString.h"
    17 #include "Common/include/Debug.h"
    1815
     16#include "Behavioural/@DIRECTORY/include/Parameters.h"
    1917#include "Behavioural/@DIRECTORY/include/Types.h"
    20 #include "Behavioural/@DIRECTORY/include/Parameters.h"
    2118#ifdef STATISTICS
    2219#include "Behavioural/include/Stat.h"
     
    2724#endif
    2825#include "Behavioural/include/Usage.h"
     26
     27#include "Common/include/ToString.h"
     28#include "Common/include/Debug.h"
     29
     30#include <iostream>
    2931
    3032namespace morpheo {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/Parameters.h

    • Property svn:keywords deleted
    r81 r82  
    99 */
    1010
     11#include "Behavioural/include/Parameters.h"
    1112#include "Common/include/Debug.h"
    12 #include "Behavioural/include/Parameters.h"
    1313
    1414namespace morpheo {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/Types.h

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component.cpp

    • Property svn:keywords deleted
    r81 r82  
    3131    ,_usage            (usage)
    3232  {
    33     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     33    log_begin(@COMPONENT,FUNCTION);
    3434
    3535    usage_environment(_usage);
    3636
    37     log_printf(INFO,@COMPONENT,FUNCTION,"Allocation");
     37    log_printf(INFO,@COMPONENT,FUNCTION,_("Allocation"));
    3838
    3939    allocation (
     
    4646    if (usage_is_set(_usage,USE_STATISTICS))
    4747      {
    48         log_printf(INFO,@COMPONENT,FUNCTION,"Allocation of statistics");
     48        log_printf(INFO,@COMPONENT,FUNCTION,_("Allocation of statistics"));
    4949
    5050        statistics_allocation(param_statistics);
     
    5656      {
    5757        // generate the vhdl
    58         log_printf(INFO,@COMPONENT,FUNCTION,"Generate the vhdl");
     58        log_printf(INFO,@COMPONENT,FUNCTION,_("Generate the vhdl"));
    5959       
    6060        vhdl();
     
    6565    if (usage_is_set(_usage,USE_SYSTEMC))
    6666      {
    67         log_printf(INFO,@COMPONENT,FUNCTION,"Method - transition");
     67        log_printf(INFO,@COMPONENT,FUNCTION,_("Method - transition"));
    6868
    6969        SC_METHOD (transition);
     
    7777#endif
    7878      }
    79     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     79    log_end(@COMPONENT,FUNCTION);
    8080  };
    8181   
     
    8484  @COMPONENT::~@COMPONENT (void)
    8585  {
    86     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     86    log_begin(@COMPONENT,FUNCTION);
    8787
    8888#ifdef STATISTICS
     
    9393#endif
    9494
    95     log_printf(INFO,@COMPONENT,FUNCTION,"Deallocation");
     95    log_printf(INFO,@COMPONENT,FUNCTION,_("Deallocation"));
    9696    deallocation ();
    9797
    98     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     98    log_end(@COMPONENT,FUNCTION);
    9999  };
    100100
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_allocation.cpp

    • Property svn:keywords deleted
    r81 r82  
    88#include "Behavioural/@DIRECTORY/include/@COMPONENT.h"
    99#include "Behavioural/include/Allocation.h"
     10#include "Common/include/Max.h"
    1011
    1112namespace morpheo                    {
     
    2425                               )
    2526  {
    26     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     27    log_begin(@COMPONENT,FUNCTION);
    2728
    2829    _component   = new Component (_usage);
     
    4344                                                         ,IN
    4445                                                         ,SOUTH,
    45                                                          "Generalist interface"
     46                                                         _("Generalist interface")
    4647#endif
    4748                                                         );
     
    5758#endif
    5859
    59     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     60    log_end(@COMPONENT,FUNCTION);
    6061  };
    6162
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_deallocation.cpp

    • Property svn:keywords deleted
    r81 r82  
    1717  void @COMPONENT::deallocation (void)
    1818  {
    19     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     19    log_begin(@COMPONENT,FUNCTION);
    2020
    2121    if (usage_is_set(_usage,USE_SYSTEMC))
     
    2828    delete _component;
    2929
    30     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     30    log_end(@COMPONENT,FUNCTION);
    3131  };
    3232
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_end_cycle.cpp

    • Property svn:keywords deleted
    r81 r82  
    1717void @COMPONENT::end_cycle ()
    1818  {
    19     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     19    log_begin(@COMPONENT,FUNCTION);
    2020
    2121#ifdef STATISTICS
     
    3131#endif
    3232
    33     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     33    log_end(@COMPONENT,FUNCTION);
    3434  };
    3535
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_statistics_allocation.cpp

    • Property svn:keywords deleted
    r81 r82  
    1717  void @COMPONENT::statistics_allocation (morpheo::behavioural::Parameters_Statistics * param_statistics)
    1818  {
    19     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     19    log_begin(@COMPONENT,FUNCTION);
    2020
    2121    _stat = new Stat (static_cast<std::string>(_name),
     
    2323                      param_statistics);
    2424   
    25     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     25    log_end(@COMPONENT,FUNCTION);
    2626  };
    2727
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_statistics_deallocation.cpp

    • Property svn:keywords deleted
    r81 r82  
    1717  void @COMPONENT::statistics_deallocation (void)
    1818  {
    19     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     19    log_begin(@COMPONENT,FUNCTION);
    2020
    21     log_printf(INFO,@COMPONENT,FUNCTION,"Generate Statistics file");
     21    log_printf(INFO,@COMPONENT,FUNCTION,_("Generate Statistics file"));
    2222   
    2323    delete _stat;
    2424   
    25     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     25    log_end(@COMPONENT,FUNCTION);
    2626  };
    2727
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_transition.cpp

    • Property svn:keywords deleted
    r81 r82  
    1717  void @COMPONENT::transition (void)
    1818  {
    19     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     19    log_begin(@COMPONENT,FUNCTION);
    2020
    2121#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     
    2323#endif
    2424
    25     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     25    log_end(@COMPONENT,FUNCTION);
    2626  };
    2727
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_vhdl.cpp

    • Property svn:keywords deleted
    r81 r82  
    1818  void @COMPONENT::vhdl (void)
    1919  {
    20     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     20    log_begin(@COMPONENT,FUNCTION);
    2121
    2222    Vhdl * vhdl = new Vhdl (_name);
     
    3232    delete vhdl;
    3333
    34     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     34    log_end(@COMPONENT,FUNCTION);
    3535  };
    3636
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_vhdl_body.cpp

    • Property svn:keywords deleted
    r81 r82  
    1717  void @COMPONENT::vhdl_body (Vhdl * & vhdl)
    1818  {
    19     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     19    log_begin(@COMPONENT,FUNCTION);
    2020    vhdl->set_body ("");
    21     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     21    log_end(@COMPONENT,FUNCTION);
    2222  };
    2323
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_vhdl_declaration.cpp

    • Property svn:keywords deleted
    r81 r82  
    1717  void @COMPONENT::vhdl_declaration (Vhdl * & vhdl)
    1818  {
    19     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
    20     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     19    log_begin(@COMPONENT,FUNCTION);
     20    log_end(@COMPONENT,FUNCTION);
    2121  };
    2222
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters.cpp

    • Property svn:keywords deleted
    r81 r82  
    1616  Parameters::Parameters ()
    1717  {
    18     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     18    log_begin(@COMPONENT,FUNCTION);
    1919    test();
    20     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     20    log_end(@COMPONENT,FUNCTION);
    2121  };
    2222 
     
    2525//   Parameters::Parameters (Parameters & param)
    2626//   {
    27 //     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     27//     log_begin(@COMPONENT,FUNCTION);
    2828//     test();
    29 //     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     29//     log_end(@COMPONENT,FUNCTION);
    3030//   };
    3131
     
    3434  Parameters::~Parameters ()
    3535  {
    36     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
    37     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     36    log_begin(@COMPONENT,FUNCTION);
     37    log_end(@COMPONENT,FUNCTION);
    3838  };
    3939
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters_msg_error.cpp

    • Property svn:keywords deleted
    r81 r82  
    1818  Parameters_test Parameters::msg_error(void)
    1919  {
    20     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     20    log_begin(@COMPONENT,FUNCTION);
    2121
    2222    Parameters_test test ("@COMPONENT");
    2323
    24     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     24    log_end(@COMPONENT,FUNCTION);
    2525
    2626    return test;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters_print.cpp

    • Property svn:keywords deleted
    r81 r82  
    1717  std::string Parameters::print (uint32_t depth)
    1818  {
    19     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     19    log_begin(@COMPONENT,FUNCTION);
    2020
    2121    XML xml ("@COMPONENT_LOWER");
     
    2525    xml.balise_close();
    2626
    27     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     27    log_end(@COMPONENT,FUNCTION);
    2828   
    2929    return xml.get_body(depth);
     
    3535                            morpheo::behavioural::@NAMESPACE_USE::Parameters & x)
    3636  {
    37     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     37    log_begin(@COMPONENT,FUNCTION);
    3838
    3939    output_stream << x.print(0);
    4040   
    41     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     41    log_end(@COMPONENT,FUNCTION);
    4242
    4343    return output_stream;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/Makefile

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/Makefile.defs

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/Makefile.deps

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/Makefile

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/configuration.cfg

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/include/test.h

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/main.cpp

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/test.cpp

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/Makefile

    • Property svn:keywords deleted
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/New_Component.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\documentclass[10pt,a4paper,twocolumn]{article}
    26
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/sty/header.sty

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\def\review{YYYY/MM/DD}
    26%\def\review{\number\day/\number\month/\number\year\xspace}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/01_introduction.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Introduction}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/02_features.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Features}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/03_description.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Functional Description}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/04_pinout.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Pin out}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/05_parameters.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Parameters}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/06_performance.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Performance}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/07_details.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Details}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/08_history.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\Section{Revision History}
    26
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/doc/tex/root.tex

    • Property svn:keywords deleted
    r81 r82  
     1%------------------------------------------------------------------------------
     2% $Id$
     3%------------------------------------------------------------------------------
     4
    15\input{\dirdoc/01_introduction}
    26\input{\dirdoc/02_features}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/include/New_Component.h

    • Property svn:keywords deleted
    r81 r82  
    1313#endif
    1414
    15 #include <iostream>
    16 #include "Common/include/ToString.h"
    17 #include "Common/include/Debug.h"
     15#include "Behavioural/@DIRECTORY/include/Parameters.h"
    1816#include "Behavioural/include/Types.h"
    1917
    20 #include "Behavioural/@DIRECTORY/include/Parameters.h"
    2118#ifdef STATISTICS
    2219#include "Behavioural/include/Stat.h"
     
    2724#endif
    2825#include "Behavioural/include/Usage.h"
     26
     27#include "Common/include/ToString.h"
     28#include "Common/include/Debug.h"
     29
     30#include <iostream>
    2931
    3032namespace morpheo {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/include/Parameters.h

    • Property svn:keywords deleted
    r81 r82  
    99 */
    1010
     11#include "Behavioural/include/Parameters.h"
    1112#include "Common/include/Debug.h"
    12 #include "Behavioural/include/Parameters.h"
    1313
    1414namespace morpheo {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component.cpp

    • Property svn:keywords deleted
    r81 r82  
    3131    ,_usage            (usage)
    3232  {
    33     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     33    log_begin(@COMPONENT,FUNCTION);
    3434
    3535    usage_environment(_usage);
    3636
    37     log_printf(INFO,@COMPONENT,FUNCTION,"Allocation");
     37    log_printf(INFO,@COMPONENT,FUNCTION,_("Allocation"));
    3838
    3939    allocation (
     
    4646    if (usage_is_set(_usage,USE_STATISTICS))
    4747      {
    48         log_printf(INFO,@COMPONENT,FUNCTION,"Allocation of statistics");
     48        log_printf(INFO,@COMPONENT,FUNCTION,_("Allocation of statistics"));
    4949
    5050        statistics_allocation(param_statistics);
     
    5656      {
    5757        // generate the vhdl
    58         log_printf(INFO,@COMPONENT,FUNCTION,"Generate the vhdl");
     58        log_printf(INFO,@COMPONENT,FUNCTION,_("Generate the vhdl"));
    5959       
    6060        vhdl();
     
    6565    if (usage_is_set(_usage,USE_SYSTEMC))
    6666      {
    67         log_printf(INFO,@COMPONENT,FUNCTION,"Method - transition");
     67        log_printf(INFO,@COMPONENT,FUNCTION,_("Method - transition"));
    6868
    6969        SC_METHOD (transition);
     
    7777#endif
    7878      }
    79     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     79    log_end(@COMPONENT,FUNCTION);
    8080  };
    8181   
     
    8484  @COMPONENT::~@COMPONENT (void)
    8585  {
    86     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     86    log_begin(@COMPONENT,FUNCTION);
    8787
    8888#ifdef STATISTICS
     
    9393#endif
    9494
    95     log_printf(INFO,@COMPONENT,FUNCTION,"Deallocation");
     95    log_printf(INFO,@COMPONENT,FUNCTION,_("Deallocation"));
    9696    deallocation ();
    9797
    98     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     98    log_end(@COMPONENT,FUNCTION);
    9999  };
    100100
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_allocation.cpp

    • Property svn:keywords deleted
    r81 r82  
    1616#undef  FUNCTION
    1717#define FUNCTION "@COMPONENT::allocation"
    18   void @COMPONENT::allocation (
     18  void @COMPONENT::allocation
     19  (
    1920#ifdef STATISTICS
    20                                morpheo::behavioural::Parameters_Statistics * param_statistics
     21   morpheo::behavioural::Parameters_Statistics * param_statistics
    2122#else
    22                                void
     23   void
    2324#endif
    24                                )
     25   )
    2526  {
    26     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     27    log_begin@COMPONENT,FUNCTION);
    2728
    2829    _component   = new Component (_usage);
     
    5657    std::string src,dest;
    5758
    58 
    5959    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    60      _component->test_map();
     60     if (DEBUG_@COMPONENT == true)
     61       _component->test_map();
    6162
    6263#ifdef POSITION
    6364     if (usage_is_set(_usage,USE_POSITION))
    64         _component->generate_file();
     65      _component->generate_file();
    6566#endif
    6667
    67     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     68     log_end(@COMPONENT,FUNCTION);
    6869  };
    6970
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_deallocation.cpp

    • Property svn:keywords deleted
    r81 r82  
    1717  void @COMPONENT::deallocation (void)
    1818  {
    19     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     19    log_begin(@COMPONENT,FUNCTION);
    2020
    2121    if (usage_is_set(_usage,USE_SYSTEMC))
     
    2828    delete _component;
    2929
    30     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     30    log_end(@COMPONENT,FUNCTION);
    3131  };
    3232
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_end_cycle.cpp

    • Property svn:keywords deleted
    r81 r82  
    1717void @COMPONENT::end_cycle ()
    1818  {
    19     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     19    log_begin(@COMPONENT,FUNCTION);
    2020
    2121#ifdef STATISTICS
     
    3131#endif
    3232
    33     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     33    log_end(@COMPONENT,FUNCTION);
    3434  };
    3535
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_statistics_allocation.cpp

    • Property svn:keywords deleted
    r81 r82  
    1717  void @COMPONENT::statistics_allocation (morpheo::behavioural::Parameters_Statistics * param_statistics)
    1818  {
    19     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     19    log_begin(@COMPONENT,FUNCTION);
    2020
    2121    _stat = new Stat (static_cast<std::string>(_name),
     
    2323                      param_statistics);
    2424   
    25     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     25    log_end(@COMPONENT,FUNCTION);
    2626  };
    2727
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_statistics_deallocation.cpp

    • Property svn:keywords deleted
    r81 r82  
    1717  void @COMPONENT::statistics_deallocation (void)
    1818  {
    19     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     19    log_begin(@COMPONENT,FUNCTION);
    2020
    21     log_printf(INFO,@COMPONENT,FUNCTION,"Generate Statistics file");
     21    log_printf(INFO,@COMPONENT,FUNCTION,_("Generate Statistics file"));
    2222   
    2323    delete _stat;
    2424   
    25     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     25    log_end(@COMPONENT,FUNCTION);
    2626  };
    2727
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_transition.cpp

    • Property svn:keywords deleted
    r81 r82  
    1818  void @COMPONENT::transition (void)
    1919  {
    20     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     20    log_begin(@COMPONENT,FUNCTION);
    2121
    2222#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     
    2424#endif
    2525
    26     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     26    log_end(@COMPONENT,FUNCTION);
    2727  };
    2828
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_vhdl.cpp

    • Property svn:keywords deleted
    r81 r82  
    1818  void @COMPONENT::vhdl (void)
    1919  {
    20     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     20    log_begin(@COMPONENT,FUNCTION);
    2121
    2222    Vhdl * vhdl = new Vhdl (_name);
     
    2929    delete vhdl;
    3030
    31     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     31    log_end(@COMPONENT,FUNCTION);
    3232  };
    3333
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/Parameters.cpp

    • Property svn:keywords deleted
    r81 r82  
    1616  Parameters::Parameters ()
    1717  {
    18     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     18    log_begin(@COMPONENT,FUNCTION);
    1919    test();
    20     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     20    log_end(@COMPONENT,FUNCTION);
    2121  };
    2222 
     
    2525//   Parameters::Parameters (Parameters & param)
    2626//   {
    27 //     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     27//     log_begin(@COMPONENT,FUNCTION);
    2828//     test();
    29 //     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     29//     log_end(@COMPONENT,FUNCTION);
    3030//   };
    3131
     
    3434  Parameters::~Parameters ()
    3535  {
    36     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
    37     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     36    log_begin(@COMPONENT,FUNCTION);
     37    log_end(@COMPONENT,FUNCTION);
    3838  };
    3939
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/Parameters_msg_error.cpp

    • Property svn:keywords deleted
    r81 r82  
    1818  Parameters_test Parameters::msg_error(void)
    1919  {
    20     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     20    log_begin(@COMPONENT,FUNCTION);
    2121
    2222    Parameters_test test ("@COMPONENT");
    2323
    24     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     24    log_end(@COMPONENT,FUNCTION);
    2525
    2626    return test;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/Parameters_print.cpp

    • Property svn:keywords deleted
    r81 r82  
    1717  std::string Parameters::print (uint32_t depth)
    1818  {
    19     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     19    log_begin(@COMPONENT,FUNCTION);
    2020
    2121    XML xml ("@COMPONENT_LOWER");
     
    2525    xml.balise_close();
    2626
    27     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     27    log_end(@COMPONENT,FUNCTION);
    2828   
    2929    return xml.get_body(depth);
     
    3535                            morpheo::behavioural::@NAMESPACE_USE::Parameters & x)
    3636  {
    37     log_printf(FUNC,@COMPONENT,FUNCTION,"Begin");
     37    log_begin(@COMPONENT,FUNCTION);
    3838
    3939    output_stream << x.print(0);
    4040   
    41     log_printf(FUNC,@COMPONENT,FUNCTION,"End");
     41    log_end(@COMPONENT,FUNCTION);
    4242
    4343    return output_stream;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h

    r81 r82  
    11#ifndef morpheo_behavioural_Allocation_h
    22#define morpheo_behavioural_Allocation_h
     3
     4/*
     5 * $Id$
     6 *
     7 * [ Description ]
     8 *
     9 */
    310
    411#include "Common/include/Debug.h"
     
    4653    {                                                                   \
    4754      sig = interface->set_signal_in <type> (name, size);               \
    48     }                                                                   
     55    }                                                                   \
     56  else                                                                  \
     57    {                                                                   \
     58      log_printf(INFO,true,FUNCTION,_("%s %s.%s.%s : size is nul."),MSG_INFORMATION,_component->get_name().c_str(),interface->get_name().c_str(),name); \
     59    }
     60 
    4961#define ALLOC_SIGNAL_OUT( sig, name, type, size)                        \
    5062  if (size > 0)                                                         \
    5163    {                                                                   \
    5264      sig = interface->set_signal_out<type> (name, size);               \
     65    }                                                                   \
     66  else                                                                  \
     67    {                                                                   \
     68      log_printf(INFO,true,FUNCTION,_("%s %s.%s.%s : size is nul."),MSG_INFORMATION,_component->get_name().c_str(),interface->get_name().c_str(),name); \
    5369    }
    5470
     
    6379
    6480#define INSTANCE_SC_SIGNAL(component, sig)      \
    65   (*(component->sig)) (*(sig));
    66 
    67 #define DELETE_SC_SIGNAL( sig)                                          \
    68   delete sig;
     81  {                                             \
     82    TEST_PTR(component->sig);                   \
     83    TEST_PTR(sig);                              \
     84    (*(component->sig)) (*(sig));               \
     85  }
     86
     87#define DELETE_SC_SIGNAL( sig)                  \
     88  {                                             \
     89    delete sig;                                 \
     90  }
    6991
    7092// ----------------------------------------------------------------------
     
    166188            sig [alloc_signal_it1] = interface[alloc_signal_it1]->set_signal_in <type> (name, size); \
    167189          }                                                             \
     190        else                                                            \
     191          {                                                             \
     192            log_printf(INFO,true,FUNCTION,_("%s %s.%s.%s : size is nul."),MSG_INFORMATION,_component->get_name().c_str(),interface[alloc_signal_it1]->get_name().c_str(),name); \
     193          }                                                             \
    168194      }                                                                 \
    169195  }
     
    177203          {                                                             \
    178204            sig [alloc_signal_it1] = interface[alloc_signal_it1]->set_signal_out<type> (name, size); \
     205          }                                                             \
     206        else                                                            \
     207          {                                                             \
     208            log_printf(INFO,true,FUNCTION,_("%s %s.%s.%s : size is nul."),MSG_INFORMATION,_component->get_name().c_str(),interface[alloc_signal_it1]->get_name().c_str(),name); \
    179209          }                                                             \
    180210      }                                                                 \
     
    208238  for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
    209239    {                                                                   \
     240      TEST_PTR(component->sig [alloc_signal_it1]);                      \
     241      TEST_PTR(sig            [alloc_signal_it1]);                      \
    210242      (*(component->sig[alloc_signal_it1])) (*(sig[alloc_signal_it1])); \
    211243    }
     
    330362                sig [alloc_signal_it1][alloc_signal_it2] = interface[alloc_signal_it1][alloc_signal_it2]->set_signal_in <type> (name, size); \
    331363              }                                                         \
     364            else                                                        \
     365              {                                                         \
     366                log_printf(INFO,true,FUNCTION,_("%s %s.%s.%s : size is nul."),MSG_INFORMATION,_component->get_name().c_str(),interface[alloc_signal_it1][alloc_signal_it2]->get_name().c_str(),name); \
     367              }                                                         \
    332368          }                                                             \
    333369      }                                                                 \
     
    345381              {                                                         \
    346382                sig [alloc_signal_it1][alloc_signal_it2] = interface[alloc_signal_it1][alloc_signal_it2]->set_signal_out <type> (name, size); \
     383              }                                                         \
     384            else                                                        \
     385              {                                                         \
     386                log_printf(INFO,true,FUNCTION,_("%s %s.%s.%s : size is nul."),MSG_INFORMATION,_component->get_name().c_str(),interface[alloc_signal_it1][alloc_signal_it2]->get_name().c_str(),name); \
    347387              }                                                         \
    348388          }                                                             \
     
    393433    for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
    394434      {                                                                 \
     435        TEST_PTR(component->sig [alloc_signal_it1][alloc_signal_it2]);  \
     436        TEST_PTR(sig            [alloc_signal_it1][alloc_signal_it2]);  \
    395437        (*(component->sig[alloc_signal_it1][alloc_signal_it2])) (*(sig[alloc_signal_it1][alloc_signal_it2])); \
    396438      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h

    r81 r82  
    55 * $Id$
    66 *
    7  * [ Description ]
     7 * [ Description ]
    88 *
    99 */
     
    6565#define INSTANCE_ALL          0x7
    6666
    67   typedef struct
    68   {
    69 //public : Component * _component;
    70   public : Entity    * _entity   ;
    71   public : Tinstance_t _instance ;
    72   } Tcomponent_t;   
    73  
    7467  class Component
    7568  {
    76     // -----[ fields ]----------------------------------------------------
     69    typedef struct
     70    {
     71    public : Component * _component;
     72    public : Entity    * _entity   ;
     73    public : Tinstance_t _instance ;
     74    } Tcomponent_t;   
     75 
     76    // -----[ fields ]----------------------------------------------------
    7777  private   : const Tusage_t             _usage;
    7878  private   : Entity                   * _entity        ;
    7979  private   : std::list<Tcomponent_t*> * _list_component;
    8080
    81     // -----[ methods ]---------------------------------------------------
    82   public    :                       Component         (Tusage_t usage=USE_ALL);
     81    // -----[ methods ]---------------------------------------------------
     82  public    :                       Component         (Tusage_t usage);
    8383  public    :                       Component         (const Component & component);
    8484  public    :                       ~Component        ();
     85
     86  public    : std::string           get_name          (void);
    8587
    8688  public    : Entity *              set_entity        (std::string        name   
     
    124126  private   : bool                  test_map          (uint32_t depth, bool recursive);
    125127
     128//   public    : bool                  test_equi         (bool recursive=true);
     129//   private   : bool                  test_equi         (uint32_t depth, bool recursive);
     130
    126131#ifdef POSITION
    127132  public    : void                  interface_map     (std::string component_src ,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h

    r81 r82  
    4343#  define         DEBUG_Decod_unit                                  false
    4444#  define           DEBUG_Decod                                     false
     45#  define           DEBUG_Decod_queue                               true
    4546#  define         DEBUG_Ifetch_unit                                 false
    4647#  define           DEBUG_Address_management                        false
    4748#  define           DEBUG_Ifetch_queue                              false
    4849#  define           DEBUG_Ifetch_unit_Glue                          false
    49 #  define         DEBUG_Prediction_unit                             false
     50#  define         DEBUG_Prediction_unit                             true
    5051#  define           DEBUG_Branch_Target_Buffer                      false
    5152#  define             DEBUG_Branch_Target_Buffer_Glue               false
     
    5556#  define             DEBUG_Meta_Predictor                          false
    5657#  define               DEBUG_Meta_Predictor_Glue                   false
    57 #  define                 DEBUG_Two_Level_Branch_Predictor          false
    58 #  define                   DEBUG_Two_Level_Branch_Predictor_Glue   false
    59 #  define                   DEBUG_Branch_History_Table              false
    60 #  define                   DEBUG_Pattern_History_Table             false
    61 #  define           DEBUG_Prediction_unit_Glue                      true
    62 #  define           DEBUG_Return_Address_Stack                      true
     58#  define               DEBUG_Two_Level_Branch_Predictor            false
     59#  define                 DEBUG_Two_Level_Branch_Predictor_Glue     false
     60#  define                 DEBUG_Branch_History_Table                false
     61#  define                 DEBUG_Pattern_History_Table               false
     62#  define           DEBUG_Prediction_unit_Glue                      false
     63#  define           DEBUG_Return_Address_Stack                      false
    6364#  define           DEBUG_Update_Prediction_Table                   true
    6465#  define     DEBUG_Multi_OOO_Engine                                false
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h

    r81 r82  
    2626  {
    2727    // -----[ fields ]----------------------------------------------------
    28   private   : const std::string          _name         ;
    29   private   : const std::string          _type         ;
     28  private   : const std::string     _name         ;
     29  private   : const std::string     _type         ;
    3030#ifdef POSITION
    3131  private   : const schema_t        _schema       ;
     
    3636
    3737#ifdef POSITION
    38   private   : std::string                _comment      ;
     38  private   : std::string           _comment      ;
    3939
    4040  private   :       bool            _is_map       ;
     
    5151                                                       ,schema_t      schema
    5252#endif
    53                                                         ,Tusage_t       usage=USE_ALL
     53                                                        ,Tusage_t       usage
    5454                                                        );
    5555  public    :                        Entity           (const Entity & entity);
    5656  public    :                       ~Entity           ();
    5757
    58   public    : std::string                get_name          (void);
    59   public    : std::string                get_type          (void);
     58  public    : std::string           get_name          (void);
     59  public    : std::string           get_type          (void);
    6060
    6161#ifdef POSITION
    6262  public    : void                  set_comment       (std::string comment);
    63   private   : std::string                get_comment       (void          );
     63  private   : std::string           get_comment       (void          );
    6464#endif
    6565  public    : Interfaces *          set_interfaces    (void);
    66   private   : std::string                get_interfaces    (void);
     66  private   : std::string           get_interfaces    (void);
    6767  public    : Interfaces *          get_interfaces_list(void);
    6868
     
    7878#endif
    7979
    80   public    : bool                  test_map          (uint32_t depth,bool top_level);
     80  public    : bool                  test_map          (uint32_t depth,bool top_level, bool is_behavioural);
     81//   public    : bool                  test_equi         (uint32_t depth);
    8182
    8283#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h

    r81 r82  
    6363                                                          ,localisation_t localisation
    6464#endif
    65                                                           ,Tusage_t       usage=USE_ALL
     65                                                          ,Tusage_t       usage
    6666                                                          );
    6767
     
    220220                                                          std::string             counter_name  ,
    221221                                                          std::string             reset_name    );
    222   public    : std::string                testbench_test       (Vhdl           * & vhdl        ,
     222  public    : std::string           testbench_test       (Vhdl           * & vhdl        ,
    223223                                                          std::string             counter_name,
    224224                                                          std::string             reset_name);
    225   public    : std::string                testbench_test_ok    (Vhdl           * & vhdl        );
    226   protected : std::string                testbench_test_name   (Vhdl           * & vhdl);
    227   protected : std::string                testbench_test_ok_name(Vhdl           * & vhdl);
    228   protected : std::string                testbench_test_transaction_name(Vhdl           * & vhdl);
    229 #endif
    230 
    231   public    : bool                  test_map             (uint32_t depth, bool top_level);
     225  public    : std::string           testbench_test_ok    (Vhdl           * & vhdl        );
     226  protected : std::string           testbench_test_name   (Vhdl           * & vhdl);
     227  protected : std::string           testbench_test_ok_name(Vhdl           * & vhdl);
     228  protected : std::string           testbench_test_transaction_name(Vhdl           * & vhdl);
     229#endif
     230
     231  public    : bool                  test_map             (uint32_t depth, bool top_level, bool is_behavioural);
     232//   public    : bool                  test_equi            (uint32_t depth);
    232233
    233234#ifdef POSITION
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface_fifo.h

    r81 r82  
    4545                                                          ,localisation_t localisation
    4646#endif
    47                                                           ,Tusage_t       usage=USE_ALL
     47                                                          ,Tusage_t       usage
    4848                                                          );
    4949   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h

    r81 r82  
    3333    // -----[ methods ]---------------------------------------------------
    3434  public    :                       Interfaces            (std::string name,
    35                                                            Tusage_t usage=USE_ALL);
     35                                                           Tusage_t usage);
    3636  public    :                       Interfaces            (const Interfaces & interfaces);
    3737  public    :                       ~Interfaces           ();
     
    8080#endif
    8181
    82   public    : bool                  test_map              (uint32_t depth, bool top_level);
     82  public    : bool                  test_map              (uint32_t depth, bool top_level, bool is_behavioural);
     83//   public    : bool                  test_equi             (uint32_t depth);
    8384
    8485  public    : friend std::ostream&       operator<<            (std::ostream& output_stream,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h

    r81 r82  
    4444
    4545  public    : bool        have_error  (void)            { return (_error.length() != 0);};
    46   public    : void        error       (std::string str) { _error       += "[   ERROR   ] <" + _component + "> " + str + "\n";}
    47   public    : void        warning     (std::string str) { _warning     += "[  WARNING  ] <" + _component + "> " + str + "\n";}
    48   public    : void        information (std::string str) { _information += "[INFORMATION] <" + _component + "> " + str + "\n";}
     46  public    : void        error       (std::string str) { _error       += MSG_ERROR      ; _error       += " <" + _component + "> " + str + "\n";}
     47  public    : void        warning     (std::string str) { _warning     += MSG_WARNING    ; _warning     += " <" + _component + "> " + str + "\n";}
     48  public    : void        information (std::string str) { _information += MSG_INFORMATION; _information += " <" + _component + "> " + str + "\n";}
    4949  public    : std::string print       (void)            { return _error + _warning + _information;};
    5050  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h

    r81 r82  
    7979  public    :                   ~Signal         ();
    8080
    81   public    : std::string            get_name                (void);
     81  public    : std::string       get_name                (void);
    8282  public    : uint32_t          get_size                (void);
    8383  public    : void              set_size                (uint32_t size);
     
    9292  public    : bool              presence_testbench      (void);
    9393
    94   public    : bool              test_map                (uint32_t depth, bool top_level);
     94  public    : bool              test_map                (uint32_t depth, bool top_level, bool is_behavioural);
     95//   public    : bool              test_equi               (uint32_t depth);
    9596
    9697  public    : void              link                    (Signal * signal_dest,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h

    r81 r82  
    44#include "Common/include/ToString.h"
    55
    6 // Identification : MORPHEO_MAJOR_VERSION.MORPHEO_MINOR_VERSION.MORPHEO_REVISION
    7 // Revision       : svn variable
    8 
    96#define MORPHEO_MAJOR_VERSION 0
    107#define MORPHEO_MINOR_VERSION 2
    11 #define MORPHEO_REVISION      0
    12 //$Revision$
     8#define MORPHEO_REVISION      82
     9
     10// Identification : MORPHEO_MAJOR_VERSION.MORPHEO_MINOR_VERSION.MORPHEO_REVISION
    1311
    1412#define MORPHEO_VERSION       morpheo::toString(MORPHEO_MAJOR_VERSION)+"."+morpheo::toString(MORPHEO_MINOR_VERSION)+"."+morpheo::toString(MORPHEO_REVISION)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp

    r81 r82  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
     
    3232
    3333    if (entity_dest == NULL)
    34       throw (ErrorMorpheo ("<Component::port_map> in component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_dest+"\" is unknow."));
     34      throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_dest+"\" is unknow.\n"));
    3535
    3636    Signal * signal_dest = entity_dest->find_signal (port_dest);
    3737
    3838    if (signal_dest == NULL)
    39       throw (ErrorMorpheo ("<Component::port_map> in component \""+name_entity+"\",try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_dest+"\" have not the signal \""+port_dest+"\"."));
     39      throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\",try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_dest+"\" have not the signal \""+port_dest+"\".\n"));
    4040
    4141    // Second entity
     
    4343
    4444    if (entity_src == NULL)
    45       throw (ErrorMorpheo ("<Component::port_map> in component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_src+"\" is unknow."));
     45      throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_src+"\" is unknow.\n"));
    4646
    4747    Signal * signal_src = entity_src->find_signal (port_src);
    4848
    4949    if (signal_src == NULL)
    50       throw (ErrorMorpheo ("<Component::port_map> in component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_src+"\" have not the signal \""+port_src+"\"."));
     50      throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_src+"\" have not the signal \""+port_src+"\".\n"));
    5151
    5252    // If all is ok, mapping
    53     log_printf(TRACE,Behavioural,FUNCTION, "Signal \"%s.%s\"\tlink with \"%s.%s\""
     53    log_printf(TRACE,Behavioural,FUNCTION, _("Signal \"%s.%s\"\tlink with \"%s.%s\"")
    5454               ,entity_src ->get_name().c_str()
    5555               ,signal_src ->get_name().c_str()
     
    6262
    6363    if (src_is_port == true)
    64       throw (ErrorMorpheo ("<Component::port_map> in component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_src+" is the Top_level, and we can't be use interface's port of the top level as a source."));
     64      throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but the component \""+component_src+" is the Top_level, and we can't be use interface's port of the top level as a source.\n"));
    6565   
    6666    // 2 cases :
     
    106106    catch (morpheo::ErrorMorpheo & error)
    107107      {
    108         throw (ErrorMorpheo ("<Component::port_map> in component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but "+error.what ()));
     108      throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", try map \""+component_src+"."+port_src+"\" with \""+component_dest+"."+port_dest+"\" but "+error.what ()));
    109109      }
    110110    //catch (...)
     
    117117}; // end namespace behavioural         
    118118}; // end namespace morpheo             
    119 
    120 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_print.cpp

    r81 r82  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_component.cpp

    r81 r82  
    2929    Tcomponent_t * entry = new Tcomponent_t;
    3030   
    31 //     entry->_component= component;
     31    entry->_component= component;
    3232    entry->_instance = instance;
    3333    entry->_entity   = entity;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_test_map.cpp

    r81 r82  
    1515  bool Component::test_map (bool recursive)
    1616  {
     17    log_printf(NONE,Behavioural,FUNCTION, "Test port map and interface.");
    1718    return test_map (0, recursive);
    1819  }
     
    2627    bool test_ok = true;
    2728
    28     if (_list_component->empty () == true)
     29    bool is_behavioural = _list_component->empty ();
     30    if (is_behavioural)
    2931      {
    3032        log_printf(NONE,Behavioural,FUNCTION, "%s* Component \"%s\" is a behavioural description",tab.c_str(),name.c_str());
     
    3335      {
    3436        log_printf(NONE,Behavioural,FUNCTION, "%s* Component \"%s\" is a structural description",tab.c_str(),name.c_str());
     37      }
    3538
    36         log_printf(INFO,Behavioural,FUNCTION, "%s* Test port I/O",tab.c_str());
     39   
     40    //  log_printf(NONE,Behavioural,FUNCTION, "%s* Test port I/O",tab.c_str());
     41   
     42    test_ok &= _entity->test_map(depth+1,true,is_behavioural);
     43   
     44    //  log_printf(NONE,Behavioural,FUNCTION, "%s* Test all internal component",tab.c_str());
    3745       
    38         test_ok &= _entity->test_map(1,true);
    39 
    40         log_printf(INFO,Behavioural,FUNCTION, "%s* Test all internal component",tab.c_str());
    41        
    42         for (std::list<Tcomponent_t *>::iterator i= _list_component->begin();
    43              i != _list_component->end();
    44              ++i)
    45           test_ok &= (*i)->_entity->test_map(1,false);
    46 
    47 //      if (recursive)
    48 //        for (std::list<Tcomponent_t *>::iterator i= _list_component->begin();
    49 //             i != _list_component->end();
    50 //             ++i)
    51 //          test_ok &= (*i)->_component->test_map(1,recursive);
     46    for (std::list<Tcomponent_t *>::iterator i= _list_component->begin();
     47         i != _list_component->end();
     48         ++i)
     49      {
     50        test_ok &= (*i)->_entity->test_map(depth+1,false,is_behavioural);
     51        if (recursive)
     52          try
     53            {
     54              test_ok &= (*i)->_component->test_map(depth+1,recursive);
     55            }
     56          catch (morpheo::ErrorMorpheo & error)
     57            {
     58              // no error propagation, only top level
     59            }
    5260      }
    5361   
     
    5563   
    5664    if (test_ok == false)
    57       throw (ERRORMORPHEO (FUNCTION,"A lot of port is not connected."));
     65      throw (ERRORMORPHEO (FUNCTION,_("A lot of port is not connected.\n")));
    5866
    5967    return test_ok;
    6068  };
    6169
     70// #undef  FUNCTION
     71// #define FUNCTION "Component::test_equi"
     72//   bool Component::test_equi (bool recursive)
     73//   {
     74//     log_printf(NONE,Behavioural,FUNCTION, "Test port equi and interface.");
     75//     return test_equi (0, recursive);
     76//   }
     77
     78//   bool Component::test_equi (uint32_t depth, bool recursive)
     79//   {
     80//     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     81
     82//     std::string tab  = std::string(depth,'\t');
     83//     std::string name = _entity->get_name();
     84//     bool test_ok = true;
     85
     86//     test_ok &= _entity->test_equi(depth+1);
     87
     88//     for (std::list<Tcomponent_t *>::iterator i= _list_component->begin();
     89//       i != _list_component->end();
     90//       ++i)
     91//       {
     92//      test_ok &= (*i)->_entity->test_equi(depth+1);
     93//      if (recursive)
     94//        try
     95//          {
     96//            test_ok &= (*i)->_component->test_equi(depth+1,recursive);
     97//          }
     98//        catch (morpheo::ErrorMorpheo & error)
     99//          {
     100//            // no error propagation, only top level
     101//          }
     102//       }
     103   
     104//     log_printf(FUNC,Behavioural,FUNCTION,"End");
     105   
     106//     if (test_ok == false)
     107//       throw (ERRORMORPHEO (FUNCTION,_("A lot of port is not connected.\n")));
     108
     109//     return test_ok;
     110//   };
     111
    62112
    63113}; // end namespace behavioural         
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_test_map.cpp

    r81 r82  
    1414#undef  FUNCTION
    1515#define FUNCTION "Entity::test_map"
    16   bool Entity::test_map (uint32_t depth, bool top_level)
     16  bool Entity::test_map (uint32_t depth, bool top_level, bool is_behavioural)
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1919 
    2020    std::string tab  = std::string(depth,'\t');
    21     log_printf(NONE,Behavioural,FUNCTION, "%s* Test mapping : Entity \"%s\"",tab.c_str(),_name.c_str());
     21    log_printf(NONE,Behavioural,FUNCTION, "%s* Entity \"%s\"",tab.c_str(),_name.c_str());
    2222 
    23     bool _return = _interfaces->test_map(depth+1,top_level);
     23    bool _return = _interfaces->test_map(depth+1,top_level, is_behavioural);
    2424
    2525#ifndef DEBUG
     
    3535  };
    3636
     37// #undef  FUNCTION
     38// #define FUNCTION "Entity::test_equi"
     39//   bool Entity::test_equi (uint32_t depth)
     40//   {
     41//     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     42 
     43//     std::string tab  = std::string(depth,'\t');
     44//     log_printf(NONE,Behavioural,FUNCTION, "%s* Entity \"%s\"",tab.c_str(),_name.c_str());
     45 
     46//     bool _return = _interfaces->test_equi(depth+1);
     47
     48// #ifndef DEBUG
     49//     if (_return == false)
     50//       {
     51//      std::cerr << "In entity \"" << _name << "\" (type : \"" << _type << "\"), a lot of port is not connected !" << std::endl;
     52//       }
     53// #endif
     54
     55//     log_printf(FUNC,Behavioural,FUNCTION,"End");
     56   
     57//     return _return;
     58//   };
     59
    3760}; // end namespace behavioural         
    3861}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo.cpp

    r81 r82  
    4545               ,interface_fifo._localisation
    4646#endif
     47               ,interface_fifo._usage
    4748               )
    4849  {
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_test_map.cpp

    r81 r82  
    1414#undef  FUNCTION
    1515#define FUNCTION "Interface::test_map"
    16   bool Interface::test_map (uint32_t depth, bool top_level)
     16  bool Interface::test_map (uint32_t depth, bool top_level, bool is_behavioural)
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     
    2626         i != _list_signal->end();
    2727         ++i)
    28       _return &= (*i)->test_map(depth+1,top_level);
     28      _return &= (*i)->test_map(depth+1,top_level, is_behavioural);
    2929
    3030    log_printf(FUNC,Behavioural,FUNCTION,"End");
     
    3333  };
    3434
     35// #undef  FUNCTION
     36// #define FUNCTION "Interface::test_equi"
     37//   bool Interface::test_equi (uint32_t depth)
     38//   {
     39//     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     40
     41//     std::string tab  = std::string(depth,'\t');
     42//     bool _return = true;
     43
     44//     log_printf(NONE,Behavioural,FUNCTION, "%s* Interface \"%s\"",tab.c_str(),_name.c_str());
     45   
     46//     for (std::list<Signal*>::iterator i  = _list_signal->begin();
     47//       i != _list_signal->end();
     48//       ++i)
     49//       _return &= (*i)->test_equi(depth+1);
     50
     51//     log_printf(FUNC,Behavioural,FUNCTION,"End");
     52   
     53//     return _return;
     54//   };
     55
    3556}; // end namespace behavioural         
    3657}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_test_map.cpp

    r81 r82  
    1414#undef  FUNCTION
    1515#define FUNCTION "Interfaces::test_map"
    16   bool Interfaces::test_map (uint32_t depth, bool top_level)
     16  bool Interfaces::test_map (uint32_t depth, bool top_level, bool is_behavioural)
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     
    2727         i != _list_interface->end();
    2828         ++i)
    29       _return &= (*i)->test_map(depth+1, top_level);
     29      _return &= (*i)->test_map(depth+1, top_level, is_behavioural);
    3030
    3131    log_printf(FUNC,Behavioural,FUNCTION,"End");
     
    3434  };
    3535
     36// #undef  FUNCTION
     37// #define FUNCTION "Interfaces::test_equi"
     38//   bool Interfaces::test_equi (uint32_t depth)
     39//   {
     40//     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     41
     42//     std::string tab  = std::string(depth,'\t');
     43
     44//     bool _return = true;
     45
     46//     log_printf(NONE,Behavioural,FUNCTION, "%s* Interfaces \"%s\"",tab.c_str(),_name.c_str());
     47   
     48//     for (std::list<Interface_fifo*>::iterator i  = _list_interface->begin();
     49//       i != _list_interface->end();
     50//       ++i)
     51//       _return &= (*i)->test_equi(depth+1);
     52
     53//     log_printf(FUNC,Behavioural,FUNCTION,"End");
     54   
     55//     return _return;
     56//   };
     57
    3658}; // end namespace behavioural         
    3759}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters_test.cpp

    r81 r82  
    2020    Parameters_test x = msg_error();
    2121   
    22     std::cerr << x.print() << std::endl;
     22    std::cerr << x.print();
    2323
    2424    if (x.have_error())
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_connect.cpp

    r81 r82  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
     
    2727//     log_printf(ALL,Behavioural,FUNCTION,"   * sc_signal : %.8x",signal_dest->_sc_signal);
    2828//     log_printf(ALL,Behavioural,FUNCTION,"   * type_info : %s",toString(signal_dest->_type_info).c_str());
     29
     30    TEST_PTR(_sc_signal);
     31    TEST_PTR(signal_dest->_sc_signal);
    2932
    3033    if ((_direction == IN ) and (signal_dest->_direction == IN ))
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp

    r81 r82  
    7777      signal_dest->_connect_from_signal   = signal_src;
    7878   
    79 
    80 
    8179    // vhdl_testbench : to read an output producte by a internal component
    8280    // TODO : à vérifier !!!!!!!!!!!!
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_test_map.cpp

    r81 r82  
    1414#undef  FUNCTION
    1515#define FUNCTION "Signal::test_map"
    16   bool Signal::test_map (uint32_t depth, bool top_level)
     16  bool Signal::test_map (uint32_t depth, bool top_level, bool is_behavioural)
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1919
    20     std::string str = "";
    21     std::string tab = std::string(depth,'\t');
     20    std::string str     = "";
     21    std::string tab     = std::string(depth,'\t');
     22    bool        _return = true;
     23
    2224//     log_printf(NONE,Behavioural,FUNCTION, "%s* Signal \"%s\"",tab.c_str(),_name.c_str());
    2325//     log_printf(NONE,Behavioural,FUNCTION, "%s%d - %d - %d",tab.c_str(),
     
    2527//             _is_map_as_component_src,
    2628//             _is_map_as_component_dest);
    27     bool _return = true;
     29//     log_printf(NONE,Behavioural,FUNCTION, "%stop_level %d, is_behavioural %d",tab.c_str(),
     30//             top_level,
     31//             is_behavioural);
    2832
    29     if (top_level == true)
    30       {
    31         switch (_direction)
    32           {
    33           case morpheo::behavioural::IN       :
     33    // behavioural | top_level
     34    //-------------+-----------
     35    // 0           | 0         -
     36    // 0           | 1         -
     37    // 1           | 0         -
     38    // 1           | 1         -
     39
     40    if (not (is_behavioural and top_level))
     41      if (top_level == true)
     42        {
     43          switch (_direction)
    3444            {
    35               if (_is_map_as_toplevel_dest == false)
    36                 {
    37                   _return = false;
    38 
    39                   str = "Signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface.";
    40                 }
    41               break;
     45            case morpheo::behavioural::IN       :
     46              {
     47                if (_is_map_as_toplevel_dest == false)
     48                  {
     49                    _return = false;
     50                   
     51                    str = "Signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface.";
     52                  }
     53                break;
     54              }
     55            case morpheo::behavioural::OUT      :
     56              {
     57                if (_is_map_as_toplevel_dest == false)
     58                  {
     59                    _return = false;
     60                    str = "Signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface.";
     61                  }
     62                break;
     63              }
     64            case morpheo::behavioural::INTERNAL :
     65              {
     66                if (_is_map_as_component_src  == false)
     67                  {
     68                    _return = false;
     69                   
     70                    str = "Internal signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface.";
     71                  }
     72               
     73                if (_is_map_as_component_dest == false)
     74                  {
     75                    if (_return == false)
     76                      str+="\n";
     77                   
     78                    _return = false;
     79                   
     80                    str += "Internal signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface.";
     81                  }
     82               
     83                break;
     84              }
     85              //case morpheo::behavioural::INOUT    :
     86            default    : break;
    4287            }
    43           case morpheo::behavioural::OUT      :
     88        }
     89      else
     90        {
     91          // internal signal :
     92          // Component --- I/O       (as_src)
     93          // Component --- Component (as_src and as_dest)
     94         
     95          switch (_direction)
    4496            {
    45               if (_is_map_as_toplevel_dest == false)
    46                 {
    47                   _return = false;
    48                   str = "Signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface.";
    49                 }
    50               break;
     97            case morpheo::behavioural::IN       :
     98              {
     99                if (_is_map_as_component_src == false)
     100                  {
     101                    _return = false;
     102                   
     103                    str = "Signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface.";
     104                  }
     105                break;
     106              }
     107            case morpheo::behavioural::OUT      :
     108              {
     109                if (_is_map_as_component_src == false)
     110                  {
     111                    _return = false;
     112                   
     113                    str = "Signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface.";
     114                  }
     115                break;
     116              }
     117            case morpheo::behavioural::INTERNAL :
     118              {
     119                if (_is_map_as_component_src  == false)
     120                  {
     121                    _return = false;
     122                   
     123                    str = "Internal signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface.";
     124                  }
     125               
     126                if (_is_map_as_component_dest == false)
     127                  {
     128                    if (_return == false)
     129                      str+="\n";
     130                   
     131                    _return = false;
     132                   
     133                    str += "Internal signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface.";
     134                  }
     135               
     136                break;
     137              }
     138              //case morpheo::behavioural::INOUT    :
     139            default    : break;
    51140            }
    52             //case morpheo::behavioural::INTERNAL :
    53             //case morpheo::behavioural::INOUT    :
    54           default    : break;
    55           }
    56       }
    57     else
    58       {
    59         // internal signal :
    60         // Component --- I/O       (as_src)
    61         // Component --- Component (as_src and as_dest)
    62 
    63         switch (_direction)
    64           {
    65           case morpheo::behavioural::IN       :
    66             {
    67               if (_is_map_as_component_src == false)
    68                 {
    69                   _return = false;
    70                  
    71                   str = "Signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface.";
    72                 }
    73               break;
    74             }
    75           case morpheo::behavioural::OUT      :
    76             {
    77               if (_is_map_as_component_src == false)
    78                 {
    79                   _return = false;
    80                  
    81                   str = "Signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface.";
    82                 }
    83               break;
    84             }
    85           case morpheo::behavioural::INTERNAL :
    86             {
    87               if (_is_map_as_component_src  == false)
    88                 {
    89                   _return = false;
    90                  
    91                   str = "Internal signal \""+_name+"\" is not mapped with an outpout port top-level's interface or a input port component's interface.";
    92                 }
    93 
    94               if (_is_map_as_component_dest == false)
    95                 {
    96                   if (_return == false)
    97                     str+="\n";
    98 
    99                   _return = false;
    100                  
    101                   str += "Internal signal \""+_name+"\" is not mapped with an input port top-level's interface or a output port component's interface.";
    102                 }
    103 
    104               break;
    105             }
    106             //case morpheo::behavioural::INOUT    :
    107           default    : break;
    108           }
    109       }
    110    
    111     log_printf(FUNC,Behavioural,FUNCTION,"End");
    112 
    113 
     141        }
    114142
    115143    if (_return == false)
     
    125153//      log_printf(NONE,Behavioural,FUNCTION, "%s* Signal \"%s\" is OK.",tab.c_str(),_name.c_str());
    126154      }
     155
     156    log_printf(FUNC,Behavioural,FUNCTION,"End");
    127157   
    128158    return _return;
    129159  };
    130160
     161// #undef  FUNCTION
     162// #define FUNCTION "Signal::test_equi"
     163//   bool Signal::test_equi (uint32_t depth)
     164//   {
     165//     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     166
     167//     std::string str = "";
     168//     std::string tab = std::string(depth,'\t');
     169//     bool _return = true;
     170
     171   
     172
     173//     if (_return == false)
     174//       {
     175//      log_printf(NONE,Behavioural,FUNCTION, "%s* %s",tab.c_str(),str.c_str());
     176       
     177// #ifndef DEBUG
     178//      std::cerr << str << std::endl;
     179// #endif
     180//       }
     181//     else
     182//       {
     183// //   log_printf(NONE,Behavioural,FUNCTION, "%s* Signal \"%s\" is OK.",tab.c_str(),_name.c_str());
     184//       }
     185   
     186//     return _return;
     187//   };
     188
    131189}; // end namespace behavioural         
    132190}; // end namespace morpheo             
Note: See TracChangeset for help on using the changeset viewer.