Ignore:
Timestamp:
Dec 10, 2008, 7:31:39 PM (18 years ago)
Author:
rosiere
Message:

Almost complete design
with Test and test platform

Location:
trunk/IPs/systemC/processor/Morpheo
Files:
1015 added
6 deleted
722 edited
4 moved

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Makefile.deps

    r81 r88  
    1212ifndef Behavioural
    1313include                         $(DIR_MORPHEO)/Behavioural/Makefile.deps
     14endif
     15ifndef Execute_loop_Glue
     16include                         $(DIR_MORPHEO)/Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/Makefile.deps
    1417endif
    1518ifndef Read_unit
     
    4346Execute_loop_LIBRARY            =       -lExecute_loop                          \
    4447                                        $(Behavioural_LIBRARY)                  \
     48                                        $(Execute_loop_Glue_LIBRARY)            \
    4549                                        $(Read_unit_LIBRARY)                    \
    4650                                        $(Functionnal_unit_LIBRARY)             \
     
    5458Execute_loop_DIR_LIBRARY        =       -L$(Execute_loop_DIR)/lib                       \
    5559                                        $(Behavioural_DIR_LIBRARY)                      \
    56                                         $(Behavioural_DIR_LIBRARY)                      \
     60                                        $(Execute_loop_Glue_DIR_LIBRARY)                \
    5761                                        $(Read_unit_DIR_LIBRARY)                        \
    5862                                        $(Functionnal_unit_DIR_LIBRARY)                 \
     
    6973                                @\
    7074                                $(MAKE) Behavioural_library;                    \
     75                                $(MAKE) Execute_loop_Glue_library;              \
    7176                                $(MAKE) Read_unit_library;                      \
    7277                                $(MAKE) Functionnal_unit_library;               \
     
    8186                                @\
    8287                                $(MAKE) Behavioural_library_clean;                      \
     88                                $(MAKE) Execute_loop_Glue_library_clean;                \
    8389                                $(MAKE) Read_unit_library_clean;                        \
    8490                                $(MAKE) Functionnal_unit_library_clean;                 \
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/src/Operation.cpp

    r81 r88  
    88
    99#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Operation.h"
    10 
    11 #define neg(data)                  (~(data)+1)
    12 #define sign(data)                 ((data)>>(param->_size_data-1))
    13 #define unsigned(data)             (data)
    14 #define signed(data)               ((sign(data)==0)?(data):neg(data))
    15 #define ovf(op1, op2, res)         ((sign(op1) == sign(op2))?(sign(op1) xor sign(res)):0)
    16 #define carry(op1, op2, res)       (((res)<(op1)) or ((res)<(op2)))
    17 #define set_flag(data,flag,is_set) (((is_set)==1)?((data)|(flag)):((data)&~(flag)))
    18 #define get_flag(data,flag)        (((data)&(flag))!=0)
    19 #define concatenation_bool(a,b)    (((a)<<1) | (b))
     10#include "Behavioural/include/Operation.h"
    2011
    2112namespace morpheo                    {
     
    4334    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_add");
    4435
    45     Tgeneral_data_t gpr1      = unsigned(op->_data_ra);
    46     Tgeneral_data_t gpr2      = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     36    Tgeneral_data_t gpr1      = unsigned(param->_size_data,op->_data_ra);
     37    Tgeneral_data_t gpr2      = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    4738   
    4839    Tgeneral_data_t gpr3      = param->_mask_data & (gpr1 + gpr2);
    4940
    50     bool            overflow  = ovf  (gpr1,gpr2,gpr3);
    51     bool            carry_out = carry(gpr1,gpr2,gpr3);
     41    bool            overflow  = ovf  (param->_size_data,gpr1,gpr2,gpr3);
     42    bool            carry_out = carry(param->_size_data,gpr1,gpr2,gpr3);
    5243
    5344    // Result
     
    7061    Tgeneral_data_t carry_in   = get_flag(op->_data_rc,FLAG_CY);
    7162
    72     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    73     Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     63    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     64    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    7465    Tgeneral_data_t gpr3       = param->_mask_data & (gpr1 + gpr2 + carry_in);
    7566
    76     bool            overflow   = ovf  (gpr1,gpr2,gpr3);
    77     bool            carry_out  = carry(gpr1,gpr2,gpr3);
     67    bool            overflow   = ovf  (param->_size_data,gpr1,gpr2,gpr3);
     68    bool            carry_out  = carry(param->_size_data,gpr1,gpr2,gpr3);
    7869
    7970    // Result
     
    9485    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sub");
    9586
    96     Tgeneral_data_t gpr1      =     unsigned(op->_data_ra);
    97     Tgeneral_data_t gpr2      = neg(unsigned(op->_data_rb));
     87    Tgeneral_data_t gpr1      =                       unsigned(param->_size_data,op->_data_ra);
     88    Tgeneral_data_t gpr2      = neg(param->_size_data,unsigned(param->_size_data,op->_data_rb));
    9889    Tgeneral_data_t gpr3      = param->_mask_data & (gpr1 + gpr2);
    9990
    100     bool            overflow  = ovf  (gpr1,gpr2,gpr3);
    101     bool            carry_out = carry(gpr1,gpr2,gpr3);
     91    bool            overflow  = ovf  (param->_size_data,gpr1,gpr2,gpr3);
     92    bool            carry_out = carry(param->_size_data,gpr1,gpr2,gpr3);
    10293
    10394    // Result
     
    118109    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_and");
    119110
    120     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    121     Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     111    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     112    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    122113    Tgeneral_data_t gpr3       = (gpr1 & gpr2);
    123114
     
    137128    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_or");
    138129
    139     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    140     Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     130    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     131    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    141132    Tgeneral_data_t gpr3       = (gpr1 | gpr2);
    142133
     
    156147    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_xor");
    157148
    158     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    159     Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     149    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     150    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    160151    Tgeneral_data_t gpr3       = (gpr1 ^ gpr2);
    161152
     
    175166    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_movhi");
    176167
    177     Tgeneral_data_t gpr1       = unsigned(op->_immediat);
     168    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_immediat);
    178169    Tgeneral_data_t gpr2       = param->_mask_data & (gpr1<<16);
    179170
     
    195186    Tgeneral_data_t f_in       = get_flag(op->_data_rc,FLAG_F);
    196187
    197     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    198     Tgeneral_data_t gpr2       = unsigned(op->_data_rb);
     188    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     189    Tgeneral_data_t gpr2       = unsigned(param->_size_data,op->_data_rb);
    199190    Tgeneral_data_t gpr3       = ((f_in==0)?gpr2:gpr1);
    200191
     
    215206
    216207    Tgeneral_data_t f_in       = get_flag(op->_data_rc,FLAG_F);
    217     Tgeneral_data_t imm        = unsigned(op->_immediat);
     208    Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
    218209
    219210    // Result
     
    233224
    234225    Tgeneral_data_t f_in       = get_flag(op->_data_rc,FLAG_F);
    235     Tgeneral_data_t imm        = unsigned(op->_immediat);
     226    Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
    236227
    237228    // Result
     
    254245
    255246
    256     Tgeneral_data_t gpr        = unsigned(op->_data_rb);
    257     Tgeneral_data_t imm        = unsigned(op->_immediat);
     247    Tgeneral_data_t gpr        = unsigned(param->_size_data,op->_data_rb);
     248    Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
    258249
    259250    // Result
     
    272263    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_extend_s");
    273264
    274     Tgeneral_data_t imm        = unsigned(op->_immediat);
    275     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
     265    Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
     266    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
    276267    Tgeneral_data_t gpr2       = extend<Tgeneral_data_t>(param->_size_data, gpr1, true , imm);
    277268
     
    291282    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_extend_z");
    292283
    293     Tgeneral_data_t imm        = unsigned(op->_immediat);
    294     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
     284    Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
     285    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
    295286    Tgeneral_data_t gpr2       = extend<Tgeneral_data_t>(param->_size_data, gpr1, false , imm);
    296287
     
    310301    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sll");
    311302
    312     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    313     Tgeneral_data_t gpr2       = param->_mask_shift & unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     303    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     304    Tgeneral_data_t gpr2       = param->_mask_shift & unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    314305    Tgeneral_data_t gpr3       = shift_logic_left<Tgeneral_data_t>(param->_size_data, gpr1, gpr2);
    315306
     
    329320    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_srl");
    330321
    331     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    332     Tgeneral_data_t gpr2       = param->_mask_shift & unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     322    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     323    Tgeneral_data_t gpr2       = param->_mask_shift & unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    333324    Tgeneral_data_t gpr3       = shift_logic_right<Tgeneral_data_t>(param->_size_data, gpr1, gpr2);
    334325
     
    348339    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sra");
    349340
    350     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    351     Tgeneral_data_t gpr2       = param->_mask_shift & unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     341    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     342    Tgeneral_data_t gpr2       = param->_mask_shift & unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    352343    Tgeneral_data_t gpr3       = shift_arithmetic_right<Tgeneral_data_t>(param->_size_data, gpr1, gpr2);
    353344
     
    367358    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_ror");
    368359
    369     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    370     Tgeneral_data_t gpr2       = param->_mask_shift & unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     360    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     361    Tgeneral_data_t gpr2       = param->_mask_shift & unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    371362    Tgeneral_data_t gpr3       = rotate_right<Tgeneral_data_t>(param->_size_data, gpr1, gpr2);
    372363
     
    386377    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_ff1");
    387378
    388     Tgeneral_data_t gpr        = unsigned(op->_data_ra);
     379    Tgeneral_data_t gpr        = unsigned(param->_size_data,op->_data_ra);
    389380    Tgeneral_data_t index;
    390381
     
    406397    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_fl1");
    407398
    408     Tgeneral_data_t gpr        = unsigned(op->_data_ra);
     399    Tgeneral_data_t gpr        = unsigned(param->_size_data,op->_data_ra);
    409400    Tgeneral_data_t index;
    410401
     
    426417    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfeq");
    427418
    428     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    429     Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     419    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     420    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    430421
    431422    bool            f_out      = (gpr1 == gpr2);
     
    446437    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfne");
    447438
    448     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    449     Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     439    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     440    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    450441
    451442    bool            f_out      = (gpr1 != gpr2);
     
    466457    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfgeu");
    467458
    468     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    469     Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     459    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     460    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    470461
    471462    bool            f_out      = (gpr1 >= gpr2);
     
    486477    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfgtu");
    487478
    488     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    489     Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     479    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     480    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    490481
    491482    bool            f_out      = (gpr1 >  gpr2);
     
    506497    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfleu");
    507498
    508     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    509     Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     499    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     500    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    510501
    511502    bool            f_out      = (gpr1 <= gpr2);
     
    526517    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfltu");
    527518
    528     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    529     Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     519    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     520    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    530521
    531522    bool            f_out      = (gpr1 <  gpr2);
     
    549540    Tgeneral_data_t gpr2       =   (op->_has_immediat==1)?op->_immediat:op->_data_rb;
    550541   
    551     log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ra  : %.8x",unsigned(op->_data_ra));
    552     log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ras : %.8x",  signed(op->_data_ra));
    553     log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rb  : %.8x",unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb));
    554     log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rbs : %.8x",  signed((op->_has_immediat==1)?op->_immediat:op->_data_rb));
     542    log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ra  : %.8x",unsigned(param->_size_data,op->_data_ra));
     543    log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ras : %.8x",  signed(param->_size_data,op->_data_ra));
     544    log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rb  : %.8x",unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb));
     545    log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rbs : %.8x",  signed(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb));
    555546   
    556547    bool            f_out;
    557548
    558     switch (concatenation_bool(sign(gpr1),sign(gpr2)))
     549    switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
    559550      {
    560551      case 1 /*b01*/ : f_out = 1                               ; break;
    561552      case 2 /*b10*/ : f_out = 0                               ; break;
    562       default        : f_out = signed(gpr1) >= signed(gpr2); break;
     553      default        : f_out = signed(param->_size_data,gpr1) >= signed(param->_size_data,gpr2); break;
    563554      }
    564555
     
    585576    bool            f_out;
    586577
    587     switch (concatenation_bool(sign(gpr1),sign(gpr2)))
     578    switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
    588579      {
    589580      case 1 /*b01*/ : f_out = 1; break;
    590581      case 2 /*b10*/ : f_out = 0; break;
    591       default        : f_out = signed(gpr1) >  signed(gpr2); break;
     582      default        : f_out = signed(param->_size_data,gpr1) >  signed(param->_size_data,gpr2); break;
    592583      }
    593584
     
    612603    bool            f_out;
    613604
    614     switch (concatenation_bool(sign(gpr1),sign(gpr2)))
     605    switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
    615606      {
    616607      case 1 /*b01*/ : f_out = 0; break;
    617608      case 2 /*b10*/ : f_out = 1; break;
    618       default        : f_out = signed(gpr1) <= signed(gpr2); break;
     609      default        : f_out = signed(param->_size_data,gpr1) <= signed(param->_size_data,gpr2); break;
    619610      }
    620611   
     
    639630    bool            f_out;
    640631
    641     switch (concatenation_bool(sign(gpr1),sign(gpr2)))
     632    switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
    642633      {
    643634      case 1 /*b01*/ : f_out = 0; break;
    644635      case 2 /*b10*/ : f_out = 1; break;
    645       default        : f_out = signed(gpr1) <  signed(gpr2); break;
     636      default        : f_out = signed(param->_size_data,gpr1) <  signed(param->_size_data,gpr2); break;
    646637      }
    647638
     
    661652    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_mtspr");
    662653
    663     Tgeneral_data_t imm        = unsigned(op->_immediat);
    664     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
    665     Tgeneral_data_t gpr2       = unsigned(op->_data_rb);
     654    Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
     655    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     656    Tgeneral_data_t gpr2       = unsigned(param->_size_data,op->_data_rb);
    666657    Tgeneral_data_t addr       = range<Tgeneral_data_t>(gpr1|imm,16);
    667658
     
    694685    else
    695686      {
    696         exception = EXCEPTION_ALU_SPR_ACCESS_NOT_COMPLETE;
     687        exception = EXCEPTION_ALU_SPR_ACCESS_MUST_WRITE;
    697688      }
    698689   
     
    712703    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_mfspr");
    713704
    714     Tgeneral_data_t imm        = unsigned(op->_immediat);
    715     Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
     705    Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
     706    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
    716707    Tgeneral_data_t gpr2       = 0;
    717708    Tgeneral_data_t addr       = range<Tgeneral_data_t>(gpr1|imm,16);
     
    745736    else
    746737      {
    747         exception = EXCEPTION_ALU_SPR_ACCESS_NOT_COMPLETE;
     738        exception = EXCEPTION_ALU_SPR_ACCESS_MUST_READ;
    748739      }
    749740
     
    784775    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_mac");
    785776
    786     Tgeneral_data_t gpr1 = unsigned(op->_data_ra);
    787     Tgeneral_data_t gpr2 = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     777    Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra);
     778    Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    788779    uint64_t        temp = range<uint64_t>(gpr1 * gpr2, 32);
    789780
     
    808799    log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_msb");
    809800
    810     Tgeneral_data_t gpr1 = unsigned(op->_data_ra);
    811     Tgeneral_data_t gpr2 = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
     801    Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra);
     802    Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
    812803    uint64_t        temp = range<uint64_t>(gpr1 * gpr2, 32);
    813804
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Functionnal_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/main.cpp

    r81 r88  
    7575         size_load_queue     ,
    7676         timing              ,
    77          &(morpheo::behavioural::custom::example_get_custom_information)
     77         &(morpheo::behavioural::custom::example_get_custom_information),
     78         true // is_toplevel
    7879        );
    7980     
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/test.cpp

    r82 r88  
    6969  _data_rc       (data_rc      & gen_mask<Tspecial_data_t>(param->_size_special_data)),
    7070  _write_rd      (write_rd     ),
    71   _num_reg_rd    (num_reg_rd   % param->_nb_special_register),
     71  _num_reg_rd    (num_reg_rd   % (1<<param->_size_general_register)),
    7272  _data_rd       (data_rd      & gen_mask<Tgeneral_data_t>(param->_size_general_data)),
    7373  _write_re      (write_re     ),
    74   _num_reg_re    (num_reg_re   % param->_nb_special_register),
     74  _num_reg_re    (num_reg_re   % (1<<param->_size_special_register)),
    7575  _data_re       (data_re      & gen_mask<Tspecial_data_t>(param->_size_special_data)),
    7676  _exception     (exception    ),
     
    8888
    8989#ifdef STATISTICS
    90   morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50);
     90  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
    9191#endif
     92
     93  Tusage_t _usage = USE_ALL;
     94
     95//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     96//   _usage = usage_unset(_usage,USE_VHDL                 );
     97//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     98//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     99//   _usage = usage_unset(_usage,USE_POSITION             );
     100//   _usage = usage_unset(_usage,USE_STATISTICS           );
     101//   _usage = usage_unset(_usage,USE_INFORMATION          );
    92102
    93103  Functionnal_unit * _Functionnal_unit = new Functionnal_unit (name.c_str(),
     
    96106#endif
    97107                                                               _param,
    98                                                                USE_ALL);
     108                                                               _usage);
    99109 
    100110#ifdef SYSTEMC
     
    162172  if (_param->_have_port_ooo_engine_id)
    163173  (*(_Functionnal_unit-> in_EXECUTE_IN_OOO_ENGINE_ID )) ( in_EXECUTE_IN_OOO_ENGINE_ID );
    164   if (_param->_have_port_packet_id)
     174  if (_param->_have_port_rob_ptr)
    165175  (*(_Functionnal_unit-> in_EXECUTE_IN_PACKET_ID     )) ( in_EXECUTE_IN_PACKET_ID     );
    166176  (*(_Functionnal_unit-> in_EXECUTE_IN_OPERATION     )) ( in_EXECUTE_IN_OPERATION     );
     
    187197  if (_param->_have_port_ooo_engine_id)
    188198  (*(_Functionnal_unit->out_EXECUTE_OUT_OOO_ENGINE_ID)) (out_EXECUTE_OUT_OOO_ENGINE_ID);
    189   if (_param->_have_port_packet_id)
     199  if (_param->_have_port_rob_ptr)
    190200  (*(_Functionnal_unit->out_EXECUTE_OUT_PACKET_ID    )) (out_EXECUTE_OUT_PACKET_ID    );
    191201//(*(_Functionnal_unit->out_EXECUTE_OUT_OPERATION    )) (out_EXECUTE_OUT_OPERATION    );
     
    475485  transaction_in.push_back(execute_transaction(_param,0,0,0,301,OPERATION_TEST_L_SFLTS   ,TYPE_TEST,0,0         ,0x11111111,0xdeadbeef,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // + <  - (in unsigned)
    476486
    477   transaction_in.push_back(execute_transaction(_param,0,0,0,400,OPERATION_SPECIAL_L_MTSPR   ,TYPE_SPECIAL,1,GROUP_ICACHE<<11,   3,0xdeadbeef,0              ,0,63,0xdeadbeef,0, 0,0              ,EXCEPTION_ALU_SPR_ACCESS_NOT_COMPLETE,0,(GROUP_ICACHE<<11)|   3));
    478   transaction_in.push_back(execute_transaction(_param,0,0,0,401,OPERATION_SPECIAL_L_MTSPR   ,TYPE_SPECIAL,1,GROUP_ICACHE<<11,   5,0xdeadbeef,0              ,0,63,0xdeadbeef,0, 0,0              ,EXCEPTION_ALU_SPR_ACCESS_NOT_COMPLETE,0,(GROUP_ICACHE<<11)|   5));
     487  transaction_in.push_back(execute_transaction(_param,0,0,0,400,OPERATION_SPECIAL_L_MTSPR   ,TYPE_SPECIAL,1,GROUP_ICACHE<<11,   3,0xdeadbeef,0              ,0,63,0xdeadbeef,0, 0,0              ,EXCEPTION_ALU_SPR_ACCESS_MUST_WRITE  ,0,(GROUP_ICACHE<<11)|   3));
     488  transaction_in.push_back(execute_transaction(_param,0,0,0,401,OPERATION_SPECIAL_L_MTSPR   ,TYPE_SPECIAL,1,GROUP_ICACHE<<11,   5,0xdeadbeef,0              ,0,63,0xdeadbeef,0, 0,0              ,EXCEPTION_ALU_SPR_ACCESS_MUST_WRITE  ,0,(GROUP_ICACHE<<11)|   5));
    479489  transaction_in.push_back(execute_transaction(_param,0,0,0,402,OPERATION_SPECIAL_L_MTSPR   ,TYPE_SPECIAL,1,GROUP_MAC   <<11,   0,0xdeadbeef,0              ,0,63,0xdeadbeef,0, 0,0              ,EXCEPTION_ALU_SPR_ACCESS_INVALID     ,0,(GROUP_MAC   <<11)|   0));
    480490  transaction_in.push_back(execute_transaction(_param,0,0,0,403,OPERATION_SPECIAL_L_MTSPR   ,TYPE_SPECIAL,1,GROUP_MAC   <<11,   1,0xdeadbeef,0              ,0,63,0xdeadbeef,0, 0,0              ,EXCEPTION_ALU_NONE                   ,0,(GROUP_MAC   <<11)|   1));
     
    590600              if (_param->_have_port_ooo_engine_id)
    591601              in_EXECUTE_IN_OOO_ENGINE_ID .write(transaction_in.front()._ooo_engine_id);
    592               if (_param->_have_port_packet_id)
     602              if (_param->_have_port_rob_ptr)
    593603              in_EXECUTE_IN_PACKET_ID     .write(transaction_in.front()._packet_id    );
    594604              in_EXECUTE_IN_OPERATION     .write(transaction_in.front()._operation    );
     
    613623            {
    614624              // TEST
    615               if (_param->_have_port_packet_id)
     625              if (_param->_have_port_rob_ptr)
    616626              TEST(Tpacket_t         , out_EXECUTE_OUT_PACKET_ID    .read(), transaction_out.front()._packet_id    );
    617627              if (_param->_have_port_context_id)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Functionnal_unit.h

    r82 r88  
    124124  private   : Tcontrol_t                      internal_EXECUTE_IN_ACK;
    125125  private   : Tcontrol_t                      internal_EXECUTE_OUT_VAL;
    126   private   : bool                            reg_BUSY;
     126  private   : bool                            reg_BUSY_IN ;
     127  private   : bool                            reg_BUSY_OUT;
    127128
    128   private   : execute_operation_t           * _execute_operation;
     129  private   : execute_operation_t           * _execute_operation_in ;
     130  private   : execute_operation_t           * _execute_operation_out;
    129131  private   : execute_register_t         **** _execute_register;
    130132  private   : execute_param_t               * _execute_param;
     
    158160  public  : void        transition                (void);
    159161  public  : void        genMoore                  (void);
    160   public  : void        genMealy                  (void);
    161 
    162162
    163163#endif                                         
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Parameters.h

    r81 r88  
    2525namespace functionnal_unit {
    2626
    27 
    2827  class Parameters : public morpheo::behavioural::Parameters
    2928  {
    3029    //-----[ fields ]------------------------------------------------------------
    31   public : const uint32_t            _nb_context                   ;
    32   public : const uint32_t            _nb_front_end                 ;
    33   public : const uint32_t            _nb_ooo_engine                ;
    34   public : const uint32_t            _nb_packet                    ;
    35   public : const uint32_t            _size_general_data            ;
    36   public : const uint32_t            _nb_general_register          ;
    37   public : const uint32_t            _size_special_data            ;
    38   public : const uint32_t            _nb_special_register          ;
    39   public : const uint32_t            _size_store_queue             ;
    40   public : const uint32_t            _size_load_queue              ;
     30  public : uint32_t            _nb_context                   ;
     31  public : uint32_t            _nb_front_end                 ;
     32  public : uint32_t            _nb_ooo_engine                ;
     33  public : uint32_t            _nb_packet                    ;
     34//public : uint32_t            _size_general_data            ;
     35//public : uint32_t            _size_special_data            ;
     36//public : uint32_t            _nb_general_register          ;
     37//public : uint32_t            _nb_special_register          ;
     38//public : uint32_t            _size_store_queue             ;
     39//public : uint32_t            _size_load_queue              ;
    4140
    42   public :       execute_timing_t ** _timing                       ;
    43   public : morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (uint32_t);
     41  public : execute_timing_t ** _timing                       ;
     42  public : morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (void);
    4443
    45   public : const uint32_t            _size_context_id              ;
    46   public : const uint32_t            _size_front_end_id            ;
    47   public : const uint32_t            _size_ooo_engine_id           ;
    48   public : const uint32_t            _size_packet_id               ;
    49   public : const uint32_t            _size_general_register        ;
    50   public : const uint32_t            _size_special_register        ;
     44//public : uint32_t            _size_context_id              ;
     45//public : uint32_t            _size_front_end_id            ;
     46//public : uint32_t            _size_ooo_engine_id           ;
     47//public : uint32_t            _size_packet_id               ;
     48//public : uint32_t            _size_general_register        ;
     49//public : uint32_t            _size_special_register        ;
    5150
    52   public : const bool                _have_port_context_id         ;
    53   public : const bool                _have_port_front_end_id       ;
    54   public : const bool                _have_port_ooo_engine_id      ;
    55   public : const bool                _have_port_packet_id          ;
    56   public : const bool                _have_port_load_queue_ptr     ;
     51//public : bool                _have_port_context_id         ;
     52//public : bool                _have_port_front_end_id       ;
     53//public : bool                _have_port_ooo_engine_id      ;
     54//public : bool                _have_port_packet_id          ;
     55//public : bool                _have_port_load_queue_ptr     ;
    5756
    58   public : const bool                _have_groupe_MAC              ;
     57  public : bool                _have_groupe_MAC              ;
    5958
    6059    //-----[ methods ]-----------------------------------------------------------
     
    7069                        uint32_t           size_load_queue    ,
    7170                        execute_timing_t** timing             ,
    72                         morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t));
    73   public : Parameters  (Parameters & param) ;
     71                        morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void),
     72                        bool               is_toplevel=true
     73                        );
     74//   public : Parameters  (Parameters & param) ;
    7475  public : ~Parameters () ;
     76
     77  public :        void            copy       (void);
    7578
    7679  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit.cpp

    r81 r88  
    4242    allocation ();
    4343
     44#if DEBUG_Functionnal_unit == true
     45    log_printf(INFO,Functionnal_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     46
     47    std::cout << *param << std::endl;
     48#endif   
     49
    4450#ifdef STATISTICS
    45     if (_usage & USE_STATISTICS)
     51    if (usage_is_set(_usage,USE_STATISTICS))
    4652      {
    4753        log_printf(INFO,Functionnal_unit,FUNCTION,"Allocation of statistics");
     
    5258
    5359#ifdef VHDL
    54     if (_usage & USE_VHDL)
     60    if (usage_is_set(_usage,USE_VHDL))
    5561      {
    5662        // generate the vhdl
     
    6268
    6369#ifdef SYSTEMC
    64     if (_usage & USE_SYSTEMC)
     70    if (usage_is_set(_usage,USE_SYSTEMC))
    6571      {
    6672        log_printf(INFO,Functionnal_unit,FUNCTION,"Method - transition");
     
    8490# endif   
    8591
    86         log_printf(INFO,Functionnal_unit,FUNCTION,"Method - genMealy");
    87 
    88         SC_METHOD (genMealy);
    89         dont_initialize ();
    90         sensitive << (*(in_CLOCK)).neg()
    91                   << (*(in_EXECUTE_OUT_ACK));
    92        
    93 # ifdef SYSTEMCASS_SPECIFIC
    94         // List dependency information
    95         (*(out_EXECUTE_IN_ACK)) (*(in_EXECUTE_OUT_ACK));
    96 # endif   
    97        
    9892#endif
    9993      }
     
    108102
    109103#ifdef STATISTICS
    110     if (_usage & USE_STATISTICS)
     104    if (usage_is_set(_usage,USE_STATISTICS))
    111105      {
    112106        log_printf(INFO,Functionnal_unit,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_allocation.cpp

    r81 r88  
    6767      if (_param->_have_port_ooo_engine_id)
    6868       in_EXECUTE_IN_OOO_ENGINE_ID = interface->set_signal_in <Tcontext_t        > ("ooo_engine_id", _param->_size_ooo_engine_id);
    69       if (_param->_have_port_packet_id)
    70        in_EXECUTE_IN_PACKET_ID     = interface->set_signal_in <Tpacket_t         > ("packet_id"    , _param->_size_packet_id    );
     69      if (_param->_have_port_rob_ptr)
     70       in_EXECUTE_IN_PACKET_ID     = interface->set_signal_in <Tpacket_t         > ("packet_id"    , _param->_size_rob_ptr    );
    7171       in_EXECUTE_IN_OPERATION     = interface->set_signal_in <Toperation_t      > ("operation"    , _param->_size_operation    );
    7272       in_EXECUTE_IN_TYPE          = interface->set_signal_in <Ttype_t           > ("type"         , _param->_size_type         );
    73        in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("store_queue_ptr_write",log2(_param->_size_store_queue));
     73       in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("store_queue_ptr_write",_param->_size_store_queue_ptr);
    7474       if (_param->_have_port_load_queue_ptr)
    75        in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_in <Tlsq_ptr_t> ("load_queue_ptr_write" ,log2(_param->_size_load_queue));
     75       in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_in <Tlsq_ptr_t> ("load_queue_ptr_write" ,_param->_size_load_queue_ptr);
    7676       in_EXECUTE_IN_HAS_IMMEDIAT  = interface->set_signal_in <Tcontrol_t        > ("has_immediat" , 1);
    7777       in_EXECUTE_IN_IMMEDIAT      = interface->set_signal_in <Tgeneral_data_t   > ("immediat"     , _param->_size_general_data);
     
    102102       if (_param->_have_port_ooo_engine_id)
    103103       out_EXECUTE_OUT_OOO_ENGINE_ID  = interface->set_signal_out<Tcontext_t        > ("ooo_engine_id",_param->_size_ooo_engine_id);
    104        if (_param->_have_port_packet_id)
    105        out_EXECUTE_OUT_PACKET_ID      = interface->set_signal_out<Tpacket_t         > ("packet_id"    ,_param->_size_packet_id    );
     104       if (_param->_have_port_rob_ptr)
     105       out_EXECUTE_OUT_PACKET_ID      = interface->set_signal_out<Tpacket_t         > ("packet_id"    ,_param->_size_rob_ptr    );
    106106     //out_EXECUTE_OUT_OPERATION      = interface->set_signal_out<Toperation_t      > ("operation"    ,_param->_size_operation    );
    107107       out_EXECUTE_OUT_TYPE           = interface->set_signal_out<Ttype_t           > ("type"         ,_param->_size_type         );
     
    117117     }
    118118
    119     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    120      _execute_operation = new execute_operation_t;
    121      _execute_param     = new execute_param_t(_param->_size_general_data,
    122                                               _param->_timing);
     119     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     120     if (usage_is_set(_usage,USE_SYSTEMC))
     121       {
     122     _execute_operation_in  = new execute_operation_t;
     123     _execute_operation_out = new execute_operation_t;
     124     _execute_param         = new execute_param_t(_param->_size_general_data,
     125                                                  _param->_timing);
    123126
    124127     _execute_register = new execute_register_t *** [_param->_nb_context];
     
    134137             for (uint32_t k=0; k<_param->_nb_ooo_engine; k++)
    135138               {
    136                  uint32_t num_thread = get_num_thread(i,_param->_size_context_id,
    137                                                       j,_param->_size_front_end_id,
    138                                                       k,_param->_size_ooo_engine_id);
     139//               uint32_t num_thread = get_num_thread(i,_param->_size_context_id,
     140//                                                    j,_param->_size_front_end_id,
     141//                                                    k,_param->_size_ooo_engine_id);
    139142
    140143                 _execute_register [i][j][k] = new execute_register_t;
     
    144147
    145148                 for (uint32_t x=GROUP_CUSTOM_1; x<GROUP_CUSTOM_8; x++)
    146                    if ((_param->_get_custom_information(num_thread))._get_valid_group(x) == true)
     149                   if ((_param->_get_custom_information())._get_valid_group(x) == true)
    147150                     {
    148                        uint32_t nb_reg = (_param->_get_custom_information(num_thread))._get_nb_register(x);
     151                       uint32_t nb_reg = (_param->_get_custom_information())._get_nb_register(x);
    149152                       _execute_register[i][j][k]->implement_group(x,nb_reg);
    150153
    151154                       for (uint32_t y=0; y<nb_reg; y++)
    152                          _execute_register[i][j][k]->_spr_access_mode->change_mode(x,y,(_param->_get_custom_information(num_thread))._get_access_mode(x,y));
     155                         _execute_register[i][j][k]->_spr_access_mode->change_mode(x,y,(_param->_get_custom_information())._get_access_mode(x,y));
    153156                     }
    154157               }
     
    211214     if (_param->_timing[TYPE_TEST   ][OPERATION_TEST_L_SFNE       ]._latence > 0)
    212215       _function_execute[TYPE_TEST   ][OPERATION_TEST_L_SFNE       ] = &(operation_l_sfne    );
    213 //   if (_param->_timing[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_MUL     ]._latence > 0)
    214 //     _function_execute[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_MUL     ] = &(operation_l_mul     );
    215 //   if (_param->_timing[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_MULU    ]._latence > 0)
    216 //     _function_execute[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_MULU    ] = &(operation_l_mulu    );
    217 //   if (_param->_timing[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_DIV     ]._latence > 0)
    218 //     _function_execute[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_DIV     ] = &(operation_l_div     );
    219 //   if (_param->_timing[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_DIVU    ]._latence > 0)
    220 //     _function_execute[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_DIVU    ] = &(operation_l_divu    );
     216//   if (_param->_timing[TYPE_MUL    ][OPERATION_MUL_L_MUL         ]._latence > 0)
     217//     _function_execute[TYPE_MUL    ][OPERATION_MUL_L_MUL         ] = &(operation_l_mul     );
     218//   if (_param->_timing[TYPE_MUL    ][OPERATION_MUL_L_MULU        ]._latence > 0)
     219//     _function_execute[TYPE_DIV    ][OPERATION_MUL_L_MULU        ] = &(operation_l_mulu    );
     220//   if (_param->_timing[TYPE_DIV    ][OPERATION_DIV_L_DIV         ]._latence > 0)
     221//     _function_execute[TYPE_DIV    ][OPERATION_DIV_L_DIV         ] = &(operation_l_div     );
     222//   if (_param->_timing[TYPE_DIV    ][OPERATION_DIV_L_DIVU        ]._latence > 0)
     223//     _function_execute[TYPE_DIV    ][OPERATION_DIV_L_DIVU        ] = &(operation_l_divu    );
    221224     if (_param->_timing[TYPE_EXTEND ][OPERATION_EXTEND_L_EXTEND_S ]._latence > 0)
    222225       _function_execute[TYPE_EXTEND ][OPERATION_EXTEND_L_EXTEND_S ] = &(operation_l_extend_s);
     
    243246     if (_param->_timing[TYPE_BRANCH ][OPERATION_BRANCH_L_JALR     ]._latence > 0)
    244247       _function_execute[TYPE_BRANCH ][OPERATION_BRANCH_L_JALR     ] = &(operation_l_jalr    );
    245 
    246 
    247 
    248 #ifdef POSITION
    249     _component->generate_file();
     248       }
     249
     250#ifdef POSITION
     251     if (usage_is_set(_usage,USE_POSITION))
     252       _component->generate_file();
    250253#endif
    251254
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_deallocation.cpp

    r81 r88  
    2424    log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
    2525
    26     if (_usage & USE_SYSTEMC)
     26    if (usage_is_set(_usage,USE_SYSTEMC))
    2727      {
    2828        delete    in_CLOCK ;
     
    3737        if (_param->_have_port_ooo_engine_id)
    3838        delete  in_EXECUTE_IN_OOO_ENGINE_ID ;
    39         if (_param->_have_port_packet_id)
     39        if (_param->_have_port_rob_ptr)
    4040        delete  in_EXECUTE_IN_PACKET_ID     ;
    4141        delete  in_EXECUTE_IN_OPERATION     ;
     
    6262        if (_param->_have_port_ooo_engine_id)
    6363        delete out_EXECUTE_OUT_OOO_ENGINE_ID  ;
    64         if (_param->_have_port_packet_id)
     64        if (_param->_have_port_rob_ptr)
    6565        delete out_EXECUTE_OUT_PACKET_ID      ;
    6666      //delete out_EXECUTE_OUT_OPERATION      ;
     
    7575        delete out_EXECUTE_OUT_NO_SEQUENCE    ;
    7676        delete out_EXECUTE_OUT_ADDRESS        ;
     77
     78        // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     79       
     80        delete [] _execute_register;
     81        delete    _execute_param;
     82        delete    _execute_operation_in;
     83        delete    _execute_operation_out;
     84        delete [] _function_execute;
    7785      }
    78     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    79 
    80     delete [] _execute_register;
    81     delete    _execute_param;
    82     delete    _execute_operation;
    83     delete [] _function_execute;
    8486
    8587    delete    _component;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_end_cycle.cpp

    r81 r88  
    2626
    2727#ifdef STATISTICS
    28     _stat->end_cycle();
     28    if (usage_is_set(_usage,USE_STATISTICS))
     29      _stat->end_cycle();
    2930#endif   
    3031
     
    3233    // Evaluation before read the ouput signal
    3334//  sc_start(0);
    34     _interfaces->testbench();
     35    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     36      _interfaces->testbench();
    3537#endif
    3638
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_genMoore.cpp

    r81 r88  
    2323  void Functionnal_unit::genMoore (void)
    2424  {
    25     log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
     25    log_begin(Functionnal_unit,FUNCTION);
     26    log_function(Functionnal_unit,FUNCTION,_name.c_str());
    2627
    27     internal_EXECUTE_OUT_VAL = reg_BUSY and (_execute_operation->_timing._latence == 0);
     28    {
     29      internal_EXECUTE_IN_ACK = not reg_BUSY_IN;
     30     
     31      PORT_WRITE(out_EXECUTE_IN_ACK           , internal_EXECUTE_IN_ACK);
     32    }
    2833
    29     PORT_WRITE(out_EXECUTE_OUT_VAL          , internal_EXECUTE_OUT_VAL);
    30     if (_param->_have_port_context_id)
    31     PORT_WRITE(out_EXECUTE_OUT_CONTEXT_ID   ,_execute_operation->_context_id   );
    32     if (_param->_have_port_front_end_id)
    33     PORT_WRITE(out_EXECUTE_OUT_FRONT_END_ID ,_execute_operation->_front_end_id );
    34     if (_param->_have_port_ooo_engine_id)
    35     PORT_WRITE(out_EXECUTE_OUT_OOO_ENGINE_ID,_execute_operation->_ooo_engine_id);
    36     if (_param->_have_port_packet_id)
    37     PORT_WRITE(out_EXECUTE_OUT_PACKET_ID    ,_execute_operation->_packet_id    );
    38   //PORT_WRITE(out_EXECUTE_OUT_OPERATION    ,_execute_operation->_operation    );
    39     PORT_WRITE(out_EXECUTE_OUT_TYPE         ,_execute_operation->_type         );
    40     PORT_WRITE(out_EXECUTE_OUT_WRITE_RD     ,_execute_operation->_write_rd     );
    41     PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RD   ,_execute_operation->_num_reg_rd   );
    42     PORT_WRITE(out_EXECUTE_OUT_DATA_RD      ,_execute_operation->_data_rd      );
    43     PORT_WRITE(out_EXECUTE_OUT_WRITE_RE     ,_execute_operation->_write_re     );
    44     PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RE   ,_execute_operation->_num_reg_re   );
    45     PORT_WRITE(out_EXECUTE_OUT_DATA_RE      ,_execute_operation->_data_re      );
    46     PORT_WRITE(out_EXECUTE_OUT_EXCEPTION    ,_execute_operation->_exception    );
    47     PORT_WRITE(out_EXECUTE_OUT_NO_SEQUENCE  ,_execute_operation->_no_sequence  );
    48     PORT_WRITE(out_EXECUTE_OUT_ADDRESS      ,_execute_operation->_address      );
     34    {
     35      internal_EXECUTE_OUT_VAL = reg_BUSY_OUT and (_execute_operation_out->_timing._latence == 0);
     36     
     37      PORT_WRITE(out_EXECUTE_OUT_VAL          , internal_EXECUTE_OUT_VAL);
     38      if (_param->_have_port_context_id)
     39      PORT_WRITE(out_EXECUTE_OUT_CONTEXT_ID   ,_execute_operation_out->_context_id   );
     40      if (_param->_have_port_front_end_id)
     41      PORT_WRITE(out_EXECUTE_OUT_FRONT_END_ID ,_execute_operation_out->_front_end_id );
     42      if (_param->_have_port_ooo_engine_id)
     43      PORT_WRITE(out_EXECUTE_OUT_OOO_ENGINE_ID,_execute_operation_out->_ooo_engine_id);
     44      if (_param->_have_port_rob_ptr)
     45      PORT_WRITE(out_EXECUTE_OUT_PACKET_ID    ,_execute_operation_out->_packet_id    );
     46  //  PORT_WRITE(out_EXECUTE_OUT_OPERATION    ,_execute_operation_out->_operation    );
     47      PORT_WRITE(out_EXECUTE_OUT_TYPE         ,_execute_operation_out->_type         );
     48      PORT_WRITE(out_EXECUTE_OUT_WRITE_RD     ,_execute_operation_out->_write_rd     );
     49      PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RD   ,_execute_operation_out->_num_reg_rd   );
     50      PORT_WRITE(out_EXECUTE_OUT_DATA_RD      ,_execute_operation_out->_data_rd      );
     51      PORT_WRITE(out_EXECUTE_OUT_WRITE_RE     ,_execute_operation_out->_write_re     );
     52      PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RE   ,_execute_operation_out->_num_reg_re   );
     53      PORT_WRITE(out_EXECUTE_OUT_DATA_RE      ,_execute_operation_out->_data_re      );
     54      PORT_WRITE(out_EXECUTE_OUT_EXCEPTION    ,_execute_operation_out->_exception    );
     55      PORT_WRITE(out_EXECUTE_OUT_NO_SEQUENCE  ,_execute_operation_out->_no_sequence  );
     56      PORT_WRITE(out_EXECUTE_OUT_ADDRESS      ,_execute_operation_out->_address      );
     57    }
    4958
    50     log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
     59    log_end(Functionnal_unit,FUNCTION);
    5160  };
    5261
     
    5766}; // end namespace multi_execute_loop
    5867}; // end namespace core
    59 
    6068}; // end namespace behavioural
    6169}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_transition.cpp

    r81 r88  
    2323  void Functionnal_unit::transition (void)
    2424  {
    25     log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
     25    log_begin(Functionnal_unit,FUNCTION);
     26    log_function(Functionnal_unit,FUNCTION,_name.c_str());
    2627
    2728    if (PORT_READ(in_NRESET) == 0)
    2829      {
    29         reg_BUSY = false;
     30        reg_BUSY_IN  = false;
     31        reg_BUSY_OUT = false;
    3032       
    3133        for (uint32_t i=0; i<_param->_nb_context; i++)
     
    3335            for (uint32_t k=0; k<_param->_nb_ooo_engine; k++)
    3436              {
    35                 uint32_t num_thread = get_num_thread(i,_param->_size_context_id,
    36                                                      j,_param->_size_front_end_id,
    37                                                      k,_param->_size_ooo_engine_id);
     37//              uint32_t num_thread = get_num_thread(i,_param->_size_context_id,
     38//                                                   j,_param->_size_front_end_id,
     39//                                                   k,_param->_size_ooo_engine_id);
    3840               
    3941                for (uint32_t x=GROUP_CUSTOM_1; x<GROUP_CUSTOM_8; x++)
    4042                  {
    41                     function_execute_end_cycle_t * fct = (_param->_get_custom_information(num_thread)._get_custom_execute_reset(x));
     43                    function_execute_end_cycle_t * fct = (_param->_get_custom_information()._get_custom_execute_reset(x));
    4244                   
    4345                    if (fct != NULL)
     
    5153        if (internal_EXECUTE_OUT_VAL and PORT_READ(in_EXECUTE_OUT_ACK))
    5254          {
     55            log_printf(TRACE,Functionnal_unit,FUNCTION,"  * EXECUTE_OUT : Transaction Accepted");
    5356            // transaction
    54             reg_BUSY = false;
     57            reg_BUSY_OUT = false;
    5558          }
    5659       
     
    6063        if (PORT_READ(in_EXECUTE_IN_VAL) and internal_EXECUTE_IN_ACK)
    6164          {
    62             reg_BUSY = true;
     65            log_printf(TRACE,Functionnal_unit,FUNCTION,"  * EXECUTE_IN : Transaction Accepted");
     66
     67            reg_BUSY_IN = true;
    6368
    6469            Tcontext_t   context_id    = (_param->_have_port_context_id   )?PORT_READ(in_EXECUTE_IN_CONTEXT_ID   ):0;
    6570            Tcontext_t   front_end_id  = (_param->_have_port_front_end_id )?PORT_READ(in_EXECUTE_IN_FRONT_END_ID ):0;
    6671            Tcontext_t   ooo_engine_id = (_param->_have_port_ooo_engine_id)?PORT_READ(in_EXECUTE_IN_OOO_ENGINE_ID):0;
    67             Tcontext_t   packet_id     = (_param->_have_port_packet_id    )?PORT_READ(in_EXECUTE_IN_PACKET_ID    ):0;
     72            Tcontext_t   packet_id     = (_param->_have_port_rob_ptr      )?PORT_READ(in_EXECUTE_IN_PACKET_ID    ):0;
    6873            Toperation_t operation     = PORT_READ(in_EXECUTE_IN_OPERATION);
    6974            Ttype_t      type          = PORT_READ(in_EXECUTE_IN_TYPE);
    7075           
    71             _execute_operation->_context_id    = context_id   ;
    72             _execute_operation->_front_end_id  = front_end_id ;
    73             _execute_operation->_ooo_engine_id = ooo_engine_id;
    74             _execute_operation->_packet_id     = packet_id    ;
    75             _execute_operation->_operation     = operation    ;
    76             _execute_operation->_type          = type         ;
    77             _execute_operation->_has_immediat  = PORT_READ(in_EXECUTE_IN_HAS_IMMEDIAT);
    78             _execute_operation->_immediat      = PORT_READ(in_EXECUTE_IN_IMMEDIAT    );
    79             _execute_operation->_data_ra       = PORT_READ(in_EXECUTE_IN_DATA_RA     );
    80             _execute_operation->_data_rb       = PORT_READ(in_EXECUTE_IN_DATA_RB     );
    81             _execute_operation->_data_rc       = PORT_READ(in_EXECUTE_IN_DATA_RC     );
    82             _execute_operation->_write_rd      = PORT_READ(in_EXECUTE_IN_WRITE_RD    );
    83             _execute_operation->_num_reg_rd    = PORT_READ(in_EXECUTE_IN_NUM_REG_RD  );
    84             _execute_operation->_write_re      = PORT_READ(in_EXECUTE_IN_WRITE_RE    );
    85             _execute_operation->_num_reg_re    = PORT_READ(in_EXECUTE_IN_NUM_REG_RE  );
    86 
     76            _execute_operation_in->_context_id    = context_id   ;
     77            _execute_operation_in->_front_end_id  = front_end_id ;
     78            _execute_operation_in->_ooo_engine_id = ooo_engine_id;
     79            _execute_operation_in->_packet_id     = packet_id    ;
     80            _execute_operation_in->_operation     = operation    ;
     81            _execute_operation_in->_type          = type         ;
     82            _execute_operation_in->_has_immediat  = PORT_READ(in_EXECUTE_IN_HAS_IMMEDIAT);
     83            _execute_operation_in->_immediat      = PORT_READ(in_EXECUTE_IN_IMMEDIAT    );
     84            _execute_operation_in->_data_ra       = PORT_READ(in_EXECUTE_IN_DATA_RA     );
     85            _execute_operation_in->_data_rb       = PORT_READ(in_EXECUTE_IN_DATA_RB     );
     86            _execute_operation_in->_data_rc       = PORT_READ(in_EXECUTE_IN_DATA_RC     );
     87            _execute_operation_in->_write_rd      = PORT_READ(in_EXECUTE_IN_WRITE_RD    );
     88            _execute_operation_in->_num_reg_rd    = PORT_READ(in_EXECUTE_IN_NUM_REG_RD  );
     89            _execute_operation_in->_write_re      = PORT_READ(in_EXECUTE_IN_WRITE_RE    );
     90            _execute_operation_in->_num_reg_re    = PORT_READ(in_EXECUTE_IN_NUM_REG_RE  );
     91
     92            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * context_id    : %d",_execute_operation_in->_context_id   );
     93            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * front_end_id  : %d",_execute_operation_in->_front_end_id );
     94            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * ooo_engine_id : %d",_execute_operation_in->_ooo_engine_id);
     95            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * packet_id     : %d",_execute_operation_in->_packet_id    );
     96            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * operation     : %d",_execute_operation_in->_operation    );
     97            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * type          : %s",toString_type(_execute_operation_in->_type).c_str());
     98            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * has_immediat  : %d",_execute_operation_in->_has_immediat );
     99            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * immediat      : %.8x",_execute_operation_in->_immediat     );
     100            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * data_ra       : %.8x",_execute_operation_in->_data_ra      );
     101            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * data_rb       : %.8x",_execute_operation_in->_data_rb      );
     102            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * data_rc       : %.8x",_execute_operation_in->_data_rc      );
     103            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * write_rd      : %d"  ,_execute_operation_in->_write_rd     );
     104            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * num_reg_rd    : %d"  ,_execute_operation_in->_num_reg_rd   );
     105            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * write_re      : %d"  ,_execute_operation_in->_write_re     );
     106            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * num_reg_re    : %d"  ,_execute_operation_in->_num_reg_re   );
     107           
    87108#ifdef DEBUG_TEST
    88109            if (type >= _param->_nb_type)
     
    98119            if (type == TYPE_CUSTOM)
    99120              {
    100                 uint32_t num_thread = get_num_thread(context_id   ,_param->_size_context_id,
    101                                                      front_end_id ,_param->_size_front_end_id,
    102                                                      ooo_engine_id,_param->_size_ooo_engine_id);
    103 
    104                 (*(_param->_get_custom_information(num_thread)._get_custom_execute_genMoore(operation))) (_execute_operation, execute_register, _execute_param);
     121//              uint32_t num_thread = get_num_thread(context_id   ,_param->_size_context_id,
     122//                                                   front_end_id ,_param->_size_front_end_id,
     123//                                                   ooo_engine_id,_param->_size_ooo_engine_id);
     124
     125                (*(_param->_get_custom_information()._get_custom_execute_genMoore(operation))) (_execute_operation_in, execute_register, _execute_param);
    105126              }
    106127            else
    107               (*(_function_execute[type][operation])) (_execute_operation, execute_register, _execute_param);
    108 
     128              (*(_function_execute[type][operation])) (_execute_operation_in, execute_register, _execute_param);
     129
     130
     131            log_printf(TRACE,Functionnal_unit,FUNCTION,"    -----------------");
     132            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * latence       : %.8x",_execute_operation_in->_timing._latence);
     133            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * delay         : %.8x",_execute_operation_in->_timing._delay);
     134            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * data_rd       : %.8x",_execute_operation_in->_data_rd    );
     135            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * data_re       : %.8x",_execute_operation_in->_data_re    );
     136            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * exception     : %d"  ,_execute_operation_in->_exception  );
     137            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * no_sequence   : %d"  ,_execute_operation_in->_no_sequence);
     138            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * address       : %.8x",_execute_operation_in->_address    );
    109139
    110140#ifdef STATISTICS
    111             (*_stat_use_functionnal_unit) ++;
    112             (*_stat_sum_delay)   += _execute_operation->_timing._delay;
    113             (*_stat_sum_latence) += _execute_operation->_timing._latence;
     141            if (usage_is_set(_usage,USE_STATISTICS))
     142              {
     143                (*_stat_use_functionnal_unit) ++;
     144                (*_stat_sum_delay)   += _execute_operation_in->_timing._delay;
     145                (*_stat_sum_latence) += _execute_operation_in->_timing._latence;
     146              }
    114147#endif
    115148          }
     
    121154              for (uint32_t k=0; k<_param->_nb_ooo_engine; k++)
    122155                {
    123                   uint32_t num_thread = get_num_thread(i,_param->_size_context_id,
    124                                                        j,_param->_size_front_end_id,
    125                                                        k,_param->_size_ooo_engine_id);
     156//                uint32_t num_thread = get_num_thread(i,_param->_size_context_id,
     157//                                                     j,_param->_size_front_end_id,
     158//                                                     k,_param->_size_ooo_engine_id);
    126159
    127160                  for (uint32_t x=GROUP_CUSTOM_1; x<GROUP_CUSTOM_8; x++)
    128161                    {
    129                       function_execute_end_cycle_t * fct = (_param->_get_custom_information(num_thread)._get_custom_execute_transition(x));
     162                      function_execute_end_cycle_t * fct = (_param->_get_custom_information()._get_custom_execute_transition(x));
    130163                     
    131164                      if (fct != NULL)
     
    142175            }
    143176        }
     177
     178        if (reg_BUSY_IN and not reg_BUSY_OUT)
     179          {
     180            reg_BUSY_OUT = reg_BUSY_IN;
     181            reg_BUSY_IN  = false;
     182
     183            _execute_operation_out->_timing        = _execute_operation_in->_timing       ;
     184            _execute_operation_out->_context_id    = _execute_operation_in->_context_id   ;
     185            _execute_operation_out->_front_end_id  = _execute_operation_in->_front_end_id ;
     186            _execute_operation_out->_ooo_engine_id = _execute_operation_in->_ooo_engine_id;
     187            _execute_operation_out->_packet_id     = _execute_operation_in->_packet_id    ;
     188            _execute_operation_out->_operation     = _execute_operation_in->_operation    ;
     189            _execute_operation_out->_type          = _execute_operation_in->_type         ;
     190            _execute_operation_out->_has_immediat  = _execute_operation_in->_has_immediat ;
     191            _execute_operation_out->_immediat      = _execute_operation_in->_immediat     ;
     192            _execute_operation_out->_data_ra       = _execute_operation_in->_data_ra      ;
     193            _execute_operation_out->_data_rb       = _execute_operation_in->_data_rb      ;
     194            _execute_operation_out->_data_rc       = _execute_operation_in->_data_rc      ;
     195            _execute_operation_out->_data_rd       = _execute_operation_in->_data_rd      ;
     196            _execute_operation_out->_data_re       = _execute_operation_in->_data_re      ;
     197            _execute_operation_out->_write_rd      = _execute_operation_in->_write_rd     ;
     198            _execute_operation_out->_num_reg_rd    = _execute_operation_in->_num_reg_rd   ;
     199            _execute_operation_out->_write_re      = _execute_operation_in->_write_re     ;
     200            _execute_operation_out->_num_reg_re    = _execute_operation_in->_num_reg_re   ;
     201            _execute_operation_out->_exception     = _execute_operation_in->_exception    ;
     202            _execute_operation_out->_no_sequence   = _execute_operation_in->_no_sequence  ;
     203            _execute_operation_out->_address       = _execute_operation_in->_address      ;
     204          }
     205       
     206        // each cycle : decrease the latence
     207        if (reg_BUSY_OUT and (_execute_operation_out->_timing._latence > 0))
     208          _execute_operation_out->_timing._latence --;
    144209      }
    145 
    146     // each cycle : decrease the latence
    147     if (reg_BUSY and (_execute_operation->_timing._latence > 0))
    148       _execute_operation->_timing._latence --;
    149210
    150211#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     
    152213#endif
    153214
    154     log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
     215    log_end(Functionnal_unit,FUNCTION);
    155216  };
    156217
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters.cpp

    r81 r88  
    3131                          uint32_t           size_load_queue    ,
    3232                          execute_timing_t** timing             ,
    33                           morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t)) :
    34     _nb_context              (nb_context            ),
    35     _nb_front_end            (nb_front_end          ),
    36     _nb_ooo_engine           (nb_ooo_engine         ),
    37     _nb_packet               (nb_packet             ),
    38     _size_general_data       (size_general_data     ),
    39     _nb_general_register     (nb_general_register   ),
    40     _size_special_data       (size_special_data     ),
    41     _nb_special_register     (nb_special_register   ),
    42     _size_store_queue        (size_store_queue      ),
    43     _size_load_queue         (size_load_queue       ),
    44 
    45     _size_context_id         (log2(nb_context      )),
    46     _size_front_end_id       (log2(nb_front_end    )),
    47     _size_ooo_engine_id      (log2(nb_ooo_engine   )),
    48     _size_packet_id          (log2(nb_packet       )),
    49     _size_general_register   (log2(nb_general_register)),
    50     _size_special_register   (log2(nb_special_register)),
    51 
    52     _have_port_context_id    (_size_context_id    > 0),
    53     _have_port_front_end_id  (_size_front_end_id  > 0),
    54     _have_port_ooo_engine_id (_size_ooo_engine_id > 0),
    55     _have_port_packet_id     (_size_packet_id     > 0),
    56     _have_port_load_queue_ptr(_size_load_queue    > 1),
    57 
    58     _have_groupe_MAC         ( (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC  ]._latence > 0) or
    59                                (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC]._latence > 0) or
    60                                (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB  ]._latence > 0))
     33                          morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void),
     34                          bool               is_toplevel)
    6135  {
    6236    log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
    6337
    64     _timing                 = timing;
     38    _nb_context              = nb_context            ;
     39    _nb_front_end            = nb_front_end          ;
     40    _nb_ooo_engine           = nb_ooo_engine         ;
     41    _nb_packet               = nb_packet             ;
     42//  _size_general_data       = size_general_data     ;
     43//  _size_special_data       = size_special_data     ;
     44//  _nb_general_register     = nb_general_register   ;
     45//  _nb_special_register     = nb_special_register   ;
     46//  _size_store_queue        = size_store_queue      ;
     47//  _size_load_queue         = size_load_queue       ;
     48
     49//  _size_context_id         = log2(nb_context         );
     50//  _size_front_end_id       = log2(nb_front_end       );
     51//  _size_ooo_engine_id      = log2(nb_ooo_engine      );
     52//  _size_packet_id          = log2(nb_packet          );
     53//  _size_general_register   = log2(nb_general_register);
     54//  _size_special_register   = log2(nb_special_register);
     55
     56//  _have_port_context_id    = _size_context_id    > 0;
     57//  _have_port_front_end_id  = _size_front_end_id  > 0;
     58//  _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
     59//  _have_port_packet_id     = _size_packet_id     > 0;
     60//  _have_port_load_queue_ptr= _size_load_queue    > 1;
     61
     62    _have_groupe_MAC         = ( (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC  ]._latence > 0) or
     63                                 (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC]._latence > 0) or
     64                                 (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB  ]._latence > 0));
     65
     66    _timing                  = timing;
    6567
    6668    if (get_custom_information == NULL)
     
    7173    test();
    7274
     75    if (is_toplevel)
     76      {
     77        _size_context_id         = log2(nb_context         );
     78        _size_front_end_id       = log2(nb_front_end       );
     79        _size_ooo_engine_id      = log2(nb_ooo_engine      );
     80        _size_rob_ptr            = log2(nb_packet          );
     81        _size_general_register   = log2(nb_general_register);
     82        _size_special_register   = log2(nb_special_register);
     83
     84        _size_general_data       = size_general_data     ;
     85        _size_special_data       = size_special_data     ;
     86        _size_general_register   = log2(nb_general_register);
     87        _size_special_register   = log2(nb_special_register);
     88
     89        _size_load_queue_ptr     = log2(size_load_queue );
     90        _size_store_queue_ptr    = log2(size_store_queue);
     91   
     92        _have_port_context_id    = _size_context_id    > 0;
     93        _have_port_front_end_id  = _size_front_end_id  > 0;
     94        _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
     95        _have_port_rob_ptr       = _size_rob_ptr       > 0;
     96        _have_port_load_queue_ptr= _size_load_queue_ptr> 0;
     97
     98        copy();
     99      }
     100
    73101    log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
    74102  };
    75103 
     104// #undef  FUNCTION
     105// #define FUNCTION "Functionnal_unit::Parameters (copy)"
     106//   Parameters::Parameters (Parameters & param):
     107//     _nb_context              (param._nb_context             ),
     108//     _nb_front_end            (param._nb_front_end           ),
     109//     _nb_ooo_engine           (param._nb_ooo_engine          ),
     110//     _nb_packet               (param._nb_packet              ),
     111//     _size_general_data       (param._size_general_data      ),
     112//     _nb_general_register     (param._nb_general_register    ),
     113//     _size_special_data       (param._size_special_data      ),
     114//     _nb_special_register     (param._nb_special_register    ),
     115//     _size_store_queue        (param._size_store_queue       ),
     116//     _size_load_queue         (param._size_load_queue        ),
     117
     118//     _size_context_id         (param._size_context_id        ),
     119//     _size_front_end_id       (param._size_front_end_id      ),
     120//     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
     121//     _size_packet_id          (param._size_packet_id         ),
     122//     _size_general_register   (param._size_general_register  ),
     123//     _size_special_register   (param._size_special_register  ),
     124
     125//     _have_port_context_id    (param._have_port_context_id   ),
     126//     _have_port_front_end_id  (param._have_port_front_end_id ),
     127//     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
     128//     _have_port_packet_id     (param._have_port_packet_id    ),
     129//     _have_port_load_queue_ptr(param._have_port_load_queue_ptr),
     130
     131//     _have_groupe_MAC         (param._have_groupe_MAC        )
     132//   {
     133//     log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
     134
     135//     _timing                 = param._timing;
     136//     _get_custom_information = param._get_custom_information;
     137
     138//     test();
     139//     log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
     140//   };
     141
    76142#undef  FUNCTION
    77 #define FUNCTION "Functionnal_unit::Parameters (copy)"
    78   Parameters::Parameters (Parameters & param):
    79     _nb_context              (param._nb_context             ),
    80     _nb_front_end            (param._nb_front_end           ),
    81     _nb_ooo_engine           (param._nb_ooo_engine          ),
    82     _nb_packet               (param._nb_packet              ),
    83     _size_general_data       (param._size_general_data      ),
    84     _nb_general_register     (param._nb_general_register    ),
    85     _size_special_data       (param._size_special_data      ),
    86     _nb_special_register     (param._nb_special_register    ),
    87     _size_store_queue        (param._size_store_queue       ),
    88     _size_load_queue         (param._size_load_queue        ),
    89 
    90     _size_context_id         (param._size_context_id        ),
    91     _size_front_end_id       (param._size_front_end_id      ),
    92     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
    93     _size_packet_id          (param._size_packet_id         ),
    94     _size_general_register   (param._size_general_register  ),
    95     _size_special_register   (param._size_special_register  ),
    96 
    97     _have_port_context_id    (param._have_port_context_id   ),
    98     _have_port_front_end_id  (param._have_port_front_end_id ),
    99     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
    100     _have_port_packet_id     (param._have_port_packet_id    ),
    101     _have_port_load_queue_ptr(param._have_port_load_queue_ptr),
    102 
    103     _have_groupe_MAC         (param._have_groupe_MAC        )
     143#define FUNCTION "Functionnal_unit::~Parameters"
     144  Parameters::~Parameters (void)
    104145  {
    105146    log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
    106 
    107     _timing                 = param._timing;
    108     _get_custom_information = param._get_custom_information;
    109 
    110     test();
    111147    log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
    112148  };
    113149
    114150#undef  FUNCTION
    115 #define FUNCTION "Functionnal_unit::~Parameters"
    116   Parameters::~Parameters ()
     151#define FUNCTION "Functionnal_unit::copy"
     152  void Parameters::copy (void)
    117153  {
    118154    log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters_msg_error.cpp

    r81 r88  
    3131      for (uint32_t j=0; j<_nb_operation; j++)
    3232        if (_timing[i][j]._delay != _timing[i][j]._latence)
    33           test.error("For the type '"+toString(i)+"', and the operation '"+toString(j)+"', the delay and the latence must be equal.");
     33          test.error(toString(_("For the type '%d', and the operation '%d', the delay and the latence must be equal.\n"),i,j));
    3434
    3535    if (_have_groupe_MAC and ((_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC  ]._latence == 0) or
    3636                              (_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC]._latence == 0) or
    3737                              (_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB  ]._latence == 0)))
    38       test.error("The functionnal unit implement a MAC unit, the latence to operation OPERATION_ALU_L_MAC, OPERATION_ALU_L_MACRC and OPERATION_ALU_L_MSB must be higher than 0.");
     38      test.error("The functionnal unit implement a MAC unit, the latence to operation OPERATION_ALU_L_MAC, OPERATION_ALU_L_MACRC and OPERATION_ALU_L_MSB must be higher than 0.\n");
    3939
    4040    log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters_print.cpp

    r81 r88  
    3232    xml.singleton_begin("nb_packet          "); xml.attribut("value",toString(_nb_packet          )); xml.singleton_end();
    3333    xml.singleton_begin("size_general_data  "); xml.attribut("value",toString(_size_general_data  )); xml.singleton_end();
    34     xml.singleton_begin("nb_general_register"); xml.attribut("value",toString(_nb_general_register)); xml.singleton_end();
     34//  xml.singleton_begin("nb_general_register"); xml.attribut("value",toString(_nb_general_register)); xml.singleton_end();
    3535    xml.singleton_begin("size_special_data  "); xml.attribut("value",toString(_size_special_data  )); xml.singleton_end();
    36     xml.singleton_begin("nb_special_register"); xml.attribut("value",toString(_nb_special_register)); xml.singleton_end();
     36//  xml.singleton_begin("nb_special_register"); xml.attribut("value",toString(_nb_special_register)); xml.singleton_end();
    3737    xml.balise_close();
    3838
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Load_store_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         ../Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/configuration.cfg

    r81 r88  
    662       2       +1      # speculative_load       {none,access,commit,bypass}
    770       0       +1      # bypass_memory
     81       1       +1      # nb_cache_port
     91       1       +1      # nb_inst_memory
    8102       2       *2      # nb_context             1      1       *2     
    9112       2       *2      # nb_front_end           1      1       *2     
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/Memory.h

    r81 r88  
    287287                  << i->_data_old << " -> "
    288288                  << i->_data_new << std::endl
    289                   << std::hex;
     289                  << std::dec;
    290290      }
    291291  }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/main.cpp

    r81 r88  
    2222       << " - speculative_load        (uint32_t)" << endl
    2323       << " - nb_bypass_memory        (uint32_t)" << endl
     24       << " - nb_cache_port           (uint32_t)" << endl
     25       << " - nb_inst_memory          (uint32_t)" << endl
    2426       << " - nb_context              (uint32_t)" << endl
    2527       << " - nb_front_end            (uint32_t)" << endl
     
    6264        const Tspeculative_load_t _speculative_load        = fromString<Tspeculative_load_t>(argv[x++]);
    6365        const uint32_t            _nb_bypass_memory        = atoi(argv[x++]);
     66        const uint32_t            _nb_cache_port           = atoi(argv[x++]);
     67        const uint32_t            _nb_inst_memory          = atoi(argv[x++]);
    6468        const uint32_t            _nb_context              = atoi(argv[x++]);
    6569        const uint32_t            _nb_front_end            = atoi(argv[x++]);
     
    8185               _speculative_load       ,
    8286               _nb_bypass_memory       ,
     87               _nb_cache_port          ,
     88               _nb_inst_memory         ,
    8389               _nb_context             ,
    8490               _nb_front_end           ,
     
    8894               _size_special_data      ,
    8995               _nb_general_register    ,
    90                _nb_special_register    );
     96               _nb_special_register    ,
     97               true //is_toplevel
     98               );
    9199           
    92100            cout << param->print(1);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test2.cpp

    r82 r88  
    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#include "Behavioural/include/Allocation.h"
    1112
    1213//===================================================================={test}
     
    2627         SPECULATIVE_LOAD_COMMIT,  //_speculative_load       
    2728         0,  //_nb_bypass_memory
     29         1,  //_nb_cache_port
     30         1,  //_nb_inst_memory
    2831         1,  //_nb_context             
    2932         1,  //_nb_front_end           
     
    3336         2 , //_size_special_data     
    3437         64, //_nb_general_register   
    35          16  //_nb_special_register   
     38         16, //_nb_special_register   
     39         true //is_toplevel
    3640        );
    3741
     
    3943  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,0);
    4044#endif
     45
     46  Tusage_t _usage = USE_ALL;
     47
     48//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     49//   _usage = usage_unset(_usage,USE_VHDL                 );
     50//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     51//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     52//   _usage = usage_unset(_usage,USE_POSITION             );
     53//   _usage = usage_unset(_usage,USE_STATISTICS           );
     54//   _usage = usage_unset(_usage,USE_INFORMATION          );
    4155
    4256  Load_store_unit * _Load_store_unit = new Load_store_unit (name.c_str(),
     
    4559#endif
    4660                                                            _param,
    47                                                             USE_ALL);
     61                                                            _usage);
    4862 
    4963#ifdef SYSTEMC
     
    5670  sc_signal<Tcontrol_t>                  * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    5771
    58   sc_signal<Tcontrol_t        > *   in_MEMORY_IN_VAL                   = new sc_signal<Tcontrol_t        > (rename.c_str());
    59   sc_signal<Tcontrol_t        > *  out_MEMORY_IN_ACK                   = new sc_signal<Tcontrol_t        > (rename.c_str());
    60   sc_signal<Tcontext_t        > *   in_MEMORY_IN_CONTEXT_ID            = new sc_signal<Tcontext_t        > (rename.c_str());
    61   sc_signal<Tcontext_t        > *   in_MEMORY_IN_FRONT_END_ID          = new sc_signal<Tcontext_t        > (rename.c_str());
    62   sc_signal<Tcontext_t        > *   in_MEMORY_IN_OOO_ENGINE_ID         = new sc_signal<Tcontext_t        > (rename.c_str());
    63   sc_signal<Tpacket_t         > *   in_MEMORY_IN_PACKET_ID             = new sc_signal<Tpacket_t         > (rename.c_str());
    64   sc_signal<Toperation_t      > *   in_MEMORY_IN_OPERATION             = new sc_signal<Toperation_t      > (rename.c_str());
    65   sc_signal<Ttype_t           > *   in_MEMORY_IN_TYPE                  = new sc_signal<Ttype_t           > (rename.c_str());
    66   sc_signal<Tlsq_ptr_t        > *   in_MEMORY_IN_STORE_QUEUE_PTR_WRITE = new sc_signal<Tlsq_ptr_t        > (rename.c_str());
    67   sc_signal<Tlsq_ptr_t        > *   in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE  = new sc_signal<Tlsq_ptr_t        > (rename.c_str());
    68   sc_signal<Tcontrol_t        > *   in_MEMORY_IN_HAS_IMMEDIAT          = new sc_signal<Tcontrol_t        > (rename.c_str());
    69   sc_signal<Tgeneral_data_t   > *   in_MEMORY_IN_IMMEDIAT              = new sc_signal<Tgeneral_data_t   > (rename.c_str());
    70   sc_signal<Tgeneral_data_t   > *   in_MEMORY_IN_DATA_RA               = new sc_signal<Tgeneral_data_t   > (rename.c_str());
    71   sc_signal<Tgeneral_data_t   > *   in_MEMORY_IN_DATA_RB               = new sc_signal<Tgeneral_data_t   > (rename.c_str());
    72   sc_signal<Tspecial_data_t   > *   in_MEMORY_IN_DATA_RC               = new sc_signal<Tspecial_data_t   > (rename.c_str());
    73   sc_signal<Tcontrol_t        > *   in_MEMORY_IN_WRITE_RD              = new sc_signal<Tcontrol_t        > (rename.c_str());
    74   sc_signal<Tgeneral_address_t> *   in_MEMORY_IN_NUM_REG_RD            = new sc_signal<Tgeneral_address_t> (rename.c_str());
    75   sc_signal<Tcontrol_t        > *   in_MEMORY_IN_WRITE_RE              = new sc_signal<Tcontrol_t        > (rename.c_str());
    76   sc_signal<Tspecial_address_t> *   in_MEMORY_IN_NUM_REG_RE            = new sc_signal<Tspecial_address_t> (rename.c_str());
    77 
    78   sc_signal<Tcontrol_t        > *  out_MEMORY_OUT_VAL           = new sc_signal<Tcontrol_t        >(rename.c_str());
    79   sc_signal<Tcontrol_t        > *   in_MEMORY_OUT_ACK           = new sc_signal<Tcontrol_t        >(rename.c_str());
    80   sc_signal<Tcontext_t        > *  out_MEMORY_OUT_CONTEXT_ID    = new sc_signal<Tcontext_t        >(rename.c_str());
    81   sc_signal<Tcontext_t        > *  out_MEMORY_OUT_FRONT_END_ID  = new sc_signal<Tcontext_t        >(rename.c_str());
    82   sc_signal<Tcontext_t        > *  out_MEMORY_OUT_OOO_ENGINE_ID = new sc_signal<Tcontext_t        >(rename.c_str());
    83   sc_signal<Tpacket_t         > *  out_MEMORY_OUT_PACKET_ID     = new sc_signal<Tpacket_t         >(rename.c_str());
    84 //   sc_signal<Toperation_t      > *  out_MEMORY_OUT_OPERATION     = new sc_signal<Toperation_t      >(rename.c_str());
    85   sc_signal<Ttype_t           > *  out_MEMORY_OUT_TYPE          = new sc_signal<Ttype_t           >(rename.c_str());
    86   sc_signal<Tcontrol_t        > *  out_MEMORY_OUT_WRITE_RD      = new sc_signal<Tcontrol_t        >(rename.c_str());
    87   sc_signal<Tgeneral_address_t> *  out_MEMORY_OUT_NUM_REG_RD    = new sc_signal<Tgeneral_address_t>(rename.c_str());
    88   sc_signal<Tgeneral_data_t   > *  out_MEMORY_OUT_DATA_RD       = new sc_signal<Tgeneral_data_t   >(rename.c_str());
    89   sc_signal<Tcontrol_t        > *  out_MEMORY_OUT_WRITE_RE      = new sc_signal<Tcontrol_t        >(rename.c_str());
    90   sc_signal<Tspecial_address_t> *  out_MEMORY_OUT_NUM_REG_RE    = new sc_signal<Tspecial_address_t>(rename.c_str());
    91   sc_signal<Tspecial_data_t   > *  out_MEMORY_OUT_DATA_RE       = new sc_signal<Tspecial_data_t   >(rename.c_str());
    92   sc_signal<Texception_t      > *  out_MEMORY_OUT_EXCEPTION     = new sc_signal<Texception_t      >(rename.c_str());
    93   sc_signal<Tcontrol_t        > *  out_MEMORY_OUT_NO_SEQUENCE   = new sc_signal<Tcontrol_t        >(rename.c_str());
    94   sc_signal<Tgeneral_data_t   > *  out_MEMORY_OUT_ADDRESS       = new sc_signal<Tgeneral_data_t   >(rename.c_str());
    95 
    96   sc_signal<Tcontrol_t        > * out_DCACHE_REQ_VAL        = new sc_signal<Tcontrol_t        >(rename.c_str());
    97   sc_signal<Tcontrol_t        > *  in_DCACHE_REQ_ACK        = new sc_signal<Tcontrol_t        >(rename.c_str());
    98   sc_signal<Tcontext_t        > * out_DCACHE_REQ_CONTEXT_ID = new sc_signal<Tcontext_t        >(rename.c_str());
    99   sc_signal<Tpacket_t         > * out_DCACHE_REQ_PACKET_ID  = new sc_signal<Tpacket_t         >(rename.c_str());
    100   sc_signal<Tdcache_address_t > * out_DCACHE_REQ_ADDRESS    = new sc_signal<Tdcache_address_t >(rename.c_str());
    101   sc_signal<Tdcache_type_t    > * out_DCACHE_REQ_TYPE       = new sc_signal<Tdcache_type_t    >(rename.c_str());
    102   sc_signal<Tdcache_data_t    > * out_DCACHE_REQ_WDATA      = new sc_signal<Tdcache_data_t    >(rename.c_str());
    103  
    104   sc_signal<Tcontrol_t        > *  in_DCACHE_RSP_VAL        = new sc_signal<Tcontrol_t        >(rename.c_str());
    105   sc_signal<Tcontrol_t        > * out_DCACHE_RSP_ACK        = new sc_signal<Tcontrol_t        >(rename.c_str());
    106   sc_signal<Tcontext_t        > *  in_DCACHE_RSP_CONTEXT_ID = new sc_signal<Tcontext_t        >(rename.c_str());
    107   sc_signal<Tpacket_t         > *  in_DCACHE_RSP_PACKET_ID  = new sc_signal<Tpacket_t         >(rename.c_str());
    108   sc_signal<Tdcache_data_t    > *  in_DCACHE_RSP_RDATA      = new sc_signal<Tdcache_data_t    >(rename.c_str());
    109   sc_signal<Tdcache_error_t   > *  in_DCACHE_RSP_ERROR      = new sc_signal<Tdcache_error_t   >(rename.c_str());
    110  
    111   sc_signal<Tcontrol_t        > ** out_BYPASS_MEMORY_VAL           = new sc_signal<Tcontrol_t        > * [_param->_nb_bypass_memory];
    112   sc_signal<Tcontext_t        > ** out_BYPASS_MEMORY_OOO_ENGINE_ID = new sc_signal<Tcontext_t        > * [_param->_nb_bypass_memory];
    113   sc_signal<Tgeneral_address_t> ** out_BYPASS_MEMORY_NUM_REG       = new sc_signal<Tgeneral_address_t> * [_param->_nb_bypass_memory];
    114   sc_signal<Tgeneral_data_t   > ** out_BYPASS_MEMORY_DATA          = new sc_signal<Tgeneral_data_t   > * [_param->_nb_bypass_memory];
    115    
    116   for (uint32_t i=0; i<_param->_nb_bypass_memory; i++)
    117     {
    118       out_BYPASS_MEMORY_VAL           [i] = new sc_signal<Tcontrol_t        >(rename.c_str());
    119       out_BYPASS_MEMORY_OOO_ENGINE_ID [i] = new sc_signal<Tcontext_t        >(rename.c_str());
    120       out_BYPASS_MEMORY_NUM_REG       [i] = new sc_signal<Tgeneral_address_t>(rename.c_str());
    121       out_BYPASS_MEMORY_DATA          [i] = new sc_signal<Tgeneral_data_t   >(rename.c_str());
    122     }
     72    // ~~~~~[ Interface "memory_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     73  ALLOC1_SC_SIGNAL( in_MEMORY_IN_VAL                  ," in_MEMORY_IN_VAL                  ",Tcontrol_t        ,_param->_nb_inst_memory);
     74  ALLOC1_SC_SIGNAL(out_MEMORY_IN_ACK                  ,"out_MEMORY_IN_ACK                  ",Tcontrol_t        ,_param->_nb_inst_memory);
     75  ALLOC1_SC_SIGNAL( in_MEMORY_IN_CONTEXT_ID           ," in_MEMORY_IN_CONTEXT_ID           ",Tcontext_t        ,_param->_nb_inst_memory);
     76  ALLOC1_SC_SIGNAL( in_MEMORY_IN_FRONT_END_ID         ," in_MEMORY_IN_FRONT_END_ID         ",Tcontext_t        ,_param->_nb_inst_memory);
     77  ALLOC1_SC_SIGNAL( in_MEMORY_IN_OOO_ENGINE_ID        ," in_MEMORY_IN_OOO_ENGINE_ID        ",Tcontext_t        ,_param->_nb_inst_memory);
     78  ALLOC1_SC_SIGNAL( in_MEMORY_IN_PACKET_ID            ," in_MEMORY_IN_PACKET_ID            ",Tpacket_t         ,_param->_nb_inst_memory);
     79  ALLOC1_SC_SIGNAL( in_MEMORY_IN_OPERATION            ," in_MEMORY_IN_OPERATION            ",Toperation_t      ,_param->_nb_inst_memory);
     80  ALLOC1_SC_SIGNAL( in_MEMORY_IN_TYPE                 ," in_MEMORY_IN_TYPE                 ",Ttype_t           ,_param->_nb_inst_memory);
     81  ALLOC1_SC_SIGNAL( in_MEMORY_IN_STORE_QUEUE_PTR_WRITE," in_MEMORY_IN_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,_param->_nb_inst_memory);
     82  ALLOC1_SC_SIGNAL( in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ," in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t        ,_param->_nb_inst_memory);
     83  ALLOC1_SC_SIGNAL( in_MEMORY_IN_HAS_IMMEDIAT         ," in_MEMORY_IN_HAS_IMMEDIAT         ",Tcontrol_t        ,_param->_nb_inst_memory);
     84  ALLOC1_SC_SIGNAL( in_MEMORY_IN_IMMEDIAT             ," in_MEMORY_IN_IMMEDIAT             ",Tgeneral_data_t   ,_param->_nb_inst_memory); // memory address
     85  ALLOC1_SC_SIGNAL( in_MEMORY_IN_DATA_RA              ," in_MEMORY_IN_DATA_RA              ",Tgeneral_data_t   ,_param->_nb_inst_memory); // memory address
     86  ALLOC1_SC_SIGNAL( in_MEMORY_IN_DATA_RB              ," in_MEMORY_IN_DATA_RB              ",Tgeneral_data_t   ,_param->_nb_inst_memory); // data        (store)
     87  ALLOC1_SC_SIGNAL( in_MEMORY_IN_DATA_RC              ," in_MEMORY_IN_DATA_RC              ",Tspecial_data_t   ,_param->_nb_inst_memory);
     88  ALLOC1_SC_SIGNAL( in_MEMORY_IN_WRITE_RD             ," in_MEMORY_IN_WRITE_RD             ",Tcontrol_t        ,_param->_nb_inst_memory); // = (operation==load)
     89  ALLOC1_SC_SIGNAL( in_MEMORY_IN_NUM_REG_RD           ," in_MEMORY_IN_NUM_REG_RD           ",Tgeneral_address_t,_param->_nb_inst_memory); // destination (load)
     90  ALLOC1_SC_SIGNAL( in_MEMORY_IN_WRITE_RE             ," in_MEMORY_IN_WRITE_RE             ",Tcontrol_t        ,_param->_nb_inst_memory);
     91  ALLOC1_SC_SIGNAL( in_MEMORY_IN_NUM_REG_RE           ," in_MEMORY_IN_NUM_REG_RE           ",Tspecial_address_t,_param->_nb_inst_memory);
     92  ALLOC1_SC_SIGNAL(out_MEMORY_OUT_VAL                 ,"out_MEMORY_OUT_VAL                 ",Tcontrol_t        ,_param->_nb_inst_memory);
     93  ALLOC1_SC_SIGNAL( in_MEMORY_OUT_ACK                 ," in_MEMORY_OUT_ACK                 ",Tcontrol_t        ,_param->_nb_inst_memory);
     94  ALLOC1_SC_SIGNAL(out_MEMORY_OUT_CONTEXT_ID          ,"out_MEMORY_OUT_CONTEXT_ID          ",Tcontext_t        ,_param->_nb_inst_memory);
     95  ALLOC1_SC_SIGNAL(out_MEMORY_OUT_FRONT_END_ID        ,"out_MEMORY_OUT_FRONT_END_ID        ",Tcontext_t        ,_param->_nb_inst_memory);
     96  ALLOC1_SC_SIGNAL(out_MEMORY_OUT_OOO_ENGINE_ID       ,"out_MEMORY_OUT_OOO_ENGINE_ID       ",Tcontext_t        ,_param->_nb_inst_memory);
     97  ALLOC1_SC_SIGNAL(out_MEMORY_OUT_PACKET_ID           ,"out_MEMORY_OUT_PACKET_ID           ",Tpacket_t         ,_param->_nb_inst_memory);
     98//ALLOC1_SC_SIGNAL(out_MEMORY_OUT_OPERATION           ,"out_MEMORY_OUT_OPERATION           ",Toperation_t      ,_param->_nb_inst_memory);
     99  ALLOC1_SC_SIGNAL(out_MEMORY_OUT_TYPE                ,"out_MEMORY_OUT_TYPE                ",Ttype_t           ,_param->_nb_inst_memory);
     100  ALLOC1_SC_SIGNAL(out_MEMORY_OUT_WRITE_RD            ,"out_MEMORY_OUT_WRITE_RD            ",Tcontrol_t        ,_param->_nb_inst_memory); // = (operation==load)
     101  ALLOC1_SC_SIGNAL(out_MEMORY_OUT_NUM_REG_RD          ,"out_MEMORY_OUT_NUM_REG_RD          ",Tgeneral_address_t,_param->_nb_inst_memory); // destination (load)
     102  ALLOC1_SC_SIGNAL(out_MEMORY_OUT_DATA_RD             ,"out_MEMORY_OUT_DATA_RD             ",Tgeneral_data_t   ,_param->_nb_inst_memory); // data        (load)
     103  ALLOC1_SC_SIGNAL(out_MEMORY_OUT_WRITE_RE            ,"out_MEMORY_OUT_WRITE_RE            ",Tcontrol_t        ,_param->_nb_inst_memory);
     104  ALLOC1_SC_SIGNAL(out_MEMORY_OUT_NUM_REG_RE          ,"out_MEMORY_OUT_NUM_REG_RE          ",Tspecial_address_t,_param->_nb_inst_memory);
     105  ALLOC1_SC_SIGNAL(out_MEMORY_OUT_DATA_RE             ,"out_MEMORY_OUT_DATA_RE             ",Tspecial_data_t   ,_param->_nb_inst_memory);
     106  ALLOC1_SC_SIGNAL(out_MEMORY_OUT_EXCEPTION           ,"out_MEMORY_OUT_EXCEPTION           ",Texception_t      ,_param->_nb_inst_memory);
     107  ALLOC1_SC_SIGNAL(out_MEMORY_OUT_NO_SEQUENCE         ,"out_MEMORY_OUT_NO_SEQUENCE         ",Tcontrol_t        ,_param->_nb_inst_memory);
     108  ALLOC1_SC_SIGNAL(out_MEMORY_OUT_ADDRESS             ,"out_MEMORY_OUT_ADDRESS             ",Tgeneral_data_t   ,_param->_nb_inst_memory);
     109  ALLOC1_SC_SIGNAL(out_DCACHE_REQ_VAL                 ,"out_DCACHE_REQ_VAL                 ",Tcontrol_t        ,_param->_nb_cache_port);
     110  ALLOC1_SC_SIGNAL( in_DCACHE_REQ_ACK                 ," in_DCACHE_REQ_ACK                 ",Tcontrol_t        ,_param->_nb_cache_port);
     111  ALLOC1_SC_SIGNAL(out_DCACHE_REQ_CONTEXT_ID          ,"out_DCACHE_REQ_CONTEXT_ID          ",Tcontext_t        ,_param->_nb_cache_port);
     112  ALLOC1_SC_SIGNAL(out_DCACHE_REQ_PACKET_ID           ,"out_DCACHE_REQ_PACKET_ID           ",Tpacket_t         ,_param->_nb_cache_port);
     113  ALLOC1_SC_SIGNAL(out_DCACHE_REQ_ADDRESS             ,"out_DCACHE_REQ_ADDRESS             ",Tdcache_address_t ,_param->_nb_cache_port);
     114  ALLOC1_SC_SIGNAL(out_DCACHE_REQ_TYPE                ,"out_DCACHE_REQ_TYPE                ",Tdcache_type_t    ,_param->_nb_cache_port);
     115  ALLOC1_SC_SIGNAL(out_DCACHE_REQ_WDATA               ,"out_DCACHE_REQ_WDATA               ",Tdcache_data_t    ,_param->_nb_cache_port);
     116  ALLOC1_SC_SIGNAL( in_DCACHE_RSP_VAL                 ," in_DCACHE_RSP_VAL                 ",Tcontrol_t        ,_param->_nb_cache_port);
     117  ALLOC1_SC_SIGNAL(out_DCACHE_RSP_ACK                 ,"out_DCACHE_RSP_ACK                 ",Tcontrol_t        ,_param->_nb_cache_port);
     118  ALLOC1_SC_SIGNAL( in_DCACHE_RSP_CONTEXT_ID          ," in_DCACHE_RSP_CONTEXT_ID          ",Tcontext_t        ,_param->_nb_cache_port);
     119  ALLOC1_SC_SIGNAL( in_DCACHE_RSP_PACKET_ID           ," in_DCACHE_RSP_PACKET_ID           ",Tpacket_t         ,_param->_nb_cache_port);
     120  ALLOC1_SC_SIGNAL( in_DCACHE_RSP_RDATA               ," in_DCACHE_RSP_RDATA               ",Tdcache_data_t    ,_param->_nb_cache_port);
     121  ALLOC1_SC_SIGNAL( in_DCACHE_RSP_ERROR               ," in_DCACHE_RSP_ERROR               ",Tdcache_error_t   ,_param->_nb_cache_port);
     122  ALLOC1_SC_SIGNAL(out_BYPASS_MEMORY_VAL              ,"out_BYPASS_MEMORY_VAL              ",Tcontrol_t        ,_param->_nb_bypass_memory);
     123  ALLOC1_SC_SIGNAL(out_BYPASS_MEMORY_OOO_ENGINE_ID    ,"out_BYPASS_MEMORY_OOO_ENGINE_ID    ",Tcontext_t        ,_param->_nb_bypass_memory);
     124  ALLOC1_SC_SIGNAL(out_BYPASS_MEMORY_NUM_REG          ,"out_BYPASS_MEMORY_NUM_REG          ",Tgeneral_address_t,_param->_nb_bypass_memory);
     125  ALLOC1_SC_SIGNAL(out_BYPASS_MEMORY_DATA             ,"out_BYPASS_MEMORY_DATA             ",Tgeneral_data_t   ,_param->_nb_bypass_memory);
    123126 
    124127  /********************************************************
     
    131134  (*(_Load_store_unit->in_NRESET))       (*(in_NRESET));
    132135
    133   (*(_Load_store_unit-> in_MEMORY_IN_VAL                  ))(*( in_MEMORY_IN_VAL                  ));
    134   (*(_Load_store_unit->out_MEMORY_IN_ACK                  ))(*(out_MEMORY_IN_ACK                  ));
     136  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_VAL                  ,_param->_nb_inst_memory);
     137  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_IN_ACK                  ,_param->_nb_inst_memory);
    135138  if (_param->_have_port_context_id)
    136     (*(_Load_store_unit-> in_MEMORY_IN_CONTEXT_ID           ))(*( in_MEMORY_IN_CONTEXT_ID           ));
     139  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_CONTEXT_ID           ,_param->_nb_inst_memory);
    137140  if (_param->_have_port_front_end_id)
    138     (*(_Load_store_unit-> in_MEMORY_IN_FRONT_END_ID         ))(*( in_MEMORY_IN_FRONT_END_ID         ));
    139   if (_param->_have_port_ooo_engine_id)
    140     (*(_Load_store_unit-> in_MEMORY_IN_OOO_ENGINE_ID        ))(*( in_MEMORY_IN_OOO_ENGINE_ID        ));
    141   if (_param->_have_port_packet_id)
    142     (*(_Load_store_unit-> in_MEMORY_IN_PACKET_ID            ))(*( in_MEMORY_IN_PACKET_ID            ));
    143   (*(_Load_store_unit-> in_MEMORY_IN_OPERATION            ))(*( in_MEMORY_IN_OPERATION            ));
    144   (*(_Load_store_unit-> in_MEMORY_IN_TYPE                 ))(*( in_MEMORY_IN_TYPE                 ));
    145   (*(_Load_store_unit-> in_MEMORY_IN_STORE_QUEUE_PTR_WRITE))(*( in_MEMORY_IN_STORE_QUEUE_PTR_WRITE));
    146   if (_param->_have_port_load_queue_ptr)
    147   (*(_Load_store_unit-> in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ))(*( in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ));
    148   (*(_Load_store_unit-> in_MEMORY_IN_HAS_IMMEDIAT         ))(*( in_MEMORY_IN_HAS_IMMEDIAT         ));
    149   (*(_Load_store_unit-> in_MEMORY_IN_IMMEDIAT             ))(*( in_MEMORY_IN_IMMEDIAT             ));
    150   (*(_Load_store_unit-> in_MEMORY_IN_DATA_RA              ))(*( in_MEMORY_IN_DATA_RA              ));
    151   (*(_Load_store_unit-> in_MEMORY_IN_DATA_RB              ))(*( in_MEMORY_IN_DATA_RB              ));
    152   (*(_Load_store_unit-> in_MEMORY_IN_DATA_RC              ))(*( in_MEMORY_IN_DATA_RC              ));
    153   (*(_Load_store_unit-> in_MEMORY_IN_WRITE_RD             ))(*( in_MEMORY_IN_WRITE_RD             ));
    154   (*(_Load_store_unit-> in_MEMORY_IN_NUM_REG_RD           ))(*( in_MEMORY_IN_NUM_REG_RD           ));
    155   (*(_Load_store_unit-> in_MEMORY_IN_WRITE_RE             ))(*( in_MEMORY_IN_WRITE_RE             ));
    156   (*(_Load_store_unit-> in_MEMORY_IN_NUM_REG_RE           ))(*( in_MEMORY_IN_NUM_REG_RE           ));
    157  
    158   (*(_Load_store_unit->out_MEMORY_OUT_VAL           ))(*(out_MEMORY_OUT_VAL           ));
    159   (*(_Load_store_unit-> in_MEMORY_OUT_ACK           ))(*( in_MEMORY_OUT_ACK           ));
     141  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_FRONT_END_ID         ,_param->_nb_inst_memory);
     142  if (_param->_have_port_ooo_engine_id)   
     143  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_OOO_ENGINE_ID        ,_param->_nb_inst_memory);
     144  if (_param->_have_port_rob_ptr)
     145  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_PACKET_ID            ,_param->_nb_inst_memory);
     146  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_OPERATION            ,_param->_nb_inst_memory);
     147  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_TYPE                 ,_param->_nb_inst_memory);
     148  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_memory);
     149  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_memory);
     150  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_HAS_IMMEDIAT         ,_param->_nb_inst_memory);
     151  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_IMMEDIAT             ,_param->_nb_inst_memory);
     152  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_DATA_RA              ,_param->_nb_inst_memory);
     153  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_DATA_RB              ,_param->_nb_inst_memory);
     154  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_DATA_RC              ,_param->_nb_inst_memory);
     155  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_WRITE_RD             ,_param->_nb_inst_memory);
     156  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_NUM_REG_RD           ,_param->_nb_inst_memory);
     157  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_WRITE_RE             ,_param->_nb_inst_memory);
     158  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_IN_NUM_REG_RE           ,_param->_nb_inst_memory);
     159
     160  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_VAL          ,_param->_nb_inst_memory);
     161  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_MEMORY_OUT_ACK          ,_param->_nb_inst_memory);
    160162  if (_param->_have_port_context_id)
    161     (*(_Load_store_unit->out_MEMORY_OUT_CONTEXT_ID    ))(*(out_MEMORY_OUT_CONTEXT_ID    ));
     163  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_CONTEXT_ID   ,_param->_nb_inst_memory);
    162164  if (_param->_have_port_front_end_id)
    163     (*(_Load_store_unit->out_MEMORY_OUT_FRONT_END_ID  ))(*(out_MEMORY_OUT_FRONT_END_ID  ));
    164   if (_param->_have_port_ooo_engine_id)
    165     (*(_Load_store_unit->out_MEMORY_OUT_OOO_ENGINE_ID ))(*(out_MEMORY_OUT_OOO_ENGINE_ID ));
    166   if (_param->_have_port_packet_id)
    167     (*(_Load_store_unit->out_MEMORY_OUT_PACKET_ID     ))(*(out_MEMORY_OUT_PACKET_ID     ));
    168 //   (*(_Load_store_unit->out_MEMORY_OUT_OPERATION     ))(*(out_MEMORY_OUT_OPERATION     ));
    169   (*(_Load_store_unit->out_MEMORY_OUT_TYPE          ))(*(out_MEMORY_OUT_TYPE          ));
    170   (*(_Load_store_unit->out_MEMORY_OUT_WRITE_RD      ))(*(out_MEMORY_OUT_WRITE_RD      ));
    171   (*(_Load_store_unit->out_MEMORY_OUT_NUM_REG_RD    ))(*(out_MEMORY_OUT_NUM_REG_RD    ));
    172   (*(_Load_store_unit->out_MEMORY_OUT_DATA_RD       ))(*(out_MEMORY_OUT_DATA_RD       ));
    173   (*(_Load_store_unit->out_MEMORY_OUT_WRITE_RE      ))(*(out_MEMORY_OUT_WRITE_RE      ));
    174   (*(_Load_store_unit->out_MEMORY_OUT_NUM_REG_RE    ))(*(out_MEMORY_OUT_NUM_REG_RE    ));
    175   (*(_Load_store_unit->out_MEMORY_OUT_DATA_RE       ))(*(out_MEMORY_OUT_DATA_RE       ));
    176   (*(_Load_store_unit->out_MEMORY_OUT_EXCEPTION     ))(*(out_MEMORY_OUT_EXCEPTION     ));
    177   (*(_Load_store_unit->out_MEMORY_OUT_NO_SEQUENCE   ))(*(out_MEMORY_OUT_NO_SEQUENCE   ));
    178   (*(_Load_store_unit->out_MEMORY_OUT_ADDRESS       ))(*(out_MEMORY_OUT_ADDRESS       ));
    179 
    180   (*(_Load_store_unit->out_DCACHE_REQ_VAL       ))(*(out_DCACHE_REQ_VAL       ));
    181   (*(_Load_store_unit-> in_DCACHE_REQ_ACK       ))(*( in_DCACHE_REQ_ACK       ));
     165  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_FRONT_END_ID ,_param->_nb_inst_memory);
     166  if (_param->_have_port_ooo_engine_id)   
     167  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_OOO_ENGINE_ID,_param->_nb_inst_memory);
     168  if (_param->_have_port_rob_ptr)
     169  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_PACKET_ID    ,_param->_nb_inst_memory);
     170//INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_OPERATION    ,_param->_nb_inst_memory);
     171  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_TYPE         ,_param->_nb_inst_memory);
     172  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_WRITE_RD     ,_param->_nb_inst_memory);
     173  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_NUM_REG_RD   ,_param->_nb_inst_memory);
     174  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_DATA_RD      ,_param->_nb_inst_memory);
     175  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_WRITE_RE     ,_param->_nb_inst_memory);
     176  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_NUM_REG_RE   ,_param->_nb_inst_memory);
     177  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_DATA_RE      ,_param->_nb_inst_memory);
     178  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_EXCEPTION    ,_param->_nb_inst_memory);
     179  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_NO_SEQUENCE  ,_param->_nb_inst_memory);
     180  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_MEMORY_OUT_ADDRESS      ,_param->_nb_inst_memory);
     181
     182  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_DCACHE_REQ_VAL        ,_param->_nb_cache_port);
     183  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_DCACHE_REQ_ACK        ,_param->_nb_cache_port);
    182184  if (_param->_have_port_dcache_context_id)
    183     (*(_Load_store_unit->out_DCACHE_REQ_CONTEXT_ID))(*(out_DCACHE_REQ_CONTEXT_ID));
    184   (*(_Load_store_unit->out_DCACHE_REQ_PACKET_ID ))(*(out_DCACHE_REQ_PACKET_ID ));
    185   (*(_Load_store_unit->out_DCACHE_REQ_ADDRESS   ))(*(out_DCACHE_REQ_ADDRESS   ));
    186   (*(_Load_store_unit->out_DCACHE_REQ_TYPE      ))(*(out_DCACHE_REQ_TYPE      ));
    187   (*(_Load_store_unit->out_DCACHE_REQ_WDATA     ))(*(out_DCACHE_REQ_WDATA     ));
    188 
    189   (*(_Load_store_unit-> in_DCACHE_RSP_VAL       ))(*( in_DCACHE_RSP_VAL       ));
    190   (*(_Load_store_unit->out_DCACHE_RSP_ACK       ))(*(out_DCACHE_RSP_ACK       ));
     185  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_DCACHE_REQ_CONTEXT_ID ,_param->_nb_cache_port);
     186  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_DCACHE_REQ_PACKET_ID  ,_param->_nb_cache_port);
     187  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_DCACHE_REQ_ADDRESS    ,_param->_nb_cache_port);
     188  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_DCACHE_REQ_TYPE       ,_param->_nb_cache_port);
     189  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_DCACHE_REQ_WDATA      ,_param->_nb_cache_port);
     190
     191  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_DCACHE_RSP_VAL        ,_param->_nb_cache_port);
     192  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_DCACHE_RSP_ACK        ,_param->_nb_cache_port);
    191193  if (_param->_have_port_dcache_context_id)
    192     (*(_Load_store_unit-> in_DCACHE_RSP_CONTEXT_ID))(*( in_DCACHE_RSP_CONTEXT_ID));
    193   (*(_Load_store_unit-> in_DCACHE_RSP_PACKET_ID ))(*( in_DCACHE_RSP_PACKET_ID ));
    194   (*(_Load_store_unit-> in_DCACHE_RSP_RDATA     ))(*( in_DCACHE_RSP_RDATA     ));
    195   (*(_Load_store_unit-> in_DCACHE_RSP_ERROR     ))(*( in_DCACHE_RSP_ERROR     ));
    196 
    197     {
    198       for (uint32_t i=0; i<_param->_nb_bypass_memory; i++)
    199         {
    200           (*(_Load_store_unit->out_BYPASS_MEMORY_VAL           [i]))(*(out_BYPASS_MEMORY_VAL           [i]));
    201           if (_param->_have_port_ooo_engine_id)   
    202             (*(_Load_store_unit->out_BYPASS_MEMORY_OOO_ENGINE_ID [i]))(*(out_BYPASS_MEMORY_OOO_ENGINE_ID [i]));
    203           (*(_Load_store_unit->out_BYPASS_MEMORY_NUM_REG       [i]))(*(out_BYPASS_MEMORY_NUM_REG       [i]));
    204           (*(_Load_store_unit->out_BYPASS_MEMORY_DATA          [i]))(*(out_BYPASS_MEMORY_DATA          [i]));
    205         }
    206     }
     194  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_DCACHE_RSP_CONTEXT_ID ,_param->_nb_cache_port);
     195  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_DCACHE_RSP_PACKET_ID  ,_param->_nb_cache_port);
     196  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_DCACHE_RSP_RDATA      ,_param->_nb_cache_port);
     197  INSTANCE1_SC_SIGNAL(_Load_store_unit, in_DCACHE_RSP_ERROR      ,_param->_nb_cache_port);
     198
     199  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_BYPASS_MEMORY_VAL           ,_param->_nb_bypass_memory);
     200  if (_param->_have_port_ooo_engine_id)   
     201  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_BYPASS_MEMORY_OOO_ENGINE_ID ,_param->_nb_bypass_memory);
     202  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_BYPASS_MEMORY_NUM_REG       ,_param->_nb_bypass_memory);
     203  INSTANCE1_SC_SIGNAL(_Load_store_unit,out_BYPASS_MEMORY_DATA          ,_param->_nb_bypass_memory);
     204
     205
    207206  cout << "<" << name << "> Start Simulation ............" << endl;
    208207  Time * _time = new Time();
     
    238237  LABEL("Initialisation");
    239238
    240   in_MEMORY_IN_VAL ->write(0);
    241   in_MEMORY_OUT_ACK->write(0);
    242   in_DCACHE_REQ_ACK->write(0);
    243   in_DCACHE_RSP_VAL->write(0);
     239  in_MEMORY_IN_VAL [0]->write(0);
     240  in_MEMORY_OUT_ACK[0]->write(0);
     241  in_DCACHE_REQ_ACK[0]->write(0);
     242  in_DCACHE_RSP_VAL[0]->write(0);
    244243
    245244  in_NRESET        ->write(0);
     
    419418                    can_execute &= not load_queue_use  [fifo_request.top()._load_queue_ptr_write];
    420419                }
    421               in_MEMORY_IN_VAL ->write(can_execute);
     420              in_MEMORY_IN_VAL [0]->write(can_execute);
    422421       
    423422              if (not fifo_request.empty())
    424423                {
    425424                  if (_param->_have_port_context_id)
    426                     in_MEMORY_IN_CONTEXT_ID           ->write (fifo_request.top()._context_id           );
     425                    in_MEMORY_IN_CONTEXT_ID           [0]->write (fifo_request.top()._context_id           );
    427426                  if (_param->_have_port_front_end_id)
    428                     in_MEMORY_IN_FRONT_END_ID         ->write (fifo_request.top()._front_end_id         );
     427                    in_MEMORY_IN_FRONT_END_ID         [0]->write (fifo_request.top()._front_end_id         );
    429428                  if (_param->_have_port_ooo_engine_id)
    430                     in_MEMORY_IN_OOO_ENGINE_ID        ->write (fifo_request.top()._ooo_engine_id        );
    431                   if (_param->_have_port_packet_id)
    432                     in_MEMORY_IN_PACKET_ID            ->write (fifo_request.top()._packet_id            );
    433                   in_MEMORY_IN_OPERATION            ->write (fifo_request.top()._operation            );
    434                   in_MEMORY_IN_TYPE                 ->write (fifo_request.top()._type                 );
    435                   in_MEMORY_IN_STORE_QUEUE_PTR_WRITE->write (fifo_request.top()._store_queue_ptr_write);
     429                    in_MEMORY_IN_OOO_ENGINE_ID        [0]->write (fifo_request.top()._ooo_engine_id        );
     430                  if (_param->_have_port_rob_ptr)
     431                    in_MEMORY_IN_PACKET_ID            [0]->write (fifo_request.top()._packet_id            );
     432                  in_MEMORY_IN_OPERATION            [0]->write (fifo_request.top()._operation            );
     433                  in_MEMORY_IN_TYPE                 [0]->write (fifo_request.top()._type                 );
     434                  in_MEMORY_IN_STORE_QUEUE_PTR_WRITE[0]->write (fifo_request.top()._store_queue_ptr_write);
    436435                  if (_param->_have_port_load_queue_ptr)
    437                   in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ->write (fifo_request.top()._load_queue_ptr_write );
    438                   in_MEMORY_IN_IMMEDIAT             ->write (fifo_request.top()._immediat             );
    439                   in_MEMORY_IN_DATA_RA              ->write (fifo_request.top()._data_ra              );
    440                   in_MEMORY_IN_DATA_RB              ->write (fifo_request.top()._data_rb              );
    441 //                in_MEMORY_IN_WRITE_RD             ->write (fifo_request.top()._write_rd             );
    442                   in_MEMORY_IN_NUM_REG_RD           ->write (fifo_request.top()._num_reg_rd           );
     436                  in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE [0]->write (fifo_request.top()._load_queue_ptr_write );
     437                  in_MEMORY_IN_IMMEDIAT             [0]->write (fifo_request.top()._immediat             );
     438                  in_MEMORY_IN_DATA_RA              [0]->write (fifo_request.top()._data_ra              );
     439                  in_MEMORY_IN_DATA_RB              [0]->write (fifo_request.top()._data_rb              );
     440//                in_MEMORY_IN_WRITE_RD             [0]->write (fifo_request.top()._write_rd             );
     441                  in_MEMORY_IN_NUM_REG_RD           [0]->write (fifo_request.top()._num_reg_rd           );
    443442                }
    444               in_MEMORY_OUT_ACK->write((rand()%100)<percent_transaction_memory_out);
     443              in_MEMORY_OUT_ACK[0]->write((rand()%100)<percent_transaction_memory_out);
    445444
    446445              // ***** DCACHE_REQ *****
    447               in_DCACHE_REQ_ACK->write((rand()%100)<percent_transaction_dcache);
     446              in_DCACHE_REQ_ACK[0]->write((rand()%100)<percent_transaction_dcache);
    448447
    449448              // ***** DCACHE_RSP *****
    450449              bool have_rsp = _cache->have_rsp ();
    451               in_DCACHE_RSP_VAL->write(have_rsp);
     450              in_DCACHE_RSP_VAL[0]->write(have_rsp);
    452451
    453452              if (have_rsp)
    454453                {
    455                   in_DCACHE_RSP_CONTEXT_ID->write(_cache->front()._context_id);
    456                   in_DCACHE_RSP_PACKET_ID ->write(_cache->front()._packet_id );
    457                   in_DCACHE_RSP_RDATA     ->write(_cache->front()._rdata     );
    458                   in_DCACHE_RSP_ERROR     ->write(_cache->front()._error     );
     454                  in_DCACHE_RSP_CONTEXT_ID[0]->write(_cache->front()._context_id);
     455                  in_DCACHE_RSP_PACKET_ID [0]->write(_cache->front()._packet_id );
     456                  in_DCACHE_RSP_RDATA     [0]->write(_cache->front()._rdata     );
     457                  in_DCACHE_RSP_ERROR     [0]->write(_cache->front()._error     );
    459458                }
    460459
    461460              SC_START(0);
    462461
    463               LABEL("MEMORY_IN  : %d - %d",in_MEMORY_IN_VAL ->read(),out_MEMORY_IN_ACK ->read());
    464               if ( in_MEMORY_IN_VAL ->read() and out_MEMORY_IN_ACK ->read())
     462              LABEL("MEMORY_IN  : %d - %d",in_MEMORY_IN_VAL [0]->read(),out_MEMORY_IN_ACK [0]->read());
     463              if ( in_MEMORY_IN_VAL [0]->read() and out_MEMORY_IN_ACK [0]->read())
    465464                {
    466                   Tpacket_t  packet_id = in_MEMORY_IN_PACKET_ID->read();
     465                  Tpacket_t  packet_id = in_MEMORY_IN_PACKET_ID[0]->read();
    467466
    468467                  LABEL(" * Accepted MEMORY_IN  : %d",packet_id);
     
    483482                }
    484483
    485               LABEL("MEMORY_OUT : %d - %d",out_MEMORY_OUT_VAL->read(),in_MEMORY_OUT_ACK ->read());
    486               if (out_MEMORY_OUT_VAL->read() and  in_MEMORY_OUT_ACK->read())
     484              LABEL("MEMORY_OUT : %d - %d",out_MEMORY_OUT_VAL[0]->read(),in_MEMORY_OUT_ACK [0]->read());
     485              if (out_MEMORY_OUT_VAL[0]->read() and  in_MEMORY_OUT_ACK[0]->read())
    487486                {
    488                   Tpacket_t  packet_id = out_MEMORY_OUT_PACKET_ID->read();
     487                  Tpacket_t  packet_id = out_MEMORY_OUT_PACKET_ID[0]->read();
    489488
    490489                  LABEL(" * Accepted MEMORY_OUT : %d",packet_id);
     
    499498                  else
    500499                    {
    501                       if (not (out_MEMORY_OUT_EXCEPTION->read() == EXCEPTION_MEMORY_LOAD_SPECULATIVE))
     500                      if (not (out_MEMORY_OUT_EXCEPTION[0]->read() == EXCEPTION_MEMORY_LOAD_SPECULATIVE))
    502501                        {
    503502                          nb_request_memory_out ++;
     
    508507                        {
    509508                          std::cout << "seth - have a load_speculative." << std::endl;
    510                           tab_request[packet_id]._write_spec_ko = (out_MEMORY_OUT_DATA_RD->read() != tab_request[packet_id]._data_wait);
     509                          tab_request[packet_id]._write_spec_ko = (out_MEMORY_OUT_DATA_RD[0]->read() != tab_request[packet_id]._data_wait);
    511510                          tab_request[packet_id]._previous_load_speculative = 1;
    512511                        }
     
    516515
    517516                  // a lot of test
    518                   TEST(Tpacket_t         , out_MEMORY_OUT_PACKET_ID    ->read(), tab_request[packet_id]._packet_id    );
    519                   TEST(Tcontext_t        , out_MEMORY_OUT_CONTEXT_ID   ->read(), tab_request[packet_id]._context_id   );
    520                   TEST(Tcontext_t        , out_MEMORY_OUT_FRONT_END_ID ->read(), tab_request[packet_id]._front_end_id );
    521                   TEST(Tcontext_t        , out_MEMORY_OUT_OOO_ENGINE_ID->read(), tab_request[packet_id]._ooo_engine_id);
    522 //                TEST(Toperation_t      , out_MEMORY_OUT_OPERATION    ->read(), tab_request[packet_id]._operation    );
    523                   TEST(Ttype_t           , out_MEMORY_OUT_TYPE         ->read(), TYPE_MEMORY                          );
     517                  TEST(Tpacket_t         , out_MEMORY_OUT_PACKET_ID    [0]->read(), tab_request[packet_id]._packet_id    );
     518                  TEST(Tcontext_t        , out_MEMORY_OUT_CONTEXT_ID   [0]->read(), tab_request[packet_id]._context_id   );
     519                  TEST(Tcontext_t        , out_MEMORY_OUT_FRONT_END_ID [0]->read(), tab_request[packet_id]._front_end_id );
     520                  TEST(Tcontext_t        , out_MEMORY_OUT_OOO_ENGINE_ID[0]->read(), tab_request[packet_id]._ooo_engine_id);
     521//                TEST(Toperation_t      , out_MEMORY_OUT_OPERATION    [0]->read(), tab_request[packet_id]._operation    );
     522                  TEST(Ttype_t           , out_MEMORY_OUT_TYPE         [0]->read(), TYPE_MEMORY                          );
    524523
    525524                  if (is_operation_memory_load (tab_request[packet_id]._operation))
    526525                    {
    527                       TEST(Tgeneral_address_t, out_MEMORY_OUT_NUM_REG_RD   ->read(), tab_request[packet_id]._num_reg_rd   );
     526                      TEST(Tgeneral_address_t, out_MEMORY_OUT_NUM_REG_RD   [0]->read(), tab_request[packet_id]._num_reg_rd   );
    528527                    }
    529528
     
    532531                  bool            error_alignment = (address != (address & (~ mask_memory_access(tab_request[packet_id]._operation))));
    533532                  bool            berr            = (address >= size_memory);
    534                   Texception_t    exception       = out_MEMORY_OUT_EXCEPTION->read();
     533                  Texception_t    exception       = out_MEMORY_OUT_EXCEPTION[0]->read();
    535534
    536535                  if (is_operation_memory_store(tab_request[packet_id]._operation))
    537536                    {
    538                       TEST(Tcontrol_t        , out_MEMORY_OUT_WRITE_RD     ->read(), 0);
     537                      TEST(Tcontrol_t        , out_MEMORY_OUT_WRITE_RD     [0]->read(), 0);
    539538
    540539                      // store.
     
    568567                          if (test_result_ko)
    569568                            {
    570                               TEST(Tgeneral_data_t   , out_MEMORY_OUT_DATA_RD->read(), address);
     569                              TEST(Tgeneral_data_t   , out_MEMORY_OUT_DATA_RD[0]->read(), address);
    571570                            }
    572571                    }
     
    578577                      bool is_load = is_operation_memory_load(tab_request[packet_id]._operation);
    579578
    580                       if (not (out_MEMORY_OUT_EXCEPTION->read() == EXCEPTION_MEMORY_LOAD_SPECULATIVE))
     579                      if (not (out_MEMORY_OUT_EXCEPTION[0]->read() == EXCEPTION_MEMORY_LOAD_SPECULATIVE))
    581580                        {
    582581                          bool test_result_ko = false;
     
    586585                              // IS A LOAD :D
    587586                              TEST(Texception_t, exception, EXCEPTION_MEMORY_MISS_SPECULATION);
    588                               TEST(Tcontrol_t, out_MEMORY_OUT_WRITE_RD->read(), 1);
     587                              TEST(Tcontrol_t, out_MEMORY_OUT_WRITE_RD[0]->read(), 1);
    589588                            }
    590589                          else
     
    592591                              {
    593592                                TEST(Texception_t, exception, EXCEPTION_MEMORY_ALIGNMENT);
    594                                 TEST(Tcontrol_t, out_MEMORY_OUT_WRITE_RD->read(), is_load);
     593                                TEST(Tcontrol_t, out_MEMORY_OUT_WRITE_RD[0]->read(), is_load);
    595594                                test_result_ko = true;
    596595                              }
     
    599598                                {
    600599                                  TEST(Texception_t, exception, EXCEPTION_MEMORY_BUS_ERROR);
    601                                   TEST(Tcontrol_t  , out_MEMORY_OUT_WRITE_RD->read(), is_load);
     600                                  TEST(Tcontrol_t  , out_MEMORY_OUT_WRITE_RD[0]->read(), is_load);
    602601                                  test_result_ko = true;
    603602                                }
     
    605604                                {
    606605                                  TEST(Texception_t, exception, EXCEPTION_MEMORY_NONE);
    607                                   TEST(Tcontrol_t  , out_MEMORY_OUT_WRITE_RD->read(), is_load and not tab_request[packet_id]._previous_load_speculative);
     606                                  TEST(Tcontrol_t  , out_MEMORY_OUT_WRITE_RD[0]->read(), is_load and not tab_request[packet_id]._previous_load_speculative);
    608607                                }
    609608                          // In all case : test data
    610609                          if (test_result_ko)
    611610                            {
    612                               TEST(Tgeneral_data_t   , out_MEMORY_OUT_DATA_RD->read(), address);
     611                              TEST(Tgeneral_data_t   , out_MEMORY_OUT_DATA_RD[0]->read(), address);
    613612                            }
    614613                          else
    615614                            {
    616                               TEST(Tgeneral_data_t   , out_MEMORY_OUT_DATA_RD->read(), tab_request[packet_id]._data_wait);
     615                              TEST(Tgeneral_data_t   , out_MEMORY_OUT_DATA_RD[0]->read(), tab_request[packet_id]._data_wait);
    617616                            }
    618617                        }
    619618                      else
    620619                        {
    621                           TEST(Tcontrol_t        , out_MEMORY_OUT_WRITE_RD     ->read(), 1);
     620                          TEST(Tcontrol_t        , out_MEMORY_OUT_WRITE_RD     [0]->read(), 1);
    622621                        }
    623622                    }
    624623                }
    625624
    626               LABEL("DCACHE_REQ : %d - %d",out_DCACHE_REQ_VAL->read(),in_DCACHE_REQ_ACK ->read());
    627               if (out_DCACHE_REQ_VAL->read() and  in_DCACHE_REQ_ACK->read())
     625              LABEL("DCACHE_REQ : %d - %d",out_DCACHE_REQ_VAL[0]->read(),in_DCACHE_REQ_ACK [0]->read());
     626              if (out_DCACHE_REQ_VAL[0]->read() and  in_DCACHE_REQ_ACK[0]->read())
    628627                {
    629628                  Tcontext_t        context_id;
    630629                  Tpacket_t         packet_id ;
    631                   Tdcache_address_t address = out_DCACHE_REQ_ADDRESS->read();
     630                  Tdcache_address_t address = out_DCACHE_REQ_ADDRESS[0]->read();
    632631                  Tdcache_data_t    rdata;
    633632                  Tdcache_error_t   error = 0;
    634633                  if (_param->_have_port_dcache_context_id)
    635                     context_id = out_DCACHE_REQ_CONTEXT_ID->read();
     634                    context_id = out_DCACHE_REQ_CONTEXT_ID[0]->read();
    636635                  else
    637636                    context_id = 0;
    638637
    639                   packet_id  = (out_DCACHE_REQ_PACKET_ID ->read())>>1;
     638                  packet_id  = (out_DCACHE_REQ_PACKET_ID [0]->read())>>1;
    640639             
    641640                  LABEL(" * Accepted DCACHE_REQ : %d",packet_id);
     
    649648                  else
    650649                    {
    651                       rdata = _memory->access (context_id, address, out_DCACHE_REQ_TYPE->read(), out_DCACHE_REQ_WDATA->read());
     650                      rdata = _memory->access (context_id, address, out_DCACHE_REQ_TYPE[0]->read(), out_DCACHE_REQ_WDATA[0]->read());
    652651                      LABEL("   * rdata : 0x%x",rdata);
    653652                    }
    654653
    655654                  // test type : send or not a respons !
    656                   if ((out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_SYNCHRONIZATION) or
    657                       (out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_LOAD_8 ) or
    658                       (out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_LOAD_16) or
    659                       (out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_LOAD_32) or
    660                       (out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_LOAD_64) or
    661                       ((error != DCACHE_ERROR_NONE) and ((out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_STORE_8 ) or
    662                                                          (out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_STORE_16) or
    663                                                          (out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_STORE_32) or
    664                                                          (out_DCACHE_REQ_TYPE->read() == DCACHE_TYPE_STORE_64) )))
     655                  if ((out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_SYNCHRONIZATION) or
     656                      (out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_LOAD_8 ) or
     657                      (out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_LOAD_16) or
     658                      (out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_LOAD_32) or
     659                      (out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_LOAD_64) or
     660                      ((error != DCACHE_ERROR_NONE) and ((out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_STORE_8 ) or
     661                                                         (out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_STORE_16) or
     662                                                         (out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_STORE_32) or
     663                                                         (out_DCACHE_REQ_TYPE[0]->read() == DCACHE_TYPE_STORE_64) )))
    665664                    {
    666665                      LABEL("     * have_dcache_rsp");
    667666                 
    668667                      _cache->push (context_id,
    669                                     out_DCACHE_REQ_PACKET_ID ->read(),
     668                                    out_DCACHE_REQ_PACKET_ID [0]->read(),
    670669                                    rdata,
    671670                                    error);
     
    673672                }
    674673
    675               LABEL("DCACHE_RSP : %d - %d",in_DCACHE_RSP_VAL->read(),out_DCACHE_RSP_ACK ->read());
    676               if (in_DCACHE_RSP_VAL->read() and out_DCACHE_RSP_ACK->read())
     674              LABEL("DCACHE_RSP : %d - %d",in_DCACHE_RSP_VAL[0]->read(),out_DCACHE_RSP_ACK [0]->read());
     675              if (in_DCACHE_RSP_VAL[0]->read() and out_DCACHE_RSP_ACK[0]->read())
    677676                {
    678677                  _cache->pop();
     
    704703  delete     in_NRESET;
    705704
    706   delete     in_MEMORY_IN_VAL         ;
    707   delete    out_MEMORY_IN_ACK         ;
    708   delete     in_MEMORY_IN_CONTEXT_ID  ;
    709   delete     in_MEMORY_IN_FRONT_END_ID  ;
    710   delete     in_MEMORY_IN_OOO_ENGINE_ID  ;
    711   delete     in_MEMORY_IN_PACKET_ID   ;
    712   delete     in_MEMORY_IN_OPERATION   ;
    713   delete     in_MEMORY_IN_STORE_QUEUE_PTR_WRITE;
    714   delete     in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ;
    715   delete     in_MEMORY_IN_HAS_IMMEDIAT;
    716   delete     in_MEMORY_IN_IMMEDIAT    ;
    717   delete     in_MEMORY_IN_DATA_RA     ;
    718   delete     in_MEMORY_IN_DATA_RB     ;
    719   delete     in_MEMORY_IN_DATA_RC     ;
    720   delete     in_MEMORY_IN_WRITE_RD    ;
    721   delete     in_MEMORY_IN_NUM_REG_RD  ;
    722   delete     in_MEMORY_IN_WRITE_RE    ;
    723   delete     in_MEMORY_IN_NUM_REG_RE  ;
    724    
    725   delete    out_MEMORY_OUT_VAL       ;
    726   delete     in_MEMORY_OUT_ACK       ;
    727   delete    out_MEMORY_OUT_CONTEXT_ID;
    728   delete    out_MEMORY_OUT_FRONT_END_ID;
    729   delete    out_MEMORY_OUT_OOO_ENGINE_ID;
    730   delete    out_MEMORY_OUT_PACKET_ID ;
    731 //   delete    out_MEMORY_OUT_OPERATION ;
    732   delete    out_MEMORY_OUT_TYPE      ;
    733   delete    out_MEMORY_OUT_WRITE_RD  ;
    734   delete    out_MEMORY_OUT_NUM_REG_RD;
    735   delete    out_MEMORY_OUT_DATA_RD   ;
    736   delete    out_MEMORY_OUT_WRITE_RE  ;
    737   delete    out_MEMORY_OUT_NUM_REG_RE;
    738   delete    out_MEMORY_OUT_DATA_RE   ;
    739   delete    out_MEMORY_OUT_EXCEPTION ;
    740   delete    out_MEMORY_OUT_NO_SEQUENCE;
    741   delete    out_MEMORY_OUT_ADDRESS   ;
    742  
    743   delete    out_DCACHE_REQ_VAL       ;
    744   delete     in_DCACHE_REQ_ACK       ;
    745   delete    out_DCACHE_REQ_CONTEXT_ID;
    746   delete    out_DCACHE_REQ_PACKET_ID ;
    747   delete    out_DCACHE_REQ_ADDRESS   ;
    748   delete    out_DCACHE_REQ_TYPE      ;
    749   delete    out_DCACHE_REQ_WDATA     ;
    750  
    751   delete     in_DCACHE_RSP_VAL       ;
    752   delete    out_DCACHE_RSP_ACK       ;
    753   delete     in_DCACHE_RSP_CONTEXT_ID;
    754   delete     in_DCACHE_RSP_PACKET_ID ;
    755   delete     in_DCACHE_RSP_RDATA     ;
    756   delete     in_DCACHE_RSP_ERROR     ;
    757  
    758     {
    759       delete [] out_BYPASS_MEMORY_VAL       ;
    760       delete [] out_BYPASS_MEMORY_OOO_ENGINE_ID;
    761       delete [] out_BYPASS_MEMORY_NUM_REG   ;
    762       delete [] out_BYPASS_MEMORY_DATA      ;
    763     }
     705  DELETE1_SC_SIGNAL( in_MEMORY_IN_VAL                  ,_param->_nb_inst_memory);
     706  DELETE1_SC_SIGNAL(out_MEMORY_IN_ACK                  ,_param->_nb_inst_memory);
     707  DELETE1_SC_SIGNAL( in_MEMORY_IN_CONTEXT_ID           ,_param->_nb_inst_memory);
     708  DELETE1_SC_SIGNAL( in_MEMORY_IN_FRONT_END_ID         ,_param->_nb_inst_memory);
     709  DELETE1_SC_SIGNAL( in_MEMORY_IN_OOO_ENGINE_ID        ,_param->_nb_inst_memory);
     710  DELETE1_SC_SIGNAL( in_MEMORY_IN_PACKET_ID            ,_param->_nb_inst_memory);
     711  DELETE1_SC_SIGNAL( in_MEMORY_IN_OPERATION            ,_param->_nb_inst_memory);
     712  DELETE1_SC_SIGNAL( in_MEMORY_IN_TYPE                 ,_param->_nb_inst_memory);
     713  DELETE1_SC_SIGNAL( in_MEMORY_IN_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_memory);
     714  DELETE1_SC_SIGNAL( in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_memory);
     715  DELETE1_SC_SIGNAL( in_MEMORY_IN_HAS_IMMEDIAT         ,_param->_nb_inst_memory);
     716  DELETE1_SC_SIGNAL( in_MEMORY_IN_IMMEDIAT             ,_param->_nb_inst_memory);
     717  DELETE1_SC_SIGNAL( in_MEMORY_IN_DATA_RA              ,_param->_nb_inst_memory);
     718  DELETE1_SC_SIGNAL( in_MEMORY_IN_DATA_RB              ,_param->_nb_inst_memory);
     719  DELETE1_SC_SIGNAL( in_MEMORY_IN_DATA_RC              ,_param->_nb_inst_memory);
     720  DELETE1_SC_SIGNAL( in_MEMORY_IN_WRITE_RD             ,_param->_nb_inst_memory);
     721  DELETE1_SC_SIGNAL( in_MEMORY_IN_NUM_REG_RD           ,_param->_nb_inst_memory);
     722  DELETE1_SC_SIGNAL( in_MEMORY_IN_WRITE_RE             ,_param->_nb_inst_memory);
     723  DELETE1_SC_SIGNAL( in_MEMORY_IN_NUM_REG_RE           ,_param->_nb_inst_memory);
     724
     725  DELETE1_SC_SIGNAL(out_MEMORY_OUT_VAL          ,_param->_nb_inst_memory);
     726  DELETE1_SC_SIGNAL( in_MEMORY_OUT_ACK          ,_param->_nb_inst_memory);
     727  DELETE1_SC_SIGNAL(out_MEMORY_OUT_CONTEXT_ID   ,_param->_nb_inst_memory);
     728  DELETE1_SC_SIGNAL(out_MEMORY_OUT_FRONT_END_ID ,_param->_nb_inst_memory);
     729  DELETE1_SC_SIGNAL(out_MEMORY_OUT_OOO_ENGINE_ID,_param->_nb_inst_memory);
     730  DELETE1_SC_SIGNAL(out_MEMORY_OUT_PACKET_ID    ,_param->_nb_inst_memory);
     731//DELETE1_SC_SIGNAL(out_MEMORY_OUT_OPERATION    ,_param->_nb_inst_memory);
     732  DELETE1_SC_SIGNAL(out_MEMORY_OUT_TYPE         ,_param->_nb_inst_memory);
     733  DELETE1_SC_SIGNAL(out_MEMORY_OUT_WRITE_RD     ,_param->_nb_inst_memory);
     734  DELETE1_SC_SIGNAL(out_MEMORY_OUT_NUM_REG_RD   ,_param->_nb_inst_memory);
     735  DELETE1_SC_SIGNAL(out_MEMORY_OUT_DATA_RD      ,_param->_nb_inst_memory);
     736  DELETE1_SC_SIGNAL(out_MEMORY_OUT_WRITE_RE     ,_param->_nb_inst_memory);
     737  DELETE1_SC_SIGNAL(out_MEMORY_OUT_NUM_REG_RE   ,_param->_nb_inst_memory);
     738  DELETE1_SC_SIGNAL(out_MEMORY_OUT_DATA_RE      ,_param->_nb_inst_memory);
     739  DELETE1_SC_SIGNAL(out_MEMORY_OUT_EXCEPTION    ,_param->_nb_inst_memory);
     740  DELETE1_SC_SIGNAL(out_MEMORY_OUT_NO_SEQUENCE  ,_param->_nb_inst_memory);
     741  DELETE1_SC_SIGNAL(out_MEMORY_OUT_ADDRESS      ,_param->_nb_inst_memory);
     742
     743  DELETE1_SC_SIGNAL(out_DCACHE_REQ_VAL        ,_param->_nb_cache_port);
     744  DELETE1_SC_SIGNAL( in_DCACHE_REQ_ACK        ,_param->_nb_cache_port);
     745  DELETE1_SC_SIGNAL(out_DCACHE_REQ_CONTEXT_ID ,_param->_nb_cache_port);
     746  DELETE1_SC_SIGNAL(out_DCACHE_REQ_PACKET_ID  ,_param->_nb_cache_port);
     747  DELETE1_SC_SIGNAL(out_DCACHE_REQ_ADDRESS    ,_param->_nb_cache_port);
     748  DELETE1_SC_SIGNAL(out_DCACHE_REQ_TYPE       ,_param->_nb_cache_port);
     749  DELETE1_SC_SIGNAL(out_DCACHE_REQ_WDATA      ,_param->_nb_cache_port);
     750
     751  DELETE1_SC_SIGNAL( in_DCACHE_RSP_VAL        ,_param->_nb_cache_port);
     752  DELETE1_SC_SIGNAL(out_DCACHE_RSP_ACK        ,_param->_nb_cache_port);
     753  DELETE1_SC_SIGNAL( in_DCACHE_RSP_CONTEXT_ID ,_param->_nb_cache_port);
     754  DELETE1_SC_SIGNAL( in_DCACHE_RSP_PACKET_ID  ,_param->_nb_cache_port);
     755  DELETE1_SC_SIGNAL( in_DCACHE_RSP_RDATA      ,_param->_nb_cache_port);
     756  DELETE1_SC_SIGNAL( in_DCACHE_RSP_ERROR      ,_param->_nb_cache_port);
     757
     758  DELETE1_SC_SIGNAL(out_BYPASS_MEMORY_VAL           ,_param->_nb_bypass_memory);
     759  DELETE1_SC_SIGNAL(out_BYPASS_MEMORY_OOO_ENGINE_ID ,_param->_nb_bypass_memory);
     760  DELETE1_SC_SIGNAL(out_BYPASS_MEMORY_NUM_REG       ,_param->_nb_bypass_memory);
     761  DELETE1_SC_SIGNAL(out_BYPASS_MEMORY_DATA          ,_param->_nb_bypass_memory);
    764762#endif
    765763
  • 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

    r82 r88  
    9090
    9191    // ~~~~~[ Interface "memory_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    92   public    : SC_IN (Tcontrol_t        )    *  in_MEMORY_IN_VAL         ;
    93   public    : SC_OUT(Tcontrol_t        )    * out_MEMORY_IN_ACK         ;
    94   public    : SC_IN (Tcontext_t        )    *  in_MEMORY_IN_CONTEXT_ID  ;
    95   public    : SC_IN (Tcontext_t        )    *  in_MEMORY_IN_FRONT_END_ID;
    96   public    : SC_IN (Tcontext_t        )    *  in_MEMORY_IN_OOO_ENGINE_ID;
    97   public    : SC_IN (Tpacket_t         )    *  in_MEMORY_IN_PACKET_ID   ;
    98   public    : SC_IN (Toperation_t      )    *  in_MEMORY_IN_OPERATION   ;
    99   public    : SC_IN (Ttype_t           )    *  in_MEMORY_IN_TYPE        ;
    100   public    : SC_IN (Tlsq_ptr_t        )    *  in_MEMORY_IN_STORE_QUEUE_PTR_WRITE;
    101   public    : SC_IN (Tlsq_ptr_t        )    *  in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ;
    102   public    : SC_IN (Tcontrol_t        )    *  in_MEMORY_IN_HAS_IMMEDIAT;
    103   public    : SC_IN (Tgeneral_data_t   )    *  in_MEMORY_IN_IMMEDIAT    ; // memory address
    104   public    : SC_IN (Tgeneral_data_t   )    *  in_MEMORY_IN_DATA_RA     ; // memory address
    105   public    : SC_IN (Tgeneral_data_t   )    *  in_MEMORY_IN_DATA_RB     ; // data        (store)
    106   public    : SC_IN (Tspecial_data_t   )    *  in_MEMORY_IN_DATA_RC     ;
    107   public    : SC_IN (Tcontrol_t        )    *  in_MEMORY_IN_WRITE_RD    ; // = (operation==load)
    108   public    : SC_IN (Tgeneral_address_t)    *  in_MEMORY_IN_NUM_REG_RD  ; // destination (load)
    109   public    : SC_IN (Tcontrol_t        )    *  in_MEMORY_IN_WRITE_RE    ;
    110   public    : SC_IN (Tspecial_address_t)    *  in_MEMORY_IN_NUM_REG_RE  ;
     92  public    : SC_IN (Tcontrol_t        )   **  in_MEMORY_IN_VAL                  ;//[nb_inst_memory]
     93  public    : SC_OUT(Tcontrol_t        )   ** out_MEMORY_IN_ACK                  ;//[nb_inst_memory]
     94  public    : SC_IN (Tcontext_t        )   **  in_MEMORY_IN_CONTEXT_ID           ;//[nb_inst_memory]
     95  public    : SC_IN (Tcontext_t        )   **  in_MEMORY_IN_FRONT_END_ID         ;//[nb_inst_memory]
     96  public    : SC_IN (Tcontext_t        )   **  in_MEMORY_IN_OOO_ENGINE_ID        ;//[nb_inst_memory]
     97  public    : SC_IN (Tpacket_t         )   **  in_MEMORY_IN_PACKET_ID            ;//[nb_inst_memory]
     98  public    : SC_IN (Toperation_t      )   **  in_MEMORY_IN_OPERATION            ;//[nb_inst_memory]
     99  public    : SC_IN (Ttype_t           )   **  in_MEMORY_IN_TYPE                 ;//[nb_inst_memory]
     100  public    : SC_IN (Tlsq_ptr_t        )   **  in_MEMORY_IN_STORE_QUEUE_PTR_WRITE;//[nb_inst_memory]
     101  public    : SC_IN (Tlsq_ptr_t        )   **  in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ;//[nb_inst_memory]
     102  public    : SC_IN (Tcontrol_t        )   **  in_MEMORY_IN_HAS_IMMEDIAT         ;//[nb_inst_memory]
     103  public    : SC_IN (Tgeneral_data_t   )   **  in_MEMORY_IN_IMMEDIAT             ;//[nb_inst_memory] // memory address
     104  public    : SC_IN (Tgeneral_data_t   )   **  in_MEMORY_IN_DATA_RA              ;//[nb_inst_memory] // memory address
     105  public    : SC_IN (Tgeneral_data_t   )   **  in_MEMORY_IN_DATA_RB              ;//[nb_inst_memory] // data        (store)
     106  public    : SC_IN (Tspecial_data_t   )   **  in_MEMORY_IN_DATA_RC              ;//[nb_inst_memory]
     107  public    : SC_IN (Tcontrol_t        )   **  in_MEMORY_IN_WRITE_RD             ;//[nb_inst_memory] // = (operation==load)
     108  public    : SC_IN (Tgeneral_address_t)   **  in_MEMORY_IN_NUM_REG_RD           ;//[nb_inst_memory] // destination (load)
     109  public    : SC_IN (Tcontrol_t        )   **  in_MEMORY_IN_WRITE_RE             ;//[nb_inst_memory]
     110  public    : SC_IN (Tspecial_address_t)   **  in_MEMORY_IN_NUM_REG_RE           ;//[nb_inst_memory]
    111111
    112112    // ~~~~~[ Interface "memory_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    113   public    : SC_OUT(Tcontrol_t        )    * out_MEMORY_OUT_VAL       ;
    114   public    : SC_IN (Tcontrol_t        )    *  in_MEMORY_OUT_ACK       ;
    115   public    : SC_OUT(Tcontext_t        )    * out_MEMORY_OUT_CONTEXT_ID;
    116   public    : SC_OUT(Tcontext_t        )    * out_MEMORY_OUT_FRONT_END_ID;
    117   public    : SC_OUT(Tcontext_t        )    * out_MEMORY_OUT_OOO_ENGINE_ID;
    118   public    : SC_OUT(Tpacket_t         )    * out_MEMORY_OUT_PACKET_ID ;
    119 //public    : SC_OUT(Toperation_t      )    * out_MEMORY_OUT_OPERATION ;
    120   public    : SC_OUT(Ttype_t           )    * out_MEMORY_OUT_TYPE      ;
    121   public    : SC_OUT(Tcontrol_t        )    * out_MEMORY_OUT_WRITE_RD  ; // = (operation==load)
    122   public    : SC_OUT(Tgeneral_address_t)    * out_MEMORY_OUT_NUM_REG_RD; // destination (load)
    123   public    : SC_OUT(Tgeneral_data_t   )    * out_MEMORY_OUT_DATA_RD   ; // data        (load)
    124   public    : SC_OUT(Tcontrol_t        )    * out_MEMORY_OUT_WRITE_RE  ;
    125   public    : SC_OUT(Tspecial_address_t)    * out_MEMORY_OUT_NUM_REG_RE;
    126   public    : SC_OUT(Tspecial_data_t   )    * out_MEMORY_OUT_DATA_RE   ;
    127   public    : SC_OUT(Texception_t      )    * out_MEMORY_OUT_EXCEPTION ;
    128   public    : SC_OUT(Tcontrol_t        )    * out_MEMORY_OUT_NO_SEQUENCE;
    129   public    : SC_OUT(Tgeneral_data_t   )    * out_MEMORY_OUT_ADDRESS   ;
     113  public    : SC_OUT(Tcontrol_t        )   ** out_MEMORY_OUT_VAL                 ;//[nb_inst_memory]
     114  public    : SC_IN (Tcontrol_t        )   **  in_MEMORY_OUT_ACK                 ;//[nb_inst_memory]
     115  public    : SC_OUT(Tcontext_t        )   ** out_MEMORY_OUT_CONTEXT_ID          ;//[nb_inst_memory]
     116  public    : SC_OUT(Tcontext_t        )   ** out_MEMORY_OUT_FRONT_END_ID        ;//[nb_inst_memory]
     117  public    : SC_OUT(Tcontext_t        )   ** out_MEMORY_OUT_OOO_ENGINE_ID       ;//[nb_inst_memory]
     118  public    : SC_OUT(Tpacket_t         )   ** out_MEMORY_OUT_PACKET_ID           ;//[nb_inst_memory]
     119//public    : SC_OUT(Toperation_t      )   ** out_MEMORY_OUT_OPERATION           ;//[nb_inst_memory]
     120  public    : SC_OUT(Ttype_t           )   ** out_MEMORY_OUT_TYPE                ;//[nb_inst_memory]
     121  public    : SC_OUT(Tcontrol_t        )   ** out_MEMORY_OUT_WRITE_RD            ;//[nb_inst_memory] // = (operation==load)
     122  public    : SC_OUT(Tgeneral_address_t)   ** out_MEMORY_OUT_NUM_REG_RD          ;//[nb_inst_memory] // destination (load)
     123  public    : SC_OUT(Tgeneral_data_t   )   ** out_MEMORY_OUT_DATA_RD             ;//[nb_inst_memory] // data        (load)
     124  public    : SC_OUT(Tcontrol_t        )   ** out_MEMORY_OUT_WRITE_RE            ;//[nb_inst_memory]
     125  public    : SC_OUT(Tspecial_address_t)   ** out_MEMORY_OUT_NUM_REG_RE          ;//[nb_inst_memory]
     126  public    : SC_OUT(Tspecial_data_t   )   ** out_MEMORY_OUT_DATA_RE             ;//[nb_inst_memory]
     127  public    : SC_OUT(Texception_t      )   ** out_MEMORY_OUT_EXCEPTION           ;//[nb_inst_memory]
     128  public    : SC_OUT(Tcontrol_t        )   ** out_MEMORY_OUT_NO_SEQUENCE         ;//[nb_inst_memory]
     129  public    : SC_OUT(Tgeneral_data_t   )   ** out_MEMORY_OUT_ADDRESS             ;//[nb_inst_memory]
    130130   
    131 
    132131    // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    133   public    : SC_OUT(Tcontrol_t        )    * out_DCACHE_REQ_VAL       ;
    134   public    : SC_IN (Tcontrol_t        )    *  in_DCACHE_REQ_ACK       ;
    135   public    : SC_OUT(Tcontext_t        )    * out_DCACHE_REQ_CONTEXT_ID;
    136   public    : SC_OUT(Tpacket_t         )    * out_DCACHE_REQ_PACKET_ID ;
    137   public    : SC_OUT(Tdcache_address_t )    * out_DCACHE_REQ_ADDRESS   ;
    138   public    : SC_OUT(Tdcache_type_t    )    * out_DCACHE_REQ_TYPE      ;
    139   public    : SC_OUT(Tdcache_data_t    )    * out_DCACHE_REQ_WDATA     ;
     132  public    : SC_OUT(Tcontrol_t        )   ** out_DCACHE_REQ_VAL                 ;//[nb_cache_port]
     133  public    : SC_IN (Tcontrol_t        )   **  in_DCACHE_REQ_ACK                 ;//[nb_cache_port]
     134  public    : SC_OUT(Tcontext_t        )   ** out_DCACHE_REQ_CONTEXT_ID          ;//[nb_cache_port]
     135  public    : SC_OUT(Tpacket_t         )   ** out_DCACHE_REQ_PACKET_ID           ;//[nb_cache_port]
     136  public    : SC_OUT(Tdcache_address_t )   ** out_DCACHE_REQ_ADDRESS             ;//[nb_cache_port]
     137  public    : SC_OUT(Tdcache_type_t    )   ** out_DCACHE_REQ_TYPE                ;//[nb_cache_port]
     138  public    : SC_OUT(Tdcache_data_t    )   ** out_DCACHE_REQ_WDATA               ;//[nb_cache_port]
    140139
    141140    // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    142   public    : SC_IN (Tcontrol_t        )    *  in_DCACHE_RSP_VAL       ;
    143   public    : SC_OUT(Tcontrol_t        )    * out_DCACHE_RSP_ACK       ;
    144   public    : SC_IN (Tcontext_t        )    *  in_DCACHE_RSP_CONTEXT_ID;
    145   public    : SC_IN (Tpacket_t         )    *  in_DCACHE_RSP_PACKET_ID ;
    146   public    : SC_IN (Tdcache_data_t    )    *  in_DCACHE_RSP_RDATA     ;
    147   public    : SC_IN (Tdcache_error_t   )    *  in_DCACHE_RSP_ERROR     ;
     141  public    : SC_IN (Tcontrol_t        )   **  in_DCACHE_RSP_VAL                 ;//[nb_cache_port]
     142  public    : SC_OUT(Tcontrol_t        )   ** out_DCACHE_RSP_ACK                 ;//[nb_cache_port]
     143  public    : SC_IN (Tcontext_t        )   **  in_DCACHE_RSP_CONTEXT_ID          ;//[nb_cache_port]
     144  public    : SC_IN (Tpacket_t         )   **  in_DCACHE_RSP_PACKET_ID           ;//[nb_cache_port]
     145  public    : SC_IN (Tdcache_data_t    )   **  in_DCACHE_RSP_RDATA               ;//[nb_cache_port]
     146  public    : SC_IN (Tdcache_error_t   )   **  in_DCACHE_RSP_ERROR               ;//[nb_cache_port]
    148147
    149148    // ~~~~~[ Interface "bypass_memory" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    150   public    : SC_OUT(Tcontrol_t        )   ** out_BYPASS_MEMORY_VAL       ;
    151   public    : SC_OUT(Tcontext_t        )   ** out_BYPASS_MEMORY_OOO_ENGINE_ID;
    152   public    : SC_OUT(Tgeneral_address_t)   ** out_BYPASS_MEMORY_NUM_REG   ;
    153   public    : SC_OUT(Tgeneral_data_t   )   ** out_BYPASS_MEMORY_DATA      ;
     149  public    : SC_OUT(Tcontrol_t        )   ** out_BYPASS_MEMORY_VAL          ; //[nb_bypass_memory]
     150  public    : SC_OUT(Tcontext_t        )   ** out_BYPASS_MEMORY_OOO_ENGINE_ID; //[nb_bypass_memory]
     151  public    : SC_OUT(Tgeneral_address_t)   ** out_BYPASS_MEMORY_NUM_REG      ; //[nb_bypass_memory]
     152  public    : SC_OUT(Tgeneral_data_t   )   ** out_BYPASS_MEMORY_DATA         ; //[nb_bypass_memory]
    154153
    155154    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     
    177176    // signal
    178177  public    : Tlsq_ptr_t                      internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ ;
    179 
    180   private   : Tcontrol_t                      internal_MEMORY_IN_ACK;
    181   private   : Tcontrol_t                      internal_MEMORY_OUT_VAL;
     178                                             
     179  private   : Tcontrol_t                      internal_MEMORY_IN_ACK          ;
     180  private   : uint32_t                        internal_MEMORY_IN_PORT         ;
     181
     182  private   : Tcontrol_t                      internal_MEMORY_OUT_VAL         ;
    182183  private   : Tselect_queue_t                 internal_MEMORY_OUT_SELECT_QUEUE;
    183   public    : Tlsq_ptr_t                      internal_MEMORY_OUT_PTR;
    184 
    185   private   : Tcontrol_t                      internal_DCACHE_RSP_ACK;
    186   private   : Tcontrol_t                      internal_DCACHE_REQ_VAL;
     184  private   : Tlsq_ptr_t                      internal_MEMORY_OUT_PTR         ;
     185                                             
     186  private   : Tcontrol_t                      internal_DCACHE_RSP_ACK         ;
     187  private   : Tcontrol_t                      internal_DCACHE_REQ_VAL         ;
    187188  private   : Tselect_queue_t                 internal_DCACHE_REQ_SELECT_QUEUE;
    188189#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Parameters.h

    r81 r88  
    2727  {
    2828    //-----[ fields ]------------------------------------------------------------
    29   public : const uint32_t            _size_store_queue             ;
    30   public : const uint32_t            _size_load_queue              ;
    31   public : const uint32_t            _size_speculative_access_queue;
    32   public : const uint32_t            _nb_port_check                ;
    33   public : const Tspeculative_load_t _speculative_load             ;
    34   public : const uint32_t            _nb_bypass_memory             ;
    35 //public : const uint32_t            _nb_cache_port                ;
    36   public : const uint32_t            _nb_context                   ;
    37   public : const uint32_t            _nb_front_end                 ;
    38   public : const uint32_t            _nb_ooo_engine                ;
    39   public : const uint32_t            _nb_packet                    ;
    40   public : const uint32_t            _size_general_data            ;
    41   public : const uint32_t            _size_special_data            ;
    42   public : const uint32_t            _nb_general_register          ;
    43   public : const uint32_t            _nb_special_register          ;
     29  public : uint32_t            _size_store_queue             ;
     30  public : uint32_t            _size_load_queue              ;
     31  public : uint32_t            _size_speculative_access_queue;
     32  public : uint32_t            _nb_port_check                ;
     33  public : Tspeculative_load_t _speculative_load             ;
     34  public : uint32_t            _nb_bypass_memory             ;
     35  public : uint32_t            _nb_cache_port                ;
     36  public : uint32_t            _nb_inst_memory               ;
     37  public : uint32_t            _nb_context                   ;
     38  public : uint32_t            _nb_front_end                 ;
     39  public : uint32_t            _nb_ooo_engine                ;
     40  public : uint32_t            _nb_packet                    ;
     41//public : uint32_t            _size_general_data            ;
     42//public : uint32_t            _size_special_data            ;
     43  public : uint32_t            _nb_general_register          ;
     44  public : uint32_t            _nb_special_register          ;
    4445
    45   public : const uint32_t            _size_address_store_queue             ;
    46   public : const uint32_t            _size_address_load_queue              ;
    47   public : const uint32_t            _size_address_speculative_access_queue;
    48   public : const uint32_t            _size_context_id                      ;
    49   public : const uint32_t            _size_front_end_id                    ;
    50   public : const uint32_t            _size_ooo_engine_id                   ;
    51   public : const uint32_t            _size_packet_id                       ;
    52   public : const uint32_t            _size_general_register                ;
    53   public : const uint32_t            _size_special_register                ;
    54   public : const uint32_t            _size_dcache_context_id               ;
    55   public : const uint32_t            _size_dcache_packet_id                ;
     46//public : uint32_t            _size_address_store_queue             ;
     47//public : uint32_t            _size_address_load_queue              ;
     48  public : uint32_t            _size_speculative_access_queue_ptr    ;
     49//public : uint32_t            _size_context_id                      ;
     50//public : uint32_t            _size_front_end_id                    ;
     51//public : uint32_t            _size_ooo_engine_id                   ;
     52//public : uint32_t            _size_packet_id                       ;
     53//public : uint32_t            _size_general_register                ;
     54//public : uint32_t            _size_special_register                ;
     55  public : uint32_t            _size_dcache_context_id               ;
     56  public : uint32_t            _size_dcache_packet_id                ;
    5657
    57   public : const bool                _have_port_context_id                 ;
    58   public : const bool                _have_port_front_end_id               ;
    59   public : const bool                _have_port_ooo_engine_id              ;
    60   public : const bool                _have_port_packet_id                  ;
    61   public : const bool                _have_port_dcache_context_id          ;
    62   public : const bool                _have_port_load_queue_ptr             ;
     58//public : bool                _have_port_context_id                 ;
     59//public : bool                _have_port_front_end_id               ;
     60//public : bool                _have_port_ooo_engine_id              ;
     61//public : bool                _have_port_packet_id                  ;
     62  public : bool                _have_port_dcache_context_id          ;
     63//public : bool                _have_port_load_queue_ptr             ;
    6364
    64   public : const Tdcache_address_t   _mask_address_lsb                     ;
    65   public : const Tdcache_address_t   _mask_address_msb                     ;
     65  public : Tdcache_address_t   _mask_address_lsb                     ;
     66  public : Tdcache_address_t   _mask_address_msb                     ;
    6667
    6768    //-----[ methods ]-----------------------------------------------------------
     
    7273                        Tspeculative_load_t speculative_load       ,
    7374                        uint32_t            nb_bypass_memory       ,
     75                        uint32_t            nb_cache_port          ,
     76                        uint32_t            nb_inst_memory         ,
    7477                        uint32_t            nb_context             ,
    7578                        uint32_t            nb_front_end           ,
     
    7982                        uint32_t            size_special_data      ,
    8083                        uint32_t            nb_general_register    ,
    81                         uint32_t            nb_special_register    );
     84                        uint32_t            nb_special_register    ,
     85                        bool                is_toplevel=false);
    8286
    83   public : Parameters  (Parameters & param) ;
     87//   public : Parameters  (Parameters & param) ;
     88
    8489  public : ~Parameters () ;
     90
     91  public : void            copy      (void);
    8592
    8693  public : Parameters_test msg_error (void);
  • 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

    r82 r88  
    3939    log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
    4040
     41#if DEBUG_Load_store_unit == true
     42    log_printf(INFO,Load_store_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     43
     44    std::cout << *param << std::endl;
     45#endif   
     46
    4147#ifdef SYSTEMC
    4248    log_printf(INFO,Load_store_unit,FUNCTION,"Allocation");
     
    4652
    4753#ifdef STATISTICS
    48     log_printf(INFO,Load_store_unit,FUNCTION,"Allocation of statistics");
    49 
    50     statistics_declaration(param_statistics);
     54    if (usage_is_set(_usage,USE_STATISTICS))
     55      {
     56        log_printf(INFO,Load_store_unit,FUNCTION,"Allocation of statistics");
     57       
     58        statistics_declaration(param_statistics);
     59      }
    5160#endif
    5261
    5362#ifdef VHDL
    54     // generate the vhdl
    55     log_printf(INFO,Load_store_unit,FUNCTION,"Generate the vhdl");
    56 
    57     vhdl();
    58 #endif
    59 
    60 #ifdef SYSTEMC
     63    if (usage_is_set(_usage,USE_VHDL))
     64      {
     65        // generate the vhdl
     66        log_printf(INFO,Load_store_unit,FUNCTION,"Generate the vhdl");
     67       
     68        vhdl();
     69      }
     70#endif
     71
     72#ifdef SYSTEMC
     73    if (usage_is_set(_usage,USE_SYSTEMC))
     74      {
    6175    // Function pointer
    6276
     
    8498
    8599    internal_DCACHE_RSP_ACK = 1;
    86     PORT_WRITE(out_DCACHE_RSP_ACK, 1);
     100    PORT_WRITE(out_DCACHE_RSP_ACK [0], internal_DCACHE_RSP_ACK);
     101    for (uint32_t i=1; i<_param->_nb_cache_port; ++i)
     102      {
     103        PORT_WRITE(out_DCACHE_RSP_ACK [i], 0);
     104        PORT_WRITE(out_DCACHE_REQ_VAL [i], 0);
     105      }
     106
     107    for (uint32_t i=1; i<_param->_nb_inst_memory; i++)
     108      {
     109        PORT_WRITE(out_MEMORY_OUT_VAL [i], 0);
     110      }
    87111
    88112    log_printf(INFO,Load_store_unit,FUNCTION,"Method - transition");
     
    111135    dont_initialize ();
    112136    sensitive_neg << *(in_CLOCK);
    113     sensitive     << *(in_MEMORY_IN_OPERATION);
    114 
    115 #ifdef SYSTEMCASS_SPECIFIC
    116     // List dependency information
    117     (*(out_MEMORY_IN_ACK)) (*(in_MEMORY_IN_OPERATION));
     137    for (uint32_t i=0; i<_param->_nb_inst_memory; i++)
     138      sensitive << (*(in_MEMORY_IN_VAL       [i]))
     139                << (*(in_MEMORY_IN_OPERATION [i]));
     140
     141#ifdef SYSTEMCASS_SPECIFIC
     142    // List dependency information
     143    for (uint32_t i=0; i<_param->_nb_inst_memory; i++)
     144//       for (uint32_t x=0; x<_param->_nb_inst_memory; x++)
     145        {
     146          (*(out_MEMORY_IN_ACK [i])) (*(in_MEMORY_IN_VAL       [i]));
     147          (*(out_MEMORY_IN_ACK [i])) (*(in_MEMORY_IN_OPERATION [i]));
     148        }
    118149#endif   
    119150
     
    137168    // List dependency information
    138169#endif   
    139 
     170      }
    140171#endif
    141172    log_printf(FUNC,Load_store_unit,FUNCTION,"End");
     
    149180
    150181#ifdef STATISTICS
    151     log_printf(INFO,Load_store_unit,FUNCTION,"Generate Statistics file");
    152 
    153     delete _stat;
     182    if (usage_is_set(_usage,USE_STATISTICS))
     183      {
     184        log_printf(INFO,Load_store_unit,FUNCTION,"Generate Statistics file");
     185       
     186        delete _stat;
     187      }
    154188#endif
    155189
  • 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

    r82 r88  
    33 * $Id$
    44 *
    5  * [ Description ]
     5 * [ Description ]
    66 *
    77 */
    88
    99#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h"
     10#include "Behavioural/include/Allocation.h"
    1011
    1112namespace morpheo                    {
     
    3738    _interfaces = entity->set_interfaces();
    3839
    39     // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     40    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4041    {
    4142      Interface * interface = _interfaces->set_interface(""
     
    4344                                                         ,IN
    4445                                                         ,SOUTH,
    45                                                          "Generalist interface"
     46                                                         _("Generalist interface")
    4647#endif
    4748                                                         );
     
    5051      in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
    5152    }
    52     // ~~~~~[ Interface "memory_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     53
     54    // ~~~~~[ Interface "memory_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5355    {
    54       Interface_fifo * interface = _interfaces->set_interface("memory_in"
    55 #ifdef POSITION
    56                                                               ,IN
    57                                                               ,WEST
    58                                                               ,"Instruction from Reservations station"
    59 #endif
    60                                                               );
     56      ALLOC1_INTERFACE("memory_in",IN,WEST,_("Instruction from Reservations station"),_param->_nb_inst_memory);
    6157
    62    in_MEMORY_IN_VAL                   = interface->set_signal_valack_in        (VAL);
    63   out_MEMORY_IN_ACK                   = interface->set_signal_valack_out       (ACK);
    64 
    65   if (_param->_have_port_context_id)
    66    in_MEMORY_IN_CONTEXT_ID            = interface->set_signal_in  <Tcontext_t        > ("context_id"   ,_param->_size_context_id       );
    67   if (_param->_have_port_front_end_id)
    68    in_MEMORY_IN_FRONT_END_ID          = interface->set_signal_in  <Tcontext_t        > ("front_end_id" ,_param->_size_front_end_id     );
    69   if (_param->_have_port_ooo_engine_id)
    70    in_MEMORY_IN_OOO_ENGINE_ID         = interface->set_signal_in  <Tcontext_t        > ("ooo_engine_id",_param->_size_ooo_engine_id    );
    71   if (_param->_have_port_packet_id)
    72    in_MEMORY_IN_PACKET_ID             = interface->set_signal_in  <Tpacket_t         > ("packet_id"    ,_param->_size_packet_id       );
    73    in_MEMORY_IN_OPERATION             = interface->set_signal_in  <Toperation_t      > ("operation"   ,_param->_size_operation        );
    74    in_MEMORY_IN_TYPE                  = interface->set_signal_in  <Ttype_t           > ("type"        ,_param->_size_type             );
    75    in_MEMORY_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in  <Tlsq_ptr_t        > ("store_queue_ptr_write" ,_param->_size_address_store_queue+1); // +1 cf load_queue usage
    76    if (_param->_have_port_load_queue_ptr)
    77    in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_in  <Tlsq_ptr_t        > ("load_queue_ptr_write"  ,_param->_size_address_load_queue );
    78    in_MEMORY_IN_HAS_IMMEDIAT          = interface->set_signal_in  <Tcontrol_t        > ("has_immediat",1                              );
    79    in_MEMORY_IN_IMMEDIAT              = interface->set_signal_in  <Tgeneral_data_t   > ("immediat"    ,_param->_size_general_data     );
    80    in_MEMORY_IN_DATA_RA               = interface->set_signal_in  <Tgeneral_data_t   > ("data_ra"     ,_param->_size_general_data     );
    81    in_MEMORY_IN_DATA_RB               = interface->set_signal_in  <Tgeneral_data_t   > ("data_rb"     ,_param->_size_general_data     );
    82    in_MEMORY_IN_DATA_RC               = interface->set_signal_in  <Tspecial_data_t   > ("data_rc"     ,_param->_size_special_data     );
    83    in_MEMORY_IN_WRITE_RD              = interface->set_signal_in  <Tcontrol_t        > ("write_rd"    ,1                              );
    84    in_MEMORY_IN_NUM_REG_RD            = interface->set_signal_in  <Tgeneral_address_t> ("num_reg_rd"  ,1                              );
    85    in_MEMORY_IN_WRITE_RE              = interface->set_signal_in  <Tcontrol_t        > ("write_re"    ,1                              );
    86    in_MEMORY_IN_NUM_REG_RE            = interface->set_signal_in  <Tspecial_address_t> ("num_reg_re"  ,1                              );
     58      ALLOC1_VALACK_IN ( in_MEMORY_IN_VAL                  ,VAL);
     59      ALLOC1_VALACK_OUT(out_MEMORY_IN_ACK                  ,ACK);
     60      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_CONTEXT_ID           ,"context_id"           ,Tcontext_t        ,_param->_size_context_id           );
     61      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_FRONT_END_ID         ,"front_end_id"         ,Tcontext_t        ,_param->_size_front_end_id         );
     62      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_OOO_ENGINE_ID        ,"ooo_engine_id"        ,Tcontext_t        ,_param->_size_ooo_engine_id        );
     63      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_PACKET_ID            ,"packet_id"            ,Tpacket_t         ,_param->_size_rob_ptr              );
     64      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_OPERATION            ,"operation"            ,Toperation_t      ,_param->_size_operation            );
     65      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_TYPE                 ,"type"                 ,Ttype_t           ,_param->_size_type                 );
     66      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr      );
     67      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr       );
     68      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_HAS_IMMEDIAT         ,"has_immediat"         ,Tcontrol_t        ,1                                  );
     69      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_IMMEDIAT             ,"immediat"             ,Tgeneral_data_t   ,_param->_size_general_data         );
     70      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_DATA_RA              ,"data_ra"              ,Tgeneral_data_t   ,_param->_size_general_data         );
     71      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_DATA_RB              ,"data_rb"              ,Tgeneral_data_t   ,_param->_size_general_data         );
     72      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_DATA_RC              ,"data_rc"              ,Tspecial_data_t   ,_param->_size_special_data         );
     73      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_WRITE_RD             ,"write_rd"             ,Tcontrol_t        ,1                                  );
     74      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_NUM_REG_RD           ,"num_reg_rd"           ,Tgeneral_address_t,1                                  );
     75      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_WRITE_RE             ,"write_re"             ,Tcontrol_t        ,1                                  );
     76      ALLOC1_SIGNAL_IN ( in_MEMORY_IN_NUM_REG_RE           ,"num_reg_re"           ,Tspecial_address_t,1                                  );
    8777    }
    8878
    89     // ~~~~~[ Interface "memory_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     79    // ~~~~~[ Interface "memory_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    9080    {
    91       Interface_fifo * interface = _interfaces->set_interface("memory_out"
    92 #ifdef POSITION
    93                                                               ,OUT
    94                                                               ,EAST
    95                                                               ,"Instruction to write queue"
    96 #endif
    97                                                               );
     81      ALLOC1_INTERFACE("memory_out",OUT,EAST,_("Instruction to write queue"),_param->_nb_inst_memory);
    9882
    99       out_MEMORY_OUT_VAL           = interface->set_signal_valack_out(VAL);
    100        in_MEMORY_OUT_ACK           = interface->set_signal_valack_in (ACK);
    101       if (_param->_have_port_context_id)       
    102       out_MEMORY_OUT_CONTEXT_ID    = interface->set_signal_out <Tcontext_t        > ("context_id"    ,_param->_size_context_id       );
    103       if (_param->_have_port_front_end_id)     
    104       out_MEMORY_OUT_FRONT_END_ID  = interface->set_signal_out <Tcontext_t        > ("front_end_id"  ,_param->_size_front_end_id     );
    105       if (_param->_have_port_ooo_engine_id)   
    106       out_MEMORY_OUT_OOO_ENGINE_ID = interface->set_signal_out <Tcontext_t        > ("ooo_engine_id" ,_param->_size_ooo_engine_id    );
    107       if (_param->_have_port_packet_id)       
    108       out_MEMORY_OUT_PACKET_ID     = interface->set_signal_out <Tpacket_t         > ("packet_id"     ,_param->_size_packet_id        );
    109 //    out_MEMORY_OUT_OPERATION     = interface->set_signal_out <Toperation_t      > ("operation"     ,_param->_size_operation        );
    110       out_MEMORY_OUT_TYPE          = interface->set_signal_out <Ttype_t           > ("type"          ,_param->_size_type             );
    111       out_MEMORY_OUT_WRITE_RD      = interface->set_signal_out <Tcontrol_t        > ("write_rd"      ,1                              );
    112       out_MEMORY_OUT_NUM_REG_RD    = interface->set_signal_out <Tgeneral_address_t> ("num_reg_rd"    ,_param->_size_general_register );
    113       out_MEMORY_OUT_DATA_RD       = interface->set_signal_out <Tgeneral_data_t   > ("data_rd"       ,_param->_size_general_data     );
    114       out_MEMORY_OUT_WRITE_RE      = interface->set_signal_out <Tcontrol_t        > ("write_re"      ,1                              );
    115       out_MEMORY_OUT_NUM_REG_RE    = interface->set_signal_out <Tspecial_address_t> ("num_reg_re"    ,_param->_size_general_register );
    116       out_MEMORY_OUT_DATA_RE       = interface->set_signal_out <Tspecial_data_t   > ("data_re"       ,_param->_size_general_data     );
    117       out_MEMORY_OUT_EXCEPTION     = interface->set_signal_out <Texception_t      > ("exception"     ,_param->_size_exception        );
    118       out_MEMORY_OUT_NO_SEQUENCE   = interface->set_signal_out <Tcontrol_t        > ("no_sequence"   ,1                              );
    119       out_MEMORY_OUT_ADDRESS       = interface->set_signal_out <Tgeneral_data_t   > ("address"       ,_param->_size_general_data     );
     83      ALLOC1_VALACK_OUT(out_MEMORY_OUT_VAL          ,VAL);
     84      ALLOC1_VALACK_IN ( in_MEMORY_OUT_ACK          ,ACK);
     85      ALLOC1_SIGNAL_OUT(out_MEMORY_OUT_CONTEXT_ID   ,"context_id"    ,Tcontext_t        ,_param->_size_context_id       );
     86      ALLOC1_SIGNAL_OUT(out_MEMORY_OUT_FRONT_END_ID ,"front_end_id"  ,Tcontext_t        ,_param->_size_front_end_id     );
     87      ALLOC1_SIGNAL_OUT(out_MEMORY_OUT_OOO_ENGINE_ID,"ooo_engine_id" ,Tcontext_t        ,_param->_size_ooo_engine_id    );
     88      ALLOC1_SIGNAL_OUT(out_MEMORY_OUT_PACKET_ID    ,"packet_id"     ,Tpacket_t         ,_param->_size_rob_ptr          );
     89//    ALLOC1_SIGNAL_OUT(out_MEMORY_OUT_OPERATION    ,"operation"     ,Toperation_t      ,_param->_size_operation        );
     90      ALLOC1_SIGNAL_OUT(out_MEMORY_OUT_TYPE         ,"type"          ,Ttype_t           ,_param->_size_type             );
     91      ALLOC1_SIGNAL_OUT(out_MEMORY_OUT_WRITE_RD     ,"write_rd"      ,Tcontrol_t        ,1                              );
     92      ALLOC1_SIGNAL_OUT(out_MEMORY_OUT_NUM_REG_RD   ,"num_reg_rd"    ,Tgeneral_address_t,_param->_size_general_register );
     93      ALLOC1_SIGNAL_OUT(out_MEMORY_OUT_DATA_RD      ,"data_rd"       ,Tgeneral_data_t   ,_param->_size_general_data     );
     94      ALLOC1_SIGNAL_OUT(out_MEMORY_OUT_WRITE_RE     ,"write_re"      ,Tcontrol_t        ,1                              );
     95      ALLOC1_SIGNAL_OUT(out_MEMORY_OUT_NUM_REG_RE   ,"num_reg_re"    ,Tspecial_address_t,_param->_size_general_register );
     96      ALLOC1_SIGNAL_OUT(out_MEMORY_OUT_DATA_RE      ,"data_re"       ,Tspecial_data_t   ,_param->_size_general_data     );
     97      ALLOC1_SIGNAL_OUT(out_MEMORY_OUT_EXCEPTION    ,"exception"     ,Texception_t      ,_param->_size_exception        );
     98      ALLOC1_SIGNAL_OUT(out_MEMORY_OUT_NO_SEQUENCE  ,"no_sequence"   ,Tcontrol_t        ,1                              );
     99      ALLOC1_SIGNAL_OUT(out_MEMORY_OUT_ADDRESS      ,"address"       ,Tgeneral_data_t   ,_param->_size_general_data     );
    120100    }
    121101
    122     // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     102    // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    123103    {
    124       Interface_fifo * interface = _interfaces->set_interface("dcache_req"
    125 #ifdef POSITION
    126                                                               ,OUT
    127                                                               ,NORTH
    128                                                               ,"Request port to dcache"
    129 #endif
    130                                                               );
     104      ALLOC1_INTERFACE("dcache_req",OUT,NORTH,_("Request port to dcache"),_param->_nb_cache_port);
    131105
    132       out_DCACHE_REQ_VAL        = interface->set_signal_valack_out(VAL);
    133        in_DCACHE_REQ_ACK        = interface->set_signal_valack_in (ACK);
    134        if (_param->_have_port_dcache_context_id)
    135       out_DCACHE_REQ_CONTEXT_ID = interface->set_signal_out <Tcontext_t        > ("context_id",_param->_size_dcache_context_id  );
    136       out_DCACHE_REQ_PACKET_ID  = interface->set_signal_out <Tpacket_t         > ("packet_id" ,_param->_size_dcache_packet_id   );
    137       out_DCACHE_REQ_ADDRESS    = interface->set_signal_out <Tdcache_address_t > ("address"   ,_param->_size_general_data);
    138       out_DCACHE_REQ_TYPE       = interface->set_signal_out <Tdcache_type_t    > ("type"      ,_param->_size_dcache_type );
    139       out_DCACHE_REQ_WDATA      = interface->set_signal_out <Tdcache_data_t    > ("wdata"     ,_param->_size_general_data);
     106      ALLOC1_VALACK_OUT(out_DCACHE_REQ_VAL        ,VAL);
     107      ALLOC1_VALACK_IN ( in_DCACHE_REQ_ACK        ,ACK);
     108      ALLOC1_SIGNAL_OUT(out_DCACHE_REQ_CONTEXT_ID ,"context_id",Tcontext_t       ,_param->_size_dcache_context_id  );
     109      ALLOC1_SIGNAL_OUT(out_DCACHE_REQ_PACKET_ID  ,"packet_id" ,Tpacket_t        ,_param->_size_dcache_packet_id   );
     110      ALLOC1_SIGNAL_OUT(out_DCACHE_REQ_ADDRESS    ,"address"   ,Tdcache_address_t,_param->_size_general_data);
     111      ALLOC1_SIGNAL_OUT(out_DCACHE_REQ_TYPE       ,"type"      ,Tdcache_type_t   ,_param->_size_dcache_type );
     112      ALLOC1_SIGNAL_OUT(out_DCACHE_REQ_WDATA      ,"wdata"     ,Tdcache_data_t   ,_param->_size_general_data);
    140113    }
    141     // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     114
     115    // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    142116    {
    143       Interface_fifo * interface = _interfaces->set_interface("dcache_rsp"
    144 #ifdef POSITION
    145                                                               ,IN
    146                                                               ,NORTH
    147                                                               ,"Respons port from dcache"
    148 #endif
    149                                                               );
     117      ALLOC1_INTERFACE("dcache_rsp",IN,NORTH,_("Respons port from dcache"),_param->_nb_cache_port);
    150118
    151        in_DCACHE_RSP_VAL        = interface->set_signal_valack_in (VAL);
    152       out_DCACHE_RSP_ACK        = interface->set_signal_valack_out(ACK);
    153        if (_param->_have_port_dcache_context_id)
    154        in_DCACHE_RSP_CONTEXT_ID = interface->set_signal_in  <Tcontext_t     > ("context_id",_param->_size_dcache_context_id  );
    155        in_DCACHE_RSP_PACKET_ID  = interface->set_signal_in  <Tpacket_t      > ("packet_id" ,_param->_size_dcache_packet_id   );
    156        in_DCACHE_RSP_RDATA      = interface->set_signal_in  <Tdcache_data_t > ("rdata"     ,_param->_size_general_data);
    157        in_DCACHE_RSP_ERROR      = interface->set_signal_in  <Tdcache_error_t> ("error"     ,_param->_size_dcache_error);
     119      ALLOC1_VALACK_IN ( in_DCACHE_RSP_VAL        ,VAL);
     120      ALLOC1_VALACK_OUT(out_DCACHE_RSP_ACK        ,ACK);
     121      ALLOC1_SIGNAL_IN ( in_DCACHE_RSP_CONTEXT_ID ,"context_id",Tcontext_t     ,_param->_size_dcache_context_id  );
     122      ALLOC1_SIGNAL_IN ( in_DCACHE_RSP_PACKET_ID  ,"packet_id" ,Tpacket_t      ,_param->_size_dcache_packet_id   );
     123      ALLOC1_SIGNAL_IN ( in_DCACHE_RSP_RDATA      ,"rdata"     ,Tdcache_data_t ,_param->_size_general_data);
     124      ALLOC1_SIGNAL_IN ( in_DCACHE_RSP_ERROR      ,"error"     ,Tdcache_error_t,_param->_size_dcache_error);
    158125    }
    159     // ~~~~~[ Interface "bypass_memory" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     126    // ~~~~~[ Interface "bypass_memory" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    160127
    161 //  if (_param->_speculative_load == SPECULATIVE_LOAD_BYPASS)
    162       {
    163         out_BYPASS_MEMORY_VAL          = new SC_OUT(Tcontrol_t        ) * [_param->_nb_bypass_memory];
    164         if (_param->_have_port_ooo_engine_id)   
    165         out_BYPASS_MEMORY_OOO_ENGINE_ID= new SC_OUT(Tcontext_t        ) * [_param->_nb_bypass_memory];
    166         out_BYPASS_MEMORY_NUM_REG      = new SC_OUT(Tgeneral_address_t) * [_param->_nb_bypass_memory];
    167         out_BYPASS_MEMORY_DATA         = new SC_OUT(Tgeneral_data_t   ) * [_param->_nb_bypass_memory];
    168        
    169         for (uint32_t i=0; i<_param->_nb_bypass_memory; i++)
    170           {
    171             Interface_fifo * interface = _interfaces->set_interface("memory_out"
    172 #ifdef POSITION
    173                                                                     ,OUT
    174                                                                     ,NORTH
    175                                                                     ,"Bypass between the load queue and the reservation station"
    176 #endif
    177                                                                     );
     128    {
     129      ALLOC1_INTERFACE("bypass_memory",OUT,NORTH,_("Bypass between the load queue and the reservation station"),_param->_nb_bypass_memory);
    178130           
    179             out_BYPASS_MEMORY_VAL           [i] = interface->set_signal_valack_out(VAL);
    180             if (_param->_have_port_ooo_engine_id)
    181             out_BYPASS_MEMORY_OOO_ENGINE_ID [i] = interface->set_signal_out <Tcontext_t        > ("ooo_engine_id", _param->_size_ooo_engine_id);
    182             out_BYPASS_MEMORY_NUM_REG       [i] = interface->set_signal_out <Tgeneral_address_t> ("num_reg"      , _param->_size_general_register);
    183             out_BYPASS_MEMORY_DATA          [i] = interface->set_signal_out <Tgeneral_data_t   > ("data"         , _param->_size_general_data);
    184           }
    185       }
    186     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     131      ALLOC1_VALACK_OUT(out_BYPASS_MEMORY_VAL           ,VAL);
     132      ALLOC1_SIGNAL_OUT(out_BYPASS_MEMORY_OOO_ENGINE_ID ,"ooo_engine_id",Tcontext_t        , _param->_size_ooo_engine_id   );
     133      ALLOC1_SIGNAL_OUT(out_BYPASS_MEMORY_NUM_REG       ,"num_reg"      ,Tgeneral_address_t, _param->_size_general_register);
     134      ALLOC1_SIGNAL_OUT(out_BYPASS_MEMORY_DATA          ,"data"         ,Tgeneral_data_t   , _param->_size_general_data    );
     135    }
     136
     137    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     138
     139//     internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ = new Tlsq_ptr_t [_param->_nb_cache_port];
     140
     141//     internal_MEMORY_IN_ACK           = new Tcontrol_t      [_param->_nb_inst_memory];
     142//     internal_MEMORY_OUT_VAL          = new Tcontrol_t      [_param->_nb_inst_memory];
     143//     internal_MEMORY_OUT_SELECT_QUEUE = new Tselect_queue_t [_param->_nb_inst_memory];
     144//     internal_MEMORY_OUT_PTR          = new Tlsq_ptr_t      [_param->_nb_inst_memory];
     145   
     146//     internal_DCACHE_RSP_ACK          = new Tcontrol_t      [_param->_nb_cache_port];
     147//     internal_DCACHE_REQ_VAL          = new Tcontrol_t      [_param->_nb_cache_port];
     148//     internal_DCACHE_REQ_SELECT_QUEUE = new Tselect_queue_t [_param->_nb_cache_port];
     149
     150    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    187151
    188152#ifdef POSITION
    189     _component->generate_file();
     153    if (usage_is_set(_usage,USE_POSITION))
     154      _component->generate_file();
    190155#endif
    191156
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_deallocation.cpp

    r81 r88  
    66 * $Id$
    77 *
    8  * [ Description ]
     8 * [ Description ]
    99 *
    1010 */
    1111
    1212#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/include/Load_store_unit.h"
     13#include "Behavioural/include/Allocation.h"
    1314
    1415namespace morpheo                    {
     
    2829    log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
    2930
     31    if (usage_is_set(_usage,USE_SYSTEMC))
     32      {
    3033//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    3134    delete    in_CLOCK ;
     
    3336    delete    in_NRESET;
    3437
    35     delete     in_MEMORY_IN_VAL         ;
    36     delete    out_MEMORY_IN_ACK         ;
    37     if (_param->_have_port_context_id)
    38     delete     in_MEMORY_IN_CONTEXT_ID  ;
    39     if (_param->_have_port_front_end_id)
    40     delete     in_MEMORY_IN_FRONT_END_ID  ;
    41     if (_param->_have_port_ooo_engine_id)
    42     delete     in_MEMORY_IN_OOO_ENGINE_ID  ;
    43     if (_param->_have_port_packet_id)
    44     delete     in_MEMORY_IN_PACKET_ID   ;
    45     delete     in_MEMORY_IN_OPERATION   ;
    46     delete     in_MEMORY_IN_TYPE        ;
    47     delete     in_MEMORY_IN_STORE_QUEUE_PTR_WRITE;
    48     if (_param->_have_port_load_queue_ptr)
    49     delete     in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ;
    50     delete     in_MEMORY_IN_HAS_IMMEDIAT;
    51     delete     in_MEMORY_IN_IMMEDIAT    ;
    52     delete     in_MEMORY_IN_DATA_RA     ;
    53     delete     in_MEMORY_IN_DATA_RB     ;
    54     delete     in_MEMORY_IN_DATA_RC     ;
    55     delete     in_MEMORY_IN_WRITE_RD    ;
    56     delete     in_MEMORY_IN_NUM_REG_RD  ;
    57     delete     in_MEMORY_IN_WRITE_RE    ;
    58     delete     in_MEMORY_IN_NUM_REG_RE  ;
     38    DELETE1_SIGNAL( in_MEMORY_IN_VAL                  ,_param->_nb_inst_memory,1);
     39    DELETE1_SIGNAL(out_MEMORY_IN_ACK                  ,_param->_nb_inst_memory,1);
     40    DELETE1_SIGNAL( in_MEMORY_IN_CONTEXT_ID           ,_param->_nb_inst_memory,_param->_size_context_id           );
     41    DELETE1_SIGNAL( in_MEMORY_IN_FRONT_END_ID         ,_param->_nb_inst_memory,_param->_size_front_end_id         );
     42    DELETE1_SIGNAL( in_MEMORY_IN_OOO_ENGINE_ID        ,_param->_nb_inst_memory,_param->_size_ooo_engine_id        );
     43    DELETE1_SIGNAL( in_MEMORY_IN_PACKET_ID            ,_param->_nb_inst_memory,_param->_size_rob_ptr              );
     44    DELETE1_SIGNAL( in_MEMORY_IN_OPERATION            ,_param->_nb_inst_memory,_param->_size_operation            );
     45    DELETE1_SIGNAL( in_MEMORY_IN_TYPE                 ,_param->_nb_inst_memory,_param->_size_type                 );
     46    DELETE1_SIGNAL( in_MEMORY_IN_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_memory,_param->_size_store_queue_ptr      );
     47    DELETE1_SIGNAL( in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_memory,_param->_size_load_queue_ptr       );
     48    DELETE1_SIGNAL( in_MEMORY_IN_HAS_IMMEDIAT         ,_param->_nb_inst_memory,1                                  );
     49    DELETE1_SIGNAL( in_MEMORY_IN_IMMEDIAT             ,_param->_nb_inst_memory,_param->_size_general_data         );
     50    DELETE1_SIGNAL( in_MEMORY_IN_DATA_RA              ,_param->_nb_inst_memory,_param->_size_general_data         );
     51    DELETE1_SIGNAL( in_MEMORY_IN_DATA_RB              ,_param->_nb_inst_memory,_param->_size_general_data         );
     52    DELETE1_SIGNAL( in_MEMORY_IN_DATA_RC              ,_param->_nb_inst_memory,_param->_size_special_data         );
     53    DELETE1_SIGNAL( in_MEMORY_IN_WRITE_RD             ,_param->_nb_inst_memory,1                                  );
     54    DELETE1_SIGNAL( in_MEMORY_IN_NUM_REG_RD           ,_param->_nb_inst_memory,1                                  );
     55    DELETE1_SIGNAL( in_MEMORY_IN_WRITE_RE             ,_param->_nb_inst_memory,1                                  );
     56    DELETE1_SIGNAL( in_MEMORY_IN_NUM_REG_RE           ,_param->_nb_inst_memory,1                                  );
     57
     58    DELETE1_SIGNAL(out_MEMORY_OUT_VAL          ,_param->_nb_inst_memory,1);
     59    DELETE1_SIGNAL( in_MEMORY_OUT_ACK          ,_param->_nb_inst_memory,1);
     60    DELETE1_SIGNAL(out_MEMORY_OUT_CONTEXT_ID   ,_param->_nb_inst_memory,_param->_size_context_id       );
     61    DELETE1_SIGNAL(out_MEMORY_OUT_FRONT_END_ID ,_param->_nb_inst_memory,_param->_size_front_end_id     );
     62    DELETE1_SIGNAL(out_MEMORY_OUT_OOO_ENGINE_ID,_param->_nb_inst_memory,_param->_size_ooo_engine_id    );
     63    DELETE1_SIGNAL(out_MEMORY_OUT_PACKET_ID    ,_param->_nb_inst_memory,_param->_size_rob_ptr          );
     64//  DELETE1_SIGNAL(out_MEMORY_OUT_OPERATION    ,_param->_nb_inst_memory,_param->_size_operation        );
     65    DELETE1_SIGNAL(out_MEMORY_OUT_TYPE         ,_param->_nb_inst_memory,_param->_size_type             );
     66    DELETE1_SIGNAL(out_MEMORY_OUT_WRITE_RD     ,_param->_nb_inst_memory,1                              );
     67    DELETE1_SIGNAL(out_MEMORY_OUT_NUM_REG_RD   ,_param->_nb_inst_memory,_param->_size_general_register );
     68    DELETE1_SIGNAL(out_MEMORY_OUT_DATA_RD      ,_param->_nb_inst_memory,_param->_size_general_data     );
     69    DELETE1_SIGNAL(out_MEMORY_OUT_WRITE_RE     ,_param->_nb_inst_memory,1                              );
     70    DELETE1_SIGNAL(out_MEMORY_OUT_NUM_REG_RE   ,_param->_nb_inst_memory,_param->_size_general_register );
     71    DELETE1_SIGNAL(out_MEMORY_OUT_DATA_RE      ,_param->_nb_inst_memory,_param->_size_general_data     );
     72    DELETE1_SIGNAL(out_MEMORY_OUT_EXCEPTION    ,_param->_nb_inst_memory,_param->_size_exception        );
     73    DELETE1_SIGNAL(out_MEMORY_OUT_NO_SEQUENCE  ,_param->_nb_inst_memory,1                              );
     74    DELETE1_SIGNAL(out_MEMORY_OUT_ADDRESS      ,_param->_nb_inst_memory,_param->_size_general_data     );
     75
     76    DELETE1_SIGNAL(out_DCACHE_REQ_VAL        ,_param->_nb_cache_port,1);
     77    DELETE1_SIGNAL( in_DCACHE_REQ_ACK        ,_param->_nb_cache_port,1);
     78    DELETE1_SIGNAL(out_DCACHE_REQ_CONTEXT_ID ,_param->_nb_cache_port,_param->_size_dcache_context_id  );
     79    DELETE1_SIGNAL(out_DCACHE_REQ_PACKET_ID  ,_param->_nb_cache_port,_param->_size_dcache_packet_id   );
     80    DELETE1_SIGNAL(out_DCACHE_REQ_ADDRESS    ,_param->_nb_cache_port,_param->_size_general_data);
     81    DELETE1_SIGNAL(out_DCACHE_REQ_TYPE       ,_param->_nb_cache_port,_param->_size_dcache_type );
     82    DELETE1_SIGNAL(out_DCACHE_REQ_WDATA      ,_param->_nb_cache_port,_param->_size_general_data);
     83
     84    DELETE1_SIGNAL( in_DCACHE_RSP_VAL        ,_param->_nb_cache_port,1);
     85    DELETE1_SIGNAL(out_DCACHE_RSP_ACK        ,_param->_nb_cache_port,1);
     86    DELETE1_SIGNAL( in_DCACHE_RSP_CONTEXT_ID ,_param->_nb_cache_port,_param->_size_dcache_context_id  );
     87    DELETE1_SIGNAL( in_DCACHE_RSP_PACKET_ID  ,_param->_nb_cache_port,_param->_size_dcache_packet_id   );
     88    DELETE1_SIGNAL( in_DCACHE_RSP_RDATA      ,_param->_nb_cache_port,_param->_size_general_data);
     89    DELETE1_SIGNAL( in_DCACHE_RSP_ERROR      ,_param->_nb_cache_port,_param->_size_dcache_error);
     90
     91    DELETE1_SIGNAL(out_BYPASS_MEMORY_VAL           ,_param->_nb_bypass_memory,1);
     92    DELETE1_SIGNAL(out_BYPASS_MEMORY_OOO_ENGINE_ID ,_param->_nb_bypass_memory,_param->_size_ooo_engine_id   );
     93    DELETE1_SIGNAL(out_BYPASS_MEMORY_NUM_REG       ,_param->_nb_bypass_memory,_param->_size_general_register);
     94    DELETE1_SIGNAL(out_BYPASS_MEMORY_DATA          ,_param->_nb_bypass_memory,_param->_size_general_data    );
     95
     96    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5997   
    60     delete    out_MEMORY_OUT_VAL       ;
    61     delete     in_MEMORY_OUT_ACK       ;
    62     if (_param->_have_port_context_id)
    63     delete    out_MEMORY_OUT_CONTEXT_ID;
    64     if (_param->_have_port_front_end_id)
    65     delete    out_MEMORY_OUT_FRONT_END_ID;
    66     if (_param->_have_port_ooo_engine_id)
    67       delete    out_MEMORY_OUT_OOO_ENGINE_ID;
    68     if (_param->_have_port_packet_id)
    69     delete    out_MEMORY_OUT_PACKET_ID ;
    70 //  delete    out_MEMORY_OUT_OPERATION ;
    71     delete    out_MEMORY_OUT_TYPE      ;
    72     delete    out_MEMORY_OUT_WRITE_RD  ;
    73     delete    out_MEMORY_OUT_NUM_REG_RD;
    74     delete    out_MEMORY_OUT_DATA_RD   ;
    75     delete    out_MEMORY_OUT_WRITE_RE  ;
    76     delete    out_MEMORY_OUT_NUM_REG_RE;
    77     delete    out_MEMORY_OUT_DATA_RE   ;
    78     delete    out_MEMORY_OUT_EXCEPTION ;
    79     delete    out_MEMORY_OUT_NO_SEQUENCE;
    80     delete    out_MEMORY_OUT_ADDRESS   ;
     98//     delete [] internal_MEMORY_IN_ACK          ;
     99//     delete [] internal_MEMORY_OUT_VAL         ;
     100//     delete [] internal_MEMORY_OUT_SELECT_QUEUE;
     101//     delete [] internal_MEMORY_OUT_PTR         ;
    81102   
    82     delete    out_DCACHE_REQ_VAL       ;
    83     delete     in_DCACHE_REQ_ACK       ;
    84     if (_param->_have_port_dcache_context_id)
    85     delete    out_DCACHE_REQ_CONTEXT_ID;
    86     delete    out_DCACHE_REQ_PACKET_ID ;
    87     delete    out_DCACHE_REQ_ADDRESS   ;
    88     delete    out_DCACHE_REQ_TYPE      ;
    89     delete    out_DCACHE_REQ_WDATA     ;
    90    
    91     delete     in_DCACHE_RSP_VAL       ;
    92     delete    out_DCACHE_RSP_ACK       ;
    93     if (_param->_have_port_dcache_context_id)
    94     delete     in_DCACHE_RSP_CONTEXT_ID;
    95     delete     in_DCACHE_RSP_PACKET_ID ;
    96     delete     in_DCACHE_RSP_RDATA     ;
    97     delete     in_DCACHE_RSP_ERROR     ;
    98    
    99     delete [] out_BYPASS_MEMORY_VAL       ;
    100     if (_param->_have_port_ooo_engine_id)   
    101     delete [] out_BYPASS_MEMORY_OOO_ENGINE_ID;
    102     delete [] out_BYPASS_MEMORY_NUM_REG   ;
    103     delete [] out_BYPASS_MEMORY_DATA      ;
    104     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     103//     delete [] internal_DCACHE_RSP_ACK         ;
     104//     delete [] internal_DCACHE_REQ_VAL         ;
     105//     delete [] internal_DCACHE_REQ_SELECT_QUEUE;
     106
     107//     delete [] internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ;
     108      }
     109
     110    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    105111
    106112    delete    _component;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_end_cycle.cpp

    r81 r88  
    2626
    2727#ifdef STATISTICS
    28     _stat->end_cycle();
     28    if (usage_is_set(_usage,USE_STATISTICS))
     29      _stat->end_cycle();
    2930#endif   
    3031
     
    3233    // Evaluation before read the ouput signal
    3334//  sc_start(0);
    34     _interfaces->testbench();
     35    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     36      _interfaces->testbench();
    3537#endif
    3638
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_genMealy_insert.cpp

    r81 r88  
    2727
    2828    // ~~~~~[ Output "memory_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     29   
     30    // Initialisation
     31    internal_MEMORY_IN_PORT = 0;
     32    Tcontrol_t ack [_param->_nb_inst_memory];
     33    for (uint32_t i=0; i<_param->_nb_inst_memory; i++)
     34      ack [i] = 0;
    2935
     36    // find first valid entry
    3037    // store queue is never full (pointer is manage by rename stage)
    31     internal_MEMORY_IN_ACK = is_operation_memory_store(PORT_READ(in_MEMORY_IN_OPERATION)) or not _speculative_access_queue_control->full();
     38    for (uint32_t i=0; i<_param->_nb_inst_memory; i++)
     39      if (PORT_READ(in_MEMORY_IN_VAL [i]))
     40        {
     41          internal_MEMORY_IN_ACK = is_operation_memory_store(PORT_READ(in_MEMORY_IN_OPERATION [i])) or not _speculative_access_queue_control->full();
    3242
    33     PORT_WRITE(out_MEMORY_IN_ACK, internal_MEMORY_IN_ACK);
     43          if (internal_MEMORY_IN_ACK)
     44            {
     45              ack [i] = 1;
     46              internal_MEMORY_IN_PORT = i;
     47              break; // end
     48            }
     49        }
     50
     51    for (uint32_t i=0; i<_param->_nb_inst_memory; i++)
     52      PORT_WRITE(out_MEMORY_IN_ACK [i], ack [i]);
    3453
    3554    log_printf(FUNC,Load_store_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_genMoore.cpp

    r81 r88  
    44 * $Id$
    55 *
    6  * [ Description ]
     6 * [ Description ]
    77 *
    88 */
     
    2626    log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
    2727
    28     // ~~~~~[ Interface "memory_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     28    // ~~~~~[ Interface "memory_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2929
    3030    Tcontext_t         memory_out_context_id    = 0;
     
    110110      }
    111111    // write output
    112     PORT_WRITE(out_MEMORY_OUT_VAL          , internal_MEMORY_OUT_VAL);
     112    PORT_WRITE(out_MEMORY_OUT_VAL          [0], internal_MEMORY_OUT_VAL);
    113113
    114114    if (_param->_have_port_context_id)
    115     PORT_WRITE(out_MEMORY_OUT_CONTEXT_ID   , memory_out_context_id   );
     115    PORT_WRITE(out_MEMORY_OUT_CONTEXT_ID   [0], memory_out_context_id   );
    116116    if (_param->_have_port_front_end_id)
    117     PORT_WRITE(out_MEMORY_OUT_FRONT_END_ID , memory_out_front_end_id );
     117    PORT_WRITE(out_MEMORY_OUT_FRONT_END_ID [0], memory_out_front_end_id );
    118118    if (_param->_have_port_ooo_engine_id)
    119     PORT_WRITE(out_MEMORY_OUT_OOO_ENGINE_ID, memory_out_ooo_engine_id);
    120     if (_param->_have_port_packet_id)
    121     PORT_WRITE(out_MEMORY_OUT_PACKET_ID    , memory_out_packet_id    );
    122 //  PORT_WRITE(out_MEMORY_OUT_OPERATION    , memory_out_operation    );
    123     PORT_WRITE(out_MEMORY_OUT_TYPE         , TYPE_MEMORY             );
    124     PORT_WRITE(out_MEMORY_OUT_WRITE_RD     , memory_out_write_rd     );
    125     PORT_WRITE(out_MEMORY_OUT_NUM_REG_RD   , memory_out_num_reg_rd   );
    126     PORT_WRITE(out_MEMORY_OUT_DATA_RD      , memory_out_data_rd      );
    127 //  PORT_WRITE(out_MEMORY_OUT_WRITE_RE     , memory_out_write_re     );
    128 //  PORT_WRITE(out_MEMORY_OUT_NUM_REG_RE   , memory_out_num_reg_re   );
    129 //  PORT_WRITE(out_MEMORY_OUT_DATA_RE      , memory_out_data_re      );
    130     PORT_WRITE(out_MEMORY_OUT_WRITE_RE     , 0);
    131     PORT_WRITE(out_MEMORY_OUT_NUM_REG_RE   , 0);
    132     PORT_WRITE(out_MEMORY_OUT_DATA_RE      , 0);
    133     PORT_WRITE(out_MEMORY_OUT_EXCEPTION    , memory_out_exception    );
    134     PORT_WRITE(out_MEMORY_OUT_NO_SEQUENCE  , 0);
    135     PORT_WRITE(out_MEMORY_OUT_ADDRESS      , 0);
    136     // ~~~~~[ Interface "dache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     119    PORT_WRITE(out_MEMORY_OUT_OOO_ENGINE_ID[0], memory_out_ooo_engine_id);
     120    if (_param->_have_port_rob_ptr)
     121    PORT_WRITE(out_MEMORY_OUT_PACKET_ID    [0], memory_out_packet_id    );
     122//  PORT_WRITE(out_MEMORY_OUT_OPERATION    [0], memory_out_operation    );
     123    PORT_WRITE(out_MEMORY_OUT_TYPE         [0], TYPE_MEMORY             );
     124    PORT_WRITE(out_MEMORY_OUT_WRITE_RD     [0], memory_out_write_rd     );
     125    PORT_WRITE(out_MEMORY_OUT_NUM_REG_RD   [0], memory_out_num_reg_rd   );
     126    PORT_WRITE(out_MEMORY_OUT_DATA_RD      [0], memory_out_data_rd      );
     127//  PORT_WRITE(out_MEMORY_OUT_WRITE_RE     [0], memory_out_write_re     );
     128//  PORT_WRITE(out_MEMORY_OUT_NUM_REG_RE   [0], memory_out_num_reg_re   );
     129//  PORT_WRITE(out_MEMORY_OUT_DATA_RE      [0], memory_out_data_re      );
     130    PORT_WRITE(out_MEMORY_OUT_WRITE_RE     [0], 0);
     131    PORT_WRITE(out_MEMORY_OUT_NUM_REG_RE   [0], 0);
     132    PORT_WRITE(out_MEMORY_OUT_DATA_RE      [0], 0);
     133    PORT_WRITE(out_MEMORY_OUT_EXCEPTION    [0], memory_out_exception    );
     134    PORT_WRITE(out_MEMORY_OUT_NO_SEQUENCE  [0], 0);
     135    PORT_WRITE(out_MEMORY_OUT_ADDRESS      [0], 0);
     136
     137    // ~~~~~[ Interface "dache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    137138
    138139    Tcontext_t        dcache_req_context_id;
     
    201202      }
    202203
    203     PORT_WRITE(out_DCACHE_REQ_VAL       , internal_DCACHE_REQ_VAL);
     204    PORT_WRITE(out_DCACHE_REQ_VAL       [0], internal_DCACHE_REQ_VAL);
    204205    if (_param->_have_port_dcache_context_id)
    205     PORT_WRITE(out_DCACHE_REQ_CONTEXT_ID, dcache_req_context_id);
    206     PORT_WRITE(out_DCACHE_REQ_PACKET_ID , dcache_req_packet_id );
    207     PORT_WRITE(out_DCACHE_REQ_ADDRESS   , dcache_req_address   );
    208     PORT_WRITE(out_DCACHE_REQ_TYPE      , dcache_req_type      );
    209     PORT_WRITE(out_DCACHE_REQ_WDATA     , dcache_req_wdata     );
     206    PORT_WRITE(out_DCACHE_REQ_CONTEXT_ID[0], dcache_req_context_id);
     207    PORT_WRITE(out_DCACHE_REQ_PACKET_ID [0], dcache_req_packet_id );
     208    PORT_WRITE(out_DCACHE_REQ_ADDRESS   [0], dcache_req_address   );
     209    PORT_WRITE(out_DCACHE_REQ_TYPE      [0], dcache_req_type      );
     210    PORT_WRITE(out_DCACHE_REQ_WDATA     [0], dcache_req_wdata     );
    210211   
    211212    log_printf(FUNC,Load_store_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_transition.cpp

    r81 r88  
    255255        // Interface "MEMORY_IN"
    256256        //================================================================
    257 
    258         if ((PORT_READ(in_MEMORY_IN_VAL) == 1) and
     257       
     258        if ((PORT_READ(in_MEMORY_IN_VAL [internal_MEMORY_IN_PORT]) == 1) and
    259259            (    internal_MEMORY_IN_ACK  == 1))
    260260          {
     
    266266
    267267#ifdef DEBUG_TEST
    268             if (PORT_READ(in_MEMORY_IN_TYPE) != TYPE_MEMORY)
     268            if (PORT_READ(in_MEMORY_IN_TYPE [internal_MEMORY_IN_PORT]) != TYPE_MEMORY)
    269269              throw ERRORMORPHEO(FUNCTION,"The type is different at 'TYPE_MEMORY'");
    270270#endif
    271             Toperation_t    operation            = PORT_READ(in_MEMORY_IN_OPERATION);
    272             Tgeneral_data_t address              = (PORT_READ(in_MEMORY_IN_IMMEDIAT) +
    273                                                     PORT_READ(in_MEMORY_IN_DATA_RA ));
     271            Toperation_t    operation            = PORT_READ(in_MEMORY_IN_OPERATION[internal_MEMORY_IN_PORT]);
     272            Tgeneral_data_t address              = (PORT_READ(in_MEMORY_IN_IMMEDIAT[internal_MEMORY_IN_PORT]) +
     273                                                    PORT_READ(in_MEMORY_IN_DATA_RA [internal_MEMORY_IN_PORT]));
    274274            bool            exception_alignement = (mask_memory_access(operation) & address) != 0;
    275275                                                   
     
    287287               
    288288                // Write pointer is define in rename stage :
    289                 Tlsq_ptr_t           index         = PORT_READ(in_MEMORY_IN_STORE_QUEUE_PTR_WRITE);
     289                Tlsq_ptr_t           index         = PORT_READ(in_MEMORY_IN_STORE_QUEUE_PTR_WRITE[internal_MEMORY_IN_PORT]);
    290290                log_printf(TRACE,Load_store_unit,FUNCTION,"   * index         : %d",index);
    291291               
     
    375375                    log_printf(TRACE,Load_store_unit,FUNCTION,"   * Update information");
    376376
    377                     _store_queue [index]._context_id           = (not _param->_have_port_context_id   )?0:PORT_READ(in_MEMORY_IN_CONTEXT_ID);
    378                     _store_queue [index]._front_end_id         = (not _param->_have_port_front_end_id )?0:PORT_READ(in_MEMORY_IN_FRONT_END_ID);
    379                     _store_queue [index]._ooo_engine_id        = (not _param->_have_port_ooo_engine_id)?0:PORT_READ(in_MEMORY_IN_OOO_ENGINE_ID);
    380                     _store_queue [index]._packet_id            = (not _param->_have_port_packet_id    )?0:PORT_READ(in_MEMORY_IN_PACKET_ID   );
     377                    _store_queue [index]._context_id           = (not _param->_have_port_context_id   )?0:PORT_READ(in_MEMORY_IN_CONTEXT_ID   [internal_MEMORY_IN_PORT]);
     378                    _store_queue [index]._front_end_id         = (not _param->_have_port_front_end_id )?0:PORT_READ(in_MEMORY_IN_FRONT_END_ID [internal_MEMORY_IN_PORT]);
     379                    _store_queue [index]._ooo_engine_id        = (not _param->_have_port_ooo_engine_id)?0:PORT_READ(in_MEMORY_IN_OOO_ENGINE_ID[internal_MEMORY_IN_PORT]);
     380                    _store_queue [index]._packet_id            = (not _param->_have_port_rob_ptr      )?0:PORT_READ(in_MEMORY_IN_PACKET_ID    [internal_MEMORY_IN_PORT]);
    381381                    _store_queue [index]._operation            = operation;
    382                     _store_queue [index]._load_queue_ptr_write = (not _param->_have_port_load_queue_ptr)?0:PORT_READ(in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE);
     382                    _store_queue [index]._load_queue_ptr_write = (not _param->_have_port_load_queue_ptr)?0:PORT_READ(in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE[internal_MEMORY_IN_PORT]);
    383383                    _store_queue [index]._address              = address;
    384384
    385385                    // reordering data
    386                     _store_queue [index]._wdata                = duplicate<Tgeneral_data_t>(_param->_size_general_data,PORT_READ(in_MEMORY_IN_DATA_RB), memory_size(operation), 0);
    387 //                  _store_queue [index]._num_reg_rd           = PORT_READ(in_MEMORY_IN_NUM_REG_RD  );
     386                    _store_queue [index]._wdata                = duplicate<Tgeneral_data_t>(_param->_size_general_data,PORT_READ(in_MEMORY_IN_DATA_RB[internal_MEMORY_IN_PORT]), memory_size(operation), 0);
     387//                  _store_queue [index]._num_reg_rd           = PORT_READ(in_MEMORY_IN_NUM_REG_RD  [internal_MEMORY_IN_PORT]);
    388388                  }
    389389              }
     
    413413                // NOTE : type "other" (lock, invalidate, flush and sync) can't make an alignement exception (access is equivalent at a 8 bits)
    414414                _speculative_access_queue [index]._state                = (exception == EXCEPTION_MEMORY_NONE)?SPECULATIVE_ACCESS_QUEUE_WAIT_CACHE:SPECULATIVE_ACCESS_QUEUE_WAIT_LOAD_QUEUE;
    415                 _speculative_access_queue [index]._context_id           = (not _param->_have_port_context_id   )?0:PORT_READ(in_MEMORY_IN_CONTEXT_ID);
    416                 _speculative_access_queue [index]._front_end_id         = (not _param->_have_port_front_end_id )?0:PORT_READ(in_MEMORY_IN_FRONT_END_ID);
    417                 _speculative_access_queue [index]._ooo_engine_id        = (not _param->_have_port_ooo_engine_id)?0:PORT_READ(in_MEMORY_IN_OOO_ENGINE_ID);
    418                 _speculative_access_queue [index]._packet_id            = (not _param->_have_port_packet_id    )?0:PORT_READ(in_MEMORY_IN_PACKET_ID);
     415                _speculative_access_queue [index]._context_id           = (not _param->_have_port_context_id   )?0:PORT_READ(in_MEMORY_IN_CONTEXT_ID   [internal_MEMORY_IN_PORT]);
     416                _speculative_access_queue [index]._front_end_id         = (not _param->_have_port_front_end_id )?0:PORT_READ(in_MEMORY_IN_FRONT_END_ID [internal_MEMORY_IN_PORT]);
     417                _speculative_access_queue [index]._ooo_engine_id        = (not _param->_have_port_ooo_engine_id)?0:PORT_READ(in_MEMORY_IN_OOO_ENGINE_ID[internal_MEMORY_IN_PORT]);
     418                _speculative_access_queue [index]._packet_id            = (not _param->_have_port_rob_ptr      )?0:PORT_READ(in_MEMORY_IN_PACKET_ID    [internal_MEMORY_IN_PORT]);
    419419
    420420                _speculative_access_queue [index]._operation            = operation;
    421                 _speculative_access_queue [index]._load_queue_ptr_write = (not _param->_have_port_load_queue_ptr)?0:PORT_READ(in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE);
    422                 _speculative_access_queue [index]._store_queue_ptr_write= PORT_READ(in_MEMORY_IN_STORE_QUEUE_PTR_WRITE);
     421                _speculative_access_queue [index]._load_queue_ptr_write = (not _param->_have_port_load_queue_ptr)?0:PORT_READ(in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE[internal_MEMORY_IN_PORT]);
     422                _speculative_access_queue [index]._store_queue_ptr_write= PORT_READ(in_MEMORY_IN_STORE_QUEUE_PTR_WRITE[internal_MEMORY_IN_PORT]);
    423423                _speculative_access_queue [index]._address              = address;
    424424                // NOTE : is operation is a load, then they are a result and must write in the register file
    425425                _speculative_access_queue [index]._write_rd             = is_operation_memory_load(operation);
    426                 _speculative_access_queue [index]._num_reg_rd           = PORT_READ(in_MEMORY_IN_NUM_REG_RD  );
     426                _speculative_access_queue [index]._num_reg_rd           = PORT_READ(in_MEMORY_IN_NUM_REG_RD  [internal_MEMORY_IN_PORT]);
    427427
    428428                _speculative_access_queue [index]._exception            = exception;
     
    437437
    438438        if ((    internal_MEMORY_OUT_VAL  == 1) and
    439             (PORT_READ(in_MEMORY_OUT_ACK) == 1))
     439            (PORT_READ(in_MEMORY_OUT_ACK[0]) == 1))
    440440          {
    441441            log_printf(TRACE,Load_store_unit,FUNCTION,"MEMORY_OUT transaction");
     
    495495
    496496        if ((    internal_DCACHE_REQ_VAL  == 1) and
    497             (PORT_READ(in_DCACHE_REQ_ACK) == 1))
     497            (PORT_READ(in_DCACHE_REQ_ACK[0]) == 1))
    498498          {
    499499            log_printf(TRACE,Load_store_unit,FUNCTION,"DCACHE_REQ");
     
    598598        // Interface "DCACHE_RSP"
    599599        //================================================================
    600         if ((PORT_READ(in_DCACHE_RSP_VAL)== 1) and
     600        if ((PORT_READ(in_DCACHE_RSP_VAL[0])== 1) and
    601601            (    internal_DCACHE_RSP_ACK == 1))
    602602          {
     
    604604
    605605            // don't use context_id : because there are one queue for all thread
    606             //Tcontext_t      context_id = PORT_READ(in_DCACHE_RSP_CONTEXT_ID);
    607             Tpacket_t       packet_id  = PORT_READ(in_DCACHE_RSP_PACKET_ID );
    608             Tdcache_data_t  rdata      = PORT_READ(in_DCACHE_RSP_RDATA     );
    609             Tdcache_error_t error      = PORT_READ(in_DCACHE_RSP_ERROR     );
     606            //Tcontext_t      context_id = PORT_READ(in_DCACHE_RSP_CONTEXT_ID[0]);
     607            Tpacket_t       packet_id  = PORT_READ(in_DCACHE_RSP_PACKET_ID [0]);
     608            Tdcache_data_t  rdata      = PORT_READ(in_DCACHE_RSP_RDATA     [0]);
     609            Tdcache_error_t error      = PORT_READ(in_DCACHE_RSP_ERROR     [0]);
    610610
    611611            log_printf(TRACE,Load_store_unit,FUNCTION," * original packet_id : %d", packet_id);
     
    662662       
    663663       
    664 #if DEBUG>=DEBUG_TRACE
     664#if defined(DEBUG) and (DEBUG>=DEBUG_TRACE)
    665665        // ***** dump store queue
    666666        std::cout << "Dump STORE_QUEUE :" << std::endl
     
    694694                 << _load_queue[j] << std::endl;
    695695          }
    696        
    697696#endif
    698697       
    699698#ifdef STATISTICS
    700         for (uint32_t i=0; i<_param->_size_store_queue; i++)
    701           if (_store_queue[i]._state != STORE_QUEUE_EMPTY)
    702             (*_stat_use_store_queue) ++;
    703         for (uint32_t i=0; i<_param->_size_speculative_access_queue; i++)
    704           if (_speculative_access_queue[i]._state != SPECULATIVE_ACCESS_QUEUE_EMPTY)
    705             (*_stat_use_speculative_access_queue) ++;
    706         for (uint32_t i=0; i<_param->_size_load_queue; i++)
    707           if (_load_queue[i]._state != LOAD_QUEUE_EMPTY)
    708             (*_stat_use_load_queue) ++;
     699        if (usage_is_set(_usage,USE_STATISTICS))
     700          {
     701            for (uint32_t i=0; i<_param->_size_store_queue; i++)
     702              if (_store_queue[i]._state != STORE_QUEUE_EMPTY)
     703                (*_stat_use_store_queue) ++;
     704            for (uint32_t i=0; i<_param->_size_speculative_access_queue; i++)
     705              if (_speculative_access_queue[i]._state != SPECULATIVE_ACCESS_QUEUE_EMPTY)
     706                (*_stat_use_speculative_access_queue) ++;
     707            for (uint32_t i=0; i<_param->_size_load_queue; i++)
     708              if (_load_queue[i]._state != LOAD_QUEUE_EMPTY)
     709                (*_stat_use_load_queue) ++;
     710          }
    709711#endif
    710712      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Parameters.cpp

    r81 r88  
    2626                          Tspeculative_load_t speculative_load       ,
    2727                          uint32_t            nb_bypass_memory       ,
     28                          uint32_t            nb_cache_port          ,
     29                          uint32_t            nb_inst_memory         ,
    2830                          uint32_t            nb_context             ,
    2931                          uint32_t            nb_front_end           ,
     
    3335                          uint32_t            size_special_data      ,
    3436                          uint32_t            nb_general_register    ,
    35                           uint32_t            nb_special_register    ):
    36     _size_store_queue        (size_store_queue       ),
    37     _size_load_queue         (size_load_queue        ),
    38     _size_speculative_access_queue (size_speculative_access_queue),
    39     _nb_port_check           (nb_port_check          ),
    40     _speculative_load        (speculative_load       ),
    41     _nb_bypass_memory        (nb_bypass_memory       ),
    42     _nb_context              (nb_context             ),
    43     _nb_front_end            (nb_front_end           ),
    44     _nb_ooo_engine           (nb_ooo_engine          ),
    45     _nb_packet               (nb_packet              ),
    46     _size_general_data       (size_general_data      ),
    47     _size_special_data       (size_special_data      ),
    48     _nb_general_register     (nb_general_register    ),
    49     _nb_special_register     (nb_special_register    ),
    50    
    51     _size_address_store_queue              (log2(size_store_queue             )),
    52     _size_address_load_queue               (log2(size_load_queue              )),
    53     _size_address_speculative_access_queue (log2(size_speculative_access_queue)),
    54 
    55     _size_context_id         (log2(nb_context         )),
    56     _size_front_end_id       (log2(nb_front_end       )),
    57     _size_ooo_engine_id      (log2(nb_ooo_engine      )),
    58     _size_packet_id          (log2(nb_packet          )),
    59     _size_general_register   (log2(nb_general_register)),
    60     _size_special_register   (log2(nb_special_register)),
    61     _size_dcache_context_id  (_size_context_id + _size_front_end_id + _size_ooo_engine_id),
    62     _size_dcache_packet_id   ((log2((size_store_queue>size_load_queue)?size_store_queue:size_load_queue))+1),
    63 
    64     _have_port_context_id        (_size_context_id   >0),
    65     _have_port_front_end_id      (_size_front_end_id >0),
    66     _have_port_ooo_engine_id     (_size_ooo_engine_id>0),
    67     _have_port_packet_id         (_size_packet_id    >0),
    68     _have_port_dcache_context_id (_size_dcache_context_id>0),
    69     _have_port_load_queue_ptr    (_size_load_queue>1),
    70 
    71     _mask_address_lsb            (gen_mask<Tdcache_address_t>(log2(size_general_data/8))),
    72     _mask_address_msb            (gen_mask<Tdcache_address_t>(size_general_data) << log2(size_general_data/8))
     37                          uint32_t            nb_special_register    ,
     38                          bool                is_toplevel)
    7339  {
    7440    log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
     41
     42    _size_store_queue                      = size_store_queue       ;
     43    _size_load_queue                       = size_load_queue        ;
     44    _size_speculative_access_queue         = size_speculative_access_queue;
     45    _nb_port_check                         = nb_port_check          ;
     46    _speculative_load                      = speculative_load       ;
     47    _nb_bypass_memory                      = nb_bypass_memory       ;
     48    _nb_cache_port                         = nb_cache_port          ;
     49    _nb_inst_memory                        = nb_inst_memory         ;
     50    _nb_context                            = nb_context             ;
     51    _nb_front_end                          = nb_front_end           ;
     52    _nb_ooo_engine                         = nb_ooo_engine          ;
     53    _nb_packet                             = nb_packet              ;
     54    _nb_general_register                   = nb_general_register    ;
     55    _nb_special_register                   = nb_special_register    ;
     56   
     57    _size_speculative_access_queue_ptr     = log2(size_speculative_access_queue);
     58
     59    _size_dcache_context_id                = log2(nb_context) + log2(nb_front_end) + log2(nb_ooo_engine);
     60    _size_dcache_packet_id                 = (log2((size_store_queue>size_load_queue)?size_store_queue:size_load_queue))+1;
     61
     62    _have_port_dcache_context_id           = _size_dcache_context_id>0;
     63
     64    _mask_address_lsb                      = gen_mask<Tdcache_address_t>(log2(size_general_data/8));
     65    _mask_address_msb                      = gen_mask<Tdcache_address_t>(size_general_data) << log2(size_general_data/8);
     66
    7567    test();
     68
     69    if (is_toplevel)
     70      {
     71        _size_context_id                       = log2(nb_context         );
     72        _size_front_end_id                     = log2(nb_front_end       );
     73        _size_ooo_engine_id                    = log2(nb_ooo_engine      );
     74        _size_rob_ptr                          = log2(nb_packet          );
     75        _size_general_register                 = log2(nb_general_register);
     76        _size_special_register                 = log2(nb_special_register);
     77        _size_store_queue_ptr                  = log2(size_store_queue   );
     78        _size_load_queue_ptr                   = log2(size_load_queue    );
     79        _size_general_data                     = size_general_data      ;
     80        _size_special_data                     = size_special_data      ;
     81
     82        _have_port_context_id                  = _size_context_id    >0;
     83        _have_port_front_end_id                = _size_front_end_id  >0;
     84        _have_port_ooo_engine_id               = _size_ooo_engine_id >0;
     85        _have_port_rob_ptr                     = _size_rob_ptr       >0;
     86        _have_port_load_queue_ptr              = _size_load_queue_ptr>0;
     87
     88        copy();
     89      }
     90
    7691    log_printf(FUNC,Load_store_unit,FUNCTION,"End");
    7792  };
    7893 
     94// #undef  FUNCTION
     95// #define FUNCTION "Load_store_unit::Parameters (copy)"
     96//   Parameters::Parameters (Parameters & param):
     97//     _size_store_queue        (param._size_store_queue       ),
     98//     _size_load_queue         (param._size_load_queue        ),
     99//     _size_speculative_access_queue (param._size_speculative_access_queue),
     100//     _nb_port_check           (param._nb_port_check          ),
     101//     _speculative_load        (param._speculative_load       ),
     102//     _nb_bypass_memory        (param._nb_bypass_memory       ),
     103//     _nb_cache_port           (param._nb_cache_port          ),
     104//     _nb_inst_memory          (param._nb_inst_memory         ),
     105//     _nb_context              (param._nb_context             ),
     106//     _nb_front_end            (param._nb_front_end           ),
     107//     _nb_ooo_engine           (param._nb_ooo_engine          ),
     108//     _nb_packet               (param._nb_packet              ),
     109//     _size_general_data       (param._size_general_data      ),
     110//     _size_special_data       (param._size_special_data      ),
     111//     _nb_general_register     (param._nb_general_register    ),
     112//     _nb_special_register     (param._nb_special_register    ),
     113
     114//     _size_address_store_queue              (param._size_address_store_queue             ),
     115//     _size_address_load_queue               (param._size_address_load_queue              ),
     116//     _size_address_speculative_access_queue (param._size_address_speculative_access_queue),
     117
     118//     _size_context_id         (param._size_context_id        ),
     119//     _size_front_end_id       (param._size_front_end_id      ),
     120//     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
     121//     _size_packet_id          (param._size_packet_id         ),
     122//     _size_general_register   (param._size_general_register  ),
     123//     _size_special_register   (param._size_special_register  ),
     124//     _size_dcache_context_id  (param._size_dcache_context_id ),
     125//     _size_dcache_packet_id   (param._size_dcache_packet_id  ),
     126
     127//     _have_port_context_id    (param._have_port_context_id   ),
     128//     _have_port_front_end_id  (param._have_port_front_end_id ),
     129//     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
     130//     _have_port_packet_id     (param._have_port_packet_id    ),
     131//     _have_port_dcache_context_id(param._have_port_dcache_context_id),
     132//     _have_port_load_queue_ptr(param._have_port_load_queue_ptr),
     133
     134//     _mask_address_lsb        (param._mask_address_lsb),
     135//     _mask_address_msb        (param._mask_address_msb)
     136//   {
     137//     log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
     138//     test();
     139//     log_printf(FUNC,Load_store_unit,FUNCTION,"End");
     140//   };
     141
    79142#undef  FUNCTION
    80 #define FUNCTION "Load_store_unit::Parameters (copy)"
    81   Parameters::Parameters (Parameters & param):
    82     _size_store_queue        (param._size_store_queue       ),
    83     _size_load_queue         (param._size_load_queue        ),
    84     _size_speculative_access_queue (param._size_speculative_access_queue),
    85     _nb_port_check           (param._nb_port_check          ),
    86     _speculative_load        (param._speculative_load       ),
    87     _nb_bypass_memory        (param._nb_bypass_memory       ),
    88     _nb_context              (param._nb_context             ),
    89     _nb_front_end            (param._nb_front_end           ),
    90     _nb_ooo_engine           (param._nb_ooo_engine          ),
    91     _nb_packet               (param._nb_packet              ),
    92     _size_general_data       (param._size_general_data      ),
    93     _size_special_data       (param._size_special_data      ),
    94     _nb_general_register     (param._nb_general_register    ),
    95     _nb_special_register     (param._nb_special_register    ),
    96 
    97     _size_address_store_queue              (param._size_address_store_queue             ),
    98     _size_address_load_queue               (param._size_address_load_queue              ),
    99     _size_address_speculative_access_queue (param._size_address_speculative_access_queue),
    100 
    101     _size_context_id         (param._size_context_id        ),
    102     _size_front_end_id       (param._size_front_end_id      ),
    103     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
    104     _size_packet_id          (param._size_packet_id         ),
    105     _size_general_register   (param._size_general_register  ),
    106     _size_special_register   (param._size_special_register  ),
    107     _size_dcache_context_id  (param._size_dcache_context_id ),
    108     _size_dcache_packet_id   (param._size_dcache_packet_id  ),
    109 
    110     _have_port_context_id    (param._have_port_context_id   ),
    111     _have_port_front_end_id  (param._have_port_front_end_id ),
    112     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
    113     _have_port_packet_id     (param._have_port_packet_id    ),
    114     _have_port_dcache_context_id(param._have_port_dcache_context_id),
    115     _have_port_load_queue_ptr(param._have_port_load_queue_ptr),
    116 
    117     _mask_address_lsb        (param._mask_address_lsb),
    118     _mask_address_msb        (param._mask_address_msb)
     143#define FUNCTION "Load_store_unit::~Parameters"
     144  Parameters::~Parameters (void)
    119145  {
    120146    log_printf(FUNC,Load_store_unit,FUNCTION,"Begin");
    121     test();
    122147    log_printf(FUNC,Load_store_unit,FUNCTION,"End");
    123148  };
    124149
    125150#undef  FUNCTION
    126 #define FUNCTION "Load_store_unit::~Parameters"
    127   Parameters::~Parameters ()
     151#define FUNCTION "Load_store_unit::copy"
     152  void Parameters::copy (void)
    128153  {
    129154    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/Parameters_msg_error.cpp

    r81 r88  
    3232        {
    3333          if (not (_nb_bypass_memory == 0))
    34             test.error("Bypass memory is not supported. Please wait a next revision.");
     34            test.error(_("Bypass memory is not supported. Please wait a next revision.\n"));
    3535 
    3636          break;
     
    4242        {
    4343          if (not (_nb_bypass_memory == 0))
    44             test.error("In the load scheme '"+toString(_speculative_load)+"', they have none bypass.");
     44            test.error(toString(_("In the load scheme '%s', they have none bypass.\n"),toString(_speculative_load).c_str()));
    4545
    46           test.error("Speculative load scheme '"+toString(_speculative_load)+"' is not supported. Please wait a next revision.");
     46          test.error(toString(_("Speculative load scheme '%s' is not supported. Please wait a next revision.\n"),toString(_speculative_load).c_str()));
    4747          break;
    4848        }
     
    5050
    5151    if (not (_size_store_queue >= 2))
    52       test.error("Store queue must have at less two slot.");
     52      test.error(_("Store queue must have at less two slot.\n"));
    5353
    5454    if (not (_nb_bypass_memory <= _size_load_queue))
    55       test.error("Bypass number must be less than load_queue's size.");
     55      test.error(_("Bypass number must be less than load_queue's size.\n"));
     56
     57    if (_nb_cache_port > 1)
     58      test.warning(_("nb_cache_port > 1 is unsupported (Coming Soon).\n"));
     59
     60    if (_nb_inst_memory > 1)
     61      test.warning(_("nb_inst_memory > 1 is unsupported (Coming Soon).\n"));
    5662
    5763    log_printf(FUNC,Load_store_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Read_queue_library_clean
    2525
     26local_clean                     :
     27
    2628include                         ../Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/include/test.h

    r81 r88  
    1616
    1717#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Read_queue.h"
     18#include "Common/include/Time.h"
    1819
    1920using namespace std;
     
    3031              morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters * param);
    3132
    32 class Time
    33 {
    34 private : timeval time_begin;
    35 // private : timeval time_end;
    36  
    37 public  : Time ()
    38   {
    39     gettimeofday(&time_begin     ,NULL);
    40   };
    41 
    42 public  : ~Time ()
    43   {
    44     cout << *this;
    45   };
    46 
    47 public  : friend ostream& operator<< (ostream& output_stream,
    48                                       const Time & x)
    49   {
    50     timeval time_end;
    51    
    52     gettimeofday(&time_end       ,NULL);
    53    
    54     uint32_t nb_cycles = static_cast<uint32_t>(sc_simulation_time());
    55 
    56     double average = static_cast<double>(nb_cycles) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec);
    57    
    58     output_stream << nb_cycles << "\t(" << average << " cycles / seconds )" << endl;
    59 
    60     return output_stream;
    61   }
    62 };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/src/main.cpp

    r81 r88  
    7777         ,size_store_queue
    7878         ,size_load_queue
     79         ,true //is_toplevel
    7980          );
    8081     
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/SelfTest/src/test.cpp

    r82 r88  
    2323#endif
    2424
     25  Tusage_t _usage = USE_ALL;
     26
     27//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     28//   _usage = usage_unset(_usage,USE_VHDL                 );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     31//   _usage = usage_unset(_usage,USE_POSITION             );
     32//   _usage = usage_unset(_usage,USE_STATISTICS           );
     33//   _usage = usage_unset(_usage,USE_INFORMATION          );
     34
    2535  Read_queue * _Read_queue = new Read_queue (name.c_str(),
    2636#ifdef STATISTICS
     
    2838#endif
    2939                                             _param,
    30                                              USE_ALL);
     40                                             _usage);
    3141 
    3242#ifdef SYSTEMC
     
    200210  if(_param->_have_port_ooo_engine_id)
    201211    (*(_Read_queue-> in_READ_QUEUE_IN_OOO_ENGINE_ID  )) (*(READ_QUEUE_IN_OOO_ENGINE_ID  ));
    202   if(_param->_have_port_rob_id       )
     212  if(_param->_have_port_rob_ptr       )
    203213    (*(_Read_queue-> in_READ_QUEUE_IN_ROB_ID         )) (*(READ_QUEUE_IN_ROB_ID         ));
    204214  (*(_Read_queue-> in_READ_QUEUE_IN_OPERATION      )) (*(READ_QUEUE_IN_OPERATION      ));
     
    228238  if(_param->_have_port_ooo_engine_id)
    229239    (*(_Read_queue->out_READ_QUEUE_OUT_OOO_ENGINE_ID )) (*(READ_QUEUE_OUT_OOO_ENGINE_ID ));
    230   if(_param->_have_port_rob_id       )
     240  if(_param->_have_port_rob_ptr       )
    231241    (*(_Read_queue->out_READ_QUEUE_OUT_ROB_ID        )) (*(READ_QUEUE_OUT_ROB_ID        ));
    232242  (*(_Read_queue->out_READ_QUEUE_OUT_OPERATION     )) (*(READ_QUEUE_OUT_OPERATION     ));
     
    388398              if(_param->_have_port_front_end_id )
    389399                READ_QUEUE_IN_FRONT_END_ID   ->write((3*_ooo_engine_id [request_in])%_param->_nb_front_end);
    390               if(_param->_have_port_rob_id       )
     400              if(_param->_have_port_rob_ptr       )
    391401                READ_QUEUE_IN_ROB_ID      ->write(request_in);
    392402              READ_QUEUE_IN_OPERATION   ->write(0);
     
    504514            {
    505515              Tpacket_t  rob_id;
    506               if(_param->_have_port_rob_id       )
     516              if(_param->_have_port_rob_ptr       )
    507517                rob_id = READ_QUEUE_OUT_ROB_ID->read();
    508518              else
     
    551561  TEST_OK ("End of Simulation");
    552562  delete _time;
     563
    553564  cout << "<" << name << "> ............ Stop Simulation" << endl;
    554565
     
    564575   if(_param->_have_port_ooo_engine_id )
    565576     delete    READ_QUEUE_IN_OOO_ENGINE_ID;
    566    if(_param->_have_port_rob_id       )
     577   if(_param->_have_port_rob_ptr       )
    567578     delete    READ_QUEUE_IN_ROB_ID    ;
    568579   delete    READ_QUEUE_IN_OPERATION    ;
     
    592603   if(_param->_have_port_ooo_engine_id )
    593604     delete    READ_QUEUE_OUT_OOO_ENGINE_ID;
    594    if(_param->_have_port_rob_id       )
     605   if(_param->_have_port_rob_ptr       )
    595606     delete    READ_QUEUE_OUT_ROB_ID      ;
    596607   delete    READ_QUEUE_OUT_OPERATION   ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Parameters.h

    r81 r88  
    2828  {
    2929    //-----[ fields ]------------------------------------------------------------
    30   public : const uint32_t    _size_queue           ;
    31   public : const uint32_t    _nb_context           ;
    32   public : const uint32_t    _nb_front_end         ;
    33   public : const uint32_t    _nb_ooo_engine        ;
    34   public : const uint32_t    _nb_packet            ;
    35   public : const uint32_t    _size_general_data    ;
    36   public : const uint32_t    _size_special_data    ;
    37   public : const uint32_t    _nb_general_register  ;
    38   public : const uint32_t    _nb_special_register  ;
    39   public : const uint32_t    _nb_gpr_write         ;
    40   public : const uint32_t    _nb_spr_write         ;
    41   public : const uint32_t    _size_store_queue     ;
    42   public : const uint32_t    _size_load_queue      ;
     30  public : uint32_t    _size_queue           ;
     31  public : uint32_t    _nb_context           ;
     32  public : uint32_t    _nb_front_end         ;
     33  public : uint32_t    _nb_ooo_engine        ;
     34  public : uint32_t    _nb_packet            ;
     35//public : uint32_t    _size_general_data    ;
     36//public : uint32_t    _size_special_data    ;
     37  public : uint32_t    _nb_general_register  ;
     38  public : uint32_t    _nb_special_register  ;
     39  public : uint32_t    _nb_gpr_write         ;
     40  public : uint32_t    _nb_spr_write         ;
     41//public : uint32_t    _size_store_queue     ;
     42//public : uint32_t    _size_load_queue      ;
    4343
    44   public : const uint32_t    _nb_gpr_read          ;
    45   public : const uint32_t    _nb_spr_read          ;   
    46   public : const uint32_t    _size_context_id      ;
    47   public : const uint32_t    _size_front_end_id    ;
    48   public : const uint32_t    _size_ooo_engine_id   ;
    49   public : const uint32_t    _size_rob_id          ;
    50   public : const uint32_t    _size_general_register;
    51   public : const uint32_t    _size_special_register;
     44  public : uint32_t    _nb_gpr_read          ;
     45  public : uint32_t    _nb_spr_read          ;   
     46//public : uint32_t    _size_context_id      ;
     47//public : uint32_t    _size_front_end_id    ;
     48//public : uint32_t    _size_ooo_engine_id   ;
     49//public : uint32_t    _size_rob_id          ;
     50//public : uint32_t    _size_general_register;
     51//public : uint32_t    _size_special_register;
    5252
    53   public : const bool        _have_port_context_id   ;
    54   public : const bool        _have_port_front_end_id ;
    55   public : const bool        _have_port_ooo_engine_id;
    56   public : const bool        _have_port_rob_id       ;
    57   public : const bool        _have_port_load_queue_ptr;
     53//public : bool        _have_port_context_id   ;
     54//public : bool        _have_port_front_end_id ;
     55//public : bool        _have_port_ooo_engine_id;
     56//public : bool        _have_port_rob_id       ;
     57//public : bool        _have_port_load_queue_ptr;
    5858
    59   public : const uint32_t    _size_internal_queue;
     59  public : uint32_t    _size_internal_queue;
    6060
    6161    //-----[ methods ]-----------------------------------------------------------
     
    7272                        uint32_t nb_spr_write       ,
    7373                        uint32_t size_store_queue   ,
    74                         uint32_t size_load_queue    );
     74                        uint32_t size_load_queue    ,
     75                        bool     is_toplevel=false  );
    7576
    76   public : Parameters  (Parameters & param) ;
    77   public : ~Parameters () ;
     77//public : Parameters  (Parameters & param) ;
     78  public : ~Parameters (void) ;
     79
     80  public : void                 copy      (void);
    7881
    7982  public : Parameters_test      msg_error (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/include/Read_queue.h

    r82 r88  
    1414
    1515#include <iostream>
    16 #include <queue>
     16#include <list>
    1717#include "Common/include/ToString.h"
    1818#include "Common/include/Debug.h"
     
    154154    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    155155  protected : Tread_queue_head_entry_t       * _queue_head;
    156   protected : std::queue<Tread_queue_entry_t *>   * _queue;
     156  protected : std::list<Tread_queue_entry_t *>   * _queue;
    157157
    158158    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Parameters.cpp

    r81 r88  
    3030                          uint32_t nb_spr_write       ,
    3131                          uint32_t size_store_queue   ,
    32                           uint32_t size_load_queue    ):
    33     _size_queue            (size_queue           ),
    34     _nb_context            (nb_context           ),
    35     _nb_front_end          (nb_front_end         ),
    36     _nb_ooo_engine         (nb_ooo_engine        ),
    37     _nb_packet             (nb_packet            ),
    38     _size_general_data     (size_general_data    ),
    39     _size_special_data     (size_special_data    ),
    40     _nb_general_register   (nb_general_register  ),
    41     _nb_special_register   (nb_special_register  ),
    42     _nb_gpr_write          (nb_gpr_write         ),
    43     _nb_spr_write          (nb_spr_write         ),
    44     _size_store_queue      (size_store_queue     ),
    45     _size_load_queue       (size_load_queue      ),
    46 
    47     _nb_gpr_read           (2                    ),
    48     _nb_spr_read           (1                    ),
    49     _size_context_id       (static_cast<uint32_t>(log2(_nb_context         ))),
    50     _size_front_end_id     (static_cast<uint32_t>(log2(_nb_front_end       ))),
    51     _size_ooo_engine_id    (static_cast<uint32_t>(log2(_nb_ooo_engine      ))),
    52     _size_rob_id           (static_cast<uint32_t>(log2(_nb_packet          ))),
    53     _size_general_register (static_cast<uint32_t>(log2(_nb_general_register))),
    54     _size_special_register (static_cast<uint32_t>(log2(_nb_special_register))),
    55 
    56     _have_port_context_id    (_size_context_id    > 0),
    57     _have_port_front_end_id  (_size_front_end_id  > 0),
    58     _have_port_ooo_engine_id (_size_ooo_engine_id > 0),
    59     _have_port_rob_id        (_size_rob_id        > 0),
    60     _have_port_load_queue_ptr(_size_load_queue    > 1),
    61 
    62     _size_internal_queue     (  _size_context_id       //_context_id   
    63                               + _size_front_end_id     //_front_end_id
    64                               + _size_ooo_engine_id    //_ooo_engine_id
    65                               + _size_rob_id           //_rob_id       
    66                               + _size_operation        //_operation   
    67                               + _size_type             //_type         
    68                               + log2(_size_store_queue)//_store_queue_ptr_write
    69                               + log2(_size_load_queue )//_load_queue_ptr_write
    70                               + 1                      //_has_immediat
    71                               + _size_general_data     //_immediat     
    72                               + 1                      //_read_ra     
    73                               + _size_general_register //_num_reg_ra   
    74                               + 1                      //_read_rb     
    75                               + _size_general_register //_num_reg_rb   
    76                               + 1                      //_read_rc     
    77                               + _size_special_register //_num_reg_rc   
    78                               + 1                      //_write_rd     
    79                               + _size_general_register //_num_reg_rd   
    80                               + 1                      //_write_re     
    81                               + _size_special_register //_num_reg_re   
    82                                 )
    83                                
    84 
     32                          uint32_t size_load_queue    ,
     33                          bool     is_toplevel)
    8534  {
    8635    log_printf(FUNC,Read_queue,"Parameters","Begin");
     36
     37    _size_queue              = size_queue           ;
     38    _nb_context              = nb_context           ;
     39    _nb_front_end            = nb_front_end         ;
     40    _nb_ooo_engine           = nb_ooo_engine        ;
     41    _nb_packet               = nb_packet            ;
     42    _nb_general_register     = nb_general_register  ;
     43    _nb_special_register     = nb_special_register  ;
     44    _nb_gpr_write            = nb_gpr_write         ;
     45    _nb_spr_write            = nb_spr_write         ;
     46                             
     47    _nb_gpr_read             = 2                    ;
     48    _nb_spr_read             = 1                    ;
     49
     50    _size_internal_queue     = (  log2(nb_context         ) //_context_id   
     51                                + log2(nb_front_end       ) //_front_end_id
     52                                + log2(nb_ooo_engine      ) //_ooo_engine_id
     53                                + log2(nb_packet          ) //_rob_id       
     54                                + _size_operation           //_operation   
     55                                + _size_type                //_type         
     56                                + log2(size_store_queue   ) //_store_queue_ptr_write
     57                                + log2(size_load_queue    ) //_load_queue_ptr_write
     58                                + 1                         //_has_immediat
     59                                +  size_general_data        //_immediat     
     60                                + 1                         //_read_ra     
     61                                + log2(nb_general_register) //_num_reg_ra   
     62                                + 1                         //_read_rb     
     63                                + log2(nb_general_register) //_num_reg_rb   
     64                                + 1                         //_read_rc     
     65                                + log2(nb_special_register) //_num_reg_rc   
     66                                + 1                         //_write_rd     
     67                                + log2(nb_general_register) //_num_reg_rd   
     68                                + 1                         //_write_re     
     69                                + log2(nb_special_register) //_num_reg_re   
     70                                );
     71
    8772    test();
     73
     74    if (is_toplevel)
     75      {
     76        _size_general_data       = size_general_data    ;
     77        _size_special_data       = size_special_data    ;
     78        _size_store_queue_ptr    = log2(size_store_queue);
     79        _size_load_queue_ptr     = log2(size_load_queue );
     80        _size_context_id         = log2(_nb_context         );
     81        _size_front_end_id       = log2(_nb_front_end       );
     82        _size_ooo_engine_id      = log2(_nb_ooo_engine      );
     83        _size_rob_ptr            = log2(_nb_packet          );
     84        _size_general_register   = log2(_nb_general_register);
     85        _size_special_register   = log2(_nb_special_register);
     86       
     87        _have_port_context_id    = _size_context_id    > 0;
     88        _have_port_front_end_id  = _size_front_end_id  > 0;
     89        _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
     90        _have_port_rob_ptr       = _size_rob_ptr       > 0;
     91        _have_port_load_queue_ptr= _size_load_queue_ptr> 0;
     92       
     93        copy();
     94      }
     95
    8896    log_printf(FUNC,Read_queue,"Parameters","End");
    8997  };
    9098 
    91   Parameters::Parameters (Parameters & param):
    92     _size_queue            (param._size_queue            ),
    93     _nb_context            (param._nb_context            ),
    94     _nb_front_end          (param._nb_front_end          ),
    95     _nb_ooo_engine         (param._nb_ooo_engine         ),
    96     _nb_packet             (param._nb_packet             ),
    97     _size_general_data     (param._size_general_data     ),
    98     _size_special_data     (param._size_special_data     ),
    99     _nb_general_register   (param._nb_general_register   ),
    100     _nb_special_register   (param._nb_special_register   ),
    101     _nb_gpr_write          (param._nb_gpr_write          ),
    102     _nb_spr_write          (param._nb_spr_write          ),
    103     _size_store_queue      (param._size_store_queue      ),
    104     _size_load_queue       (param._size_load_queue       ),
     99//   Parameters::Parameters (Parameters & param):
     100//     _size_queue            (param._size_queue            ),
     101//     _nb_context            (param._nb_context            ),
     102//     _nb_front_end          (param._nb_front_end          ),
     103//     _nb_ooo_engine         (param._nb_ooo_engine         ),
     104//     _nb_packet             (param._nb_packet             ),
     105//     _size_general_data     (param._size_general_data     ),
     106//     _size_special_data     (param._size_special_data     ),
     107//     _nb_general_register   (param._nb_general_register   ),
     108//     _nb_special_register   (param._nb_special_register   ),
     109//     _nb_gpr_write          (param._nb_gpr_write          ),
     110//     _nb_spr_write          (param._nb_spr_write          ),
     111//     _size_store_queue      (param._size_store_queue      ),
     112//     _size_load_queue       (param._size_load_queue       ),
    105113
    106     _nb_gpr_read           (param._nb_gpr_read           ),
    107     _nb_spr_read           (param._nb_spr_read           ),
    108     _size_context_id       (param._size_context_id       ),
    109     _size_front_end_id     (param._size_front_end_id     ),
    110     _size_ooo_engine_id    (param._size_ooo_engine_id    ),
    111     _size_rob_id           (param._size_rob_id           ),
    112     _size_general_register (param._size_general_register ),
    113     _size_special_register (param._size_special_register ),
     114//     _nb_gpr_read           (param._nb_gpr_read           ),
     115//     _nb_spr_read           (param._nb_spr_read           ),
     116//     _size_context_id       (param._size_context_id       ),
     117//     _size_front_end_id     (param._size_front_end_id     ),
     118//     _size_ooo_engine_id    (param._size_ooo_engine_id    ),
     119//     _size_rob_id           (param._size_rob_id           ),
     120//     _size_general_register (param._size_general_register ),
     121//     _size_special_register (param._size_special_register ),
    114122
    115     _have_port_context_id    (param._have_port_context_id   ),
    116     _have_port_front_end_id  (param._have_port_front_end_id ),
    117     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
    118     _have_port_rob_id        (param._have_port_rob_id       ),
    119     _have_port_load_queue_ptr(param._have_port_load_queue_ptr),
     123//     _have_port_context_id    (param._have_port_context_id   ),
     124//     _have_port_front_end_id  (param._have_port_front_end_id ),
     125//     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
     126//     _have_port_rob_id        (param._have_port_rob_id       ),
     127//     _have_port_load_queue_ptr(param._have_port_load_queue_ptr),
    120128
    121     _size_internal_queue     (param._size_internal_queue    )
    122   {
    123     log_printf(FUNC,Read_queue,"Parameters (copy)","Begin");
    124     test();
    125     log_printf(FUNC,Read_queue,"Parameters (copy)","End");
    126   };
     129//     _size_internal_queue     (param._size_internal_queue    )
     130//   {
     131//     log_printf(FUNC,Read_queue,"Parameters (copy)","Begin");
     132//     test();
     133//     log_printf(FUNC,Read_queue,"Parameters (copy)","End");
     134//   };
    127135
    128   Parameters::~Parameters ()
     136  Parameters::~Parameters (void)
    129137  {
    130138    log_printf(FUNC,Read_queue,"~Parameters","Begin");
    131139    log_printf(FUNC,Read_queue,"~Parameters","End");
     140  };
     141
     142  void Parameters::copy (void)
     143  {
     144    log_printf(FUNC,Read_queue,"copy","Begin");
     145    log_printf(FUNC,Read_queue,"copy","End");
    132146  };
    133147
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Parameters_print.cpp

    r81 r88  
    3131    xml.singleton_begin("nb_ooo_engine      "); xml.attribut("value",toString(_nb_ooo_engine      )); xml.singleton_end();
    3232    xml.singleton_begin("nb_packet          "); xml.attribut("value",toString(_nb_packet          )); xml.singleton_end();
    33     xml.singleton_begin("size_general_data  "); xml.attribut("value",toString(_size_general_data  )); xml.singleton_end();
    34     xml.singleton_begin("size_special_data  "); xml.attribut("value",toString(_size_special_data  )); xml.singleton_end();
     33//  xml.singleton_begin("size_general_data  "); xml.attribut("value",toString(_size_general_data  )); xml.singleton_end();
     34//  xml.singleton_begin("size_special_data  "); xml.attribut("value",toString(_size_special_data  )); xml.singleton_end();
    3535    xml.singleton_begin("nb_general_register"); xml.attribut("value",toString(_nb_general_register)); xml.singleton_end();
    3636    xml.singleton_begin("nb_special_register"); xml.attribut("value",toString(_nb_special_register)); xml.singleton_end();
    3737    xml.singleton_begin("nb_gpr_write       "); xml.attribut("value",toString(_nb_gpr_write       )); xml.singleton_end();
    3838    xml.singleton_begin("nb_spr_write       "); xml.attribut("value",toString(_nb_spr_write       )); xml.singleton_end();
    39     xml.singleton_begin("size_store_queue   "); xml.attribut("value",toString(_size_store_queue   )); xml.singleton_end();
    40     xml.singleton_begin("size_load_queue    "); xml.attribut("value",toString(_size_load_queue    )); xml.singleton_end();
     39//  xml.singleton_begin("size_store_queue   "); xml.attribut("value",toString(_size_store_queue   )); xml.singleton_end();
     40//  xml.singleton_begin("size_load_queue    "); xml.attribut("value",toString(_size_load_queue    )); xml.singleton_end();
    4141
    4242    xml.balise_close();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue.cpp

    r82 r88  
    3636    log_printf(FUNC,Read_queue,"Read_queue","Begin");
    3737
     38#if DEBUG_Read_queue == true
     39    log_printf(INFO,Read_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
     40
     41    std::cout << *param << std::endl;
     42#endif   
     43
    3844#ifdef SYSTEMC
    3945    log_printf(INFO,Read_queue,"Read_queue","Allocation");
     
    4349
    4450#ifdef STATISTICS
    45     log_printf(INFO,Read_queue,FUNCTION,"Allocation of statistics");
    46    
    47     statistics_declaration(param_statistics);
     51    if (usage_is_set(_usage,USE_STATISTICS))
     52      {
     53        log_printf(INFO,Read_queue,FUNCTION,"Allocation of statistics");
     54       
     55        statistics_declaration(param_statistics);
     56      }
    4857#endif
    4958
    5059#ifdef VHDL
    51     // generate the vhdl
    52     log_printf(INFO,Read_queue,"Read_queue","Generate the vhdl");
    53 
    54     vhdl();
    55 #endif
    56 
    57 #ifdef SYSTEMC
     60    if (usage_is_set(_usage,USE_VHDL))
     61      {
     62        // generate the vhdl
     63        log_printf(INFO,Read_queue,"Read_queue","Generate the vhdl");
     64       
     65        vhdl();
     66      }
     67#endif
     68
     69#ifdef SYSTEMC
     70    if (usage_is_set(_usage,USE_SYSTEMC))
     71      {
    5872    log_printf(INFO,Read_queue,"Read_queue","Method - transition");
    5973
     
    206220      }
    207221#endif   
    208 
     222      }
    209223#endif
    210224    log_printf(FUNC,Read_queue,"Read_queue","End");
     
    216230
    217231#ifdef STATISTICS
    218     log_printf(INFO,Read_queue,"~Read_queue","Generate Statistics file");
    219 
    220     delete _stat;
     232    if (usage_is_set(_usage,USE_STATISTICS))
     233      {
     234        log_printf(INFO,Read_queue,"~Read_queue","Generate Statistics file");
     235       
     236        delete _stat;
     237      }
    221238#endif
    222239
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_allocation.cpp

    r82 r88  
    33 * $Id$
    44 *
    5  * [ Description ]
     5 * [ Description ]
    66 *
    77 */
     
    3434    _interfaces = entity->set_interfaces();
    3535
    36     // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     36    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3737
    3838    {
     
    4848     in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
    4949    }
    50     // ~~~~~[ Interface : "read_queue_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     50    // ~~~~~[ Interface : "read_queue_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5151    {
    5252      Interface_fifo * interface = _interfaces->set_interface("read_queue_in"
     
    6666       if(_param->_have_port_ooo_engine_id)
    6767         in_READ_QUEUE_IN_OOO_ENGINE_ID  = interface->set_signal_in  <Tcontext_t        > ("ooo_engine_id",_param->_size_ooo_engine_id    );
    68       if(_param->_have_port_rob_id      )
    69        in_READ_QUEUE_IN_ROB_ID         = interface->set_signal_in  <Tpacket_t         > ("rob_id"      ,_param->_size_rob_id           );
     68      if(_param->_have_port_rob_ptr      )
     69       in_READ_QUEUE_IN_ROB_ID         = interface->set_signal_in  <Tpacket_t         > ("rob_id"      ,_param->_size_rob_ptr           );
    7070       in_READ_QUEUE_IN_OPERATION      = interface->set_signal_in  <Toperation_t      > ("operation"   ,_param->_size_operation        );
    7171       in_READ_QUEUE_IN_TYPE           = interface->set_signal_in  <Ttype_t           > ("type"        ,_param->_size_type             );
    72        in_READ_QUEUE_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in  <Tlsq_ptr_t> ("store_queue_ptr_write", log2(_param->_size_store_queue));
     72       in_READ_QUEUE_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in  <Tlsq_ptr_t> ("store_queue_ptr_write", _param->_size_store_queue_ptr);
    7373       if (_param->_have_port_load_queue_ptr)
    74        in_READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_in  <Tlsq_ptr_t> ("load_queue_ptr_write" , log2(_param->_size_load_queue ));
     74       in_READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_in  <Tlsq_ptr_t> ("load_queue_ptr_write" , _param->_size_load_queue_ptr);
    7575       in_READ_QUEUE_IN_HAS_IMMEDIAT   = interface->set_signal_in  <Tcontrol_t        > ("has_immediat",1                             );
    7676       in_READ_QUEUE_IN_IMMEDIAT       = interface->set_signal_in  <Tgeneral_data_t   > ("immediat"    ,_param->_size_general_data     );
     
    8787     }
    8888
    89     // ~~~~~[ Interface : "read_queue_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     89    // ~~~~~[ Interface : "read_queue_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    9090    {
    9191      Interface_fifo * interface = _interfaces->set_interface("read_queue_out"
     
    106106      if(_param->_have_port_ooo_engine_id)
    107107        out_READ_QUEUE_OUT_OOO_ENGINE_ID  = interface->set_signal_out <Tcontext_t        > ("ooo_engine_id",_param->_size_ooo_engine_id    );
    108       if(_param->_have_port_rob_id      )
    109         out_READ_QUEUE_OUT_ROB_ID         = interface->set_signal_out <Tpacket_t         > ("rob_id"      ,_param->_size_rob_id           );
     108      if(_param->_have_port_rob_ptr      )
     109        out_READ_QUEUE_OUT_ROB_ID         = interface->set_signal_out <Tpacket_t         > ("rob_id"      ,_param->_size_rob_ptr           );
    110110      out_READ_QUEUE_OUT_OPERATION      = interface->set_signal_out <Toperation_t      > ("operation"   ,_param->_size_operation        );
    111111      out_READ_QUEUE_OUT_TYPE           = interface->set_signal_out <Ttype_t           > ("type"        ,_param->_size_type             );
    112       out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE = interface->set_signal_out <Tlsq_ptr_t> ("store_queue_ptr_write", log2(_param->_size_store_queue));
     112      out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE = interface->set_signal_out <Tlsq_ptr_t> ("store_queue_ptr_write", _param->_size_store_queue_ptr);
    113113      if (_param->_have_port_load_queue_ptr)
    114       out_READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_out <Tlsq_ptr_t> ("load_queue_ptr_write" , log2(_param->_size_load_queue ));
     114      out_READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_out <Tlsq_ptr_t> ("load_queue_ptr_write" , _param->_size_load_queue_ptr);
    115115      out_READ_QUEUE_OUT_HAS_IMMEDIAT   = interface->set_signal_out <Tcontrol_t        > ("has_immediat",1                             );
    116116      out_READ_QUEUE_OUT_IMMEDIAT       = interface->set_signal_out <Tgeneral_data_t   > ("immediat"    ,_param->_size_general_data     );
     
    133133     }
    134134
    135     // ~~~~~[ Interface : "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     135    // ~~~~~[ Interface : "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    136136   
    137137    out_GPR_READ_VAL          = new SC_OUT(Tcontrol_t        ) * [_param->_nb_gpr_read];
     
    162162      }
    163163     
    164     // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     164    // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    165165   
    166166    out_SPR_READ_VAL          = new SC_OUT(Tcontrol_t        ) * [_param->_nb_spr_read];
     
    191191      }
    192192
    193     // ~~~~~[ Interface : "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     193    // ~~~~~[ Interface : "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    194194   
    195195     in_GPR_WRITE_VAL          = new SC_IN (Tcontrol_t        ) * [_param->_nb_gpr_write];
     
    216216      }
    217217
    218     // ~~~~~[ Interface : "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     218    // ~~~~~[ Interface : "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    219219   
    220220     in_SPR_WRITE_VAL          = new SC_IN (Tcontrol_t        ) * [_param->_nb_spr_write];
     
    241241      }
    242242
    243     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    244     _queue      = new std::queue<Tread_queue_entry_t *>;
     243    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     244    _queue      = new std::list<Tread_queue_entry_t *>;
    245245    _queue_head = new Tread_queue_head_entry_t;
    246246
    247247#ifdef POSITION
    248     _component->generate_file();
     248    if (usage_is_set(_usage,USE_POSITION))
     249      _component->generate_file();
    249250#endif
    250251
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_deallocation.cpp

    r81 r88  
    33 * $Id$
    44 *
    5  * [ Description ]
     5 * [ Description ]
    66 *
    77 */
     
    2323    log_printf(FUNC,Read_queue,"deallocation","Begin");
    2424
    25     // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     25    if (usage_is_set(_usage,USE_SYSTEMC))
     26      {
     27    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2628    delete     in_CLOCK ;
    2729    delete     in_NRESET;
    2830
    29     // ~~~~~[ Interface : "read_queue_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     31    // ~~~~~[ Interface : "read_queue_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3032    delete     in_READ_QUEUE_IN_VAL            ;
    3133    delete    out_READ_QUEUE_IN_ACK            ;
     
    3739    if(_param->_have_port_ooo_engine_id)
    3840      delete     in_READ_QUEUE_IN_OOO_ENGINE_ID  ;
    39     if(_param->_have_port_rob_id       )
     41    if(_param->_have_port_rob_ptr       )
    4042      delete     in_READ_QUEUE_IN_ROB_ID         ;
    4143    delete     in_READ_QUEUE_IN_OPERATION      ;
     
    5759    delete     in_READ_QUEUE_IN_NUM_REG_RE     ;
    5860
    59     // ~~~~~[ Interface : "read_queue_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     61    // ~~~~~[ Interface : "read_queue_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    6062    delete    out_READ_QUEUE_OUT_VAL            ;
    6163    delete     in_READ_QUEUE_OUT_ACK            ;
     
    6769    if(_param->_have_port_ooo_engine_id)
    6870      delete    out_READ_QUEUE_OUT_OOO_ENGINE_ID  ;
    69     if(_param->_have_port_rob_id       )
     71    if(_param->_have_port_rob_ptr       )
    7072      delete    out_READ_QUEUE_OUT_ROB_ID         ;
    7173    delete    out_READ_QUEUE_OUT_OPERATION      ;
     
    9395    delete    out_READ_QUEUE_OUT_NUM_REG_RE     ;
    9496
    95     // ~~~~~[ Interface : "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     97    // ~~~~~[ Interface : "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    9698   
    9799    delete [] out_GPR_READ_VAL       ;
     
    103105    delete []  in_GPR_READ_DATA_VAL  ;
    104106
    105     // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     107    // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    106108   
    107109    delete [] out_SPR_READ_VAL       ;
     
    113115    delete []  in_SPR_READ_DATA_VAL  ;
    114116
    115     // ~~~~~[ Interface : "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     117    // ~~~~~[ Interface : "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    116118   
    117119    delete []  in_GPR_WRITE_VAL       ;
     
    121123    delete []  in_GPR_WRITE_DATA      ;
    122124
    123     // ~~~~~[ Interface : "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     125    // ~~~~~[ Interface : "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    124126   
    125127    delete []  in_SPR_WRITE_VAL       ;
     
    128130    delete []  in_SPR_WRITE_NUM_REG   ;
    129131    delete []  in_SPR_WRITE_DATA      ;
     132      }
    130133
    131     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     134    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    132135
    133136    while (_queue->empty() == false)
    134137      {
    135138        delete _queue->front();
    136         _queue->pop();
     139        _queue->pop_front();
    137140      }
    138141    delete _queue;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_end_cycle.cpp

    r81 r88  
    2424
    2525#ifdef STATISTICS
    26     _stat->end_cycle();
     26    if (usage_is_set(_usage,USE_STATISTICS))
     27      _stat->end_cycle();
    2728#endif   
    2829
     
    3031    // Evaluation before read the ouput signal
    3132//  sc_start(0);
    32     _interfaces->testbench();
     33    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     34      _interfaces->testbench();
    3335#endif
    3436
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_genMealy_read_queue_out_gpr.cpp

    r81 r88  
    2222  void Read_queue::genMealy_read_queue_out_gpr (void)
    2323  {
    24     log_printf(FUNC,Read_queue,FUNCTION,"Begin");
     24    log_begin(Read_queue,FUNCTION);
     25    log_function(Read_queue,FUNCTION,_name.c_str());
    2526
    2627    internal_READ_QUEUE_OUT_DATA_RA_VAL = (// Previous value
     
    3233                                           );
    3334
    34     log_printf(TRACE,Read_queue,FUNCTION," * internal_READ_QUEUE_OUT_DATA_RA_VAL   : %d",internal_READ_QUEUE_OUT_DATA_RA_VAL);
    35     log_printf(TRACE,Read_queue,FUNCTION,"   * _queue_head->_data_ra_val           : %d",_queue_head->_data_ra_val);
    36     log_printf(TRACE,Read_queue,FUNCTION,"   * _queue_head->_read_ra_val           : %d",_queue_head->_read_ra_val);
    37     log_printf(TRACE,Read_queue,FUNCTION,"   * in_GPR_READ_ACK      [0]            : %d",PORT_READ(in_GPR_READ_ACK      [0]));
    38     log_printf(TRACE,Read_queue,FUNCTION,"   * in_GPR_READ_DATA_VAL [0]            : %d",PORT_READ(in_GPR_READ_DATA_VAL [0]));
     35    log_printf(TRACE,Read_queue,FUNCTION,"  * internal_READ_QUEUE_OUT_DATA_RA_VAL   : %d",internal_READ_QUEUE_OUT_DATA_RA_VAL);
     36    log_printf(TRACE,Read_queue,FUNCTION,"    * _queue_head->_data_ra_val           : %d",_queue_head->_data_ra_val);
     37    log_printf(TRACE,Read_queue,FUNCTION,"    * _queue_head->_read_ra_val           : %d",_queue_head->_read_ra_val);
     38    log_printf(TRACE,Read_queue,FUNCTION,"    * in_GPR_READ_ACK      [0]            : %d",PORT_READ(in_GPR_READ_ACK      [0]));
     39    log_printf(TRACE,Read_queue,FUNCTION,"    * in_GPR_READ_DATA_VAL [0]            : %d",PORT_READ(in_GPR_READ_DATA_VAL [0]));
    3940
    4041    internal_READ_QUEUE_OUT_DATA_RB_VAL = (_queue_head->_data_rb_val or
     
    4445                                           );
    4546
    46     log_printf(TRACE,Read_queue,FUNCTION," * internal_READ_QUEUE_OUT_DATA_RB_VAL   : %d",internal_READ_QUEUE_OUT_DATA_RB_VAL);
    47     log_printf(TRACE,Read_queue,FUNCTION,"   * _queue_head->_data_rb_val           : %d",_queue_head->_data_rb_val);
    48     log_printf(TRACE,Read_queue,FUNCTION,"   * _queue_head->_read_rb_val           : %d",_queue_head->_read_rb_val);
    49     log_printf(TRACE,Read_queue,FUNCTION,"   * in_GPR_READ_ACK      [1]            : %d",PORT_READ(in_GPR_READ_ACK      [1]));
    50     log_printf(TRACE,Read_queue,FUNCTION,"   * in_GPR_READ_DATA_VAL [1]            : %d",PORT_READ(in_GPR_READ_DATA_VAL [1]));
     47    log_printf(TRACE,Read_queue,FUNCTION,"  * internal_READ_QUEUE_OUT_DATA_RB_VAL   : %d",internal_READ_QUEUE_OUT_DATA_RB_VAL);
     48    log_printf(TRACE,Read_queue,FUNCTION,"    * _queue_head->_data_rb_val           : %d",_queue_head->_data_rb_val);
     49    log_printf(TRACE,Read_queue,FUNCTION,"    * _queue_head->_read_rb_val           : %d",_queue_head->_read_rb_val);
     50    log_printf(TRACE,Read_queue,FUNCTION,"    * in_GPR_READ_ACK      [1]            : %d",PORT_READ(in_GPR_READ_ACK      [1]));
     51    log_printf(TRACE,Read_queue,FUNCTION,"    * in_GPR_READ_DATA_VAL [1]            : %d",PORT_READ(in_GPR_READ_DATA_VAL [1]));
    5152               
    5253   
     
    8081            if (_queue_head->_num_reg_ra == gpr_write_num_reg)
    8182              {
    82                 log_printf(TRACE,Read_queue,FUNCTION," * internal_READ_QUEUE_OUT_DATA_RA_VAL   - bypass hit (%d)",i);
     83                log_printf(TRACE,Read_queue,FUNCTION,"  * internal_READ_QUEUE_OUT_DATA_RA_VAL   - bypass hit (%d)",i);
    8384
    8485                internal_READ_QUEUE_OUT_DATA_RA_VAL = 1;
     
    9091            if (_queue_head->_num_reg_rb == gpr_write_num_reg)
    9192              {
    92                 log_printf(TRACE,Read_queue,FUNCTION," * internal_READ_QUEUE_OUT_DATA_RB_VAL   - bypass hit (%d)",i);
     93                log_printf(TRACE,Read_queue,FUNCTION,"  * internal_READ_QUEUE_OUT_DATA_RB_VAL   - bypass hit (%d)",i);
    9394                internal_READ_QUEUE_OUT_DATA_RB_VAL = 1;
    9495#ifdef SYSTEMC_VHDL_COMPATIBILITY
     
    106107    PORT_WRITE(out_READ_QUEUE_OUT_DATA_RB    ,internal_READ_QUEUE_OUT_DATA_RB    );
    107108
    108     log_printf(FUNC,Read_queue,FUNCTION,"End");
     109    log_end(Read_queue,FUNCTION);
    109110  };
    110111
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_genMealy_read_queue_out_spr.cpp

    r81 r88  
    2222  void Read_queue::genMealy_read_queue_out_spr (void)
    2323  {
    24     log_printf(FUNC,Read_queue,FUNCTION,"Begin");
     24    log_begin(Read_queue,FUNCTION);
     25    log_function(Read_queue,FUNCTION,_name.c_str());
    2526
    2627    internal_READ_QUEUE_OUT_DATA_RC_VAL = (// Previous value
     
    3233                                           );
    3334
    34     log_printf(TRACE,Read_queue,FUNCTION," * internal_READ_QUEUE_OUT_DATA_RC_VAL   : %d",internal_READ_QUEUE_OUT_DATA_RC_VAL);
    35     log_printf(TRACE,Read_queue,FUNCTION,"   * _queue_head->_data_rc_val           : %d",_queue_head->_data_rc_val);
    36     log_printf(TRACE,Read_queue,FUNCTION,"   * _queue_head->_read_rc_val           : %d",_queue_head->_read_rc_val);
    37     log_printf(TRACE,Read_queue,FUNCTION,"   * in_SPR_READ_ACK      [0]            : %d",PORT_READ(in_SPR_READ_ACK      [0]));
    38     log_printf(TRACE,Read_queue,FUNCTION,"   * in_SPR_READ_DATA_VAL [0]            : %d",PORT_READ(in_SPR_READ_DATA_VAL [0]));
     35    log_printf(TRACE,Read_queue,FUNCTION,"  * internal_READ_QUEUE_OUT_DATA_RC_VAL   : %d",internal_READ_QUEUE_OUT_DATA_RC_VAL);
     36    log_printf(TRACE,Read_queue,FUNCTION,"    * _queue_head->_data_rc_val           : %d",_queue_head->_data_rc_val);
     37    log_printf(TRACE,Read_queue,FUNCTION,"    * _queue_head->_read_rc_val           : %d",_queue_head->_read_rc_val);
     38    log_printf(TRACE,Read_queue,FUNCTION,"    * in_SPR_READ_ACK      [0]            : %d",PORT_READ(in_SPR_READ_ACK      [0]));
     39    log_printf(TRACE,Read_queue,FUNCTION,"    * in_SPR_READ_DATA_VAL [0]            : %d",PORT_READ(in_SPR_READ_DATA_VAL [0]));
    3940
    4041    internal_READ_QUEUE_OUT_DATA_RC     = (// Test if have an previous access
     
    6061            if (_queue_head->_num_reg_rc == PORT_READ(in_SPR_WRITE_NUM_REG [i]))
    6162              {
    62                 log_printf(TRACE,Read_queue,FUNCTION," * internal_READ_QUEUE_OUT_DATA_RC_VAL   - bypass hit (%d)",i);
     63                log_printf(TRACE,Read_queue,FUNCTION,"  * internal_READ_QUEUE_OUT_DATA_RC_VAL   - bypass hit (%d)",i);
    6364                internal_READ_QUEUE_OUT_DATA_RC_VAL = 1;
    6465#ifdef SYSTEMC_VHDL_COMPATIBILITY
     
    7475    PORT_WRITE(out_READ_QUEUE_OUT_DATA_RC    ,internal_READ_QUEUE_OUT_DATA_RC    );
    7576
    76     log_printf(FUNC,Read_queue,FUNCTION,"End");
     77    log_end(Read_queue,FUNCTION);
    7778  };
    7879
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_genMealy_read_queue_out_val.cpp

    r81 r88  
    2222  void Read_queue::genMealy_read_queue_out_val (void)
    2323  {
    24     log_printf(FUNC,Read_queue,FUNCTION,"Begin");
     24    log_begin(Read_queue,FUNCTION);
     25    log_function(Read_queue,FUNCTION,_name.c_str());
    2526
    2627    internal_READ_QUEUE_OUT_READ_RA_VAL = (// Previous value
     
    99100    PORT_WRITE(out_READ_QUEUE_OUT_VAL, internal_READ_QUEUE_OUT_VAL);
    100101
    101     log_printf(TRACE,Read_queue,FUNCTION," * internal_READ_QUEUE_OUT_VAL           : %d",internal_READ_QUEUE_OUT_VAL);
    102     log_printf(TRACE,Read_queue,FUNCTION,"   * _queue->empty()                     : %d",_queue->empty());
    103     log_printf(TRACE,Read_queue,FUNCTION,"   * internal_READ_QUEUE_OUT_READ_RA_VAL : %d",internal_READ_QUEUE_OUT_READ_RA_VAL);
    104     log_printf(TRACE,Read_queue,FUNCTION,"     * _queue_head->_read_ra_val         : %d",_queue_head->_read_ra_val);
    105     log_printf(TRACE,Read_queue,FUNCTION,"     * in_GPR_READ_ACK      [0]          : %d",PORT_READ(in_GPR_READ_ACK      [0]));
    106     log_printf(TRACE,Read_queue,FUNCTION,"   * internal_READ_QUEUE_OUT_READ_RB_VAL : %d",internal_READ_QUEUE_OUT_READ_RB_VAL);
    107     log_printf(TRACE,Read_queue,FUNCTION,"     * _queue_head->_read_rb_val         : %d",_queue_head->_read_rb_val);
    108     log_printf(TRACE,Read_queue,FUNCTION,"     * in_GPR_READ_ACK      [1]          : %d",PORT_READ(in_GPR_READ_ACK      [1]));
    109     log_printf(TRACE,Read_queue,FUNCTION,"   * internal_READ_QUEUE_OUT_READ_RC_VAL : %d",internal_READ_QUEUE_OUT_READ_RC_VAL);
    110     log_printf(TRACE,Read_queue,FUNCTION,"     * _queue_head->_read_rc_val         : %d",_queue_head->_read_rc_val);
    111     log_printf(TRACE,Read_queue,FUNCTION,"     * in_SPR_READ_ACK      [0]          : %d",PORT_READ(in_SPR_READ_ACK      [0]));
     102    log_printf(TRACE,Read_queue,FUNCTION,"  * internal_READ_QUEUE_OUT_VAL           : %d",internal_READ_QUEUE_OUT_VAL);
     103    log_printf(TRACE,Read_queue,FUNCTION,"    * _queue->empty()                     : %d",_queue->empty());
     104    log_printf(TRACE,Read_queue,FUNCTION,"    * internal_READ_QUEUE_OUT_READ_RA_VAL : %d",internal_READ_QUEUE_OUT_READ_RA_VAL);
     105    log_printf(TRACE,Read_queue,FUNCTION,"      * _queue_head->_read_ra_val         : %d",_queue_head->_read_ra_val);
     106    log_printf(TRACE,Read_queue,FUNCTION,"      * in_GPR_READ_ACK      [0]          : %d",PORT_READ(in_GPR_READ_ACK      [0]));
     107    log_printf(TRACE,Read_queue,FUNCTION,"    * internal_READ_QUEUE_OUT_READ_RB_VAL : %d",internal_READ_QUEUE_OUT_READ_RB_VAL);
     108    log_printf(TRACE,Read_queue,FUNCTION,"      * _queue_head->_read_rb_val         : %d",_queue_head->_read_rb_val);
     109    log_printf(TRACE,Read_queue,FUNCTION,"      * in_GPR_READ_ACK      [1]          : %d",PORT_READ(in_GPR_READ_ACK      [1]));
     110    log_printf(TRACE,Read_queue,FUNCTION,"    * internal_READ_QUEUE_OUT_READ_RC_VAL : %d",internal_READ_QUEUE_OUT_READ_RC_VAL);
     111    log_printf(TRACE,Read_queue,FUNCTION,"      * _queue_head->_read_rc_val         : %d",_queue_head->_read_rc_val);
     112    log_printf(TRACE,Read_queue,FUNCTION,"      * in_SPR_READ_ACK      [0]          : %d",PORT_READ(in_SPR_READ_ACK      [0]));
    112113
    113     log_printf(FUNC,Read_queue,FUNCTION,"End");
     114    log_end(Read_queue,FUNCTION);
    114115  };
    115116
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_genMoore.cpp

    r81 r88  
    2222  void Read_queue::genMoore (void)
    2323  {
    24     log_printf(FUNC,Read_queue,FUNCTION,"Begin");
     24    log_begin(Read_queue,FUNCTION);
     25    log_function(Read_queue,FUNCTION,_name.c_str());
    2526
    2627    bool not_full  = not (_queue->size() == _param->_size_queue);
     
    3940    if(_param->_have_port_ooo_engine_id)
    4041      PORT_WRITE (out_READ_QUEUE_OUT_OOO_ENGINE_ID, _queue_head->_ooo_engine_id);
    41     if(_param->_have_port_rob_id       )
     42    if(_param->_have_port_rob_ptr      )
    4243      PORT_WRITE (out_READ_QUEUE_OUT_ROB_ID      , _queue_head->_rob_id      );
    4344    PORT_WRITE (out_READ_QUEUE_OUT_OPERATION   , _queue_head->_operation   );
     
    7980    PORT_WRITE (out_SPR_READ_VAL           [0], not_empty and _queue_head->_read_rc_val);
    8081    if(_param->_have_port_ooo_engine_id)
    81       PORT_WRITE (out_SPR_READ_OOO_ENGINE_ID [0],               _queue_head->_ooo_engine_id);
     82    PORT_WRITE (out_SPR_READ_OOO_ENGINE_ID [0],               _queue_head->_ooo_engine_id);
    8283    PORT_WRITE (out_SPR_READ_NUM_REG       [0],               _queue_head->_num_reg_rc);
    8384                   
    84     log_printf(FUNC,Read_queue,FUNCTION,"End");
     85    log_end(Read_queue,FUNCTION);
    8586  };
    8687
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_transition.cpp

    r81 r88  
    2424  void Read_queue::transition (void)
    2525  {
    26     log_printf(FUNC,Read_queue,FUNCTION,"Begin");
     26    log_begin(Read_queue,FUNCTION);
     27    log_function(Read_queue,FUNCTION,_name.c_str());
    2728
    2829    if (PORT_READ(in_NRESET) == 0)
     
    3334        // > 2) flush all slot in one cycle
    3435
    35         while (_queue->empty() == false)
    36           _queue->pop();
     36        _queue->clear();
     37
     38        // Init, else error in registerfile
     39        _queue_head->_ooo_engine_id = 0;
    3740      }
    3841    else
     
    4447//        cout << (*_queue_head) << endl;
    4548
    46         log_printf(TRACE,Read_queue,FUNCTION,"Read_queue size (begin) : %d",_queue->size());
     49        log_printf(TRACE,Read_queue,FUNCTION,"  * Read_queue size (begin) : %d",(int)_queue->size());
    4750        // Write to read_queue
    4851
     
    5154        bool need_new_head = false;
    5255       
    53         log_printf(TRACE,Read_queue,FUNCTION," * test transaction READ_QUEUE_IN  : %d,%d",PORT_READ(in_READ_QUEUE_IN_VAL), not_full);
     56        log_printf(TRACE,Read_queue,FUNCTION,"    * test transaction READ_QUEUE_IN  : %d,%d",PORT_READ(in_READ_QUEUE_IN_VAL), not_full);
    5457        if ((PORT_READ(in_READ_QUEUE_IN_VAL) == 1) and not_full)
    5558          {
     
    6265            if(_param->_have_port_ooo_engine_id)
    6366              entry->_ooo_engine_id= PORT_READ(in_READ_QUEUE_IN_OOO_ENGINE_ID);
    64             if(_param->_have_port_rob_id       )
     67            if(_param->_have_port_rob_ptr      )
    6568              entry->_rob_id       = PORT_READ(in_READ_QUEUE_IN_ROB_ID      );
    6669            entry->_operation    = PORT_READ(in_READ_QUEUE_IN_OPERATION   );
     
    8285            entry->_num_reg_re   = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RE  );
    8386
    84             log_printf(TRACE,Read_queue,FUNCTION,"   * push (id : %d-%d)",entry->_context_id, entry->_rob_id);
    85             _queue->push(entry);
    86 
     87            log_printf(TRACE,Read_queue,FUNCTION,"    * push (id : %d-%d)",entry->_context_id, entry->_rob_id);
     88            _queue->push_back(entry);
    8789
    8890            // read next new head
    8991            if (empty)
    9092              {
    91                 log_printf(TRACE,Read_queue,FUNCTION,"     * queue was    empty");
     93                log_printf(TRACE,Read_queue,FUNCTION,"    * queue was    empty");
    9294                need_new_head = true;
    9395              }
     
    9597
    9698        // Read from read_queue
    97         log_printf(TRACE,Read_queue,FUNCTION," * test transaction READ_QUEUE_OUT : %d,%d",internal_READ_QUEUE_OUT_VAL, PORT_READ(in_READ_QUEUE_OUT_ACK));
     99        log_printf(TRACE,Read_queue,FUNCTION,"  * test transaction READ_QUEUE_OUT : %d,%d",internal_READ_QUEUE_OUT_VAL, PORT_READ(in_READ_QUEUE_OUT_ACK));
    98100        if ((    internal_READ_QUEUE_OUT_VAL  == 1) and
    99101            (PORT_READ(in_READ_QUEUE_OUT_ACK) == 1))
    100102          {
    101103            // Pop the entry
    102             log_printf(TRACE,Read_queue,FUNCTION,"   * pop  (id : %d-%d)",_queue->front()->_context_id, _queue->front()->_rob_id);
    103             _queue->pop();
     104            log_printf(TRACE,Read_queue,FUNCTION,"    * pop  (id : %d-%d)",_queue->front()->_context_id, _queue->front()->_rob_id);
     105            _queue->pop_front();
    104106
    105107            // read next new head
    106108            if (_queue->empty() == false)
    107109              {
    108                 log_printf(TRACE,Read_queue,FUNCTION,"     * queue was not empty");
     110                log_printf(TRACE,Read_queue,FUNCTION,"    * queue was not empty");
    109111                need_new_head = true;
    110112              }
     
    128130        if (need_new_head == true)
    129131          {
    130             log_printf(TRACE,Read_queue,FUNCTION," * new head");
     132            log_printf(TRACE,Read_queue,FUNCTION,"  * new head");
    131133            (*_queue_head) = (*_queue->front());
    132134          }
     
    138140//        cout << (*_queue_head) << endl;
    139141
    140         log_printf(TRACE,Read_queue,FUNCTION,"Read_queue size (end  ) : %d",_queue->size());
     142#if (DEBUG >= DEBUG_TRACE) and (DEBUG_Read_queue == true)
     143        log_printf(TRACE,Read_queue,FUNCTION,"  * Dump Read_queue");
     144        log_printf(TRACE,Read_queue,FUNCTION,"    * size : %d",(int)_queue->size());
     145
     146        if (_queue->size()>0)
     147          {
     148//   protected : Tread_queue_head_entry_t       * _queue_head;
     149//   protected : std::queue<Tread_queue_entry_t *>   * _queue;
     150           
     151            log_printf(TRACE,Read_queue,FUNCTION,"    * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.1d %.1d %.4d %.1d %.8x, %.1d %.1d %.4d %.1d %.8x, %.1d %.1d %.4d %.1d %.2x, %.1d %.4d, %.1d %.4d (%s)",
     152                       0,
     153
     154                       _queue_head->_context_id           ,
     155                       _queue_head->_front_end_id         ,
     156                       _queue_head->_ooo_engine_id        ,
     157                       _queue_head->_rob_id               ,
     158
     159                       _queue_head->_type                 ,
     160                       _queue_head->_operation            ,
     161
     162                       _queue_head->_store_queue_ptr_write,
     163                       _queue_head->_load_queue_ptr_write ,
     164
     165                       _queue_head->_has_immediat         ,
     166                       _queue_head->_immediat             ,
     167
     168                       _queue_head->_read_ra              ,
     169                       _queue_head->_read_ra_val          ,
     170                       _queue_head->_num_reg_ra           ,
     171                       _queue_head->_data_ra_val          ,
     172                       _queue_head->_data_ra              ,
     173
     174                       _queue_head->_read_rb              ,
     175                       _queue_head->_read_rb_val          ,
     176                       _queue_head->_num_reg_rb           ,
     177                       _queue_head->_data_rb_val          ,
     178                       _queue_head->_data_rb              ,
     179
     180                       _queue_head->_read_rc              ,
     181                       _queue_head->_read_rc_val          ,
     182                       _queue_head->_num_reg_rc           ,
     183                       _queue_head->_data_rc_val          ,
     184                       _queue_head->_data_rc              ,
     185
     186                       _queue_head->_write_rd             ,
     187                       _queue_head->_num_reg_rd           ,
     188                       
     189                       _queue_head->_write_re             ,
     190                       _queue_head->_num_reg_re           ,
     191
     192                       toString_type(_queue_head->_type).c_str());
     193
     194
     195            std::list<Tread_queue_entry_t *>::iterator it=_queue->begin();
     196            ++it; // first is already printed
     197            uint32_t i=1;
     198
     199            for (;it!=_queue->end(); ++it)
     200              {
     201                log_printf(TRACE,Read_queue,FUNCTION,"    * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.1d   %.4d           , %.1d   %.4d           , %.1d   %.4d     , %.1d %.4d, %.1d %.4d (%s)",
     202                           i,
     203                           
     204                           (*it)->_context_id           ,
     205                           (*it)->_front_end_id         ,
     206                           (*it)->_ooo_engine_id        ,
     207                           (*it)->_rob_id               ,
     208                           
     209                           (*it)->_type                 ,
     210                           (*it)->_operation            ,
     211                           
     212                           (*it)->_store_queue_ptr_write,
     213                           (*it)->_load_queue_ptr_write ,
     214                           
     215                           (*it)->_has_immediat         ,
     216                           (*it)->_immediat             ,
     217                           
     218                           (*it)->_read_ra              ,
     219//                         (*it)->_read_ra_val          ,
     220                           (*it)->_num_reg_ra           ,
     221//                         (*it)->_data_ra_val          ,
     222//                         (*it)->_data_ra              ,
     223                           
     224                           (*it)->_read_rb              ,
     225//                         (*it)->_read_rb_val          ,
     226                           (*it)->_num_reg_rb           ,
     227//                         (*it)->_data_rb_val          ,
     228//                         (*it)->_data_rb              ,
     229                           
     230                           (*it)->_read_rc              ,
     231//                         (*it)->_read_rc_val          ,
     232                           (*it)->_num_reg_rc           ,
     233//                         (*it)->_data_rc_val          ,
     234//                         (*it)->_data_rc              ,
     235                           
     236                           (*it)->_write_rd             ,
     237                           (*it)->_num_reg_rd           ,
     238                           
     239                           (*it)->_write_re             ,
     240                           (*it)->_num_reg_re           ,
     241
     242                           toString_type((*it)->_type).c_str());
     243
     244                ++i;
     245              }
     246          }
     247#endif
     248
     249
    141250      }
    142251
    143252#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    144     end_cycle ();
     253        end_cycle ();
    145254#endif
    146255
    147     log_printf(FUNC,Read_queue,FUNCTION,"End");
     256    log_end(Read_queue,FUNCTION);
    148257  };
    149258
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Reservation_station_library_clean
    2525
     26local_clean                     :
     27
    2628include                         ../Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/include/test.h

    r81 r88  
    1515#include <sys/time.h>
    1616
     17#include "Common/include/Time.h"
    1718#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Reservation_station.h"
    1819
     
    3132              morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters * param);
    3233
    33 class Time
    34 {
    35 private : timeval time_begin;
    36 // private : timeval time_end;
    37  
    38 public  : Time ()
    39   {
    40     gettimeofday(&time_begin     ,NULL);
    41   };
    42 
    43 public  : ~Time ()
    44   {
    45     cout << *this;
    46   };
    47 
    48 public  : friend ostream& operator<< (ostream& output_stream,
    49                                       const Time & x)
    50   {
    51     timeval time_end;
    52    
    53     gettimeofday(&time_end       ,NULL);
    54    
    55     uint32_t nb_cycles = static_cast<uint32_t>(sc_simulation_time());
    56 
    57     double average = static_cast<double>(nb_cycles) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec);
    58    
    59     output_stream << nb_cycles << "\t(" << average << " cycles / seconds )" << endl;
    60 
    61     return output_stream;
    62   }
    63 };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/src/main.cpp

    r81 r88  
    8686         ,size_store_queue
    8787         ,size_load_queue
     88         ,true //is_toplevel
    8889         );
    8990     
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/SelfTest/src/test.cpp

    r82 r88  
    2222#endif
    2323
     24  Tusage_t _usage = USE_ALL;
     25
     26//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     27//   _usage = usage_unset(_usage,USE_VHDL                 );
     28//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     30//   _usage = usage_unset(_usage,USE_POSITION             );
     31   _usage = usage_unset(_usage,USE_STATISTICS           );
     32//   _usage = usage_unset(_usage,USE_INFORMATION          );
     33
    2434  Reservation_station * _Reservation_station = new Reservation_station
    2535    (name.c_str(),
     
    2838#endif
    2939     _param,
    30      USE_ALL);
     40     _usage);
    3141 
    3242#ifdef SYSTEMC
     
    185195  if (_param->_have_port_ooo_engine_id)
    186196  (*(_Reservation_station-> in_INSERT_OOO_ENGINE_ID    )) (*( in_INSERT_OOO_ENGINE_ID    ));
    187   if (_param->_have_port_rob_id)
     197  if (_param->_have_port_rob_ptr)
    188198  (*(_Reservation_station-> in_INSERT_ROB_ID           )) (*( in_INSERT_ROB_ID           ));
    189199  (*(_Reservation_station-> in_INSERT_OPERATION        )) (*( in_INSERT_OPERATION        ));
     
    221231  if (_param->_have_port_ooo_engine_id)
    222232  (*(_Reservation_station->out_RETIRE_OOO_ENGINE_ID  [i])) (*(out_RETIRE_OOO_ENGINE_ID  [i]));
    223   if (_param->_have_port_rob_id)
     233  if (_param->_have_port_rob_ptr)
    224234  (*(_Reservation_station->out_RETIRE_ROB_ID         [i])) (*(out_RETIRE_ROB_ID         [i]));
    225235  (*(_Reservation_station->out_RETIRE_OPERATION      [i])) (*(out_RETIRE_OPERATION      [i]));
     
    417427              if (_param->_have_port_ooo_engine_id)
    418428              in_INSERT_OOO_ENGINE_ID  ->write(insert_ooo_engine_id);
    419               if (_param->_have_port_rob_id)
     429              if (_param->_have_port_rob_ptr)
    420430              in_INSERT_ROB_ID      ->write(request_in);
    421431              in_INSERT_OPERATION   ->write(0);
     
    610620                {
    611621                  Tpacket_t  rob_id;
    612                   if (_param->_have_port_rob_id)
     622                  if (_param->_have_port_rob_ptr)
    613623                    rob_id = out_RETIRE_ROB_ID [i]->read();
    614624                  else
     
    667677  if (_param->_have_port_ooo_engine_id) 
    668678  delete     in_INSERT_OOO_ENGINE_ID  ;
    669   if (_param->_have_port_rob_id
     679  if (_param->_have_port_rob_ptr
    670680  delete     in_INSERT_ROB_ID      ;
    671681  delete     in_INSERT_OPERATION   ;
     
    701711  if (_param->_have_port_ooo_engine_id) 
    702712  delete [] out_RETIRE_OOO_ENGINE_ID  ;
    703   if (_param->_have_port_rob_id
     713  if (_param->_have_port_rob_ptr
    704714  delete [] out_RETIRE_ROB_ID   ;
    705715  delete [] out_RETIRE_OPERATION   ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/include/Parameters.h

    r81 r88  
    2626  {
    2727    //-----[ fields ]------------------------------------------------------------
    28   public : const uint32_t    _size_queue           ;
    29   public : const uint32_t    _nb_inst_retire       ;
    30   public : const uint32_t    _nb_context           ;
    31   public : const uint32_t    _nb_front_end         ;
    32   public : const uint32_t    _nb_ooo_engine        ;
    33   public : const uint32_t    _nb_packet            ;
    34   public : const uint32_t    _size_general_data    ;
    35   public : const uint32_t    _size_special_data    ;
    36   public : const uint32_t    _nb_general_register  ;
    37   public : const uint32_t    _nb_special_register  ;
    38   public : const uint32_t    _nb_gpr_write         ;
    39   public : const uint32_t    _nb_spr_write         ;
    40   public : const uint32_t    _nb_bypass_write      ;//if nb_bypass=0, then bypass is desactivated
    41   public : const uint32_t    _nb_bypass_memory     ;//if nb_bypass=0, then bypass is desactivated
    42   public : const uint32_t    _size_store_queue     ;
    43   public : const uint32_t    _size_load_queue      ;
     28  public : uint32_t    _size_queue           ;
     29  public : uint32_t    _nb_inst_retire       ;
     30  public : uint32_t    _nb_context           ;
     31  public : uint32_t    _nb_front_end         ;
     32  public : uint32_t    _nb_ooo_engine        ;
     33  public : uint32_t    _nb_packet            ;
     34//public : uint32_t    _size_general_data    ;
     35//public : uint32_t    _size_special_data    ;
     36  public : uint32_t    _nb_general_register  ;
     37  public : uint32_t    _nb_special_register  ;
     38  public : uint32_t    _nb_gpr_write         ;
     39  public : uint32_t    _nb_spr_write         ;
     40  public : uint32_t    _nb_bypass_write      ;//if nb_bypass=0, then bypass is desactivated
     41  public : uint32_t    _nb_bypass_memory     ;//if nb_bypass=0, then bypass is desactivated
     42//public : uint32_t    _size_store_queue     ;
     43//public : uint32_t    _size_load_queue      ;
     44    /*
     45  public : bool        _have_immediat        ;
     46  public : bool        _have_gpr_ra          ;
     47  public : bool        _have_gpr_rb          ;
     48  public : bool        _have_spr_rc          ;
     49  public : bool        _have_gpr_rd          ;
     50  public : bool        _have_spr_re          ;
     51    */
     52//public : uint32_t    _size_context_id      ;
     53//public : uint32_t    _size_front_end_id    ;
     54//public : uint32_t    _size_ooo_engine_id   ;
     55//public : uint32_t    _size_rob_ptr         ;
     56//public : uint32_t    _size_general_register;
     57//public : uint32_t    _size_special_register;
    4458
    45     /*
    46   public : const bool        _have_immediat        ;
    47   public : const bool        _have_gpr_ra          ;
    48   public : const bool        _have_gpr_rb          ;
    49   public : const bool        _have_spr_rc          ;
    50   public : const bool        _have_gpr_rd          ;
    51   public : const bool        _have_spr_re          ;
    52     */
    53   public : const uint32_t    _size_context_id      ;
    54   public : const uint32_t    _size_front_end_id    ;
    55   public : const uint32_t    _size_ooo_engine_id   ;
    56   public : const uint32_t    _size_rob_id          ;
    57   public : const uint32_t    _size_general_register;
    58   public : const uint32_t    _size_special_register;
    59 
    60   public : const bool        _have_port_context_id   ;
    61   public : const bool        _have_port_front_end_id ;
    62   public : const bool        _have_port_ooo_engine_id;
    63   public : const bool        _have_port_rob_id       ;
    64   public : const bool        _have_port_load_queue_ptr;
     59//public : bool        _have_port_context_id   ;
     60//public : bool        _have_port_front_end_id ;
     61//public : bool        _have_port_ooo_engine_id;
     62//public : bool        _have_port_rob_ptr      ;
     63//public : bool        _have_port_load_queue_ptr;
    6564
    6665    //-----[ methods ]-----------------------------------------------------------
     
    8079                        uint32_t nb_bypass_memory   ,
    8180                        uint32_t size_store_queue   ,
    82                         uint32_t size_load_queue    );
     81                        uint32_t size_load_queue    ,
     82                        bool     is_toplevel=false);
    8383
    84   public : Parameters  (Parameters & param) ;
     84//   public : Parameters  (Parameters & param) ;
    8585  public : ~Parameters () ;
     86
     87  public :        void            copy       (void);
    8688
    8789  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Parameters.cpp

    r81 r88  
    3535                          uint32_t nb_bypass_memory   ,
    3636                          uint32_t size_store_queue   ,
    37                           uint32_t size_load_queue    ):
    38     _size_queue            (size_queue           ),
    39     _nb_inst_retire        (nb_inst_retire       ),
    40     _nb_context            (nb_context           ),
    41     _nb_front_end          (nb_front_end         ),
    42     _nb_ooo_engine         (nb_ooo_engine        ),
    43     _nb_packet             (nb_packet            ),
    44     _size_general_data     (size_general_data    ),
    45     _size_special_data     (size_special_data    ),
    46     _nb_general_register   (nb_general_register  ),
    47     _nb_special_register   (nb_special_register  ),
    48     _nb_gpr_write          (nb_gpr_write         ),
    49     _nb_spr_write          (nb_spr_write         ),
    50     _nb_bypass_write       (nb_bypass_write      ),
    51     _nb_bypass_memory      (nb_bypass_memory     ),
    52     _size_store_queue      (size_store_queue     ),
    53     _size_load_queue       (size_load_queue      ),
    54 
    55     _size_context_id       (static_cast<uint32_t>(log2(_nb_context         ))),
    56     _size_front_end_id     (static_cast<uint32_t>(log2(_nb_front_end       ))),
    57     _size_ooo_engine_id    (static_cast<uint32_t>(log2(_nb_ooo_engine      ))),
    58     _size_rob_id           (static_cast<uint32_t>(log2(_nb_packet          ))),
    59     _size_general_register (static_cast<uint32_t>(log2(_nb_general_register))),
    60     _size_special_register (static_cast<uint32_t>(log2(_nb_special_register))),
    61 
    62     _have_port_context_id    (_size_context_id    > 0),
    63     _have_port_front_end_id  (_size_front_end_id  > 0),
    64     _have_port_ooo_engine_id (_size_ooo_engine_id > 0),
    65     _have_port_rob_id        (_size_rob_id        > 0),
    66     _have_port_load_queue_ptr(_size_load_queue    > 1)
     37                          uint32_t size_load_queue    ,
     38                          bool     is_toplevel)
    6739  {
    6840    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
     41
     42    _size_queue              = size_queue           ;
     43    _nb_inst_retire          = nb_inst_retire       ;
     44    _nb_context              = nb_context           ;
     45    _nb_front_end            = nb_front_end         ;
     46    _nb_ooo_engine           = nb_ooo_engine        ;
     47    _nb_packet               = nb_packet            ;
     48    _nb_general_register     = nb_general_register  ;
     49    _nb_special_register     = nb_special_register  ;
     50    _nb_gpr_write            = nb_gpr_write         ;
     51    _nb_spr_write            = nb_spr_write         ;
     52    _nb_bypass_write         = nb_bypass_write      ;
     53    _nb_bypass_memory        = nb_bypass_memory     ;
     54
    6955    test();
     56
     57    if (is_toplevel)
     58      {
     59        _size_context_id         = log2(_nb_context         );
     60        _size_front_end_id       = log2(_nb_front_end       );
     61        _size_ooo_engine_id      = log2(_nb_ooo_engine      );
     62        _size_rob_ptr            = log2(_nb_packet          );
     63        _size_general_register   = log2(_nb_general_register);
     64        _size_special_register   = log2(_nb_special_register);
     65        _size_general_data       = size_general_data         ;
     66        _size_special_data       = size_special_data         ;
     67        _size_store_queue_ptr    = log2(size_store_queue    );
     68        _size_load_queue_ptr     = log2(size_load_queue     );
     69       
     70        _have_port_context_id    = _size_context_id     > 0;
     71        _have_port_front_end_id  = _size_front_end_id   > 0;
     72        _have_port_ooo_engine_id = _size_ooo_engine_id  > 0;
     73        _have_port_rob_ptr       = _size_rob_ptr        > 0;
     74        _have_port_load_queue_ptr= _size_load_queue_ptr > 0;
     75
     76        copy();
     77      }
     78
    7079    log_printf(FUNC,Reservation_station,FUNCTION,"End");
    7180  };
    7281 
     82// #undef  FUNCTION
     83// #define FUNCTION "Reservation_station::Parameters (copy)"
     84//   Parameters::Parameters (Parameters & param):
     85//     _size_queue            (param._size_queue            ),
     86//     _nb_inst_retire        (param._nb_inst_retire        ),
     87//     _nb_context            (param._nb_context            ),
     88//     _nb_front_end          (param._nb_front_end          ),
     89//     _nb_ooo_engine         (param._nb_ooo_engine         ),
     90//     _nb_packet             (param._nb_packet             ),
     91//     _size_general_data     (param._size_general_data     ),
     92//     _size_special_data     (param._size_special_data     ),
     93//     _nb_general_register   (param._nb_general_register   ),
     94//     _nb_special_register   (param._nb_special_register   ),
     95//     _nb_gpr_write          (param._nb_gpr_write          ),
     96//     _nb_spr_write          (param._nb_spr_write          ),
     97//     _nb_bypass_write       (param._nb_bypass_write       ),
     98//     _nb_bypass_memory      (param._nb_bypass_memory      ),
     99//     _size_store_queue      (param._size_store_queue      ),
     100//     _size_load_queue       (param._size_load_queue       ),
     101
     102//     _size_context_id       (param._size_context_id       ),
     103//     _size_front_end_id     (param._size_front_end_id     ),
     104//     _size_ooo_engine_id    (param._size_ooo_engine_id    ),
     105//     _size_rob_id           (param._size_rob_id           ),
     106//     _size_general_register (param._size_general_register ),
     107//     _size_special_register (param._size_special_register ),
     108
     109//     _have_port_context_id    (param._have_port_context_id   ),
     110//     _have_port_front_end_id  (param._have_port_front_end_id ),
     111//     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
     112//     _have_port_rob_id        (param._have_port_rob_id       ),
     113//     _have_port_load_queue_ptr(param._have_port_load_queue_ptr)
     114//   {
     115//     log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
     116//     test();
     117//     log_printf(FUNC,Reservation_station,FUNCTION,"End");
     118//   };
     119
    73120#undef  FUNCTION
    74 #define FUNCTION "Reservation_station::Parameters (copy)"
    75   Parameters::Parameters (Parameters & param):
    76     _size_queue            (param._size_queue            ),
    77     _nb_inst_retire        (param._nb_inst_retire        ),
    78     _nb_context            (param._nb_context            ),
    79     _nb_front_end          (param._nb_front_end          ),
    80     _nb_ooo_engine         (param._nb_ooo_engine         ),
    81     _nb_packet             (param._nb_packet             ),
    82     _size_general_data     (param._size_general_data     ),
    83     _size_special_data     (param._size_special_data     ),
    84     _nb_general_register   (param._nb_general_register   ),
    85     _nb_special_register   (param._nb_special_register   ),
    86     _nb_gpr_write          (param._nb_gpr_write          ),
    87     _nb_spr_write          (param._nb_spr_write          ),
    88     _nb_bypass_write       (param._nb_bypass_write       ),
    89     _nb_bypass_memory      (param._nb_bypass_memory      ),
    90     _size_store_queue      (param._size_store_queue      ),
    91     _size_load_queue       (param._size_load_queue       ),
    92 
    93     _size_context_id       (param._size_context_id       ),
    94     _size_front_end_id     (param._size_front_end_id     ),
    95     _size_ooo_engine_id    (param._size_ooo_engine_id    ),
    96     _size_rob_id           (param._size_rob_id           ),
    97     _size_general_register (param._size_general_register ),
    98     _size_special_register (param._size_special_register ),
    99 
    100     _have_port_context_id    (param._have_port_context_id   ),
    101     _have_port_front_end_id  (param._have_port_front_end_id ),
    102     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
    103     _have_port_rob_id        (param._have_port_rob_id       ),
    104     _have_port_load_queue_ptr(param._have_port_load_queue_ptr)
     121#define FUNCTION "Reservation_station::~Parameters"
     122  Parameters::~Parameters (void)
    105123  {
    106124    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
    107     test();
    108125    log_printf(FUNC,Reservation_station,FUNCTION,"End");
    109126  };
    110127
    111128#undef  FUNCTION
    112 #define FUNCTION "Reservation_station::~Parameters"
    113   Parameters::~Parameters ()
     129#define FUNCTION "Reservation_station::copy"
     130  void Parameters::copy (void)
    114131  {
    115132    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/Parameters_print.cpp

    r81 r88  
    4242    xml.singleton_begin("nb_bypass_write    "); xml.attribut("value",toString(_nb_bypass_write    )); xml.singleton_end();
    4343    xml.singleton_begin("nb_bypass_memory   "); xml.attribut("value",toString(_nb_bypass_memory   )); xml.singleton_end();
    44     xml.singleton_begin("size_store_queue   "); xml.attribut("value",toString(_size_store_queue   )); xml.singleton_end();
    45     xml.singleton_begin("size_load_queue    "); xml.attribut("value",toString(_size_load_queue    )); xml.singleton_end();
     44//  xml.singleton_begin("size_store_queue   "); xml.attribut("value",toString(_size_store_queue   )); xml.singleton_end();
     45//  xml.singleton_begin("size_load_queue    "); xml.attribut("value",toString(_size_load_queue    )); xml.singleton_end();
    4646    xml.balise_close();
    4747
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station.cpp

    r82 r88  
    3939    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
    4040
     41#if DEBUG_Reservation_station == true
     42    log_printf(INFO,Reservation_station,FUNCTION,_("<%s> Parameters"),_name.c_str());
     43
     44    std::cout << *param << std::endl;
     45#endif   
     46
    4147#ifdef SYSTEMC
    4248    log_printf(INFO,Reservation_station,FUNCTION,"Allocation");
     
    4652
    4753#ifdef STATISTICS
    48     log_printf(INFO,Reservation_station,FUNCTION,"Allocation of statistics");
    49 
    50     statistics_declaration(param_statistics);
     54    if (usage_is_set(_usage,USE_STATISTICS))
     55      {
     56        log_printf(INFO,Reservation_station,FUNCTION,"Allocation of statistics");
     57       
     58        statistics_declaration(param_statistics);
     59      }
    5160#endif
    5261
    5362#ifdef VHDL
    54     // generate the vhdl
    55     log_printf(INFO,Reservation_station,FUNCTION,"Generate the vhdl");
    56 
    57     vhdl();
     63    if (usage_is_set(_usage,USE_VHDL))
     64      {
     65        // generate the vhdl
     66        log_printf(INFO,Reservation_station,FUNCTION,"Generate the vhdl");
     67       
     68        vhdl();
     69      }
    5870#endif
    5971
    6072#ifdef SYSTEMC
     73    if (usage_is_set(_usage,USE_SYSTEMC))
     74      {
    6175//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    6276    log_printf(INFO,Reservation_station,FUNCTION,"Method - transition");
     
    8094    // List dependency information
    8195#endif   
    82 
     96      }
    8397#endif
    8498    log_printf(FUNC,Reservation_station,FUNCTION,"End");
     
    92106
    93107#ifdef STATISTICS
    94     log_printf(INFO,Reservation_station,FUNCTION,"Generate Statistics file");
    95 
    96     delete _stat;
     108    if (usage_is_set(_usage,USE_STATISTICS))
     109      {
     110        log_printf(INFO,Reservation_station,FUNCTION,"Generate Statistics file");
     111       
     112        delete _stat;
     113      }
    97114#endif
    98115
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_allocation.cpp

    r82 r88  
    33 * $Id$
    44 *
    5  * [ Description ]
     5 * [ Description ]
    66 *
    77 */
     
    3737    _interfaces = entity->set_interfaces();
    3838
    39     // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     39    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4040
    4141      Interface * interface = _interfaces->set_interface(""
     
    5050     in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
    5151
    52     // ~~~~~[ Interface : "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~
     52    // ~~~~~[ Interface : "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5353    {
    5454      Interface_fifo * interface = _interfaces->set_interface("insert"
     
    6868      if (_param->_have_port_ooo_engine_id)
    6969       in_INSERT_OOO_ENGINE_ID  = interface->set_signal_in <Tcontext_t        > ("ooo_engine_id"  ,_param->_size_ooo_engine_id    );
    70       if (_param->_have_port_rob_id)
    71        in_INSERT_ROB_ID         = interface->set_signal_in <Tpacket_t         > ("rob_id"         ,_param->_size_rob_id        );
     70      if (_param->_have_port_rob_ptr)
     71       in_INSERT_ROB_ID         = interface->set_signal_in <Tpacket_t         > ("rob_id"         ,_param->_size_rob_ptr        );
    7272       in_INSERT_OPERATION      = interface->set_signal_in <Toperation_t      > ("operation"      ,_param->_size_operation        );
    7373       in_INSERT_TYPE           = interface->set_signal_in <Ttype_t           > ("type"           ,_param->_size_type             );
    74        in_INSERT_STORE_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("store_queue_ptr_write" ,log2(_param->_size_store_queue));
     74       in_INSERT_STORE_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("store_queue_ptr_write" ,_param->_size_store_queue_ptr);
    7575       if (_param->_have_port_load_queue_ptr)
    76        in_INSERT_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_in <Tlsq_ptr_t> ("load_queue_ptr_write"  ,log2(_param->_size_load_queue) );
     76       in_INSERT_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_in <Tlsq_ptr_t> ("load_queue_ptr_write"  ,_param->_size_load_queue_ptr );
    7777       in_INSERT_HAS_IMMEDIAT   = interface->set_signal_in <Tcontrol_t        > ("has_immediat"   ,1                             );
    7878       in_INSERT_IMMEDIAT       = interface->set_signal_in <Tgeneral_data_t   > ("immediat"       ,_param->_size_general_data     );
     
    9595     }
    9696
    97     // ~~~~~[ Interface : "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~
     97    // ~~~~~[ Interface : "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~
    9898    out_RETIRE_VAL            = new SC_OUT(Tcontrol_t        ) * [_param->_nb_inst_retire];
    9999     in_RETIRE_ACK            = new SC_IN (Tcontrol_t        ) * [_param->_nb_inst_retire];
     
    104104    if (_param->_have_port_ooo_engine_id)
    105105    out_RETIRE_OOO_ENGINE_ID  = new SC_OUT(Tcontext_t        ) * [_param->_nb_inst_retire];
    106     if (_param->_have_port_rob_id)
     106    if (_param->_have_port_rob_ptr)
    107107    out_RETIRE_ROB_ID         = new SC_OUT(Tpacket_t         ) * [_param->_nb_inst_retire];
    108108    out_RETIRE_OPERATION      = new SC_OUT(Toperation_t      ) * [_param->_nb_inst_retire];
     
    138138        if (_param->_have_port_ooo_engine_id)
    139139        out_RETIRE_OOO_ENGINE_ID[i] = interface->set_signal_out<Tcontext_t        > ("ooo_engine_id",_param->_size_ooo_engine_id);
    140         if (_param->_have_port_rob_id)
    141         out_RETIRE_ROB_ID       [i] = interface->set_signal_out<Tpacket_t         > ("rob_id"       ,_param->_size_rob_id);
     140        if (_param->_have_port_rob_ptr)
     141        out_RETIRE_ROB_ID       [i] = interface->set_signal_out<Tpacket_t         > ("rob_id"       ,_param->_size_rob_ptr);
    142142        out_RETIRE_OPERATION    [i] = interface->set_signal_out<Toperation_t      > ("operation"    ,_param->_size_operation);
    143143        out_RETIRE_TYPE         [i] = interface->set_signal_out<Ttype_t           > ("type"         ,_param->_size_type);
    144         out_RETIRE_STORE_QUEUE_PTR_WRITE [i] = interface->set_signal_out<Tlsq_ptr_t> ("store_queue_ptr_write" ,log2(_param->_size_store_queue));
     144        out_RETIRE_STORE_QUEUE_PTR_WRITE [i] = interface->set_signal_out<Tlsq_ptr_t> ("store_queue_ptr_write" ,_param->_size_store_queue_ptr);
    145145        if (_param->_have_port_load_queue_ptr)
    146         out_RETIRE_LOAD_QUEUE_PTR_WRITE  [i] = interface->set_signal_out<Tlsq_ptr_t> ("load_queue_ptr_write"  ,log2(_param->_size_load_queue) );
     146        out_RETIRE_LOAD_QUEUE_PTR_WRITE  [i] = interface->set_signal_out<Tlsq_ptr_t> ("load_queue_ptr_write"  ,_param->_size_load_queue_ptr );
    147147
    148148        out_RETIRE_HAS_IMMEDIAT [i] = interface->set_signal_out<Tcontrol_t        > ("has_immediat" ,1);
     
    157157      }
    158158
    159     // ~~~~~[ Interface : "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     159    // ~~~~~[ Interface : "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    160160     in_GPR_WRITE_VAL          = new SC_IN (Tcontrol_t        ) * [_param->_nb_gpr_write];
    161161     if (_param->_have_port_ooo_engine_id)
     
    181181      }
    182182
    183     // ~~~~~[ Interface : "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     183    // ~~~~~[ Interface : "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    184184     in_SPR_WRITE_VAL          = new SC_IN (Tcontrol_t        ) * [_param->_nb_spr_write];
    185185     if (_param->_have_port_ooo_engine_id)
     
    205205      }
    206206
    207     // ~~~~~[ Interface : "bypass_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     207    // ~~~~~[ Interface : "bypass_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    208208     if (_param->_have_port_ooo_engine_id)
    209209     in_BYPASS_WRITE_OOO_ENGINE_ID  = new SC_IN (Tcontext_t        ) * [_param->_nb_bypass_write];
     
    235235      }
    236236
    237     // ~~~~~[ Interface : "bypass_memory" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     237    // ~~~~~[ Interface : "bypass_memory" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    238238     in_BYPASS_MEMORY_VAL          = new SC_IN (Tcontrol_t        ) * [_param->_nb_bypass_memory];
    239239     if (_param->_have_port_ooo_engine_id)
     
    260260
    261261
    262     // ~~~~~[ internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     262    if (usage_is_set(_usage,USE_SYSTEMC))
     263      {
     264    // ~~~~~[ internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    263265    internal_RETIRE_VAL  = new Tcontrol_t [_param->_nb_inst_retire];
    264266    internal_RETIRE_SLOT = new uint32_t   [_param->_nb_inst_retire];
    265 
    266     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    267 
    268 #ifdef POSITION
    269     _component->generate_file();
     267      }
     268
     269    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     270
     271#ifdef POSITION
     272    if (usage_is_set(_usage,USE_POSITION))
     273      _component->generate_file();
    270274#endif
    271275#ifdef  SYSTEMC_VHDL_COMPATIBILITY
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_deallocation.cpp

    r81 r88  
    2828    log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
    2929
     30    if (usage_is_set(_usage,USE_SYSTEMC))
     31      {
    3032    delete     in_CLOCK ;
    3133    delete     in_NRESET;
     
    3941    if (_param->_have_port_ooo_engine_id)
    4042    delete     in_INSERT_OOO_ENGINE_ID ;
    41     if (_param->_have_port_rob_id)
     43    if (_param->_have_port_rob_ptr)
    4244    delete     in_INSERT_ROB_ID        ;
    4345    delete     in_INSERT_OPERATION     ;
     
    7375    if (_param->_have_port_ooo_engine_id)
    7476    delete [] out_RETIRE_OOO_ENGINE_ID ;
    75     if (_param->_have_port_rob_id)
     77    if (_param->_have_port_rob_ptr)
    7678    delete [] out_RETIRE_ROB_ID        ;
    7779    delete [] out_RETIRE_OPERATION     ;
     
    119121    // ~~~~~[ internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    120122    delete []  internal_RETIRE_VAL;
    121 
     123    delete []  internal_RETIRE_SLOT;
     124      }
    122125    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    123126
     
    139142}; // end namespace multi_execute_loop
    140143}; // end namespace core
    141 
    142144}; // end namespace behavioural
    143145}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_end_cycle.cpp

    r81 r88  
    2626
    2727#ifdef STATISTICS
    28     _stat->end_cycle();
     28    if (usage_is_set(_usage,USE_STATISTICS))
     29      _stat->end_cycle();
    2930#endif   
    3031
     
    3233    // Evaluation before read the ouput signal
    3334//     sc_start(0);
    34     _interfaces->testbench();
     35    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     36      _interfaces->testbench();
    3537#endif
    3638    log_printf(FUNC,Reservation_station,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_genMoore.cpp

    r81 r88  
    2424  void Reservation_station::genMoore (void)
    2525  {
    26     log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
     26    log_begin(Reservation_station,FUNCTION);
     27    log_function(Reservation_station,FUNCTION,_name.c_str());
    2728
    2829    // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~
     
    9798            if (_param->_have_port_ooo_engine_id)
    9899            PORT_WRITE(out_RETIRE_OOO_ENGINE_ID [i],_queue[index_find]._ooo_engine_id);
    99             if (_param->_have_port_rob_id)
     100            if (_param->_have_port_rob_ptr)
    100101            PORT_WRITE(out_RETIRE_ROB_ID        [i],_queue[index_find]._rob_id);
    101102            PORT_WRITE(out_RETIRE_OPERATION     [i],_queue[index_find]._operation);
     
    116117      }
    117118
    118     log_printf(FUNC,Reservation_station,FUNCTION,"End");
     119    log_end(Reservation_station,FUNCTION);
    119120  };
    120121
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_transition.cpp

    r81 r88  
    2020
    2121#ifdef  SYSTEMC_VHDL_COMPATIBILITY
    22 #define dump_queue() \
    23   do\
    24   {\
    25    log_printf(TRACE,Reservation_station,FUNCTION," * dump queue");\
    26    log_printf(TRACE,Reservation_station,FUNCTION,"   * nb_elt : %d",_queue_nb_elt);\
    27    for (uint32_t j=0;j<_param->_size_queue; j++)\
    28    {\
    29      cout << "\t"\
    30           << "[" << j << "] "\
    31           << "{" << _queue[j]._rob_id << " - "<< _queue[j]._context_id << "} " << " - "<< _queue[j]._front_end_id << "} " << " - "<< _queue[j]._ooo_engine_id << "} "\
    32           << _queue[j]._data_ra_val << ", "\
    33           << _queue[j]._num_reg_ra  << " - "\
    34           << _queue[j]._data_rb_val << ","\
    35           << _queue[j]._num_reg_rb  << " - "\
    36           << _queue[j]._data_rc_val << ","\
    37           << _queue[j]._num_reg_rc  \
    38           << endl;\
    39     }\
    40   } while (0)
    41 #else
    42 #define dump_queue() \
    43   do\
    44   {\
    45    log_printf(TRACE,Reservation_station,FUNCTION," * dump queue");\
    46    log_printf(TRACE,Reservation_station,FUNCTION,"   * nb_elt : %d",_queue_nb_elt);\
    47    for (uint32_t j=0;j<_param->_size_queue; j++)\
    48    {\
    49      cout << "\t"\
    50           << "[" << (*_queue_control)[j] << "] "\
    51           << "{" << _queue[(*_queue_control)[j]]._rob_id << " - "<< _queue[(*_queue_control)[j]]._context_id << "} " << " - "<< _queue[(*_queue_control)[j]]._front_end_id << "} " << " - "<< _queue[(*_queue_control)[j]]._ooo_engine_id << "} "\
    52           << _queue[(*_queue_control)[j]]._data_ra_val << ", "\
    53           << _queue[(*_queue_control)[j]]._num_reg_ra  << " - "\
    54           << _queue[(*_queue_control)[j]]._data_rb_val << ","\
    55           << _queue[(*_queue_control)[j]]._num_reg_rb  << " - "\
    56           << _queue[(*_queue_control)[j]]._data_rc_val << ","\
    57           << _queue[(*_queue_control)[j]]._num_reg_rc  \
    58           << endl;\
    59     }\
    60   } while (0)
     22#define dump_queue()                                                    \
     23  do                                                                    \
     24    {                                                                   \
     25      log_printf(TRACE,Reservation_station,FUNCTION,"  * Dump Reservation Station");  \
     26      for (uint32_t it_dump=0;it_dump<_param->_size_queue; it_dump++)   \
     27        log_printf(TRACE,Reservation_station,FUNCTION,"    * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.2x, %.1d %.4d, %.1d %.4d (%s)", \
     28                   it_dump,                                             \
     29                   _queue[it_dump]._context_id           ,              \
     30                   _queue[it_dump]._front_end_id         ,              \
     31                   _queue[it_dump]._ooo_engine_id        ,              \
     32                   _queue[it_dump]._rob_id               ,              \
     33                   _queue[it_dump]._type                 ,              \
     34                   _queue[it_dump]._operation            ,              \
     35                   _queue[it_dump]._store_queue_ptr_write,              \
     36                   _queue[it_dump]._load_queue_ptr_write ,              \
     37                   _queue[it_dump]._has_immediat         ,              \
     38                   _queue[it_dump]._immediat             ,              \
     39                   _queue[it_dump]._num_reg_ra           ,              \
     40                   _queue[it_dump]._data_ra_val          ,              \
     41                   _queue[it_dump]._data_ra              ,              \
     42                   _queue[it_dump]._num_reg_rb           ,              \
     43                   _queue[it_dump]._data_rb_val          ,              \
     44                   _queue[it_dump]._data_rb              ,              \
     45                   _queue[it_dump]._num_reg_rc           ,              \
     46                   _queue[it_dump]._data_rc_val          ,              \
     47                   _queue[it_dump]._data_rc              ,              \
     48                   _queue[it_dump]._write_rd             ,              \
     49                   _queue[it_dump]._num_reg_rd           ,              \
     50                   _queue[it_dump]._write_re             ,              \
     51                   _queue[it_dump]._num_reg_re           ,              \
     52                   toString_type(_queue[it_dump]._type).c_str());       \
     53    } while (0)
     54#else
     55#define dump_queue()                                                    \
     56  do                                                                    \
     57    {                                                                   \
     58      log_printf(TRACE,Reservation_station,FUNCTION,"  * Dump Reservation Station"); \
     59      log_printf(TRACE,Reservation_station,FUNCTION,"    * nb_elt : %d",_queue_control->nb_elt()); \
     60      for (uint32_t it_dump=0;it_dump<_param->_size_queue; it_dump++)   \
     61        log_printf(TRACE,Reservation_station,FUNCTION,"    * [%.4d] %.2d %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.8x, %.4d %.1d %.2x, %.1d %.4d, %.1d %.4d (%s)", \
     62                   (*_queue_control)[it_dump],                          \
     63                   _queue[(*_queue_control)[it_dump]]._context_id           , \
     64                   _queue[(*_queue_control)[it_dump]]._front_end_id         , \
     65                   _queue[(*_queue_control)[it_dump]]._ooo_engine_id        , \
     66                   _queue[(*_queue_control)[it_dump]]._rob_id               , \
     67                   _queue[(*_queue_control)[it_dump]]._type                 , \
     68                   _queue[(*_queue_control)[it_dump]]._operation            , \
     69                   _queue[(*_queue_control)[it_dump]]._store_queue_ptr_write, \
     70                   _queue[(*_queue_control)[it_dump]]._load_queue_ptr_write , \
     71                   _queue[(*_queue_control)[it_dump]]._has_immediat         , \
     72                   _queue[(*_queue_control)[it_dump]]._immediat             , \
     73                   _queue[(*_queue_control)[it_dump]]._num_reg_ra           , \
     74                   _queue[(*_queue_control)[it_dump]]._data_ra_val          , \
     75                   _queue[(*_queue_control)[it_dump]]._data_ra              , \
     76                   _queue[(*_queue_control)[it_dump]]._num_reg_rb           , \
     77                   _queue[(*_queue_control)[it_dump]]._data_rb_val          , \
     78                   _queue[(*_queue_control)[it_dump]]._data_rb              , \
     79                   _queue[(*_queue_control)[it_dump]]._num_reg_rc           , \
     80                   _queue[(*_queue_control)[it_dump]]._data_rc_val          , \
     81                   _queue[(*_queue_control)[it_dump]]._data_rc              , \
     82                   _queue[(*_queue_control)[it_dump]]._write_rd             , \
     83                   _queue[(*_queue_control)[it_dump]]._num_reg_rd           , \
     84                   _queue[(*_queue_control)[it_dump]]._write_re             , \
     85                   _queue[(*_queue_control)[it_dump]]._num_reg_re           , \
     86                   toString_type(_queue[(*_queue_control)[it_dump]]._type).c_str());       \
     87    } while (0)
    6188#endif
    6289
     
    6592  void Reservation_station::transition (void)
    6693  {
    67     log_printf(FUNC,Reservation_station,FUNCTION,"Begin");
     94    log_begin(Reservation_station,FUNCTION);
     95    log_function(Reservation_station,FUNCTION,_name.c_str());
    6896
    6997    if (PORT_READ(in_NRESET) == 0)
     
    89117                //uint32_t index = (*_queue_control)[i];
    90118
    91                 log_printf(NONE,Reservation_station,FUNCTION,"POP  [%d]",i);
     119                log_printf(NONE,Reservation_station,FUNCTION,"  * POP  [%d]",i);
    92120
    93121                uint32_t index  = internal_RETIRE_SLOT[i];
     
    102130//                   << " * index       : " << index << endl;
    103131
    104                 log_printf(NONE,Reservation_station,FUNCTION," * index         : %d",index);
     132                log_printf(NONE,Reservation_station,FUNCTION,"    * index         : %d",index);
    105133              }
    106134          }
     
    140168                    if (PORT_READ(in_GPR_WRITE_NUM_REG [j]) == _queue[index]._num_reg_ra)
    141169                      {
    142                         log_printf(TRACE,Reservation_station,FUNCTION," -> GPR_WRITE     [%d] - Hit queue[%d]-GPR_RA[%d]",i,index,_queue[index]._num_reg_ra);
     170                        log_printf(TRACE,Reservation_station,FUNCTION,"    -> GPR_WRITE     [%d] - Hit queue[%d]-GPR_RA[%d]",i,index,_queue[index]._num_reg_ra);
    143171                        _queue[index]._data_ra_val = 1;
    144172                        _queue[index]._data_ra     = PORT_READ(in_GPR_WRITE_DATA [j]);
     
    146174                    if (PORT_READ(in_GPR_WRITE_NUM_REG [j]) == _queue[index]._num_reg_rb)
    147175                      {
    148                         log_printf(TRACE,Reservation_station,FUNCTION," -> GPR_WRITE     [%d] - Hit queue[%d]-GPR_RB[%d]",i,index,_queue[index]._num_reg_rb);
     176                        log_printf(TRACE,Reservation_station,FUNCTION,"    -> GPR_WRITE     [%d] - Hit queue[%d]-GPR_RB[%d]",i,index,_queue[index]._num_reg_rb);
    149177                        _queue[index]._data_rb_val = 1;
    150178                        _queue[index]._data_rb     = PORT_READ(in_GPR_WRITE_DATA [j]);
     
    165193                    (PORT_READ(in_SPR_WRITE_NUM_REG       [j]) == _queue[index]._num_reg_rc))
    166194                  {
    167                     log_printf(TRACE,Reservation_station,FUNCTION," -> SPR_WRITE     [%d] - Hit queue[%d]-SPR_RC[%d]",i,index,_queue[index]._num_reg_rc);
     195                    log_printf(TRACE,Reservation_station,FUNCTION,"    -> SPR_WRITE     [%d] - Hit queue[%d]-SPR_RC[%d]",i,index,_queue[index]._num_reg_rc);
    168196                    _queue[index]._data_rc_val = 1;
    169197                    _queue[index]._data_rc     = PORT_READ(in_SPR_WRITE_DATA [j]);
     
    185213                    if (PORT_READ(in_BYPASS_WRITE_GPR_NUM_REG[j]) == _queue[index]._num_reg_ra)
    186214                      {
    187                         log_printf(TRACE,Reservation_station,FUNCTION," -> BYPASS_WRITE  [%d] - Hit queue[%d]-GPR_RA[%d]",i,index,_queue[index]._num_reg_ra);
     215                        log_printf(TRACE,Reservation_station,FUNCTION,"    -> BYPASS_WRITE  [%d] - Hit queue[%d]-GPR_RA[%d]",i,index,_queue[index]._num_reg_ra);
    188216                        _queue[index]._data_ra_val = 1;
    189217                        _queue[index]._data_ra     = PORT_READ(in_BYPASS_WRITE_GPR_DATA [j]);
     
    191219                    if (PORT_READ(in_BYPASS_WRITE_GPR_NUM_REG [j]) == _queue[index]._num_reg_rb)
    192220                      {
    193                         log_printf(TRACE,Reservation_station,FUNCTION," -> BYPASS_WRITE  [%d] - Hit queue[%d]-GPR_RB[%d]",i,index,_queue[index]._num_reg_rb);
     221                        log_printf(TRACE,Reservation_station,FUNCTION,"    -> BYPASS_WRITE  [%d] - Hit queue[%d]-GPR_RB[%d]",i,index,_queue[index]._num_reg_rb);
    194222                        _queue[index]._data_rb_val = 1;
    195223                        _queue[index]._data_rb     = PORT_READ(in_BYPASS_WRITE_GPR_DATA [j]);
     
    199227                        (PORT_READ(in_BYPASS_WRITE_SPR_NUM_REG[j]) == _queue[index]._num_reg_rc))
    200228                      {
    201                         log_printf(TRACE,Reservation_station,FUNCTION," -> BYPASS_WRITE  [%d] - Hit queue[%d]-SPR_RC[%d]",i,index,_queue[index]._num_reg_rc);
     229                        log_printf(TRACE,Reservation_station,FUNCTION,"    -> BYPASS_WRITE  [%d] - Hit queue[%d]-SPR_RC[%d]",i,index,_queue[index]._num_reg_rc);
    202230                        _queue[index]._data_rc_val = 1;
    203231                        _queue[index]._data_rc     = PORT_READ(in_BYPASS_WRITE_SPR_DATA [j]);
     
    218246                    if (PORT_READ(in_BYPASS_MEMORY_NUM_REG [j]) == _queue[index]._num_reg_ra)
    219247                      {
    220                         log_printf(TRACE,Reservation_station,FUNCTION," -> BYPASS_MEMORY [%d] - Hit queue[%d]-GPR_RA[%d]",i,index,_queue[index]._num_reg_ra);
     248                        log_printf(TRACE,Reservation_station,FUNCTION,"    -> BYPASS_MEMORY [%d] - Hit queue[%d]-GPR_RA[%d]",i,index,_queue[index]._num_reg_ra);
    221249                        _queue[index]._data_ra_val = 1;
    222250                        _queue[index]._data_ra     = PORT_READ(in_BYPASS_MEMORY_DATA [j]);
     
    224252                    if (PORT_READ(in_BYPASS_MEMORY_NUM_REG [j]) == _queue[index]._num_reg_rb)
    225253                      {
    226                         log_printf(TRACE,Reservation_station,FUNCTION," -> BYPASS_MEMORY [%d] - Hit queue[%d]-GPR_RB[%d]",i,index,_queue[index]._num_reg_rb);
     254                        log_printf(TRACE,Reservation_station,FUNCTION,"    -> BYPASS_MEMORY [%d] - Hit queue[%d]-GPR_RB[%d]",i,index,_queue[index]._num_reg_rb);
    227255                        _queue[index]._data_rb_val = 1;
    228256                        _queue[index]._data_rb     = PORT_READ(in_BYPASS_MEMORY_DATA [j]);
     
    235263            (    internal_INSERT_ACK  == 1))
    236264          {
    237             log_printf(TRACE,Reservation_station,FUNCTION,"PUSH");
     265            log_printf(TRACE,Reservation_station,FUNCTION,"  * PUSH");
    238266
    239267            // Write in reservation station
     
    246274            index = _queue_control->push();
    247275#endif
    248             log_printf(TRACE,Reservation_station,FUNCTION," * index         : %d",index);
     276            log_printf(TRACE,Reservation_station,FUNCTION,"    * index         : %d",index);
    249277
    250278            if (_param->_have_port_context_id)
     
    254282            if (_param->_have_port_ooo_engine_id)
    255283            _queue[index]._ooo_engine_id   = PORT_READ(in_INSERT_OOO_ENGINE_ID  );
    256             if (_param->_have_port_rob_id)
     284            if (_param->_have_port_rob_ptr)
    257285            _queue[index]._rob_id          = PORT_READ(in_INSERT_ROB_ID         );
    258286            _queue[index]._operation       = PORT_READ(in_INSERT_OPERATION      );
     
    283311      }
    284312
     313    dump_queue();
     314
    285315    end_cycle ();
    286316
    287     log_printf(FUNC,Reservation_station,FUNCTION,"End");
     317    log_end(Reservation_station,FUNCTION);
    288318  };
    289319
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Read_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/SelfTest/configuration.cfg

    r81 r88  
    11Read_unit
    2 4       4       *2      # size_read_queue         
    3 4       4       *2      # size_reservation_station
     24       8       *2      # size_read_queue         
     34       8       *2      # size_reservation_station
    441       1       *2      # nb_context             
    551       1       *2      # nb_front_end           
    6 1       4       *2      # nb_ooo_engine           
     61       4       *4      # nb_ooo_engine           
    7764      64      *2      # nb_packet               
    8832      32      *2      # size_general_data       
     
    101064      64      *2      # nb_general_register     
    111116      16      *2      # nb_special_register     
    12 2       2       *2      # nb_gpr_write           
    13 2       2       *2      # nb_spr_write           
    14 4       4       *2      # size_store_queue       
    15 1       4       *4      # size_load_queue         
    16 2       2       *2      # nb_inst_retire         
    17 2       2       *2      # nb_bypass_write         
    18 2       2       *2      # nb_bypass_memory       
     124       4       *4      # nb_gpr_write           
     134       4       *4      # nb_spr_write           
     144       4       *2      # size_store_queue
     154       4       *4      # size_load_queue         
     164       4       *4      # nb_inst_retire         
     174       4       *4      # nb_bypass_write         
     184       4       *4      # nb_bypass_memory       
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/SelfTest/src/main.cpp

    r81 r88  
    8585         _nb_inst_retire          ,
    8686         _nb_bypass_write         ,
    87          _nb_bypass_memory        );
     87         _nb_bypass_memory        ,
     88         true // is_toplevel
     89         );
    8890     
    8991      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/SelfTest/src/test.cpp

    r82 r88  
    77 */
    88
    9 #define NB_ITERATION  1
    10 #define CYCLE_MAX     (128*NB_ITERATION)
     9#define NB_ITERATION  16
     10#define CYCLE_MAX     (1024*NB_ITERATION)
    1111
    1212#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/SelfTest/include/test.h"
    1313#include "Common/include/Test.h"
     14#include "Common/include/BitManipulation.h"
    1415#include "Behavioural/include/Allocation.h"
     16
     17class write_req_t
     18{
     19  public : uint32_t ooo;
     20  public : uint32_t reg;
     21
     22  write_req_t (uint32_t ooo,
     23               uint32_t reg)
     24  {
     25    this->ooo = ooo;
     26    this->reg = reg;
     27  }
     28};
    1529
    1630void test (string name,
     
    2236  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50);
    2337#endif
     38
     39  Tusage_t _usage = USE_ALL;
     40
     41//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     42//   _usage = usage_unset(_usage,USE_VHDL                 );
     43//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     44//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     45//   _usage = usage_unset(_usage,USE_POSITION             );
     46//   _usage = usage_unset(_usage,USE_STATISTICS           );
     47//   _usage = usage_unset(_usage,USE_INFORMATION          );
    2448
    2549  Read_unit * _Read_unit = new Read_unit
     
    2953#endif
    3054     _param,
    31      USE_ALL);
     55     _usage);
    3256 
    3357#ifdef SYSTEMC
     
    130154  if (_param->_have_port_ooo_engine_id)
    131155  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_OOO_ENGINE_ID         );
    132   if (_param->_have_port_packet_id)
     156  if (_param->_have_port_rob_ptr)
    133157  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_PACKET_ID             );
    134158  INSTANCE_SC_SIGNAL (_Read_unit, in_READ_UNIT_IN_OPERATION             );
     
    157181  if (_param->_have_port_ooo_engine_id)
    158182  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_OOO_ENGINE_ID        ,_param->_nb_inst_retire);
    159   if (_param->_have_port_packet_id)
     183  if (_param->_have_port_rob_ptr)
    160184  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_PACKET_ID            ,_param->_nb_inst_retire);
    161185  INSTANCE1_SC_SIGNAL(_Read_unit,out_READ_UNIT_OUT_OPERATION            ,_param->_nb_inst_retire);
     
    213237  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
    214238   
     239  // Initialisation
     240  const uint32_t seed = 0;
     241//const uint32_t seed = static_cast<uint32_t>(time(NULL));
     242
     243  srand(seed);
     244
     245  SC_START(0);
     246
    215247  Time * _time = new Time();
    216248
     
    218250   * Simulation - Begin
    219251   ********************************************************/
    220 
     252  {
    221253  // Initialisation
    222254
    223   const uint32_t seed = 0;
    224 //const uint32_t seed = static_cast<uint32_t>(time(NULL));
    225 
    226   srand(seed);
    227 
    228   SC_START(0);
     255  const uint32_t nb_request = _param->_nb_packet;
     256
     257  Tcontext_t         _ooo_engine_id [nb_request];
     258  Tcontrol_t         _read_ra    [nb_request];
     259  Tgeneral_address_t _num_reg_ra [nb_request];
     260  Tcontrol_t         _read_rb    [nb_request];
     261  Tgeneral_address_t _num_reg_rb [nb_request];
     262  Tcontrol_t         _read_rc    [nb_request];
     263  Tspecial_address_t _num_reg_rc [nb_request];
     264
     265  // emulation of registerFile
     266  Tcontrol_t         _gpr_val    [_param->_nb_general_register][_param->_nb_ooo_engine];
     267  Tgeneral_data_t    _gpr        [_param->_nb_general_register][_param->_nb_ooo_engine];
     268  Tcontrol_t         _spr_val    [_param->_nb_special_register][_param->_nb_ooo_engine];
     269  Tspecial_data_t    _spr        [_param->_nb_special_register][_param->_nb_ooo_engine];
     270
    229271  LABEL("Initialisation");
    230 
    231   LABEL("Reset");
     272  in_READ_UNIT_IN_VAL ->write(0);
     273  for (uint32_t i=0; i<_param->_nb_inst_retire  ; i++)
     274    in_READ_UNIT_OUT_ACK [i]->write(0);
     275  for (uint32_t i=0; i<_param->_nb_gpr_write    ; i++)
     276    in_GPR_WRITE_VAL               [i]->write(0);
     277  for (uint32_t i=0; i<_param->_nb_spr_write    ; i++)
     278    in_SPR_WRITE_VAL               [i]->write(0);
     279  for (uint32_t i=0; i<_param->_nb_bypass_write ; i++)
     280    {
     281      in_BYPASS_WRITE_GPR_VAL      [i]->write(0);
     282      in_BYPASS_WRITE_SPR_VAL      [i]->write(0);
     283    }
     284  for (uint32_t i=0; i<_param->_nb_bypass_memory; i++)
     285    in_BYPASS_MEMORY_VAL           [i]->write(0);
     286
    232287  in_NRESET->write(0);
    233288  SC_START(5);
    234   in_NRESET->write(1); 
     289  in_NRESET->write(1);
    235290
    236291  LABEL("Loop of Test");
     
    240295      LABEL("Iteration %d",iteration);
    241296
    242       SC_START(1);
     297      int32_t percent_transaction_queue_in     = (rand()%50)+25;
     298      int32_t percent_transaction_queue_out    = (rand()%50)+25;
     299      int32_t percent_registerfile_valid       = (rand()%50)+25;
     300      int32_t percent_transaction_registerfile = (rand()%50)+25;
     301      int32_t percent_transaction_bypass       = (rand()%50)+25;
     302     
     303      LABEL("Initialisation");
     304
     305      for (uint32_t i=0; i<nb_request; i++)
     306        {
     307          _ooo_engine_id   [i] = rand()% _param->_nb_ooo_engine            ;
     308          _read_ra         [i] = rand()% 2                              ;
     309          _num_reg_ra      [i] = rand()% _param->_nb_general_register   ;
     310          _read_rb         [i] = rand()% 2                              ;
     311          _num_reg_rb      [i] = rand()% _param->_nb_general_register   ;
     312          _read_rc         [i] = rand()% 2                              ;
     313          _num_reg_rc      [i] = rand()% _param->_nb_special_register   ;
     314        }
     315     
     316      // emulation of registerFile
     317      for (uint32_t j=0; j<_param->_nb_ooo_engine; j++)
     318        {
     319          for (uint32_t i=0; i<_param->_nb_general_register; i++)
     320            {
     321              _gpr_val      [i][j] = ((rand()%100) < percent_registerfile_valid);
     322              _gpr          [i][j] = range<Tgeneral_data_t>(rand(),_param->_size_general_data);
     323            }
     324          for (uint32_t i=0; i<_param->_nb_special_register; i++)
     325            {
     326              _spr_val      [i][j] = ((rand()%100) < percent_registerfile_valid);
     327              _spr          [i][j] = range<Tspecial_data_t>(rand(),_param->_size_special_data);
     328            }
     329        }
     330      // End initialisation .......
     331
     332      uint32_t request_in  = 0;
     333      uint32_t request_out = 0;
     334      bool     request_out_wait [nb_request];
     335
     336      for (uint32_t i=0; i<nb_request; i++)
     337        request_out_wait [i] = true;
     338     
     339//       bool can_gpr_use [_param->_nb_ooo_engine][_param->_nb_general_register];
     340//       bool can_spr_use [_param->_nb_ooo_engine][_param->_nb_special_register];
     341
     342      list<write_req_t> write_req_gpr;
     343      list<write_req_t> write_req_spr;
     344
     345      while (request_out < nb_request)
     346        {
     347          LABEL("request_in         : %d",request_in );
     348          LABEL("request_out        : %d",request_out);
     349          for (uint32_t i=0; i<nb_request; i++)
     350            if (request_out_wait [i])
     351              LABEL("request_out_wait   : %d",i);
     352          LABEL("write_req_gpr size : %d",write_req_gpr.size());
     353          LABEL("write_req_spr size : %d",write_req_spr.size());
     354
     355//        for (uint32_t j=0; j<_param->_nb_ooo_engine; j++)
     356//          {
     357//            for (uint32_t i=0; i<_param->_nb_general_register; i++)
     358//              can_gpr_use [j][i] = true;
     359//            for (uint32_t i=0; i<_param->_nb_special_register; i++)
     360//              can_spr_use [j][i] = true;
     361//          }
     362
     363          Tcontrol_t         read_unit_in_val = (request_in < nb_request) and ((rand()%100) < percent_transaction_queue_in);
     364          Tcontext_t         read_unit_in_ooo_engine_id;
     365          Tgeneral_address_t read_unit_in_num_reg_ra;
     366          Tgeneral_address_t read_unit_in_num_reg_rb;
     367          Tspecial_address_t read_unit_in_num_reg_rc;
     368
     369          in_READ_UNIT_IN_VAL         ->write(read_unit_in_val);
     370          if (read_unit_in_val)
     371            {
     372              bool               data_val;
     373              read_unit_in_ooo_engine_id = _ooo_engine_id [request_in];
     374              read_unit_in_num_reg_ra    = _num_reg_ra [request_in];
     375              read_unit_in_num_reg_rb    = _num_reg_rb [request_in];
     376              read_unit_in_num_reg_rc    = _num_reg_rc [request_in];
     377
     378              if (_param->_have_port_context_id)
     379              in_READ_UNIT_IN_CONTEXT_ID     ->write((2*read_unit_in_ooo_engine_id)%_param->_nb_context  );
     380              if (_param->_have_port_front_end_id)
     381              in_READ_UNIT_IN_FRONT_END_ID   ->write((3*read_unit_in_ooo_engine_id)%_param->_nb_front_end);
     382              if (_param->_have_port_ooo_engine_id)
     383              in_READ_UNIT_IN_OOO_ENGINE_ID  ->write(read_unit_in_ooo_engine_id);
     384              if (_param->_have_port_rob_ptr)
     385              in_READ_UNIT_IN_PACKET_ID   ->write(request_in);
     386              in_READ_UNIT_IN_OPERATION   ->write(0);
     387              in_READ_UNIT_IN_TYPE        ->write(0);
     388              in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE->write(0);
     389              if (_param->_have_port_load_queue_ptr)
     390              in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE ->write(0);
     391              in_READ_UNIT_IN_HAS_IMMEDIAT->write(0);
     392              in_READ_UNIT_IN_IMMEDIAT    ->write(0);
     393              in_READ_UNIT_IN_READ_RA     ->write(_read_ra[request_in]);
     394              data_val = not(_read_ra[request_in]) or _gpr_val[read_unit_in_num_reg_ra][read_unit_in_ooo_engine_id];
     395
     396              if (not data_val)
     397                if (rand ()%2)
     398                  write_req_gpr.push_back (write_req_t(read_unit_in_ooo_engine_id,read_unit_in_num_reg_ra));
     399                else
     400                  write_req_gpr.push_front(write_req_t(read_unit_in_ooo_engine_id,read_unit_in_num_reg_ra));
     401
     402
     403              in_READ_UNIT_IN_NUM_REG_RA  ->write(read_unit_in_num_reg_ra);
     404//            in_READ_UNIT_IN_DATA_RA_VAL ->write(data_val);
     405//            in_READ_UNIT_IN_DATA_RA     ->write((data_val)?_gpr[read_unit_in_num_reg_ra][read_unit_in_ooo_engine_id]:0);
     406              in_READ_UNIT_IN_READ_RB     ->write(_read_rb[request_in]);
     407              data_val = not(_read_rb[request_in]) or _gpr_val[read_unit_in_num_reg_rb][read_unit_in_ooo_engine_id];
     408
     409              if (not data_val)
     410                if (rand ()%2)
     411                  write_req_gpr.push_back (write_req_t(read_unit_in_ooo_engine_id,read_unit_in_num_reg_rb));
     412                else
     413                  write_req_gpr.push_front(write_req_t(read_unit_in_ooo_engine_id,read_unit_in_num_reg_rb));
     414
     415
     416              in_READ_UNIT_IN_NUM_REG_RB  ->write(read_unit_in_num_reg_rb);                           
     417//            in_READ_UNIT_IN_DATA_RB_VAL ->write(data_val);                           
     418//            in_READ_UNIT_IN_DATA_RB     ->write((data_val)?_gpr[read_unit_in_num_reg_rb][read_unit_in_ooo_engine_id]:0);
     419              in_READ_UNIT_IN_READ_RC     ->write(_read_rc[request_in]);
     420              data_val = not(_read_rc[request_in]) or _spr_val[read_unit_in_num_reg_rc][read_unit_in_ooo_engine_id];
     421
     422              if (not data_val)
     423                if (rand ()%2)
     424                  write_req_spr.push_back (write_req_t(read_unit_in_ooo_engine_id,read_unit_in_num_reg_rc));
     425                else
     426                  write_req_spr.push_front(write_req_t(read_unit_in_ooo_engine_id,read_unit_in_num_reg_rc));
     427
     428              in_READ_UNIT_IN_NUM_REG_RC  ->write(read_unit_in_num_reg_rc);                           
     429//            in_READ_UNIT_IN_DATA_RC_VAL ->write(data_val);                           
     430//            in_READ_UNIT_IN_DATA_RC     ->write((data_val)?_spr[read_unit_in_num_reg_rc][read_unit_in_ooo_engine_id]:0);
     431              in_READ_UNIT_IN_WRITE_RD    ->write(0);
     432              in_READ_UNIT_IN_NUM_REG_RD  ->write(0);
     433              in_READ_UNIT_IN_WRITE_RE    ->write(0);
     434              in_READ_UNIT_IN_NUM_REG_RE  ->write(0);
     435
     436//            can_gpr_use [read_unit_in_ooo_engine_id][read_unit_in_num_reg_ra] = false;
     437//            can_gpr_use [read_unit_in_ooo_engine_id][read_unit_in_num_reg_rb] = false;
     438//            can_spr_use [read_unit_in_ooo_engine_id][read_unit_in_num_reg_rc] = false;
     439            }
     440                 
     441          for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
     442            in_READ_UNIT_OUT_ACK[i]->write((rand()%100)<percent_transaction_queue_out);
     443
     444          // RegisterFile access
     445          for (uint32_t i=0; i<_param->_nb_gpr_read ; i++)
     446            {
     447              Tcontrol_t ack = (rand()%100) < percent_transaction_registerfile;
     448              in_GPR_READ_ACK      [i]->write(ack);
     449
     450              SC_START(0);
     451
     452              if (out_GPR_READ_VAL [i]->read())
     453                {
     454                  Tgeneral_address_t num_reg    = out_GPR_READ_NUM_REG       [i]->read();
     455                  Tcontext_t         ooo_engine = (_param->_have_port_ooo_engine_id)?out_GPR_READ_OOO_ENGINE_ID [i]->read():0;
     456                  Tgeneral_data_t    data       = _gpr    [num_reg][ooo_engine];
     457                  Tcontrol_t         data_val   = _gpr_val[num_reg][ooo_engine];
     458                 
     459                  if (ack)
     460                    LABEL(" * GPR_READ      [%d] - gpr[%d][%d] ->  (%d) 0x%x",i,num_reg,ooo_engine,data_val,data);
     461                 
     462                  in_GPR_READ_DATA     [i]->write(data);
     463                  in_GPR_READ_DATA_VAL [i]->write(data_val);
     464                }
     465            }
     466
     467          for (uint32_t i=0; i<_param->_nb_spr_read ; i++)
     468            {
     469              Tcontrol_t ack = (rand()%100) < percent_transaction_registerfile;
     470              in_SPR_READ_ACK      [i]->write(ack);
     471
     472              SC_START(0);
     473
     474              if (out_SPR_READ_VAL [i]->read())
     475                {
     476                  Tspecial_address_t num_reg    = out_SPR_READ_NUM_REG       [i]->read();
     477                  Tcontext_t         ooo_engine = (_param->_have_port_ooo_engine_id)?out_SPR_READ_OOO_ENGINE_ID [i]->read():0;
     478                  Tspecial_data_t    data       = _spr    [num_reg][ooo_engine];
     479                  Tcontrol_t         data_val   = _spr_val[num_reg][ooo_engine];
     480                 
     481                  if (ack)
     482                    LABEL(" * SPR_READ      [%d] - spr[%d][%d] ->  (%d) 0x%x",i,num_reg,ooo_engine,data_val,data);
     483                 
     484                  in_SPR_READ_DATA     [i]->write(data);
     485                  in_SPR_READ_DATA_VAL [i]->write(data_val);
     486                }
     487            }
     488
     489          list<write_req_t>::iterator it_gpr = write_req_gpr.begin();
     490          list<write_req_t>::iterator it_spr = write_req_spr.begin();
     491
     492          LABEL("Bypass Network :");
     493          for (uint32_t i=0; i<_param->_nb_gpr_write; i++)
     494            {
     495              Tcontext_t         ooo_engine = (it_gpr != write_req_gpr.end())?(*it_gpr).ooo:0;
     496              Tgeneral_address_t num_reg    = (it_gpr != write_req_gpr.end())?(*it_gpr).reg:0;
     497              Tcontrol_t         val     = (_gpr_val [num_reg][ooo_engine]== 0)?((rand()%100) < percent_transaction_registerfile):0;
     498              Tgeneral_data_t    data    = range<Tgeneral_data_t>(rand(),_param->_size_general_data);
     499           
     500              val = (val// and can_spr_use [ooo_engine][num_reg]
     501                     and (it_gpr != write_req_gpr.end()));
     502
     503              in_GPR_WRITE_VAL            [i]->write(val);           
     504              if (_param->_have_port_ooo_engine_id)
     505              in_GPR_WRITE_OOO_ENGINE_ID  [i]->write(ooo_engine);
     506              in_GPR_WRITE_NUM_REG        [i]->write(num_reg);
     507              in_GPR_WRITE_DATA           [i]->write(data);
     508
     509              if (val)
     510                {
     511                  LABEL(" * GPR_WRITE     [%d] - gpr[%d][%d] <- 0x%x",i,num_reg,ooo_engine,data);
     512
     513//                can_gpr_use [ooo_engine][num_reg] = false;
     514
     515                  _gpr     [num_reg][ooo_engine] = data;
     516                  _gpr_val [num_reg][ooo_engine] = 1;
     517                }
     518
     519              if (it_gpr != write_req_gpr.end())
     520                it_gpr ++;
     521            }
     522          for (uint32_t i=0; i<_param->_nb_spr_write; i++)
     523            {
     524              Tcontext_t         ooo_engine = (it_spr != write_req_spr.end())?(*it_spr).ooo:0;
     525              Tgeneral_address_t num_reg    = (it_spr != write_req_spr.end())?(*it_spr).reg:0;
     526
     527              Tcontrol_t         val     = (_spr_val [num_reg][ooo_engine]== 0)?((rand()%100) < percent_transaction_registerfile):0;
     528              Tspecial_data_t    data    = range<Tspecial_data_t>(rand(),_param->_size_special_data);
     529
     530              val = (val // and can_spr_use [ooo_engine][num_reg]
     531                     and (it_spr != write_req_spr.end()));
     532
     533              in_SPR_WRITE_VAL            [i]->write(val);           
     534              if (_param->_have_port_ooo_engine_id)
     535              in_SPR_WRITE_OOO_ENGINE_ID  [i]->write(ooo_engine);
     536              in_SPR_WRITE_NUM_REG        [i]->write(num_reg);
     537              in_SPR_WRITE_DATA           [i]->write(data);
     538
     539              if (val == 1)
     540                {
     541                  LABEL(" * SPR_WRITE     [%d] - spr[%d][%d] <- 0x%x",i,num_reg,ooo_engine,data);
     542                 
     543//                can_spr_use [ooo_engine][num_reg] = false;
     544
     545                  _spr     [num_reg][ooo_engine] = data;
     546                  _spr_val [num_reg][ooo_engine] = 1;
     547                }
     548
     549              if (it_spr != write_req_spr.end())
     550                it_spr ++;
     551
     552            }
     553
     554          for (uint32_t i=0; i<_param->_nb_bypass_write; i++)
     555            {
     556              Tcontext_t         ooo_engine = (it_gpr != write_req_gpr.end())?(*it_gpr).ooo:0;
     557              Tgeneral_address_t gpr_num_reg= (it_gpr != write_req_gpr.end())?(*it_gpr).reg:0;
     558
     559              if (_param->_have_port_ooo_engine_id)
     560              in_BYPASS_WRITE_OOO_ENGINE_ID [i]->write(ooo_engine);
     561
     562              Tcontrol_t         gpr_val     = (_gpr_val [gpr_num_reg][ooo_engine]== 0)?((rand()%100) < percent_transaction_bypass):0;
     563              Tgeneral_data_t    gpr_data    = range<Tgeneral_data_t>(rand(),_param->_size_general_data);
     564             
     565              gpr_val = (gpr_val // and can_gpr_use [ooo_engine][gpr_num_reg]
     566                         and (it_gpr != write_req_gpr.end()));
     567
     568              in_BYPASS_WRITE_GPR_VAL    [i]->write(gpr_val);         
     569              in_BYPASS_WRITE_GPR_NUM_REG[i]->write(gpr_num_reg);
     570              in_BYPASS_WRITE_GPR_DATA   [i]->write(gpr_data);
     571
     572              if (gpr_val)
     573                {
     574                  LABEL(" * BYPASS_WRITE  [%d] - gpr[%d][%d] <- 0x%x",i,gpr_num_reg,ooo_engine,gpr_data);
     575//                can_gpr_use [ooo_engine][gpr_num_reg] = false;
     576
     577                  _gpr     [gpr_num_reg][ooo_engine] = gpr_data;
     578                  _gpr_val [gpr_num_reg][ooo_engine] = 1;
     579                }
     580
     581              if (it_gpr != write_req_gpr.end())
     582                it_gpr ++;
     583
     584              Tspecial_address_t spr_num_reg = (it_spr != write_req_spr.end())?(*it_spr).reg:0;
     585              Tcontrol_t         spr_val     = (_spr_val [spr_num_reg][ooo_engine]== 0)?((rand()%100) < percent_transaction_bypass):0;
     586              Tspecial_data_t    spr_data    = range<Tspecial_data_t>(rand(),_param->_size_special_data);
     587             
     588              spr_val = (spr_val // and can_spr_use [ooo_engine][spr_num_reg]
     589                         and (it_spr != write_req_spr.end()) and ((*it_spr).ooo == ooo_engine));
     590
     591              in_BYPASS_WRITE_SPR_VAL    [i]->write(spr_val);         
     592              in_BYPASS_WRITE_SPR_NUM_REG[i]->write(spr_num_reg);
     593              in_BYPASS_WRITE_SPR_DATA   [i]->write(spr_data);
     594
     595              if (spr_val)
     596                {
     597                  LABEL(" * BYPASS_WRITE  [%d] - spr[%d][%d] <- 0x%x",i,spr_num_reg,ooo_engine,spr_data);
     598
     599//                can_spr_use [ooo_engine][spr_num_reg] = false;
     600
     601                  _spr     [spr_num_reg][ooo_engine] = spr_data;
     602                  _spr_val [spr_num_reg][ooo_engine] = 1;
     603                }
     604
     605              if (it_spr != write_req_spr.end())
     606                it_spr ++;
     607            }
     608
     609          for (uint32_t i=0; i<_param->_nb_bypass_memory; i++)
     610            {
     611              Tcontext_t         ooo_engine = (it_gpr != write_req_gpr.end())?(*it_gpr).ooo:0;
     612              Tgeneral_address_t num_reg    = (it_gpr != write_req_gpr.end())?(*it_gpr).reg:0;
     613
     614              if (_param->_have_port_ooo_engine_id)
     615              in_BYPASS_MEMORY_OOO_ENGINE_ID [i]->write(ooo_engine);
     616
     617              Tcontrol_t         val     = (_gpr_val [num_reg][ooo_engine]== 0)?((rand()%100) < percent_transaction_bypass):0;
     618              Tgeneral_data_t    data    = range<Tgeneral_data_t>(rand(),_param->_size_general_data);
     619             
     620              val = (val // and can_gpr_use [ooo_engine][num_reg]
     621                     and (it_gpr != write_req_gpr.end()));
     622
     623              in_BYPASS_MEMORY_VAL    [i]->write(val);       
     624              in_BYPASS_MEMORY_NUM_REG[i]->write(num_reg);
     625              in_BYPASS_MEMORY_DATA   [i]->write(data);
     626
     627              if (val)
     628                {
     629                  LABEL(" * BYPASS_MEMORY [%d] - gpr[%d][%d] <- 0x%x",i,num_reg,ooo_engine,data);
     630                 
     631//                can_gpr_use [ooo_engine][num_reg] = false;
     632
     633                  _gpr     [num_reg][ooo_engine] = data;
     634                  _gpr_val [num_reg][ooo_engine] = 1;
     635                }
     636
     637              if (it_gpr != write_req_gpr.end())
     638                it_gpr ++;
     639            }
     640
     641          SC_START(0); // to mealy function
     642         
     643//        LABEL("Test     READ_UNIT_IN  : "+toString(in_READ_UNIT_IN_VAL->read())+","+toString(out_READ_UNIT_IN_ACK->read()));
     644          if (( in_READ_UNIT_IN_VAL->read() == 1) and
     645              (out_READ_UNIT_IN_ACK->read() == 1))
     646            {
     647              LABEL("Accepted READ_UNIT_IN  number : %d",request_in);
     648              request_in  ++;
     649            }
     650
     651          for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
     652            {
     653              LABEL("Test     READ_UNIT_OUT %d : %d,%d",i,out_READ_UNIT_OUT_VAL[i]->read(),in_READ_UNIT_OUT_ACK[i]->read());
     654              if ((out_READ_UNIT_OUT_VAL [i]->read() == 1) and
     655                  ( in_READ_UNIT_OUT_ACK [i]->read() == 1))
     656                {
     657                  Tpacket_t  packet_id;
     658                  if (_param->_have_port_rob_ptr)
     659                    packet_id = out_READ_UNIT_OUT_PACKET_ID [i]->read();
     660                  else
     661                    packet_id = 0;
     662                  LABEL("Accepted READ_UNIT_OUT [%d] number : %d, request number : %d",i,packet_id,request_out);
     663                  TEST(bool, request_out_wait [packet_id] , true);
     664
     665                  request_out ++;
     666                  request_out_wait [packet_id] = false;
     667
     668                  Tcontext_t ooo_engine_id = _ooo_engine_id [packet_id];
     669                 
     670                  if (_param->_have_port_context_id)
     671                  TEST(Tcontext_t        ,out_READ_UNIT_OUT_CONTEXT_ID   [i]->read(),(2*ooo_engine_id)%_param->_nb_context  );
     672                  if (_param->_have_port_front_end_id)
     673                  TEST(Tcontext_t        ,out_READ_UNIT_OUT_FRONT_END_ID [i]->read(),(3*ooo_engine_id)%_param->_nb_front_end);
     674                  if (_param->_have_port_ooo_engine_id)
     675                  TEST(Tcontext_t        ,out_READ_UNIT_OUT_OOO_ENGINE_ID[i]->read(),ooo_engine_id);
     676
     677                  if (_read_ra [packet_id])
     678                  TEST(Tgeneral_data_t   ,out_READ_UNIT_OUT_DATA_RA   [i]->read(),_gpr[_num_reg_ra[packet_id]][ooo_engine_id]);
     679                 
     680                  if (_read_rb [packet_id])
     681                  TEST(Tgeneral_data_t   ,out_READ_UNIT_OUT_DATA_RB   [i]->read(),_gpr[_num_reg_rb[packet_id]][ooo_engine_id]);
     682                 
     683                  if (_read_rc [packet_id])
     684                  TEST(Tspecial_data_t   ,out_READ_UNIT_OUT_DATA_RC   [i]->read(),_spr[_num_reg_rc[packet_id]][ooo_engine_id]);
     685                }
     686            }
     687         
     688          SC_START(1);   
     689
     690          for (list<write_req_t>::iterator it = write_req_gpr.begin();
     691               it != write_req_gpr.end();
     692               )
     693            {
     694              if (_gpr_val [(*it).reg][(*it).ooo] == 1)
     695                it = write_req_gpr.erase(it);
     696              else
     697                it ++;
     698            }
     699
     700          for (list<write_req_t>::iterator it = write_req_spr.begin();
     701               it != write_req_spr.end();
     702               )
     703            {
     704              if (_spr_val [(*it).reg][(*it).ooo] == 1)
     705                it = write_req_spr.erase(it);
     706              else
     707                it ++;
     708            }
     709        }
     710
     711      for (uint32_t i=0; i<nb_request; i++)
     712        TEST(bool, request_out_wait [i] , false);
    243713    }
     714  }
    244715
    245716  /********************************************************
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/include/Parameters.h

    r81 r88  
    2626  {
    2727    //-----[ fields ]------------------------------------------------------------
    28   public : const uint32_t    _size_read_queue         ;
    29   public : const uint32_t    _size_reservation_station;
    30   public : const uint32_t    _nb_context              ;
    31   public : const uint32_t    _nb_front_end            ;
    32   public : const uint32_t    _nb_ooo_engine           ;
    33   public : const uint32_t    _nb_packet               ;
    34   public : const uint32_t    _size_general_data       ;
    35   public : const uint32_t    _size_special_data       ;
    36   public : const uint32_t    _nb_general_register     ;
    37   public : const uint32_t    _nb_special_register     ;
    38   public : const uint32_t    _nb_gpr_write            ;
    39   public : const uint32_t    _nb_spr_write            ;
    40   public : const uint32_t    _size_store_queue        ;
    41   public : const uint32_t    _size_load_queue         ;
    42   public : const uint32_t    _nb_inst_retire          ;
    43   public : const uint32_t    _nb_bypass_write         ;
    44   public : const uint32_t    _nb_bypass_memory        ;
    45                                                      
    46   public : const uint32_t    _nb_gpr_read             ;
    47   public : const uint32_t    _nb_spr_read             ;   
    48   public : const uint32_t    _size_context_id         ;
    49   public : const uint32_t    _size_front_end_id       ;
    50   public : const uint32_t    _size_ooo_engine_id      ;
    51   public : const uint32_t    _size_packet_id          ;
    52   public : const uint32_t    _size_general_register   ;
    53   public : const uint32_t    _size_special_register   ;
     28  public : uint32_t    _size_read_queue         ;
     29  public : uint32_t    _size_reservation_station;
     30  public : uint32_t    _nb_context              ;
     31  public : uint32_t    _nb_front_end            ;
     32  public : uint32_t    _nb_ooo_engine           ;
     33  public : uint32_t    _nb_packet               ;
     34//public : uint32_t    _size_general_data       ;
     35//public : uint32_t    _size_special_data       ;
     36  public : uint32_t    _nb_general_register     ;
     37  public : uint32_t    _nb_special_register     ;
     38  public : uint32_t    _nb_gpr_write            ;
     39  public : uint32_t    _nb_spr_write            ;
     40//public : uint32_t    _size_store_queue        ;
     41//public : uint32_t    _size_load_queue         ;
     42  public : uint32_t    _nb_inst_retire          ;
     43  public : uint32_t    _nb_bypass_write         ;
     44  public : uint32_t    _nb_bypass_memory        ;
     45                                             
     46  public : uint32_t    _nb_gpr_read             ;
     47  public : uint32_t    _nb_spr_read             ;   
     48//public : uint32_t    _size_context_id         ;
     49//public : uint32_t    _size_front_end_id       ;
     50//public : uint32_t    _size_ooo_engine_id      ;
     51//public : uint32_t    _size_packet_id          ;
     52//public : uint32_t    _size_general_register   ;
     53//public : uint32_t    _size_special_register   ;
    5454
    55   public : const bool        _have_port_context_id    ;
    56   public : const bool        _have_port_front_end_id  ;
    57   public : const bool        _have_port_ooo_engine_id ;
    58   public : const bool        _have_port_packet_id     ;
    59   public : const bool        _have_port_load_queue_ptr;
     55//public : bool        _have_port_context_id    ;
     56//public : bool        _have_port_front_end_id  ;
     57//public : bool        _have_port_ooo_engine_id ;
     58//public : bool        _have_port_packet_id     ;
     59//public : bool        _have_port_load_queue_ptr;
    6060
    6161  public : morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue         ::Parameters * _param_read_queue;
     
    7979                        uint32_t nb_inst_retire          ,
    8080                        uint32_t nb_bypass_write         ,
    81                         uint32_t nb_bypass_memory        );
    82   public : Parameters  (Parameters & param) ;
     81                        uint32_t nb_bypass_memory        ,
     82                        bool     is_toplevel=false);
     83//public : Parameters  (Parameters & param) ;
    8384  public : ~Parameters () ;
     85
     86  public :        void            copy       (void);
    8487
    8588  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Parameters.cpp

    r81 r88  
    2020#define FUNCTION "Read_unit::Parameters"
    2121  Parameters::Parameters (uint32_t size_read_queue         ,
    22                           uint32_t size_reservation_station,
    23                           uint32_t nb_context              ,
    24                           uint32_t nb_front_end            ,
    25                           uint32_t nb_ooo_engine           ,
    26                           uint32_t nb_packet               ,
    27                           uint32_t size_general_data       ,
    28                           uint32_t size_special_data       ,
    29                           uint32_t nb_general_register     ,
    30                           uint32_t nb_special_register     ,
    31                           uint32_t nb_gpr_write            ,
    32                           uint32_t nb_spr_write            ,
    33                           uint32_t size_store_queue        ,
    34                           uint32_t size_load_queue         ,
    35                           uint32_t nb_inst_retire          ,
    36                           uint32_t nb_bypass_write         ,
    37                           uint32_t nb_bypass_memory        ):
    38     _size_read_queue          (size_read_queue         ),
    39     _size_reservation_station (size_reservation_station),
    40     _nb_context               (nb_context              ),
    41     _nb_front_end             (nb_front_end            ),
    42     _nb_ooo_engine            (nb_ooo_engine           ),
    43     _nb_packet                (nb_packet               ),
    44     _size_general_data        (size_general_data       ),
    45     _size_special_data        (size_special_data       ),
    46     _nb_general_register      (nb_general_register     ),
    47     _nb_special_register      (nb_special_register     ),
    48     _nb_gpr_write             (nb_gpr_write            ),
    49     _nb_spr_write             (nb_spr_write            ),
    50     _size_store_queue         (size_store_queue        ),
    51     _size_load_queue          (size_load_queue         ),
    52     _nb_inst_retire           (nb_inst_retire          ),
    53     _nb_bypass_write          (nb_bypass_write         ),
    54     _nb_bypass_memory         (nb_bypass_memory        ),
    55    
    56     _nb_gpr_read              (2),
    57     _nb_spr_read              (1),   
    58     _size_context_id          (log2(nb_context         )),
    59     _size_front_end_id        (log2(nb_front_end       )),
    60     _size_ooo_engine_id       (log2(nb_ooo_engine      )),
    61     _size_packet_id           (log2(nb_packet          )),
    62     _size_general_register    (log2(nb_general_register)),
    63     _size_special_register    (log2(nb_special_register)),
    64    
    65     _have_port_context_id     (_size_context_id   >0),
    66     _have_port_front_end_id   (_size_front_end_id >0),
    67     _have_port_ooo_engine_id  (_size_ooo_engine_id>0),
    68     _have_port_packet_id      (_size_packet_id    >0),
    69     _have_port_load_queue_ptr (_size_load_queue   >1)
     22                          uint32_t size_reservation_station,
     23                          uint32_t nb_context              ,
     24                          uint32_t nb_front_end            ,
     25                          uint32_t nb_ooo_engine           ,
     26                          uint32_t nb_packet               ,
     27                          uint32_t size_general_data       ,
     28                          uint32_t size_special_data       ,
     29                          uint32_t nb_general_register     ,
     30                          uint32_t nb_special_register     ,
     31                          uint32_t nb_gpr_write            ,
     32                          uint32_t nb_spr_write            ,
     33                          uint32_t size_store_queue        ,
     34                          uint32_t size_load_queue         ,
     35                          uint32_t nb_inst_retire          ,
     36                          uint32_t nb_bypass_write         ,
     37                          uint32_t nb_bypass_memory        ,
     38                          bool     is_toplevel)
    7039  {
    7140    log_printf(FUNC,Read_unit,FUNCTION,"Begin");
    7241
     42    _size_read_queue          = size_read_queue         ;
     43    _size_reservation_station = size_reservation_station;
     44    _nb_context               = nb_context              ;
     45    _nb_front_end             = nb_front_end            ;
     46    _nb_ooo_engine            = nb_ooo_engine           ;
     47    _nb_packet                = nb_packet               ;
     48    _nb_general_register      = nb_general_register     ;
     49    _nb_special_register      = nb_special_register     ;
     50    _nb_gpr_write             = nb_gpr_write            ;
     51    _nb_spr_write             = nb_spr_write            ;
     52    _nb_inst_retire           = nb_inst_retire          ;
     53    _nb_bypass_write          = nb_bypass_write         ;
     54    _nb_bypass_memory         = nb_bypass_memory        ;
     55   
     56    _nb_gpr_read              = 2;
     57    _nb_spr_read              = 1;   
     58
    7359    _param_read_queue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Parameters
    74       ( _size_read_queue   
    75         ,_nb_context         
    76         ,_nb_front_end       
    77         ,_nb_ooo_engine
    78         ,_nb_packet         
    79         ,_size_general_data 
    80         ,_size_special_data 
    81         ,_nb_general_register
    82         ,_nb_special_register
    83         ,_nb_gpr_write
    84         ,_nb_spr_write
    85         ,_size_store_queue
    86         ,_size_load_queue
    87         );
     60      (_size_read_queue   
     61      ,_nb_context         
     62      ,_nb_front_end       
     63      ,_nb_ooo_engine
     64      ,_nb_packet         
     65      , size_general_data 
     66      , size_special_data 
     67      ,_nb_general_register
     68      ,_nb_special_register
     69      ,_nb_gpr_write
     70      ,_nb_spr_write
     71      , size_store_queue
     72      , size_load_queue
     73      );
    8874
    8975    _param_reservation_station = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Parameters
    90         (size_reservation_station
    91          ,nb_inst_retire     
    92          ,nb_context         
    93          ,nb_front_end       
    94          ,nb_ooo_engine
    95          ,nb_packet         
    96          ,size_general_data 
    97          ,size_special_data 
    98          ,nb_general_register
    99          ,nb_special_register
    100          ,nb_gpr_write
    101          ,nb_spr_write
    102          ,nb_bypass_write
    103          ,nb_bypass_memory
    104          ,size_store_queue
    105          ,size_load_queue
    106          );
    107 
     76        (_size_reservation_station
     77        ,_nb_inst_retire     
     78        ,_nb_context         
     79        ,_nb_front_end       
     80        ,_nb_ooo_engine
     81        ,_nb_packet         
     82        , size_general_data 
     83        , size_special_data 
     84        ,_nb_general_register
     85        ,_nb_special_register
     86        ,_nb_gpr_write
     87        ,_nb_spr_write
     88        ,_nb_bypass_write
     89        ,_nb_bypass_memory
     90        , size_store_queue
     91        , size_load_queue
     92        );
    10893
    10994    test();
     95
     96    if (is_toplevel)
     97      {
     98        _size_context_id          = log2(nb_context         );
     99        _size_front_end_id        = log2(nb_front_end       );
     100        _size_ooo_engine_id       = log2(nb_ooo_engine      );
     101        _size_rob_ptr             = log2(nb_packet          );
     102        _size_general_register    = log2(nb_general_register);
     103        _size_special_register    = log2(nb_special_register);
     104        _size_general_data        = size_general_data       ;
     105        _size_special_data        = size_special_data       ;
     106        _size_store_queue_ptr     = log2(size_store_queue   );
     107        _size_load_queue_ptr      = log2(size_load_queue    );
     108       
     109        _have_port_context_id     = _size_context_id     > 0;
     110        _have_port_front_end_id   = _size_front_end_id   > 0;
     111        _have_port_ooo_engine_id  = _size_ooo_engine_id  > 0;
     112        _have_port_rob_ptr        = _size_rob_ptr        > 0;
     113        _have_port_load_queue_ptr = _size_load_queue_ptr > 0;
     114
     115        copy();
     116      }
    110117
    111118    log_printf(FUNC,Read_unit,FUNCTION,"End");
    112119  };
    113120 
     121// #undef  FUNCTION
     122// #define FUNCTION "Read_unit::Parameters (copy)"
     123//   Parameters::Parameters (Parameters & param):
     124//     _size_read_queue          (param._size_read_queue         ),
     125//     _size_reservation_station (param._size_reservation_station),
     126//     _nb_context               (param._nb_context              ),
     127//     _nb_front_end             (param._nb_front_end            ),
     128//     _nb_ooo_engine            (param._nb_ooo_engine           ),
     129//     _nb_packet                (param._nb_packet               ),
     130//     _size_general_data        (param._size_general_data       ),
     131//     _size_special_data        (param._size_special_data       ),
     132//     _nb_general_register      (param._nb_general_register     ),
     133//     _nb_special_register      (param._nb_special_register     ),
     134//     _nb_gpr_write             (param._nb_gpr_write            ),
     135//     _nb_spr_write             (param._nb_spr_write            ),
     136//     _size_store_queue         (param._size_store_queue        ),
     137//     _size_load_queue          (param._size_load_queue         ),
     138//     _nb_inst_retire           (param._nb_inst_retire          ),
     139//     _nb_bypass_write          (param._nb_bypass_write         ),
     140//     _nb_bypass_memory         (param._nb_bypass_memory        ),
     141
     142//     _nb_gpr_read              (param._nb_gpr_read             ),
     143//     _nb_spr_read              (param._nb_spr_read             ),   
     144//     _size_context_id          (param._size_context_id         ),
     145//     _size_front_end_id        (param._size_front_end_id       ),
     146//     _size_ooo_engine_id       (param._size_ooo_engine_id      ),
     147//     _size_packet_id           (param._size_packet_id          ),
     148//     _size_general_register    (param._size_general_register   ),
     149//     _size_special_register    (param._size_special_register   ),
     150
     151//     _have_port_context_id     (param._have_port_context_id    ),
     152//     _have_port_front_end_id   (param._have_port_front_end_id  ),
     153//     _have_port_ooo_engine_id  (param._have_port_ooo_engine_id ),
     154//     _have_port_packet_id      (param._have_port_packet_id     ),
     155//     _have_port_load_queue_ptr (param._have_port_load_queue_ptr)
     156//   {
     157//     log_printf(FUNC,Read_unit,FUNCTION,"Begin");
     158
     159//     _param_read_queue          = param._param_read_queue         ;
     160//     _param_reservation_station = param._param_reservation_station;
     161
     162//     test();
     163
     164//     log_printf(FUNC,Read_unit,FUNCTION,"End");
     165//   };
     166
    114167#undef  FUNCTION
    115 #define FUNCTION "Read_unit::Parameters (copy)"
    116   Parameters::Parameters (Parameters & param):
    117     _size_read_queue          (param._size_read_queue         ),
    118     _size_reservation_station (param._size_reservation_station),
    119     _nb_context               (param._nb_context              ),
    120     _nb_front_end             (param._nb_front_end            ),
    121     _nb_ooo_engine            (param._nb_ooo_engine           ),
    122     _nb_packet                (param._nb_packet               ),
    123     _size_general_data        (param._size_general_data       ),
    124     _size_special_data        (param._size_special_data       ),
    125     _nb_general_register      (param._nb_general_register     ),
    126     _nb_special_register      (param._nb_special_register     ),
    127     _nb_gpr_write             (param._nb_gpr_write            ),
    128     _nb_spr_write             (param._nb_spr_write            ),
    129     _size_store_queue         (param._size_store_queue        ),
    130     _size_load_queue          (param._size_load_queue         ),
    131     _nb_inst_retire           (param._nb_inst_retire          ),
    132     _nb_bypass_write          (param._nb_bypass_write         ),
    133     _nb_bypass_memory         (param._nb_bypass_memory        ),
    134 
    135     _nb_gpr_read              (param._nb_gpr_read             ),
    136     _nb_spr_read              (param._nb_spr_read             ),   
    137     _size_context_id          (param._size_context_id         ),
    138     _size_front_end_id        (param._size_front_end_id       ),
    139     _size_ooo_engine_id       (param._size_ooo_engine_id      ),
    140     _size_packet_id           (param._size_packet_id          ),
    141     _size_general_register    (param._size_general_register   ),
    142     _size_special_register    (param._size_special_register   ),
    143 
    144     _have_port_context_id     (param._have_port_context_id    ),
    145     _have_port_front_end_id   (param._have_port_front_end_id  ),
    146     _have_port_ooo_engine_id  (param._have_port_ooo_engine_id ),
    147     _have_port_packet_id      (param._have_port_packet_id     ),
    148     _have_port_load_queue_ptr (param._have_port_load_queue_ptr)
     168#define FUNCTION "Read_unit::~Parameters"
     169  Parameters::~Parameters (void)
    149170  {
    150171    log_printf(FUNC,Read_unit,FUNCTION,"Begin");
    151172
    152     _param_read_queue          = param._param_read_queue         ;
    153     _param_reservation_station = param._param_reservation_station;
    154 
    155     test();
     173    delete _param_read_queue;
     174    delete _param_reservation_station;
    156175
    157176    log_printf(FUNC,Read_unit,FUNCTION,"End");
     
    159178
    160179#undef  FUNCTION
    161 #define FUNCTION "Read_unit::~Parameters"
    162   Parameters::~Parameters ()
     180#define FUNCTION "Read_unit::copy"
     181  void Parameters::copy (void)
    163182  {
    164183    log_printf(FUNC,Read_unit,FUNCTION,"Begin");
    165184
    166     delete _param_read_queue;
    167     delete _param_reservation_station;
     185    COPY(_param_read_queue);
     186    COPY(_param_reservation_station);
    168187
    169188    log_printf(FUNC,Read_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Parameters_print.cpp

    r81 r88  
    3939    xml.singleton_begin("nb_gpr_write            "); xml.attribut("value",toString(_nb_gpr_write            )); xml.singleton_end();
    4040    xml.singleton_begin("nb_spr_write            "); xml.attribut("value",toString(_nb_spr_write            )); xml.singleton_end();
    41     xml.singleton_begin("size_store_queue        "); xml.attribut("value",toString(_size_store_queue        )); xml.singleton_end();
    42     xml.singleton_begin("size_load_queue         "); xml.attribut("value",toString(_size_load_queue         )); xml.singleton_end();
     41//  xml.singleton_begin("size_store_queue        "); xml.attribut("value",toString(_size_store_queue        )); xml.singleton_end();
     42//  xml.singleton_begin("size_load_queue         "); xml.attribut("value",toString(_size_load_queue         )); xml.singleton_end();
    4343    xml.singleton_begin("nb_inst_retire          "); xml.attribut("value",toString(_nb_inst_retire          )); xml.singleton_end();
    4444    xml.singleton_begin("nb_bypass_write         "); xml.attribut("value",toString(_nb_bypass_write         )); xml.singleton_end();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Read_unit.cpp

    r81 r88  
    3838    log_printf(FUNC,Read_unit,FUNCTION,"Begin");
    3939
     40#if DEBUG_Read_unit == true
     41    log_printf(INFO,Read_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif   
     45
    4046    log_printf(INFO,Read_unit,FUNCTION,"Allocation");
    4147
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    5157        log_printf(INFO,Read_unit,FUNCTION,"Allocation of statistics");
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
     
    6672
    6773#ifdef SYSTEMC
    68     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    6975      {
    7076        log_printf(INFO,Read_unit,FUNCTION,"Method - transition");
     
    9096
    9197#ifdef STATISTICS
    92     if (_usage & USE_STATISTICS)
     98    if (usage_is_set(_usage,USE_STATISTICS))
    9399      {
    94100        log_printf(INFO,Read_unit,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Read_unit_allocation.cpp

    r82 r88  
    4848                                                         ,IN
    4949                                                         ,SOUTH,
    50                                                          "Generalist interface"
     50                                                         _("Generalist interface")
    5151#endif
    5252                                                         );
     
    5757    // ~~~~~[ Interface "read_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5858     {
    59        ALLOC_INTERFACE("read_unit_in", IN, WEST, "Enter of new operation");
     59       ALLOC_INTERFACE("read_unit_in", IN, WEST, _("Enter of new operation"));
    6060
    6161       ALLOC_VALACK_IN    ( in_READ_UNIT_IN_VAL,VAL);
     
    6464       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_FRONT_END_ID         ,"front_end_id"         ,Tcontext_t        ,_param->_size_front_end_id );
    6565       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_OOO_ENGINE_ID        ,"ooo_engine_id"        ,Tcontext_t        ,_param->_size_ooo_engine_id);
    66        ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_PACKET_ID            ,"packet_id"            ,Tpacket_t         ,_param->_size_packet_id    );
     66       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_PACKET_ID            ,"packet_id"            ,Tpacket_t         ,_param->_size_rob_ptr    );
    6767       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_OPERATION            ,"operation"            ,Toperation_t      ,_param->_size_operation    );
    6868       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_TYPE                 ,"type"                 ,Ttype_t           ,_param->_size_type         );
    69        ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,log2(_param->_size_store_queue));
    70        ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,log2(_param->_size_load_queue));
     69       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr);
     70       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr);
    7171       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_HAS_IMMEDIAT         ,"has_immediat"         ,Tcontrol_t        ,1);
    7272       ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_IMMEDIAT             ,"immediat"             ,Tgeneral_data_t   ,_param->_size_general_data);
     
    8585    // ~~~~~[ Interface "read_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8686     {
    87        ALLOC1_INTERFACE("read_unit_out", OUT, EAST, "Output of operation. All operand is valid.", _param->_nb_inst_retire);
     87       ALLOC1_INTERFACE("read_unit_out", OUT, EAST, _("Output of operation. All operand is valid."), _param->_nb_inst_retire);
    8888
    8989       ALLOC1_VALACK_OUT   (out_READ_UNIT_OUT_VAL,VAL);
     
    9292       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_FRONT_END_ID         ,"front_end_id"         ,Tcontext_t        ,_param->_size_front_end_id    );
    9393       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_OOO_ENGINE_ID        ,"ooo_engine_id"        ,Tcontext_t        ,_param->_size_ooo_engine_id   );
    94        ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_PACKET_ID            ,"packet_id"            ,Tpacket_t         ,_param->_size_packet_id       );
     94       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_PACKET_ID            ,"packet_id"            ,Tpacket_t         ,_param->_size_rob_ptr       );
    9595       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_OPERATION            ,"operation"            ,Toperation_t      ,_param->_size_operation       );
    9696       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_TYPE                 ,"type"                 ,Ttype_t           ,_param->_size_type            );
    97        ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,log2(_param->_size_store_queue));
    98        ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,log2(_param->_size_load_queue ));
     97       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr);
     98       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr);
    9999       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_HAS_IMMEDIAT         ,"has_immediat"         ,Tcontrol_t        ,1                             );
    100100       ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_IMMEDIAT             ,"immediat"             ,Tgeneral_data_t   ,_param->_size_general_data    );
     
    110110    // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    111111     {
    112        ALLOC1_INTERFACE("gpr_read", OUT, SOUTH, "Read port.", _param->_nb_gpr_read);
     112       ALLOC1_INTERFACE("gpr_read", OUT, SOUTH, _("Read port."), _param->_nb_gpr_read);
    113113
    114114       ALLOC1_VALACK_OUT   (out_GPR_READ_VAL,VAL);
     
    122122    // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    123123     {
    124        ALLOC1_INTERFACE("spr_read", OUT, SOUTH, "Read port.", _param->_nb_spr_read);
     124       ALLOC1_INTERFACE("spr_read", OUT, SOUTH, _("Read port."), _param->_nb_spr_read);
    125125
    126126       ALLOC1_VALACK_OUT   (out_SPR_READ_VAL,VAL);
     
    134134    // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    135135     {
    136        ALLOC1_INTERFACE("gpr_write", IN , SOUTH, "Write port.", _param->_nb_gpr_write);
     136       ALLOC1_INTERFACE("gpr_write", IN , SOUTH, _("Write port."), _param->_nb_gpr_write);
    137137
    138138       ALLOC1_VALACK_IN    ( in_GPR_WRITE_VAL,VAL);
     
    144144    // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    145145     {
    146        ALLOC1_INTERFACE("spr_write", IN , SOUTH, "Write port.", _param->_nb_spr_write);
     146       ALLOC1_INTERFACE("spr_write", IN , SOUTH, _("Write port."), _param->_nb_spr_write);
    147147
    148148       ALLOC1_VALACK_IN    ( in_SPR_WRITE_VAL,VAL);
     
    154154    // ~~~~~[ Interface "bypass_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    155155     {
    156        ALLOC1_INTERFACE("bypass_write", IN , NORTH, "Output of write_queue.", _param->_nb_bypass_write);
     156       ALLOC1_INTERFACE("bypass_write", IN , NORTH, _("Output of write_queue."), _param->_nb_bypass_write);
    157157
    158158       ALLOC1_SIGNAL_IN ( in_BYPASS_WRITE_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id   );
     
    167167    // ~~~~~[ Interface "bypass_memory" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    168168     {
    169        ALLOC1_INTERFACE("bypass_memory", IN , NORTH, "Output of write_queue.", _param->_nb_bypass_memory);
     169       ALLOC1_INTERFACE("bypass_memory", IN , NORTH, _("Output of write_queue."), _param->_nb_bypass_memory);
    170170
    171171       ALLOC1_SIGNAL_IN ( in_BYPASS_MEMORY_VAL          ,"val"          ,Tcontrol_t        ,1);
     
    177177    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    178178
    179     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    180 
    181179     std::string name;
    182180
    183181     {
    184182       name = _name+"_read_queue";
     183       log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
    185184       
    186185       _component_read_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Read_queue
     
    200199     {
    201200       name = _name+"_reservation_station";
    202        
     201       log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());     
     202 
    203203       _component_reservation_station  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Reservation_station
    204204         (name.c_str()
     
    219219     {
    220220       name = _name+"_read_queue";
    221        std::cout << "Instance : " << name << std::endl;
     221       log_printf(INFO,Core,FUNCTION,_("Instance : %s"),name.c_str());
     222
    222223       {
    223224#ifdef POSITION
     
    246247         if (_param->_have_port_ooo_engine_id)
    247248         _component->port_map(name, "in_READ_QUEUE_IN_OOO_ENGINE_ID"        ,dest, "in_READ_UNIT_IN_OOO_ENGINE_ID"        );
    248          if (_param->_have_port_packet_id)
     249         if (_param->_have_port_rob_ptr)
    249250         _component->port_map(name, "in_READ_QUEUE_IN_ROB_ID"               ,dest, "in_READ_UNIT_IN_PACKET_ID"            );
    250251         _component->port_map(name, "in_READ_QUEUE_IN_OPERATION"            ,dest, "in_READ_UNIT_IN_OPERATION"            );
     
    283284         if (_param->_have_port_ooo_engine_id)
    284285         _component->port_map(name,"out_READ_QUEUE_OUT_OOO_ENGINE_ID"        ,dest, "in_INSERT_OOO_ENGINE_ID"        );
    285          if (_param->_have_port_packet_id)
     286         if (_param->_have_port_rob_ptr)
    286287         _component->port_map(name,"out_READ_QUEUE_OUT_ROB_ID"               ,dest, "in_INSERT_ROB_ID"               );
    287288         _component->port_map(name,"out_READ_QUEUE_OUT_OPERATION"            ,dest, "in_INSERT_OPERATION"            );
     
    379380     {
    380381       name = _name+"_reservation_station";
    381        std::cout << "Instance : " << name << std::endl;
     382       log_printf(INFO,Core,FUNCTION,_("Instance : %s"),name.c_str());
    382383       {
    383384#ifdef POSITION
     
    407408         if (_param->_have_port_ooo_engine_id)
    408409         _component->port_map(name, "in_INSERT_OOO_ENGINE_ID"        ,dest,"out_READ_QUEUE_OUT_OOO_ENGINE_ID"        );
    409          if (_param->_have_port_packet_id)
     410         if (_param->_have_port_rob_ptr)
    410411         _component->port_map(name, "in_INSERT_ROB_ID"               ,dest,"out_READ_QUEUE_OUT_ROB_ID"               );
    411412         _component->port_map(name, "in_INSERT_OPERATION"            ,dest,"out_READ_QUEUE_OUT_OPERATION"            );
     
    452453           if (_param->_have_port_ooo_engine_id)
    453454           _component->port_map(name,"out_RETIRE_"+toString(i)+"_OOO_ENGINE_ID"        ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_OOO_ENGINE_ID"        );
    454            if (_param->_have_port_packet_id)
     455           if (_param->_have_port_rob_ptr)
    455456           _component->port_map(name,"out_RETIRE_"+toString(i)+"_ROB_ID"               ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_PACKET_ID"            );
    456457           _component->port_map(name,"out_RETIRE_"+toString(i)+"_OPERATION"            ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_OPERATION"            );
     
    535536     }
    536537     
    537 
    538 #ifdef POSITION
    539     _component->generate_file();
     538#if DEBUG_Read_unit == true
     539     _component->test_map();
     540#endif
     541
     542#ifdef POSITION
     543     if (usage_is_set(_usage,USE_POSITION))
     544       _component->generate_file();
    540545#endif
    541546
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Read_unit_deallocation.cpp

    r81 r88  
    2323    log_printf(FUNC,Read_unit,FUNCTION,"Begin");
    2424
    25     if (_usage & USE_SYSTEMC)
     25    if (usage_is_set(_usage,USE_SYSTEMC))
    2626      {
    2727        delete     in_CLOCK ;
     
    3737        if (_param->_have_port_ooo_engine_id)
    3838        delete     in_READ_UNIT_IN_OOO_ENGINE_ID        ;
    39         if (_param->_have_port_packet_id)
     39        if (_param->_have_port_rob_ptr)
    4040        delete     in_READ_UNIT_IN_PACKET_ID            ;
    4141        delete     in_READ_UNIT_IN_OPERATION            ;
     
    6666        if (_param->_have_port_ooo_engine_id)
    6767        delete [] out_READ_UNIT_OUT_OOO_ENGINE_ID        ;
    68         if (_param->_have_port_packet_id)
     68        if (_param->_have_port_rob_ptr)
    6969        delete [] out_READ_UNIT_OUT_PACKET_ID            ;
    7070        delete [] out_READ_UNIT_OUT_OPERATION            ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Read_unit_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
    33     _interfaces->testbench();
     34    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     35      _interfaces->testbench();
    3436#endif
    3537
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Execute_queue_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/configuration.cfg

    r81 r88  
    11Execute_queue
    2 8       8       *2 # uint32_t size_queue         
     28       16      *2 # uint32_t size_queue         
    331       1       *2 # uint32_t nb_context         
    441       1       *2 # uint32_t nb_front_end       
    551       4       *2 # uint32_t nb_ooo_engine     
    6 32      32      *2 # uint32_t nb_packet         
     664      64      *2 # uint32_t nb_packet         
    7732      32      *2 # uint32_t size_general_data 
    882       2       *2 # uint32_t size_special_data 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/main.cpp

    r81 r88  
    5454         nb_packet          ,
    5555         size_general_data  ,
    56          size_special_data  );
     56         size_special_data  ,
     57         true // is_toplevel
     58         );
    5759     
    5860      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/test.cpp

    r82 r88  
    77 */
    88
    9 #define NB_ITERATION  1
     9#define NB_ITERATION  16
    1010#define CYCLE_MAX     (128*NB_ITERATION)
    1111
     
    2727  public  : Tcontrol_t         _no_sequence  ;
    2828  public  : Tgeneral_data_t    _address      ;
     29  public  : Tgeneral_data_t    _data         ;
    2930   
    3031  public  : entry_t (Tcontext_t         context_id   ,
     
    3738                     Texception_t       exception    ,
    3839                     Tcontrol_t         no_sequence  ,
    39                      Tgeneral_data_t    address      )
     40                     Tgeneral_data_t    address      ,
     41                     Tgeneral_data_t    data         )
    4042    {
    4143      _context_id    = context_id   ;
     
    4951      _no_sequence   = no_sequence  ;
    5052      _address       = address      ;
     53      _data          = data         ;
    5154    };
    5255
     
    6366                    << " * _exception     : " << toString(x._exception    ) << std::endl
    6467                    << " * _no_sequence   : " << toString(x._no_sequence  ) << std::endl
    65                     << " * _address       : " << toString(x._address      ) << std::endl;
     68                    << " * _address       : " << toString(x._address      ) << std::endl
     69                    << " * _data          : " << toString(x._data         ) << std::endl;
    6670
    6771      return output_stream;
     
    8084  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50);
    8185#endif
     86
     87  Tusage_t _usage = USE_ALL;
     88
     89//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     90//   _usage = usage_unset(_usage,USE_VHDL                 );
     91//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     92//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     93//   _usage = usage_unset(_usage,USE_POSITION             );
     94//   _usage = usage_unset(_usage,USE_STATISTICS           );
     95//   _usage = usage_unset(_usage,USE_INFORMATION          );
    8296
    8397  Execute_queue * _Execute_queue = new Execute_queue
     
    87101#endif
    88102     _param,
    89      USE_ALL);
     103     _usage);
    90104 
    91105#ifdef SYSTEMC
     
    110124  ALLOC_SC_SIGNAL ( in_EXECUTE_QUEUE_IN_NO_SEQUENCE   ," in_EXECUTE_QUEUE_IN_NO_SEQUENCE"   , Tcontrol_t        );
    111125  ALLOC_SC_SIGNAL ( in_EXECUTE_QUEUE_IN_ADDRESS       ," in_EXECUTE_QUEUE_IN_ADDRESS"       , Tgeneral_data_t   );
     126  ALLOC_SC_SIGNAL ( in_EXECUTE_QUEUE_IN_DATA          ," in_EXECUTE_QUEUE_IN_DATA"          , Tgeneral_data_t   );
    112127  ALLOC_SC_SIGNAL (out_EXECUTE_QUEUE_OUT_VAL          ,"out_EXECUTE_QUEUE_OUT_VAL"          , Tcontrol_t        );
    113128  ALLOC_SC_SIGNAL ( in_EXECUTE_QUEUE_OUT_ACK          ," in_EXECUTE_QUEUE_OUT_ACK"          , Tcontrol_t        );
     
    122137  ALLOC_SC_SIGNAL (out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE"  , Tcontrol_t        );
    123138  ALLOC_SC_SIGNAL (out_EXECUTE_QUEUE_OUT_ADDRESS      ,"out_EXECUTE_QUEUE_OUT_ADDRESS"      , Tgeneral_data_t   );
     139  ALLOC_SC_SIGNAL (out_EXECUTE_QUEUE_OUT_DATA         ,"out_EXECUTE_QUEUE_OUT_DATA"         , Tgeneral_data_t   );
    124140
    125141 
     
    141157  if (_param->_have_port_ooo_engine_id)
    142158  INSTANCE_SC_SIGNAL (_Execute_queue,  in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID );
    143   if (_param->_have_port_packet_id)
     159  if (_param->_have_port_rob_ptr)
    144160  INSTANCE_SC_SIGNAL (_Execute_queue,  in_EXECUTE_QUEUE_IN_PACKET_ID     );
    145161//INSTANCE_SC_SIGNAL (_Execute_queue,  in_EXECUTE_QUEUE_IN_OPERATION     );
     
    149165  INSTANCE_SC_SIGNAL (_Execute_queue,  in_EXECUTE_QUEUE_IN_NO_SEQUENCE   );
    150166  INSTANCE_SC_SIGNAL (_Execute_queue,  in_EXECUTE_QUEUE_IN_ADDRESS       );
     167  INSTANCE_SC_SIGNAL (_Execute_queue,  in_EXECUTE_QUEUE_IN_DATA          );
    151168
    152169  INSTANCE_SC_SIGNAL (_Execute_queue, out_EXECUTE_QUEUE_OUT_VAL          );
     
    158175  if (_param->_have_port_ooo_engine_id)
    159176  INSTANCE_SC_SIGNAL (_Execute_queue, out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID);
    160   if (_param->_have_port_packet_id)
     177  if (_param->_have_port_rob_ptr)
    161178  INSTANCE_SC_SIGNAL (_Execute_queue, out_EXECUTE_QUEUE_OUT_PACKET_ID    );
    162179//INSTANCE_SC_SIGNAL (_Execute_queue, out_EXECUTE_QUEUE_OUT_OPERATION    );
     
    166183  INSTANCE_SC_SIGNAL (_Execute_queue, out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  );
    167184  INSTANCE_SC_SIGNAL (_Execute_queue, out_EXECUTE_QUEUE_OUT_ADDRESS      );
     185  INSTANCE_SC_SIGNAL (_Execute_queue, out_EXECUTE_QUEUE_OUT_DATA         );
    168186
    169187  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    212230                                     range<Texception_t      >(rand(),_param->_size_exception       ),
    213231                                     range<Tcontrol_t        >(rand(),1                             ),
     232                                     range<Tgeneral_data_t   >(rand(),_param->_size_general_data    ),
    214233                                     range<Tgeneral_data_t   >(rand(),_param->_size_general_data    ));
    215234        }
     
    236255            in_EXECUTE_QUEUE_IN_NO_SEQUENCE  ->write(request [nb_request_in]->_no_sequence  );
    237256            in_EXECUTE_QUEUE_IN_ADDRESS      ->write(request [nb_request_in]->_address      );
     257            in_EXECUTE_QUEUE_IN_DATA         ->write(request [nb_request_in]->_data         );
    238258          }
    239259        in_EXECUTE_QUEUE_OUT_ACK         ->write((rand()%100)<percent_transaction_execute_queue_out);
     
    261281          {
    262282            Tcontext_t packet;
    263             if (_param->_have_port_packet_id)
     283            if (_param->_have_port_rob_ptr)
    264284              packet = out_EXECUTE_QUEUE_OUT_PACKET_ID->read();
    265285            else
     
    281301            TEST(Tcontrol_t     , out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ->read(), request [packet]->_no_sequence  );
    282302            TEST(Tgeneral_data_t, out_EXECUTE_QUEUE_OUT_ADDRESS      ->read(), request [packet]->_address      );
     303            TEST(Tgeneral_data_t, out_EXECUTE_QUEUE_OUT_DATA         ->read(), request [packet]->_data         );
    283304
    284305            nb_request_out ++;
     
    313334  delete     in_EXECUTE_QUEUE_IN_NO_SEQUENCE   ;
    314335  delete     in_EXECUTE_QUEUE_IN_ADDRESS       ;
     336  delete     in_EXECUTE_QUEUE_IN_DATA          ;
    315337
    316338  delete    out_EXECUTE_QUEUE_OUT_VAL          ;
     
    326348  delete    out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ;
    327349  delete    out_EXECUTE_QUEUE_OUT_ADDRESS      ;
     350  delete    out_EXECUTE_QUEUE_OUT_DATA         ;
    328351#endif
    329352
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h

    r82 r88  
    7979  public    : SC_IN (Tcontrol_t        )    *  in_EXECUTE_QUEUE_IN_NO_SEQUENCE   ;
    8080  public    : SC_IN (Tgeneral_data_t   )    *  in_EXECUTE_QUEUE_IN_ADDRESS       ;
     81  public    : SC_IN (Tgeneral_data_t   )    *  in_EXECUTE_QUEUE_IN_DATA          ;
    8182
    8283    // -----[ Interface "Execute_queue_out" ]-----------------------------
     
    9394  public    : SC_OUT(Tcontrol_t        )    * out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ;
    9495  public    : SC_OUT(Tgeneral_data_t   )    * out_EXECUTE_QUEUE_OUT_ADDRESS      ;
     96  public    : SC_OUT(Tgeneral_data_t   )    * out_EXECUTE_QUEUE_OUT_DATA         ;
    9597
    9698    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h

    r81 r88  
    2626  {
    2727    //-----[ fields ]------------------------------------------------------------
    28   public : const uint32_t            _size_queue                   ;
    29   public : const uint32_t            _nb_context                   ;
    30   public : const uint32_t            _nb_front_end                 ;
    31   public : const uint32_t            _nb_ooo_engine                ;
    32   public : const uint32_t            _nb_packet                    ;
    33   public : const uint32_t            _size_general_data            ;
    34   public : const uint32_t            _size_special_data            ;
     28  public : uint32_t            _size_queue                   ;
     29  public : uint32_t            _nb_context                   ;
     30  public : uint32_t            _nb_front_end                 ;
     31  public : uint32_t            _nb_ooo_engine                ;
     32  public : uint32_t            _nb_packet                    ;
     33//public : uint32_t            _size_general_data            ;
     34//public : uint32_t            _size_special_data            ;
    3535
    36   public : const uint32_t            _size_context_id              ;
    37   public : const uint32_t            _size_front_end_id            ;
    38   public : const uint32_t            _size_ooo_engine_id           ;
    39   public : const uint32_t            _size_packet_id               ;
     36//public : uint32_t            _size_context_id              ;
     37//public : uint32_t            _size_front_end_id            ;
     38//public : uint32_t            _size_ooo_engine_id           ;
     39//public : uint32_t            _size_packet_id               ;
    4040
    41   public : const bool                _have_port_context_id         ;
    42   public : const bool                _have_port_front_end_id       ;
    43   public : const bool                _have_port_ooo_engine_id      ;
    44   public : const bool                _have_port_packet_id          ;
     41//public : bool                _have_port_context_id         ;
     42//public : bool                _have_port_front_end_id       ;
     43//public : bool                _have_port_ooo_engine_id      ;
     44//public : bool                _have_port_packet_id          ;
    4545
    4646    //-----[ methods ]-----------------------------------------------------------
     
    5151                        uint32_t nb_packet          ,
    5252                        uint32_t size_general_data  ,
    53                         uint32_t size_special_data  );
    54   public : Parameters  (Parameters & param) ;
     53                        uint32_t size_special_data  ,
     54                        bool     is_toplevel=true);
     55//public : Parameters  (Parameters & param) ;
    5556  public : ~Parameters () ;
     57
     58  public :        void            copy       (void);
    5659
    5760  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Types.h

    r82 r88  
    3232  public  : Tcontrol_t         _no_sequence  ;
    3333  public  : Tgeneral_data_t    _address      ;
     34  public  : Tgeneral_data_t    _data         ;
    3435   
    3536  public  : execute_queue_entry_t (Tcontext_t         context_id   ,
     
    4243                                   Texception_t       exception    ,
    4344                                   Tcontrol_t         no_sequence  ,
    44                                    Tgeneral_data_t    address      )
     45                                   Tgeneral_data_t    address      ,
     46                                   Tgeneral_data_t    data         )
    4547    {
    4648      _context_id    = context_id   ;
     
    5456      _no_sequence   = no_sequence  ;
    5557      _address       = address      ;
     58      _data          = data         ;
    5659    };
    5760  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue.cpp

    r81 r88  
    3939    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
    4040
     41#if DEBUG_Execute_queue == true
     42    log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
     43
     44    std::cout << *param << std::endl;
     45#endif   
     46
    4147    log_printf(INFO,Execute_queue,FUNCTION,"Allocation");
    4248    allocation ();
    4349
    4450#ifdef STATISTICS
    45     if (_usage & USE_STATISTICS)
     51    if (usage_is_set(_usage,USE_STATISTICS))
    4652      {
    4753        log_printf(INFO,Execute_queue,FUNCTION,"Allocation of statistics");
     
    5258
    5359#ifdef VHDL
    54     if (_usage & USE_VHDL)
     60    if (usage_is_set(_usage,USE_VHDL))
    5561      {
    5662        // generate the vhdl
     
    6268
    6369#ifdef SYSTEMC
    64     if (_usage & USE_SYSTEMC)
     70    if (usage_is_set(_usage,USE_SYSTEMC))
    6571      {
    6672        log_printf(INFO,Execute_queue,FUNCTION,"Method - transition");
     
    96102
    97103#ifdef STATISTICS
    98     if (_usage & USE_STATISTICS)
     104    if (usage_is_set(_usage,USE_STATISTICS))
    99105      {
    100106        log_printf(INFO,Execute_queue,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_allocation.cpp

    r81 r88  
    1717namespace write_unit {
    1818namespace execute_queue {
    19 
    20 
    2119
    2220#undef  FUNCTION
     
    6260       if(_param->_have_port_ooo_engine_id)
    6361       ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id    );
    64        if(_param->_have_port_packet_id)
    65        ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_packet_id        );
     62       if(_param->_have_port_rob_ptr)
     63       ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_rob_ptr        );
    6664//     ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation        );
    6765//     ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type             );
     
    7068       ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_NO_SEQUENCE  ,"no_sequence"  ,Tcontrol_t        ,1                              );
    7169       ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_ADDRESS      ,"address"      ,Tgeneral_data_t   ,_param->_size_general_data     );
     70       ALLOC_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_DATA         ,"data"         ,Tgeneral_data_t   ,_param->_size_general_data     );
    7271     }
    7372
     
    8483       if(_param->_have_port_ooo_engine_id)
    8584       ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t     ,_param->_size_ooo_engine_id);
    86        if(_param->_have_port_packet_id)
    87        ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_PACKET_ID    ,"packet_id"    ,Tpacket_t      ,_param->_size_packet_id    );
     85       if(_param->_have_port_rob_ptr)
     86       ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_PACKET_ID    ,"packet_id"    ,Tpacket_t      ,_param->_size_rob_ptr    );
    8887//     ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_OPERATION    ,"operation"    ,Toperation_t   ,_param->_size_operation    );
    8988//     ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_TYPE         ,"type"         ,Ttype_t        ,_param->_size_type         );
     
    9291       ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ,"no_sequence"  ,Tcontrol_t     ,1                          );
    9392       ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_ADDRESS      ,"address"      ,Tgeneral_data_t,_param->_size_general_data );
     93       ALLOC_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_DATA         ,"data"         ,Tgeneral_data_t,_param->_size_general_data );
    9494     }
    9595
     
    9999
    100100#ifdef POSITION
    101     _component->generate_file();
     101     if (usage_is_set(_usage,USE_POSITION))
     102       _component->generate_file();
    102103#endif
    103104
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_deallocation.cpp

    r81 r88  
    2424    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
    2525
    26     if (_usage & USE_SYSTEMC)
     26    if (usage_is_set(_usage,USE_SYSTEMC))
    2727      {
    2828        delete    in_CLOCK ;
     
    3838        if (_param->_have_port_ooo_engine_id)
    3939        delete      in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;
    40         if (_param->_have_port_packet_id)
     40        if (_param->_have_port_rob_ptr)
    4141        delete      in_EXECUTE_QUEUE_IN_PACKET_ID    ;
    4242//      delete      in_EXECUTE_QUEUE_IN_OPERATION    ;
     
    4646        delete      in_EXECUTE_QUEUE_IN_NO_SEQUENCE  ;
    4747        delete      in_EXECUTE_QUEUE_IN_ADDRESS      ;
     48        delete      in_EXECUTE_QUEUE_IN_DATA         ;
    4849
    4950        // -----[ Interface "execute_queue_out" ]-------------------------------   
     
    5657        if (_param->_have_port_ooo_engine_id)
    5758        delete     out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID;
    58         if (_param->_have_port_packet_id)
     59        if (_param->_have_port_rob_ptr)
    5960        delete     out_EXECUTE_QUEUE_OUT_PACKET_ID    ;
    6061//      delete     out_EXECUTE_QUEUE_OUT_OPERATION    ;
     
    6465        delete     out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ;
    6566        delete     out_EXECUTE_QUEUE_OUT_ADDRESS      ;
     67        delete     out_EXECUTE_QUEUE_OUT_DATA         ;
    6668      }
    6769
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_end_cycle.cpp

    r81 r88  
    2626
    2727#ifdef STATISTICS
    28     _stat->end_cycle();
     28    if (usage_is_set(_usage,USE_STATISTICS))
     29      _stat->end_cycle();
    2930#endif   
    3031
     
    3233    // Evaluation before read the ouput signal
    3334//  sc_start(0);
    34     _interfaces->testbench();
     35    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     36      _interfaces->testbench();
    3537#endif
    3638
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_genMoore.cpp

    r81 r88  
    4747          if (_param->_have_port_ooo_engine_id)
    4848          PORT_WRITE(out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID, _queue->front()->_ooo_engine_id);
    49           if (_param->_have_port_packet_id)
     49          if (_param->_have_port_rob_ptr)
    5050          PORT_WRITE(out_EXECUTE_QUEUE_OUT_PACKET_ID    , _queue->front()->_packet_id    );
    5151//        PORT_WRITE(out_EXECUTE_QUEUE_OUT_OPERATION    , _queue->front()->_operation    );
     
    5555          PORT_WRITE(out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  , _queue->front()->_no_sequence  );
    5656          PORT_WRITE(out_EXECUTE_QUEUE_OUT_ADDRESS      , _queue->front()->_address      );
     57          PORT_WRITE(out_EXECUTE_QUEUE_OUT_DATA         , _queue->front()->_data         );
    5758        }
    5859    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_transition.cpp

    r81 r88  
    4444               (_param->_have_port_front_end_id )?PORT_READ(in_EXECUTE_QUEUE_IN_FRONT_END_ID ):0,
    4545               (_param->_have_port_ooo_engine_id)?PORT_READ(in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID):0,
    46                (_param->_have_port_packet_id    )?PORT_READ(in_EXECUTE_QUEUE_IN_PACKET_ID    ):0,
     46               (_param->_have_port_rob_ptr      )?PORT_READ(in_EXECUTE_QUEUE_IN_PACKET_ID    ):0,
    4747             //PORT_READ(in_EXECUTE_QUEUE_IN_OPERATION    ),
    4848             //PORT_READ(in_EXECUTE_QUEUE_IN_TYPE         ),
     
    5050               PORT_READ(in_EXECUTE_QUEUE_IN_EXCEPTION    ),
    5151               PORT_READ(in_EXECUTE_QUEUE_IN_NO_SEQUENCE  ),
    52                PORT_READ(in_EXECUTE_QUEUE_IN_ADDRESS      ));
     52               PORT_READ(in_EXECUTE_QUEUE_IN_ADDRESS      ),
     53               PORT_READ(in_EXECUTE_QUEUE_IN_DATA         ));
    5354           
    5455            _queue->push(entry);
     
    6465
    6566#ifdef STATISTICS
    66     *(_stat_use_queue) += _queue->size();
     67    if (usage_is_set(_usage,USE_STATISTICS))
     68      *(_stat_use_queue) += _queue->size();
    6769#endif
    6870   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters.cpp

    r81 r88  
    2626                          uint32_t nb_packet          ,
    2727                          uint32_t size_general_data  ,
    28                           uint32_t size_special_data  ):
    29     _size_queue              (size_queue         ),
    30     _nb_context              (nb_context         ),
    31     _nb_front_end            (nb_front_end       ),
    32     _nb_ooo_engine           (nb_ooo_engine      ),
    33     _nb_packet               (nb_packet          ),
    34     _size_general_data       (size_general_data  ),
    35     _size_special_data       (size_special_data  ),
    36 
    37     _size_context_id         (log2(_nb_context         )),
    38     _size_front_end_id       (log2(_nb_front_end       )),
    39     _size_ooo_engine_id      (log2(_nb_ooo_engine      )),
    40     _size_packet_id          (log2(_nb_packet          )),
    41 
    42     _have_port_context_id    (_size_context_id    > 0),
    43     _have_port_front_end_id  (_size_front_end_id  > 0),
    44     _have_port_ooo_engine_id (_size_ooo_engine_id > 0),
    45     _have_port_packet_id     (_size_packet_id     > 0)
     28                          uint32_t size_special_data  ,
     29                          bool     is_toplevel        )
    4630  {
    4731    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
     32
     33    _size_queue              = size_queue         ;
     34    _nb_context              = nb_context         ;
     35    _nb_front_end            = nb_front_end       ;
     36    _nb_ooo_engine           = nb_ooo_engine      ;
     37    _nb_packet               = nb_packet          ;
     38
    4839    test();
     40
     41    if (is_toplevel)
     42      {
     43        _size_context_id         = log2(_nb_context   );
     44        _size_front_end_id       = log2(_nb_front_end );
     45        _size_ooo_engine_id      = log2(_nb_ooo_engine);
     46        _size_rob_ptr            = log2(_nb_packet    );
     47        _size_general_data       = size_general_data;
     48        _size_special_data       = size_special_data;
     49       
     50        _have_port_context_id    = _size_context_id    > 0;
     51        _have_port_front_end_id  = _size_front_end_id  > 0;
     52        _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
     53        _have_port_rob_ptr       = _size_rob_ptr       > 0;
     54
     55        copy();
     56      }
     57
    4958    log_printf(FUNC,Execute_queue,FUNCTION,"End");
    5059  };
    5160 
     61// #undef  FUNCTION
     62// #define FUNCTION "Execute_queue::Parameters (copy)"
     63//   Parameters::Parameters (Parameters & param):
     64//     _size_queue              (param._size_queue             ),
     65//     _nb_context              (param._nb_context             ),
     66//     _nb_front_end            (param._nb_front_end           ),
     67//     _nb_ooo_engine           (param._nb_ooo_engine          ),
     68//     _nb_packet               (param._nb_packet              ),
     69//     _size_general_data       (param._size_general_data      ),
     70//     _size_special_data       (param._size_special_data      ),
     71
     72//     _size_context_id         (param._size_context_id        ),
     73//     _size_front_end_id       (param._size_front_end_id      ),
     74//     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
     75//     _size_packet_id          (param._size_packet_id         ),
     76
     77//     _have_port_context_id    (param._have_port_context_id   ),
     78//     _have_port_front_end_id  (param._have_port_front_end_id ),
     79//     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
     80//     _have_port_packet_id     (param._have_port_packet_id    )
     81//   {
     82//     log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
     83//     test();
     84//     log_printf(FUNC,Execute_queue,FUNCTION,"End");
     85//   };
     86
    5287#undef  FUNCTION
    53 #define FUNCTION "Execute_queue::Parameters (copy)"
    54   Parameters::Parameters (Parameters & param):
    55     _size_queue              (param._size_queue             ),
    56     _nb_context              (param._nb_context             ),
    57     _nb_front_end            (param._nb_front_end           ),
    58     _nb_ooo_engine           (param._nb_ooo_engine          ),
    59     _nb_packet               (param._nb_packet              ),
    60     _size_general_data       (param._size_general_data      ),
    61     _size_special_data       (param._size_special_data      ),
    62 
    63     _size_context_id         (param._size_context_id        ),
    64     _size_front_end_id       (param._size_front_end_id      ),
    65     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
    66     _size_packet_id          (param._size_packet_id         ),
    67 
    68     _have_port_context_id    (param._have_port_context_id   ),
    69     _have_port_front_end_id  (param._have_port_front_end_id ),
    70     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
    71     _have_port_packet_id     (param._have_port_packet_id    )
     88#define FUNCTION "Execute_queue::~Parameters"
     89  Parameters::~Parameters (void)
    7290  {
    7391    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
    74     test();
    7592    log_printf(FUNC,Execute_queue,FUNCTION,"End");
    7693  };
    7794
    7895#undef  FUNCTION
    79 #define FUNCTION "Execute_queue::~Parameters"
    80   Parameters::~Parameters ()
     96#define FUNCTION "Execute_queue::copy"
     97  void Parameters::copy (void)
    8198  {
    8299    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Write_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/main.cpp

    r81 r88  
    6666         size_special_data  ,
    6767         nb_special_register,
    68          nb_bypass_write    );
     68         nb_bypass_write    ,
     69         true // is_toplevel
     70         );
    6971     
    7072      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/test.cpp

    r82 r88  
    9999#endif
    100100
     101  Tusage_t _usage = USE_ALL;
     102
     103//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     104//   _usage = usage_unset(_usage,USE_VHDL                 );
     105//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     106//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     107//   _usage = usage_unset(_usage,USE_POSITION             );
     108   _usage = usage_unset(_usage,USE_STATISTICS           );
     109//   _usage = usage_unset(_usage,USE_INFORMATION          );
     110
    101111  Write_unit * _Write_unit = new Write_unit
    102112    (name.c_str(),
     
    105115#endif
    106116     _param,
    107      USE_ALL);
     117     _usage);
    108118 
    109119#ifdef SYSTEMC
     
    145155  ALLOC_SC_SIGNAL (out_WRITE_UNIT_OUT_NO_SEQUENCE  ,"out_WRITE_UNIT_OUT_NO_SEQUENCE"  , Tcontrol_t        );
    146156  ALLOC_SC_SIGNAL (out_WRITE_UNIT_OUT_ADDRESS      ,"out_WRITE_UNIT_OUT_ADDRESS"      , Tgeneral_data_t   );
     157  ALLOC_SC_SIGNAL (out_WRITE_UNIT_OUT_DATA         ,"out_WRITE_UNIT_OUT_DATA"         , Tgeneral_data_t   );
    147158  ALLOC1_SC_SIGNAL(out_GPR_WRITE_VAL                ,"out_GPR_WRITE_VAL"                , Tcontrol_t        , _param->_nb_gpr_write);
    148159  ALLOC1_SC_SIGNAL( in_GPR_WRITE_ACK                ," in_GPR_WRITE_ACK"                , Tcontrol_t        , _param->_nb_gpr_write);
     
    181192  if (_param->_have_port_ooo_engine_id)
    182193  INSTANCE_SC_SIGNAL (_Write_unit,  in_WRITE_UNIT_IN_OOO_ENGINE_ID );
    183   if (_param->_have_port_packet_id)
     194  if (_param->_have_port_rob_ptr)
    184195  INSTANCE_SC_SIGNAL (_Write_unit,  in_WRITE_UNIT_IN_PACKET_ID     );
    185196//INSTANCE_SC_SIGNAL (_Write_unit,  in_WRITE_UNIT_IN_OPERATION     );
     
    202213  if (_param->_have_port_ooo_engine_id)
    203214  INSTANCE_SC_SIGNAL (_Write_unit, out_WRITE_UNIT_OUT_OOO_ENGINE_ID);
    204   if (_param->_have_port_packet_id)
     215  if (_param->_have_port_rob_ptr)
    205216  INSTANCE_SC_SIGNAL (_Write_unit, out_WRITE_UNIT_OUT_PACKET_ID    );
    206217//INSTANCE_SC_SIGNAL (_Write_unit, out_WRITE_UNIT_OUT_OPERATION    );
     
    210221  INSTANCE_SC_SIGNAL (_Write_unit, out_WRITE_UNIT_OUT_NO_SEQUENCE  );
    211222  INSTANCE_SC_SIGNAL (_Write_unit, out_WRITE_UNIT_OUT_ADDRESS      );
     223  INSTANCE_SC_SIGNAL (_Write_unit, out_WRITE_UNIT_OUT_DATA         );
    212224  INSTANCE1_SC_SIGNAL(_Write_unit, out_GPR_WRITE_VAL                , _param->_nb_gpr_write);
    213225  INSTANCE1_SC_SIGNAL(_Write_unit,  in_GPR_WRITE_ACK                , _param->_nb_gpr_write);
     
    445457          {
    446458            Tcontext_t packet;
    447             if (_param->_have_port_packet_id)
     459            if (_param->_have_port_rob_ptr)
    448460              packet = out_WRITE_UNIT_OUT_PACKET_ID->read();
    449461            else
     
    479491            TEST(Tcontrol_t     , out_WRITE_UNIT_OUT_NO_SEQUENCE  ->read(), request [packet]->_no_sequence  );
    480492            TEST(Tgeneral_data_t, out_WRITE_UNIT_OUT_ADDRESS      ->read(), request [packet]->_address      );
     493            TEST(Tgeneral_data_t, out_WRITE_UNIT_OUT_DATA         ->read(), request [packet]->_data_rd      );
    481494
    482495            nb_request_out ++;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Write_queue_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/configuration.cfg

    r81 r88  
    992       2       *2 # uint32_t size_special_data 
    101016      16      *2 # uint32_t nb_special_register
    11 1       8       *2 # uint32_t nb_bypass_write 
     111       8       *4 # uint32_t nb_bypass_write 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/main.cpp

    r81 r88  
    6363         size_special_data  ,
    6464         nb_special_register,
    65          nb_bypass_write    );
     65         nb_bypass_write    ,
     66         true // is_toplevel
     67         );
    6668     
    6769      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/test.cpp

    r82 r88  
    88
    99#define NB_ITERATION  1
    10 #define CYCLE_MAX     (128*NB_ITERATION)
     10#define CYCLE_MAX     (1024*NB_ITERATION)
    1111
    1212#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/test.h"
     
    9898#endif
    9999
     100  Tusage_t _usage = USE_ALL;
     101
     102//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     103//   _usage = usage_unset(_usage,USE_VHDL                 );
     104//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     105//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     106//   _usage = usage_unset(_usage,USE_POSITION             );
     107   _usage = usage_unset(_usage,USE_STATISTICS           );
     108//   _usage = usage_unset(_usage,USE_INFORMATION          );
    100109
    101110  Write_queue * _Write_queue = new Write_queue
     
    105114#endif
    106115     _param,
    107      USE_ALL);
     116     _usage);
    108117 
    109118#ifdef SYSTEMC
     
    145154  ALLOC_SC_SIGNAL (out_WRITE_QUEUE_OUT_NO_SEQUENCE  ,"out_WRITE_QUEUE_OUT_NO_SEQUENCE"  , Tcontrol_t        );
    146155  ALLOC_SC_SIGNAL (out_WRITE_QUEUE_OUT_ADDRESS      ,"out_WRITE_QUEUE_OUT_ADDRESS"      , Tgeneral_data_t   );
     156  ALLOC_SC_SIGNAL (out_WRITE_QUEUE_OUT_DATA         ,"out_WRITE_QUEUE_OUT_DATA"         , Tgeneral_data_t   );
    147157  ALLOC1_SC_SIGNAL(out_GPR_WRITE_VAL                ,"out_GPR_WRITE_VAL"                , Tcontrol_t        , _param->_nb_gpr_write);
    148158  ALLOC1_SC_SIGNAL( in_GPR_WRITE_ACK                ," in_GPR_WRITE_ACK"                , Tcontrol_t        , _param->_nb_gpr_write);
     
    180190  if (_param->_have_port_ooo_engine_id)
    181191  INSTANCE_SC_SIGNAL (_Write_queue,  in_WRITE_QUEUE_IN_OOO_ENGINE_ID );
    182   if (_param->_have_port_packet_id)
     192  if (_param->_have_port_rob_ptr  )
    183193  INSTANCE_SC_SIGNAL (_Write_queue,  in_WRITE_QUEUE_IN_PACKET_ID     );
    184194//INSTANCE_SC_SIGNAL (_Write_queue,  in_WRITE_QUEUE_IN_OPERATION     );
     
    201211  if (_param->_have_port_ooo_engine_id)
    202212  INSTANCE_SC_SIGNAL (_Write_queue, out_WRITE_QUEUE_OUT_OOO_ENGINE_ID);
    203   if (_param->_have_port_packet_id)
     213  if (_param->_have_port_rob_ptr  )
    204214  INSTANCE_SC_SIGNAL (_Write_queue, out_WRITE_QUEUE_OUT_PACKET_ID    );
    205215//INSTANCE_SC_SIGNAL (_Write_queue, out_WRITE_QUEUE_OUT_OPERATION    );
     
    209219  INSTANCE_SC_SIGNAL (_Write_queue, out_WRITE_QUEUE_OUT_NO_SEQUENCE  );
    210220  INSTANCE_SC_SIGNAL (_Write_queue, out_WRITE_QUEUE_OUT_ADDRESS      );
     221  INSTANCE_SC_SIGNAL (_Write_queue, out_WRITE_QUEUE_OUT_DATA         );
    211222  INSTANCE1_SC_SIGNAL(_Write_queue, out_GPR_WRITE_VAL                , _param->_nb_gpr_write);
    212223  INSTANCE1_SC_SIGNAL(_Write_queue,  in_GPR_WRITE_ACK                , _param->_nb_gpr_write);
     
    444455          {
    445456            Tcontext_t packet;
    446             if (_param->_have_port_packet_id)
     457            if (_param->_have_port_rob_ptr)
    447458              packet = out_WRITE_QUEUE_OUT_PACKET_ID->read();
    448459            else
     
    478489            TEST(Tcontrol_t     , out_WRITE_QUEUE_OUT_NO_SEQUENCE  ->read(), request [packet]->_no_sequence  );
    479490            TEST(Tgeneral_data_t, out_WRITE_QUEUE_OUT_ADDRESS      ->read(), request [packet]->_address      );
     491            TEST(Tgeneral_data_t, out_WRITE_QUEUE_OUT_DATA         ->read(), request [packet]->_data_rd      );
    480492
    481493            nb_request_out ++;
     
    531543  delete    out_WRITE_QUEUE_OUT_NO_SEQUENCE  ;
    532544  delete    out_WRITE_QUEUE_OUT_ADDRESS      ;
     545  delete    out_WRITE_QUEUE_OUT_DATA         ;
    533546  delete [] out_GPR_WRITE_VAL                ;
    534547  delete []  in_GPR_WRITE_ACK                ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Parameters.h

    r81 r88  
    2626  {
    2727    //-----[ fields ]------------------------------------------------------------
    28   public : const uint32_t            _size_queue                   ;
    29   public : const uint32_t            _nb_context                   ;
    30   public : const uint32_t            _nb_front_end                 ;
    31   public : const uint32_t            _nb_ooo_engine                ;
    32   public : const uint32_t            _nb_packet                    ;
    33   public : const uint32_t            _size_general_data            ;
    34   public : const uint32_t            _nb_general_register          ;
    35   public : const uint32_t            _size_special_data            ;
    36   public : const uint32_t            _nb_special_register          ;
    37   public : const uint32_t            _nb_bypass_write              ;
     28  public : uint32_t            _size_queue                   ;
     29  public : uint32_t            _nb_context                   ;
     30  public : uint32_t            _nb_front_end                 ;
     31  public : uint32_t            _nb_ooo_engine                ;
     32  public : uint32_t            _nb_packet                    ;
     33//public : uint32_t            _size_general_data            ;
     34  public : uint32_t            _nb_general_register          ;
     35//public : uint32_t            _size_special_data            ;
     36  public : uint32_t            _nb_special_register          ;
     37  public : uint32_t            _nb_bypass_write              ;
    3838
    39   public : const uint32_t            _nb_gpr_write                 ;
    40   public : const uint32_t            _nb_spr_write                 ;
     39  public : uint32_t            _nb_gpr_write                 ;
     40  public : uint32_t            _nb_spr_write                 ;
    4141
    42   public : const uint32_t            _size_context_id              ;
    43   public : const uint32_t            _size_front_end_id            ;
    44   public : const uint32_t            _size_ooo_engine_id           ;
    45   public : const uint32_t            _size_packet_id               ;
    46   public : const uint32_t            _size_general_register        ;
    47   public : const uint32_t            _size_special_register        ;
     42//public : uint32_t            _size_context_id              ;
     43//public : uint32_t            _size_front_end_id            ;
     44//public : uint32_t            _size_ooo_engine_id           ;
     45//public : uint32_t            _size_packet_id               ;
     46//public : uint32_t            _size_general_register        ;
     47//public : uint32_t            _size_special_register        ;
    4848
    49   public : const bool                _have_port_context_id         ;
    50   public : const bool                _have_port_front_end_id       ;
    51   public : const bool                _have_port_ooo_engine_id      ;
    52   public : const bool                _have_port_packet_id          ;
     49//public : bool                _have_port_context_id         ;
     50//public : bool                _have_port_front_end_id       ;
     51//public : bool                _have_port_ooo_engine_id      ;
     52//public : bool                _have_port_packet_id          ;
    5353
    5454    //-----[ methods ]-----------------------------------------------------------
     
    6262                        uint32_t size_special_data  ,
    6363                        uint32_t nb_special_register,
    64                         uint32_t nb_bypass_write    );
    65   public : Parameters  (Parameters & param) ;
     64                        uint32_t nb_bypass_write    ,
     65                        bool     is_toplevel=false  );
     66//public : Parameters  (Parameters & param) ;
    6667  public : ~Parameters () ;
     68
     69  public :        void            copy       (void);
    6770
    6871  public :        Parameters_test msg_error  (void);
    6972
    70   public :        std::string   print      (uint32_t depth);
    71   public : friend std::ostream& operator<< (std::ostream& output_stream,
    72                                             morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Parameters & x);
     73  public :        std::string     print      (uint32_t depth);
     74  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     75                                              morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Parameters & x);
    7376  };
    7477
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h

    r82 r88  
    100100  public    : SC_OUT(Tcontrol_t        )    * out_WRITE_QUEUE_OUT_NO_SEQUENCE  ;
    101101  public    : SC_OUT(Tgeneral_data_t   )    * out_WRITE_QUEUE_OUT_ADDRESS      ;
     102  public    : SC_OUT(Tgeneral_data_t   )    * out_WRITE_QUEUE_OUT_DATA         ;
    102103
    103104    // -----[ Interface "gpr_write" ]-------------------------------------
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters.cpp

    r81 r88  
    2929                          uint32_t size_special_data  ,
    3030                          uint32_t nb_special_register,
    31                           uint32_t nb_bypass_write    ):
    32     _size_queue              (size_queue         ),
    33     _nb_context              (nb_context         ),
    34     _nb_front_end            (nb_front_end       ),
    35     _nb_ooo_engine           (nb_ooo_engine      ),
    36     _nb_packet               (nb_packet          ),
    37     _size_general_data       (size_general_data  ),
    38     _nb_general_register     (nb_general_register),
    39     _size_special_data       (size_special_data  ),
    40     _nb_special_register     (nb_special_register),
    41     _nb_bypass_write         (nb_bypass_write    ),
    42 
    43     _nb_gpr_write            (1),
    44     _nb_spr_write            (1),
    45 
    46     _size_context_id         (log2(_nb_context         )),
    47     _size_front_end_id       (log2(_nb_front_end       )),
    48     _size_ooo_engine_id      (log2(_nb_ooo_engine      )),
    49     _size_packet_id          (log2(_nb_packet          )),
    50     _size_general_register   (log2(_nb_general_register)),
    51     _size_special_register   (log2(_nb_special_register)),
    52 
    53     _have_port_context_id    (_size_context_id    > 0),
    54     _have_port_front_end_id  (_size_front_end_id  > 0),
    55     _have_port_ooo_engine_id (_size_ooo_engine_id > 0),
    56     _have_port_packet_id     (_size_packet_id     > 0)
     31                          uint32_t nb_bypass_write    ,
     32                          bool     is_toplevel)
    5733  {
    5834    log_printf(FUNC,Write_queue,FUNCTION,"Begin");
     35
     36    _size_queue              = size_queue         ;
     37    _nb_context              = nb_context         ;
     38    _nb_front_end            = nb_front_end       ;
     39    _nb_ooo_engine           = nb_ooo_engine      ;
     40    _nb_packet               = nb_packet          ;
     41    _nb_general_register     = nb_general_register;
     42    _nb_special_register     = nb_special_register;
     43    _nb_bypass_write         = nb_bypass_write    ;
     44
     45    _nb_gpr_write            = 1;
     46    _nb_spr_write            = 1;
     47
    5948    test();
     49   
     50    if (is_toplevel)
     51      {
     52        _size_context_id         = log2(_nb_context         );
     53        _size_front_end_id       = log2(_nb_front_end       );
     54        _size_ooo_engine_id      = log2(_nb_ooo_engine      );
     55        _size_rob_ptr            = log2(_nb_packet          );
     56        _size_general_register   = log2(_nb_general_register);
     57        _size_special_register   = log2(_nb_special_register);
     58        _size_general_data       = size_general_data  ;
     59        _size_special_data       = size_special_data  ;
     60       
     61        _have_port_context_id    = _size_context_id    > 0;
     62        _have_port_front_end_id  = _size_front_end_id  > 0;
     63        _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
     64        _have_port_rob_ptr       = _size_rob_ptr       > 0;
     65
     66        copy();
     67      }
     68
    6069    log_printf(FUNC,Write_queue,FUNCTION,"End");
    6170  };
    6271 
     72// #undef  FUNCTION
     73// #define FUNCTION "Write_queue::Parameters (copy)"
     74//   Parameters::Parameters (Parameters & param):
     75//     _size_queue              (param._size_queue             ),
     76//     _nb_context              (param._nb_context             ),
     77//     _nb_front_end            (param._nb_front_end           ),
     78//     _nb_ooo_engine           (param._nb_ooo_engine          ),
     79//     _nb_packet               (param._nb_packet              ),
     80//     _size_general_data       (param._size_general_data      ),
     81//     _nb_general_register     (param._nb_general_register    ),
     82//     _size_special_data       (param._size_special_data      ),
     83//     _nb_special_register     (param._nb_special_register    ),
     84//     _nb_bypass_write         (param._nb_bypass_write        ),
     85
     86//     _nb_gpr_write            (param._nb_gpr_write           ),
     87//     _nb_spr_write            (param._nb_spr_write           ),
     88
     89//     _size_context_id         (param._size_context_id        ),
     90//     _size_front_end_id       (param._size_front_end_id      ),
     91//     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
     92//     _size_packet_id          (param._size_packet_id         ),
     93//     _size_general_register   (param._size_general_register  ),
     94//     _size_special_register   (param._size_special_register  ),
     95
     96//     _have_port_context_id    (param._have_port_context_id   ),
     97//     _have_port_front_end_id  (param._have_port_front_end_id ),
     98//     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
     99//     _have_port_packet_id     (param._have_port_packet_id    )
     100//   {
     101//     log_printf(FUNC,Write_queue,FUNCTION,"Begin");
     102//     test();
     103//     log_printf(FUNC,Write_queue,FUNCTION,"End");
     104//   };
     105
    63106#undef  FUNCTION
    64 #define FUNCTION "Write_queue::Parameters (copy)"
    65   Parameters::Parameters (Parameters & param):
    66     _size_queue              (param._size_queue             ),
    67     _nb_context              (param._nb_context             ),
    68     _nb_front_end            (param._nb_front_end           ),
    69     _nb_ooo_engine           (param._nb_ooo_engine          ),
    70     _nb_packet               (param._nb_packet              ),
    71     _size_general_data       (param._size_general_data      ),
    72     _nb_general_register     (param._nb_general_register    ),
    73     _size_special_data       (param._size_special_data      ),
    74     _nb_special_register     (param._nb_special_register    ),
    75     _nb_bypass_write         (param._nb_bypass_write        ),
    76 
    77     _nb_gpr_write            (param._nb_gpr_write           ),
    78     _nb_spr_write            (param._nb_spr_write           ),
    79 
    80     _size_context_id         (param._size_context_id        ),
    81     _size_front_end_id       (param._size_front_end_id      ),
    82     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
    83     _size_packet_id          (param._size_packet_id         ),
    84     _size_general_register   (param._size_general_register  ),
    85     _size_special_register   (param._size_special_register  ),
    86 
    87     _have_port_context_id    (param._have_port_context_id   ),
    88     _have_port_front_end_id  (param._have_port_front_end_id ),
    89     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
    90     _have_port_packet_id     (param._have_port_packet_id    )
     107#define FUNCTION "Write_queue::~Parameters"
     108  Parameters::~Parameters (void)
    91109  {
    92110    log_printf(FUNC,Write_queue,FUNCTION,"Begin");
    93     test();
    94111    log_printf(FUNC,Write_queue,FUNCTION,"End");
    95112  };
    96113
    97114#undef  FUNCTION
    98 #define FUNCTION "Write_queue::~Parameters"
    99   Parameters::~Parameters ()
     115#define FUNCTION "Write_queue::copy"
     116  void Parameters::copy (void)
    100117  {
    101118    log_printf(FUNC,Write_queue,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue.cpp

    r81 r88  
    3939    log_printf(FUNC,Write_queue,FUNCTION,"Begin");
    4040
     41#if DEBUG_Write_queue == true
     42    log_printf(INFO,Write_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
     43
     44    std::cout << *param << std::endl;
     45#endif   
     46
    4147    log_printf(INFO,Write_queue,FUNCTION,"Allocation");
    4248    allocation ();
    4349
    4450#ifdef STATISTICS
    45     if (_usage & USE_STATISTICS)
     51    if (usage_is_set(_usage,USE_STATISTICS))
    4652      {
    4753        log_printf(INFO,Write_queue,FUNCTION,"Allocation of statistics");
     
    5258
    5359#ifdef VHDL
    54     if (_usage & USE_VHDL)
     60    if (usage_is_set(_usage,USE_VHDL))
    5561      {
    5662        // generate the vhdl
     
    6268
    6369#ifdef SYSTEMC
    64     if (_usage & USE_SYSTEMC)
     70    if (usage_is_set(_usage,USE_SYSTEMC))
    6571      {
    6672        log_printf(INFO,Write_queue,FUNCTION,"Method - transition");
     
    96102
    97103#ifdef STATISTICS
    98     if (_usage & USE_STATISTICS)
     104    if (usage_is_set(_usage,USE_STATISTICS))
    99105      {
    100106        log_printf(INFO,Write_queue,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_allocation.cpp

    r81 r88  
    5858       ALLOC_SIGNAL_IN ( in_WRITE_QUEUE_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id     );
    5959       ALLOC_SIGNAL_IN ( in_WRITE_QUEUE_IN_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id    );
    60        ALLOC_SIGNAL_IN ( in_WRITE_QUEUE_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_packet_id        );
     60       ALLOC_SIGNAL_IN ( in_WRITE_QUEUE_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_rob_ptr          );
    6161//     ALLOC_SIGNAL_IN ( in_WRITE_QUEUE_IN_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation        );
    6262       ALLOC_SIGNAL_IN ( in_WRITE_QUEUE_IN_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type             );
     
    8181       ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_FRONT_END_ID ,"front_end_id" ,Tcontext_t     ,_param->_size_front_end_id );
    8282       ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t     ,_param->_size_ooo_engine_id);
    83        ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_PACKET_ID    ,"packet_id"    ,Tpacket_t      ,_param->_size_packet_id    );
     83       ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_PACKET_ID    ,"packet_id"    ,Tpacket_t      ,_param->_size_rob_ptr      );
    8484//     ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_OPERATION    ,"operation"    ,Toperation_t   ,_param->_size_operation    );
    8585//     ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_TYPE         ,"type"         ,Ttype_t        ,_param->_size_type         );
     
    8888       ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_NO_SEQUENCE  ,"no_sequence"  ,Tcontrol_t     ,1                          );
    8989       ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_ADDRESS      ,"address"      ,Tgeneral_data_t,_param->_size_general_data );
     90       ALLOC_SIGNAL_OUT(out_WRITE_QUEUE_OUT_DATA         ,"data"         ,Tgeneral_data_t,_param->_size_general_data );
    9091     }
    9192
     
    129130
    130131#ifdef POSITION
    131     _component->generate_file();
     132     if (usage_is_set(_usage,USE_POSITION))
     133       _component->generate_file();
    132134#endif
    133135
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_deallocation.cpp

    r81 r88  
    2424    log_printf(FUNC,Write_queue,FUNCTION,"Begin");
    2525
    26     if (_usage & USE_SYSTEMC)
     26    if (usage_is_set(_usage,USE_SYSTEMC))
    2727      {
    2828        delete    in_CLOCK ;
     
    3838        if (_param->_have_port_ooo_engine_id)
    3939        delete      in_WRITE_QUEUE_IN_OOO_ENGINE_ID;
    40         if (_param->_have_port_packet_id)
     40        if (_param->_have_port_rob_ptr  )
    4141        delete      in_WRITE_QUEUE_IN_PACKET_ID    ;
    4242//      delete      in_WRITE_QUEUE_IN_OPERATION    ;
     
    6161        if (_param->_have_port_ooo_engine_id)
    6262        delete     out_WRITE_QUEUE_OUT_OOO_ENGINE_ID;
    63         if (_param->_have_port_packet_id)
     63        if (_param->_have_port_rob_ptr  )
    6464        delete     out_WRITE_QUEUE_OUT_PACKET_ID    ;
    6565//      delete     out_WRITE_QUEUE_OUT_OPERATION    ;
     
    6969        delete     out_WRITE_QUEUE_OUT_NO_SEQUENCE  ;
    7070        delete     out_WRITE_QUEUE_OUT_ADDRESS      ;
     71        delete     out_WRITE_QUEUE_OUT_DATA         ;
    7172
    7273        // -----[ Interface "gpr_write" ]-------------------------------------
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_end_cycle.cpp

    r81 r88  
    2626
    2727#ifdef STATISTICS
    28     _stat->end_cycle();
     28    if (usage_is_set(_usage,USE_STATISTICS))
     29      _stat->end_cycle();
    2930#endif   
    3031
     
    3233    // Evaluation before read the ouput signal
    3334//  sc_start(0);
    34     _interfaces->testbench();
     35    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     36      _interfaces->testbench();
    3537#endif
    3638
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_genMoore.cpp

    r81 r88  
    4949          if (_param->_have_port_ooo_engine_id)
    5050          PORT_WRITE(out_WRITE_QUEUE_OUT_OOO_ENGINE_ID, _queue->front()->_ooo_engine_id);
    51           if (_param->_have_port_packet_id)
     51          if (_param->_have_port_rob_ptr  )
    5252          PORT_WRITE(out_WRITE_QUEUE_OUT_PACKET_ID    , _queue->front()->_packet_id    );
    5353//        PORT_WRITE(out_WRITE_QUEUE_OUT_OPERATION    , _queue->front()->_operation    );
     
    5757          PORT_WRITE(out_WRITE_QUEUE_OUT_NO_SEQUENCE  , _queue->front()->_no_sequence  );
    5858          PORT_WRITE(out_WRITE_QUEUE_OUT_ADDRESS      , _queue->front()->_address      );
     59          PORT_WRITE(out_WRITE_QUEUE_OUT_DATA         , _queue->front()->_data_rd      );
    5960        }
    6061    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_transition.cpp

    r81 r88  
    5151               (_param->_have_port_front_end_id )?PORT_READ(in_WRITE_QUEUE_IN_FRONT_END_ID ):0,
    5252               (_param->_have_port_ooo_engine_id)?PORT_READ(in_WRITE_QUEUE_IN_OOO_ENGINE_ID):0,
    53                (_param->_have_port_packet_id    )?PORT_READ(in_WRITE_QUEUE_IN_PACKET_ID    ):0,
     53               (_param->_have_port_rob_ptr      )?PORT_READ(in_WRITE_QUEUE_IN_PACKET_ID    ):0,
    5454             //PORT_READ(in_WRITE_QUEUE_IN_OPERATION    ),
    5555               PORT_READ(in_WRITE_QUEUE_IN_TYPE         ),
     
    8383
    8484#ifdef STATISTICS
    85     *(_stat_use_queue) += _queue->size();
     85    if (usage_is_set(_usage,USE_STATISTICS))
     86      *(_stat_use_queue) += _queue->size();
    8687#endif
    8788
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/include/Parameters.h

    r81 r88  
    2828  {
    2929    //-----[ fields ]------------------------------------------------------------
    30   public : const uint32_t            _size_write_queue             ;
    31   public : const uint32_t            _size_execute_queue           ;
    32   public : const uint32_t            _nb_context                   ;
    33   public : const uint32_t            _nb_front_end                 ;
    34   public : const uint32_t            _nb_ooo_engine                ;
    35   public : const uint32_t            _nb_packet                    ;
    36   public : const uint32_t            _size_general_data            ;
    37   public : const uint32_t            _nb_general_register          ;
    38   public : const uint32_t            _size_special_data            ;
    39   public : const uint32_t            _nb_special_register          ;
    40   public : const uint32_t            _nb_bypass_write              ;
     30  public : uint32_t            _size_write_queue             ;
     31  public : uint32_t            _size_execute_queue           ;
     32  public : uint32_t            _nb_context                   ;
     33  public : uint32_t            _nb_front_end                 ;
     34  public : uint32_t            _nb_ooo_engine                ;
     35  public : uint32_t            _nb_packet                    ;
     36//public : uint32_t            _size_general_data            ;
     37  public : uint32_t            _nb_general_register          ;
     38//public : uint32_t            _size_special_data            ;
     39  public : uint32_t            _nb_special_register          ;
     40  public : uint32_t            _nb_bypass_write              ;
    4141
    42   public : const uint32_t            _nb_gpr_write                 ;
    43   public : const uint32_t            _nb_spr_write                 ;
     42  public : uint32_t            _nb_gpr_write                 ;
     43  public : uint32_t            _nb_spr_write                 ;
    4444
    45   public : const uint32_t            _size_context_id              ;
    46   public : const uint32_t            _size_front_end_id            ;
    47   public : const uint32_t            _size_ooo_engine_id           ;
    48   public : const uint32_t            _size_packet_id               ;
    49   public : const uint32_t            _size_general_register        ;
    50   public : const uint32_t            _size_special_register        ;
     45//public : uint32_t            _size_context_id              ;
     46//public : uint32_t            _size_front_end_id            ;
     47//public : uint32_t            _size_ooo_engine_id           ;
     48//public : uint32_t            _size_packet_id               ;
     49//public : uint32_t            _size_general_register        ;
     50//public : uint32_t            _size_special_register        ;
    5151
    52   public : const bool                _have_component_execute_queue ;
    53   public : const bool                _have_port_context_id         ;
    54   public : const bool                _have_port_front_end_id       ;
    55   public : const bool                _have_port_ooo_engine_id      ;
    56   public : const bool                _have_port_packet_id          ;
     52  public : bool                _have_component_execute_queue ;
     53//public : bool                _have_port_context_id         ;
     54//public : bool                _have_port_front_end_id       ;
     55//public : bool                _have_port_ooo_engine_id      ;
     56//public : bool                _have_port_packet_id          ;
    5757
    5858  public : morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue  ::Parameters * _param_write_queue;
     
    7070                        uint32_t size_special_data  ,
    7171                        uint32_t nb_special_register,
    72                         uint32_t nb_bypass_write    );
    73   public : Parameters  (Parameters & param) ;
     72                        uint32_t nb_bypass_write    ,
     73                        bool     is_toplevel=false);
     74//public : Parameters  (Parameters & param) ;
    7475  public : ~Parameters () ;
     76
     77  public :        void            copy       (void);
    7578
    7679  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/include/Write_unit.h

    r82 r88  
    9595  public    : SC_OUT(Tcontrol_t        )    * out_WRITE_UNIT_OUT_NO_SEQUENCE  ;
    9696  public    : SC_OUT(Tgeneral_data_t   )    * out_WRITE_UNIT_OUT_ADDRESS      ;
     97  public    : SC_OUT(Tgeneral_data_t   )    * out_WRITE_UNIT_OUT_DATA         ;
    9798
    9899    // -----[ Interface "gpr_write" ]-------------------------------------
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Parameters.cpp

    r81 r88  
    2929                          uint32_t size_special_data  ,
    3030                          uint32_t nb_special_register,
    31                           uint32_t nb_bypass_write    ):
    32     _size_write_queue        (size_write_queue   ),
    33     _size_execute_queue      (size_execute_queue ),
    34     _nb_context              (nb_context         ),
    35     _nb_front_end            (nb_front_end       ),
    36     _nb_ooo_engine           (nb_ooo_engine      ),
    37     _nb_packet               (nb_packet          ),
    38     _size_general_data       (size_general_data  ),
    39     _nb_general_register     (nb_general_register),
    40     _size_special_data       (size_special_data  ),
    41     _nb_special_register     (nb_special_register),
    42     _nb_bypass_write         (nb_bypass_write    ),
    43 
    44     _nb_gpr_write            (1),
    45     _nb_spr_write            (1),
    46 
    47     _size_context_id         (log2(_nb_context         )),
    48     _size_front_end_id       (log2(_nb_front_end       )),
    49     _size_ooo_engine_id      (log2(_nb_ooo_engine      )),
    50     _size_packet_id          (log2(_nb_packet          )),
    51     _size_general_register   (log2(_nb_general_register)),
    52     _size_special_register   (log2(_nb_special_register)),
    53 
    54     _have_component_execute_queue (_size_execute_queue > 0),
    55     _have_port_context_id         (_size_context_id    > 0),
    56     _have_port_front_end_id       (_size_front_end_id  > 0),
    57     _have_port_ooo_engine_id      (_size_ooo_engine_id > 0),
    58     _have_port_packet_id          (_size_packet_id     > 0)
     31                          uint32_t nb_bypass_write    ,
     32                          bool     is_toplevel        )
    5933  {
    6034    log_printf(FUNC,Write_unit,FUNCTION,"Begin");
    6135
    62     _param_write_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue  ::Parameters(size_write_queue   ,
    63                                                                                                                                                     nb_context         ,
    64                                                                                                                                                     nb_front_end       ,
    65                                                                                                                                                     nb_ooo_engine      ,
    66                                                                                                                                                     nb_packet          ,
    67                                                                                                                                                     size_general_data  ,
    68                                                                                                                                                     nb_general_register,
    69                                                                                                                                                     size_special_data  ,
    70                                                                                                                                                     nb_special_register,
    71                                                                                                                                                     nb_bypass_write    );
     36    _size_write_queue             = size_write_queue   ;
     37    _size_execute_queue           = size_execute_queue ;
     38    _nb_context                   = nb_context         ;
     39    _nb_front_end                 = nb_front_end       ;
     40    _nb_ooo_engine                = nb_ooo_engine      ;
     41    _nb_packet                    = nb_packet          ;
     42    _nb_general_register          = nb_general_register;
     43    _nb_special_register          = nb_special_register;
     44    _nb_bypass_write              = nb_bypass_write    ;
     45                                 
     46    _nb_gpr_write                 = 1;
     47    _nb_spr_write                 = 1;
     48
     49    _have_component_execute_queue = _size_execute_queue > 0;
     50                                 
     51    _param_write_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue  ::Parameters(_size_write_queue   ,
     52                                                                                                                                                    _nb_context         ,
     53                                                                                                                                                    _nb_front_end       ,
     54                                                                                                                                                    _nb_ooo_engine      ,
     55                                                                                                                                                    _nb_packet          ,
     56                                                                                                                                                     size_general_data  ,
     57                                                                                                                                                    _nb_general_register,
     58                                                                                                                                                     size_special_data  ,
     59                                                                                                                                                    _nb_special_register,
     60                                                                                                                                                    _nb_bypass_write    );
    7261   
    7362    if (_have_component_execute_queue)
    74       _param_execute_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters(size_execute_queue   ,
    75                                                                                                                                                         nb_context         ,
    76                                                                                                                                                         nb_front_end       ,
    77                                                                                                                                                         nb_ooo_engine      ,
    78                                                                                                                                                         nb_packet          ,
    79                                                                                                                                                         size_general_data  ,
    80                                                                                                                                                         size_special_data  );
     63      _param_execute_queue  = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters(_size_execute_queue   ,
     64                                                                                                                                                        _nb_context         ,
     65                                                                                                                                                        _nb_front_end       ,
     66                                                                                                                                                        _nb_ooo_engine      ,
     67                                                                                                                                                        _nb_packet          ,
     68                                                                                                                                                         size_general_data  ,
     69                                                                                                                                                         size_special_data  );
    8170
    8271    test();
     72
     73    if (is_toplevel)
     74      {
     75        _size_context_id              = log2(_nb_context         );
     76        _size_front_end_id            = log2(_nb_front_end       );
     77        _size_ooo_engine_id           = log2(_nb_ooo_engine      );
     78        _size_rob_ptr                 = log2(_nb_packet          );
     79        _size_general_register        = log2(_nb_general_register);
     80        _size_special_register        = log2(_nb_special_register);
     81        _size_general_data            = size_general_data  ;
     82        _size_special_data            = size_special_data  ;
     83       
     84        _have_port_context_id         = _size_context_id    > 0;
     85        _have_port_front_end_id       = _size_front_end_id  > 0;
     86        _have_port_ooo_engine_id      = _size_ooo_engine_id > 0;
     87        _have_port_rob_ptr            = _size_rob_ptr       > 0;
     88
     89        copy();
     90      }
    8391
    8492    log_printf(FUNC,Write_unit,FUNCTION,"End");
    8593  };
    8694 
    87 #undef  FUNCTION
    88 #define FUNCTION "Write_unit::Parameters (copy)"
    89   Parameters::Parameters (Parameters & param):
    90     _size_write_queue        (param._size_write_queue       ),
    91     _size_execute_queue      (param._size_execute_queue     ),
    92     _nb_context              (param._nb_context             ),
    93     _nb_front_end            (param._nb_front_end           ),
    94     _nb_ooo_engine           (param._nb_ooo_engine          ),
    95     _nb_packet               (param._nb_packet              ),
    96     _size_general_data       (param._size_general_data      ),
    97     _nb_general_register     (param._nb_general_register    ),
    98     _size_special_data       (param._size_special_data      ),
    99     _nb_special_register     (param._nb_special_register    ),
    100     _nb_bypass_write         (param._nb_bypass_write        ),
     95// #undef  FUNCTION
     96// #define FUNCTION "Write_unit::Parameters (copy)"
     97//   Parameters::Parameters (Parameters & param):
     98//     _size_write_queue        (param._size_write_queue       ),
     99//     _size_execute_queue      (param._size_execute_queue     ),
     100//     _nb_context              (param._nb_context             ),
     101//     _nb_front_end            (param._nb_front_end           ),
     102//     _nb_ooo_engine           (param._nb_ooo_engine          ),
     103//     _nb_packet               (param._nb_packet              ),
     104//     _size_general_data       (param._size_general_data      ),
     105//     _nb_general_register     (param._nb_general_register    ),
     106//     _size_special_data       (param._size_special_data      ),
     107//     _nb_special_register     (param._nb_special_register    ),
     108//     _nb_bypass_write         (param._nb_bypass_write        ),
    101109
    102     _nb_gpr_write            (param._nb_gpr_write           ),
    103     _nb_spr_write            (param._nb_spr_write           ),
     110//     _nb_gpr_write            (param._nb_gpr_write           ),
     111//     _nb_spr_write            (param._nb_spr_write           ),
    104112
    105     _size_context_id         (param._size_context_id        ),
    106     _size_front_end_id       (param._size_front_end_id      ),
    107     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
    108     _size_packet_id          (param._size_packet_id         ),
    109     _size_general_register   (param._size_general_register  ),
    110     _size_special_register   (param._size_special_register  ),
     113//     _size_context_id         (param._size_context_id        ),
     114//     _size_front_end_id       (param._size_front_end_id      ),
     115//     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
     116//     _size_packet_id          (param._size_packet_id         ),
     117//     _size_general_register   (param._size_general_register  ),
     118//     _size_special_register   (param._size_special_register  ),
    111119
    112     _have_component_execute_queue (param._have_component_execute_queue),
    113     _have_port_context_id         (param._have_port_context_id        ),
    114     _have_port_front_end_id       (param._have_port_front_end_id      ),
    115     _have_port_ooo_engine_id      (param._have_port_ooo_engine_id     ),
    116     _have_port_packet_id          (param._have_port_packet_id         )
    117   {
    118     log_printf(FUNC,Write_unit,FUNCTION,"Begin");
     120//     _have_component_execute_queue (param._have_component_execute_queue),
     121//     _have_port_context_id         (param._have_port_context_id        ),
     122//     _have_port_front_end_id       (param._have_port_front_end_id      ),
     123//     _have_port_ooo_engine_id      (param._have_port_ooo_engine_id     ),
     124//     _have_port_packet_id          (param._have_port_packet_id         )
     125//   {
     126//     log_printf(FUNC,Write_unit,FUNCTION,"Begin");
    119127   
    120     _param_write_queue   = param._param_write_queue  ;
    121     _param_execute_queue = param._param_execute_queue;
     128//     _param_write_queue   = param._param_write_queue  ;
     129//     _param_execute_queue = param._param_execute_queue;
    122130
    123     test();
    124     log_printf(FUNC,Write_unit,FUNCTION,"End");
    125   };
     131//     test();
     132//     log_printf(FUNC,Write_unit,FUNCTION,"End");
     133//   };
    126134
    127135#undef  FUNCTION
    128136#define FUNCTION "Write_unit::~Parameters"
    129   Parameters::~Parameters ()
     137  Parameters::~Parameters (void)
    130138  {
    131139    log_printf(FUNC,Write_unit,FUNCTION,"Begin");
     
    139147  };
    140148
     149#undef  FUNCTION
     150#define FUNCTION "Write_unit::copy"
     151  void Parameters::copy (void)
     152  {
     153    log_printf(FUNC,Write_unit,FUNCTION,"Begin");
     154
     155    COPY(_param_write_queue);
     156    if (_have_component_execute_queue)
     157    COPY(_param_execute_queue);
     158
     159    log_printf(FUNC,Write_unit,FUNCTION,"End");
     160  };
     161
    141162}; // end namespace write_unit
    142163}; // end namespace multi_write_unit
     
    144165}; // end namespace multi_execute_loop
    145166}; // end namespace core
    146 
    147167}; // end namespace behavioural
    148168}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit.cpp

    r81 r88  
    3838    log_printf(FUNC,Write_unit,FUNCTION,"Begin");
    3939
     40#if DEBUG_Write_unit == true
     41    log_printf(INFO,Write_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif   
     45
    4046    log_printf(INFO,Write_unit,FUNCTION,"Allocation");
    4147
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    5157        log_printf(INFO,Write_unit,FUNCTION,"Allocation of statistics");
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
     
    6672
    6773#ifdef SYSTEMC
    68     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    6975      {
    7076        log_printf(INFO,Write_unit,FUNCTION,"Method - transition");
     
    9096
    9197#ifdef STATISTICS
    92     if (_usage & USE_STATISTICS)
     98    if (usage_is_set(_usage,USE_STATISTICS))
    9399      {
    94100        log_printf(INFO,Write_unit,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_allocation.cpp

    r82 r88  
    2323  void Write_unit::allocation (
    2424#ifdef STATISTICS
    25                                morpheo::behavioural::Parameters_Statistics * param_statistics
     25                               morpheo::behavioural::Parameters_Statistics * param_statistics
    2626#else
    27                                void
    28 #endif
    29                                )
     27                               void
     28#endif
     29                               )
    3030  {
    3131    log_printf(FUNC,Write_unit,FUNCTION,"Begin");
     
    3434
    3535    Entity * entity = _component->set_entity (_name       
    36                                               ,"Write_unit"
    37 #ifdef POSITION
    38                                               ,COMBINATORY
    39 #endif
    40                                               );
     36                                              ,"Write_unit"
     37#ifdef POSITION
     38                                              ,COMBINATORY
     39#endif
     40                                              );
    4141
    4242    _interfaces = entity->set_interfaces();
     
    4646      Interface * interface = _interfaces->set_interface(""
    4747#ifdef POSITION
    48                                                         ,IN
    49                                                         ,SOUTH,
    50                                                         "Generalist interface"
    51 #endif
    52                                                         );
     48                                                        ,IN
     49                                                        ,SOUTH,
     50                                                        "Generalist interface"
     51#endif
     52                                                        );
    5353
    5454     in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
     
    6464       ALLOC_SIGNAL_IN ( in_WRITE_UNIT_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id     );
    6565       ALLOC_SIGNAL_IN ( in_WRITE_UNIT_IN_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id    );
    66        ALLOC_SIGNAL_IN ( in_WRITE_UNIT_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_packet_id        );
     66       ALLOC_SIGNAL_IN ( in_WRITE_UNIT_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_rob_ptr          );
    6767//     ALLOC_SIGNAL_IN ( in_WRITE_UNIT_IN_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation        );
    6868       ALLOC_SIGNAL_IN ( in_WRITE_UNIT_IN_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type             );
     
    8787       ALLOC_SIGNAL_OUT(out_WRITE_UNIT_OUT_FRONT_END_ID ,"front_end_id" ,Tcontext_t     ,_param->_size_front_end_id );
    8888       ALLOC_SIGNAL_OUT(out_WRITE_UNIT_OUT_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t     ,_param->_size_ooo_engine_id);
    89        ALLOC_SIGNAL_OUT(out_WRITE_UNIT_OUT_PACKET_ID    ,"packet_id"    ,Tpacket_t      ,_param->_size_packet_id    );
     89       ALLOC_SIGNAL_OUT(out_WRITE_UNIT_OUT_PACKET_ID    ,"packet_id"    ,Tpacket_t      ,_param->_size_rob_ptr      );
    9090//     ALLOC_SIGNAL_OUT(out_WRITE_UNIT_OUT_OPERATION    ,"operation"    ,Toperation_t   ,_param->_size_operation    );
    9191//     ALLOC_SIGNAL_OUT(out_WRITE_UNIT_OUT_TYPE         ,"type"         ,Ttype_t        ,_param->_size_type         );
     
    9494       ALLOC_SIGNAL_OUT(out_WRITE_UNIT_OUT_NO_SEQUENCE  ,"no_sequence"  ,Tcontrol_t     ,1                          );
    9595       ALLOC_SIGNAL_OUT(out_WRITE_UNIT_OUT_ADDRESS      ,"address"      ,Tgeneral_data_t,_param->_size_general_data );
     96       ALLOC_SIGNAL_OUT(out_WRITE_UNIT_OUT_DATA         ,"data"         ,Tgeneral_data_t,_param->_size_general_data );
    9697     }
    9798
     
    138139     {
    139140       name = _name+"_write_queue";
    140        
     141       log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());     
     142
    141143       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()
     144        (name.c_str()
    143145#ifdef STATISTICS
    144           ,param_statistics
    145 #endif
    146           ,_param->_param_write_queue
    147           ,_usage);
     146          ,param_statistics
     147#endif
     148          ,_param->_param_write_queue
     149          ,_usage);
    148150       
    149151       _component->set_component (component_write_queue->_component
    150152#ifdef POSITION
    151                                   , 50, 50, 10, 10
    152 #endif
    153                                   );
     153                                  , 50, 50, 10, 10
     154#endif
     155                                  );
    154156     }
    155157
     
    157159     {
    158160       name = _name+"_execute_queue";
     161       log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());     
    159162       
    160163       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()
     164        (name.c_str()
    162165#ifdef STATISTICS
    163           ,param_statistics
    164 #endif
    165           ,_param->_param_execute_queue
    166           ,_usage);
     166          ,param_statistics
     167#endif
     168          ,_param->_param_execute_queue
     169          ,_usage);
    167170       
    168171       _component->set_component (component_execute_queue->_component
    169172#ifdef POSITION
    170                                   , 50, 50, 10, 10
    171 #endif
    172                                   );
     173                                  , 50, 50, 10, 10
     174#endif
     175                                  );
    173176     }
    174177
     
    176179     {
    177180       name = _name+"_write_queue";
    178        std::cout << "Instance : " << name << std::endl;
    179        
     181       log_printf(INFO,Core,FUNCTION,_("Instance : %s"),name.c_str());
     182       
    180183#ifdef POSITION
    181184       _component->interface_map (name ,"",
    182                                   _name,"");
     185                                  _name,"");
    183186#endif
    184187
     
    189192#ifdef POSITION
    190193       _component->interface_map (name ,"write_queue_in",
    191                                   _name,"write_unit_in");
     194                                  _name,"write_unit_in");
    192195#endif
    193196
     
    200203       if (_param->_have_port_ooo_engine_id)
    201204       _component->port_map(name, "in_WRITE_QUEUE_IN_OOO_ENGINE_ID", _name, "in_WRITE_UNIT_IN_OOO_ENGINE_ID");
    202        if (_param->_have_port_packet_id)
     205       if (_param->_have_port_rob_ptr)
    203206       _component->port_map(name, "in_WRITE_QUEUE_IN_PACKET_ID"    , _name, "in_WRITE_UNIT_IN_PACKET_ID"    );
    204207     //_component->port_map(name, "in_WRITE_QUEUE_IN_OPERATION"    , _name, "in_WRITE_UNIT_IN_OPERATION"    );
     
    216219
    217220       if (_param->_have_component_execute_queue)
    218          {
    219 #ifdef POSITION
    220            _component->interface_map (name ,"write_queue_out",
    221                                       _name+"_execute_queue", "execute_queue_in");
    222 #endif
    223 
    224            _component->port_map(name,"out_WRITE_QUEUE_OUT_VAL"          , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_VAL"          );
    225            _component->port_map(name, "in_WRITE_QUEUE_OUT_ACK"          , _name+"_execute_queue","out_EXECUTE_QUEUE_IN_ACK"          );
    226            if (_param->_have_port_context_id)
    227            _component->port_map(name,"out_WRITE_QUEUE_OUT_CONTEXT_ID"   , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_CONTEXT_ID"   );
    228            if (_param->_have_port_front_end_id)
    229            _component->port_map(name,"out_WRITE_QUEUE_OUT_FRONT_END_ID" , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_FRONT_END_ID" );
    230            if (_param->_have_port_ooo_engine_id)
    231            _component->port_map(name,"out_WRITE_QUEUE_OUT_OOO_ENGINE_ID", _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID");
    232            if (_param->_have_port_packet_id)
    233            _component->port_map(name,"out_WRITE_QUEUE_OUT_PACKET_ID"    , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_PACKET_ID"    );
    234          //_component->port_map(name,"out_WRITE_QUEUE_OUT_OPERATION"    , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_OPERATION"    );
    235          //_component->port_map(name,"out_WRITE_QUEUE_OUT_TYPE"         , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_TYPE"         );
    236            _component->port_map(name,"out_WRITE_QUEUE_OUT_FLAGS"        , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_FLAGS"        );
    237            _component->port_map(name,"out_WRITE_QUEUE_OUT_EXCEPTION"    , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_EXCEPTION"    );
    238            _component->port_map(name,"out_WRITE_QUEUE_OUT_NO_SEQUENCE"  , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_NO_SEQUENCE"  );
    239            _component->port_map(name,"out_WRITE_QUEUE_OUT_ADDRESS"      , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_ADDRESS"      );
    240          }
     221         {
     222#ifdef POSITION
     223           _component->interface_map (name ,"write_queue_out",
     224                                      _name+"_execute_queue", "execute_queue_in");
     225#endif
     226
     227           _component->port_map(name,"out_WRITE_QUEUE_OUT_VAL"          , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_VAL"          );
     228           _component->port_map(name, "in_WRITE_QUEUE_OUT_ACK"          , _name+"_execute_queue","out_EXECUTE_QUEUE_IN_ACK"          );
     229           if (_param->_have_port_context_id)
     230           _component->port_map(name,"out_WRITE_QUEUE_OUT_CONTEXT_ID"   , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_CONTEXT_ID"   );
     231           if (_param->_have_port_front_end_id)
     232           _component->port_map(name,"out_WRITE_QUEUE_OUT_FRONT_END_ID" , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_FRONT_END_ID" );
     233           if (_param->_have_port_ooo_engine_id)
     234           _component->port_map(name,"out_WRITE_QUEUE_OUT_OOO_ENGINE_ID", _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID");
     235           if (_param->_have_port_rob_ptr)
     236           _component->port_map(name,"out_WRITE_QUEUE_OUT_PACKET_ID"    , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_PACKET_ID"    );
     237         //_component->port_map(name,"out_WRITE_QUEUE_OUT_OPERATION"    , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_OPERATION"    );
     238         //_component->port_map(name,"out_WRITE_QUEUE_OUT_TYPE"         , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_TYPE"         );
     239           _component->port_map(name,"out_WRITE_QUEUE_OUT_FLAGS"        , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_FLAGS"        );
     240           _component->port_map(name,"out_WRITE_QUEUE_OUT_EXCEPTION"    , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_EXCEPTION"    );
     241           _component->port_map(name,"out_WRITE_QUEUE_OUT_NO_SEQUENCE"  , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_NO_SEQUENCE"  );
     242           _component->port_map(name,"out_WRITE_QUEUE_OUT_ADDRESS"      , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_ADDRESS"      );
     243           _component->port_map(name,"out_WRITE_QUEUE_OUT_DATA"         , _name+"_execute_queue", "in_EXECUTE_QUEUE_IN_DATA"         );
     244         }
    241245       else
    242          {
    243 #ifdef POSITION
    244            _component->interface_map (name ,"write_queue_out",
    245                                       _name,"write_unit_out");
    246 #endif
    247 
    248            _component->port_map(name,"out_WRITE_QUEUE_OUT_VAL"          , _name,"out_WRITE_UNIT_OUT_VAL"          );
    249            _component->port_map(name, "in_WRITE_QUEUE_OUT_ACK"          , _name, "in_WRITE_UNIT_OUT_ACK"          );
    250            if (_param->_have_port_context_id)
    251            _component->port_map(name,"out_WRITE_QUEUE_OUT_CONTEXT_ID"   , _name,"out_WRITE_UNIT_OUT_CONTEXT_ID"   );
    252            if (_param->_have_port_front_end_id)
    253            _component->port_map(name,"out_WRITE_QUEUE_OUT_FRONT_END_ID" , _name,"out_WRITE_UNIT_OUT_FRONT_END_ID" );
    254            if (_param->_have_port_ooo_engine_id)
    255            _component->port_map(name,"out_WRITE_QUEUE_OUT_OOO_ENGINE_ID", _name,"out_WRITE_UNIT_OUT_OOO_ENGINE_ID");
    256            if (_param->_have_port_packet_id)
    257            _component->port_map(name,"out_WRITE_QUEUE_OUT_PACKET_ID"    , _name,"out_WRITE_UNIT_OUT_PACKET_ID"    );
    258          //_component->port_map(name,"out_WRITE_QUEUE_OUT_OPERATION"    , _name,"out_WRITE_UNIT_OUT_OPERATION"    );
    259          //_component->port_map(name,"out_WRITE_QUEUE_OUT_TYPE"         , _name,"out_WRITE_UNIT_OUT_TYPE"         );
    260            _component->port_map(name,"out_WRITE_QUEUE_OUT_FLAGS"        , _name,"out_WRITE_UNIT_OUT_FLAGS"        );
    261            _component->port_map(name,"out_WRITE_QUEUE_OUT_EXCEPTION"    , _name,"out_WRITE_UNIT_OUT_EXCEPTION"    );
    262            _component->port_map(name,"out_WRITE_QUEUE_OUT_NO_SEQUENCE"  , _name,"out_WRITE_UNIT_OUT_NO_SEQUENCE"  );
    263            _component->port_map(name,"out_WRITE_QUEUE_OUT_ADDRESS"      , _name,"out_WRITE_UNIT_OUT_ADDRESS"      );
    264          }       
     246         {
     247#ifdef POSITION
     248           _component->interface_map (name ,"write_queue_out",
     249                                      _name,"write_unit_out");
     250#endif
     251
     252           _component->port_map(name,"out_WRITE_QUEUE_OUT_VAL"          , _name,"out_WRITE_UNIT_OUT_VAL"          );
     253           _component->port_map(name, "in_WRITE_QUEUE_OUT_ACK"          , _name, "in_WRITE_UNIT_OUT_ACK"          );
     254           if (_param->_have_port_context_id)
     255           _component->port_map(name,"out_WRITE_QUEUE_OUT_CONTEXT_ID"   , _name,"out_WRITE_UNIT_OUT_CONTEXT_ID"   );
     256           if (_param->_have_port_front_end_id)
     257           _component->port_map(name,"out_WRITE_QUEUE_OUT_FRONT_END_ID" , _name,"out_WRITE_UNIT_OUT_FRONT_END_ID" );
     258           if (_param->_have_port_ooo_engine_id)
     259           _component->port_map(name,"out_WRITE_QUEUE_OUT_OOO_ENGINE_ID", _name,"out_WRITE_UNIT_OUT_OOO_ENGINE_ID");
     260           if (_param->_have_port_rob_ptr)
     261           _component->port_map(name,"out_WRITE_QUEUE_OUT_PACKET_ID"    , _name,"out_WRITE_UNIT_OUT_PACKET_ID"    );
     262         //_component->port_map(name,"out_WRITE_QUEUE_OUT_OPERATION"    , _name,"out_WRITE_UNIT_OUT_OPERATION"    );
     263         //_component->port_map(name,"out_WRITE_QUEUE_OUT_TYPE"         , _name,"out_WRITE_UNIT_OUT_TYPE"         );
     264           _component->port_map(name,"out_WRITE_QUEUE_OUT_FLAGS"        , _name,"out_WRITE_UNIT_OUT_FLAGS"        );
     265           _component->port_map(name,"out_WRITE_QUEUE_OUT_EXCEPTION"    , _name,"out_WRITE_UNIT_OUT_EXCEPTION"    );
     266           _component->port_map(name,"out_WRITE_QUEUE_OUT_NO_SEQUENCE"  , _name,"out_WRITE_UNIT_OUT_NO_SEQUENCE"  );
     267           _component->port_map(name,"out_WRITE_QUEUE_OUT_ADDRESS"      , _name,"out_WRITE_UNIT_OUT_ADDRESS"      );
     268           _component->port_map(name,"out_WRITE_QUEUE_OUT_DATA"         , _name,"out_WRITE_UNIT_OUT_DATA"         );
     269         }       
    265270
    266271       for (uint32_t i=0; i<_param->_nb_gpr_write; i++)
    267         {
    268 #ifdef POSITION
    269            _component->interface_map (name ,"gpr_write_"+toString(i),
    270                                       _name,"gpr_write_"+toString(i));
    271 #endif     
    272            
    273            _component->port_map(name,"out_GPR_WRITE_"+toString(i)+"_VAL"          ,_name,"out_GPR_WRITE_"+toString(i)+"_VAL"          );
    274            _component->port_map(name, "in_GPR_WRITE_"+toString(i)+"_ACK"          ,_name, "in_GPR_WRITE_"+toString(i)+"_ACK"          );
    275            if (_param->_have_port_ooo_engine_id)
    276            _component->port_map(name,"out_GPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",_name,"out_GPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID");
    277            _component->port_map(name,"out_GPR_WRITE_"+toString(i)+"_NUM_REG"      ,_name,"out_GPR_WRITE_"+toString(i)+"_NUM_REG"      );
    278            _component->port_map(name,"out_GPR_WRITE_"+toString(i)+"_DATA"         ,_name,"out_GPR_WRITE_"+toString(i)+"_DATA"         );
    279         }
     272        {
     273#ifdef POSITION
     274           _component->interface_map (name ,"gpr_write_"+toString(i),
     275                                      _name,"gpr_write_"+toString(i));
     276#endif     
     277           
     278           _component->port_map(name,"out_GPR_WRITE_"+toString(i)+"_VAL"          ,_name,"out_GPR_WRITE_"+toString(i)+"_VAL"          );
     279           _component->port_map(name, "in_GPR_WRITE_"+toString(i)+"_ACK"          ,_name, "in_GPR_WRITE_"+toString(i)+"_ACK"          );
     280           if (_param->_have_port_ooo_engine_id)
     281           _component->port_map(name,"out_GPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",_name,"out_GPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID");
     282           _component->port_map(name,"out_GPR_WRITE_"+toString(i)+"_NUM_REG"      ,_name,"out_GPR_WRITE_"+toString(i)+"_NUM_REG"      );
     283           _component->port_map(name,"out_GPR_WRITE_"+toString(i)+"_DATA"         ,_name,"out_GPR_WRITE_"+toString(i)+"_DATA"         );
     284        }
    280285
    281286       for (uint32_t i=0; i<_param->_nb_spr_write; i++)
    282         {
    283 #ifdef POSITION
    284            _component->interface_map (name ,"spr_write_"+toString(i),
    285                                       _name,"spr_write_"+toString(i));
    286 #endif     
    287            
    288            _component->port_map(name,"out_SPR_WRITE_"+toString(i)+"_VAL"          ,_name,"out_SPR_WRITE_"+toString(i)+"_VAL"          );
    289            _component->port_map(name, "in_SPR_WRITE_"+toString(i)+"_ACK"          ,_name, "in_SPR_WRITE_"+toString(i)+"_ACK"          );
    290            if (_param->_have_port_ooo_engine_id)
    291            _component->port_map(name,"out_SPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",_name,"out_SPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID");
    292            _component->port_map(name,"out_SPR_WRITE_"+toString(i)+"_NUM_REG"      ,_name,"out_SPR_WRITE_"+toString(i)+"_NUM_REG"      );
    293            _component->port_map(name,"out_SPR_WRITE_"+toString(i)+"_DATA"         ,_name,"out_SPR_WRITE_"+toString(i)+"_DATA"         );
    294         }
     287        {
     288#ifdef POSITION
     289           _component->interface_map (name ,"spr_write_"+toString(i),
     290                                      _name,"spr_write_"+toString(i));
     291#endif     
     292           
     293           _component->port_map(name,"out_SPR_WRITE_"+toString(i)+"_VAL"          ,_name,"out_SPR_WRITE_"+toString(i)+"_VAL"          );
     294           _component->port_map(name, "in_SPR_WRITE_"+toString(i)+"_ACK"          ,_name, "in_SPR_WRITE_"+toString(i)+"_ACK"          );
     295           if (_param->_have_port_ooo_engine_id)
     296           _component->port_map(name,"out_SPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",_name,"out_SPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID");
     297           _component->port_map(name,"out_SPR_WRITE_"+toString(i)+"_NUM_REG"      ,_name,"out_SPR_WRITE_"+toString(i)+"_NUM_REG"      );
     298           _component->port_map(name,"out_SPR_WRITE_"+toString(i)+"_DATA"         ,_name,"out_SPR_WRITE_"+toString(i)+"_DATA"         );
     299        }
    295300
    296301
    297302       for (uint32_t i=0; i<_param->_nb_bypass_write; i++)
    298         {
    299 #ifdef POSITION
    300            _component->interface_map (name ,"bypass_write_"+toString(i),
    301                                       _name,"bypass_write_"+toString(i));
    302 #endif     
    303 
    304            if (_param->_have_port_ooo_engine_id)
    305            _component->port_map(name,"out_BYPASS_WRITE_"+toString(i)+"_OOO_ENGINE_ID",_name,"out_BYPASS_WRITE_"+toString(i)+"_OOO_ENGINE_ID");
    306            _component->port_map(name,"out_BYPASS_WRITE_"+toString(i)+"_GPR_VAL"      ,_name,"out_BYPASS_WRITE_"+toString(i)+"_GPR_VAL"      );
    307            _component->port_map(name,"out_BYPASS_WRITE_"+toString(i)+"_GPR_NUM_REG"  ,_name,"out_BYPASS_WRITE_"+toString(i)+"_GPR_NUM_REG"  );
    308            _component->port_map(name,"out_BYPASS_WRITE_"+toString(i)+"_GPR_DATA"     ,_name,"out_BYPASS_WRITE_"+toString(i)+"_GPR_DATA"     );
    309            _component->port_map(name,"out_BYPASS_WRITE_"+toString(i)+"_SPR_VAL"      ,_name,"out_BYPASS_WRITE_"+toString(i)+"_SPR_VAL"      );
    310            _component->port_map(name,"out_BYPASS_WRITE_"+toString(i)+"_SPR_NUM_REG"  ,_name,"out_BYPASS_WRITE_"+toString(i)+"_SPR_NUM_REG"  );
    311            _component->port_map(name,"out_BYPASS_WRITE_"+toString(i)+"_SPR_DATA"     ,_name,"out_BYPASS_WRITE_"+toString(i)+"_SPR_DATA"     );
    312         }
     303        {
     304#ifdef POSITION
     305           _component->interface_map (name ,"bypass_write_"+toString(i),
     306                                      _name,"bypass_write_"+toString(i));
     307#endif     
     308
     309           if (_param->_have_port_ooo_engine_id)
     310           _component->port_map(name,"out_BYPASS_WRITE_"+toString(i)+"_OOO_ENGINE_ID",_name,"out_BYPASS_WRITE_"+toString(i)+"_OOO_ENGINE_ID");
     311           _component->port_map(name,"out_BYPASS_WRITE_"+toString(i)+"_GPR_VAL"      ,_name,"out_BYPASS_WRITE_"+toString(i)+"_GPR_VAL"      );
     312           _component->port_map(name,"out_BYPASS_WRITE_"+toString(i)+"_GPR_NUM_REG"  ,_name,"out_BYPASS_WRITE_"+toString(i)+"_GPR_NUM_REG"  );
     313           _component->port_map(name,"out_BYPASS_WRITE_"+toString(i)+"_GPR_DATA"     ,_name,"out_BYPASS_WRITE_"+toString(i)+"_GPR_DATA"     );
     314           _component->port_map(name,"out_BYPASS_WRITE_"+toString(i)+"_SPR_VAL"      ,_name,"out_BYPASS_WRITE_"+toString(i)+"_SPR_VAL"      );
     315           _component->port_map(name,"out_BYPASS_WRITE_"+toString(i)+"_SPR_NUM_REG"  ,_name,"out_BYPASS_WRITE_"+toString(i)+"_SPR_NUM_REG"  );
     316           _component->port_map(name,"out_BYPASS_WRITE_"+toString(i)+"_SPR_DATA"     ,_name,"out_BYPASS_WRITE_"+toString(i)+"_SPR_DATA"     );
     317        }
    313318     }
    314319
    315320     if (_param->_have_component_execute_queue)
    316321       {
    317         name = _name+"_execute_queue";
    318          std::cout << "Instance : " << name << std::endl;
    319        
    320 #ifdef POSITION
    321         _component->interface_map (name ,"",
    322                                     _name,"");
    323 #endif
    324        
    325         _component->port_map(name,"in_CLOCK" , _name, "in_CLOCK");
    326         _component->port_map(name,"in_NRESET", _name, "in_NRESET");
    327        
    328 
    329 #ifdef POSITION
    330         _component->interface_map (name ,"execute_queue_in",
    331                                     _name+"_write_queue","write_queue_in");
     322        name = _name+"_execute_queue";
     323         log_printf(INFO,Core,FUNCTION,_("Instance : %s"),name.c_str());
     324       
     325#ifdef POSITION
     326        _component->interface_map (name ,"",
     327                                    _name,"");
     328#endif
     329       
     330        _component->port_map(name,"in_CLOCK" , _name, "in_CLOCK");
     331        _component->port_map(name,"in_NRESET", _name, "in_NRESET");
     332       
     333
     334#ifdef POSITION
     335        _component->interface_map (name ,"execute_queue_in",
     336                                    _name+"_write_queue","write_queue_in");
    332337#endif
    333338
     
    340345         if (_param->_have_port_ooo_engine_id)
    341346         _component->port_map(name, "in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID", _name+"_write_queue","out_WRITE_QUEUE_OUT_OOO_ENGINE_ID");
    342          if (_param->_have_port_packet_id)
     347         if (_param->_have_port_rob_ptr)
    343348         _component->port_map(name, "in_EXECUTE_QUEUE_IN_PACKET_ID"    , _name+"_write_queue","out_WRITE_QUEUE_OUT_PACKET_ID"    );
    344349       //_component->port_map(name, "in_EXECUTE_QUEUE_IN_OPERATION"    , _name+"_write_queue","out_WRITE_QUEUE_OUT_OPERATION"    );
     
    348353         _component->port_map(name, "in_EXECUTE_QUEUE_IN_NO_SEQUENCE"  , _name+"_write_queue","out_WRITE_QUEUE_OUT_NO_SEQUENCE"  );
    349354         _component->port_map(name, "in_EXECUTE_QUEUE_IN_ADDRESS"      , _name+"_write_queue","out_WRITE_QUEUE_OUT_ADDRESS"      );
    350 
    351 #ifdef POSITION
    352            _component->interface_map (name ,"execute_queue_out",
    353                                       _name,"write_unit_out");
    354 #endif
    355 
    356            _component->port_map(name,"out_EXECUTE_QUEUE_OUT_VAL"          , _name,"out_WRITE_UNIT_OUT_VAL"          );
    357            _component->port_map(name, "in_EXECUTE_QUEUE_OUT_ACK"          , _name, "in_WRITE_UNIT_OUT_ACK"          );
    358            if (_param->_have_port_context_id)
    359            _component->port_map(name,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID"   , _name,"out_WRITE_UNIT_OUT_CONTEXT_ID"   );
    360            if (_param->_have_port_front_end_id)
    361            _component->port_map(name,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID" , _name,"out_WRITE_UNIT_OUT_FRONT_END_ID" );
    362            if (_param->_have_port_ooo_engine_id)
    363            _component->port_map(name,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID", _name,"out_WRITE_UNIT_OUT_OOO_ENGINE_ID");
    364            if (_param->_have_port_packet_id)
    365            _component->port_map(name,"out_EXECUTE_QUEUE_OUT_PACKET_ID"    , _name,"out_WRITE_UNIT_OUT_PACKET_ID"    );
    366          //_component->port_map(name,"out_EXECUTE_QUEUE_OUT_OPERATION"    , _name,"out_WRITE_UNIT_OUT_OPERATION"    );
    367          //_component->port_map(name,"out_EXECUTE_QUEUE_OUT_TYPE"         , _name,"out_WRITE_UNIT_OUT_TYPE"         );
    368            _component->port_map(name,"out_EXECUTE_QUEUE_OUT_FLAGS"        , _name,"out_WRITE_UNIT_OUT_FLAGS"        );
    369            _component->port_map(name,"out_EXECUTE_QUEUE_OUT_EXCEPTION"    , _name,"out_WRITE_UNIT_OUT_EXCEPTION"    );
    370            _component->port_map(name,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE"  , _name,"out_WRITE_UNIT_OUT_NO_SEQUENCE"  );
    371            _component->port_map(name,"out_EXECUTE_QUEUE_OUT_ADDRESS"      , _name,"out_WRITE_UNIT_OUT_ADDRESS"      );
     355         _component->port_map(name, "in_EXECUTE_QUEUE_IN_DATA"         , _name+"_write_queue","out_WRITE_QUEUE_OUT_DATA"         );
     356
     357#ifdef POSITION
     358         _component->interface_map (name ,"execute_queue_out",
     359                                    _name,"write_unit_out");
     360#endif
     361
     362         _component->port_map(name,"out_EXECUTE_QUEUE_OUT_VAL"          , _name,"out_WRITE_UNIT_OUT_VAL"          );
     363         _component->port_map(name, "in_EXECUTE_QUEUE_OUT_ACK"          , _name, "in_WRITE_UNIT_OUT_ACK"          );
     364         if (_param->_have_port_context_id)
     365         _component->port_map(name,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID"   , _name,"out_WRITE_UNIT_OUT_CONTEXT_ID"   );
     366         if (_param->_have_port_front_end_id)
     367         _component->port_map(name,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID" , _name,"out_WRITE_UNIT_OUT_FRONT_END_ID" );
     368         if (_param->_have_port_ooo_engine_id)
     369         _component->port_map(name,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID", _name,"out_WRITE_UNIT_OUT_OOO_ENGINE_ID");
     370         if (_param->_have_port_rob_ptr)
     371         _component->port_map(name,"out_EXECUTE_QUEUE_OUT_PACKET_ID"    , _name,"out_WRITE_UNIT_OUT_PACKET_ID"    );
     372       //_component->port_map(name,"out_EXECUTE_QUEUE_OUT_OPERATION"    , _name,"out_WRITE_UNIT_OUT_OPERATION"    );
     373       //_component->port_map(name,"out_EXECUTE_QUEUE_OUT_TYPE"         , _name,"out_WRITE_UNIT_OUT_TYPE"         );
     374         _component->port_map(name,"out_EXECUTE_QUEUE_OUT_FLAGS"        , _name,"out_WRITE_UNIT_OUT_FLAGS"        );
     375         _component->port_map(name,"out_EXECUTE_QUEUE_OUT_EXCEPTION"    , _name,"out_WRITE_UNIT_OUT_EXCEPTION"    );
     376         _component->port_map(name,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE"  , _name,"out_WRITE_UNIT_OUT_NO_SEQUENCE"  );
     377         _component->port_map(name,"out_EXECUTE_QUEUE_OUT_ADDRESS"      , _name,"out_WRITE_UNIT_OUT_ADDRESS"      );
     378         _component->port_map(name,"out_EXECUTE_QUEUE_OUT_DATA"         , _name,"out_WRITE_UNIT_OUT_DATA"         );
    372379       }
    373380
    374381#ifdef POSITION
    375     _component->generate_file();
     382    if (usage_is_set(_usage,USE_POSITION))
     383      _component->generate_file();
    376384#endif
    377385
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_deallocation.cpp

    r81 r88  
    2323    log_printf(FUNC,Write_unit,FUNCTION,"Begin");
    2424
    25     if (_usage & USE_SYSTEMC)
     25    if (usage_is_set(_usage,USE_SYSTEMC))
    2626      {
    2727        delete    in_CLOCK ;
     
    3737        if (_param->_have_port_ooo_engine_id)
    3838        delete      in_WRITE_UNIT_IN_OOO_ENGINE_ID;
    39         if (_param->_have_port_packet_id)
     39        if (_param->_have_port_rob_ptr)
    4040        delete      in_WRITE_UNIT_IN_PACKET_ID    ;
    4141//      delete      in_WRITE_UNIT_IN_OPERATION    ;
     
    6060        if (_param->_have_port_ooo_engine_id)
    6161        delete     out_WRITE_UNIT_OUT_OOO_ENGINE_ID;
    62         if (_param->_have_port_packet_id)
     62        if (_param->_have_port_rob_ptr)
    6363        delete     out_WRITE_UNIT_OUT_PACKET_ID    ;
    6464//      delete     out_WRITE_UNIT_OUT_OPERATION    ;
     
    6868        delete     out_WRITE_UNIT_OUT_NO_SEQUENCE  ;
    6969        delete     out_WRITE_UNIT_OUT_ADDRESS      ;
     70        delete     out_WRITE_UNIT_OUT_DATA         ;
    7071
    7172        // -----[ Interface "gpr_write" ]-------------------------------------
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
    33     _interfaces->testbench();
     34    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     35      _interfaces->testbench();
    3436#endif
    3537
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Execution_unit_to_Write_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/SelfTest/config_min.cfg

    r81 r88  
    11Execution_unit_to_Write_unit
    222       2       *2      # nb_execute_unit       
     31       1       +1      # nb_execute_unit_port [0] [nb_execute_unit]
     41       1       +1      # nb_execute_unit_port [1] [nb_execute_unit]
    351       1       *2      # nb_write_unit           
    461       1       *2      # nb_context             
     
    111316      16      *2      # nb_special_register   
    12140       1       +1      # priority
    13 1       1       +1      # table_routing        [0][0]
    14 1       1       +1      # table_routing        [1][0]
     151       1       +1      # table_routing        [0][0][0]
     161       1       +1      # table_routing        [1][0][0]
    15171       1       +1      # table_execute_thread [0][0]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/SelfTest/config_multi_execute-mono_thread.cfg

    r81 r88  
    11Execution_unit_to_Write_unit
    224       4       *2      # nb_execute_unit       
     31       1       +1      # nb_execute_unit_port [0] [nb_execute_unit]
     41       1       +1      # nb_execute_unit_port [1] [nb_execute_unit]
     51       1       +1      # nb_execute_unit_port [2] [nb_execute_unit]
     61       1       +1      # nb_execute_unit_port [3] [nb_execute_unit]
    373       3       *2      # nb_write_unit           
    481       1       *2      # nb_context             
     
    111516      16      *2      # nb_special_register   
    12160       1       +1      # priority
    13 1       1       +1      # table_routing [0][0]
    14 0       0       +1      # table_routing [0][1]
    15 0       0       +1      # table_routing [0][2]
    16 0       0       +1      # table_routing [1][0]
    17 1       1       +1      # table_routing [1][1]
    18 1       1       +1      # table_routing [1][2]
    19 0       0       +1      # table_routing [2][0]
    20 0       0       +1      # table_routing [2][1]
    21 1       1       +1      # table_routing [2][2]
    22 1       1       +1      # table_routing [3][0]
    23 1       1       +1      # table_routing [3][1]
    24 1       1       +1      # table_routing [3][2]
     171       1       +1      # table_routing [0][0][0]
     180       0       +1      # table_routing [0][1][0]
     190       0       +1      # table_routing [0][2][0]
     200       0       +1      # table_routing [1][0][0]
     211       1       +1      # table_routing [1][1][0]
     221       1       +1      # table_routing [1][2][0]
     230       0       +1      # table_routing [2][0][0]
     240       0       +1      # table_routing [2][1][0]
     251       1       +1      # table_routing [2][2][0]
     261       1       +1      # table_routing [3][0][0]
     271       1       +1      # table_routing [3][1][0]
     281       1       +1      # table_routing [3][2][0]
    25291       1       +1      # table_thread  [0][0]
    26301       1       +1      # table_thread  [1][0]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/SelfTest/config_multi_execute-multi_thread.cfg

    r81 r88  
    11Execution_unit_to_Write_unit
    224       4       *2      # nb_execute_unit       
     31       1       +1      # nb_execute_unit_port [0] [nb_execute_unit]
     41       1       +1      # nb_execute_unit_port [1] [nb_execute_unit]
     51       1       +1      # nb_execute_unit_port [2] [nb_execute_unit]
     61       1       +1      # nb_execute_unit_port [3] [nb_execute_unit]
    373       3       *2      # nb_write_unit           
    482       2       *2      # nb_context             
     
    111516      16      *2      # nb_special_register   
    12160       1       +1      # priority
    13 1       1       +1      # table_routing [0][0]
    14 0       0       +1      # table_routing [0][1]
    15 0       0       +1      # table_routing [0][2]
    16 0       0       +1      # table_routing [1][0]
    17 1       1       +1      # table_routing [1][1]
    18 1       1       +1      # table_routing [1][2]
    19 0       0       +1      # table_routing [2][0]
    20 0       0       +1      # table_routing [2][1]
    21 1       1       +1      # table_routing [2][2]
    22 1       1       +1      # table_routing [3][0]
    23 1       1       +1      # table_routing [3][1]
    24 1       1       +1      # table_routing [3][2]
     171       1       +1      # table_routing [0][0][0]
     180       0       +1      # table_routing [0][1][0]
     190       0       +1      # table_routing [0][2][0]
     200       0       +1      # table_routing [1][0][0]
     211       1       +1      # table_routing [1][1][0]
     221       1       +1      # table_routing [1][2][0]
     230       0       +1      # table_routing [2][0][0]
     240       0       +1      # table_routing [2][1][0]
     251       1       +1      # table_routing [2][2][0]
     261       1       +1      # table_routing [3][0][0]
     271       1       +1      # table_routing [3][1][0]
     281       1       +1      # table_routing [3][2][0]
    25291       1       +1      # table_thread  [0][0]
    26300       0       +1      # table_thread  [0][1]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/SelfTest/include/test.h

    r81 r88  
    1515#include <sys/time.h>
    1616
     17#define NB_ITERATION  1
     18#define CYCLE_MAX     (128*NB_ITERATION)
     19
    1720#include "Common/include/Time.h"
    1821#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Execution_unit_to_Write_unit.h"
     22#include "Common/include/Test.h"
    1923
    2024using namespace std;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/SelfTest/src/main.cpp

    r81 r88  
    1414  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
    1515  err (_("list_params is :\n"));
    16   err (_("  * nb_execute_unit                                (uint32_t)\n"));
    17   err (_("  * nb_write_unit                                  (uint32_t)\n"));
    18   err (_("  * nb_context                                     (uint32_t)\n"));
    19   err (_("  * nb_front_end                                   (uint32_t)\n"));
    20   err (_("  * nb_ooo_engine                                  (uint32_t)\n"));
    21   err (_("  * nb_packet                                      (uint32_t)\n"));
    22   err (_("  * size_general_data                              (uint32_t)\n"));
    23   err (_("  * size_special_data                              (uint32_t)\n"));
    24   err (_("  * nb_general_register                            (uint32_t)\n"));
    25   err (_("  * nb_special_register                            (uint32_t)\n"));
    26   err (_("  * priority                                       (uint32_t)\n"));
    27   err (_("  * table_routing [nb_execute_unit][nb_write_unit] (bool    )\n"));
    28   err (_("  * table_thread  [nb_write_unit][nb_thread]       (bool    )\n"));
     16  err (_("  * nb_execute_unit                                                      (uint32_t)\n"));
     17  err (_("  * nb_execute_unit_port [nb_execute_unit]                               (uint32_t)\n"));
     18  err (_("  * nb_write_unit                                                        (uint32_t)\n"));
     19  err (_("  * nb_context                                                           (uint32_t)\n"));
     20  err (_("  * nb_front_end                                                         (uint32_t)\n"));
     21  err (_("  * nb_ooo_engine                                                        (uint32_t)\n"));
     22  err (_("  * nb_packet                                                            (uint32_t)\n"));
     23  err (_("  * size_general_data                                                    (uint32_t)\n"));
     24  err (_("  * size_special_data                                                    (uint32_t)\n"));
     25  err (_("  * nb_general_register                                                  (uint32_t)\n"));
     26  err (_("  * nb_special_register                                                  (uint32_t)\n"));
     27  err (_("  * priority                                                             (uint32_t)\n"));
     28  err (_("  * table_routing [nb_execute_unit][nb_execute_unit_port][nb_write_unit] (bool    )\n"));
     29  err (_("  * table_thread  [nb_write_unit][nb_thread]                             (bool    )\n"));
    2930
    3031  exit (1);
     
    4344
    4445  const string   name      =      argv[x++];
    45   uint32_t    _nb_execute_unit      = atoi(argv[x++]);
    46   uint32_t    _nb_write_unit        = atoi(argv[x++]);
    47   uint32_t    _nb_context           = atoi(argv[x++]);
    48   uint32_t    _nb_front_end         = atoi(argv[x++]);
    49   uint32_t    _nb_ooo_engine        = atoi(argv[x++]);
    50   uint32_t    _nb_packet            = atoi(argv[x++]);
    51   uint32_t    _size_general_data    = atoi(argv[x++]);
    52   uint32_t    _size_special_data    = atoi(argv[x++]);
    53   uint32_t    _nb_general_register  = atoi(argv[x++]);
    54   uint32_t    _nb_special_register  = atoi(argv[x++]);
     46  uint32_t    _nb_execute_unit      = fromString<uint32_t>(argv[x++]);
     47
     48  if (static_cast<uint32_t>(argc) <= 2+NB_PARAMS+_nb_execute_unit)
     49    usage (argc, argv);
     50
     51  uint32_t    _sum_execute_unit_port = 0;
     52  uint32_t *  _nb_execute_unit_port = new uint32_t [_nb_execute_unit];
     53  for (uint32_t i=0; i<_nb_execute_unit; i++)
     54    {
     55      _nb_execute_unit_port [i] = fromString<uint32_t>(argv[x++]);
     56      _sum_execute_unit_port += _nb_execute_unit_port [i];
     57    }
     58
     59  uint32_t    _nb_write_unit        = fromString<uint32_t>(argv[x++]);
     60  uint32_t    _nb_context           = fromString<uint32_t>(argv[x++]);
     61  uint32_t    _nb_front_end         = fromString<uint32_t>(argv[x++]);
     62  uint32_t    _nb_ooo_engine        = fromString<uint32_t>(argv[x++]);
     63  uint32_t    _nb_packet            = fromString<uint32_t>(argv[x++]);
     64  uint32_t    _size_general_data    = fromString<uint32_t>(argv[x++]);
     65  uint32_t    _size_special_data    = fromString<uint32_t>(argv[x++]);
     66  uint32_t    _nb_general_register  = fromString<uint32_t>(argv[x++]);
     67  uint32_t    _nb_special_register  = fromString<uint32_t>(argv[x++]);
    5568  Tpriority_t _priority             = fromString<Tpriority_t>(argv[x++]);
    5669
    5770  uint32_t    _nb_thread            = get_nb_thread(_nb_context, _nb_front_end, _nb_ooo_engine);
    5871
    59   if (static_cast<uint32_t>(argc) != 2+NB_PARAMS+(_nb_write_unit*_nb_execute_unit)+(_nb_write_unit*_nb_thread))
     72  if (static_cast<uint32_t>(argc) != 2+NB_PARAMS+_nb_execute_unit+(_nb_write_unit*_sum_execute_unit_port)+(_nb_write_unit*_nb_thread))
    6073    usage (argc, argv);
    6174 
    62   bool ** _table_routing;
    63   bool ** _table_thread ;
     75  bool *** _table_routing;
     76  bool  ** _table_thread ;
    6477 
    65   _table_routing = new bool * [_nb_execute_unit];
     78  _table_routing = new bool ** [_nb_execute_unit];
    6679  for (uint32_t i=0; i<_nb_execute_unit; i++)
    6780    {
    68       _table_routing [i] = new bool [_nb_write_unit];
    69       for (uint32_t j=0; j<_nb_write_unit; j++)
    70         _table_routing [i][j] = atoi(argv[x++]);
     81      _table_routing [i] = new bool * [_nb_execute_unit_port [i]];
     82      for (uint32_t j=0; j<_nb_execute_unit_port [i]; j++)
     83        {
     84          _table_routing [i][j] = new bool [_nb_write_unit];
     85          for (uint32_t k=0; k<_nb_write_unit; k++)
     86            _table_routing [i][j][k] = fromString<bool>(argv[x++]);
     87        }
    7188    }
    7289
     
    7794
    7895      for (uint32_t j=0; j<_nb_thread; j++)
    79         _table_thread [i][j] = atoi(argv[x++]);
     96        _table_thread [i][j] = fromString<bool>(argv[x++]);
    8097    }
    8198
     99  int _return = EXIT_SUCCESS;
    82100  try
    83101    {
    84102      morpheo::behavioural::core::multi_execute_loop::execute_loop::network::execution_unit_to_write_unit::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::network::execution_unit_to_write_unit::Parameters
    85103        (_nb_execute_unit      ,
     104         _nb_execute_unit_port ,
    86105         _nb_write_unit        ,
    87106         _nb_context           ,
     
    95114         _priority             ,
    96115         _table_routing        ,
    97          _table_thread
     116         _table_thread         ,
     117         true //is_toplevel
    98118         );
    99119     
    100       msg(_("%s"),param->print(1).c_str());
     120      msg(_("%s"),param->print(0).c_str());
    101121     
    102122      test (name,param);
     
    104124  catch (morpheo::ErrorMorpheo & error)
    105125    {
    106       msg (_("<%s> : %s.\n"),name.c_str(), error.what ());
    107       exit (EXIT_FAILURE);
     126      msg (_("<%s> :\n%s"),name.c_str(), error.what ());
     127      _return = EXIT_FAILURE;
    108128    }
    109   catch (...)
     129 
     130  try
    110131    {
    111       err (_("<%s> : This test must generate a error.\n"),name.c_str());
    112       exit (EXIT_FAILURE);
     132      if (_return == EXIT_SUCCESS)
     133        TEST_OK("Execution_unit_to_Write_unit : no error");
     134      else
     135        TEST_KO("Execution_unit_to_Write_unit : a lot of error");
     136    }
     137  catch (morpheo::ErrorMorpheo & error)
     138    {
     139//       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
     140      _return = EXIT_FAILURE;
    113141    }
    114142
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/SelfTest/src/test.cpp

    r82 r88  
    77 */
    88
    9 #define NB_ITERATION  1
    10 #define CYCLE_MAX     (128*NB_ITERATION)
    11 
    129#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/SelfTest/include/test.h"
    13 #include "Common/include/Test.h"
    1410#include "Common/include/BitManipulation.h"
    1511#include "Behavioural/include/Allocation.h"
     
    7874#endif
    7975
     76  Tusage_t _usage = USE_ALL;
     77
     78//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     79//   _usage = usage_unset(_usage,USE_VHDL                 );
     80//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     81//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     82//   _usage = usage_unset(_usage,USE_POSITION             );
     83   _usage = usage_unset(_usage,USE_STATISTICS           );
     84//   _usage = usage_unset(_usage,USE_INFORMATION          );
     85
    8086  Execution_unit_to_Write_unit * _Execution_unit_to_Write_unit = new Execution_unit_to_Write_unit
    8187    (name.c_str(),
     
    8490#endif
    8591     _param,
    86      USE_ALL);
     92     _usage);
    8793 
    8894#ifdef SYSTEMC
     
    95101  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    96102
    97   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_VAL          ," in_EXECUTE_UNIT_OUT_VAL          ",Tcontrol_t        ,_param->_nb_execute_unit);
    98   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_OUT_ACK          ,"out_EXECUTE_UNIT_OUT_ACK          ",Tcontrol_t        ,_param->_nb_execute_unit);
    99   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_CONTEXT_ID   ," in_EXECUTE_UNIT_OUT_CONTEXT_ID   ",Tcontext_t        ,_param->_nb_execute_unit);
    100   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_FRONT_END_ID ," in_EXECUTE_UNIT_OUT_FRONT_END_ID ",Tcontext_t        ,_param->_nb_execute_unit);
    101   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID," in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID",Tcontext_t        ,_param->_nb_execute_unit);
    102   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_PACKET_ID    ," in_EXECUTE_UNIT_OUT_PACKET_ID    ",Tpacket_t         ,_param->_nb_execute_unit);
    103 //ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_OPERATION    ," in_EXECUTE_UNIT_OUT_OPERATION    ",Toperation_t      ,_param->_nb_execute_unit);
    104   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_TYPE         ," in_EXECUTE_UNIT_OUT_TYPE         ",Ttype_t           ,_param->_nb_execute_unit);
    105   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_WRITE_RD     ," in_EXECUTE_UNIT_OUT_WRITE_RD     ",Tcontrol_t        ,_param->_nb_execute_unit);
    106   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_NUM_REG_RD   ," in_EXECUTE_UNIT_OUT_NUM_REG_RD   ",Tgeneral_address_t,_param->_nb_execute_unit);
    107   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_DATA_RD      ," in_EXECUTE_UNIT_OUT_DATA_RD      ",Tgeneral_data_t   ,_param->_nb_execute_unit);
    108   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_WRITE_RE     ," in_EXECUTE_UNIT_OUT_WRITE_RE     ",Tcontrol_t        ,_param->_nb_execute_unit);
    109   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_NUM_REG_RE   ," in_EXECUTE_UNIT_OUT_NUM_REG_RE   ",Tspecial_address_t,_param->_nb_execute_unit);
    110   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_DATA_RE      ," in_EXECUTE_UNIT_OUT_DATA_RE      ",Tspecial_data_t   ,_param->_nb_execute_unit);
    111   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_EXCEPTION    ," in_EXECUTE_UNIT_OUT_EXCEPTION    ",Texception_t      ,_param->_nb_execute_unit);
    112   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_NO_SEQUENCE  ," in_EXECUTE_UNIT_OUT_NO_SEQUENCE  ",Tcontrol_t        ,_param->_nb_execute_unit);
    113   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_OUT_ADDRESS      ," in_EXECUTE_UNIT_OUT_ADDRESS      ",Tgeneral_data_t   ,_param->_nb_execute_unit);
     103  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_VAL          ," in_EXECUTE_UNIT_OUT_VAL          ",Tcontrol_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     104  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_OUT_ACK          ,"out_EXECUTE_UNIT_OUT_ACK          ",Tcontrol_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     105  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_CONTEXT_ID   ," in_EXECUTE_UNIT_OUT_CONTEXT_ID   ",Tcontext_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     106  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_FRONT_END_ID ," in_EXECUTE_UNIT_OUT_FRONT_END_ID ",Tcontext_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     107  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID," in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID",Tcontext_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     108  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_PACKET_ID    ," in_EXECUTE_UNIT_OUT_PACKET_ID    ",Tpacket_t         ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     109//ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_OPERATION    ," in_EXECUTE_UNIT_OUT_OPERATION    ",Toperation_t      ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     110  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_TYPE         ," in_EXECUTE_UNIT_OUT_TYPE         ",Ttype_t           ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     111  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_WRITE_RD     ," in_EXECUTE_UNIT_OUT_WRITE_RD     ",Tcontrol_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     112  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_NUM_REG_RD   ," in_EXECUTE_UNIT_OUT_NUM_REG_RD   ",Tgeneral_address_t,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     113  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_DATA_RD      ," in_EXECUTE_UNIT_OUT_DATA_RD      ",Tgeneral_data_t   ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     114  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_WRITE_RE     ," in_EXECUTE_UNIT_OUT_WRITE_RE     ",Tcontrol_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     115  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_NUM_REG_RE   ," in_EXECUTE_UNIT_OUT_NUM_REG_RE   ",Tspecial_address_t,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     116  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_DATA_RE      ," in_EXECUTE_UNIT_OUT_DATA_RE      ",Tspecial_data_t   ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     117  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_EXCEPTION    ," in_EXECUTE_UNIT_OUT_EXCEPTION    ",Texception_t      ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     118  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_NO_SEQUENCE  ," in_EXECUTE_UNIT_OUT_NO_SEQUENCE  ",Tcontrol_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     119  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_ADDRESS      ," in_EXECUTE_UNIT_OUT_ADDRESS      ",Tgeneral_data_t   ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     120
    114121  ALLOC1_SC_SIGNAL(out_WRITE_UNIT_IN_VAL             ,"out_WRITE_UNIT_IN_VAL             ",Tcontrol_t        ,_param->_nb_write_unit  );
    115122  ALLOC1_SC_SIGNAL( in_WRITE_UNIT_IN_ACK             ," in_WRITE_UNIT_IN_ACK             ",Tcontrol_t        ,_param->_nb_write_unit  );
     
    139146  (*(_Execution_unit_to_Write_unit->in_NRESET))       (*(in_NRESET));
    140147
    141   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_VAL          ,_param->_nb_execute_unit);
    142   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit,out_EXECUTE_UNIT_OUT_ACK          ,_param->_nb_execute_unit);
     148  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_VAL          ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     149  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit,out_EXECUTE_UNIT_OUT_ACK          ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
    143150  if (_param->_have_port_context_id)
    144   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_CONTEXT_ID   ,_param->_nb_execute_unit);
     151  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_CONTEXT_ID   ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
    145152  if (_param->_have_port_front_end_id)
    146   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_FRONT_END_ID ,_param->_nb_execute_unit);
     153  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_FRONT_END_ID ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
    147154  if (_param->_have_port_ooo_engine_id)
    148   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID,_param->_nb_execute_unit);
    149   if (_param->_have_port_packet_id)
    150   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_PACKET_ID    ,_param->_nb_execute_unit);
    151 //INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_OPERATION    ,_param->_nb_execute_unit);
    152   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_TYPE         ,_param->_nb_execute_unit);
    153   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_WRITE_RD     ,_param->_nb_execute_unit);
    154   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_NUM_REG_RD   ,_param->_nb_execute_unit);
    155   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_DATA_RD      ,_param->_nb_execute_unit);
    156   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_WRITE_RE     ,_param->_nb_execute_unit);
    157   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_NUM_REG_RE   ,_param->_nb_execute_unit);
    158   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_DATA_RE      ,_param->_nb_execute_unit);
    159   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_EXCEPTION    ,_param->_nb_execute_unit);
    160   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_NO_SEQUENCE  ,_param->_nb_execute_unit);
    161   INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_ADDRESS      ,_param->_nb_execute_unit);
     155  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     156  if (_param->_have_port_rob_ptr  )
     157  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_PACKET_ID    ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     158//INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_OPERATION    ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     159  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_TYPE         ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     160  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_WRITE_RD     ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     161  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_NUM_REG_RD   ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     162  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_DATA_RD      ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     163  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_WRITE_RE     ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     164  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_NUM_REG_RE   ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     165  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_DATA_RE      ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     166  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_EXCEPTION    ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     167  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_NO_SEQUENCE  ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     168  INSTANCE2_SC_SIGNAL(_Execution_unit_to_Write_unit, in_EXECUTE_UNIT_OUT_ADDRESS      ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
    162169
    163170  INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit,out_WRITE_UNIT_IN_VAL             ,_param->_nb_write_unit  );
     
    169176  if (_param->_have_port_ooo_engine_id)
    170177  INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit,out_WRITE_UNIT_IN_OOO_ENGINE_ID   ,_param->_nb_write_unit  );
    171   if (_param->_have_port_packet_id)
     178  if (_param->_have_port_rob_ptr  )
    172179  INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit,out_WRITE_UNIT_IN_PACKET_ID       ,_param->_nb_write_unit  );
    173180//INSTANCE1_SC_SIGNAL(_Execution_unit_to_Write_unit,out_WRITE_UNIT_IN_OPERATION       ,_param->_nb_write_unit  );
     
    201208  const  int32_t percent_transaction_out = 75;
    202209
    203   set<Tcontext_t> execute_unit_thread [_param->_nb_execute_unit];
     210  set<Tcontext_t> execute_unit_thread [_param->_nb_execute_unit][_param->_max_nb_execute_unit_port];
    204211 
    205212  for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    206     for (uint32_t j=0; j<_param->_nb_write_unit; j++)
    207       if (_param->_table_routing[i][j])
    208         for (uint32_t k=0; k<_param->_nb_thread; k++)
    209           if (_param->_table_thread[j][k])
    210             {
    211               execute_unit_thread [i].insert(k);
    212             }
     213    for (uint32_t ii=0; ii<_param->_nb_execute_unit_port[i]; ii++)
     214      for (uint32_t j=0; j<_param->_nb_write_unit; j++)
     215        if (_param->_table_routing[i][ii][j])
     216          for (uint32_t k=0; k<_param->_nb_thread; k++)
     217            if (_param->_table_thread[j][k])
     218              {
     219                execute_unit_thread [i][ii].insert(k);
     220              }
     221
    213222  SC_START(0);
    214223  LABEL("Initialisation");
     
    225234      LABEL("Iteration %d",iteration);
    226235
    227       list<entry_t> request [_param->_nb_execute_unit];
     236      list<entry_t> request [_param->_nb_execute_unit][_param->_max_nb_execute_unit_port];
    228237
    229238      uint32_t nb_request_in;
    230239      for (nb_request_in=0; nb_request_in < _param->_nb_packet; )
    231240        for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    232           {
    233             if (nb_request_in >= _param->_nb_packet)
    234               break;
    235 
    236             Tcontext_t context_id   ;
    237             Tcontext_t front_end_id ;
    238             Tcontext_t ooo_engine_id;
    239             Tcontext_t num_thread   ;
    240 
    241             // Find compatible thread
    242             do
    243               {
    244                 context_id    = range<Tcontext_t> (rand(), _param->_size_context_id   );
    245                 front_end_id  = range<Tcontext_t> (rand(), _param->_size_front_end_id );
    246                 ooo_engine_id = range<Tcontext_t> (rand(), _param->_size_ooo_engine_id);
    247                 num_thread    = get_num_thread (context_id   , _param->_size_context_id   ,
    248                                                 front_end_id , _param->_size_front_end_id ,
    249                                                 ooo_engine_id, _param->_size_ooo_engine_id);
    250               }
    251             while (execute_unit_thread[i].find(num_thread) == execute_unit_thread[i].end());
    252 
    253             request[i].push_back(entry_t (context_id   ,
    254                                           front_end_id ,
    255                                           ooo_engine_id,
    256                                           nb_request_in,
    257                                           //range<Toperation_t      > (rand(), _param->_size_operation       ),
    258                                           range<Ttype_t           > (rand(), _param->_size_type            ),
    259                                           range<Tcontrol_t        > (rand(), 2                             ),
    260                                           range<Tgeneral_address_t> (rand(), _param->_size_general_register),
    261                                           range<Tgeneral_data_t   > (rand(), _param->_size_general_data    ),
    262                                           range<Tcontrol_t        > (rand(), 2                             ),
    263                                           range<Tspecial_address_t> (rand(), _param->_size_special_register),
    264                                           range<Tspecial_data_t   > (rand(), _param->_size_special_data    ),
    265                                           range<Texception_t      > (rand(), _param->_size_exception       ),
    266                                           range<Tcontrol_t        > (rand(), 2                             ),
    267                                           range<Tgeneral_data_t   > (rand(), _param->_size_general_data    )
    268                                           ));
    269 
    270             nb_request_in++;
    271           }
     241          for (uint32_t j=0; j<_param->_nb_execute_unit_port[i]; j++)
     242            {
     243              if (nb_request_in >= _param->_nb_packet)
     244                break;
     245             
     246              Tcontext_t context_id   ;
     247              Tcontext_t front_end_id ;
     248              Tcontext_t ooo_engine_id;
     249              Tcontext_t num_thread   ;
     250             
     251              // Find compatible thread
     252              do
     253                {
     254                  context_id    = range<Tcontext_t> (rand(), _param->_size_context_id   );
     255                  front_end_id  = range<Tcontext_t> (rand(), _param->_size_front_end_id );
     256                  ooo_engine_id = range<Tcontext_t> (rand(), _param->_size_ooo_engine_id);
     257                  num_thread    = get_num_thread (context_id   , _param->_size_context_id   ,
     258                                                  front_end_id , _param->_size_front_end_id ,
     259                                                  ooo_engine_id, _param->_size_ooo_engine_id);
     260                }
     261              while (execute_unit_thread[i][j].find(num_thread) == execute_unit_thread[i][j].end());
     262             
     263              request[i][j].push_back(entry_t (context_id   ,
     264                                               front_end_id ,
     265                                               ooo_engine_id,
     266                                               nb_request_in,
     267                                               //range<Toperation_t      > (rand(), _param->_size_operation       ),
     268                                               range<Ttype_t           > (rand(), _param->_size_type            ),
     269                                               range<Tcontrol_t        > (rand(), 2                             ),
     270                                               range<Tgeneral_address_t> (rand(), _param->_size_general_register),
     271                                               range<Tgeneral_data_t   > (rand(), _param->_size_general_data    ),
     272                                               range<Tcontrol_t        > (rand(), 2                             ),
     273                                               range<Tspecial_address_t> (rand(), _param->_size_special_register),
     274                                               range<Tspecial_data_t   > (rand(), _param->_size_special_data    ),
     275                                               range<Texception_t      > (rand(), _param->_size_exception       ),
     276                                               range<Tcontrol_t        > (rand(), 2                             ),
     277                                               range<Tgeneral_data_t   > (rand(), _param->_size_general_data    )
     278                                               ));
     279             
     280              nb_request_in++;
     281            }
    272282
    273283      uint32_t   nb_request_out = 0;
     
    276286        {
    277287          for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    278             {
    279               bool val = not request[i].empty() and ((rand()%100) < percent_transaction_in);
     288            for (uint32_t j=0; j<_param->_nb_execute_unit_port[i]; j++)
     289              {
     290                bool val = not request[i][j].empty() and ((rand()%100) < percent_transaction_in);
    280291               
    281               in_EXECUTE_UNIT_OUT_VAL [i]->write(val);
    282 
    283               if (val)
    284                 {
    285                   in_EXECUTE_UNIT_OUT_CONTEXT_ID           [i] ->write(request[i].front()._context_id           );
    286                   in_EXECUTE_UNIT_OUT_FRONT_END_ID         [i] ->write(request[i].front()._front_end_id         );
    287                   in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID        [i] ->write(request[i].front()._ooo_engine_id        );
    288                   in_EXECUTE_UNIT_OUT_PACKET_ID            [i] ->write(request[i].front()._packet_id            );
    289 //                in_EXECUTE_UNIT_OUT_OPERATION            [i] ->write(request[i].front()._operation            );
    290                   in_EXECUTE_UNIT_OUT_TYPE                 [i] ->write(request[i].front()._type                 );
    291                   in_EXECUTE_UNIT_OUT_WRITE_RD             [i] ->write(request[i].front()._write_rd             );
    292                   in_EXECUTE_UNIT_OUT_NUM_REG_RD           [i] ->write(request[i].front()._num_reg_rd           );
    293                   in_EXECUTE_UNIT_OUT_DATA_RD              [i] ->write(request[i].front()._data_rd              );
    294                   in_EXECUTE_UNIT_OUT_WRITE_RE             [i] ->write(request[i].front()._write_re             );
    295                   in_EXECUTE_UNIT_OUT_NUM_REG_RE           [i] ->write(request[i].front()._num_reg_re           );
    296                   in_EXECUTE_UNIT_OUT_DATA_RE              [i] ->write(request[i].front()._data_re              );
    297                   in_EXECUTE_UNIT_OUT_EXCEPTION            [i] ->write(request[i].front()._exception            );
    298                   in_EXECUTE_UNIT_OUT_NO_SEQUENCE          [i] ->write(request[i].front()._no_sequence          );
    299                   in_EXECUTE_UNIT_OUT_ADDRESS              [i] ->write(request[i].front()._address              );
    300                 }
    301             }
     292                in_EXECUTE_UNIT_OUT_VAL [i][j]->write(val);
     293               
     294                if (val)
     295                  {
     296                    in_EXECUTE_UNIT_OUT_CONTEXT_ID           [i][j] ->write(request[i][j].front()._context_id           );
     297                    in_EXECUTE_UNIT_OUT_FRONT_END_ID         [i][j] ->write(request[i][j].front()._front_end_id         );
     298                    in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID        [i][j] ->write(request[i][j].front()._ooo_engine_id        );
     299                    in_EXECUTE_UNIT_OUT_PACKET_ID            [i][j] ->write(request[i][j].front()._packet_id            );
     300//                  in_EXECUTE_UNIT_OUT_OPERATION            [i][j] ->write(request[i][j].front()._operation            );
     301                    in_EXECUTE_UNIT_OUT_TYPE                 [i][j] ->write(request[i][j].front()._type                 );
     302                    in_EXECUTE_UNIT_OUT_WRITE_RD             [i][j] ->write(request[i][j].front()._write_rd             );
     303                    in_EXECUTE_UNIT_OUT_NUM_REG_RD           [i][j] ->write(request[i][j].front()._num_reg_rd           );
     304                    in_EXECUTE_UNIT_OUT_DATA_RD              [i][j] ->write(request[i][j].front()._data_rd              );
     305                    in_EXECUTE_UNIT_OUT_WRITE_RE             [i][j] ->write(request[i][j].front()._write_re             );
     306                    in_EXECUTE_UNIT_OUT_NUM_REG_RE           [i][j] ->write(request[i][j].front()._num_reg_re           );
     307                    in_EXECUTE_UNIT_OUT_DATA_RE              [i][j] ->write(request[i][j].front()._data_re              );
     308                    in_EXECUTE_UNIT_OUT_EXCEPTION            [i][j] ->write(request[i][j].front()._exception            );
     309                    in_EXECUTE_UNIT_OUT_NO_SEQUENCE          [i][j] ->write(request[i][j].front()._no_sequence          );
     310                    in_EXECUTE_UNIT_OUT_ADDRESS              [i][j] ->write(request[i][j].front()._address              );
     311                  }
     312              }
    302313
    303314          for (uint32_t i=0; i<_param->_nb_write_unit; i++)
     
    307318
    308319          for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    309             if (in_EXECUTE_UNIT_OUT_VAL [i]->read() and out_EXECUTE_UNIT_OUT_ACK [i]->read())
    310               {
    311                 LABEL("EXECUTE_UNIT_OUT   [%d] - Transaction accepted",i);
    312               }
    313 
     320            for (uint32_t j=0; j<_param->_nb_execute_unit_port[i]; j++)
     321              if (in_EXECUTE_UNIT_OUT_VAL [i][j]->read() and out_EXECUTE_UNIT_OUT_ACK [i][j]->read())
     322                {
     323                  LABEL("EXECUTE_UNIT_OUT   [%d][%d] - Transaction accepted",i,j);
     324                }
     325         
    314326          for (uint32_t i=0; i<_param->_nb_write_unit; i++)
    315327            if (out_WRITE_UNIT_IN_VAL [i]->read() and in_WRITE_UNIT_IN_ACK [i]->read())
     
    318330                nb_request_out ++;
    319331               
    320                 Tpacket_t packet = (_param->_have_port_packet_id)?out_WRITE_UNIT_IN_PACKET_ID[i]->read():0;
    321                 LABEL("  * packet           : %d",packet);             
    322                 uint32_t execute_unit;
     332                Tpacket_t packet = (_param->_have_port_rob_ptr  )?out_WRITE_UNIT_IN_PACKET_ID[i]->read():0;
     333                LABEL("  * packet              : %d",packet);           
    323334
    324335                // find execute_unit
    325                 for (execute_unit=0; execute_unit<_param->_nb_execute_unit; execute_unit++)
    326                   if (packet == ((_param->_have_port_packet_id)?request[execute_unit].front()._packet_id:0))
    327                     break;
    328 
    329                 LABEL("  * execute_unit source : %d",execute_unit);
    330 
    331                 if (_param->_have_port_packet_id)
    332                 TEST(Tcontext_t        ,out_WRITE_UNIT_IN_PACKET_ID            [i]->read(), request[execute_unit].front()._packet_id            );
     336                uint32_t x = 0;
     337                uint32_t y = 0;
     338                bool     find = false;
     339                for (x=0; x<_param->_nb_execute_unit; x++)
     340                  {
     341                    for (y=0; y<_param->_nb_execute_unit_port[x]; y++)
     342                      if (packet == ((_param->_have_port_rob_ptr  )?request[x][y].front()._packet_id:0))
     343                        {
     344                          find = true;
     345                          break;
     346                        }
     347                    if (find)
     348                      break;
     349                  }
     350
     351                LABEL("  * execute_unit source : %d",x);
     352                LABEL("  * execute_unit port   : %d",y);
     353                TEST(bool,x<_param->_nb_execute_unit, true);
     354                TEST(bool,y<_param->_nb_execute_unit_port[x],true);
     355               
     356                if (_param->_have_port_rob_ptr  )
     357                TEST(Tpacket_t         ,packet                                            , request[x][y].front()._packet_id            );
    333358
    334359                // Authorised link ? execute_unit -> write_unit
    335                 TEST(bool, _param->_table_routing[execute_unit][i], true);
     360                TEST(bool, _param->_table_routing[x][y][i], true);
    336361
    337362                if (_param->_have_port_context_id)
    338                 TEST(Tcontext_t        ,out_WRITE_UNIT_IN_CONTEXT_ID           [i]->read(), request[execute_unit].front()._context_id           );
     363                TEST(Tcontext_t        ,out_WRITE_UNIT_IN_CONTEXT_ID           [i]->read(), request[x][y].front()._context_id           );
    339364                if (_param->_have_port_front_end_id)
    340                 TEST(Tcontext_t        ,out_WRITE_UNIT_IN_FRONT_END_ID         [i]->read(), request[execute_unit].front()._front_end_id         );
     365                TEST(Tcontext_t        ,out_WRITE_UNIT_IN_FRONT_END_ID         [i]->read(), request[x][y].front()._front_end_id         );
    341366                if (_param->_have_port_ooo_engine_id)
    342                 TEST(Tcontext_t        ,out_WRITE_UNIT_IN_OOO_ENGINE_ID        [i]->read(), request[execute_unit].front()._ooo_engine_id        );
    343 //              TEST(Toperation_t      ,out_WRITE_UNIT_IN_OPERATION            [i]->read(), request[execute_unit].front()._operation            );
    344                 TEST(Ttype_t           ,out_WRITE_UNIT_IN_TYPE                 [i]->read(), request[execute_unit].front()._type                 );
    345                 TEST(Tcontrol_t        ,out_WRITE_UNIT_IN_WRITE_RD             [i]->read(), request[execute_unit].front()._write_rd             );
    346                 TEST(Tgeneral_address_t,out_WRITE_UNIT_IN_NUM_REG_RD           [i]->read(), request[execute_unit].front()._num_reg_rd           );
    347                 TEST(Tgeneral_data_t   ,out_WRITE_UNIT_IN_DATA_RD              [i]->read(), request[execute_unit].front()._data_rd              );
    348                 TEST(Tcontrol_t        ,out_WRITE_UNIT_IN_WRITE_RE             [i]->read(), request[execute_unit].front()._write_re             );
    349                 TEST(Tspecial_address_t,out_WRITE_UNIT_IN_NUM_REG_RE           [i]->read(), request[execute_unit].front()._num_reg_re           );
    350                 TEST(Tspecial_data_t   ,out_WRITE_UNIT_IN_DATA_RE              [i]->read(), request[execute_unit].front()._data_re              );
    351                 TEST(Texception_t      ,out_WRITE_UNIT_IN_EXCEPTION            [i]->read(), request[execute_unit].front()._exception            );
    352                 TEST(Tcontrol_t        ,out_WRITE_UNIT_IN_NO_SEQUENCE          [i]->read(), request[execute_unit].front()._no_sequence          );
    353                 TEST(Tgeneral_data_t   ,out_WRITE_UNIT_IN_ADDRESS              [i]->read(), request[execute_unit].front()._address              );
     367                TEST(Tcontext_t        ,out_WRITE_UNIT_IN_OOO_ENGINE_ID        [i]->read(), request[x][y].front()._ooo_engine_id        );
     368//              TEST(Toperation_t      ,out_WRITE_UNIT_IN_OPERATION            [i]->read(), request[x][y].front()._operation            );
     369                TEST(Ttype_t           ,out_WRITE_UNIT_IN_TYPE                 [i]->read(), request[x][y].front()._type                 );
     370                TEST(Tcontrol_t        ,out_WRITE_UNIT_IN_WRITE_RD             [i]->read(), request[x][y].front()._write_rd             );
     371                TEST(Tgeneral_address_t,out_WRITE_UNIT_IN_NUM_REG_RD           [i]->read(), request[x][y].front()._num_reg_rd           );
     372                TEST(Tgeneral_data_t   ,out_WRITE_UNIT_IN_DATA_RD              [i]->read(), request[x][y].front()._data_rd              );
     373                TEST(Tcontrol_t        ,out_WRITE_UNIT_IN_WRITE_RE             [i]->read(), request[x][y].front()._write_re             );
     374                TEST(Tspecial_address_t,out_WRITE_UNIT_IN_NUM_REG_RE           [i]->read(), request[x][y].front()._num_reg_re           );
     375                TEST(Tspecial_data_t   ,out_WRITE_UNIT_IN_DATA_RE              [i]->read(), request[x][y].front()._data_re              );
     376                TEST(Texception_t      ,out_WRITE_UNIT_IN_EXCEPTION            [i]->read(), request[x][y].front()._exception            );
     377                TEST(Tcontrol_t        ,out_WRITE_UNIT_IN_NO_SEQUENCE          [i]->read(), request[x][y].front()._no_sequence          );
     378                TEST(Tgeneral_data_t   ,out_WRITE_UNIT_IN_ADDRESS              [i]->read(), request[x][y].front()._address              );
    354379               
    355                 request[execute_unit].pop_front();
     380                request[x][y].pop_front();
    356381              }
    357382          SC_START(1);
     
    372397  delete in_NRESET;
    373398
    374   delete []  in_EXECUTE_UNIT_OUT_VAL          ;
    375   delete [] out_EXECUTE_UNIT_OUT_ACK          ;
    376   delete []  in_EXECUTE_UNIT_OUT_CONTEXT_ID   ;
    377   delete []  in_EXECUTE_UNIT_OUT_FRONT_END_ID ;
    378   delete []  in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID;
    379   delete []  in_EXECUTE_UNIT_OUT_PACKET_ID    ;
    380 //delete []  in_EXECUTE_UNIT_OUT_OPERATION    ;
    381   delete []  in_EXECUTE_UNIT_OUT_TYPE         ;
    382   delete []  in_EXECUTE_UNIT_OUT_WRITE_RD     ;
    383   delete []  in_EXECUTE_UNIT_OUT_NUM_REG_RD   ;
    384   delete []  in_EXECUTE_UNIT_OUT_DATA_RD      ;
    385   delete []  in_EXECUTE_UNIT_OUT_WRITE_RE     ;
    386   delete []  in_EXECUTE_UNIT_OUT_NUM_REG_RE   ;
    387   delete []  in_EXECUTE_UNIT_OUT_DATA_RE      ;
    388   delete []  in_EXECUTE_UNIT_OUT_EXCEPTION    ;
    389   delete []  in_EXECUTE_UNIT_OUT_NO_SEQUENCE  ;
    390   delete []  in_EXECUTE_UNIT_OUT_ADDRESS      ;
    391 
    392   delete [] out_WRITE_UNIT_IN_VAL             ;
    393   delete []  in_WRITE_UNIT_IN_ACK             ;
    394   delete [] out_WRITE_UNIT_IN_CONTEXT_ID      ;
    395   delete [] out_WRITE_UNIT_IN_FRONT_END_ID    ;
    396   delete [] out_WRITE_UNIT_IN_OOO_ENGINE_ID   ;
    397   delete [] out_WRITE_UNIT_IN_PACKET_ID       ;
    398 //delete [] out_WRITE_UNIT_IN_OPERATION       ;
    399   delete [] out_WRITE_UNIT_IN_TYPE            ;
    400   delete [] out_WRITE_UNIT_IN_WRITE_RD        ;
    401   delete [] out_WRITE_UNIT_IN_NUM_REG_RD      ;
    402   delete [] out_WRITE_UNIT_IN_DATA_RD         ;
    403   delete [] out_WRITE_UNIT_IN_WRITE_RE        ;
    404   delete [] out_WRITE_UNIT_IN_NUM_REG_RE      ;
    405   delete [] out_WRITE_UNIT_IN_DATA_RE         ;
    406   delete [] out_WRITE_UNIT_IN_EXCEPTION       ;
    407   delete [] out_WRITE_UNIT_IN_NO_SEQUENCE     ;
    408   delete [] out_WRITE_UNIT_IN_ADDRESS         ;
     399  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_VAL          ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     400  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_OUT_ACK          ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     401  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_CONTEXT_ID   ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     402  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_FRONT_END_ID ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     403  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     404  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_PACKET_ID    ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     405//DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_OPERATION    ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     406  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_TYPE         ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     407  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_WRITE_RD     ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     408  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_NUM_REG_RD   ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     409  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_DATA_RD      ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     410  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_WRITE_RE     ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     411  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_NUM_REG_RE   ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     412  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_DATA_RE      ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     413  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_EXCEPTION    ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     414  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_NO_SEQUENCE  ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     415  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_OUT_ADDRESS      ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     416
     417  DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_VAL             ,_param->_nb_write_unit  );
     418  DELETE1_SC_SIGNAL( in_WRITE_UNIT_IN_ACK             ,_param->_nb_write_unit  );
     419  DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_CONTEXT_ID      ,_param->_nb_write_unit  );
     420  DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_FRONT_END_ID    ,_param->_nb_write_unit  );
     421  DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_OOO_ENGINE_ID   ,_param->_nb_write_unit  );
     422  DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_PACKET_ID       ,_param->_nb_write_unit  );
     423//DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_OPERATION       ,_param->_nb_write_unit  );
     424  DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_TYPE            ,_param->_nb_write_unit  );
     425  DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_WRITE_RD        ,_param->_nb_write_unit  );
     426  DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_NUM_REG_RD      ,_param->_nb_write_unit  );
     427  DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_DATA_RD         ,_param->_nb_write_unit  );
     428  DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_WRITE_RE        ,_param->_nb_write_unit  );
     429  DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_NUM_REG_RE      ,_param->_nb_write_unit  );
     430  DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_DATA_RE         ,_param->_nb_write_unit  );
     431  DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_EXCEPTION       ,_param->_nb_write_unit  );
     432  DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_NO_SEQUENCE     ,_param->_nb_write_unit  );
     433  DELETE1_SC_SIGNAL(out_WRITE_UNIT_IN_ADDRESS         ,_param->_nb_write_unit  );
    409434#endif
    410435
  • 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

    r82 r88  
    6565
    6666    // ~~~~~[ Interface "execute_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    67   public    : SC_IN (Tcontrol_t        )   **  in_EXECUTE_UNIT_OUT_VAL            ;
    68   public    : SC_OUT(Tcontrol_t        )   ** out_EXECUTE_UNIT_OUT_ACK            ;
    69   public    : SC_IN (Tcontext_t        )   **  in_EXECUTE_UNIT_OUT_CONTEXT_ID     ;
    70   public    : SC_IN (Tcontext_t        )   **  in_EXECUTE_UNIT_OUT_FRONT_END_ID   ;
    71   public    : SC_IN (Tcontext_t        )   **  in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID  ;
    72   public    : SC_IN (Tpacket_t         )   **  in_EXECUTE_UNIT_OUT_PACKET_ID      ;
    73 //public    : SC_IN (Toperation_t      )   **  in_EXECUTE_UNIT_OUT_OPERATION      ;
    74   public    : SC_IN (Ttype_t           )   **  in_EXECUTE_UNIT_OUT_TYPE           ;
    75   public    : SC_IN (Tcontrol_t        )   **  in_EXECUTE_UNIT_OUT_WRITE_RD       ;
    76   public    : SC_IN (Tgeneral_address_t)   **  in_EXECUTE_UNIT_OUT_NUM_REG_RD     ;
    77   public    : SC_IN (Tgeneral_data_t   )   **  in_EXECUTE_UNIT_OUT_DATA_RD        ;
    78   public    : SC_IN (Tcontrol_t        )   **  in_EXECUTE_UNIT_OUT_WRITE_RE       ;
    79   public    : SC_IN (Tspecial_address_t)   **  in_EXECUTE_UNIT_OUT_NUM_REG_RE     ;
    80   public    : SC_IN (Tspecial_data_t   )   **  in_EXECUTE_UNIT_OUT_DATA_RE        ;
    81   public    : SC_IN (Texception_t      )   **  in_EXECUTE_UNIT_OUT_EXCEPTION      ;
    82   public    : SC_IN (Tcontrol_t        )   **  in_EXECUTE_UNIT_OUT_NO_SEQUENCE    ;
    83   public    : SC_IN (Tgeneral_data_t   )   **  in_EXECUTE_UNIT_OUT_ADDRESS        ;
     67  public    : SC_IN (Tcontrol_t        )  ***  in_EXECUTE_UNIT_OUT_VAL            ;
     68  public    : SC_OUT(Tcontrol_t        )  *** out_EXECUTE_UNIT_OUT_ACK            ;
     69  public    : SC_IN (Tcontext_t        )  ***  in_EXECUTE_UNIT_OUT_CONTEXT_ID     ;
     70  public    : SC_IN (Tcontext_t        )  ***  in_EXECUTE_UNIT_OUT_FRONT_END_ID   ;
     71  public    : SC_IN (Tcontext_t        )  ***  in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID  ;
     72  public    : SC_IN (Tpacket_t         )  ***  in_EXECUTE_UNIT_OUT_PACKET_ID      ;
     73//public    : SC_IN (Toperation_t      )  ***  in_EXECUTE_UNIT_OUT_OPERATION      ;
     74  public    : SC_IN (Ttype_t           )  ***  in_EXECUTE_UNIT_OUT_TYPE           ;
     75  public    : SC_IN (Tcontrol_t        )  ***  in_EXECUTE_UNIT_OUT_WRITE_RD       ;
     76  public    : SC_IN (Tgeneral_address_t)  ***  in_EXECUTE_UNIT_OUT_NUM_REG_RD     ;
     77  public    : SC_IN (Tgeneral_data_t   )  ***  in_EXECUTE_UNIT_OUT_DATA_RD        ;
     78  public    : SC_IN (Tcontrol_t        )  ***  in_EXECUTE_UNIT_OUT_WRITE_RE       ;
     79  public    : SC_IN (Tspecial_address_t)  ***  in_EXECUTE_UNIT_OUT_NUM_REG_RE     ;
     80  public    : SC_IN (Tspecial_data_t   )  ***  in_EXECUTE_UNIT_OUT_DATA_RE        ;
     81  public    : SC_IN (Texception_t      )  ***  in_EXECUTE_UNIT_OUT_EXCEPTION      ;
     82  public    : SC_IN (Tcontrol_t        )  ***  in_EXECUTE_UNIT_OUT_NO_SEQUENCE    ;
     83  public    : SC_IN (Tgeneral_data_t   )  ***  in_EXECUTE_UNIT_OUT_ADDRESS        ;
    8484
    8585    // ~~~~~[ Interface "write_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    107107
    108108    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    109   private   : std::list<uint32_t> ** _destination; // [nb_execute_unit][nb_thread];
     109  private   : std::list<uint32_t> *** _destination; //[nb_execute_unit][nb_execute_unit_port][nb_thread];
    110110#endif
    111111
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Parameters.h

    r81 r88  
    2626  {
    2727    //-----[ fields ]------------------------------------------------------------
    28   public : const uint32_t    _nb_execute_unit              ;
    29   public : const uint32_t    _nb_write_unit                ;
    30   public : const uint32_t    _nb_context                   ;
    31   public : const uint32_t    _nb_front_end                 ;
    32   public : const uint32_t    _nb_ooo_engine                ;
    33   public : const uint32_t    _nb_packet                    ;
    34   public : const uint32_t    _size_general_data            ;
    35   public : const uint32_t    _size_special_data            ;
    36   public : const uint32_t    _nb_general_register          ;
    37   public : const uint32_t    _nb_special_register          ;
    38   public : const Tpriority_t _priority                     ;
    39   public :       bool     ** _table_routing                ; //array [nb_execute_unit][nb_write_unit]
    40   public :       bool     ** _table_thread                 ; //array [nb_write_unit][nb_thread]
     28  public : uint32_t    _nb_execute_unit              ;
     29  public : uint32_t  * _nb_execute_unit_port         ;//[nb_execute_unit]
     30  public : uint32_t    _nb_write_unit                ;
     31  public : uint32_t    _nb_context                   ;
     32  public : uint32_t    _nb_front_end                 ;
     33  public : uint32_t    _nb_ooo_engine                ;
     34  public : uint32_t    _nb_packet                    ;
     35//public : uint32_t    _size_general_data            ;
     36//public : uint32_t    _size_special_data            ;
     37  public : uint32_t    _nb_general_register          ;
     38  public : uint32_t    _nb_special_register          ;
     39  public : Tpriority_t _priority                     ;
     40  public : bool    *** _table_routing                ; //[nb_execute_unit][nb_execute_unit_port][nb_write_unit]
     41  public : bool     ** _table_thread                 ; //[nb_write_unit][nb_thread]
    4142
    42   public : const uint32_t    _size_context_id              ;
    43   public : const uint32_t    _size_front_end_id            ;
    44   public : const uint32_t    _size_ooo_engine_id           ;
    45   public : const uint32_t    _size_packet_id               ;
    46   public : const uint32_t    _size_general_register        ;
    47   public : const uint32_t    _size_special_register        ;
     43  public : uint32_t    _max_nb_execute_unit_port     ;
     44//public : uint32_t    _size_context_id              ;
     45//public : uint32_t    _size_front_end_id            ;
     46//public : uint32_t    _size_ooo_engine_id           ;
     47//public : uint32_t    _size_packet_id               ;
     48//public : uint32_t    _size_general_register        ;
     49//public : uint32_t    _size_special_register        ;
    4850
    49   public : const bool        _have_port_context_id         ;
    50   public : const bool        _have_port_front_end_id       ;
    51   public : const bool        _have_port_ooo_engine_id      ;
    52   public : const bool        _have_port_packet_id          ;
     51//public : bool        _have_port_context_id         ;
     52//public : bool        _have_port_front_end_id       ;
     53//public : bool        _have_port_ooo_engine_id      ;
     54//public : bool        _have_port_packet_id          ;
    5355
    54   public : const uint32_t    _nb_thread                    ;
     56  public : uint32_t    _nb_thread                    ;
    5557
    5658    //-----[ methods ]-----------------------------------------------------------
    5759  public : Parameters  (uint32_t    nb_execute_unit              ,
     60                        uint32_t  * nb_execute_unit_port         ,
    5861                        uint32_t    nb_write_unit                ,
    5962                        uint32_t    nb_context                   ,
     
    6669                        uint32_t    nb_special_register          ,
    6770                        Tpriority_t priority                     ,
    68                         bool     ** table_routing                ,
    69                         bool     ** table_thread                 );
    70   public : Parameters  (Parameters & param) ;
     71                        bool    *** table_routing                ,
     72                        bool     ** table_thread                 ,
     73                        bool        is_toplevel=false
     74                        );
     75//   public : Parameters  (Parameters & param) ;
    7176  public : ~Parameters ();
     77
     78  public :        void            copy       (void);
    7279
    7380  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/src/Execution_unit_to_Write_unit.cpp

    r81 r88  
    3838    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
    3939
     40#if DEBUG_Execution_unit_to_Write_unit == true
     41    log_printf(INFO,Execution_unit_to_Write_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif   
     45
    4046    log_printf(INFO,Execution_unit_to_Write_unit,FUNCTION,"Allocation");
    4147
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    5157        log_printf(INFO,Execution_unit_to_Write_unit,FUNCTION,"Allocation of statistics");
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
     
    6672
    6773#ifdef SYSTEMC
    68     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    6975      {
    7076        log_printf(INFO,Execution_unit_to_Write_unit,FUNCTION,"Method - transition");
     
    8490        sensitive << (*(in_CLOCK)).pos();
    8591        for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    86           {
    87             if (_param->_have_port_context_id)
    88             sensitive << (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [i]));
    89             if (_param->_have_port_front_end_id)
    90             sensitive << (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [i]));
    91             if (_param->_have_port_ooo_engine_id)
    92             sensitive << (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [i]));
    93             if (_param->_have_port_packet_id)
    94             sensitive << (*(in_EXECUTE_UNIT_OUT_PACKET_ID     [i]));
    95 
    96             sensitive << (*(in_EXECUTE_UNIT_OUT_VAL           [i]))
    97                     //<< (*(in_EXECUTE_UNIT_OUT_OPERATION     [i]))
    98                     //<< (*(in_EXECUTE_UNIT_OUT_TYPE          [i]))
    99                       << (*(in_EXECUTE_UNIT_OUT_WRITE_RD      [i]))
    100                       << (*(in_EXECUTE_UNIT_OUT_NUM_REG_RD    [i]))
    101                       << (*(in_EXECUTE_UNIT_OUT_DATA_RD       [i]))
    102                       << (*(in_EXECUTE_UNIT_OUT_WRITE_RE      [i]))
    103                       << (*(in_EXECUTE_UNIT_OUT_NUM_REG_RE    [i]))
    104                       << (*(in_EXECUTE_UNIT_OUT_DATA_RE       [i]))
    105                       << (*(in_EXECUTE_UNIT_OUT_EXCEPTION     [i]))
    106                       << (*(in_EXECUTE_UNIT_OUT_NO_SEQUENCE   [i]))
    107                       << (*(in_EXECUTE_UNIT_OUT_ADDRESS       [i]));
    108           }
     92          for (uint32_t j=0; j<_param->_nb_execute_unit_port[i]; j++)
     93            {
     94              if (_param->_have_port_context_id)
     95              sensitive << (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [i][j]));
     96              if (_param->_have_port_front_end_id)
     97              sensitive << (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [i][j]));
     98              if (_param->_have_port_ooo_engine_id)
     99              sensitive << (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [i][j]));
     100              if (_param->_have_port_rob_ptr  )
     101              sensitive << (*(in_EXECUTE_UNIT_OUT_PACKET_ID     [i][j]));
     102             
     103              sensitive << (*(in_EXECUTE_UNIT_OUT_VAL           [i][j]))
     104                      //<< (*(in_EXECUTE_UNIT_OUT_OPERATION     [i][j]))
     105                      //<< (*(in_EXECUTE_UNIT_OUT_TYPE          [i][j]))
     106                        << (*(in_EXECUTE_UNIT_OUT_WRITE_RD      [i][j]))
     107                        << (*(in_EXECUTE_UNIT_OUT_NUM_REG_RD    [i][j]))
     108                        << (*(in_EXECUTE_UNIT_OUT_DATA_RD       [i][j]))
     109                        << (*(in_EXECUTE_UNIT_OUT_WRITE_RE      [i][j]))
     110                        << (*(in_EXECUTE_UNIT_OUT_NUM_REG_RE    [i][j]))
     111                        << (*(in_EXECUTE_UNIT_OUT_DATA_RE       [i][j]))
     112                        << (*(in_EXECUTE_UNIT_OUT_EXCEPTION     [i][j]))
     113                        << (*(in_EXECUTE_UNIT_OUT_NO_SEQUENCE   [i][j]))
     114                        << (*(in_EXECUTE_UNIT_OUT_ADDRESS       [i][j]));
     115            }
    109116        for (uint32_t i=0; i<_param->_nb_write_unit; i++)
    110117          sensitive << (*(in_WRITE_UNIT_IN_ACK [i]));
     
    113120        // List dependency information
    114121        for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    115           {
    116             (*(out_EXECUTE_UNIT_OUT_ACK [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [i]));
    117             if (_param->_have_port_context_id)
    118             (*(out_EXECUTE_UNIT_OUT_ACK [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [i]));
    119             if (_param->_have_port_front_end_id)
    120             (*(out_EXECUTE_UNIT_OUT_ACK [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [i]));
    121             if (_param->_have_port_ooo_engine_id)
    122             (*(out_EXECUTE_UNIT_OUT_ACK [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [i]));
    123 
    124             for (uint32_t j=0; j<_param->_nb_write_unit; j++)
    125               (*(out_EXECUTE_UNIT_OUT_ACK [i])) (*(in_WRITE_UNIT_IN_ACK [j]));
    126           }
     122          for (uint32_t j=0; j<_param->_nb_execute_unit_port[i]; j++)
     123            {
     124              (*(out_EXECUTE_UNIT_OUT_ACK [i][j])) (*(in_EXECUTE_UNIT_OUT_VAL           [i][j]));
     125              if (_param->_have_port_context_id)
     126              (*(out_EXECUTE_UNIT_OUT_ACK [i][j])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [i][j]));
     127              if (_param->_have_port_front_end_id)
     128              (*(out_EXECUTE_UNIT_OUT_ACK [i][j])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [i][j]));
     129              if (_param->_have_port_ooo_engine_id)
     130              (*(out_EXECUTE_UNIT_OUT_ACK [i][j])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [i][j]));
     131
     132              for (uint32_t x=0; x<_param->_nb_write_unit; x++)
     133                (*(out_EXECUTE_UNIT_OUT_ACK [i][j])) (*(in_WRITE_UNIT_IN_ACK [x]));
     134            }
    127135
    128136        for (uint32_t i=0; i<_param->_nb_write_unit; i++)
    129137          {
    130138            (*(out_WRITE_UNIT_IN_VAL [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    131             for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    132               {
    133                 (*(out_WRITE_UNIT_IN_VAL [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
    134                 if (_param->_have_port_context_id)
    135                 (*(out_WRITE_UNIT_IN_VAL [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
    136                 if (_param->_have_port_front_end_id)
    137                 (*(out_WRITE_UNIT_IN_VAL [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
    138                 if (_param->_have_port_ooo_engine_id)
    139                 (*(out_WRITE_UNIT_IN_VAL [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
     139            for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     140              for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     141              {
     142                (*(out_WRITE_UNIT_IN_VAL [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
     143                if (_param->_have_port_context_id)
     144                (*(out_WRITE_UNIT_IN_VAL [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
     145                if (_param->_have_port_front_end_id)
     146                (*(out_WRITE_UNIT_IN_VAL [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
     147                if (_param->_have_port_ooo_engine_id)
     148                (*(out_WRITE_UNIT_IN_VAL [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    140149              }
    141150
     
    143152              {
    144153            (*(out_WRITE_UNIT_IN_CONTEXT_ID [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    145             for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    146               {
    147                 (*(out_WRITE_UNIT_IN_CONTEXT_ID [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
    148                 if (_param->_have_port_context_id)
    149                 (*(out_WRITE_UNIT_IN_CONTEXT_ID [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
    150                 if (_param->_have_port_front_end_id)
    151                 (*(out_WRITE_UNIT_IN_CONTEXT_ID [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
    152                 if (_param->_have_port_ooo_engine_id)
    153                 (*(out_WRITE_UNIT_IN_CONTEXT_ID [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
     154            for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     155              for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     156              {
     157                (*(out_WRITE_UNIT_IN_CONTEXT_ID [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
     158                if (_param->_have_port_context_id)
     159                (*(out_WRITE_UNIT_IN_CONTEXT_ID [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
     160                if (_param->_have_port_front_end_id)
     161                (*(out_WRITE_UNIT_IN_CONTEXT_ID [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
     162                if (_param->_have_port_ooo_engine_id)
     163                (*(out_WRITE_UNIT_IN_CONTEXT_ID [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    154164              }
    155165              }
     
    157167              {
    158168            (*(out_WRITE_UNIT_IN_FRONT_END_ID [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    159             for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    160               {
    161                 (*(out_WRITE_UNIT_IN_FRONT_END_ID [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
    162                 if (_param->_have_port_context_id)
    163                 (*(out_WRITE_UNIT_IN_FRONT_END_ID [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
    164                 if (_param->_have_port_front_end_id)
    165                 (*(out_WRITE_UNIT_IN_FRONT_END_ID [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
    166                 if (_param->_have_port_ooo_engine_id)
    167                 (*(out_WRITE_UNIT_IN_FRONT_END_ID [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
     169            for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     170              for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     171              {
     172                (*(out_WRITE_UNIT_IN_FRONT_END_ID [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
     173                if (_param->_have_port_context_id)
     174                (*(out_WRITE_UNIT_IN_FRONT_END_ID [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
     175                if (_param->_have_port_front_end_id)
     176                (*(out_WRITE_UNIT_IN_FRONT_END_ID [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
     177                if (_param->_have_port_ooo_engine_id)
     178                (*(out_WRITE_UNIT_IN_FRONT_END_ID [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    168179              }
    169180              }
     
    171182              {
    172183            (*(out_WRITE_UNIT_IN_OOO_ENGINE_ID [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    173             for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    174               {
    175                 (*(out_WRITE_UNIT_IN_OOO_ENGINE_ID [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
    176                 if (_param->_have_port_context_id)
    177                 (*(out_WRITE_UNIT_IN_OOO_ENGINE_ID [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
    178                 if (_param->_have_port_front_end_id)
    179                 (*(out_WRITE_UNIT_IN_OOO_ENGINE_ID [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
    180                 if (_param->_have_port_ooo_engine_id)
    181                 (*(out_WRITE_UNIT_IN_OOO_ENGINE_ID [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
    182               }
    183               }
    184 
    185             if (_param->_have_port_packet_id)
     184            for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     185              for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     186              {
     187                (*(out_WRITE_UNIT_IN_OOO_ENGINE_ID [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
     188                if (_param->_have_port_context_id)
     189                (*(out_WRITE_UNIT_IN_OOO_ENGINE_ID [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
     190                if (_param->_have_port_front_end_id)
     191                (*(out_WRITE_UNIT_IN_OOO_ENGINE_ID [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
     192                if (_param->_have_port_ooo_engine_id)
     193                (*(out_WRITE_UNIT_IN_OOO_ENGINE_ID [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
     194              }
     195              }
     196
     197            if (_param->_have_port_rob_ptr  )
    186198              {
    187199            (*(out_WRITE_UNIT_IN_PACKET_ID [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    188             for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    189               {
    190                 (*(out_WRITE_UNIT_IN_PACKET_ID [i])) (*(in_EXECUTE_UNIT_OUT_PACKET_ID [j]));
    191                 (*(out_WRITE_UNIT_IN_PACKET_ID [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
    192                 if (_param->_have_port_context_id)
    193                 (*(out_WRITE_UNIT_IN_PACKET_ID [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
    194                 if (_param->_have_port_front_end_id)
    195                 (*(out_WRITE_UNIT_IN_PACKET_ID [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
    196                 if (_param->_have_port_ooo_engine_id)
    197                 (*(out_WRITE_UNIT_IN_PACKET_ID [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
     200            for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     201              for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     202              {
     203                (*(out_WRITE_UNIT_IN_PACKET_ID [i])) (*(in_EXECUTE_UNIT_OUT_PACKET_ID [x][y]));
     204                (*(out_WRITE_UNIT_IN_PACKET_ID [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
     205                if (_param->_have_port_context_id)
     206                (*(out_WRITE_UNIT_IN_PACKET_ID [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
     207                if (_param->_have_port_front_end_id)
     208                (*(out_WRITE_UNIT_IN_PACKET_ID [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
     209                if (_param->_have_port_ooo_engine_id)
     210                (*(out_WRITE_UNIT_IN_PACKET_ID [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    198211              }
    199212              }
    200213
    201214//          (*(out_WRITE_UNIT_IN_OPERATION [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    202 //          for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
     215//          for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     216//            for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
    203217//            {
    204 //              (*(out_WRITE_UNIT_IN_OPERATION [i])) (*(in_EXECUTE_UNIT_OUT_OPERATION [j]));
    205 //              (*(out_WRITE_UNIT_IN_OPERATION [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
     218//              (*(out_WRITE_UNIT_IN_OPERATION [i])) (*(in_EXECUTE_UNIT_OUT_OPERATION [x][y]));
     219//              (*(out_WRITE_UNIT_IN_OPERATION [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
    206220//              if (_param->_have_port_context_id)
    207 //              (*(out_WRITE_UNIT_IN_OPERATION [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
     221//              (*(out_WRITE_UNIT_IN_OPERATION [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
    208222//              if (_param->_have_port_front_end_id)
    209 //              (*(out_WRITE_UNIT_IN_OPERATION [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
     223//              (*(out_WRITE_UNIT_IN_OPERATION [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
    210224//              if (_param->_have_port_ooo_engine_id)
    211 //              (*(out_WRITE_UNIT_IN_OPERATION [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
     225//              (*(out_WRITE_UNIT_IN_OPERATION [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    212226//            }
    213227
    214228//          (*(out_WRITE_UNIT_IN_TYPE [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    215 //          for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
     229//          for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     230//            for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
    216231//            {
    217 //              (*(out_WRITE_UNIT_IN_TYPE [i])) (*(in_EXECUTE_UNIT_OUT_TYPE [j]));
    218 //              (*(out_WRITE_UNIT_IN_TYPE [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
     232//              (*(out_WRITE_UNIT_IN_TYPE [i])) (*(in_EXECUTE_UNIT_OUT_TYPE [x][y]));
     233//              (*(out_WRITE_UNIT_IN_TYPE [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
    219234//              if (_param->_have_port_context_id)
    220 //              (*(out_WRITE_UNIT_IN_TYPE [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
     235//              (*(out_WRITE_UNIT_IN_TYPE [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
    221236//              if (_param->_have_port_front_end_id)
    222 //              (*(out_WRITE_UNIT_IN_TYPE [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
     237//              (*(out_WRITE_UNIT_IN_TYPE [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
    223238//              if (_param->_have_port_ooo_engine_id)
    224 //              (*(out_WRITE_UNIT_IN_TYPE [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
     239//              (*(out_WRITE_UNIT_IN_TYPE [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    225240//            }
    226241
    227242            (*(out_WRITE_UNIT_IN_WRITE_RD [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    228             for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    229               {
    230                 (*(out_WRITE_UNIT_IN_WRITE_RD [i])) (*(in_EXECUTE_UNIT_OUT_WRITE_RD [j]));
    231                 (*(out_WRITE_UNIT_IN_WRITE_RD [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
    232                 if (_param->_have_port_context_id)
    233                 (*(out_WRITE_UNIT_IN_WRITE_RD [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
    234                 if (_param->_have_port_front_end_id)
    235                 (*(out_WRITE_UNIT_IN_WRITE_RD [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
    236                 if (_param->_have_port_ooo_engine_id)
    237                 (*(out_WRITE_UNIT_IN_WRITE_RD [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
     243            for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     244              for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     245              {
     246                (*(out_WRITE_UNIT_IN_WRITE_RD [i])) (*(in_EXECUTE_UNIT_OUT_WRITE_RD [x][y]));
     247                (*(out_WRITE_UNIT_IN_WRITE_RD [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
     248                if (_param->_have_port_context_id)
     249                (*(out_WRITE_UNIT_IN_WRITE_RD [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
     250                if (_param->_have_port_front_end_id)
     251                (*(out_WRITE_UNIT_IN_WRITE_RD [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
     252                if (_param->_have_port_ooo_engine_id)
     253                (*(out_WRITE_UNIT_IN_WRITE_RD [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    238254              }
    239255
    240256            (*(out_WRITE_UNIT_IN_NUM_REG_RD [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    241             for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    242               {
    243                 (*(out_WRITE_UNIT_IN_NUM_REG_RD [i])) (*(in_EXECUTE_UNIT_OUT_NUM_REG_RD [j]));
    244                 (*(out_WRITE_UNIT_IN_NUM_REG_RD [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
    245                 if (_param->_have_port_context_id)
    246                 (*(out_WRITE_UNIT_IN_NUM_REG_RD [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
    247                 if (_param->_have_port_front_end_id)
    248                 (*(out_WRITE_UNIT_IN_NUM_REG_RD [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
    249                 if (_param->_have_port_ooo_engine_id)
    250                 (*(out_WRITE_UNIT_IN_NUM_REG_RD [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
     257            for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     258              for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     259              {
     260                (*(out_WRITE_UNIT_IN_NUM_REG_RD [i])) (*(in_EXECUTE_UNIT_OUT_NUM_REG_RD [x][y]));
     261                (*(out_WRITE_UNIT_IN_NUM_REG_RD [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
     262                if (_param->_have_port_context_id)
     263                (*(out_WRITE_UNIT_IN_NUM_REG_RD [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
     264                if (_param->_have_port_front_end_id)
     265                (*(out_WRITE_UNIT_IN_NUM_REG_RD [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
     266                if (_param->_have_port_ooo_engine_id)
     267                (*(out_WRITE_UNIT_IN_NUM_REG_RD [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    251268              }
    252269
    253270            (*(out_WRITE_UNIT_IN_DATA_RD [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    254             for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    255               {
    256                 (*(out_WRITE_UNIT_IN_DATA_RD [i])) (*(in_EXECUTE_UNIT_OUT_DATA_RD [j]));
    257                 (*(out_WRITE_UNIT_IN_DATA_RD [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
    258                 if (_param->_have_port_context_id)
    259                 (*(out_WRITE_UNIT_IN_DATA_RD [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
    260                 if (_param->_have_port_front_end_id)
    261                 (*(out_WRITE_UNIT_IN_DATA_RD [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
    262                 if (_param->_have_port_ooo_engine_id)
    263                 (*(out_WRITE_UNIT_IN_DATA_RD [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
     271            for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     272              for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     273              {
     274                (*(out_WRITE_UNIT_IN_DATA_RD [i])) (*(in_EXECUTE_UNIT_OUT_DATA_RD [x][y]));
     275                (*(out_WRITE_UNIT_IN_DATA_RD [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
     276                if (_param->_have_port_context_id)
     277                (*(out_WRITE_UNIT_IN_DATA_RD [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
     278                if (_param->_have_port_front_end_id)
     279                (*(out_WRITE_UNIT_IN_DATA_RD [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
     280                if (_param->_have_port_ooo_engine_id)
     281                (*(out_WRITE_UNIT_IN_DATA_RD [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    264282              }
    265283
    266284            (*(out_WRITE_UNIT_IN_WRITE_RE [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    267             for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    268               {
    269                 (*(out_WRITE_UNIT_IN_WRITE_RE [i])) (*(in_EXECUTE_UNIT_OUT_WRITE_RE [j]));
    270                 (*(out_WRITE_UNIT_IN_WRITE_RE [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
    271                 if (_param->_have_port_context_id)
    272                 (*(out_WRITE_UNIT_IN_WRITE_RE [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
    273                 if (_param->_have_port_front_end_id)
    274                 (*(out_WRITE_UNIT_IN_WRITE_RE [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
    275                 if (_param->_have_port_ooo_engine_id)
    276                 (*(out_WRITE_UNIT_IN_WRITE_RE [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
     285            for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     286              for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     287              {
     288                (*(out_WRITE_UNIT_IN_WRITE_RE [i])) (*(in_EXECUTE_UNIT_OUT_WRITE_RE [x][y]));
     289                (*(out_WRITE_UNIT_IN_WRITE_RE [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
     290                if (_param->_have_port_context_id)
     291                (*(out_WRITE_UNIT_IN_WRITE_RE [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
     292                if (_param->_have_port_front_end_id)
     293                (*(out_WRITE_UNIT_IN_WRITE_RE [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
     294                if (_param->_have_port_ooo_engine_id)
     295                (*(out_WRITE_UNIT_IN_WRITE_RE [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    277296              }
    278297
    279298            (*(out_WRITE_UNIT_IN_NUM_REG_RE [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    280             for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    281               {
    282                 (*(out_WRITE_UNIT_IN_NUM_REG_RE [i])) (*(in_EXECUTE_UNIT_OUT_NUM_REG_RE [j]));
    283                 (*(out_WRITE_UNIT_IN_NUM_REG_RE [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
    284                 if (_param->_have_port_context_id)
    285                 (*(out_WRITE_UNIT_IN_NUM_REG_RE [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
    286                 if (_param->_have_port_front_end_id)
    287                 (*(out_WRITE_UNIT_IN_NUM_REG_RE [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
    288                 if (_param->_have_port_ooo_engine_id)
    289                 (*(out_WRITE_UNIT_IN_NUM_REG_RE [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
     299            for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     300              for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     301              {
     302                (*(out_WRITE_UNIT_IN_NUM_REG_RE [i])) (*(in_EXECUTE_UNIT_OUT_NUM_REG_RE [x][y]));
     303                (*(out_WRITE_UNIT_IN_NUM_REG_RE [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
     304                if (_param->_have_port_context_id)
     305                (*(out_WRITE_UNIT_IN_NUM_REG_RE [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
     306                if (_param->_have_port_front_end_id)
     307                (*(out_WRITE_UNIT_IN_NUM_REG_RE [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
     308                if (_param->_have_port_ooo_engine_id)
     309                (*(out_WRITE_UNIT_IN_NUM_REG_RE [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    290310              }
    291311
    292312            (*(out_WRITE_UNIT_IN_DATA_RE [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    293             for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    294               {
    295                 (*(out_WRITE_UNIT_IN_DATA_RE [i])) (*(in_EXECUTE_UNIT_OUT_DATA_RE [j]));
    296                 (*(out_WRITE_UNIT_IN_DATA_RE [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
    297                 if (_param->_have_port_context_id)
    298                 (*(out_WRITE_UNIT_IN_DATA_RE [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
    299                 if (_param->_have_port_front_end_id)
    300                 (*(out_WRITE_UNIT_IN_DATA_RE [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
    301                 if (_param->_have_port_ooo_engine_id)
    302                 (*(out_WRITE_UNIT_IN_DATA_RE [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
     313            for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     314              for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     315              {
     316                (*(out_WRITE_UNIT_IN_DATA_RE [i])) (*(in_EXECUTE_UNIT_OUT_DATA_RE [x][y]));
     317                (*(out_WRITE_UNIT_IN_DATA_RE [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
     318                if (_param->_have_port_context_id)
     319                (*(out_WRITE_UNIT_IN_DATA_RE [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
     320                if (_param->_have_port_front_end_id)
     321                (*(out_WRITE_UNIT_IN_DATA_RE [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
     322                if (_param->_have_port_ooo_engine_id)
     323                (*(out_WRITE_UNIT_IN_DATA_RE [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    303324              }
    304325
    305326            (*(out_WRITE_UNIT_IN_EXCEPTION [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    306             for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    307               {
    308                 (*(out_WRITE_UNIT_IN_EXCEPTION [i])) (*(in_EXECUTE_UNIT_OUT_EXCEPTION [j]));
    309                 (*(out_WRITE_UNIT_IN_EXCEPTION [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
    310                 if (_param->_have_port_context_id)
    311                 (*(out_WRITE_UNIT_IN_EXCEPTION [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
    312                 if (_param->_have_port_front_end_id)
    313                 (*(out_WRITE_UNIT_IN_EXCEPTION [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
    314                 if (_param->_have_port_ooo_engine_id)
    315                 (*(out_WRITE_UNIT_IN_EXCEPTION [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
     327            for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     328              for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     329              {
     330                (*(out_WRITE_UNIT_IN_EXCEPTION [i])) (*(in_EXECUTE_UNIT_OUT_EXCEPTION [x][y]));
     331                (*(out_WRITE_UNIT_IN_EXCEPTION [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
     332                if (_param->_have_port_context_id)
     333                (*(out_WRITE_UNIT_IN_EXCEPTION [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
     334                if (_param->_have_port_front_end_id)
     335                (*(out_WRITE_UNIT_IN_EXCEPTION [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
     336                if (_param->_have_port_ooo_engine_id)
     337                (*(out_WRITE_UNIT_IN_EXCEPTION [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    316338              }
    317339
    318340            (*(out_WRITE_UNIT_IN_NO_SEQUENCE [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    319             for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    320               {
    321                 (*(out_WRITE_UNIT_IN_NO_SEQUENCE [i])) (*(in_EXECUTE_UNIT_OUT_NO_SEQUENCE [j]));
    322                 (*(out_WRITE_UNIT_IN_NO_SEQUENCE [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
    323                 if (_param->_have_port_context_id)
    324                 (*(out_WRITE_UNIT_IN_NO_SEQUENCE [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
    325                 if (_param->_have_port_front_end_id)
    326                 (*(out_WRITE_UNIT_IN_NO_SEQUENCE [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
    327                 if (_param->_have_port_ooo_engine_id)
    328                 (*(out_WRITE_UNIT_IN_NO_SEQUENCE [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
     341            for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     342              for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     343              {
     344                (*(out_WRITE_UNIT_IN_NO_SEQUENCE [i])) (*(in_EXECUTE_UNIT_OUT_NO_SEQUENCE [x][y]));
     345                (*(out_WRITE_UNIT_IN_NO_SEQUENCE [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
     346                if (_param->_have_port_context_id)
     347                (*(out_WRITE_UNIT_IN_NO_SEQUENCE [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
     348                if (_param->_have_port_front_end_id)
     349                (*(out_WRITE_UNIT_IN_NO_SEQUENCE [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
     350                if (_param->_have_port_ooo_engine_id)
     351                (*(out_WRITE_UNIT_IN_NO_SEQUENCE [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    329352              }
    330353
    331354            (*(out_WRITE_UNIT_IN_ADDRESS [i])) (*(in_WRITE_UNIT_IN_ACK [i]));
    332             for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    333               {
    334                 (*(out_WRITE_UNIT_IN_ADDRESS [i])) (*(in_EXECUTE_UNIT_OUT_ADDRESS [j]));
    335                 (*(out_WRITE_UNIT_IN_ADDRESS [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [j]));
    336                 if (_param->_have_port_context_id)
    337                 (*(out_WRITE_UNIT_IN_ADDRESS [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [j]));
    338                 if (_param->_have_port_front_end_id)
    339                 (*(out_WRITE_UNIT_IN_ADDRESS [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [j]));
    340                 if (_param->_have_port_ooo_engine_id)
    341                 (*(out_WRITE_UNIT_IN_ADDRESS [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [j]));
    342               }
    343 
     355            for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     356              for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     357              {
     358                (*(out_WRITE_UNIT_IN_ADDRESS [i])) (*(in_EXECUTE_UNIT_OUT_ADDRESS [x][y]));
     359                (*(out_WRITE_UNIT_IN_ADDRESS [i])) (*(in_EXECUTE_UNIT_OUT_VAL           [x][y]));
     360                if (_param->_have_port_context_id)
     361                (*(out_WRITE_UNIT_IN_ADDRESS [i])) (*(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [x][y]));
     362                if (_param->_have_port_front_end_id)
     363                (*(out_WRITE_UNIT_IN_ADDRESS [i])) (*(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [x][y]));
     364                if (_param->_have_port_ooo_engine_id)
     365                (*(out_WRITE_UNIT_IN_ADDRESS [i])) (*(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [x][y]));
     366              }
    344367          }
    345368# endif   
     
    357380
    358381#ifdef STATISTICS
    359     if (_usage & USE_STATISTICS)
     382    if (usage_is_set(_usage,USE_STATISTICS))
    360383      {
    361384        log_printf(INFO,Execution_unit_to_Write_unit,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/src/Execution_unit_to_Write_unit_allocation.cpp

    r81 r88  
    5858    // ~~~~~[ Interface "execute_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5959     {
    60        ALLOC1_INTERFACE("execute_unit_out", IN, EAST, "Output of execution_unit", _param->_nb_execute_unit);
     60       ALLOC2_INTERFACE("execute_unit_out", IN, EAST, "Output of execution_unit", _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
    6161
    62        ALLOC1_VALACK_IN ( in_EXECUTE_UNIT_OUT_VAL,VAL);
    63        ALLOC1_VALACK_OUT(out_EXECUTE_UNIT_OUT_ACK,ACK);
    64        ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_CONTEXT_ID   ,"context_id"   ,Tcontext_t        ,_param->_size_context_id      );
    65        ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_FRONT_END_ID ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id    );
    66        ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id   );
    67        ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_packet_id       );
    68      //ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation       );
    69        ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type            );
    70        ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_WRITE_RD     ,"write_rd"     ,Tcontrol_t        ,1                             );
    71        ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_NUM_REG_RD   ,"num_reg_rd"   ,Tgeneral_address_t,_param->_size_general_register);
    72        ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_DATA_RD      ,"data_rd"      ,Tgeneral_data_t   ,_param->_size_general_data    );
    73        ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_WRITE_RE     ,"write_re"     ,Tcontrol_t        ,1                             );
    74        ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_NUM_REG_RE   ,"num_reg_re"   ,Tspecial_address_t,_param->_size_special_register);
    75        ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_DATA_RE      ,"data_re"      ,Tspecial_data_t   ,_param->_size_special_data    );
    76        ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_EXCEPTION    ,"exception"    ,Texception_t      ,_param->_size_exception       );
    77        ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_NO_SEQUENCE  ,"no_sequence"  ,Tcontrol_t        ,1                             );
    78        ALLOC1_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_ADDRESS      ,"address"      ,Tgeneral_data_t   ,_param->_size_general_data    );
     62       _ALLOC2_VALACK_IN ( in_EXECUTE_UNIT_OUT_VAL,VAL, _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     63       _ALLOC2_VALACK_OUT(out_EXECUTE_UNIT_OUT_ACK,ACK, _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     64       _ALLOC2_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_CONTEXT_ID   ,"context_id"   ,Tcontext_t        ,_param->_size_context_id      , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     65       _ALLOC2_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_FRONT_END_ID ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id    , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     66       _ALLOC2_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id   , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     67       _ALLOC2_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_rob_ptr         , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     68     //_ALLOC2_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation       , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     69       _ALLOC2_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type            , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     70       _ALLOC2_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_WRITE_RD     ,"write_rd"     ,Tcontrol_t        ,1                             , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     71       _ALLOC2_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_NUM_REG_RD   ,"num_reg_rd"   ,Tgeneral_address_t,_param->_size_general_register, _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     72       _ALLOC2_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_DATA_RD      ,"data_rd"      ,Tgeneral_data_t   ,_param->_size_general_data    , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     73       _ALLOC2_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_WRITE_RE     ,"write_re"     ,Tcontrol_t        ,1                             , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     74       _ALLOC2_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_NUM_REG_RE   ,"num_reg_re"   ,Tspecial_address_t,_param->_size_special_register, _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     75       _ALLOC2_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_DATA_RE      ,"data_re"      ,Tspecial_data_t   ,_param->_size_special_data    , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     76       _ALLOC2_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_EXCEPTION    ,"exception"    ,Texception_t      ,_param->_size_exception       , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     77       _ALLOC2_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_NO_SEQUENCE  ,"no_sequence"  ,Tcontrol_t        ,1                             , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
     78       _ALLOC2_SIGNAL_IN ( in_EXECUTE_UNIT_OUT_ADDRESS      ,"address"      ,Tgeneral_data_t   ,_param->_size_general_data    , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1]);
    7979     }
     80
    8081    // ~~~~~[ Interface "write_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8182     {
     
    8788       ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id    );
    8889       ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id   );
    89        ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_packet_id       );
     90       ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_rob_ptr         );
    9091     //ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation       );
    9192       ALLOC1_SIGNAL_OUT(out_WRITE_UNIT_IN_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type            );
     
    102103    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    103104
    104      _destination = new std::list<uint32_t> * [_param->_nb_execute_unit];
     105    if (usage_is_set(_usage,USE_SYSTEMC))
     106      {
     107     _destination = new std::list<uint32_t> ** [_param->_nb_execute_unit];
    105108     for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    106109       {
    107          _destination [i] = new std::list<uint32_t> [_param->_nb_thread];
     110         _destination [i] = new std::list<uint32_t> * [_param->_nb_execute_unit_port[i]];
     111         for (uint32_t j=0; j<_param->_nb_execute_unit_port[i]; j++)
     112           {
     113             _destination [i][j] = new std::list<uint32_t> [_param->_nb_thread];
     114           }
    108115       }
     116      }
    109117
    110118#ifdef POSITION
    111     _component->generate_file();
     119    if (usage_is_set(_usage,USE_POSITION))
     120      _component->generate_file();
    112121#endif
    113122
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/src/Execution_unit_to_Write_unit_deallocation.cpp

    r81 r88  
    77
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Execution_unit_to_Write_unit.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    2324    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
    2425
    25     if (_usage & USE_SYSTEMC)
     26    if (usage_is_set(_usage,USE_SYSTEMC))
    2627      {
    2728        delete     in_CLOCK ;
    2829        delete     in_NRESET;
    2930
    30         delete []  in_EXECUTE_UNIT_OUT_VAL;
    31         delete [] out_EXECUTE_UNIT_OUT_ACK;
    32         if (_param->_have_port_context_id)
    33         delete []  in_EXECUTE_UNIT_OUT_CONTEXT_ID   ;
    34         if (_param->_have_port_front_end_id)
    35         delete []  in_EXECUTE_UNIT_OUT_FRONT_END_ID ;
    36         if (_param->_have_port_ooo_engine_id)
    37         delete []  in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID;
    38         if (_param->_have_port_packet_id)
    39         delete []  in_EXECUTE_UNIT_OUT_PACKET_ID    ;
    40       //delete []  in_EXECUTE_UNIT_OUT_OPERATION    ;
    41         delete []  in_EXECUTE_UNIT_OUT_TYPE         ;
    42         delete []  in_EXECUTE_UNIT_OUT_WRITE_RD     ;
    43         delete []  in_EXECUTE_UNIT_OUT_NUM_REG_RD   ;
    44         delete []  in_EXECUTE_UNIT_OUT_DATA_RD      ;
    45         delete []  in_EXECUTE_UNIT_OUT_WRITE_RE     ;
    46         delete []  in_EXECUTE_UNIT_OUT_NUM_REG_RE   ;
    47         delete []  in_EXECUTE_UNIT_OUT_DATA_RE      ;
    48         delete []  in_EXECUTE_UNIT_OUT_EXCEPTION    ;
    49         delete []  in_EXECUTE_UNIT_OUT_NO_SEQUENCE  ;
    50         delete []  in_EXECUTE_UNIT_OUT_ADDRESS      ;
     31        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_VAL          , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],1);
     32        DELETE2_SIGNAL(out_EXECUTE_UNIT_OUT_ACK          , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],1);
     33        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_CONTEXT_ID   , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_context_id      );
     34        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_FRONT_END_ID , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_front_end_id    );
     35        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID, _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_ooo_engine_id   );
     36        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_PACKET_ID    , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_rob_ptr         );
     37     // DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_OPERATION    , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_operation       );
     38        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_TYPE         , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_type            );
     39        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_WRITE_RD     , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],1                             );
     40        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_NUM_REG_RD   , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_general_register);
     41        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_DATA_RD      , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_general_data    );
     42        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_WRITE_RE     , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],1                             );
     43        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_NUM_REG_RE   , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_special_register);
     44        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_DATA_RE      , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_special_data    );
     45        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_EXCEPTION    , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_exception       );
     46        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_NO_SEQUENCE  , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],1                             );
     47        DELETE2_SIGNAL( in_EXECUTE_UNIT_OUT_ADDRESS      , _param->_nb_execute_unit, _param->_nb_execute_unit_port[it1],_param->_size_general_data    );
    5148
    52         delete [] out_WRITE_UNIT_IN_VAL;
    53         delete []  in_WRITE_UNIT_IN_ACK;
    54         if (_param->_have_port_context_id)
    55         delete [] out_WRITE_UNIT_IN_CONTEXT_ID   ;
    56         if (_param->_have_port_front_end_id)
    57         delete [] out_WRITE_UNIT_IN_FRONT_END_ID ;
    58         if (_param->_have_port_ooo_engine_id)
    59         delete [] out_WRITE_UNIT_IN_OOO_ENGINE_ID;
    60         if (_param->_have_port_packet_id)
    61         delete [] out_WRITE_UNIT_IN_PACKET_ID    ;
    62       //delete [] out_WRITE_UNIT_IN_OPERATION    ;
    63         delete [] out_WRITE_UNIT_IN_TYPE         ;
    64         delete [] out_WRITE_UNIT_IN_WRITE_RD     ;
    65         delete [] out_WRITE_UNIT_IN_NUM_REG_RD   ;
    66         delete [] out_WRITE_UNIT_IN_DATA_RD      ;
    67         delete [] out_WRITE_UNIT_IN_WRITE_RE     ;
    68         delete [] out_WRITE_UNIT_IN_NUM_REG_RE   ;
    69         delete [] out_WRITE_UNIT_IN_DATA_RE      ;
    70         delete [] out_WRITE_UNIT_IN_EXCEPTION    ;
    71         delete [] out_WRITE_UNIT_IN_NO_SEQUENCE  ;
    72         delete [] out_WRITE_UNIT_IN_ADDRESS      ;
     49        DELETE1_SIGNAL(out_WRITE_UNIT_IN_VAL          , _param->_nb_write_unit,1);
     50        DELETE1_SIGNAL( in_WRITE_UNIT_IN_ACK          , _param->_nb_write_unit,1);
     51        DELETE1_SIGNAL(out_WRITE_UNIT_IN_CONTEXT_ID   , _param->_nb_write_unit,_param->_size_context_id      );
     52        DELETE1_SIGNAL(out_WRITE_UNIT_IN_FRONT_END_ID , _param->_nb_write_unit,_param->_size_front_end_id    );
     53        DELETE1_SIGNAL(out_WRITE_UNIT_IN_OOO_ENGINE_ID, _param->_nb_write_unit,_param->_size_ooo_engine_id   );
     54        DELETE1_SIGNAL(out_WRITE_UNIT_IN_PACKET_ID    , _param->_nb_write_unit,_param->_size_rob_ptr         );
     55     // DELETE1_SIGNAL(out_WRITE_UNIT_IN_OPERATION    , _param->_nb_write_unit,_param->_size_operation       );
     56        DELETE1_SIGNAL(out_WRITE_UNIT_IN_TYPE         , _param->_nb_write_unit,_param->_size_type            );
     57        DELETE1_SIGNAL(out_WRITE_UNIT_IN_WRITE_RD     , _param->_nb_write_unit,1                             );
     58        DELETE1_SIGNAL(out_WRITE_UNIT_IN_NUM_REG_RD   , _param->_nb_write_unit,_param->_size_general_register);
     59        DELETE1_SIGNAL(out_WRITE_UNIT_IN_DATA_RD      , _param->_nb_write_unit,_param->_size_general_data    );
     60        DELETE1_SIGNAL(out_WRITE_UNIT_IN_WRITE_RE     , _param->_nb_write_unit,1                             );
     61        DELETE1_SIGNAL(out_WRITE_UNIT_IN_NUM_REG_RE   , _param->_nb_write_unit,_param->_size_special_register);
     62        DELETE1_SIGNAL(out_WRITE_UNIT_IN_DATA_RE      , _param->_nb_write_unit,_param->_size_special_data    );
     63        DELETE1_SIGNAL(out_WRITE_UNIT_IN_EXCEPTION    , _param->_nb_write_unit,_param->_size_exception       );
     64        DELETE1_SIGNAL(out_WRITE_UNIT_IN_NO_SEQUENCE  , _param->_nb_write_unit,1                             );
     65        DELETE1_SIGNAL(out_WRITE_UNIT_IN_ADDRESS      , _param->_nb_write_unit,_param->_size_general_data    );
     66     
     67        delete [] _destination;
    7368      }
    7469    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    7570
    76     delete [] _destination;
    7771    delete    _component;
    7872
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/src/Execution_unit_to_Write_unit_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
    33     _interfaces->testbench();
     34    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     35      _interfaces->testbench();
    3436#endif
    3537
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/src/Execution_unit_to_Write_unit_genMealy.cpp

    r81 r88  
    3030
    3131    for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    32       {
    33         bool       ack = false;
    34 
    35         log_printf(TRACE,Execution_unit_to_Write_unit,FUNCTION,"Test execute_unit[%d]",i);
    36 
    37         if (PORT_READ(in_EXECUTE_UNIT_OUT_VAL [i]) == true)
    38           {
    39             log_printf(TRACE,Execution_unit_to_Write_unit,FUNCTION," * have a valid entry.");
    40            
    41             Tcontext_t context_id    = (_param->_have_port_context_id   )?PORT_READ(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [i]):0;
    42             Tcontext_t front_end_id  = (_param->_have_port_front_end_id )?PORT_READ(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [i]):0;
    43             Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id)?PORT_READ(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [i]):0;
    44             Tcontext_t num_thread    = get_num_thread(context_id   , _param->_size_context_id   ,
    45                                                       front_end_id , _param->_size_front_end_id ,
    46                                                       ooo_engine_id, _param->_size_ooo_engine_id);
     32      for (uint32_t j=0; j<_param->_nb_execute_unit_port[i]; j++)
     33        {
     34          bool       ack = false;
     35         
     36          log_printf(TRACE,Execution_unit_to_Write_unit,FUNCTION,"Test execute_unit[%d][%d]",i,j);
     37         
     38          if (PORT_READ(in_EXECUTE_UNIT_OUT_VAL [i][j]) == true)
     39            {
     40              log_printf(TRACE,Execution_unit_to_Write_unit,FUNCTION," * have a valid entry.");
     41             
     42              Tcontext_t context_id    = (_param->_have_port_context_id   )?PORT_READ(in_EXECUTE_UNIT_OUT_CONTEXT_ID    [i][j]):0;
     43              Tcontext_t front_end_id  = (_param->_have_port_front_end_id )?PORT_READ(in_EXECUTE_UNIT_OUT_FRONT_END_ID  [i][j]):0;
     44              Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id)?PORT_READ(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID [i][j]):0;
     45              Tcontext_t num_thread    = get_num_thread(context_id   , _param->_size_context_id   ,
     46                                                        front_end_id , _param->_size_front_end_id ,
     47                                                        ooo_engine_id, _param->_size_ooo_engine_id);
    4748#ifdef DEBUG_TEST
    48             if (_destination[i][num_thread].empty())
    49               throw ERRORMORPHEO(FUNCTION,"Invalid Operation : They have no write_unit to receive a operation from the execute_unit ["+toString(i)+"], thread ["+toString(num_thread)+"].");
     49              if (_destination[i][j][num_thread].empty())
     50                throw ERRORMORPHEO(FUNCTION,"Invalid Operation : They have no write_unit to receive a operation from the execute_unit ["+toString(i)+"]["+toString(j)+"], thread ["+toString(num_thread)+"].");
    5051#endif
    51 
    52             // find a free write_unit
    53             for (std::list<uint32_t>::iterator it=_destination[i][num_thread].begin();
    54                  (it != _destination[i][num_thread].end()) and (ack == false);
    55                  it++)
    56               {
    57                 uint32_t dest = *it;
    58 
    59                 log_printf(TRACE,Execution_unit_to_Write_unit,FUNCTION,"   * Test destination [%d].",dest);
    60                            
    61                 if (write_unit_use [dest] == false)
    62                   {
    63                     log_printf(TRACE,Execution_unit_to_Write_unit,FUNCTION,"     * Is ok! Link.");
    64                     // have find !!!
    65                     ack                   = true;
    66                     write_unit_use [dest] = true;
    67 
    68                     if (_param->_have_port_context_id)
    69                     PORT_WRITE(out_WRITE_UNIT_IN_CONTEXT_ID            [dest], PORT_READ(in_EXECUTE_UNIT_OUT_CONTEXT_ID            [i]));
    70                     if (_param->_have_port_front_end_id)
    71                     PORT_WRITE(out_WRITE_UNIT_IN_FRONT_END_ID          [dest], PORT_READ(in_EXECUTE_UNIT_OUT_FRONT_END_ID          [i]));
    72                     if (_param->_have_port_ooo_engine_id)
    73                     PORT_WRITE(out_WRITE_UNIT_IN_OOO_ENGINE_ID         [dest], PORT_READ(in_EXECUTE_UNIT_OUT_OOO_ENGINE_ID         [i]));
    74                     if (_param->_have_port_packet_id)
    75                     PORT_WRITE(out_WRITE_UNIT_IN_PACKET_ID             [dest], PORT_READ(in_EXECUTE_UNIT_OUT_PACKET_ID             [i]));
    76                   //PORT_WRITE(out_WRITE_UNIT_IN_OPERATION             [dest], PORT_READ(in_EXECUTE_UNIT_OUT_OPERATION             [i]));
    77                     PORT_WRITE(out_WRITE_UNIT_IN_TYPE                  [dest], PORT_READ(in_EXECUTE_UNIT_OUT_TYPE                  [i]));
    78                     PORT_WRITE(out_WRITE_UNIT_IN_WRITE_RD              [dest], PORT_READ(in_EXECUTE_UNIT_OUT_WRITE_RD              [i]));
    79                     PORT_WRITE(out_WRITE_UNIT_IN_NUM_REG_RD            [dest], PORT_READ(in_EXECUTE_UNIT_OUT_NUM_REG_RD            [i]));
    80                     PORT_WRITE(out_WRITE_UNIT_IN_DATA_RD               [dest], PORT_READ(in_EXECUTE_UNIT_OUT_DATA_RD               [i]));
    81                     PORT_WRITE(out_WRITE_UNIT_IN_WRITE_RE              [dest], PORT_READ(in_EXECUTE_UNIT_OUT_WRITE_RE              [i]));
    82                     PORT_WRITE(out_WRITE_UNIT_IN_NUM_REG_RE            [dest], PORT_READ(in_EXECUTE_UNIT_OUT_NUM_REG_RE            [i]));
    83                     PORT_WRITE(out_WRITE_UNIT_IN_DATA_RE               [dest], PORT_READ(in_EXECUTE_UNIT_OUT_DATA_RE               [i]));
    84                     PORT_WRITE(out_WRITE_UNIT_IN_EXCEPTION             [dest], PORT_READ(in_EXECUTE_UNIT_OUT_EXCEPTION             [i]));
    85                     PORT_WRITE(out_WRITE_UNIT_IN_NO_SEQUENCE           [dest], PORT_READ(in_EXECUTE_UNIT_OUT_NO_SEQUENCE           [i]));
    86                     PORT_WRITE(out_WRITE_UNIT_IN_ADDRESS               [dest], PORT_READ(in_EXECUTE_UNIT_OUT_ADDRESS               [i]));
    87                   }
    88               }
    89           }
    90         PORT_WRITE(out_EXECUTE_UNIT_OUT_ACK [i], ack);
     52             
     53              // find a free write_unit
     54              for (std::list<uint32_t>::iterator it=_destination[i][j][num_thread].begin();
     55                   (it != _destination[i][j][num_thread].end()) and (ack == false);
     56                   it++)
     57                {
     58                  uint32_t dest = *it;
     59                 
     60                  log_printf(TRACE,Execution_unit_to_Write_unit,FUNCTION,"   * Test destination [%d].",dest);
     61                 
     62                  if (write_unit_use [dest] == false)
     63                    {
     64                      log_printf(TRACE,Execution_unit_to_Write_unit,FUNCTION,"     * Is ok! Link.");
     65                      // have find !!!
     66                      ack                   = true;
     67                      write_unit_use [dest] = true;
     68                     
     69                      if (_param->_have_port_context_id)
     70                      PORT_WRITE(out_WRITE_UNIT_IN_CONTEXT_ID            [dest], context_id);
     71                      if (_param->_have_port_front_end_id)
     72                      PORT_WRITE(out_WRITE_UNIT_IN_FRONT_END_ID          [dest], front_end_id);
     73                      if (_param->_have_port_ooo_engine_id)
     74                      PORT_WRITE(out_WRITE_UNIT_IN_OOO_ENGINE_ID         [dest], ooo_engine_id);
     75                      if (_param->_have_port_rob_ptr  )
     76                      PORT_WRITE(out_WRITE_UNIT_IN_PACKET_ID             [dest], PORT_READ(in_EXECUTE_UNIT_OUT_PACKET_ID             [i][j]));
     77                  //  PORT_WRITE(out_WRITE_UNIT_IN_OPERATION             [dest], PORT_READ(in_EXECUTE_UNIT_OUT_OPERATION             [i][j]));
     78                      PORT_WRITE(out_WRITE_UNIT_IN_TYPE                  [dest], PORT_READ(in_EXECUTE_UNIT_OUT_TYPE                  [i][j]));
     79                      PORT_WRITE(out_WRITE_UNIT_IN_WRITE_RD              [dest], PORT_READ(in_EXECUTE_UNIT_OUT_WRITE_RD              [i][j]));
     80                      PORT_WRITE(out_WRITE_UNIT_IN_NUM_REG_RD            [dest], PORT_READ(in_EXECUTE_UNIT_OUT_NUM_REG_RD            [i][j]));
     81                      PORT_WRITE(out_WRITE_UNIT_IN_DATA_RD               [dest], PORT_READ(in_EXECUTE_UNIT_OUT_DATA_RD               [i][j]));
     82                      PORT_WRITE(out_WRITE_UNIT_IN_WRITE_RE              [dest], PORT_READ(in_EXECUTE_UNIT_OUT_WRITE_RE              [i][j]));
     83                      PORT_WRITE(out_WRITE_UNIT_IN_NUM_REG_RE            [dest], PORT_READ(in_EXECUTE_UNIT_OUT_NUM_REG_RE            [i][j]));
     84                      PORT_WRITE(out_WRITE_UNIT_IN_DATA_RE               [dest], PORT_READ(in_EXECUTE_UNIT_OUT_DATA_RE               [i][j]));
     85                      PORT_WRITE(out_WRITE_UNIT_IN_EXCEPTION             [dest], PORT_READ(in_EXECUTE_UNIT_OUT_EXCEPTION             [i][j]));
     86                      PORT_WRITE(out_WRITE_UNIT_IN_NO_SEQUENCE           [dest], PORT_READ(in_EXECUTE_UNIT_OUT_NO_SEQUENCE           [i][j]));
     87                      PORT_WRITE(out_WRITE_UNIT_IN_ADDRESS               [dest], PORT_READ(in_EXECUTE_UNIT_OUT_ADDRESS               [i][j]));
     88                    }
     89                }
     90            }
     91          PORT_WRITE(out_EXECUTE_UNIT_OUT_ACK [i][j], ack);
    9192      }
    9293
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/src/Execution_unit_to_Write_unit_transition.cpp

    r81 r88  
    2727      {
    2828        // Flush routing_table
    29         for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    30           for (uint32_t j=0; j<_param->_nb_thread; j++)
    31               _destination [i][j].clear();
     29        for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     30          for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     31            for (uint32_t j=0; j<_param->_nb_thread; j++)
     32              _destination [x][y][j].clear();
    3233       
    3334        // Fill routing table
    34         for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    35           for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    36             // Test if link between src and dest
    37             if (_param->_table_routing [i][j])
    38               // Test the thread accepted by the execute_unit
    39               for (uint32_t k=0; k<_param->_nb_thread; k++)
    40                 if (_param->_table_thread[j][k])
    41                   // push_back == minor have a better priority
    42                   _destination [i][k].push_back(j);
     35        for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     36          for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     37            for (uint32_t j=0; j<_param->_nb_write_unit; j++)
     38              // Test if link between src and dest
     39              if (_param->_table_routing [x][y][j])
     40                // Test the thread accepted by the execute_unit
     41                for (uint32_t k=0; k<_param->_nb_thread; k++)
     42                  if (_param->_table_thread[j][k])
     43                    // push_back == minor have a better priority
     44                    _destination [x][y][k].push_back(j);
    4345      }
    4446    else
    4547      {
    4648        if (_param->_priority == PRIORITY_ROUND_ROBIN)
    47           for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    48             for (uint32_t j=0; j<_param->_nb_thread; j++)
    49               if (_destination [i][j].size() > 1)
    50                 {
    51                   // Head queue became the Tail queue
    52                   _destination [i][j].push_back(_destination [i][j].front());
    53                   _destination [i][j].pop_front();
    54                 }
     49          for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     50            for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     51              for (uint32_t j=0; j<_param->_nb_thread; j++)
     52                if (_destination [x][y][j].size() > 1)
     53                  {
     54                    // Head queue became the Tail queue
     55                    _destination [x][y][j].push_back(_destination [x][y][j].front());
     56                    _destination [x][y][j].pop_front();
     57                  }
    5558      }
    56 
    57 
     59   
     60   
    5861#if (DEBUG >= DEBUG_TRACE)
    5962    // Print
    6063    log_printf(TRACE,Read_unit_to_Execution_unit,FUNCTION,"Routing Table");
    61     for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    62       for (uint32_t j=0; j<_param->_nb_thread; j++)
    63         for (std::list<uint32_t>::iterator k=_destination[i][j].begin();
    64              k != _destination[i][j].end();
    65              k++)
    66           log_printf(TRACE,Read_unit_to_Execution_unit,FUNCTION,"  * Execute_unit [%d], send at the write_unit [%d], the operation of thread [%d].",i,*k,j);
     64    for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     65      for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     66        for (uint32_t j=0; j<_param->_nb_thread; j++)
     67          for (std::list<uint32_t>::iterator k=_destination[x][y][j].begin();
     68               k != _destination[x][y][j].end();
     69               k++)
     70            log_printf(TRACE,Read_unit_to_Execution_unit,FUNCTION,"  * Execute_unit [%d][%d], send at the write_unit [%d], the operation of thread [%d].",x,y,*k,j);
    6771#endif
    6872
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/src/Parameters.cpp

    r81 r88  
    77
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/include/Parameters.h"
    9 
     9#include "Common/include/Max.h"
    1010namespace morpheo {
    1111namespace behavioural {
     
    2020#define FUNCTION "Execution_unit_to_Write_unit::Parameters"
    2121  Parameters::Parameters (uint32_t    nb_execute_unit              ,
     22                          uint32_t  * nb_execute_unit_port         ,//[nb_execute_unit]
    2223                          uint32_t    nb_write_unit                ,
    2324                          uint32_t    nb_context                   ,
     
    3031                          uint32_t    nb_special_register          ,
    3132                          Tpriority_t priority                     ,
    32                           bool     ** table_routing                ,
    33                           bool     ** table_thread                 ):
    34     _nb_execute_unit         (nb_execute_unit    ),
    35     _nb_write_unit           (nb_write_unit      ),
    36     _nb_context              (nb_context         ),
    37     _nb_front_end            (nb_front_end       ),
    38     _nb_ooo_engine           (nb_ooo_engine      ),
    39     _nb_packet               (nb_packet          ),
    40     _size_general_data       (size_general_data  ),
    41     _size_special_data       (size_special_data  ),
    42     _nb_general_register     (nb_general_register),
    43     _nb_special_register     (nb_special_register),
    44     _priority                (priority           ),
    45    
    46     _size_context_id         (log2(nb_context         )),
    47     _size_front_end_id       (log2(nb_front_end       )),
    48     _size_ooo_engine_id      (log2(nb_ooo_engine      )),
    49     _size_packet_id          (log2(nb_packet          )),
    50     _size_general_register   (log2(nb_general_register)),
    51     _size_special_register   (log2(nb_special_register)),
    52    
    53     _have_port_context_id    (_size_context_id    > 0),
    54     _have_port_front_end_id  (_size_front_end_id  > 0),
    55     _have_port_ooo_engine_id (_size_ooo_engine_id > 0),
    56     _have_port_packet_id     (_size_packet_id     > 0),
    57 
    58     _nb_thread               (get_nb_thread (nb_context, nb_front_end, nb_ooo_engine))
     33                          bool    *** table_routing                ,//[nb_execute_unit][nb_execute_unit_port][nb_write_unit]
     34                          bool     ** table_thread                 ,//[nb_write_unit][nb_thread]                           
     35                          bool        is_toplevel                  )
    5936  {
    6037    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
    6138
    62     _table_routing = table_routing ;
    63     _table_thread  = table_thread  ;
     39    _nb_execute_unit         = nb_execute_unit     ;
     40    _nb_execute_unit_port    = nb_execute_unit_port;
     41    _nb_write_unit           = nb_write_unit       ;
     42    _nb_context              = nb_context          ;
     43    _nb_front_end            = nb_front_end        ;
     44    _nb_ooo_engine           = nb_ooo_engine       ;
     45    _nb_packet               = nb_packet           ;
     46    _nb_general_register     = nb_general_register ;
     47    _nb_special_register     = nb_special_register ;
     48    _priority                = priority            ;
     49    _table_routing           = table_routing       ;
     50    _table_thread            = table_thread        ;
     51
     52    _max_nb_execute_unit_port= max<uint32_t>(_nb_execute_unit_port, _nb_execute_unit);
     53
     54    _nb_thread               = get_nb_thread (nb_context, nb_front_end, nb_ooo_engine);
    6455
    6556    test();
     57
     58    if (is_toplevel)
     59      {
     60        _size_context_id         = log2(nb_context         );
     61        _size_front_end_id       = log2(nb_front_end       );
     62        _size_ooo_engine_id      = log2(nb_ooo_engine      );
     63        _size_rob_ptr            = log2(nb_packet          );
     64        _size_general_register   = log2(nb_general_register);
     65        _size_special_register   = log2(nb_special_register);
     66        _size_general_data       = size_general_data  ;
     67        _size_special_data       = size_special_data  ;
     68       
     69        _have_port_context_id    = _size_context_id    > 0;
     70        _have_port_front_end_id  = _size_front_end_id  > 0;
     71        _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
     72        _have_port_rob_ptr       = _size_rob_ptr       > 0;
     73
     74        copy();
     75      }
     76
    6677    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
    6778  };
    6879 
     80// #undef  FUNCTION
     81// #define FUNCTION "Execution_unit_to_Write_unit::Parameters (copy)"
     82//   Parameters::Parameters (Parameters & param) 
     83//   {
     84//     log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
     85
     86//     test();
     87//     log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
     88//   };
     89
    6990#undef  FUNCTION
    70 #define FUNCTION "Execution_unit_to_Write_unit::Parameters (copy)"
    71   Parameters::Parameters (Parameters & param):
    72     _nb_execute_unit         (param._nb_execute_unit        ),
    73     _nb_write_unit           (param._nb_write_unit          ),
    74     _nb_context              (param._nb_context             ),
    75     _nb_front_end            (param._nb_front_end           ),
    76     _nb_ooo_engine           (param._nb_ooo_engine          ),
    77     _nb_packet               (param._nb_packet              ),
    78     _size_general_data       (param._size_general_data      ),
    79     _size_special_data       (param._size_special_data      ),
    80     _nb_general_register     (param._nb_general_register    ),
    81     _nb_special_register     (param._nb_special_register    ),
    82     _priority                (param._priority               ),
    83 
    84     _size_context_id         (param._size_context_id        ),
    85     _size_front_end_id       (param._size_front_end_id      ),
    86     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
    87     _size_packet_id          (param._size_packet_id         ),
    88     _size_general_register   (param._size_general_register  ),
    89     _size_special_register   (param._size_special_register  ),
    90 
    91     _have_port_context_id    (param._have_port_context_id   ),
    92     _have_port_front_end_id  (param._have_port_front_end_id ),
    93     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
    94     _have_port_packet_id     (param._have_port_packet_id    ),
    95 
    96     _nb_thread               (param._nb_thread              )
     91#define FUNCTION "Execution_unit_to_Write_unit::~Parameters"
     92  Parameters::~Parameters (void)
    9793  {
    9894    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
    99 
    100     _table_routing = param._table_routing ;
    101     _table_thread  = param._table_thread  ;
    102 
    103     test();
    10495    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
    10596  };
    10697
    10798#undef  FUNCTION
    108 #define FUNCTION "Execution_unit_to_Write_unit::~Parameters"
    109   Parameters::~Parameters ()
     99#define FUNCTION "Execution_unit_to_Write_unit::copy"
     100  void Parameters::copy (void)
    110101  {
    111102    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/src/Parameters_msg_error.cpp

    r81 r88  
    2424  {
    2525    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"Begin");
     26   
     27    Parameters_test test("Execution_unit_to_Write_unit");
     28   
     29    bool is_link [_nb_execute_unit][_max_nb_execute_unit_port];
     30    for (uint32_t i=0; i<_nb_execute_unit; i++)
     31      for (uint32_t j=0; j<_nb_execute_unit_port[i]; j++)
     32        is_link[i][j] = false;
     33       
     34    for (uint32_t i=0; i<_nb_execute_unit; i++)
     35      for (uint32_t j=0; j<_nb_execute_unit_port[i]; j++)
     36        for (uint32_t k=0; k<_nb_write_unit; k++)
     37          {
     38            log_printf(TRACE,Execution_unit_to_Write_unit,FUNCTION,"[%d][%d][%d]",i,j,k);
     39           
     40            if (_table_routing [i][j][k] == true)
     41              {
     42                log_printf(TRACE,Execution_unit_to_Write_unit,FUNCTION," * is link");
    2643
    27     Parameters_test test("Execution_unit_to_Write_unit");
     44                is_link [i][j] = true;
     45                break;
     46              }
     47          }
    2848
    2949    for (uint32_t i=0; i<_nb_execute_unit; i++)
    30       {
    31         uint32_t j;
    32         for (j=0; j<_nb_write_unit; j++)
    33           if (_table_routing [i][j] == true)
    34             break;
    35 
    36         if (j == _nb_write_unit)
    37           test.error("The execute_unit ["+toString(i)+"] is link with none write_unit.");
    38       }   
    39 
     50      for (uint32_t j=0; j<_nb_execute_unit_port[i]; j++)
     51        if (not is_link[i][j])
     52          test.error(toString(_("The execute_unit [%d][%d] is link with none write_unit.\n"),i,j));
     53   
    4054    for (uint32_t i=0; i<_nb_write_unit; i++)
    4155      {
     
    4458          if (_table_thread [i][j] == true)
    4559            break;
    46 
     60       
    4761        if (j == _nb_thread)
    48           test.error("The write_unit ["+toString(i)+"] have none source's thread.");
     62          test.error(toString(_("The write_unit [%d] have none source's thread.\n"),i));
    4963      }   
    5064
    5165    if ( (_priority != PRIORITY_STATIC     ) and
    5266         (_priority != PRIORITY_ROUND_ROBIN))
    53       test.error("Unsupported priority scheme. It must be Static or Round Robin.");
     67      test.error(_("Unsupported priority scheme. It must be Static or Round Robin.\n"));
    5468
    5569    log_printf(FUNC,Execution_unit_to_Write_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Read_unit_to_Execution_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/SelfTest/config_min.cfg

    r81 r88  
    11Read_unit_to_Execution_unit
    221       1       *2      # nb_read_unit           
    3 2       2       *2      # nb_execute_unit       
     31       1       +1      # nb_read_unit_port    [0] [nb_read_unit]
     42       2       *2      # nb_execute_unit
     51       1       +1      # nb_execute_unit_port [0] [nb_execute_unit]
     61       1       +1      # nb_execute_unit_port [1] [nb_execute_unit]
    471       1       *2      # nb_context             
    581       1       *2      # nb_front_end           
     
    13164       4       *2      # size_load_queue       
    14170       1       +1      # priority
    15 1       1       +1      # table_routing        [0][0]
    16 1       1       +1      # table_routing        [0][1]
     181       1       +1      # table_routing        [0][0][0]
     191       1       +1      # table_routing        [0][1][0]
    17200       0       +1      # table_execute_type   [0][TYPE_ALU    ]
    18210       0       +1      # table_execute_type   [0][TYPE_SHIFT  ]
    19220       0       +1      # table_execute_type   [0][TYPE_MOVE   ]
    20230       0       +1      # table_execute_type   [0][TYPE_TEST   ]
    21 0       0       +1      # table_execute_type   [0][TYPE_MUL_DIV]
     240       0       +1      # table_execute_type   [0][TYPE_MUL    ]
     250       0       +1      # table_execute_type   [0][TYPE_DIV    ]
    22260       0       +1      # table_execute_type   [0][TYPE_EXTEND ]
    23270       0       +1      # table_execute_type   [0][TYPE_FIND   ]
     
    30341       1       +1      # table_execute_type   [1][TYPE_MOVE   ]
    31351       1       +1      # table_execute_type   [1][TYPE_TEST   ]
    32 1       1       +1      # table_execute_type   [1][TYPE_MUL_DIV]
     361       1       +1      # table_execute_type   [1][TYPE_MUL    ]
     371       1       +1      # table_execute_type   [1][TYPE_DIV    ]
    33381       1       +1      # table_execute_type   [1][TYPE_EXTEND ]
    34391       1       +1      # table_execute_type   [1][TYPE_FIND   ]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/SelfTest/config_multi_execute-mono_thread.cfg

    r81 r88  
    11Read_unit_to_Execution_unit
    223       3       *2      # nb_read_unit           
     31       1       +1      # nb_read_unit_port    [0] [nb_read_unit]
     42       2       +1      # nb_read_unit_port    [1] [nb_read_unit]
     54       4       +1      # nb_read_unit_port    [2] [nb_read_unit]
    364       4       *2      # nb_execute_unit       
     71       1       +1      # nb_execute_unit_port [0] [nb_execute_unit]
     81       1       +1      # nb_execute_unit_port [1] [nb_execute_unit]
     91       1       +1      # nb_execute_unit_port [2] [nb_execute_unit]
     101       1       +1      # nb_execute_unit_port [3] [nb_execute_unit]
    4111       1       *2      # nb_context             
    5121       1       *2      # nb_front_end           
     
    13201       4       *4      # size_load_queue       
    14210       1       +1      # priority
    15 1       1       +1      # table_routing        [0][0]
    16 0       0       +1      # table_routing        [0][1]
    17 0       0       +1      # table_routing        [0][2]
    18 0       0       +1      # table_routing        [0][3]
    19 0       0       +1      # table_routing        [1][0]
    20 1       1       +1      # table_routing        [1][1]
    21 1       1       +1      # table_routing        [1][2]
    22 0       0       +1      # table_routing        [1][3]
    23 0       0       +1      # table_routing        [2][0]
    24 0       0       +1      # table_routing        [2][1]
    25 1       1       +1      # table_routing        [2][2]
    26 1       1       +1      # table_routing        [2][3]
     221       1       +1      # table_routing        [0][0][0]
     230       0       +1      # table_routing        [0][1][0]
     240       0       +1      # table_routing        [0][2][0]
     250       0       +1      # table_routing        [0][3][0]
     260       0       +1      # table_routing        [1][0][0]
     271       1       +1      # table_routing        [1][1][0]
     281       1       +1      # table_routing        [1][2][0]
     290       0       +1      # table_routing        [1][3][0]
     300       0       +1      # table_routing        [2][0][0]
     310       0       +1      # table_routing        [2][1][0]
     321       1       +1      # table_routing        [2][2][0]
     331       1       +1      # table_routing        [2][3][0]
    27340       0       +1      # table_execute_type   [0][TYPE_ALU    ]
    28350       0       +1      # table_execute_type   [0][TYPE_SHIFT  ]
    29360       0       +1      # table_execute_type   [0][TYPE_MOVE   ]
    30370       0       +1      # table_execute_type   [0][TYPE_TEST   ]
    31 0       0       +1      # table_execute_type   [0][TYPE_MUL_DIV]
     380       0       +1      # table_execute_type   [0][TYPE_MUL    ]
     390       0       +1      # table_execute_type   [0][TYPE_DIV    ]
    32400       0       +1      # table_execute_type   [0][TYPE_EXTEND ]
    33410       0       +1      # table_execute_type   [0][TYPE_FIND   ]
     
    40481       1       +1      # table_execute_type   [1][TYPE_MOVE   ]
    41491       1       +1      # table_execute_type   [1][TYPE_TEST   ]
    42 1       1       +1      # table_execute_type   [1][TYPE_MUL_DIV]
     501       1       +1      # table_execute_type   [1][TYPE_MUL    ]
     511       1       +1      # table_execute_type   [1][TYPE_DIV    ]
    43521       1       +1      # table_execute_type   [1][TYPE_EXTEND ]
    44531       1       +1      # table_execute_type   [1][TYPE_FIND   ]
     
    51600       0       +1      # table_execute_type   [2][TYPE_MOVE   ]
    52610       0       +1      # table_execute_type   [2][TYPE_TEST   ]
    53 0       0       +1      # table_execute_type   [2][TYPE_MUL_DIV]
     620       0       +1      # table_execute_type   [2][TYPE_MUL    ]
     630       0       +1      # table_execute_type   [2][TYPE_DIV    ]
    54640       0       +1      # table_execute_type   [2][TYPE_EXTEND ]
    55650       0       +1      # table_execute_type   [2][TYPE_FIND   ]
     
    62721       1       +1      # table_execute_type   [3][TYPE_MOVE   ]
    63731       1       +1      # table_execute_type   [3][TYPE_TEST   ]
    64 0       0       +1      # table_execute_type   [3][TYPE_MUL_DIV]
     740       0       +1      # table_execute_type   [3][TYPE_MUL    ]
     750       0       +1      # table_execute_type   [3][TYPE_DIV    ]
    65761       1       +1      # table_execute_type   [3][TYPE_EXTEND ]
    66771       1       +1      # table_execute_type   [3][TYPE_FIND   ]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/SelfTest/config_multi_execute-multi_thread.cfg

    r81 r88  
    11Read_unit_to_Execution_unit
    223       3       *2      # nb_read_unit           
     31       1       +1      # nb_read_unit_port    [0] [nb_read_unit]
     41       1       +1      # nb_read_unit_port    [1] [nb_read_unit]
     51       1       +1      # nb_read_unit_port    [2] [nb_read_unit]
    364       4       *2      # nb_execute_unit       
     71       1       +1      # nb_execute_unit_port [0] [nb_execute_unit]
     81       1       +1      # nb_execute_unit_port [1] [nb_execute_unit]
     91       1       +1      # nb_execute_unit_port [2] [nb_execute_unit]
     101       1       +1      # nb_execute_unit_port [3] [nb_execute_unit]
    4114       4       *2      # nb_context             
    5121       1       *2      # nb_front_end           
     
    13204       4       *2      # size_load_queue       
    14210       1       +1      # priority
    15 1       1       +1      # table_routing        [0][0]
    16 0       0       +1      # table_routing        [0][1]
    17 0       0       +1      # table_routing        [0][2]
    18 0       0       +1      # table_routing        [0][3]
    19 0       0       +1      # table_routing        [1][0]
    20 1       1       +1      # table_routing        [1][1]
    21 1       1       +1      # table_routing        [1][2]
    22 0       0       +1      # table_routing        [1][3]
    23 0       0       +1      # table_routing        [2][0]
    24 0       0       +1      # table_routing        [2][1]
    25 1       1       +1      # table_routing        [2][2]
    26 1       1       +1      # table_routing        [2][3]
     221       1       +1      # table_routing        [0][0][0]
     230       0       +1      # table_routing        [0][1][0]
     240       0       +1      # table_routing        [0][2][0]
     250       0       +1      # table_routing        [0][3][0]
     260       0       +1      # table_routing        [1][0][0]
     271       1       +1      # table_routing        [1][1][0]
     281       1       +1      # table_routing        [1][2][0]
     290       0       +1      # table_routing        [1][3][0]
     300       0       +1      # table_routing        [2][0][0]
     310       0       +1      # table_routing        [2][1][0]
     321       1       +1      # table_routing        [2][2][0]
     331       1       +1      # table_routing        [2][3][0]
    27340       0       +1      # table_execute_type   [0][TYPE_ALU    ]
    28350       0       +1      # table_execute_type   [0][TYPE_SHIFT  ]
    29360       0       +1      # table_execute_type   [0][TYPE_MOVE   ]
    30370       0       +1      # table_execute_type   [0][TYPE_TEST   ]
    31 0       0       +1      # table_execute_type   [0][TYPE_MUL_DIV]
     380       0       +1      # table_execute_type   [0][TYPE_MUL    ]
     390       0       +1      # table_execute_type   [0][TYPE_DIV    ]
    32400       0       +1      # table_execute_type   [0][TYPE_EXTEND ]
    33410       0       +1      # table_execute_type   [0][TYPE_FIND   ]
     
    40481       1       +1      # table_execute_type   [1][TYPE_MOVE   ]
    41491       1       +1      # table_execute_type   [1][TYPE_TEST   ]
    42 1       1       +1      # table_execute_type   [1][TYPE_MUL_DIV]
     501       1       +1      # table_execute_type   [1][TYPE_MUL    ]
     511       1       +1      # table_execute_type   [1][TYPE_DIV    ]
    43521       1       +1      # table_execute_type   [1][TYPE_EXTEND ]
    44531       1       +1      # table_execute_type   [1][TYPE_FIND   ]
     
    51600       0       +1      # table_execute_type   [2][TYPE_MOVE   ]
    52610       0       +1      # table_execute_type   [2][TYPE_TEST   ]
    53 0       0       +1      # table_execute_type   [2][TYPE_MUL_DIV]
     620       0       +1      # table_execute_type   [2][TYPE_MUL    ]
     630       0       +1      # table_execute_type   [2][TYPE_DIV    ]
    54640       0       +1      # table_execute_type   [2][TYPE_EXTEND ]
    55650       0       +1      # table_execute_type   [2][TYPE_FIND   ]
     
    62721       1       +1      # table_execute_type   [3][TYPE_MOVE   ]
    63731       1       +1      # table_execute_type   [3][TYPE_TEST   ]
    64 1       1       +1      # table_execute_type   [3][TYPE_MUL_DIV]
     741       1       +1      # table_execute_type   [3][TYPE_MUL    ]
     751       1       +1      # table_execute_type   [3][TYPE_DIV    ]
    65760       0       +1      # table_execute_type   [3][TYPE_EXTEND ]
    66770       0       +1      # table_execute_type   [3][TYPE_FIND   ]
     
    84950       0       +1      # table_execute_thread [3][1]
    85960       0       +1      # table_execute_thread [3][2]
    86 1       1       +1      # table_execute_thread [3][3]
     971       1       +1      # table_execute_thread [3][3]   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/SelfTest/src/main.cpp

    r81 r88  
    1515  err (_("list_params is :\n"));
    1616  err (_("  * nb_read_unit                                         (uint32_t)\n"));
     17  err (_("  * nb_read_unit_port    [nb_read_unit]                  (uint32_t)\n"));
    1718  err (_("  * nb_execute_unit                                      (uint32_t)\n"));
     19  err (_("  * nb_execute_unit_port [nb_execute_unit]               (uint32_t)\n"));
    1820  err (_("  * nb_context                                           (uint32_t)\n"));
    1921  err (_("  * nb_front_end                                         (uint32_t)\n"));
     
    3335  err (_("    * [TYPE_MOVE   ]\n"));
    3436  err (_("    * [TYPE_TEST   ]\n"));
    35   err (_("    * [TYPE_MUL_DIV]\n"));
     37  err (_("    * [TYPE_MUL    ]\n"));
     38  err (_("    * [TYPE_DIV    ]\n"));
    3639  err (_("    * [TYPE_EXTEND ]\n"));
    3740  err (_("    * [TYPE_FIND   ]\n"));
     
    5861  string      name                  =      argv[x++];
    5962  uint32_t    _nb_read_unit         = atoi(argv[x++]);
     63
     64  if (static_cast<uint32_t>(argc) < 2+NB_PARAMS+_nb_read_unit)
     65    usage (argc, argv);
     66
     67  uint32_t *  _nb_read_unit_port = new uint32_t [_nb_read_unit];
     68  for (uint32_t i=0; i<_nb_read_unit; i++)
     69    _nb_read_unit_port [i] = atoi(argv[x++]);
     70 
    6071  uint32_t    _nb_execute_unit      = atoi(argv[x++]);
     72
     73  if (static_cast<uint32_t>(argc) < 2+NB_PARAMS+_nb_read_unit+_nb_execute_unit)
     74    usage (argc, argv);
     75
     76  uint32_t    _sum_execute_unit_port = 0;
     77  uint32_t *  _nb_execute_unit_port = new uint32_t [_nb_execute_unit];
     78  for (uint32_t i=0; i<_nb_execute_unit; i++)
     79    {
     80      _nb_execute_unit_port [i] = atoi(argv[x++]);
     81      _sum_execute_unit_port += _nb_execute_unit_port [i];
     82    }
     83
    6184  uint32_t    _nb_context           = atoi(argv[x++]);
    6285  uint32_t    _nb_front_end         = atoi(argv[x++]);
     
    7093  uint32_t    _size_load_queue      = atoi(argv[x++]);
    7194  Tpriority_t _priority             = fromString<Tpriority_t>(argv[x++]);
    72 
     95 
    7396  uint32_t    _nb_thread            = get_nb_thread(_nb_context, _nb_front_end, _nb_ooo_engine);
    7497
    75   if (static_cast<uint32_t>(argc) != 2+NB_PARAMS+(_nb_read_unit*_nb_execute_unit)+(_nb_execute_unit*11)+(_nb_execute_unit*_nb_thread))
    76     usage (argc, argv);
    77  
    78   bool ** _table_routing        ;
    79   bool ** _table_execute_type   ;
    80   bool ** _table_execute_thread ;
    81  
    82   _table_routing = new bool * [_nb_read_unit];
     98  msg("%d\n",argc);
     99  msg("%d\n",2+NB_PARAMS+(_nb_read_unit+_nb_execute_unit+(_nb_read_unit*_sum_execute_unit_port)+(_nb_execute_unit*12)+(_nb_execute_unit*_nb_thread)));
     100 
     101  if (static_cast<uint32_t>(argc) != 2+NB_PARAMS+(_nb_read_unit+_nb_execute_unit+(_nb_read_unit*_sum_execute_unit_port)+(_nb_execute_unit*12)+(_nb_execute_unit*_nb_thread)))
     102      usage (argc, argv);
     103 
     104  bool *** _table_routing        ;
     105  bool  ** _table_execute_type   ;
     106  bool  ** _table_execute_thread ;
     107 
     108  _table_routing = new bool ** [_nb_read_unit];
    83109  for (uint32_t i=0; i<_nb_read_unit; i++)
    84110    {
    85       _table_routing [i] = new bool [_nb_execute_unit];
     111      _table_routing [i] = new bool * [_nb_execute_unit];
    86112      for (uint32_t j=0; j<_nb_execute_unit; j++)
    87         _table_routing [i][j] = atoi(argv[x++]);
    88     }
    89 
     113        {
     114          _table_routing [i][j] = new bool [_nb_execute_unit_port [j]];
     115     
     116          for (uint32_t k=0; k<_nb_execute_unit_port [j]; k++)
     117            _table_routing [i][j][k] = atoi(argv[x++]);
     118        }
     119    }
     120     
    90121  _table_execute_type = new bool * [_nb_execute_unit];
    91122  for (uint32_t i=0; i<_nb_execute_unit; i++)
     
    97128      _table_execute_type [i][TYPE_MOVE   ] = atoi(argv[x++]);
    98129      _table_execute_type [i][TYPE_TEST   ] = atoi(argv[x++]);
    99       _table_execute_type [i][TYPE_MUL_DIV] = atoi(argv[x++]);
     130      _table_execute_type [i][TYPE_MUL    ] = atoi(argv[x++]);
     131      _table_execute_type [i][TYPE_DIV    ] = atoi(argv[x++]);
    100132      _table_execute_type [i][TYPE_EXTEND ] = atoi(argv[x++]);
    101133      _table_execute_type [i][TYPE_FIND   ] = atoi(argv[x++]);
     
    119151      morpheo::behavioural::core::multi_execute_loop::execute_loop::network::read_unit_to_execution_unit::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::network::read_unit_to_execution_unit::Parameters
    120152        (_nb_read_unit         ,
     153         _nb_read_unit_port    ,
    121154         _nb_execute_unit      ,
     155         _nb_execute_unit_port ,
    122156         _nb_context           ,
    123157         _nb_front_end         ,
     
    133167         _table_routing        ,
    134168         _table_execute_type   ,
    135          _table_execute_thread
     169         _table_execute_thread ,
     170         true // is_toplevel
    136171         );
    137172     
     
    151186    }
    152187
    153   delete [] _table_routing        ;
     188  delete [] _nb_read_unit_port;
     189  delete [] _nb_execute_unit_port ;
     190
     191  for (uint32_t i=0; i<_nb_read_unit; i++)
     192    {
     193      for (uint32_t j=0; j<_nb_execute_unit; j++)
     194        delete [] _table_routing [i][j];
     195      delete [] _table_routing [i];
     196    }
     197  delete [] _table_routing;
     198
     199
     200  for (uint32_t i=0; i<_nb_execute_unit; i++)
     201    delete [] _table_execute_type [i];
    154202  delete [] _table_execute_type   ;
     203
     204  for (uint32_t i=0; i<_nb_execute_unit; i++)
     205    delete [] _table_execute_thread [i];
    155206  delete [] _table_execute_thread ;
     207
    156208
    157209  return (EXIT_SUCCESS);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/SelfTest/src/test.cpp

    r82 r88  
    8484#endif
    8585
     86  Tusage_t _usage = USE_ALL;
     87
     88//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     89//   _usage = usage_unset(_usage,USE_VHDL                 );
     90//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     91//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     92//   _usage = usage_unset(_usage,USE_POSITION             );
     93   _usage = usage_unset(_usage,USE_STATISTICS           );
     94//   _usage = usage_unset(_usage,USE_INFORMATION          );
     95
    8696  Read_unit_to_Execution_unit * _Read_unit_to_Execution_unit = new Read_unit_to_Execution_unit
    8797    (name.c_str(),
     
    90100#endif
    91101     _param,
    92      USE_ALL);
     102     _usage);
    93103 
    94104#ifdef SYSTEMC
     
    101111  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    102112
    103   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_VAL                  ," in_READ_UNIT_OUT_VAL"                  ,Tcontrol_t        ,_param->_nb_read_unit);
    104   ALLOC1_SC_SIGNAL(out_READ_UNIT_OUT_ACK                  ,"out_READ_UNIT_OUT_ACK"                  ,Tcontrol_t        ,_param->_nb_read_unit);
    105   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_CONTEXT_ID           ," in_READ_UNIT_OUT_CONTEXT_ID"           ,Tcontext_t        ,_param->_nb_read_unit);
    106   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_FRONT_END_ID         ," in_READ_UNIT_OUT_FRONT_END_ID"         ,Tcontext_t        ,_param->_nb_read_unit);
    107   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_OOO_ENGINE_ID        ," in_READ_UNIT_OUT_OOO_ENGINE_ID"        ,Tcontext_t        ,_param->_nb_read_unit);
    108   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_PACKET_ID            ," in_READ_UNIT_OUT_PACKET_ID"            ,Tpacket_t         ,_param->_nb_read_unit);
    109   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_OPERATION            ," in_READ_UNIT_OUT_OPERATION"            ,Toperation_t      ,_param->_nb_read_unit);
    110   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_TYPE                 ," in_READ_UNIT_OUT_TYPE"                 ,Ttype_t           ,_param->_nb_read_unit);
    111   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE," in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,_param->_nb_read_unit);
    112   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ," in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE" ,Tlsq_ptr_t        ,_param->_nb_read_unit);
    113   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_HAS_IMMEDIAT         ," in_READ_UNIT_OUT_HAS_IMMEDIAT"         ,Tcontrol_t        ,_param->_nb_read_unit);
    114   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_IMMEDIAT             ," in_READ_UNIT_OUT_IMMEDIAT"             ,Tgeneral_data_t   ,_param->_nb_read_unit);
    115   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_DATA_RA              ," in_READ_UNIT_OUT_DATA_RA"              ,Tgeneral_data_t   ,_param->_nb_read_unit);
    116   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_DATA_RB              ," in_READ_UNIT_OUT_DATA_RB"              ,Tgeneral_data_t   ,_param->_nb_read_unit);
    117   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_DATA_RC              ," in_READ_UNIT_OUT_DATA_RC"              ,Tspecial_data_t   ,_param->_nb_read_unit);
    118   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_WRITE_RD             ," in_READ_UNIT_OUT_WRITE_RD"             ,Tcontrol_t        ,_param->_nb_read_unit);
    119   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_NUM_REG_RD           ," in_READ_UNIT_OUT_NUM_REG_RD"           ,Tgeneral_address_t,_param->_nb_read_unit);
    120   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_WRITE_RE             ," in_READ_UNIT_OUT_WRITE_RE"             ,Tcontrol_t        ,_param->_nb_read_unit);
    121   ALLOC1_SC_SIGNAL( in_READ_UNIT_OUT_NUM_REG_RE           ," in_READ_UNIT_OUT_NUM_REG_RE"           ,Tspecial_address_t,_param->_nb_read_unit);
    122   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_VAL                  ,"out_EXECUTE_UNIT_IN_VAL"                  ,Tcontrol_t        ,_param->_nb_execute_unit);
    123   ALLOC1_SC_SIGNAL( in_EXECUTE_UNIT_IN_ACK                  ," in_EXECUTE_UNIT_IN_ACK"                  ,Tcontrol_t        ,_param->_nb_execute_unit);
    124   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_CONTEXT_ID           ,"out_EXECUTE_UNIT_IN_CONTEXT_ID"           ,Tcontext_t        ,_param->_nb_execute_unit);
    125   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_FRONT_END_ID         ,"out_EXECUTE_UNIT_IN_FRONT_END_ID"         ,Tcontext_t        ,_param->_nb_execute_unit);
    126   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID        ,"out_EXECUTE_UNIT_IN_OOO_ENGINE_ID"        ,Tcontext_t        ,_param->_nb_execute_unit);
    127   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_PACKET_ID            ,"out_EXECUTE_UNIT_IN_PACKET_ID"            ,Tpacket_t         ,_param->_nb_execute_unit);
    128   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_OPERATION            ,"out_EXECUTE_UNIT_IN_OPERATION"            ,Toperation_t      ,_param->_nb_execute_unit);
    129   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_TYPE                 ,"out_EXECUTE_UNIT_IN_TYPE"                 ,Ttype_t           ,_param->_nb_execute_unit);
    130   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE,"out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,_param->_nb_execute_unit);
    131   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,"out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE" ,Tlsq_ptr_t        ,_param->_nb_execute_unit);
    132   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ,"out_EXECUTE_UNIT_IN_HAS_IMMEDIAT"         ,Tcontrol_t        ,_param->_nb_execute_unit);
    133   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_IMMEDIAT             ,"out_EXECUTE_UNIT_IN_IMMEDIAT"             ,Tgeneral_data_t   ,_param->_nb_execute_unit);
    134   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_DATA_RA              ,"out_EXECUTE_UNIT_IN_DATA_RA"              ,Tgeneral_data_t   ,_param->_nb_execute_unit);
    135   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_DATA_RB              ,"out_EXECUTE_UNIT_IN_DATA_RB"              ,Tgeneral_data_t   ,_param->_nb_execute_unit);
    136   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_DATA_RC              ,"out_EXECUTE_UNIT_IN_DATA_RC"              ,Tspecial_data_t   ,_param->_nb_execute_unit);
    137   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_WRITE_RD             ,"out_EXECUTE_UNIT_IN_WRITE_RD"             ,Tcontrol_t        ,_param->_nb_execute_unit);
    138   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_NUM_REG_RD           ,"out_EXECUTE_UNIT_IN_NUM_REG_RD"           ,Tgeneral_address_t,_param->_nb_execute_unit);
    139   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_WRITE_RE             ,"out_EXECUTE_UNIT_IN_WRITE_RE"             ,Tcontrol_t        ,_param->_nb_execute_unit);
    140   ALLOC1_SC_SIGNAL(out_EXECUTE_UNIT_IN_NUM_REG_RE           ,"out_EXECUTE_UNIT_IN_NUM_REG_RE"           ,Tspecial_address_t,_param->_nb_execute_unit);
     113  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_VAL                  ," in_READ_UNIT_OUT_VAL"                  ,Tcontrol_t        ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     114  ALLOC2_SC_SIGNAL(out_READ_UNIT_OUT_ACK                  ,"out_READ_UNIT_OUT_ACK"                  ,Tcontrol_t        ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     115  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_CONTEXT_ID           ," in_READ_UNIT_OUT_CONTEXT_ID"           ,Tcontext_t        ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     116  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_FRONT_END_ID         ," in_READ_UNIT_OUT_FRONT_END_ID"         ,Tcontext_t        ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     117  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_OOO_ENGINE_ID        ," in_READ_UNIT_OUT_OOO_ENGINE_ID"        ,Tcontext_t        ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     118  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_PACKET_ID            ," in_READ_UNIT_OUT_PACKET_ID"            ,Tpacket_t         ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     119  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_OPERATION            ," in_READ_UNIT_OUT_OPERATION"            ,Toperation_t      ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     120  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_TYPE                 ," in_READ_UNIT_OUT_TYPE"                 ,Ttype_t           ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     121  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE," in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     122  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ," in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE" ,Tlsq_ptr_t        ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     123  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_HAS_IMMEDIAT         ," in_READ_UNIT_OUT_HAS_IMMEDIAT"         ,Tcontrol_t        ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     124  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_IMMEDIAT             ," in_READ_UNIT_OUT_IMMEDIAT"             ,Tgeneral_data_t   ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     125  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_DATA_RA              ," in_READ_UNIT_OUT_DATA_RA"              ,Tgeneral_data_t   ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     126  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_DATA_RB              ," in_READ_UNIT_OUT_DATA_RB"              ,Tgeneral_data_t   ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     127  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_DATA_RC              ," in_READ_UNIT_OUT_DATA_RC"              ,Tspecial_data_t   ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     128  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_WRITE_RD             ," in_READ_UNIT_OUT_WRITE_RD"             ,Tcontrol_t        ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     129  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_NUM_REG_RD           ," in_READ_UNIT_OUT_NUM_REG_RD"           ,Tgeneral_address_t,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     130  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_WRITE_RE             ," in_READ_UNIT_OUT_WRITE_RE"             ,Tcontrol_t        ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     131  ALLOC2_SC_SIGNAL( in_READ_UNIT_OUT_NUM_REG_RE           ," in_READ_UNIT_OUT_NUM_REG_RE"           ,Tspecial_address_t,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     132  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_VAL                  ,"out_EXECUTE_UNIT_IN_VAL"                  ,Tcontrol_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     133  ALLOC2_SC_SIGNAL( in_EXECUTE_UNIT_IN_ACK                  ," in_EXECUTE_UNIT_IN_ACK"                  ,Tcontrol_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     134  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_CONTEXT_ID           ,"out_EXECUTE_UNIT_IN_CONTEXT_ID"           ,Tcontext_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     135  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_FRONT_END_ID         ,"out_EXECUTE_UNIT_IN_FRONT_END_ID"         ,Tcontext_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     136  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID        ,"out_EXECUTE_UNIT_IN_OOO_ENGINE_ID"        ,Tcontext_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     137  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_PACKET_ID            ,"out_EXECUTE_UNIT_IN_PACKET_ID"            ,Tpacket_t         ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     138  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_OPERATION            ,"out_EXECUTE_UNIT_IN_OPERATION"            ,Toperation_t      ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     139  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_TYPE                 ,"out_EXECUTE_UNIT_IN_TYPE"                 ,Ttype_t           ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     140  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE,"out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     141  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,"out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE" ,Tlsq_ptr_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     142  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ,"out_EXECUTE_UNIT_IN_HAS_IMMEDIAT"         ,Tcontrol_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     143  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_IMMEDIAT             ,"out_EXECUTE_UNIT_IN_IMMEDIAT"             ,Tgeneral_data_t   ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     144  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_DATA_RA              ,"out_EXECUTE_UNIT_IN_DATA_RA"              ,Tgeneral_data_t   ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     145  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_DATA_RB              ,"out_EXECUTE_UNIT_IN_DATA_RB"              ,Tgeneral_data_t   ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     146  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_DATA_RC              ,"out_EXECUTE_UNIT_IN_DATA_RC"              ,Tspecial_data_t   ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     147  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_WRITE_RD             ,"out_EXECUTE_UNIT_IN_WRITE_RD"             ,Tcontrol_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     148  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_NUM_REG_RD           ,"out_EXECUTE_UNIT_IN_NUM_REG_RD"           ,Tgeneral_address_t,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     149  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_WRITE_RE             ,"out_EXECUTE_UNIT_IN_WRITE_RE"             ,Tcontrol_t        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     150  ALLOC2_SC_SIGNAL(out_EXECUTE_UNIT_IN_NUM_REG_RE           ,"out_EXECUTE_UNIT_IN_NUM_REG_RE"           ,Tspecial_address_t,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
    141151 
    142152 
     
    150160  (*(_Read_unit_to_Execution_unit->in_NRESET))       (*(in_NRESET));
    151161
    152   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_VAL                  ,_param->_nb_read_unit);
    153   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_READ_UNIT_OUT_ACK                  ,_param->_nb_read_unit);
     162  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_VAL                  ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     163  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_READ_UNIT_OUT_ACK                  ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
    154164  if (_param->_have_port_context_id)
    155   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_CONTEXT_ID           ,_param->_nb_read_unit);
     165  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_CONTEXT_ID           ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
    156166  if (_param->_have_port_front_end_id)
    157   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_FRONT_END_ID         ,_param->_nb_read_unit);
     167  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_FRONT_END_ID         ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
    158168  if (_param->_have_port_ooo_engine_id)
    159   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_OOO_ENGINE_ID        ,_param->_nb_read_unit);
    160   if (_param->_have_port_packet_id)
    161   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_PACKET_ID            ,_param->_nb_read_unit);
    162   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_OPERATION            ,_param->_nb_read_unit);
    163   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_TYPE                 ,_param->_nb_read_unit);
    164   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_read_unit);
     169  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_OOO_ENGINE_ID        ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     170  if (_param->_have_port_rob_ptr  )
     171  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_PACKET_ID            ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     172  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_OPERATION            ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     173  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_TYPE                 ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     174  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
    165175  if (_param->_have_port_load_queue_ptr)
    166   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_read_unit);
    167   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_HAS_IMMEDIAT         ,_param->_nb_read_unit);
    168   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_IMMEDIAT             ,_param->_nb_read_unit);
    169   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_DATA_RA              ,_param->_nb_read_unit);
    170   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_DATA_RB              ,_param->_nb_read_unit);
    171   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_DATA_RC              ,_param->_nb_read_unit);
    172   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_WRITE_RD             ,_param->_nb_read_unit);
    173   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_NUM_REG_RD           ,_param->_nb_read_unit);
    174   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_WRITE_RE             ,_param->_nb_read_unit);
    175   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_NUM_REG_RE           ,_param->_nb_read_unit);
    176 
    177   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_VAL                  ,_param->_nb_execute_unit);
    178   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit, in_EXECUTE_UNIT_IN_ACK                  ,_param->_nb_execute_unit);
     176  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     177  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_HAS_IMMEDIAT         ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     178  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_IMMEDIAT             ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     179  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_DATA_RA              ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     180  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_DATA_RB              ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     181  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_DATA_RC              ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     182  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_WRITE_RD             ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     183  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_NUM_REG_RD           ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     184  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_WRITE_RE             ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     185  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_READ_UNIT_OUT_NUM_REG_RE           ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     186
     187  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_VAL                  ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     188  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit, in_EXECUTE_UNIT_IN_ACK                  ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
    179189  if (_param->_have_port_context_id)
    180   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_CONTEXT_ID           ,_param->_nb_execute_unit);
     190  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_CONTEXT_ID           ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
    181191  if (_param->_have_port_front_end_id)
    182   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_FRONT_END_ID         ,_param->_nb_execute_unit);
     192  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_FRONT_END_ID         ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
    183193  if (_param->_have_port_ooo_engine_id)
    184   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_OOO_ENGINE_ID        ,_param->_nb_execute_unit);
    185   if (_param->_have_port_packet_id)
    186   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_PACKET_ID            ,_param->_nb_execute_unit);
    187   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_OPERATION            ,_param->_nb_execute_unit);
    188   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_TYPE                 ,_param->_nb_execute_unit);
    189   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE,_param->_nb_execute_unit);
     194  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_OOO_ENGINE_ID        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     195  if (_param->_have_port_rob_ptr  )
     196  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_PACKET_ID            ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     197  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_OPERATION            ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     198  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_TYPE                 ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     199  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
    190200  if (_param->_have_port_load_queue_ptr)
    191   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_execute_unit);
    192   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ,_param->_nb_execute_unit);
    193   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_IMMEDIAT             ,_param->_nb_execute_unit);
    194   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_DATA_RA              ,_param->_nb_execute_unit);
    195   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_DATA_RB              ,_param->_nb_execute_unit);
    196   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_DATA_RC              ,_param->_nb_execute_unit);
    197   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_WRITE_RD             ,_param->_nb_execute_unit);
    198   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_NUM_REG_RD           ,_param->_nb_execute_unit);
    199   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_WRITE_RE             ,_param->_nb_execute_unit);
    200   INSTANCE1_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_NUM_REG_RE           ,_param->_nb_execute_unit);
     201  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     202  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     203  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_IMMEDIAT             ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     204  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_DATA_RA              ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     205  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_DATA_RB              ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     206  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_DATA_RC              ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     207  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_WRITE_RD             ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     208  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_NUM_REG_RD           ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     209  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_WRITE_RE             ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     210  INSTANCE2_SC_SIGNAL(_Read_unit_to_Execution_unit,out_EXECUTE_UNIT_IN_NUM_REG_RE           ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
    201211
    202212  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    222232 
    223233  for (uint32_t i=0; i<_param->_nb_read_unit; i++)
    224     for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    225       if (_param->_table_routing[i][j])
    226         for (uint32_t k=0; k<_param->_nb_thread; k++)
    227           if (_param->_table_execute_thread[j][k])
    228             {
    229               read_unit_thread [i].insert(k);
    230              
    231               for (uint32_t l=0; l<_param->_nb_type; l++)
    232                 if (_param->_table_execute_type[j][l])
    233                   read_unit_type [i][k].insert(l);
    234             }
     234    for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     235      for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     236        if (_param->_table_routing[i][x][y])
     237          for (uint32_t k=0; k<_param->_nb_thread; k++)
     238            if (_param->_table_execute_thread[x][k])
     239              {
     240                read_unit_thread [i].insert(k);
     241               
     242                for (uint32_t l=0; l<_param->_nb_type; l++)
     243                  if (_param->_table_execute_type[x][l])
     244                    read_unit_type [i][k].insert(l);
     245              }
    235246  //bool ** _table_routing       ; //array [nb_read_unit][nb_execute_unit]
    236247  //bool ** _table_execute_type  ; //array [nb_execute_unit][nb_type]
     
    251262      LABEL("Iteration %d",iteration);
    252263
    253       list<entry_t> request [_param->_nb_read_unit];
     264      list<entry_t> request [_param->_nb_read_unit][_param->_max_nb_read_unit_port];
    254265
    255266      uint32_t nb_request_in;
    256267      for (nb_request_in=0; nb_request_in < _param->_nb_packet; )
    257268        for (uint32_t i=0; i<_param->_nb_read_unit; i++)
    258           {
    259             if (nb_request_in >= _param->_nb_packet)
    260               break;
    261 
    262             Tcontext_t context_id   ;
    263             Tcontext_t front_end_id ;
    264             Tcontext_t ooo_engine_id;
    265             Tcontext_t num_thread   ;
    266 
    267             // Find compatible thread
    268             do
    269               {
    270                 context_id    = range<Tcontext_t> (rand(), _param->_size_context_id   );
    271                 front_end_id  = range<Tcontext_t> (rand(), _param->_size_front_end_id );
    272                 ooo_engine_id = range<Tcontext_t> (rand(), _param->_size_ooo_engine_id);
    273                 num_thread    = get_num_thread (context_id   , _param->_size_context_id   ,
    274                                                 front_end_id , _param->_size_front_end_id ,
    275                                                 ooo_engine_id, _param->_size_ooo_engine_id);
    276               }
    277             while (read_unit_thread[i].find(num_thread) == read_unit_thread[i].end());
    278 
    279             Ttype_t    type;
    280            
    281             // Find a compatible type
    282             do
    283               {
    284                 type = range<Ttype_t> (rand(), _param->_size_type);
    285               }
    286             while (read_unit_type[i][num_thread].find(type) == read_unit_type[i][num_thread].end());
    287 
    288             request[i].push_back(entry_t (context_id   ,
    289                                           front_end_id ,
    290                                           ooo_engine_id,
    291                                           nb_request_in,
    292                                           range<Toperation_t      > (rand(), _param->_size_operation       ),
    293                                           type,
    294                                           range<Tlsq_ptr_t        > (rand(), _param->_size_store_queue     ),
    295                                           range<Tlsq_ptr_t        > (rand(), _param->_size_load_queue      ),
    296                                           range<Tcontrol_t        > (rand(), 2                             ),
    297                                           range<Tgeneral_data_t   > (rand(), _param->_size_general_data    ),
    298                                           range<Tgeneral_data_t   > (rand(), _param->_size_general_data    ),
    299                                           range<Tgeneral_data_t   > (rand(), _param->_size_general_data    ),
    300                                           range<Tspecial_data_t   > (rand(), _param->_size_special_data    ),
    301                                           range<Tcontrol_t        > (rand(), 2                             ),
    302                                           range<Tgeneral_address_t> (rand(), _param->_size_general_register),
    303                                           range<Tcontrol_t        > (rand(), 2                             ),
    304                                           range<Tspecial_address_t> (rand(), _param->_size_special_register)
    305                                           ));
    306 
    307             nb_request_in++;
    308           }
     269          for (uint32_t j=0; j<_param->_nb_read_unit_port [i]; j++)
     270            {
     271              if (nb_request_in >= _param->_nb_packet)
     272                break;
     273             
     274              Tcontext_t context_id   ;
     275              Tcontext_t front_end_id ;
     276              Tcontext_t ooo_engine_id;
     277              Tcontext_t num_thread   ;
     278             
     279              // Find compatible thread
     280              do
     281                {
     282                  context_id    = range<Tcontext_t> (rand(), _param->_size_context_id   );
     283                  front_end_id  = range<Tcontext_t> (rand(), _param->_size_front_end_id );
     284                  ooo_engine_id = range<Tcontext_t> (rand(), _param->_size_ooo_engine_id);
     285                  num_thread    = get_num_thread (context_id   , _param->_size_context_id   ,
     286                                                  front_end_id , _param->_size_front_end_id ,
     287                                                  ooo_engine_id, _param->_size_ooo_engine_id);
     288                }
     289              while (read_unit_thread[i].find(num_thread) == read_unit_thread[i].end());
     290             
     291              Ttype_t    type;
     292             
     293              // Find a compatible type
     294              do
     295                {
     296                  type = range<Ttype_t> (rand(), _param->_size_type);
     297                }
     298              while (read_unit_type[i][num_thread].find(type) == read_unit_type[i][num_thread].end());
     299             
     300              request[i][j].push_back(entry_t (context_id   ,
     301                                               front_end_id ,
     302                                               ooo_engine_id,
     303                                               nb_request_in,
     304                                               range<Toperation_t      > (rand(), _param->_size_operation       ),
     305                                               type,
     306                                               range<Tlsq_ptr_t        > (rand(), (1<<_param->_size_store_queue_ptr)),
     307                                               range<Tlsq_ptr_t        > (rand(), (1<<_param->_size_load_queue_ptr )),
     308                                               range<Tcontrol_t        > (rand(), 2                             ),
     309                                               range<Tgeneral_data_t   > (rand(), _param->_size_general_data    ),
     310                                               range<Tgeneral_data_t   > (rand(), _param->_size_general_data    ),
     311                                               range<Tgeneral_data_t   > (rand(), _param->_size_general_data    ),
     312                                               range<Tspecial_data_t   > (rand(), _param->_size_special_data    ),
     313                                               range<Tcontrol_t        > (rand(), 2                             ),
     314                                               range<Tgeneral_address_t> (rand(), _param->_size_general_register),
     315                                               range<Tcontrol_t        > (rand(), 2                             ),
     316                                               range<Tspecial_address_t> (rand(), _param->_size_special_register)
     317                                               ));
     318             
     319              nb_request_in++;
     320            }
    309321
    310322      uint32_t   nb_request_out = 0;
     
    313325        {
    314326          for (uint32_t i=0; i<_param->_nb_read_unit; i++)
    315             {
    316               bool val = not request[i].empty() and ((rand()%100) < percent_transaction_in);
     327            for (uint32_t j=0; j<_param->_nb_read_unit_port [i]; j++)
     328              {
     329                bool val = not request[i][j].empty() and ((rand()%100) < percent_transaction_in);
    317330               
    318               in_READ_UNIT_OUT_VAL [i]->write(val);
    319 
    320               if (val)
     331                in_READ_UNIT_OUT_VAL [i][j]->write(val);
     332               
     333                if (val)
    321334                {
    322                   in_READ_UNIT_OUT_CONTEXT_ID           [i] ->write(request[i].front()._context_id           );
    323                   in_READ_UNIT_OUT_FRONT_END_ID         [i] ->write(request[i].front()._front_end_id         );
    324                   in_READ_UNIT_OUT_OOO_ENGINE_ID        [i] ->write(request[i].front()._ooo_engine_id        );
    325                   in_READ_UNIT_OUT_PACKET_ID            [i] ->write(request[i].front()._packet_id            );
    326                   in_READ_UNIT_OUT_OPERATION            [i] ->write(request[i].front()._operation            );
    327                   in_READ_UNIT_OUT_TYPE                 [i] ->write(request[i].front()._type                 );
    328                   in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE[i] ->write(request[i].front()._store_queue_ptr_write);
     335                  in_READ_UNIT_OUT_CONTEXT_ID           [i][j] ->write(request[i][j].front()._context_id           );
     336                  in_READ_UNIT_OUT_FRONT_END_ID         [i][j] ->write(request[i][j].front()._front_end_id         );
     337                  in_READ_UNIT_OUT_OOO_ENGINE_ID        [i][j] ->write(request[i][j].front()._ooo_engine_id        );
     338                  in_READ_UNIT_OUT_PACKET_ID            [i][j] ->write(request[i][j].front()._packet_id            );
     339                  in_READ_UNIT_OUT_OPERATION            [i][j] ->write(request[i][j].front()._operation            );
     340                  in_READ_UNIT_OUT_TYPE                 [i][j] ->write(request[i][j].front()._type                 );
     341                  in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE[i][j] ->write(request[i][j].front()._store_queue_ptr_write);
    329342                  if (_param->_have_port_load_queue_ptr)
    330                   in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE [i] ->write(request[i].front()._load_queue_ptr_write );
    331                   in_READ_UNIT_OUT_HAS_IMMEDIAT         [i] ->write(request[i].front()._has_immediat         );
    332                   in_READ_UNIT_OUT_IMMEDIAT             [i] ->write(request[i].front()._immediat             );
    333                   in_READ_UNIT_OUT_DATA_RA              [i] ->write(request[i].front()._data_ra              );
    334                   in_READ_UNIT_OUT_DATA_RB              [i] ->write(request[i].front()._data_rb              );
    335                   in_READ_UNIT_OUT_DATA_RC              [i] ->write(request[i].front()._data_rc              );
    336                   in_READ_UNIT_OUT_WRITE_RD             [i] ->write(request[i].front()._write_rd             );
    337                   in_READ_UNIT_OUT_NUM_REG_RD           [i] ->write(request[i].front()._num_reg_rd           );
    338                   in_READ_UNIT_OUT_WRITE_RE             [i] ->write(request[i].front()._write_re             );
    339                   in_READ_UNIT_OUT_NUM_REG_RE           [i] ->write(request[i].front()._num_reg_re           );
     343                  in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE [i][j] ->write(request[i][j].front()._load_queue_ptr_write );
     344                  in_READ_UNIT_OUT_HAS_IMMEDIAT         [i][j] ->write(request[i][j].front()._has_immediat         );
     345                  in_READ_UNIT_OUT_IMMEDIAT             [i][j] ->write(request[i][j].front()._immediat             );
     346                  in_READ_UNIT_OUT_DATA_RA              [i][j] ->write(request[i][j].front()._data_ra              );
     347                  in_READ_UNIT_OUT_DATA_RB              [i][j] ->write(request[i][j].front()._data_rb              );
     348                  in_READ_UNIT_OUT_DATA_RC              [i][j] ->write(request[i][j].front()._data_rc              );
     349                  in_READ_UNIT_OUT_WRITE_RD             [i][j] ->write(request[i][j].front()._write_rd             );
     350                  in_READ_UNIT_OUT_NUM_REG_RD           [i][j] ->write(request[i][j].front()._num_reg_rd           );
     351                  in_READ_UNIT_OUT_WRITE_RE             [i][j] ->write(request[i][j].front()._write_re             );
     352                  in_READ_UNIT_OUT_NUM_REG_RE           [i][j] ->write(request[i][j].front()._num_reg_re           );
    340353                }
    341             }
     354              }
    342355
    343356          for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    344             in_EXECUTE_UNIT_IN_ACK [i]->write((rand()%100) < percent_transaction_out);
     357            for (uint32_t j=0; j<_param->_nb_execute_unit_port[i]; j++)
     358              in_EXECUTE_UNIT_IN_ACK [i][j]->write((rand()%100) < percent_transaction_out);
    345359
    346360          SC_START(0);
    347361
    348362          for (uint32_t i=0; i<_param->_nb_read_unit; i++)
    349             if (in_READ_UNIT_OUT_VAL [i]->read() and out_READ_UNIT_OUT_ACK [i]->read())
    350               {
    351                 LABEL("READ_UNIT_OUT   [%d] - Transaction accepted",i);
    352               }
     363            for (uint32_t j=0; j<_param->_nb_read_unit_port [i]; j++)
     364              if (in_READ_UNIT_OUT_VAL [i][j]->read() and out_READ_UNIT_OUT_ACK [i][j]->read())
     365                {
     366                  LABEL("READ_UNIT_OUT   [%d][%d] - Transaction accepted",i,j);
     367                }
    353368
    354369          for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    355             if (out_EXECUTE_UNIT_IN_VAL [i]->read() and in_EXECUTE_UNIT_IN_ACK [i]->read())
    356               {
    357                 LABEL("EXECUTE_UNIT_IN [%d] - Transaction accepted (%d)",i,nb_request_out);
    358                 nb_request_out ++;
    359                
    360                 Tpacket_t packet = (_param->_have_port_packet_id)?out_EXECUTE_UNIT_IN_PACKET_ID[i]->read():0;
    361                 LABEL("  * packet           : %d",packet);             
    362                 uint32_t read_unit;
    363 
    364                 // find read_unit
    365                 for (read_unit=0; read_unit<_param->_nb_read_unit; read_unit++)
    366                   if (packet == ((_param->_have_port_packet_id)?request[read_unit].front()._packet_id:0))
    367                     break;
    368 
    369                 LABEL("  * read_unit source : %d",read_unit);
    370 
    371                 if (_param->_have_port_packet_id)
    372                 TEST(Tcontext_t        ,out_EXECUTE_UNIT_IN_PACKET_ID            [i]->read(), request[read_unit].front()._packet_id            );
    373 
    374                 // Authorised link ? read_unit -> execute_unit
    375                 TEST(bool, _param->_table_routing[read_unit][i], true);
    376 
    377                 if (_param->_have_port_context_id)
    378                 TEST(Tcontext_t        ,out_EXECUTE_UNIT_IN_CONTEXT_ID           [i]->read(), request[read_unit].front()._context_id           );
    379                 if (_param->_have_port_front_end_id)
    380                 TEST(Tcontext_t        ,out_EXECUTE_UNIT_IN_FRONT_END_ID         [i]->read(), request[read_unit].front()._front_end_id         );
    381                 if (_param->_have_port_ooo_engine_id)
    382                 TEST(Tcontext_t        ,out_EXECUTE_UNIT_IN_OOO_ENGINE_ID        [i]->read(), request[read_unit].front()._ooo_engine_id        );
    383                 TEST(Toperation_t      ,out_EXECUTE_UNIT_IN_OPERATION            [i]->read(), request[read_unit].front()._operation            );
    384                 TEST(Ttype_t           ,out_EXECUTE_UNIT_IN_TYPE                 [i]->read(), request[read_unit].front()._type                 );
    385                 TEST(Tlsq_ptr_t        ,out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE[i]->read(), request[read_unit].front()._store_queue_ptr_write);
    386                 if (_param->_have_port_load_queue_ptr)
    387                 TEST(Tlsq_ptr_t        ,out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i]->read(), request[read_unit].front()._load_queue_ptr_write );
    388                 TEST(Tcontrol_t        ,out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         [i]->read(), request[read_unit].front()._has_immediat         );
    389                 TEST(Tgeneral_data_t   ,out_EXECUTE_UNIT_IN_IMMEDIAT             [i]->read(), request[read_unit].front()._immediat             );
    390                 TEST(Tgeneral_data_t   ,out_EXECUTE_UNIT_IN_DATA_RA              [i]->read(), request[read_unit].front()._data_ra              );
    391                 TEST(Tgeneral_data_t   ,out_EXECUTE_UNIT_IN_DATA_RB              [i]->read(), request[read_unit].front()._data_rb              );
    392                 TEST(Tspecial_data_t   ,out_EXECUTE_UNIT_IN_DATA_RC              [i]->read(), request[read_unit].front()._data_rc              );
    393                 TEST(Tcontrol_t        ,out_EXECUTE_UNIT_IN_WRITE_RD             [i]->read(), request[read_unit].front()._write_rd             );
    394                 TEST(Tgeneral_address_t,out_EXECUTE_UNIT_IN_NUM_REG_RD           [i]->read(), request[read_unit].front()._num_reg_rd           );
    395                 TEST(Tcontrol_t        ,out_EXECUTE_UNIT_IN_WRITE_RE             [i]->read(), request[read_unit].front()._write_re             );
    396                 TEST(Tspecial_address_t,out_EXECUTE_UNIT_IN_NUM_REG_RE           [i]->read(), request[read_unit].front()._num_reg_re           );
    397                
    398                 request[read_unit].pop_front();
    399               }
     370            for (uint32_t j=0; j<_param->_nb_execute_unit_port[i]; j++)
     371              if (out_EXECUTE_UNIT_IN_VAL [i][j]->read() and in_EXECUTE_UNIT_IN_ACK [i][j]->read())
     372                {
     373                  LABEL("EXECUTE_UNIT_IN [%d][%d] - Transaction accepted (%d)",i,j,nb_request_out);
     374                  nb_request_out ++;
     375                 
     376                  Tpacket_t packet = (_param->_have_port_rob_ptr  )?out_EXECUTE_UNIT_IN_PACKET_ID[i][j]->read():0;
     377                  LABEL("  * packet           : %d",packet);           
     378                  uint32_t x;
     379                  uint32_t y;
     380
     381                  // find read_unit
     382                  bool find = false;
     383                  for (x=0; x<_param->_nb_read_unit; x++)
     384                    {
     385                      for (y=0; y<_param->_nb_read_unit_port[x]; y++)
     386                        if (packet == ((_param->_have_port_rob_ptr  )?request[x][y].front()._packet_id:0))
     387                          {
     388                            find = true;
     389                            break;
     390                          }
     391                      if (find)
     392                        break;
     393                    }
     394                 
     395                  LABEL("  * read_unit source : [%d][%d]",x,y);
     396                 
     397                  if (_param->_have_port_rob_ptr  )
     398                  TEST(Tcontext_t        ,out_EXECUTE_UNIT_IN_PACKET_ID            [i][j]->read(), request[x][y].front()._packet_id            );
     399
     400                  // Authorised link ? read_unit -> execute_unit
     401                  TEST(bool, _param->_table_routing[x][i][j], true);
     402                 
     403                  if (_param->_have_port_context_id)
     404                  TEST(Tcontext_t        ,out_EXECUTE_UNIT_IN_CONTEXT_ID           [i][j]->read(), request[x][y].front()._context_id           );
     405                  if (_param->_have_port_front_end_id)
     406                  TEST(Tcontext_t        ,out_EXECUTE_UNIT_IN_FRONT_END_ID         [i][j]->read(), request[x][y].front()._front_end_id         );
     407                  if (_param->_have_port_ooo_engine_id)
     408                  TEST(Tcontext_t        ,out_EXECUTE_UNIT_IN_OOO_ENGINE_ID        [i][j]->read(), request[x][y].front()._ooo_engine_id        );
     409                  TEST(Toperation_t      ,out_EXECUTE_UNIT_IN_OPERATION            [i][j]->read(), request[x][y].front()._operation            );
     410                  TEST(Ttype_t           ,out_EXECUTE_UNIT_IN_TYPE                 [i][j]->read(), request[x][y].front()._type                 );
     411                  TEST(Tlsq_ptr_t        ,out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE[i][j]->read(), request[x][y].front()._store_queue_ptr_write);
     412                  if (_param->_have_port_load_queue_ptr)
     413                  TEST(Tlsq_ptr_t        ,out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i][j]->read(), request[x][y].front()._load_queue_ptr_write );
     414                  TEST(Tcontrol_t        ,out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         [i][j]->read(), request[x][y].front()._has_immediat         );
     415                  TEST(Tgeneral_data_t   ,out_EXECUTE_UNIT_IN_IMMEDIAT             [i][j]->read(), request[x][y].front()._immediat             );
     416                  TEST(Tgeneral_data_t   ,out_EXECUTE_UNIT_IN_DATA_RA              [i][j]->read(), request[x][y].front()._data_ra              );
     417                  TEST(Tgeneral_data_t   ,out_EXECUTE_UNIT_IN_DATA_RB              [i][j]->read(), request[x][y].front()._data_rb              );
     418                  TEST(Tspecial_data_t   ,out_EXECUTE_UNIT_IN_DATA_RC              [i][j]->read(), request[x][y].front()._data_rc              );
     419                  TEST(Tcontrol_t        ,out_EXECUTE_UNIT_IN_WRITE_RD             [i][j]->read(), request[x][y].front()._write_rd             );
     420                  TEST(Tgeneral_address_t,out_EXECUTE_UNIT_IN_NUM_REG_RD           [i][j]->read(), request[x][y].front()._num_reg_rd           );
     421                  TEST(Tcontrol_t        ,out_EXECUTE_UNIT_IN_WRITE_RE             [i][j]->read(), request[x][y].front()._write_re             );
     422                  TEST(Tspecial_address_t,out_EXECUTE_UNIT_IN_NUM_REG_RE           [i][j]->read(), request[x][y].front()._num_reg_re           );
     423                 
     424                  request[x][y].pop_front();
     425                }
    400426          SC_START(1);
    401427        }
    402 
    403428    }
    404429
     
    414439  delete in_CLOCK;
    415440  delete in_NRESET;
    416  
    417   delete []  in_READ_UNIT_OUT_VAL                  ;
    418   delete [] out_READ_UNIT_OUT_ACK                  ;
    419   delete []  in_READ_UNIT_OUT_CONTEXT_ID           ;
    420   delete []  in_READ_UNIT_OUT_FRONT_END_ID         ;
    421   delete []  in_READ_UNIT_OUT_OOO_ENGINE_ID        ;
    422   delete []  in_READ_UNIT_OUT_PACKET_ID            ;
    423   delete []  in_READ_UNIT_OUT_OPERATION            ;
    424   delete []  in_READ_UNIT_OUT_TYPE                 ;
    425   delete []  in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE;
    426   delete []  in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ;
    427   delete []  in_READ_UNIT_OUT_HAS_IMMEDIAT         ;
    428   delete []  in_READ_UNIT_OUT_IMMEDIAT             ;
    429   delete []  in_READ_UNIT_OUT_DATA_RA              ;
    430   delete []  in_READ_UNIT_OUT_DATA_RB              ;
    431   delete []  in_READ_UNIT_OUT_DATA_RC              ;
    432   delete []  in_READ_UNIT_OUT_WRITE_RD             ;
    433   delete []  in_READ_UNIT_OUT_NUM_REG_RD           ;
    434   delete []  in_READ_UNIT_OUT_WRITE_RE             ;
    435   delete []  in_READ_UNIT_OUT_NUM_REG_RE           ;
    436 
    437   delete [] out_EXECUTE_UNIT_IN_VAL                  ;
    438   delete []  in_EXECUTE_UNIT_IN_ACK                  ;
    439   delete [] out_EXECUTE_UNIT_IN_CONTEXT_ID           ;
    440   delete [] out_EXECUTE_UNIT_IN_FRONT_END_ID         ;
    441   delete [] out_EXECUTE_UNIT_IN_OOO_ENGINE_ID        ;
    442   delete [] out_EXECUTE_UNIT_IN_PACKET_ID            ;
    443   delete [] out_EXECUTE_UNIT_IN_OPERATION            ;
    444   delete [] out_EXECUTE_UNIT_IN_TYPE                 ;
    445   delete [] out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE;
    446   delete [] out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ;
    447   delete [] out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ;
    448   delete [] out_EXECUTE_UNIT_IN_IMMEDIAT             ;
    449   delete [] out_EXECUTE_UNIT_IN_DATA_RA              ;
    450   delete [] out_EXECUTE_UNIT_IN_DATA_RB              ;
    451   delete [] out_EXECUTE_UNIT_IN_DATA_RC              ;
    452   delete [] out_EXECUTE_UNIT_IN_WRITE_RD             ;
    453   delete [] out_EXECUTE_UNIT_IN_NUM_REG_RD           ;
    454   delete [] out_EXECUTE_UNIT_IN_WRITE_RE             ;
    455   delete [] out_EXECUTE_UNIT_IN_NUM_REG_RE           ;
     441
     442  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_VAL                  ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     443  DELETE2_SC_SIGNAL(out_READ_UNIT_OUT_ACK                  ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     444  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_CONTEXT_ID           ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     445  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_FRONT_END_ID         ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     446  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_OOO_ENGINE_ID        ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     447  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_PACKET_ID            ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     448  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_OPERATION            ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     449  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_TYPE                 ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     450  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     451  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     452  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_HAS_IMMEDIAT         ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     453  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_IMMEDIAT             ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     454  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_DATA_RA              ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     455  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_DATA_RB              ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     456  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_DATA_RC              ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     457  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_WRITE_RD             ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     458  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_NUM_REG_RD           ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     459  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_WRITE_RE             ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     460  DELETE2_SC_SIGNAL( in_READ_UNIT_OUT_NUM_REG_RE           ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     461  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_VAL                  ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     462  DELETE2_SC_SIGNAL( in_EXECUTE_UNIT_IN_ACK                  ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     463  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_CONTEXT_ID           ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     464  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_FRONT_END_ID         ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     465  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID        ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     466  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_PACKET_ID            ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     467  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_OPERATION            ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     468  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_TYPE                 ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     469  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     470  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     471  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     472  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_IMMEDIAT             ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     473  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_DATA_RA              ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     474  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_DATA_RB              ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     475  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_DATA_RC              ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     476  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_WRITE_RD             ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     477  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_NUM_REG_RD           ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     478  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_WRITE_RE             ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
     479  DELETE2_SC_SIGNAL(out_EXECUTE_UNIT_IN_NUM_REG_RE           ,_param->_nb_execute_unit,_param->_nb_execute_unit_port[it1]);
    456480
    457481#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/include/Parameters.h

    r81 r88  
    2626  {
    2727    //-----[ fields ]------------------------------------------------------------
    28   public : const uint32_t    _nb_read_unit           ;
    29   public : const uint32_t    _nb_execute_unit        ;
    30   public : const uint32_t    _nb_context             ;
    31   public : const uint32_t    _nb_front_end           ;
    32   public : const uint32_t    _nb_ooo_engine          ;
    33   public : const uint32_t    _nb_packet              ;
    34   public : const uint32_t    _size_general_data      ;
    35   public : const uint32_t    _size_special_data      ;
    36   public : const uint32_t    _nb_general_register    ;
    37   public : const uint32_t    _nb_special_register    ;
    38   public : const uint32_t    _size_store_queue       ;
    39   public : const uint32_t    _size_load_queue        ;
    40   public : const Tpriority_t _priority               ;
    41   public :       bool     ** _table_routing          ; //[nb_read_unit][nb_execute_unit]
    42   public :       bool     ** _table_execute_type     ; //[nb_execute_unit][nb_type]
    43   public :       bool     ** _table_execute_thread   ; //[nb_execute_unit][nb_thread]
     28  public : uint32_t    _nb_read_unit           ;
     29  public : uint32_t  * _nb_read_unit_port      ;//[nb_read_unit]
     30  public : uint32_t    _nb_execute_unit        ;
     31  public : uint32_t  * _nb_execute_unit_port   ;//[nb_execute_unit]
     32  public : uint32_t    _nb_context             ;
     33  public : uint32_t    _nb_front_end           ;
     34  public : uint32_t    _nb_ooo_engine          ;
     35  public : uint32_t    _nb_packet              ;
     36//public : uint32_t    _size_general_data      ;
     37//public : uint32_t    _size_special_data      ;
     38  public : uint32_t    _nb_general_register    ;
     39  public : uint32_t    _nb_special_register    ;
     40//public : uint32_t    _size_store_queue       ;
     41//public : uint32_t    _size_load_queue        ;
     42  public : Tpriority_t _priority               ;
     43  public : bool    *** _table_routing          ; //[nb_read_unit][nb_execute_unit][nb_execute_unit_port]
     44  public : bool     ** _table_execute_type     ; //[nb_execute_unit][nb_type]
     45  public : bool     ** _table_execute_thread   ; //[nb_execute_unit][nb_thread]
    4446
    45   public : const uint32_t    _size_context_id        ;
    46   public : const uint32_t    _size_front_end_id      ;
    47   public : const uint32_t    _size_ooo_engine_id     ;
    48   public : const uint32_t    _size_packet_id         ;
    49   public : const uint32_t    _size_general_register  ;
    50   public : const uint32_t    _size_special_register  ;
     47  public : uint32_t    _max_nb_read_unit_port  ;
     48  public : uint32_t    _max_nb_execute_unit_port;
     49//public : uint32_t    _size_context_id        ;
     50//public : uint32_t    _size_front_end_id      ;
     51//public : uint32_t    _size_ooo_engine_id     ;
     52//public : uint32_t    _size_packet_id         ;
     53//public : uint32_t    _size_general_register  ;
     54//public : uint32_t    _size_special_register  ;
    5155
    52   public : const bool        _have_port_context_id   ;
    53   public : const bool        _have_port_front_end_id ;
    54   public : const bool        _have_port_ooo_engine_id;
    55   public : const bool        _have_port_packet_id    ;
    56   public : const bool        _have_port_load_queue_ptr;
     56//public : bool        _have_port_context_id   ;
     57//public : bool        _have_port_front_end_id ;
     58//public : bool        _have_port_ooo_engine_id;
     59//public : bool        _have_port_packet_id    ;
     60//public : bool        _have_port_load_queue_ptr;
    5761
    58   public : const uint32_t    _nb_thread              ;
    59   public :       uint32_t    _nb_load_store_unit     ;
    60   public :       uint32_t    _nb_functionnal_unit    ;
     62  public : uint32_t    _nb_thread              ;
     63  public : uint32_t    _nb_load_store_unit     ;
     64  public : uint32_t    _nb_functionnal_unit    ;
    6165
    6266    //-----[ methods ]-----------------------------------------------------------
    6367  public : Parameters  (uint32_t    nb_read_unit           ,
     68                        uint32_t  * nb_read_unit_port      ,
    6469                        uint32_t    nb_execute_unit        ,
     70                        uint32_t  * nb_execute_unit_port   ,
    6571                        uint32_t    nb_context             ,
    6672                        uint32_t    nb_front_end           ,
     
    7480                        uint32_t    size_load_queue        ,
    7581                        Tpriority_t priority               ,
    76                         bool     ** table_routing          ,
     82                        bool    *** table_routing          ,
    7783                        bool     ** table_execute_type     ,
    78                         bool     ** table_execute_thread   );
    79   public : Parameters  (Parameters & param) ;
     84                        bool     ** table_execute_thread   ,
     85                        bool        is_toplevel=false      );
     86//   public : Parameters  (Parameters & param) ;
    8087  public : ~Parameters () ;
     88
     89  public :        void            copy       (void);
    8190
    8291  public :        Parameters_test msg_error  (void);
  • 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

    r82 r88  
    3939namespace read_unit_to_execution_unit {
    4040
     41  class destination_t
     42  {
     43  public : uint32_t grp;
     44  public : uint32_t elt;
     45   
     46  public : destination_t (uint32_t grp, uint32_t elt)
     47    {
     48      this->grp = grp;
     49      this->elt = elt;
     50    }
     51  };
    4152
    4253  class Read_unit_to_Execution_unit
     
    6576
    6677    // ~~~~~[ Interface "read_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    67   public    : SC_IN (Tcontrol_t        )   **  in_READ_UNIT_OUT_VAL                  ;
    68   public    : SC_OUT(Tcontrol_t        )   ** out_READ_UNIT_OUT_ACK                  ;
    69   public    : SC_IN (Tcontext_t        )   **  in_READ_UNIT_OUT_CONTEXT_ID           ;
    70   public    : SC_IN (Tcontext_t        )   **  in_READ_UNIT_OUT_FRONT_END_ID         ;
    71   public    : SC_IN (Tcontext_t        )   **  in_READ_UNIT_OUT_OOO_ENGINE_ID        ;
    72   public    : SC_IN (Tpacket_t         )   **  in_READ_UNIT_OUT_PACKET_ID            ;
    73   public    : SC_IN (Toperation_t      )   **  in_READ_UNIT_OUT_OPERATION            ;
    74   public    : SC_IN (Ttype_t           )   **  in_READ_UNIT_OUT_TYPE                 ;
    75   public    : SC_IN (Tlsq_ptr_t        )   **  in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE;
    76   public    : SC_IN (Tlsq_ptr_t        )   **  in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ;
    77   public    : SC_IN (Tcontrol_t        )   **  in_READ_UNIT_OUT_HAS_IMMEDIAT         ;
    78   public    : SC_IN (Tgeneral_data_t   )   **  in_READ_UNIT_OUT_IMMEDIAT             ;
    79   public    : SC_IN (Tgeneral_data_t   )   **  in_READ_UNIT_OUT_DATA_RA              ;
    80   public    : SC_IN (Tgeneral_data_t   )   **  in_READ_UNIT_OUT_DATA_RB              ;
    81   public    : SC_IN (Tspecial_data_t   )   **  in_READ_UNIT_OUT_DATA_RC              ;
    82   public    : SC_IN (Tcontrol_t        )   **  in_READ_UNIT_OUT_WRITE_RD             ;
    83   public    : SC_IN (Tgeneral_address_t)   **  in_READ_UNIT_OUT_NUM_REG_RD           ;
    84   public    : SC_IN (Tcontrol_t        )   **  in_READ_UNIT_OUT_WRITE_RE             ;
    85   public    : SC_IN (Tspecial_address_t)   **  in_READ_UNIT_OUT_NUM_REG_RE           ;
     78  public    : SC_IN (Tcontrol_t        )  ***  in_READ_UNIT_OUT_VAL                    ;//[nb_read_unit][nb_read_unit_port]
     79  public    : SC_OUT(Tcontrol_t        )  *** out_READ_UNIT_OUT_ACK                    ;//[nb_read_unit][nb_read_unit_port]
     80  public    : SC_IN (Tcontext_t        )  ***  in_READ_UNIT_OUT_CONTEXT_ID             ;//[nb_read_unit][nb_read_unit_port]
     81  public    : SC_IN (Tcontext_t        )  ***  in_READ_UNIT_OUT_FRONT_END_ID           ;//[nb_read_unit][nb_read_unit_port]
     82  public    : SC_IN (Tcontext_t        )  ***  in_READ_UNIT_OUT_OOO_ENGINE_ID          ;//[nb_read_unit][nb_read_unit_port]
     83  public    : SC_IN (Tpacket_t         )  ***  in_READ_UNIT_OUT_PACKET_ID              ;//[nb_read_unit][nb_read_unit_port]
     84  public    : SC_IN (Toperation_t      )  ***  in_READ_UNIT_OUT_OPERATION              ;//[nb_read_unit][nb_read_unit_port]
     85  public    : SC_IN (Ttype_t           )  ***  in_READ_UNIT_OUT_TYPE                   ;//[nb_read_unit][nb_read_unit_port]
     86  public    : SC_IN (Tlsq_ptr_t        )  ***  in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE  ;//[nb_read_unit][nb_read_unit_port]
     87  public    : SC_IN (Tlsq_ptr_t        )  ***  in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE   ;//[nb_read_unit][nb_read_unit_port]
     88  public    : SC_IN (Tcontrol_t        )  ***  in_READ_UNIT_OUT_HAS_IMMEDIAT           ;//[nb_read_unit][nb_read_unit_port]
     89  public    : SC_IN (Tgeneral_data_t   )  ***  in_READ_UNIT_OUT_IMMEDIAT               ;//[nb_read_unit][nb_read_unit_port]
     90  public    : SC_IN (Tgeneral_data_t   )  ***  in_READ_UNIT_OUT_DATA_RA                ;//[nb_read_unit][nb_read_unit_port]
     91  public    : SC_IN (Tgeneral_data_t   )  ***  in_READ_UNIT_OUT_DATA_RB                ;//[nb_read_unit][nb_read_unit_port]
     92  public    : SC_IN (Tspecial_data_t   )  ***  in_READ_UNIT_OUT_DATA_RC                ;//[nb_read_unit][nb_read_unit_port]
     93  public    : SC_IN (Tcontrol_t        )  ***  in_READ_UNIT_OUT_WRITE_RD               ;//[nb_read_unit][nb_read_unit_port]
     94  public    : SC_IN (Tgeneral_address_t)  ***  in_READ_UNIT_OUT_NUM_REG_RD             ;//[nb_read_unit][nb_read_unit_port]
     95  public    : SC_IN (Tcontrol_t        )  ***  in_READ_UNIT_OUT_WRITE_RE               ;//[nb_read_unit][nb_read_unit_port]
     96  public    : SC_IN (Tspecial_address_t)  ***  in_READ_UNIT_OUT_NUM_REG_RE             ;//[nb_read_unit][nb_read_unit_port]
    8697
    8798    // ~~~~~[ Interface "execute_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    88   public    : SC_OUT(Tcontrol_t        )   ** out_EXECUTE_UNIT_IN_VAL                  ;
    89   public    : SC_IN (Tcontrol_t        )   **  in_EXECUTE_UNIT_IN_ACK                  ;
    90   public    : SC_OUT(Tcontext_t        )   ** out_EXECUTE_UNIT_IN_CONTEXT_ID           ;
    91   public    : SC_OUT(Tcontext_t        )   ** out_EXECUTE_UNIT_IN_FRONT_END_ID         ;
    92   public    : SC_OUT(Tcontext_t        )   ** out_EXECUTE_UNIT_IN_OOO_ENGINE_ID        ;
    93   public    : SC_OUT(Tpacket_t         )   ** out_EXECUTE_UNIT_IN_PACKET_ID            ;
    94   public    : SC_OUT(Toperation_t      )   ** out_EXECUTE_UNIT_IN_OPERATION            ;
    95   public    : SC_OUT(Ttype_t           )   ** out_EXECUTE_UNIT_IN_TYPE                 ;
    96   public    : SC_OUT(Tlsq_ptr_t        )   ** out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE;
    97   public    : SC_OUT(Tlsq_ptr_t        )   ** out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ;
    98   public    : SC_OUT(Tcontrol_t        )   ** out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ;
    99   public    : SC_OUT(Tgeneral_data_t   )   ** out_EXECUTE_UNIT_IN_IMMEDIAT             ;
    100   public    : SC_OUT(Tgeneral_data_t   )   ** out_EXECUTE_UNIT_IN_DATA_RA              ;
    101   public    : SC_OUT(Tgeneral_data_t   )   ** out_EXECUTE_UNIT_IN_DATA_RB              ;
    102   public    : SC_OUT(Tspecial_data_t   )   ** out_EXECUTE_UNIT_IN_DATA_RC              ;
    103   public    : SC_OUT(Tcontrol_t        )   ** out_EXECUTE_UNIT_IN_WRITE_RD             ;
    104   public    : SC_OUT(Tgeneral_address_t)   ** out_EXECUTE_UNIT_IN_NUM_REG_RD           ;
    105   public    : SC_OUT(Tcontrol_t        )   ** out_EXECUTE_UNIT_IN_WRITE_RE             ;
    106   public    : SC_OUT(Tspecial_address_t)   ** out_EXECUTE_UNIT_IN_NUM_REG_RE           ;
     99  public    : SC_OUT(Tcontrol_t        )  *** out_EXECUTE_UNIT_IN_VAL                  ;//[nb_execute_unit][nb_execute_unit_port]
     100  public    : SC_IN (Tcontrol_t        )  ***  in_EXECUTE_UNIT_IN_ACK                  ;//[nb_execute_unit][nb_execute_unit_port]
     101  public    : SC_OUT(Tcontext_t        )  *** out_EXECUTE_UNIT_IN_CONTEXT_ID           ;//[nb_execute_unit][nb_execute_unit_port]
     102  public    : SC_OUT(Tcontext_t        )  *** out_EXECUTE_UNIT_IN_FRONT_END_ID         ;//[nb_execute_unit][nb_execute_unit_port]
     103  public    : SC_OUT(Tcontext_t        )  *** out_EXECUTE_UNIT_IN_OOO_ENGINE_ID        ;//[nb_execute_unit][nb_execute_unit_port]
     104  public    : SC_OUT(Tpacket_t         )  *** out_EXECUTE_UNIT_IN_PACKET_ID            ;//[nb_execute_unit][nb_execute_unit_port]
     105  public    : SC_OUT(Toperation_t      )  *** out_EXECUTE_UNIT_IN_OPERATION            ;//[nb_execute_unit][nb_execute_unit_port]
     106  public    : SC_OUT(Ttype_t           )  *** out_EXECUTE_UNIT_IN_TYPE                 ;//[nb_execute_unit][nb_execute_unit_port]
     107  public    : SC_OUT(Tlsq_ptr_t        )  *** out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE;//[nb_execute_unit][nb_execute_unit_port]
     108  public    : SC_OUT(Tlsq_ptr_t        )  *** out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ;//[nb_execute_unit][nb_execute_unit_port]
     109  public    : SC_OUT(Tcontrol_t        )  *** out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ;//[nb_execute_unit][nb_execute_unit_port]
     110  public    : SC_OUT(Tgeneral_data_t   )  *** out_EXECUTE_UNIT_IN_IMMEDIAT             ;//[nb_execute_unit][nb_execute_unit_port]
     111  public    : SC_OUT(Tgeneral_data_t   )  *** out_EXECUTE_UNIT_IN_DATA_RA              ;//[nb_execute_unit][nb_execute_unit_port]
     112  public    : SC_OUT(Tgeneral_data_t   )  *** out_EXECUTE_UNIT_IN_DATA_RB              ;//[nb_execute_unit][nb_execute_unit_port]
     113  public    : SC_OUT(Tspecial_data_t   )  *** out_EXECUTE_UNIT_IN_DATA_RC              ;//[nb_execute_unit][nb_execute_unit_port]
     114  public    : SC_OUT(Tcontrol_t        )  *** out_EXECUTE_UNIT_IN_WRITE_RD             ;//[nb_execute_unit][nb_execute_unit_port]
     115  public    : SC_OUT(Tgeneral_address_t)  *** out_EXECUTE_UNIT_IN_NUM_REG_RD           ;//[nb_execute_unit][nb_execute_unit_port]
     116  public    : SC_OUT(Tcontrol_t        )  *** out_EXECUTE_UNIT_IN_WRITE_RE             ;//[nb_execute_unit][nb_execute_unit_port]
     117  public    : SC_OUT(Tspecial_address_t)  *** out_EXECUTE_UNIT_IN_NUM_REG_RE           ;//[nb_execute_unit][nb_execute_unit_port]
    107118
    108119    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     
    111122
    112123    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    113   private   : std::list<uint32_t> *** _destination; // [nb_read_unit][nb_thread][nb_type];
     124  private   : std::list<destination_t> *** _destination; // [nb_read_unit][nb_thread][nb_type];
    114125#endif
    115126
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Parameters.cpp

    r81 r88  
    77
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/include/Parameters.h"
     9#include "Common/include/Max.h"
    910
    1011namespace morpheo {
     
    2021#define FUNCTION "Read_unit_to_Execution_unit::Parameters"
    2122  Parameters::Parameters (uint32_t    nb_read_unit           ,
     23                          uint32_t  * nb_read_unit_port      ,
    2224                          uint32_t    nb_execute_unit        ,
     25                          uint32_t  * nb_execute_unit_port   ,
    2326                          uint32_t    nb_context             ,
    2427                          uint32_t    nb_front_end           ,
     
    3235                          uint32_t    size_load_queue        ,
    3336                          Tpriority_t priority               ,
    34                           bool     ** table_routing          ,
     37                          bool    *** table_routing          ,
    3538                          bool     ** table_execute_type     ,
    36                           bool     ** table_execute_thread   ):
    37     _nb_read_unit            (nb_read_unit       ),
    38     _nb_execute_unit         (nb_execute_unit    ),
    39     _nb_context              (nb_context         ),
    40     _nb_front_end            (nb_front_end       ),
    41     _nb_ooo_engine           (nb_ooo_engine      ),
    42     _nb_packet               (nb_packet          ),
    43     _size_general_data       (size_general_data  ),
    44     _size_special_data       (size_special_data  ),
    45     _nb_general_register     (nb_general_register),
    46     _nb_special_register     (nb_special_register),
    47     _size_store_queue        (size_store_queue   ),
    48     _size_load_queue         (size_load_queue    ),
    49     _priority                (priority           ),
    50 
    51     _size_context_id         (log2(nb_context         )),
    52     _size_front_end_id       (log2(nb_front_end       )),
    53     _size_ooo_engine_id      (log2(nb_ooo_engine      )),
    54     _size_packet_id          (log2(nb_packet          )),
    55     _size_general_register   (log2(nb_general_register)),
    56     _size_special_register   (log2(nb_special_register)),
    57    
    58     _have_port_context_id    (_size_context_id    > 0),
    59     _have_port_front_end_id  (_size_front_end_id  > 0),
    60     _have_port_ooo_engine_id (_size_ooo_engine_id > 0),
    61     _have_port_packet_id     (_size_packet_id     > 0),
    62     _have_port_load_queue_ptr(_size_load_queue    > 1),
    63 
    64     _nb_thread               (get_nb_thread (nb_context, nb_front_end, nb_ooo_engine))
     39                          bool     ** table_execute_thread   ,
     40                          bool        is_toplevel            )
    6541  {
    6642    log_printf(FUNC,Read_unit_to_Execution_unit,FUNCTION,"Begin");
    6743
    68     _table_routing        = table_routing       ;
    69     _table_execute_type   = table_execute_type  ;
    70     _table_execute_thread = table_execute_thread;
     44    _nb_read_unit            = nb_read_unit        ;
     45    _nb_read_unit_port       = nb_read_unit_port   ;   
     46    _nb_execute_unit         = nb_execute_unit     ;
     47    _nb_execute_unit_port    = nb_execute_unit_port;
     48    _nb_context              = nb_context          ;
     49    _nb_front_end            = nb_front_end        ;
     50    _nb_ooo_engine           = nb_ooo_engine       ;
     51    _nb_packet               = nb_packet           ;
     52    _nb_general_register     = nb_general_register ;
     53    _nb_special_register     = nb_special_register ;
     54    _priority                = priority            ;
     55    _table_routing           = table_routing       ;
     56    _table_execute_type      = table_execute_type  ;
     57    _table_execute_thread    = table_execute_thread;
    7158
    72     _nb_load_store_unit   = 0;
     59    _max_nb_read_unit_port   = max<uint32_t>(_nb_read_unit_port, _nb_read_unit);
     60    _max_nb_execute_unit_port= max<uint32_t>(_nb_execute_unit_port, _nb_execute_unit);
     61
     62    _nb_thread               = get_nb_thread (nb_context, nb_front_end, nb_ooo_engine);
     63    _nb_load_store_unit      = 0;
    7364
    7465    for (uint32_t i=0; i<nb_execute_unit; i++)
     
    8273    test();
    8374
     75    if (is_toplevel)
     76      {
     77        _size_context_id         = log2(nb_context         );
     78        _size_front_end_id       = log2(nb_front_end       );
     79        _size_ooo_engine_id      = log2(nb_ooo_engine      );
     80        _size_rob_ptr            = log2(nb_packet          );
     81        _size_general_register   = log2(nb_general_register);
     82        _size_special_register   = log2(nb_special_register);
     83        _size_general_data       = size_general_data   ;
     84        _size_special_data       = size_special_data   ;
     85        _size_store_queue_ptr    = log2(size_store_queue   );
     86        _size_load_queue_ptr     = log2(size_load_queue    );
     87       
     88        _have_port_context_id    = _size_context_id    > 0;
     89        _have_port_front_end_id  = _size_front_end_id  > 0;
     90        _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
     91        _have_port_rob_ptr       = _size_rob_ptr       > 0;
     92        _have_port_load_queue_ptr= _size_load_queue_ptr> 0;
     93       
     94        copy();
     95      }
     96
    8497    log_printf(FUNC,Read_unit_to_Execution_unit,FUNCTION,"End");
    8598  };
    8699 
     100// #undef  FUNCTION
     101// #define FUNCTION "Read_unit_to_Execution_unit::Parameters (copy)"
     102//   Parameters::Parameters (Parameters & param)
     103//   {
     104//     log_printf(FUNC,Read_unit_to_Execution_unit,FUNCTION,"Begin");
     105
     106//     test();
     107//     log_printf(FUNC,Read_unit_to_Execution_unit,FUNCTION,"End");
     108//   };
     109
    87110#undef  FUNCTION
    88 #define FUNCTION "Read_unit_to_Execution_unit::Parameters (copy)"
    89   Parameters::Parameters (Parameters & param):
    90     _nb_read_unit            (param._nb_read_unit           ),
    91     _nb_execute_unit         (param._nb_execute_unit        ),
    92     _nb_context              (param._nb_context             ),
    93     _nb_front_end            (param._nb_front_end           ),
    94     _nb_ooo_engine           (param._nb_ooo_engine          ),
    95     _nb_packet               (param._nb_packet              ),
    96     _size_general_data       (param._size_general_data      ),
    97     _size_special_data       (param._size_special_data      ),
    98     _nb_general_register     (param._nb_general_register    ),
    99     _nb_special_register     (param._nb_special_register    ),
    100     _size_store_queue        (param._size_store_queue       ),
    101     _size_load_queue         (param._size_load_queue        ),
    102     _priority                (param._priority               ),
    103 
    104     _size_context_id         (param._size_context_id        ),
    105     _size_front_end_id       (param._size_front_end_id      ),
    106     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
    107     _size_packet_id          (param._size_packet_id         ),
    108     _size_general_register   (param._size_general_register  ),
    109     _size_special_register   (param._size_special_register  ),
    110 
    111     _have_port_context_id    (param._have_port_context_id   ),
    112     _have_port_front_end_id  (param._have_port_front_end_id ),
    113     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
    114     _have_port_packet_id     (param._have_port_packet_id    ),
    115     _have_port_load_queue_ptr(param._have_port_load_queue_ptr),
    116 
    117     _nb_thread               (param._nb_thread              )
     111#define FUNCTION "Read_unit_to_Execution_unit::~Parameters"
     112  Parameters::~Parameters ()
    118113  {
    119114    log_printf(FUNC,Read_unit_to_Execution_unit,FUNCTION,"Begin");
    120 
    121     _table_routing        = param._table_routing       ;
    122     _table_execute_type   = param._table_execute_type  ;
    123     _table_execute_thread = param._table_execute_thread;
    124     _nb_load_store_unit   = param._nb_load_store_unit  ;
    125     _nb_functionnal_unit  = param._nb_functionnal_unit ;
    126 
    127     test();
    128115    log_printf(FUNC,Read_unit_to_Execution_unit,FUNCTION,"End");
    129116  };
    130117
    131118#undef  FUNCTION
    132 #define FUNCTION "Read_unit_to_Execution_unit::~Parameters"
    133   Parameters::~Parameters ()
     119#define FUNCTION "Read_unit_to_Execution_unit::copy"
     120  void Parameters::copy (void)
    134121  {
    135122    log_printf(FUNC,Read_unit_to_Execution_unit,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Parameters_msg_error.cpp

    r81 r88  
    3333    // TYPE_MOVE    |     X     |            |            | cmov is optionnal
    3434    // TYPE_TEST    |     X     |            |            |
    35     // TYPE_MUL_DIV |     X     |            |            | div is optionnal
     35    // TYPE_MUL     |     X     |            |            |
     36    // TYPE_DIV     |     X     |     X      |            |
    3637    // TYPE_EXTEND  |     X     |     X      |            |
    3738    // TYPE_FIND    |     X     |     X      |            |
     
    5859    type_valid     [TYPE_MOVE   ] = true;
    5960    type_valid     [TYPE_TEST   ] = true;
    60     type_valid     [TYPE_MUL_DIV] = true;
     61    type_valid     [TYPE_MUL    ] = true;
     62    type_valid     [TYPE_DIV    ] = true;
    6163    type_valid     [TYPE_EXTEND ] = true;
    6264    type_valid     [TYPE_FIND   ] = true;
     
    7072    type_uniq      [TYPE_MEMORY ] = true;
    7173
     74    type_optionnal [TYPE_DIV    ] = true;
    7275    type_optionnal [TYPE_EXTEND ] = true;
    7376    type_optionnal [TYPE_FIND   ] = true;
     
    8588        if (_table_execute_thread [i][j] == true)
    8689          // this execute_unit execute this thread !
    87           for (Ttype_t k=0; k<=_nb_type; k++)
    88             if (_table_execute_type[i][k] == true)
    89               {
    90                 // Test uniq type
    91                 if (type_present [j][k] and type_uniq[k])
    92                   test.error("The execute_unit '"+toString(i)+"' can execute operation of type '"+toString_type(k)+"' at the thread '"+toString(j)+"'. But an another execute_unit can be execute the same type for the same thread. And the type must be uniq !.");
    93                
    94                 type_present [j][k] = true;
    95               }
     90          for (Ttype_t k=0; k<_nb_type; k++)
     91            if (_table_execute_type[i][k] == true)
     92              {
     93//                 test.information(toString(_("Execute_unit [%d], Thread [%d], Type [%d], type_valid %d, type_present %d, type_uniq %d\n"),i,j,k,type_valid[k],type_present[j][k],type_uniq[k]));
     94               
     95                // Test uniq type
     96                if (type_present [j][k] and type_uniq[k])
     97                  test.error(toString(_("The execute_unit '%d' can execute operation of type '%s' at the thread '%d'. But an another execute_unit can be execute the same type for the same thread. And the type must be single !.\n"),i,toString_type(k).c_str(),j));
     98               
     99                type_present [j][k] = true;
     100              }
     101
     102    for (Ttype_t j=0; j<_nb_type; j++)
     103      if (not type_valid [j])
     104        for (uint32_t i=0; i<_nb_thread; i++)
     105          if (type_present [i][j])
     106            test.error(toString(_("The thread '%d' can execute the type's operation '%s' but this type is invalid.\n"),i,toString_type(j).c_str()));
    96107
    97108    for (Ttype_t j=0; j<_nb_type; j++)
     
    99110        for (uint32_t i=0; i<_nb_thread; i++)
    100111          if (not type_present [i][j])
    101             test.error("The thread '"+toString(i)+"' can't access at the execute_unit to execute the type's operation '"+toString_type(j)+"' (and this type is not optionnal !).");
     112            test.error(toString(_("The thread '%d' can't access at the execute_unit to execute the type's operation '%s' (and this type is not optional !).\n"),i,toString_type(j).c_str()));
    102113           
    103114    // Test all excluve type
    104115    for (uint32_t i=0; i<_nb_execute_unit; i++)
    105       for (Ttype_t j=0; j<=_nb_type; j++)
     116      for (Ttype_t j=0; j<_nb_type; j++)
    106117        if (type_exclusive [j] and _table_execute_type[i][j])
    107           for (Ttype_t k=0; k<=_nb_type; k++)
     118          for (Ttype_t k=0; k<_nb_type; k++)
    108119            if ((j != k) and (_table_execute_type[i][k] == true))
    109120              {
    110                 test.error("The execute_unit ["+toString(i)+"] implement the type '"+toString_type(j)+"', and this type is exclusive with all others type.");
     121                test.error(toString(_("The execute_unit [%d] implement the type '%s', and this type is exclusive with all others type.\n"),i,toString_type(j).c_str()));
    111122                break;
    112123              }
     
    120131
    121132        if (j == _nb_thread)
    122           test.error("The execute_unit ["+toString(i)+"] have none source's thread.");
     133          test.error(toString(_("The execute_unit [%d] have none source's thread.\n"),i));
    123134      }   
    124135
    125136    if ( (_priority != PRIORITY_STATIC     ) and
    126137         (_priority != PRIORITY_ROUND_ROBIN))
    127       test.error("Unsupported priority scheme. It must be Static or Round Robin.");
     138      test.error(_("Unsupported priority scheme. It must be Static or Round Robin.\n"));
    128139       
    129140    log_printf(FUNC,Read_unit_to_Execution_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Parameters_print.cpp

    r81 r88  
    3737    xml.singleton_begin("nb_general_register"); xml.attribut("value",toString(_nb_general_register)); xml.singleton_end();
    3838    xml.singleton_begin("nb_special_register"); xml.attribut("value",toString(_nb_special_register)); xml.singleton_end();
    39     xml.singleton_begin("size_store_queue   "); xml.attribut("value",toString(_size_store_queue   )); xml.singleton_end();
    40     xml.singleton_begin("size_load_queue    "); xml.attribut("value",toString(_size_load_queue    )); xml.singleton_end();
     39//  xml.singleton_begin("size_store_queue   "); xml.attribut("value",toString(_size_store_queue   )); xml.singleton_end();
     40//  xml.singleton_begin("size_load_queue    "); xml.attribut("value",toString(_size_load_queue    )); xml.singleton_end();
    4141    xml.singleton_begin("priority           "); xml.attribut("value",toString(_priority           )); xml.singleton_end();
    4242    xml.balise_close();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Read_unit_to_Execution_unit.cpp

    r81 r88  
    3838    log_printf(FUNC,Read_unit_to_Execution_unit,FUNCTION,"Begin");
    3939
     40#if DEBUG_Read_unit_to_Execution_unit == true
     41    log_printf(INFO,Read_unit_to_Execution_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif   
     45
    4046    log_printf(INFO,Read_unit_to_Execution_unit,FUNCTION,"Allocation");
    4147
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    5157        log_printf(INFO,Read_unit_to_Execution_unit,FUNCTION,"Allocation of statistics");
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
     
    6672
    6773#ifdef SYSTEMC
    68     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    6975      {
    7076        log_printf(INFO,Read_unit_to_Execution_unit,FUNCTION,"Method - transition");
     
    8591
    8692        for (uint32_t i=0; i<_param->_nb_read_unit; i++)
    87           {
    88             sensitive << (*(in_READ_UNIT_OUT_VAL                   [i]))
    89                       << (*(in_READ_UNIT_OUT_OPERATION             [i]))
    90                       << (*(in_READ_UNIT_OUT_TYPE                  [i]))
    91                       << (*(in_READ_UNIT_OUT_HAS_IMMEDIAT          [i]))
    92                       << (*(in_READ_UNIT_OUT_IMMEDIAT              [i]))
    93                       << (*(in_READ_UNIT_OUT_DATA_RA               [i]))
    94                       << (*(in_READ_UNIT_OUT_DATA_RB               [i]))
    95                       << (*(in_READ_UNIT_OUT_DATA_RC               [i]))
    96                       << (*(in_READ_UNIT_OUT_WRITE_RD              [i]))
    97                       << (*(in_READ_UNIT_OUT_NUM_REG_RD            [i]))
    98                       << (*(in_READ_UNIT_OUT_WRITE_RE              [i]))
    99                       << (*(in_READ_UNIT_OUT_NUM_REG_RE            [i]))
    100                       << (*(in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE [i]));
    101 
    102             if (_param->_have_port_load_queue_ptr)
    103             sensitive  << (*(in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE  [i]));
    104             if (_param->_have_port_context_id)
    105             sensitive  << (*(in_READ_UNIT_OUT_CONTEXT_ID            [i]));
    106             if (_param->_have_port_front_end_id)
    107             sensitive  << (*(in_READ_UNIT_OUT_FRONT_END_ID          [i]));
    108             if (_param->_have_port_ooo_engine_id)
    109             sensitive  << (*(in_READ_UNIT_OUT_OOO_ENGINE_ID         [i]));
    110             if (_param->_have_port_packet_id)
    111             sensitive  << (*(in_READ_UNIT_OUT_PACKET_ID             [i]));
    112           }
     93          for (uint32_t j=0; j<_param->_nb_read_unit_port[i]; j++)
     94            {
     95              sensitive << (*(in_READ_UNIT_OUT_VAL                   [i][j]))
     96                        << (*(in_READ_UNIT_OUT_OPERATION             [i][j]))
     97                        << (*(in_READ_UNIT_OUT_TYPE                  [i][j]))
     98                        << (*(in_READ_UNIT_OUT_HAS_IMMEDIAT          [i][j]))
     99                        << (*(in_READ_UNIT_OUT_IMMEDIAT              [i][j]))
     100                        << (*(in_READ_UNIT_OUT_DATA_RA               [i][j]))
     101                        << (*(in_READ_UNIT_OUT_DATA_RB               [i][j]))
     102                        << (*(in_READ_UNIT_OUT_DATA_RC               [i][j]))
     103                        << (*(in_READ_UNIT_OUT_WRITE_RD              [i][j]))
     104                        << (*(in_READ_UNIT_OUT_NUM_REG_RD            [i][j]))
     105                        << (*(in_READ_UNIT_OUT_WRITE_RE              [i][j]))
     106                        << (*(in_READ_UNIT_OUT_NUM_REG_RE            [i][j]))
     107                        << (*(in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE [i][j]));
     108
     109              if (_param->_have_port_load_queue_ptr)
     110              sensitive  << (*(in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE  [i][j]));
     111              if (_param->_have_port_context_id)
     112              sensitive  << (*(in_READ_UNIT_OUT_CONTEXT_ID            [i][j]));
     113              if (_param->_have_port_front_end_id)
     114              sensitive  << (*(in_READ_UNIT_OUT_FRONT_END_ID          [i][j]));
     115              if (_param->_have_port_ooo_engine_id)
     116              sensitive  << (*(in_READ_UNIT_OUT_OOO_ENGINE_ID         [i][j]));
     117              if (_param->_have_port_rob_ptr  )
     118              sensitive  << (*(in_READ_UNIT_OUT_PACKET_ID             [i][j]));
     119            }
    113120       
    114121        for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    115           sensitive << (*(in_EXECUTE_UNIT_IN_ACK                 [i]));
     122          for (uint32_t j=0; j<_param->_nb_execute_unit_port[i]; j++)
     123            sensitive << (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
    116124       
    117125# ifdef SYSTEMCASS_SPECIFIC
    118126        // List dependency information
    119127        for (uint32_t i=0; i<_param->_nb_read_unit; i++)
     128          for (uint32_t j=0; j<_param->_nb_read_unit_port[i]; j++)
    120129          {
    121             (*(out_READ_UNIT_OUT_ACK [i])) (*(in_READ_UNIT_OUT_VAL           [i]));
    122             (*(out_READ_UNIT_OUT_ACK [i])) (*(in_READ_UNIT_OUT_TYPE          [i]));
     130            (*(out_READ_UNIT_OUT_ACK [i][j])) (*(in_READ_UNIT_OUT_VAL           [i][j]));
     131            (*(out_READ_UNIT_OUT_ACK [i][j])) (*(in_READ_UNIT_OUT_TYPE          [i][j]));
    123132            if (_param->_have_port_context_id)
    124             (*(out_READ_UNIT_OUT_ACK [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [i]));
     133            (*(out_READ_UNIT_OUT_ACK [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [i][j]));
    125134            if (_param->_have_port_front_end_id)
    126             (*(out_READ_UNIT_OUT_ACK [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [i]));
     135            (*(out_READ_UNIT_OUT_ACK [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [i][j]));
    127136            if (_param->_have_port_ooo_engine_id)
    128             (*(out_READ_UNIT_OUT_ACK [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [i]));
    129 
    130             for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    131               (*(out_READ_UNIT_OUT_ACK [i])) (*(in_EXECUTE_UNIT_IN_ACK [j]));
     137            (*(out_READ_UNIT_OUT_ACK [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [i][j]));
     138
     139            for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     140              for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     141              (*(out_READ_UNIT_OUT_ACK [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [x][y]));
    132142          }
    133143
    134144        for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
     145          for (uint32_t j=0; j<_param->_nb_execute_unit_port[i]; j++)
    135146          {
    136             (*(out_EXECUTE_UNIT_IN_VAL [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    137 
    138             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    139               {
    140                 (*(out_EXECUTE_UNIT_IN_VAL [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    141                 (*(out_EXECUTE_UNIT_IN_VAL [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    142                 if (_param->_have_port_context_id)
    143                 (*(out_EXECUTE_UNIT_IN_VAL [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    144                 if (_param->_have_port_front_end_id)
    145                 (*(out_EXECUTE_UNIT_IN_VAL [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    146                 if (_param->_have_port_ooo_engine_id)
    147                 (*(out_EXECUTE_UNIT_IN_VAL [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
     147            (*(out_EXECUTE_UNIT_IN_VAL [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     148
     149            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     150              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     151              {
     152                (*(out_EXECUTE_UNIT_IN_VAL [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     153                (*(out_EXECUTE_UNIT_IN_VAL [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     154                if (_param->_have_port_context_id)
     155                (*(out_EXECUTE_UNIT_IN_VAL [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     156                if (_param->_have_port_front_end_id)
     157                (*(out_EXECUTE_UNIT_IN_VAL [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     158                if (_param->_have_port_ooo_engine_id)
     159                (*(out_EXECUTE_UNIT_IN_VAL [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    148160              }
    149161
    150162            if (_param->_have_port_context_id)
    151163              {
    152             (*(out_EXECUTE_UNIT_IN_CONTEXT_ID [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    153 
    154             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    155               {
    156                 (*(out_EXECUTE_UNIT_IN_CONTEXT_ID [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    157                 (*(out_EXECUTE_UNIT_IN_CONTEXT_ID [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    158                 if (_param->_have_port_context_id)
    159                 (*(out_EXECUTE_UNIT_IN_CONTEXT_ID [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    160                 if (_param->_have_port_front_end_id)
    161                 (*(out_EXECUTE_UNIT_IN_CONTEXT_ID [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    162                 if (_param->_have_port_ooo_engine_id)
    163                 (*(out_EXECUTE_UNIT_IN_CONTEXT_ID [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
     164            (*(out_EXECUTE_UNIT_IN_CONTEXT_ID [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     165
     166            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     167              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     168              {
     169                (*(out_EXECUTE_UNIT_IN_CONTEXT_ID [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     170                (*(out_EXECUTE_UNIT_IN_CONTEXT_ID [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     171                if (_param->_have_port_context_id)
     172                (*(out_EXECUTE_UNIT_IN_CONTEXT_ID [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     173                if (_param->_have_port_front_end_id)
     174                (*(out_EXECUTE_UNIT_IN_CONTEXT_ID [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     175                if (_param->_have_port_ooo_engine_id)
     176                (*(out_EXECUTE_UNIT_IN_CONTEXT_ID [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    164177              }
    165178              }
     
    167180            if (_param->_have_port_front_end_id)
    168181              {
    169             (*(out_EXECUTE_UNIT_IN_FRONT_END_ID [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    170 
    171             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    172               {
    173                 (*(out_EXECUTE_UNIT_IN_FRONT_END_ID [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    174                 (*(out_EXECUTE_UNIT_IN_FRONT_END_ID [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    175                 if (_param->_have_port_context_id)
    176                 (*(out_EXECUTE_UNIT_IN_FRONT_END_ID [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    177                 if (_param->_have_port_front_end_id)
    178                 (*(out_EXECUTE_UNIT_IN_FRONT_END_ID [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    179                 if (_param->_have_port_ooo_engine_id)
    180                 (*(out_EXECUTE_UNIT_IN_FRONT_END_ID [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
     182            (*(out_EXECUTE_UNIT_IN_FRONT_END_ID [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     183
     184            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     185              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     186              {
     187                (*(out_EXECUTE_UNIT_IN_FRONT_END_ID [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     188                (*(out_EXECUTE_UNIT_IN_FRONT_END_ID [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     189                if (_param->_have_port_context_id)
     190                (*(out_EXECUTE_UNIT_IN_FRONT_END_ID [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     191                if (_param->_have_port_front_end_id)
     192                (*(out_EXECUTE_UNIT_IN_FRONT_END_ID [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     193                if (_param->_have_port_ooo_engine_id)
     194                (*(out_EXECUTE_UNIT_IN_FRONT_END_ID [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    181195              }
    182196              }
     
    184198            if (_param->_have_port_ooo_engine_id)
    185199              {
    186             (*(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    187 
    188             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    189               {
    190                 (*(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    191                 (*(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    192                 if (_param->_have_port_context_id)
    193                 (*(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    194                 if (_param->_have_port_front_end_id)
    195                 (*(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    196                 if (_param->_have_port_ooo_engine_id)
    197                 (*(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
    198               }
    199               }
    200 
    201             if (_param->_have_port_packet_id)
    202               {
    203             (*(out_EXECUTE_UNIT_IN_PACKET_ID [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    204 
    205             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    206               {
    207                 (*(out_EXECUTE_UNIT_IN_PACKET_ID [i])) (*(in_READ_UNIT_OUT_PACKET_ID     [j]));
    208                 (*(out_EXECUTE_UNIT_IN_PACKET_ID [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    209                 (*(out_EXECUTE_UNIT_IN_PACKET_ID [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    210                 if (_param->_have_port_context_id)
    211                 (*(out_EXECUTE_UNIT_IN_PACKET_ID [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    212                 if (_param->_have_port_front_end_id)
    213                 (*(out_EXECUTE_UNIT_IN_PACKET_ID [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    214                 if (_param->_have_port_ooo_engine_id)
    215                 (*(out_EXECUTE_UNIT_IN_PACKET_ID [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
    216               }
    217               }
    218 
    219             (*(out_EXECUTE_UNIT_IN_OPERATION [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    220 
    221             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    222               {
    223                 (*(out_EXECUTE_UNIT_IN_OPERATION [i])) (*(in_READ_UNIT_OUT_OPERATION     [j]));
    224                 (*(out_EXECUTE_UNIT_IN_OPERATION [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    225                 (*(out_EXECUTE_UNIT_IN_OPERATION [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    226                 if (_param->_have_port_context_id)
    227                 (*(out_EXECUTE_UNIT_IN_OPERATION [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    228                 if (_param->_have_port_front_end_id)
    229                 (*(out_EXECUTE_UNIT_IN_OPERATION [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    230                 if (_param->_have_port_ooo_engine_id)
    231                 (*(out_EXECUTE_UNIT_IN_OPERATION [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
    232               }
    233 
    234             (*(out_EXECUTE_UNIT_IN_TYPE [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    235 
    236             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    237               {
    238                 (*(out_EXECUTE_UNIT_IN_TYPE [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    239                 (*(out_EXECUTE_UNIT_IN_TYPE [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    240                 if (_param->_have_port_context_id)
    241                 (*(out_EXECUTE_UNIT_IN_TYPE [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    242                 if (_param->_have_port_front_end_id)
    243                 (*(out_EXECUTE_UNIT_IN_TYPE [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    244                 if (_param->_have_port_ooo_engine_id)
    245                 (*(out_EXECUTE_UNIT_IN_TYPE [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
    246               }
    247 
    248             (*(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    249 
    250             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    251               {
    252                 (*(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [i])) (*(in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE [j]));
    253                 (*(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [i])) (*(in_READ_UNIT_OUT_VAL                   [j]));
    254                 (*(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [i])) (*(in_READ_UNIT_OUT_TYPE                  [j]));
    255                 if (_param->_have_port_context_id)
    256                 (*(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID            [j]));
    257                 if (_param->_have_port_front_end_id)
    258                 (*(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID          [j]));
    259                 if (_param->_have_port_ooo_engine_id)
    260                 (*(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
     200            (*(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     201
     202            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     203              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     204              {
     205                (*(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     206                (*(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     207                if (_param->_have_port_context_id)
     208                (*(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     209                if (_param->_have_port_front_end_id)
     210                (*(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     211                if (_param->_have_port_ooo_engine_id)
     212                (*(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
     213              }
     214              }
     215
     216            if (_param->_have_port_rob_ptr  )
     217              {
     218            (*(out_EXECUTE_UNIT_IN_PACKET_ID [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     219
     220            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     221              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     222              {
     223                (*(out_EXECUTE_UNIT_IN_PACKET_ID [i][j])) (*(in_READ_UNIT_OUT_PACKET_ID     [x][y]));
     224                (*(out_EXECUTE_UNIT_IN_PACKET_ID [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     225                (*(out_EXECUTE_UNIT_IN_PACKET_ID [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     226                if (_param->_have_port_context_id)
     227                (*(out_EXECUTE_UNIT_IN_PACKET_ID [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     228                if (_param->_have_port_front_end_id)
     229                (*(out_EXECUTE_UNIT_IN_PACKET_ID [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     230                if (_param->_have_port_ooo_engine_id)
     231                (*(out_EXECUTE_UNIT_IN_PACKET_ID [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
     232              }
     233              }
     234
     235            (*(out_EXECUTE_UNIT_IN_OPERATION [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     236
     237            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     238              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     239              {
     240                (*(out_EXECUTE_UNIT_IN_OPERATION [i][j])) (*(in_READ_UNIT_OUT_OPERATION     [x][y]));
     241                (*(out_EXECUTE_UNIT_IN_OPERATION [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     242                (*(out_EXECUTE_UNIT_IN_OPERATION [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     243                if (_param->_have_port_context_id)
     244                (*(out_EXECUTE_UNIT_IN_OPERATION [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     245                if (_param->_have_port_front_end_id)
     246                (*(out_EXECUTE_UNIT_IN_OPERATION [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     247                if (_param->_have_port_ooo_engine_id)
     248                (*(out_EXECUTE_UNIT_IN_OPERATION [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
     249              }
     250
     251            (*(out_EXECUTE_UNIT_IN_TYPE [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     252
     253            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     254              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     255              {
     256                (*(out_EXECUTE_UNIT_IN_TYPE [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     257                (*(out_EXECUTE_UNIT_IN_TYPE [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     258                if (_param->_have_port_context_id)
     259                (*(out_EXECUTE_UNIT_IN_TYPE [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     260                if (_param->_have_port_front_end_id)
     261                (*(out_EXECUTE_UNIT_IN_TYPE [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     262                if (_param->_have_port_ooo_engine_id)
     263                (*(out_EXECUTE_UNIT_IN_TYPE [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
     264              }
     265
     266            (*(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     267
     268            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     269              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     270              {
     271                (*(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [i][j])) (*(in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE [x][y]));
     272                (*(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [i][j])) (*(in_READ_UNIT_OUT_VAL                   [x][y]));
     273                (*(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [i][j])) (*(in_READ_UNIT_OUT_TYPE                  [x][y]));
     274                if (_param->_have_port_context_id)
     275                (*(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID            [x][y]));
     276                if (_param->_have_port_front_end_id)
     277                (*(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID          [x][y]));
     278                if (_param->_have_port_ooo_engine_id)
     279                (*(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    261280              }
    262281
    263282            if (_param->_have_port_load_queue_ptr)
    264283              {
    265             (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    266 
    267             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    268               {
    269                 (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i])) (*(in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE [j]));
    270                 (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i])) (*(in_READ_UNIT_OUT_VAL                  [j]));
    271                 (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i])) (*(in_READ_UNIT_OUT_TYPE                 [j]));
    272                 if (_param->_have_port_context_id)
    273                 (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID           [j]));
    274                 if (_param->_have_port_front_end_id)
    275                 (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID         [j]));
    276                 if (_param->_have_port_ooo_engine_id)
    277                 (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID        [j]));
     284            (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     285
     286            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     287              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     288              {
     289                (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i][j])) (*(in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE [x][y]));
     290                (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i][j])) (*(in_READ_UNIT_OUT_VAL                  [x][y]));
     291                (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i][j])) (*(in_READ_UNIT_OUT_TYPE                 [x][y]));
     292                if (_param->_have_port_context_id)
     293                (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID           [x][y]));
     294                if (_param->_have_port_front_end_id)
     295                (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID         [x][y]));
     296                if (_param->_have_port_ooo_engine_id)
     297                (*(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID        [x][y]));
    278298              }
    279299              }
    280300           
    281             (*(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    282 
    283             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    284               {
    285                 (*(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT [i])) (*(in_READ_UNIT_OUT_HAS_IMMEDIAT  [j]));
    286                 (*(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    287                 (*(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    288                 if (_param->_have_port_context_id)
    289                 (*(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    290                 if (_param->_have_port_front_end_id)
    291                 (*(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    292                 if (_param->_have_port_ooo_engine_id)
    293                 (*(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
    294               }
    295 
    296             (*(out_EXECUTE_UNIT_IN_IMMEDIAT [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    297 
    298             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    299               {
    300                 (*(out_EXECUTE_UNIT_IN_IMMEDIAT [i])) (*(in_READ_UNIT_OUT_IMMEDIAT      [j]));
    301                 (*(out_EXECUTE_UNIT_IN_IMMEDIAT [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    302                 (*(out_EXECUTE_UNIT_IN_IMMEDIAT [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    303                 if (_param->_have_port_context_id)
    304                 (*(out_EXECUTE_UNIT_IN_IMMEDIAT [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    305                 if (_param->_have_port_front_end_id)
    306                 (*(out_EXECUTE_UNIT_IN_IMMEDIAT [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    307                 if (_param->_have_port_ooo_engine_id)
    308                 (*(out_EXECUTE_UNIT_IN_IMMEDIAT [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
    309               }
    310 
    311             (*(out_EXECUTE_UNIT_IN_DATA_RA [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    312 
    313             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    314               {
    315                 (*(out_EXECUTE_UNIT_IN_DATA_RA [i])) (*(in_READ_UNIT_OUT_DATA_RA       [j]));
    316                 (*(out_EXECUTE_UNIT_IN_DATA_RA [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    317                 (*(out_EXECUTE_UNIT_IN_DATA_RA [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    318                 if (_param->_have_port_context_id)
    319                 (*(out_EXECUTE_UNIT_IN_DATA_RA [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    320                 if (_param->_have_port_front_end_id)
    321                 (*(out_EXECUTE_UNIT_IN_DATA_RA [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    322                 if (_param->_have_port_ooo_engine_id)
    323                 (*(out_EXECUTE_UNIT_IN_DATA_RA [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
    324               }
    325 
    326             (*(out_EXECUTE_UNIT_IN_DATA_RB [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    327 
    328             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    329               {
    330                 (*(out_EXECUTE_UNIT_IN_DATA_RB [i])) (*(in_READ_UNIT_OUT_DATA_RB       [j]));
    331                 (*(out_EXECUTE_UNIT_IN_DATA_RB [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    332                 (*(out_EXECUTE_UNIT_IN_DATA_RB [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    333                 if (_param->_have_port_context_id)
    334                 (*(out_EXECUTE_UNIT_IN_DATA_RB [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    335                 if (_param->_have_port_front_end_id)
    336                 (*(out_EXECUTE_UNIT_IN_DATA_RB [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    337                 if (_param->_have_port_ooo_engine_id)
    338                 (*(out_EXECUTE_UNIT_IN_DATA_RB [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
    339               }
    340 
    341             (*(out_EXECUTE_UNIT_IN_DATA_RC [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    342 
    343             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    344               {
    345                 (*(out_EXECUTE_UNIT_IN_DATA_RC [i])) (*(in_READ_UNIT_OUT_DATA_RC       [j]));
    346                 (*(out_EXECUTE_UNIT_IN_DATA_RC [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    347                 (*(out_EXECUTE_UNIT_IN_DATA_RC [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    348                 if (_param->_have_port_context_id)
    349                 (*(out_EXECUTE_UNIT_IN_DATA_RC [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    350                 if (_param->_have_port_front_end_id)
    351                 (*(out_EXECUTE_UNIT_IN_DATA_RC [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    352                 if (_param->_have_port_ooo_engine_id)
    353                 (*(out_EXECUTE_UNIT_IN_DATA_RC [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
    354               }
    355 
    356             (*(out_EXECUTE_UNIT_IN_WRITE_RD [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    357 
    358             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    359               {
    360                 (*(out_EXECUTE_UNIT_IN_WRITE_RD [i])) (*(in_READ_UNIT_OUT_WRITE_RD      [j]));
    361                 (*(out_EXECUTE_UNIT_IN_WRITE_RD [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    362                 (*(out_EXECUTE_UNIT_IN_WRITE_RD [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    363                 if (_param->_have_port_context_id)
    364                 (*(out_EXECUTE_UNIT_IN_WRITE_RD [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    365                 if (_param->_have_port_front_end_id)
    366                 (*(out_EXECUTE_UNIT_IN_WRITE_RD [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    367                 if (_param->_have_port_ooo_engine_id)
    368                 (*(out_EXECUTE_UNIT_IN_WRITE_RD [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
     301            (*(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     302
     303            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     304              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     305              {
     306                (*(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT [i][j])) (*(in_READ_UNIT_OUT_HAS_IMMEDIAT  [x][y]));
     307                (*(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     308                (*(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     309                if (_param->_have_port_context_id)
     310                (*(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     311                if (_param->_have_port_front_end_id)
     312                (*(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     313                if (_param->_have_port_ooo_engine_id)
     314                (*(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
     315              }
     316
     317            (*(out_EXECUTE_UNIT_IN_IMMEDIAT [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     318
     319            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     320              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     321              {
     322                (*(out_EXECUTE_UNIT_IN_IMMEDIAT [i][j])) (*(in_READ_UNIT_OUT_IMMEDIAT      [x][y]));
     323                (*(out_EXECUTE_UNIT_IN_IMMEDIAT [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     324                (*(out_EXECUTE_UNIT_IN_IMMEDIAT [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     325                if (_param->_have_port_context_id)
     326                (*(out_EXECUTE_UNIT_IN_IMMEDIAT [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     327                if (_param->_have_port_front_end_id)
     328                (*(out_EXECUTE_UNIT_IN_IMMEDIAT [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     329                if (_param->_have_port_ooo_engine_id)
     330                (*(out_EXECUTE_UNIT_IN_IMMEDIAT [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
     331              }
     332
     333            (*(out_EXECUTE_UNIT_IN_DATA_RA [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     334
     335            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     336              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     337              {
     338                (*(out_EXECUTE_UNIT_IN_DATA_RA [i][j])) (*(in_READ_UNIT_OUT_DATA_RA       [x][y]));
     339                (*(out_EXECUTE_UNIT_IN_DATA_RA [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     340                (*(out_EXECUTE_UNIT_IN_DATA_RA [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     341                if (_param->_have_port_context_id)
     342                (*(out_EXECUTE_UNIT_IN_DATA_RA [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     343                if (_param->_have_port_front_end_id)
     344                (*(out_EXECUTE_UNIT_IN_DATA_RA [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     345                if (_param->_have_port_ooo_engine_id)
     346                (*(out_EXECUTE_UNIT_IN_DATA_RA [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
     347              }
     348
     349            (*(out_EXECUTE_UNIT_IN_DATA_RB [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     350
     351            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     352              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     353              {
     354                (*(out_EXECUTE_UNIT_IN_DATA_RB [i][j])) (*(in_READ_UNIT_OUT_DATA_RB       [x][y]));
     355                (*(out_EXECUTE_UNIT_IN_DATA_RB [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     356                (*(out_EXECUTE_UNIT_IN_DATA_RB [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     357                if (_param->_have_port_context_id)
     358                (*(out_EXECUTE_UNIT_IN_DATA_RB [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     359                if (_param->_have_port_front_end_id)
     360                (*(out_EXECUTE_UNIT_IN_DATA_RB [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     361                if (_param->_have_port_ooo_engine_id)
     362                (*(out_EXECUTE_UNIT_IN_DATA_RB [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
     363              }
     364
     365            (*(out_EXECUTE_UNIT_IN_DATA_RC [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     366
     367            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     368              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     369              {
     370                (*(out_EXECUTE_UNIT_IN_DATA_RC [i][j])) (*(in_READ_UNIT_OUT_DATA_RC       [x][y]));
     371                (*(out_EXECUTE_UNIT_IN_DATA_RC [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     372                (*(out_EXECUTE_UNIT_IN_DATA_RC [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     373                if (_param->_have_port_context_id)
     374                (*(out_EXECUTE_UNIT_IN_DATA_RC [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     375                if (_param->_have_port_front_end_id)
     376                (*(out_EXECUTE_UNIT_IN_DATA_RC [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     377                if (_param->_have_port_ooo_engine_id)
     378                (*(out_EXECUTE_UNIT_IN_DATA_RC [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
     379              }
     380
     381            (*(out_EXECUTE_UNIT_IN_WRITE_RD [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     382
     383            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     384              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     385              {
     386                (*(out_EXECUTE_UNIT_IN_WRITE_RD [i][j])) (*(in_READ_UNIT_OUT_WRITE_RD      [x][y]));
     387                (*(out_EXECUTE_UNIT_IN_WRITE_RD [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     388                (*(out_EXECUTE_UNIT_IN_WRITE_RD [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     389                if (_param->_have_port_context_id)
     390                (*(out_EXECUTE_UNIT_IN_WRITE_RD [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     391                if (_param->_have_port_front_end_id)
     392                (*(out_EXECUTE_UNIT_IN_WRITE_RD [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     393                if (_param->_have_port_ooo_engine_id)
     394                (*(out_EXECUTE_UNIT_IN_WRITE_RD [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    369395              }
    370396           
    371             (*(out_EXECUTE_UNIT_IN_NUM_REG_RD [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    372 
    373             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    374               {
    375                 (*(out_EXECUTE_UNIT_IN_NUM_REG_RD [i])) (*(in_READ_UNIT_OUT_NUM_REG_RD    [j]));
    376                 (*(out_EXECUTE_UNIT_IN_NUM_REG_RD [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    377                 (*(out_EXECUTE_UNIT_IN_NUM_REG_RD [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    378                 if (_param->_have_port_context_id)
    379                 (*(out_EXECUTE_UNIT_IN_NUM_REG_RD [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    380                 if (_param->_have_port_front_end_id)
    381                 (*(out_EXECUTE_UNIT_IN_NUM_REG_RD [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    382                 if (_param->_have_port_ooo_engine_id)
    383                 (*(out_EXECUTE_UNIT_IN_NUM_REG_RD [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
    384               }
    385 
    386             (*(out_EXECUTE_UNIT_IN_WRITE_RE [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    387 
    388             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    389               {
    390                 (*(out_EXECUTE_UNIT_IN_WRITE_RE [i])) (*(in_READ_UNIT_OUT_WRITE_RE      [j]));
    391                 (*(out_EXECUTE_UNIT_IN_WRITE_RE [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    392                 (*(out_EXECUTE_UNIT_IN_WRITE_RE [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    393                 if (_param->_have_port_context_id)
    394                 (*(out_EXECUTE_UNIT_IN_WRITE_RE [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    395                 if (_param->_have_port_front_end_id)
    396                 (*(out_EXECUTE_UNIT_IN_WRITE_RE [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    397                 if (_param->_have_port_ooo_engine_id)
    398                 (*(out_EXECUTE_UNIT_IN_WRITE_RE [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
    399               }
    400 
    401             (*(out_EXECUTE_UNIT_IN_NUM_REG_RE [i])) (*(in_EXECUTE_UNIT_IN_ACK [i]));
    402 
    403             for (uint32_t j=0; j<_param->_nb_read_unit; j++)
    404               {
    405                 (*(out_EXECUTE_UNIT_IN_NUM_REG_RE [i])) (*(in_READ_UNIT_OUT_NUM_REG_RE    [j]));
    406                 (*(out_EXECUTE_UNIT_IN_NUM_REG_RE [i])) (*(in_READ_UNIT_OUT_VAL           [j]));
    407                 (*(out_EXECUTE_UNIT_IN_NUM_REG_RE [i])) (*(in_READ_UNIT_OUT_TYPE          [j]));
    408                 if (_param->_have_port_context_id)
    409                 (*(out_EXECUTE_UNIT_IN_NUM_REG_RE [i])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [j]));
    410                 if (_param->_have_port_front_end_id)
    411                 (*(out_EXECUTE_UNIT_IN_NUM_REG_RE [i])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [j]));
    412                 if (_param->_have_port_ooo_engine_id)
    413                 (*(out_EXECUTE_UNIT_IN_NUM_REG_RE [i])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [j]));
     397            (*(out_EXECUTE_UNIT_IN_NUM_REG_RD [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     398
     399            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     400              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     401              {
     402                (*(out_EXECUTE_UNIT_IN_NUM_REG_RD [i][j])) (*(in_READ_UNIT_OUT_NUM_REG_RD    [x][y]));
     403                (*(out_EXECUTE_UNIT_IN_NUM_REG_RD [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     404                (*(out_EXECUTE_UNIT_IN_NUM_REG_RD [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     405                if (_param->_have_port_context_id)
     406                (*(out_EXECUTE_UNIT_IN_NUM_REG_RD [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     407                if (_param->_have_port_front_end_id)
     408                (*(out_EXECUTE_UNIT_IN_NUM_REG_RD [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     409                if (_param->_have_port_ooo_engine_id)
     410                (*(out_EXECUTE_UNIT_IN_NUM_REG_RD [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
     411              }
     412
     413            (*(out_EXECUTE_UNIT_IN_WRITE_RE [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     414
     415            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     416              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     417              {
     418                (*(out_EXECUTE_UNIT_IN_WRITE_RE [i][j])) (*(in_READ_UNIT_OUT_WRITE_RE      [x][y]));
     419                (*(out_EXECUTE_UNIT_IN_WRITE_RE [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     420                (*(out_EXECUTE_UNIT_IN_WRITE_RE [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     421                if (_param->_have_port_context_id)
     422                (*(out_EXECUTE_UNIT_IN_WRITE_RE [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     423                if (_param->_have_port_front_end_id)
     424                (*(out_EXECUTE_UNIT_IN_WRITE_RE [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     425                if (_param->_have_port_ooo_engine_id)
     426                (*(out_EXECUTE_UNIT_IN_WRITE_RE [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
     427              }
     428
     429            (*(out_EXECUTE_UNIT_IN_NUM_REG_RE [i][j])) (*(in_EXECUTE_UNIT_IN_ACK [i][j]));
     430
     431            for (uint32_t x=0; x<_param->_nb_read_unit; x++)
     432              for (uint32_t y=0; y<_param->_nb_read_unit_port[x]; y++)
     433              {
     434                (*(out_EXECUTE_UNIT_IN_NUM_REG_RE [i][j])) (*(in_READ_UNIT_OUT_NUM_REG_RE    [x][y]));
     435                (*(out_EXECUTE_UNIT_IN_NUM_REG_RE [i][j])) (*(in_READ_UNIT_OUT_VAL           [x][y]));
     436                (*(out_EXECUTE_UNIT_IN_NUM_REG_RE [i][j])) (*(in_READ_UNIT_OUT_TYPE          [x][y]));
     437                if (_param->_have_port_context_id)
     438                (*(out_EXECUTE_UNIT_IN_NUM_REG_RE [i][j])) (*(in_READ_UNIT_OUT_CONTEXT_ID    [x][y]));
     439                if (_param->_have_port_front_end_id)
     440                (*(out_EXECUTE_UNIT_IN_NUM_REG_RE [i][j])) (*(in_READ_UNIT_OUT_FRONT_END_ID  [x][y]));
     441                if (_param->_have_port_ooo_engine_id)
     442                (*(out_EXECUTE_UNIT_IN_NUM_REG_RE [i][j])) (*(in_READ_UNIT_OUT_OOO_ENGINE_ID [x][y]));
    414443              }
    415444          }
     
    428457
    429458#ifdef STATISTICS
    430     if (_usage & USE_STATISTICS)
     459    if (usage_is_set(_usage,USE_STATISTICS))
    431460      {
    432461        log_printf(INFO,Read_unit_to_Execution_unit,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Read_unit_to_Execution_unit_allocation.cpp

    r81 r88  
    5757    // ~~~~~[ Interface "read_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5858     {
    59        ALLOC1_INTERFACE("read_unit_out", IN, EAST, "Output of read_unit", _param->_nb_read_unit);
     59       ALLOC2_INTERFACE("read_unit_out", IN, EAST, "Output of read_unit",_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
    6060
    61        ALLOC1_VALACK_IN ( in_READ_UNIT_OUT_VAL,VAL);
    62        ALLOC1_VALACK_OUT(out_READ_UNIT_OUT_ACK,ACK);
    63 
    64        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_CONTEXT_ID           ,"CONTEXT_ID"           ,Tcontext_t        ,_param->_size_context_id);
    65        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_FRONT_END_ID         ,"FRONT_END_ID"         ,Tcontext_t        ,_param->_size_front_end_id);
    66        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_OOO_ENGINE_ID        ,"OOO_ENGINE_ID"        ,Tcontext_t        ,_param->_size_ooo_engine_id);
    67        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_PACKET_ID            ,"PACKET_ID"            ,Tpacket_t         ,_param->_size_packet_id);
    68        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_OPERATION            ,"OPERATION"            ,Toperation_t      ,_param->_size_operation);
    69        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_TYPE                 ,"TYPE"                 ,Ttype_t           ,_param->_size_type);
    70        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,"STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,log2(_param->_size_store_queue));
    71        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,"LOAD_QUEUE_PTR_WRITE" ,Tlsq_ptr_t        ,log2(_param->_size_load_queue));
    72        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_HAS_IMMEDIAT         ,"HAS_IMMEDIAT"         ,Tcontrol_t        ,1);
    73        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_IMMEDIAT             ,"IMMEDIAT"             ,Tgeneral_data_t   ,_param->_size_general_data);
    74        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_DATA_RA              ,"DATA_RA"              ,Tgeneral_data_t   ,_param->_size_general_data);
    75        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_DATA_RB              ,"DATA_RB"              ,Tgeneral_data_t   ,_param->_size_general_data);
    76        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_DATA_RC              ,"DATA_RC"              ,Tspecial_data_t   ,_param->_size_special_data);
    77        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_WRITE_RD             ,"WRITE_RD"             ,Tcontrol_t        ,1);
    78        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_NUM_REG_RD           ,"NUM_REG_RD"           ,Tgeneral_address_t,_param->_size_general_register);
    79        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_WRITE_RE             ,"WRITE_RE"             ,Tcontrol_t        ,1);
    80        ALLOC1_SIGNAL_IN ( in_READ_UNIT_OUT_NUM_REG_RE           ,"NUM_REG_RE"           ,Tspecial_address_t,_param->_size_special_register);
     61       _ALLOC2_VALACK_IN ( in_READ_UNIT_OUT_VAL,VAL,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     62       _ALLOC2_VALACK_OUT(out_READ_UNIT_OUT_ACK,ACK,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     63       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_CONTEXT_ID           ,"CONTEXT_ID"           ,Tcontext_t        ,_param->_size_context_id       ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     64       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_FRONT_END_ID         ,"FRONT_END_ID"         ,Tcontext_t        ,_param->_size_front_end_id     ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     65       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_OOO_ENGINE_ID        ,"OOO_ENGINE_ID"        ,Tcontext_t        ,_param->_size_ooo_engine_id    ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     66       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_PACKET_ID            ,"PACKET_ID"            ,Tpacket_t         ,_param->_size_rob_ptr          ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     67       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_OPERATION            ,"OPERATION"            ,Toperation_t      ,_param->_size_operation        ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     68       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_TYPE                 ,"TYPE"                 ,Ttype_t           ,_param->_size_type             ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     69       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,"STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,_param->_size_store_queue_ptr  ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     70       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,"LOAD_QUEUE_PTR_WRITE" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr   ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     71       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_HAS_IMMEDIAT         ,"HAS_IMMEDIAT"         ,Tcontrol_t        ,1                              ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     72       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_IMMEDIAT             ,"IMMEDIAT"             ,Tgeneral_data_t   ,_param->_size_general_data     ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     73       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_DATA_RA              ,"DATA_RA"              ,Tgeneral_data_t   ,_param->_size_general_data     ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     74       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_DATA_RB              ,"DATA_RB"              ,Tgeneral_data_t   ,_param->_size_general_data     ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     75       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_DATA_RC              ,"DATA_RC"              ,Tspecial_data_t   ,_param->_size_special_data     ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     76       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_WRITE_RD             ,"WRITE_RD"             ,Tcontrol_t        ,1                              ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     77       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_NUM_REG_RD           ,"NUM_REG_RD"           ,Tgeneral_address_t,_param->_size_general_register ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     78       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_WRITE_RE             ,"WRITE_RE"             ,Tcontrol_t        ,1                              ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
     79       _ALLOC2_SIGNAL_IN ( in_READ_UNIT_OUT_NUM_REG_RE           ,"NUM_REG_RE"           ,Tspecial_address_t,_param->_size_special_register ,_param->_nb_read_unit,_param->_nb_read_unit_port[it1]);
    8180     }
    8281    // ~~~~~[ Interface "execute_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8382     {
    84        ALLOC1_INTERFACE("execute_unit_in", OUT, WEST, "Input of execute_unit", _param->_nb_execute_unit);
     83       ALLOC2_INTERFACE("execute_unit_in", OUT, WEST, "Input of execute_unit", _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
    8584       
    86        ALLOC1_VALACK_OUT(out_EXECUTE_UNIT_IN_VAL,VAL);
    87        ALLOC1_VALACK_IN ( in_EXECUTE_UNIT_IN_ACK,ACK);
     85       _ALLOC2_VALACK_OUT(out_EXECUTE_UNIT_IN_VAL,VAL, _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     86       _ALLOC2_VALACK_IN ( in_EXECUTE_UNIT_IN_ACK,ACK, _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     87       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_CONTEXT_ID           ,"CONTEXT_ID"           ,Tcontext_t        ,_param->_size_context_id       , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     88       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_FRONT_END_ID         ,"FRONT_END_ID"         ,Tcontext_t        ,_param->_size_front_end_id     , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     89       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID        ,"OOO_ENGINE_ID"        ,Tcontext_t        ,_param->_size_ooo_engine_id    , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     90       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_PACKET_ID            ,"PACKET_ID"            ,Tpacket_t         ,_param->_size_rob_ptr          , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     91       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_OPERATION            ,"OPERATION"            ,Toperation_t      ,_param->_size_operation        , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     92       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_TYPE                 ,"TYPE"                 ,Ttype_t           ,_param->_size_type             , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     93       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ,"HAS_IMMEDIAT"         ,Tcontrol_t        ,1                              , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     94       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_DATA_RC              ,"DATA_RC"              ,Tspecial_data_t   ,_param->_size_special_data     , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     95       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_WRITE_RD             ,"WRITE_RD"             ,Tcontrol_t        ,1                              , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     96       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_WRITE_RE             ,"WRITE_RE"             ,Tcontrol_t        ,1                              , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     97       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_NUM_REG_RE           ,"NUM_REG_RE"           ,Tspecial_address_t,_param->_size_special_register , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     98       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE,"STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,_param->_size_store_queue_ptr  , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     99       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,"LOAD_QUEUE_PTR_WRITE" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr   , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     100       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_IMMEDIAT             ,"IMMEDIAT"             ,Tgeneral_data_t   ,_param->_size_general_data     , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     101       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_DATA_RA              ,"DATA_RA"              ,Tgeneral_data_t   ,_param->_size_general_data     , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     102       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_DATA_RB              ,"DATA_RB"              ,Tgeneral_data_t   ,_param->_size_general_data     , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     103       _ALLOC2_SIGNAL_OUT(out_EXECUTE_UNIT_IN_NUM_REG_RD           ,"NUM_REG_RD"           ,Tgeneral_address_t,_param->_size_general_register , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1]);
     104     }
    88105
    89        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_CONTEXT_ID           ,"CONTEXT_ID"           ,Tcontext_t        ,_param->_size_context_id);
    90        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_FRONT_END_ID         ,"FRONT_END_ID"         ,Tcontext_t        ,_param->_size_front_end_id);
    91        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID        ,"OOO_ENGINE_ID"        ,Tcontext_t        ,_param->_size_ooo_engine_id);
    92        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_PACKET_ID            ,"PACKET_ID"            ,Tpacket_t         ,_param->_size_packet_id);
    93        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_OPERATION            ,"OPERATION"            ,Toperation_t      ,_param->_size_operation);
    94        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_TYPE                 ,"TYPE"                 ,Ttype_t           ,_param->_size_type);
    95        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ,"HAS_IMMEDIAT"         ,Tcontrol_t        ,1);
    96        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_DATA_RC              ,"DATA_RC"              ,Tspecial_data_t   ,_param->_size_special_data);
    97        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_WRITE_RD             ,"WRITE_RD"             ,Tcontrol_t        ,1);
    98        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_WRITE_RE             ,"WRITE_RE"             ,Tcontrol_t        ,1);
    99        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_NUM_REG_RE           ,"NUM_REG_RE"           ,Tspecial_address_t,_param->_size_special_register);
    100        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE,"STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t        ,log2(_param->_size_store_queue));
    101        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,"LOAD_QUEUE_PTR_WRITE" ,Tlsq_ptr_t        ,log2(_param->_size_load_queue));
    102        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_IMMEDIAT             ,"IMMEDIAT"             ,Tgeneral_data_t   ,_param->_size_general_data);
    103        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_DATA_RA              ,"DATA_RA"              ,Tgeneral_data_t   ,_param->_size_general_data);
    104        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_DATA_RB              ,"DATA_RB"              ,Tgeneral_data_t   ,_param->_size_general_data);
    105        ALLOC1_SIGNAL_OUT(out_EXECUTE_UNIT_IN_NUM_REG_RD           ,"NUM_REG_RD"           ,Tgeneral_address_t,_param->_size_general_register);
    106      }
    107106    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    108      _destination = new std::list<uint32_t> ** [_param->_nb_read_unit];
     107     if (usage_is_set(_usage,USE_SYSTEMC))
     108       {
     109     _destination = new std::list<destination_t> ** [_param->_nb_read_unit];
    109110     for (uint32_t i=0; i<_param->_nb_read_unit; i++)
    110111       {
    111          _destination [i] = new std::list<uint32_t> * [_param->_nb_thread];
     112         _destination [i] = new std::list<destination_t> * [_param->_nb_thread];
    112113         for (uint32_t j=0; j<_param->_nb_thread; j++)
    113114           {
    114              _destination [i][j] = new std::list<uint32_t> [_param->_nb_type];
     115             _destination [i][j] = new std::list<destination_t> [_param->_nb_type];
    115116           }
     117       }
    116118       }
    117119
    118120#ifdef POSITION
    119     _component->generate_file();
     121     if (usage_is_set(_usage,USE_POSITION))
     122       _component->generate_file();
    120123#endif
    121124
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Read_unit_to_Execution_unit_deallocation.cpp

    r81 r88  
    77
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/include/Read_unit_to_Execution_unit.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    2324    log_printf(FUNC,Read_unit_to_Execution_unit,FUNCTION,"Begin");
    2425
    25     if (_usage & USE_SYSTEMC)
     26    if (usage_is_set(_usage,USE_SYSTEMC))
    2627      {
    2728        delete    in_CLOCK ;
    2829        delete    in_NRESET;
    2930
    30         // ~~~~~[ Interface "read_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    31         delete [] in_READ_UNIT_OUT_VAL                  ;
    32         delete []out_READ_UNIT_OUT_ACK                  ;
    33         if (_param->_have_port_context_id)
    34         delete [] in_READ_UNIT_OUT_CONTEXT_ID           ;
    35         if (_param->_have_port_front_end_id)
    36         delete [] in_READ_UNIT_OUT_FRONT_END_ID         ;
    37         if (_param->_have_port_ooo_engine_id)
    38         delete [] in_READ_UNIT_OUT_OOO_ENGINE_ID        ;
    39         if (_param->_have_port_packet_id)
    40         delete [] in_READ_UNIT_OUT_PACKET_ID            ;
    41         delete [] in_READ_UNIT_OUT_OPERATION            ;
    42         delete [] in_READ_UNIT_OUT_TYPE                 ;
    43         delete [] in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE;
    44         if (_param->_have_port_load_queue_ptr)
    45         delete [] in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ;
    46         delete [] in_READ_UNIT_OUT_HAS_IMMEDIAT         ;
    47         delete [] in_READ_UNIT_OUT_IMMEDIAT             ;
    48         delete [] in_READ_UNIT_OUT_DATA_RA              ;
    49         delete [] in_READ_UNIT_OUT_DATA_RB              ;
    50         delete [] in_READ_UNIT_OUT_DATA_RC              ;
    51         delete [] in_READ_UNIT_OUT_WRITE_RD             ;
    52         delete [] in_READ_UNIT_OUT_NUM_REG_RD           ;
    53         delete [] in_READ_UNIT_OUT_WRITE_RE             ;
    54         delete [] in_READ_UNIT_OUT_NUM_REG_RE           ;
     31         DELETE2_SIGNAL( in_READ_UNIT_OUT_VAL                    , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],1                              );
     32         DELETE2_SIGNAL(out_READ_UNIT_OUT_ACK                    , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],1                              );
     33         DELETE2_SIGNAL( in_READ_UNIT_OUT_CONTEXT_ID             , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_context_id       );
     34         DELETE2_SIGNAL( in_READ_UNIT_OUT_FRONT_END_ID           , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_front_end_id     );
     35         DELETE2_SIGNAL( in_READ_UNIT_OUT_OOO_ENGINE_ID          , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_ooo_engine_id    );
     36         DELETE2_SIGNAL( in_READ_UNIT_OUT_PACKET_ID              , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_rob_ptr          );
     37         DELETE2_SIGNAL( in_READ_UNIT_OUT_OPERATION              , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_operation        );
     38         DELETE2_SIGNAL( in_READ_UNIT_OUT_TYPE                   , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_type             );
     39         DELETE2_SIGNAL( in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE  , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_store_queue_ptr  );
     40         DELETE2_SIGNAL( in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE   , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_load_queue_ptr   );
     41         DELETE2_SIGNAL( in_READ_UNIT_OUT_HAS_IMMEDIAT           , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],1                              );
     42         DELETE2_SIGNAL( in_READ_UNIT_OUT_IMMEDIAT               , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_general_data     );
     43         DELETE2_SIGNAL( in_READ_UNIT_OUT_DATA_RA                , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_general_data     );
     44         DELETE2_SIGNAL( in_READ_UNIT_OUT_DATA_RB                , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_general_data     );
     45         DELETE2_SIGNAL( in_READ_UNIT_OUT_DATA_RC                , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_special_data     );
     46         DELETE2_SIGNAL( in_READ_UNIT_OUT_WRITE_RD               , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],1                              );
     47         DELETE2_SIGNAL( in_READ_UNIT_OUT_NUM_REG_RD             , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_general_register );
     48         DELETE2_SIGNAL( in_READ_UNIT_OUT_WRITE_RE               , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],1                              );
     49         DELETE2_SIGNAL( in_READ_UNIT_OUT_NUM_REG_RE             , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_special_register );
     50       
     51         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_VAL                  , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],1                              );
     52         DELETE2_SIGNAL( in_EXECUTE_UNIT_IN_ACK                  , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],1                              );
     53         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_CONTEXT_ID           , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_context_id       );
     54         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_FRONT_END_ID         , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_front_end_id     );
     55         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID        , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_ooo_engine_id    );
     56         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_PACKET_ID            , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_rob_ptr          );
     57         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_OPERATION            , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_operation        );
     58         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_TYPE                 , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_type             );
     59         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],1                              );
     60         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_DATA_RC              , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_special_data     );
     61         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_WRITE_RD             , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],1                              );
     62         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_WRITE_RE             , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],1                              );
     63         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_NUM_REG_RE           , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_special_register );
     64         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE, _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_store_queue_ptr  );
     65         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_load_queue_ptr   );
     66         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_IMMEDIAT             , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_general_data     );
     67         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_DATA_RA              , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_general_data     );
     68         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_DATA_RB              , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_general_data     );
     69         DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_NUM_REG_RD           , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_general_register );
    5570
    56         // ~~~~~[ Interface "execute_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    57         delete [] out_EXECUTE_UNIT_IN_VAL                  ;
    58         delete []  in_EXECUTE_UNIT_IN_ACK                  ;
    59         if (_param->_have_port_context_id)
    60         delete [] out_EXECUTE_UNIT_IN_CONTEXT_ID           ;
    61         if (_param->_have_port_front_end_id)
    62         delete [] out_EXECUTE_UNIT_IN_FRONT_END_ID         ;
    63         if (_param->_have_port_ooo_engine_id)
    64         delete [] out_EXECUTE_UNIT_IN_OOO_ENGINE_ID        ;
    65         if (_param->_have_port_packet_id)
    66         delete [] out_EXECUTE_UNIT_IN_PACKET_ID            ;
    67         delete [] out_EXECUTE_UNIT_IN_OPERATION            ;
    68         delete [] out_EXECUTE_UNIT_IN_TYPE                 ;
    69         delete [] out_EXECUTE_UNIT_IN_HAS_IMMEDIAT         ;
    70         delete [] out_EXECUTE_UNIT_IN_DATA_RC              ;
    71         delete [] out_EXECUTE_UNIT_IN_WRITE_RD             ;
    72         delete [] out_EXECUTE_UNIT_IN_WRITE_RE             ;
    73         delete [] out_EXECUTE_UNIT_IN_NUM_REG_RE           ;
    74         delete [] out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE;
    75         if (_param->_have_port_load_queue_ptr)
    76         delete [] out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE ;
    77         delete [] out_EXECUTE_UNIT_IN_IMMEDIAT             ;
    78         delete [] out_EXECUTE_UNIT_IN_DATA_RA              ;
    79         delete [] out_EXECUTE_UNIT_IN_DATA_RB              ;
    80         delete [] out_EXECUTE_UNIT_IN_NUM_REG_RD           ;
     71         delete [] _destination;
    8172      }
    8273    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    8374
    84     delete [] _destination;
    8575    delete    _component;
    8676
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Read_unit_to_Execution_unit_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
    33     _interfaces->testbench();
     34    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     35      _interfaces->testbench();
    3436#endif
    3537
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Read_unit_to_Execution_unit_genMealy.cpp

    r81 r88  
    2424    log_printf(FUNC,Read_unit_to_Execution_unit,FUNCTION,"Begin");
    2525
    26     bool execute_unit_use [_param->_nb_execute_unit];
     26    bool execute_unit_use [_param->_nb_execute_unit][_param->_max_nb_execute_unit_port];
    2727
    2828    for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    29       execute_unit_use[i] = (PORT_READ(in_EXECUTE_UNIT_IN_ACK [i]) == 0);
     29      for (uint32_t j=0; j<_param->_nb_execute_unit_port[i]; j++)
     30        execute_unit_use[i][j] = false;
    3031
    3132    for (uint32_t i=0; i<_param->_nb_read_unit; i++)
    32       {
    33         bool       ack = false;
     33      for (uint32_t j=0; j<_param->_nb_read_unit_port[i]; j++)
     34        {
     35          bool       ack = false;
     36         
     37          log_printf(TRACE,Read_unit_to_Execution_unit,FUNCTION,"Test Read_unit[%d][%d]",i,j);
     38         
     39          if (PORT_READ(in_READ_UNIT_OUT_VAL [i][j]) == true)
     40            {
     41              log_printf(TRACE,Read_unit_to_Execution_unit,FUNCTION," * have a valid entry.");
     42             
     43              Tcontext_t context_id    = (_param->_have_port_context_id   )?PORT_READ(in_READ_UNIT_OUT_CONTEXT_ID    [i][j]):0;
     44              Tcontext_t front_end_id  = (_param->_have_port_front_end_id )?PORT_READ(in_READ_UNIT_OUT_FRONT_END_ID  [i][j]):0;
     45              Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id)?PORT_READ(in_READ_UNIT_OUT_OOO_ENGINE_ID [i][j]):0;
     46              Tcontext_t num_thread    = get_num_thread(context_id   , _param->_size_context_id   ,
     47                                                        front_end_id , _param->_size_front_end_id ,
     48                                                        ooo_engine_id, _param->_size_ooo_engine_id);
     49              Ttype_t    type          = PORT_READ(in_READ_UNIT_OUT_TYPE [i][j]);
     50             
     51#ifdef DEBUG_TEST
     52              if (_destination[i][num_thread][type].empty())
     53                throw ERRORMORPHEO(FUNCTION,"Invalid Operation : They have no execute_unit to receive a operation from the read_unit ["+toString(i)+"], thread ["+toString(num_thread)+"] and a operation's type ["+toString_type(type)+"].");
     54#endif
     55             
     56              // find a free execute_unit
     57              for (std::list<destination_t>::iterator it=_destination[i][num_thread][type].begin();
     58                   (it != _destination[i][num_thread][type].end()) and (ack == false);
     59                   it++)
     60                {
     61                  uint32_t dest = (*it).grp;
     62                  uint32_t port = (*it).elt;
     63                 
     64                  log_printf(TRACE,Read_unit_to_Execution_unit,FUNCTION,"   * Test destination [%d][%d].",dest,port);
     65                 
     66                  if (execute_unit_use [dest][port] == false)
     67                    {
     68                      log_printf(TRACE,Read_unit_to_Execution_unit,FUNCTION,"     * Is ok! Link.");
     69                     
     70                      // have find !!!
     71                      ack                           = PORT_READ(in_EXECUTE_UNIT_IN_ACK [dest][port]);
     72                      execute_unit_use [dest][port] = true;
    3473
    35         log_printf(TRACE,Read_unit_to_Execution_unit,FUNCTION,"Test Read_unit[%d]",i);
    36 
    37         if (PORT_READ(in_READ_UNIT_OUT_VAL [i]) == true)
    38           {
    39             log_printf(TRACE,Read_unit_to_Execution_unit,FUNCTION," * have a valid entry.");
    40            
    41             Tcontext_t context_id    = (_param->_have_port_context_id   )?PORT_READ(in_READ_UNIT_OUT_CONTEXT_ID    [i]):0;
    42             Tcontext_t front_end_id  = (_param->_have_port_front_end_id )?PORT_READ(in_READ_UNIT_OUT_FRONT_END_ID  [i]):0;
    43             Tcontext_t ooo_engine_id = (_param->_have_port_ooo_engine_id)?PORT_READ(in_READ_UNIT_OUT_OOO_ENGINE_ID [i]):0;
    44             Tcontext_t num_thread    = get_num_thread(context_id   , _param->_size_context_id   ,
    45                                                       front_end_id , _param->_size_front_end_id ,
    46                                                       ooo_engine_id, _param->_size_ooo_engine_id);
    47             Ttype_t    type          = PORT_READ(in_READ_UNIT_OUT_TYPE [i]);
    48            
    49 #ifdef DEBUG_TEST
    50             if (_destination[i][num_thread][type].empty())
    51               throw ERRORMORPHEO(FUNCTION,"Invalid Operation : They have no execute_unit to receive a operation from the read_unit ["+toString(i)+"], thread ["+toString(num_thread)+"] and a operation's type ["+toString_type(type)+"].");
    52 #endif
    53 
    54             // find a free execute_unit
    55             for (std::list<uint32_t>::iterator it=_destination[i][num_thread][type].begin();
    56                  (it != _destination[i][num_thread][type].end()) and (ack == false);
    57                  it++)
    58               {
    59                 uint32_t dest = *it;
    60 
    61                 log_printf(TRACE,Read_unit_to_Execution_unit,FUNCTION,"   * Test destination [%d].",dest);
    62                            
    63                 if (execute_unit_use [dest] == false)
    64                   {
    65                     log_printf(TRACE,Read_unit_to_Execution_unit,FUNCTION,"     * Is ok! Link.");
    66                     // have find !!!
    67                     ack                     = true;
    68                     execute_unit_use [dest] = true;
    69 
    70                     if (_param->_have_port_context_id)
    71                     PORT_WRITE(out_EXECUTE_UNIT_IN_CONTEXT_ID            [dest], PORT_READ(in_READ_UNIT_OUT_CONTEXT_ID            [i]));
    72                     if (_param->_have_port_front_end_id)
    73                     PORT_WRITE(out_EXECUTE_UNIT_IN_FRONT_END_ID          [dest], PORT_READ(in_READ_UNIT_OUT_FRONT_END_ID          [i]));
    74                     if (_param->_have_port_ooo_engine_id)
    75                     PORT_WRITE(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID         [dest], PORT_READ(in_READ_UNIT_OUT_OOO_ENGINE_ID         [i]));
    76                     if (_param->_have_port_packet_id)
    77                     PORT_WRITE(out_EXECUTE_UNIT_IN_PACKET_ID             [dest], PORT_READ(in_READ_UNIT_OUT_PACKET_ID             [i]));
    78                     PORT_WRITE(out_EXECUTE_UNIT_IN_OPERATION             [dest], PORT_READ(in_READ_UNIT_OUT_OPERATION             [i]));
    79                     PORT_WRITE(out_EXECUTE_UNIT_IN_TYPE                  [dest], PORT_READ(in_READ_UNIT_OUT_TYPE                  [i]));
    80                     PORT_WRITE(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT          [dest], PORT_READ(in_READ_UNIT_OUT_HAS_IMMEDIAT          [i]));
    81                     PORT_WRITE(out_EXECUTE_UNIT_IN_DATA_RC               [dest], PORT_READ(in_READ_UNIT_OUT_DATA_RC               [i]));
    82                     PORT_WRITE(out_EXECUTE_UNIT_IN_WRITE_RD              [dest], PORT_READ(in_READ_UNIT_OUT_WRITE_RD              [i]));
    83                     PORT_WRITE(out_EXECUTE_UNIT_IN_WRITE_RE              [dest], PORT_READ(in_READ_UNIT_OUT_WRITE_RE              [i]));
    84                     PORT_WRITE(out_EXECUTE_UNIT_IN_NUM_REG_RE            [dest], PORT_READ(in_READ_UNIT_OUT_NUM_REG_RE            [i]));
    85                     PORT_WRITE(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [dest], PORT_READ(in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE [i]));
    86                     if (_param->_have_port_load_queue_ptr)
    87                     PORT_WRITE(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE  [dest], PORT_READ(in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE  [i]));
    88                     PORT_WRITE(out_EXECUTE_UNIT_IN_IMMEDIAT              [dest], PORT_READ(in_READ_UNIT_OUT_IMMEDIAT              [i]));
    89                     PORT_WRITE(out_EXECUTE_UNIT_IN_DATA_RA               [dest], PORT_READ(in_READ_UNIT_OUT_DATA_RA               [i]));
    90                     PORT_WRITE(out_EXECUTE_UNIT_IN_DATA_RB               [dest], PORT_READ(in_READ_UNIT_OUT_DATA_RB               [i]));
    91                     PORT_WRITE(out_EXECUTE_UNIT_IN_NUM_REG_RD            [dest], PORT_READ(in_READ_UNIT_OUT_NUM_REG_RD            [i]));
    92                   }
    93               }
    94           }
    95         PORT_WRITE(out_READ_UNIT_OUT_ACK [i], ack);
    96       }
     74                      if (_param->_have_port_context_id)
     75                      PORT_WRITE(out_EXECUTE_UNIT_IN_CONTEXT_ID            [dest][port], PORT_READ(in_READ_UNIT_OUT_CONTEXT_ID            [i][j]));
     76                      if (_param->_have_port_front_end_id)
     77                      PORT_WRITE(out_EXECUTE_UNIT_IN_FRONT_END_ID          [dest][port], PORT_READ(in_READ_UNIT_OUT_FRONT_END_ID          [i][j]));
     78                      if (_param->_have_port_ooo_engine_id)
     79                      PORT_WRITE(out_EXECUTE_UNIT_IN_OOO_ENGINE_ID         [dest][port], PORT_READ(in_READ_UNIT_OUT_OOO_ENGINE_ID         [i][j]));
     80                      if (_param->_have_port_rob_ptr  )
     81                      PORT_WRITE(out_EXECUTE_UNIT_IN_PACKET_ID             [dest][port], PORT_READ(in_READ_UNIT_OUT_PACKET_ID             [i][j]));
     82                      PORT_WRITE(out_EXECUTE_UNIT_IN_OPERATION             [dest][port], PORT_READ(in_READ_UNIT_OUT_OPERATION             [i][j]));
     83                      PORT_WRITE(out_EXECUTE_UNIT_IN_TYPE                  [dest][port], PORT_READ(in_READ_UNIT_OUT_TYPE                  [i][j]));
     84                      PORT_WRITE(out_EXECUTE_UNIT_IN_HAS_IMMEDIAT          [dest][port], PORT_READ(in_READ_UNIT_OUT_HAS_IMMEDIAT          [i][j]));
     85                      PORT_WRITE(out_EXECUTE_UNIT_IN_DATA_RC               [dest][port], PORT_READ(in_READ_UNIT_OUT_DATA_RC               [i][j]));
     86                      PORT_WRITE(out_EXECUTE_UNIT_IN_WRITE_RD              [dest][port], PORT_READ(in_READ_UNIT_OUT_WRITE_RD              [i][j]));
     87                      PORT_WRITE(out_EXECUTE_UNIT_IN_WRITE_RE              [dest][port], PORT_READ(in_READ_UNIT_OUT_WRITE_RE              [i][j]));
     88                      PORT_WRITE(out_EXECUTE_UNIT_IN_NUM_REG_RE            [dest][port], PORT_READ(in_READ_UNIT_OUT_NUM_REG_RE            [i][j]));
     89                      PORT_WRITE(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE [dest][port], PORT_READ(in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE [i][j]));
     90                      if (_param->_have_port_load_queue_ptr)
     91                      PORT_WRITE(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE  [dest][port], PORT_READ(in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE  [i][j]));
     92                      PORT_WRITE(out_EXECUTE_UNIT_IN_IMMEDIAT              [dest][port], PORT_READ(in_READ_UNIT_OUT_IMMEDIAT              [i][j]));
     93                      PORT_WRITE(out_EXECUTE_UNIT_IN_DATA_RA               [dest][port], PORT_READ(in_READ_UNIT_OUT_DATA_RA               [i][j]));
     94                      PORT_WRITE(out_EXECUTE_UNIT_IN_DATA_RB               [dest][port], PORT_READ(in_READ_UNIT_OUT_DATA_RB               [i][j]));
     95                      PORT_WRITE(out_EXECUTE_UNIT_IN_NUM_REG_RD            [dest][port], PORT_READ(in_READ_UNIT_OUT_NUM_REG_RD            [i][j]));
     96                    }
     97                }
     98            }
     99          PORT_WRITE(out_READ_UNIT_OUT_ACK [i][j], ack);
     100        }
    97101
    98102    for (uint32_t i=0; i<_param->_nb_execute_unit; i++)
    99       {
    100         PORT_WRITE(out_EXECUTE_UNIT_IN_VAL[i], execute_unit_use[i]); 
    101       }
     103      for (uint32_t j=0; j<_param->_nb_execute_unit_port[i]; j++)
     104        PORT_WRITE(out_EXECUTE_UNIT_IN_VAL[i][j], execute_unit_use[i][j]);
    102105
    103106    log_printf(FUNC,Read_unit_to_Execution_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Read_unit_to_Execution_unit_transition.cpp

    r81 r88  
    3434        // Fill routing table
    3535        for (uint32_t i=0; i<_param->_nb_read_unit; i++)
    36           for (uint32_t j=0; j<_param->_nb_execute_unit; j++)
    37             // Test if link between src and dest
    38             if (_param->_table_routing [i][j])
    39               // Test the thread accepted by the execute_unit
    40               for (uint32_t k=0; k<_param->_nb_thread; k++)
    41                 if (_param->_table_execute_thread[j][k])
    42                   // Test the type accepted by the execute_unit
    43                   for (uint32_t l=0; l<_param->_nb_type; l++)
    44                     if (_param->_table_execute_type [j][l])
    45                       // push_back == minor have a better priority
    46                       _destination [i][k][l].push_back(j);
     36          for (uint32_t x=0; x<_param->_nb_execute_unit; x++)
     37            for (uint32_t y=0; y<_param->_nb_execute_unit_port[x]; y++)
     38              // Test if link between src and dest
     39              if (_param->_table_routing [i][x][y])
     40                // Test the thread accepted by the execute_unit
     41                for (uint32_t k=0; k<_param->_nb_thread; k++)
     42                  if (_param->_table_execute_thread[x][k])
     43                    // Test the type accepted by the execute_unit
     44                    for (uint32_t l=0; l<_param->_nb_type; l++)
     45                      if (_param->_table_execute_type [x][l])
     46                        // push_back == minor have a better priority
     47                        _destination [i][k][l].push_back(destination_t(x,y));
    4748      }
    4849    else
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Register_unit_Glue_library_clean
    2525
     26local_clean                     :
     27
    2628include                         ../Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/include/test.h

    r81 r88  
    1515#include <sys/time.h>
    1616
     17#include "Common/include/Time.h"
    1718#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h"
    1819
     
    2930void test    (string name,
    3031              morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Parameters * param);
    31 
    32 class Time
    33 {
    34 private : timeval time_begin;
    35 // private : timeval time_end;
    36  
    37 public  : Time ()
    38   {
    39     gettimeofday(&time_begin     ,NULL);
    40   };
    41 
    42 public  : ~Time ()
    43   {
    44     cout << *this;
    45   };
    46 
    47 public  : friend ostream& operator<< (ostream& output_stream,
    48                                       const Time & x)
    49   {
    50     timeval time_end;
    51    
    52     gettimeofday(&time_end       ,NULL);
    53    
    54     uint32_t nb_cycles = static_cast<uint32_t>(sc_simulation_time());
    55 
    56     double average = static_cast<double>(nb_cycles) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec);
    57    
    58     output_stream << nb_cycles << "\t(" << average << " cycles / seconds )" << endl;
    59 
    60     return output_stream;
    61   }
    62 };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/src/main.cpp

    r81 r88  
    7474         _nb_spr_write     ,
    7575         _nb_inst_insert_rob,
    76          _nb_inst_retire_rob);
     76         _nb_inst_retire_rob,
     77         true //is_toplevel
     78         );
    7779     
    7880      cout << param->print(1);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/SelfTest/src/test.cpp

    r82 r88  
    2222#endif
    2323
     24  Tusage_t _usage = USE_ALL;
     25
     26//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     27//   _usage = usage_unset(_usage,USE_VHDL                 );
     28//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     30//   _usage = usage_unset(_usage,USE_POSITION             );
     31   _usage = usage_unset(_usage,USE_STATISTICS           );
     32//   _usage = usage_unset(_usage,USE_INFORMATION          );
     33
    2434  Register_unit_Glue * _Register_unit_Glue = new Register_unit_Glue
    2535    (name.c_str(),
     
    2838#endif
    2939     _param,
    30      USE_ALL);
     40     _usage);
    3141 
    3242#ifdef SYSTEMC
     
    8898  sc_signal<Tcontrol_t        >  ***  in_INSERT_ROB_SPR_STATUS_ACK            ;
    8999
    90   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_VAL                       ;
    91   sc_signal<Tcontrol_t        >  *** out_RETIRE_ROB_ACK                       ;
    92   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RD_OLD_USE                ;
    93   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RD_NEW_USE                ;
    94   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RE_OLD_USE                ;
    95   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RE_NEW_USE                ;
    96   sc_signal<Tcontrol_t        >  *** out_RETIRE_ROB_GPR_STATUS_NEW_VAL        ;
    97   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_GPR_STATUS_NEW_ACK        ;
    98   sc_signal<Tcontrol_t        >  *** out_RETIRE_ROB_GPR_STATUS_OLD_VAL        ;
    99   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_GPR_STATUS_OLD_ACK        ;
    100   sc_signal<Tcontrol_t        >  *** out_RETIRE_ROB_SPR_STATUS_NEW_VAL        ;
    101   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_SPR_STATUS_NEW_ACK        ;
    102   sc_signal<Tcontrol_t        >  *** out_RETIRE_ROB_SPR_STATUS_OLD_VAL        ;
    103   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_SPR_STATUS_OLD_ACK        ;
     100//   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_VAL                       ;
     101//   sc_signal<Tcontrol_t        >  *** out_RETIRE_ROB_ACK                       ;
     102//   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RD_OLD_USE                ;
     103//   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RD_NEW_USE                ;
     104//   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RE_OLD_USE                ;
     105//   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RE_NEW_USE                ;
     106//   sc_signal<Tcontrol_t        >  *** out_RETIRE_ROB_GPR_STATUS_NEW_VAL        ;
     107//   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_GPR_STATUS_NEW_ACK        ;
     108//   sc_signal<Tcontrol_t        >  *** out_RETIRE_ROB_GPR_STATUS_OLD_VAL        ;
     109//   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_GPR_STATUS_OLD_ACK        ;
     110//   sc_signal<Tcontrol_t        >  *** out_RETIRE_ROB_SPR_STATUS_NEW_VAL        ;
     111//   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_SPR_STATUS_NEW_ACK        ;
     112//   sc_signal<Tcontrol_t        >  *** out_RETIRE_ROB_SPR_STATUS_OLD_VAL        ;
     113//   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_SPR_STATUS_OLD_ACK        ;
    104114
    105115  string rename;
     
    294304      }
    295305
    296     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    297     in_RETIRE_ROB_VAL                      = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
    298    out_RETIRE_ROB_ACK                      = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
    299     in_RETIRE_ROB_RD_OLD_USE               = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
    300     in_RETIRE_ROB_RD_NEW_USE               = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
    301     in_RETIRE_ROB_RE_OLD_USE               = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
    302     in_RETIRE_ROB_RE_NEW_USE               = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
    303    out_RETIRE_ROB_GPR_STATUS_OLD_VAL       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
    304    out_RETIRE_ROB_GPR_STATUS_NEW_VAL       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
    305     in_RETIRE_ROB_GPR_STATUS_OLD_ACK       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
    306     in_RETIRE_ROB_GPR_STATUS_NEW_ACK       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
    307    out_RETIRE_ROB_SPR_STATUS_OLD_VAL       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
    308    out_RETIRE_ROB_SPR_STATUS_NEW_VAL       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
    309     in_RETIRE_ROB_SPR_STATUS_OLD_ACK       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
    310     in_RETIRE_ROB_SPR_STATUS_NEW_ACK       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
    311 
    312     for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    313       {
    314         uint32_t x=_param->_nb_inst_retire_rob [i];
    315 
    316          in_RETIRE_ROB_VAL                      [i] = new sc_signal<Tcontrol_t> * [x];
    317         out_RETIRE_ROB_ACK                      [i] = new sc_signal<Tcontrol_t> * [x];
    318          in_RETIRE_ROB_RD_OLD_USE               [i] = new sc_signal<Tcontrol_t> * [x];
    319          in_RETIRE_ROB_RD_NEW_USE               [i] = new sc_signal<Tcontrol_t> * [x];
    320          in_RETIRE_ROB_RE_OLD_USE               [i] = new sc_signal<Tcontrol_t> * [x];
    321          in_RETIRE_ROB_RE_NEW_USE               [i] = new sc_signal<Tcontrol_t> * [x];
    322         out_RETIRE_ROB_GPR_STATUS_OLD_VAL       [i] = new sc_signal<Tcontrol_t> * [x];
    323         out_RETIRE_ROB_GPR_STATUS_NEW_VAL       [i] = new sc_signal<Tcontrol_t> * [x];
    324          in_RETIRE_ROB_GPR_STATUS_OLD_ACK       [i] = new sc_signal<Tcontrol_t> * [x];
    325          in_RETIRE_ROB_GPR_STATUS_NEW_ACK       [i] = new sc_signal<Tcontrol_t> * [x];
    326         out_RETIRE_ROB_SPR_STATUS_OLD_VAL       [i] = new sc_signal<Tcontrol_t> * [x];
    327         out_RETIRE_ROB_SPR_STATUS_NEW_VAL       [i] = new sc_signal<Tcontrol_t> * [x];
    328          in_RETIRE_ROB_SPR_STATUS_OLD_ACK       [i] = new sc_signal<Tcontrol_t> * [x];
    329          in_RETIRE_ROB_SPR_STATUS_NEW_ACK       [i] = new sc_signal<Tcontrol_t> * [x];
     306//     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     307//     in_RETIRE_ROB_VAL                      = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
     308//    out_RETIRE_ROB_ACK                      = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
     309//     in_RETIRE_ROB_RD_OLD_USE               = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
     310//     in_RETIRE_ROB_RD_NEW_USE               = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
     311//     in_RETIRE_ROB_RE_OLD_USE               = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
     312//     in_RETIRE_ROB_RE_NEW_USE               = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
     313//    out_RETIRE_ROB_GPR_STATUS_OLD_VAL       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
     314//    out_RETIRE_ROB_GPR_STATUS_NEW_VAL       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
     315//     in_RETIRE_ROB_GPR_STATUS_OLD_ACK       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
     316//     in_RETIRE_ROB_GPR_STATUS_NEW_ACK       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
     317//    out_RETIRE_ROB_SPR_STATUS_OLD_VAL       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
     318//    out_RETIRE_ROB_SPR_STATUS_NEW_VAL       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
     319//     in_RETIRE_ROB_SPR_STATUS_OLD_ACK       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
     320//     in_RETIRE_ROB_SPR_STATUS_NEW_ACK       = new sc_signal<Tcontrol_t> ** [_param->_nb_ooo_engine];
     321
     322//     for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     323//       {
     324//      uint32_t x=_param->_nb_inst_retire_rob [i];
     325
     326//       in_RETIRE_ROB_VAL                      [i] = new sc_signal<Tcontrol_t> * [x];
     327//      out_RETIRE_ROB_ACK                      [i] = new sc_signal<Tcontrol_t> * [x];
     328//       in_RETIRE_ROB_RD_OLD_USE               [i] = new sc_signal<Tcontrol_t> * [x];
     329//       in_RETIRE_ROB_RD_NEW_USE               [i] = new sc_signal<Tcontrol_t> * [x];
     330//       in_RETIRE_ROB_RE_OLD_USE               [i] = new sc_signal<Tcontrol_t> * [x];
     331//       in_RETIRE_ROB_RE_NEW_USE               [i] = new sc_signal<Tcontrol_t> * [x];
     332//      out_RETIRE_ROB_GPR_STATUS_OLD_VAL       [i] = new sc_signal<Tcontrol_t> * [x];
     333//      out_RETIRE_ROB_GPR_STATUS_NEW_VAL       [i] = new sc_signal<Tcontrol_t> * [x];
     334//       in_RETIRE_ROB_GPR_STATUS_OLD_ACK       [i] = new sc_signal<Tcontrol_t> * [x];
     335//       in_RETIRE_ROB_GPR_STATUS_NEW_ACK       [i] = new sc_signal<Tcontrol_t> * [x];
     336//      out_RETIRE_ROB_SPR_STATUS_OLD_VAL       [i] = new sc_signal<Tcontrol_t> * [x];
     337//      out_RETIRE_ROB_SPR_STATUS_NEW_VAL       [i] = new sc_signal<Tcontrol_t> * [x];
     338//       in_RETIRE_ROB_SPR_STATUS_OLD_ACK       [i] = new sc_signal<Tcontrol_t> * [x];
     339//       in_RETIRE_ROB_SPR_STATUS_NEW_ACK       [i] = new sc_signal<Tcontrol_t> * [x];
    330340   
    331         for (uint32_t j=0; j<x; j++)
    332           {
    333                in_RETIRE_ROB_VAL                      [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
    334               out_RETIRE_ROB_ACK                      [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
    335                in_RETIRE_ROB_RD_OLD_USE               [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
    336                in_RETIRE_ROB_RD_NEW_USE               [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
    337                in_RETIRE_ROB_RE_OLD_USE               [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
    338                in_RETIRE_ROB_RE_NEW_USE               [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
    339               out_RETIRE_ROB_GPR_STATUS_OLD_VAL       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
    340                in_RETIRE_ROB_GPR_STATUS_OLD_ACK       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
    341               out_RETIRE_ROB_GPR_STATUS_NEW_VAL       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
    342                in_RETIRE_ROB_GPR_STATUS_NEW_ACK       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
    343               out_RETIRE_ROB_SPR_STATUS_OLD_VAL       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
    344                in_RETIRE_ROB_SPR_STATUS_OLD_ACK       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
    345               out_RETIRE_ROB_SPR_STATUS_NEW_VAL       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
    346                in_RETIRE_ROB_SPR_STATUS_NEW_ACK       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
    347             }
    348       }
     341//      for (uint32_t j=0; j<x; j++)
     342//        {
     343//             in_RETIRE_ROB_VAL                      [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
     344//            out_RETIRE_ROB_ACK                      [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
     345//             in_RETIRE_ROB_RD_OLD_USE               [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
     346//             in_RETIRE_ROB_RD_NEW_USE               [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
     347//             in_RETIRE_ROB_RE_OLD_USE               [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
     348//             in_RETIRE_ROB_RE_NEW_USE               [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
     349//            out_RETIRE_ROB_GPR_STATUS_OLD_VAL       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
     350//             in_RETIRE_ROB_GPR_STATUS_OLD_ACK       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
     351//            out_RETIRE_ROB_GPR_STATUS_NEW_VAL       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
     352//             in_RETIRE_ROB_GPR_STATUS_NEW_ACK       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
     353//            out_RETIRE_ROB_SPR_STATUS_OLD_VAL       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
     354//             in_RETIRE_ROB_SPR_STATUS_OLD_ACK       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
     355//            out_RETIRE_ROB_SPR_STATUS_NEW_VAL       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
     356//             in_RETIRE_ROB_SPR_STATUS_NEW_ACK       [i][j] = new sc_signal<Tcontrol_t> (rename.c_str());
     357//          }
     358//       }
    349359   
    350360
     
    451461      }
    452462
    453     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    454 
    455     for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    456       {
    457         uint32_t x=_param->_nb_inst_retire_rob [i];
    458 
    459         for (uint32_t j=0; j<x; j++)
    460           {
    461             (*(_Register_unit_Glue-> in_RETIRE_ROB_VAL                [i][j]))(*( in_RETIRE_ROB_VAL                [i][j]));
    462             (*(_Register_unit_Glue->out_RETIRE_ROB_ACK                [i][j]))(*(out_RETIRE_ROB_ACK                [i][j]));
    463             (*(_Register_unit_Glue-> in_RETIRE_ROB_RD_OLD_USE         [i][j]))(*( in_RETIRE_ROB_RD_OLD_USE         [i][j]));
    464             (*(_Register_unit_Glue-> in_RETIRE_ROB_RD_NEW_USE         [i][j]))(*( in_RETIRE_ROB_RD_NEW_USE         [i][j]));
    465             (*(_Register_unit_Glue-> in_RETIRE_ROB_RE_OLD_USE         [i][j]))(*( in_RETIRE_ROB_RE_OLD_USE         [i][j]));
    466             (*(_Register_unit_Glue-> in_RETIRE_ROB_RE_NEW_USE         [i][j]))(*( in_RETIRE_ROB_RE_NEW_USE         [i][j]));
    467             (*(_Register_unit_Glue->out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]));
    468             (*(_Register_unit_Glue-> in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]));
    469             (*(_Register_unit_Glue->out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]));
    470             (*(_Register_unit_Glue-> in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]));
    471             (*(_Register_unit_Glue->out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]));
    472             (*(_Register_unit_Glue-> in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]));
    473             (*(_Register_unit_Glue->out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]));
    474             (*(_Register_unit_Glue-> in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]));
    475             }
    476       }
     463//     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     464
     465//     for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     466//       {
     467//      uint32_t x=_param->_nb_inst_retire_rob [i];
     468
     469//      for (uint32_t j=0; j<x; j++)
     470//        {
     471//          (*(_Register_unit_Glue-> in_RETIRE_ROB_VAL                [i][j]))(*( in_RETIRE_ROB_VAL                [i][j]));
     472//          (*(_Register_unit_Glue->out_RETIRE_ROB_ACK                [i][j]))(*(out_RETIRE_ROB_ACK                [i][j]));
     473//          (*(_Register_unit_Glue-> in_RETIRE_ROB_RD_OLD_USE         [i][j]))(*( in_RETIRE_ROB_RD_OLD_USE         [i][j]));
     474//          (*(_Register_unit_Glue-> in_RETIRE_ROB_RD_NEW_USE         [i][j]))(*( in_RETIRE_ROB_RD_NEW_USE         [i][j]));
     475//          (*(_Register_unit_Glue-> in_RETIRE_ROB_RE_OLD_USE         [i][j]))(*( in_RETIRE_ROB_RE_OLD_USE         [i][j]));
     476//          (*(_Register_unit_Glue-> in_RETIRE_ROB_RE_NEW_USE         [i][j]))(*( in_RETIRE_ROB_RE_NEW_USE         [i][j]));
     477//          (*(_Register_unit_Glue->out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]));
     478//          (*(_Register_unit_Glue-> in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]));
     479//          (*(_Register_unit_Glue->out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]));
     480//          (*(_Register_unit_Glue-> in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]));
     481//          (*(_Register_unit_Glue->out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]));
     482//          (*(_Register_unit_Glue-> in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]));
     483//          (*(_Register_unit_Glue->out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]));
     484//          (*(_Register_unit_Glue-> in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]));
     485//          }
     486//       }
    477487   
    478488  cout << "<" << name << "> Start Simulation ............" << endl;
     
    487497  const bool     test_write  = true;
    488498  const bool     test_insert = true;
    489   const bool     test_retire = true;
     499//   const bool     test_retire = true;
    490500
    491501  const  int32_t percent_transaction = 75;
     
    517527  Tcontrol_t      spr_write_status_val       [_param->_nb_ooo_engine][_param->_nb_spr_write];
    518528
    519   uint32_t        max_nb_inst_retire_rob = 0;
    520 
    521   for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    522     if (_param->_nb_inst_retire_rob [i] > max_nb_inst_retire_rob)
    523       max_nb_inst_retire_rob = _param->_nb_inst_retire_rob [i];
    524 
    525   Tcontrol_t      retire_rob_ack                [_param->_nb_ooo_engine][max_nb_inst_retire_rob];
    526   Tcontrol_t      retire_rob_gpr_status_new_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob];
    527   Tcontrol_t      retire_rob_gpr_status_old_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob];
    528   Tcontrol_t      retire_rob_spr_status_new_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob];
    529   Tcontrol_t      retire_rob_spr_status_old_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob];
     529//   uint32_t        max_nb_inst_retire_rob = 0;
     530
     531//   for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     532//     if (_param->_nb_inst_retire_rob [i] > max_nb_inst_retire_rob)
     533//       max_nb_inst_retire_rob = _param->_nb_inst_retire_rob [i];
     534
     535//   Tcontrol_t      retire_rob_ack                [_param->_nb_ooo_engine][max_nb_inst_retire_rob];
     536//   Tcontrol_t      retire_rob_gpr_status_new_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob];
     537//   Tcontrol_t      retire_rob_gpr_status_old_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob];
     538//   Tcontrol_t      retire_rob_spr_status_new_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob];
     539//   Tcontrol_t      retire_rob_spr_status_old_val [_param->_nb_ooo_engine][max_nb_inst_retire_rob];
    530540
    531541  uint32_t        max_nb_inst_insert_rob = 0;
     
    706716        }
    707717     
    708       if (test_retire == true)
    709         {
    710           for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    711             {
    712               uint32_t x = _param->_nb_inst_retire_rob [i];
    713 
    714               for (uint32_t j=0; j<x; j++)
    715                 {
    716                 Tcontrol_t val                = (rand()%100)<=percent_transaction;
    717                 Tcontrol_t rd_old_use         = (rand()%100)<=percent_transaction;
    718                 Tcontrol_t rd_new_use         = (rand()%100)<=percent_transaction;
    719                 Tcontrol_t re_old_use         = (rand()%100)<=percent_transaction;
    720                 Tcontrol_t re_new_use         = (rand()%100)<=percent_transaction;
    721                 Tcontrol_t gpr_status_old_ack = (rand()%100)<=percent_transaction;
    722                 Tcontrol_t gpr_status_new_ack = (rand()%100)<=percent_transaction;
    723                 Tcontrol_t spr_status_old_ack = (rand()%100)<=percent_transaction;
    724                 Tcontrol_t spr_status_new_ack = (rand()%100)<=percent_transaction;
    725                  
    726                 in_RETIRE_ROB_VAL                [i][j]->write(val               );
    727                 in_RETIRE_ROB_RD_OLD_USE         [i][j]->write(rd_old_use        );
    728                 in_RETIRE_ROB_RD_NEW_USE         [i][j]->write(rd_new_use        );
    729                 in_RETIRE_ROB_RE_OLD_USE         [i][j]->write(re_old_use        );
    730                 in_RETIRE_ROB_RE_NEW_USE         [i][j]->write(re_new_use        );
    731                 in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]->write(gpr_status_old_ack);
    732                 in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]->write(gpr_status_new_ack);
    733                 in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]->write(spr_status_old_ack);
    734                 in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]->write(spr_status_new_ack);
     718//       if (test_retire == true)
     719//      {
     720//        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     721//          {
     722//            uint32_t x = _param->_nb_inst_retire_rob [i];
     723
     724//            for (uint32_t j=0; j<x; j++)
     725//              {
     726//              Tcontrol_t val                = (rand()%100)<=percent_transaction;
     727//              Tcontrol_t rd_old_use         = (rand()%100)<=percent_transaction;
     728//              Tcontrol_t rd_new_use         = (rand()%100)<=percent_transaction;
     729//              Tcontrol_t re_old_use         = (rand()%100)<=percent_transaction;
     730//              Tcontrol_t re_new_use         = (rand()%100)<=percent_transaction;
     731//              Tcontrol_t gpr_status_old_ack = (rand()%100)<=percent_transaction;
     732//              Tcontrol_t gpr_status_new_ack = (rand()%100)<=percent_transaction;
     733//              Tcontrol_t spr_status_old_ack = (rand()%100)<=percent_transaction;
     734//              Tcontrol_t spr_status_new_ack = (rand()%100)<=percent_transaction;
     735                 
     736//              in_RETIRE_ROB_VAL                [i][j]->write(val               );
     737//              in_RETIRE_ROB_RD_OLD_USE         [i][j]->write(rd_old_use        );
     738//              in_RETIRE_ROB_RD_NEW_USE         [i][j]->write(rd_new_use        );
     739//              in_RETIRE_ROB_RE_OLD_USE         [i][j]->write(re_old_use        );
     740//              in_RETIRE_ROB_RE_NEW_USE         [i][j]->write(re_new_use        );
     741//              in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]->write(gpr_status_old_ack);
     742//              in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]->write(gpr_status_new_ack);
     743//              in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]->write(spr_status_old_ack);
     744//              in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]->write(spr_status_new_ack);
    735745               
    736                 retire_rob_ack                [i][j] = (gpr_status_new_ack and
    737                                                         gpr_status_old_ack and
    738                                                         spr_status_new_ack and
    739                                                         spr_status_old_ack);
    740 
    741 
    742                 retire_rob_gpr_status_old_val [i][j] = val and rd_old_use                        and gpr_status_new_ack and spr_status_old_ack and spr_status_new_ack;
    743                 retire_rob_gpr_status_new_val [i][j] = val and rd_new_use and gpr_status_old_ack                        and spr_status_old_ack and spr_status_new_ack;
    744                 retire_rob_spr_status_old_val [i][j] = val and re_old_use and gpr_status_old_ack and gpr_status_new_ack                        and spr_status_new_ack;
    745                 retire_rob_spr_status_new_val [i][j] = val and re_new_use and gpr_status_old_ack and gpr_status_new_ack and spr_status_old_ack                       ;
    746                 }
    747             }
    748         }
     746//              retire_rob_ack                [i][j] = (gpr_status_new_ack and
     747//                                                      gpr_status_old_ack and
     748//                                                      spr_status_new_ack and
     749//                                                      spr_status_old_ack);
     750
     751
     752//              retire_rob_gpr_status_old_val [i][j] = val and rd_old_use                        and gpr_status_new_ack and spr_status_old_ack and spr_status_new_ack;
     753//              retire_rob_gpr_status_new_val [i][j] = val and rd_new_use and gpr_status_old_ack                        and spr_status_old_ack and spr_status_new_ack;
     754//              retire_rob_spr_status_old_val [i][j] = val and re_old_use and gpr_status_old_ack and gpr_status_new_ack                        and spr_status_new_ack;
     755//              retire_rob_spr_status_new_val [i][j] = val and re_new_use and gpr_status_old_ack and gpr_status_new_ack and spr_status_old_ack                       ;
     756//              }
     757//          }
     758//      }
    749759
    750760      if (test_insert == true)
     
    837847
    838848
    839       if (test_retire == true)
    840         {
    841           for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    842             {
    843               uint32_t x = _param->_nb_inst_retire_rob [i];
    844 
    845               for (uint32_t j=0; j<x; j++)
    846                 {
    847                   TEST(Tcontrol_t, out_RETIRE_ROB_ACK                [i][j]->read(), retire_rob_ack                [i][j]);
    848                   TEST(Tcontrol_t, out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]->read(), retire_rob_gpr_status_old_val [i][j]);
    849                   TEST(Tcontrol_t, out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]->read(), retire_rob_gpr_status_new_val [i][j]);
    850                   TEST(Tcontrol_t, out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]->read(), retire_rob_spr_status_old_val [i][j]);
    851                   TEST(Tcontrol_t, out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]->read(), retire_rob_spr_status_new_val [i][j]);
    852                 }
    853             }
    854         }
     849//       if (test_retire == true)
     850//      {
     851//        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     852//          {
     853//            uint32_t x = _param->_nb_inst_retire_rob [i];
     854
     855//            for (uint32_t j=0; j<x; j++)
     856//              {
     857//                TEST(Tcontrol_t, out_RETIRE_ROB_ACK                [i][j]->read(), retire_rob_ack                [i][j]);
     858//                TEST(Tcontrol_t, out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]->read(), retire_rob_gpr_status_old_val [i][j]);
     859//                TEST(Tcontrol_t, out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]->read(), retire_rob_gpr_status_new_val [i][j]);
     860//                TEST(Tcontrol_t, out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]->read(), retire_rob_spr_status_old_val [i][j]);
     861//                TEST(Tcontrol_t, out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]->read(), retire_rob_spr_status_new_val [i][j]);
     862//              }
     863//          }
     864//      }
    855865
    856866      if (test_insert == true)
     
    927937  delete [] out_INSERT_ROB_SPR_STATUS_VAL       ;
    928938  delete []  in_INSERT_ROB_SPR_STATUS_ACK       ;
    929   delete []  in_RETIRE_ROB_VAL                      ;
    930   delete [] out_RETIRE_ROB_ACK                      ;
    931   delete []  in_RETIRE_ROB_RD_OLD_USE               ;
    932   delete []  in_RETIRE_ROB_RD_NEW_USE               ;
    933   delete []  in_RETIRE_ROB_RE_OLD_USE               ;
    934   delete []  in_RETIRE_ROB_RE_NEW_USE               ;
    935   delete [] out_RETIRE_ROB_GPR_STATUS_OLD_VAL       ;
    936   delete [] out_RETIRE_ROB_GPR_STATUS_NEW_VAL       ;
    937   delete []  in_RETIRE_ROB_GPR_STATUS_OLD_ACK       ;
    938   delete []  in_RETIRE_ROB_GPR_STATUS_NEW_ACK       ;
    939   delete [] out_RETIRE_ROB_SPR_STATUS_OLD_VAL       ;
    940   delete [] out_RETIRE_ROB_SPR_STATUS_NEW_VAL       ;
    941   delete []  in_RETIRE_ROB_SPR_STATUS_OLD_ACK       ;
    942   delete []  in_RETIRE_ROB_SPR_STATUS_NEW_ACK       ;
     939//   delete []  in_RETIRE_ROB_VAL                      ;
     940//   delete [] out_RETIRE_ROB_ACK                      ;
     941//   delete []  in_RETIRE_ROB_RD_OLD_USE               ;
     942//   delete []  in_RETIRE_ROB_RD_NEW_USE               ;
     943//   delete []  in_RETIRE_ROB_RE_OLD_USE               ;
     944//   delete []  in_RETIRE_ROB_RE_NEW_USE               ;
     945//   delete [] out_RETIRE_ROB_GPR_STATUS_OLD_VAL       ;
     946//   delete [] out_RETIRE_ROB_GPR_STATUS_NEW_VAL       ;
     947//   delete []  in_RETIRE_ROB_GPR_STATUS_OLD_ACK       ;
     948//   delete []  in_RETIRE_ROB_GPR_STATUS_NEW_ACK       ;
     949//   delete [] out_RETIRE_ROB_SPR_STATUS_OLD_VAL       ;
     950//   delete [] out_RETIRE_ROB_SPR_STATUS_NEW_VAL       ;
     951//   delete []  in_RETIRE_ROB_SPR_STATUS_OLD_ACK       ;
     952//   delete []  in_RETIRE_ROB_SPR_STATUS_NEW_ACK       ;
    943953
    944954#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Parameters.h

    r81 r88  
    2222
    2323
     24
     25
    2426  class Parameters : public morpheo::behavioural::Parameters
    2527  {
    2628    //-----[ fields ]------------------------------------------------------------
    27   public : const uint32_t    _nb_ooo_engine        ;
    28   public : const uint32_t    _size_general_data    ;
    29   public : const uint32_t    _size_special_data    ;
    30   public : const uint32_t    _nb_gpr_read          ;
    31   public : const uint32_t    _nb_spr_read          ;   
    32   public : const uint32_t    _nb_gpr_write         ;
    33   public : const uint32_t    _nb_spr_write         ;
    34   public : const uint32_t  * _nb_inst_insert_rob   ;
    35   public : const uint32_t  * _nb_inst_retire_rob   ;
     29  public : uint32_t    _nb_ooo_engine        ;
     30//public : uint32_t    _size_general_data    ;
     31//public : uint32_t    _size_special_data    ;
     32  public : uint32_t    _nb_gpr_read          ;
     33  public : uint32_t    _nb_spr_read          ;   
     34  public : uint32_t    _nb_gpr_write         ;
     35  public : uint32_t    _nb_spr_write         ;
     36  public : uint32_t  * _nb_inst_insert_rob   ;
     37  public : uint32_t  * _nb_inst_retire_rob   ;
    3638
    37   public : const bool        _have_port_ooo_engine_id;
     39//public : bool        _have_port_ooo_engine_id;
    3840   
    3941    //-----[ methods ]-----------------------------------------------------------
    40   public : Parameters  (const uint32_t   nb_ooo_engine        ,
    41                         const uint32_t   size_general_data    ,
    42                         const uint32_t   size_special_data    ,
    43                         const uint32_t   nb_gpr_read          ,
    44                         const uint32_t   nb_spr_read          ,   
    45                         const uint32_t   nb_gpr_write         ,
    46                         const uint32_t   nb_spr_write         ,
    47                         const uint32_t * nb_inst_insert_rob   ,
    48                         const uint32_t * nb_inst_retire_rob   );
    49   public : Parameters  (Parameters & param) ;
     42  public : Parameters  (uint32_t   nb_ooo_engine        ,
     43                        uint32_t   size_general_data    ,
     44                        uint32_t   size_special_data    ,
     45                        uint32_t   nb_gpr_read          ,
     46                        uint32_t   nb_spr_read          ,   
     47                        uint32_t   nb_gpr_write         ,
     48                        uint32_t   nb_spr_write         ,
     49                        uint32_t * nb_inst_insert_rob   ,
     50                        uint32_t * nb_inst_retire_rob   ,
     51                        bool       is_toplevel=false);
     52//public : Parameters  (Parameters & param) ;
    5053  public : ~Parameters () ;
    51 
     54   
     55  public :        void            copy       (void);
     56   
    5257  public :        Parameters_test msg_error  (void);
    5358
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h

    r82 r88  
    128128  public    : SC_IN (Tcontrol_t        )  ***  in_INSERT_ROB_SPR_STATUS_ACK            ;
    129129
    130     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    131   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_VAL                       ;
    132   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_ROB_ACK                       ;
    133   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RD_OLD_USE                ;
    134   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RD_NEW_USE                ;
    135   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RE_OLD_USE                ;
    136   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RE_NEW_USE                ;
    137 
    138   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_ROB_GPR_STATUS_NEW_VAL        ;
    139   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_GPR_STATUS_NEW_ACK        ;
    140   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_ROB_GPR_STATUS_OLD_VAL        ;
    141   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_GPR_STATUS_OLD_ACK        ;
    142 
    143   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_ROB_SPR_STATUS_NEW_VAL        ;
    144   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_SPR_STATUS_NEW_ACK        ;
    145   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_ROB_SPR_STATUS_OLD_VAL        ;
    146   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_SPR_STATUS_OLD_ACK        ;
     130//     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     131//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_VAL                       ;
     132//   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_ROB_ACK                       ;
     133//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RD_OLD_USE                ;
     134//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RD_NEW_USE                ;
     135//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RE_OLD_USE                ;
     136//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RE_NEW_USE                ;
     137
     138//   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_ROB_GPR_STATUS_NEW_VAL        ;
     139//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_GPR_STATUS_NEW_ACK        ;
     140//   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_ROB_GPR_STATUS_OLD_VAL        ;
     141//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_GPR_STATUS_OLD_ACK        ;
     142
     143//   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_ROB_SPR_STATUS_NEW_VAL        ;
     144//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_SPR_STATUS_NEW_ACK        ;
     145//   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_ROB_SPR_STATUS_OLD_VAL        ;
     146//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_SPR_STATUS_OLD_ACK        ;
    147147
    148148    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Parameters.cpp

    r81 r88  
    1919#undef  FUNCTION
    2020#define FUNCTION "Register_unit_Glue::Parameters"
    21   Parameters::Parameters (const uint32_t   nb_ooo_engine        ,
    22                           const uint32_t   size_general_data    ,
    23                           const uint32_t   size_special_data    ,
    24                           const uint32_t   nb_gpr_read          ,
    25                           const uint32_t   nb_spr_read          ,   
    26                           const uint32_t   nb_gpr_write         ,
    27                           const uint32_t   nb_spr_write         ,
    28                           const uint32_t * nb_inst_insert_rob   ,
    29                           const uint32_t * nb_inst_retire_rob   ):
    30     _nb_ooo_engine        (nb_ooo_engine    ),
    31     _size_general_data    (size_general_data),
    32     _size_special_data    (size_special_data),
    33     _nb_gpr_read          (nb_gpr_read      ),
    34     _nb_spr_read          (nb_spr_read      ),   
    35     _nb_gpr_write         (nb_gpr_write     ),
    36     _nb_spr_write         (nb_spr_write     ),
    37     _nb_inst_insert_rob   (nb_inst_insert_rob),
    38     _nb_inst_retire_rob   (nb_inst_retire_rob),
    39     _have_port_ooo_engine_id (nb_ooo_engine>1)
     21  Parameters::Parameters (uint32_t   nb_ooo_engine        ,
     22                          uint32_t   size_general_data    ,
     23                          uint32_t   size_special_data    ,
     24                          uint32_t   nb_gpr_read          ,
     25                          uint32_t   nb_spr_read          ,   
     26                          uint32_t   nb_gpr_write         ,
     27                          uint32_t   nb_spr_write         ,
     28                          uint32_t * nb_inst_insert_rob   ,
     29                          uint32_t * nb_inst_retire_rob   ,
     30                          bool       is_toplevel          )
    4031  {
    4132    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     33   
     34    _nb_ooo_engine           = nb_ooo_engine     ;
     35    _nb_gpr_read             = nb_gpr_read       ;
     36    _nb_spr_read             = nb_spr_read       ;   
     37    _nb_gpr_write            = nb_gpr_write      ;
     38    _nb_spr_write            = nb_spr_write      ;
     39    _nb_inst_insert_rob      = nb_inst_insert_rob;
     40    _nb_inst_retire_rob      = nb_inst_retire_rob;
     41
    4242    test();
     43
     44    if (is_toplevel)
     45      {
     46        _size_ooo_engine_id      = log2(nb_ooo_engine);
     47        _size_general_data       = size_general_data ;
     48        _size_special_data       = size_special_data ;
     49       
     50        _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
     51
     52        copy();
     53      }
     54
    4355    log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
    4456  };
    4557 
     58// #undef  FUNCTION
     59// #define FUNCTION "Register_unit_Glue::Parameters (copy)"
     60//   Parameters::Parameters (Parameters & param):
     61//     _nb_ooo_engine        (param._nb_ooo_engine    ),
     62//     _size_general_data    (param._size_general_data),
     63//     _size_special_data    (param._size_special_data),
     64//     _nb_gpr_read          (param._nb_gpr_read      ),
     65//     _nb_spr_read          (param._nb_spr_read      ),   
     66//     _nb_gpr_write         (param._nb_gpr_write     ),
     67//     _nb_spr_write         (param._nb_spr_write     ),
     68//     _nb_inst_insert_rob   (param._nb_inst_insert_rob),
     69//     _nb_inst_retire_rob   (param._nb_inst_retire_rob),
     70//     _have_port_ooo_engine_id (param._have_port_ooo_engine_id)
     71//   {
     72//     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     73//     test();
     74//     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     75//   };
     76
    4677#undef  FUNCTION
    47 #define FUNCTION "Register_unit_Glue::Parameters (copy)"
    48   Parameters::Parameters (Parameters & param):
    49     _nb_ooo_engine        (param._nb_ooo_engine    ),
    50     _size_general_data    (param._size_general_data),
    51     _size_special_data    (param._size_special_data),
    52     _nb_gpr_read          (param._nb_gpr_read      ),
    53     _nb_spr_read          (param._nb_spr_read      ),   
    54     _nb_gpr_write         (param._nb_gpr_write     ),
    55     _nb_spr_write         (param._nb_spr_write     ),
    56     _nb_inst_insert_rob   (param._nb_inst_insert_rob),
    57     _nb_inst_retire_rob   (param._nb_inst_retire_rob),
    58     _have_port_ooo_engine_id (param._have_port_ooo_engine_id)
     78#define FUNCTION "Register_unit_Glue::~Parameters"
     79  Parameters::~Parameters (void)
    5980  {
    6081    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
    61     test();
    6282    log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
    6383  };
    6484
    6585#undef  FUNCTION
    66 #define FUNCTION "Register_unit_Glue::~Parameters"
    67   Parameters::~Parameters ()
     86#define FUNCTION "Register_unit_Glue::copy"
     87  void Parameters::copy (void)
    6888  {
    6989    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue.cpp

    r81 r88  
    3838    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
    3939
     40#if DEBUG_Register_unit_Glue == true
     41    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif   
     45
    4046    log_printf(INFO,Register_unit_Glue,FUNCTION,"Allocation");
    4147    allocation ();
    4248
    4349#ifdef STATISTICS
    44     log_printf(INFO,Register_unit_Glue,FUNCTION,"Allocation of statistics");
    45 
    46     // Allocation of statistics
    47     statistics_declaration(param_statistics);
     50    if (usage_is_set(_usage,USE_STATISTICS))
     51      {
     52        log_printf(INFO,Register_unit_Glue,FUNCTION,"Allocation of statistics");
     53       
     54        // Allocation of statistics
     55        statistics_declaration(param_statistics);
     56      }
    4857#endif
    4958
    5059#ifdef VHDL
    51     // generate the vhdl
    52     log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate the vhdl");
    53 
    54     vhdl();
     60    if (usage_is_set(_usage,USE_VHDL))
     61      {
     62        // generate the vhdl
     63        log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate the vhdl");
     64       
     65        vhdl();
     66      }
    5567#endif
    5668
    5769#ifdef SYSTEMC
     70    if (usage_is_set(_usage,USE_SYSTEMC))
     71      {
    5872    // Constant
    5973
     
    473487#endif   
    474488
    475     log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_retire");
    476 
    477     SC_METHOD (genMealy_retire);
    478     dont_initialize ();
    479 //     sensitive_neg << *(in_CLOCK);
    480     for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    481       {
    482         uint32_t x=_param->_nb_inst_retire_rob [i];
    483         for (uint32_t j=0; j<x; j++)
    484           sensitive << *( in_RETIRE_ROB_VAL                [i][j])
    485                     << *( in_RETIRE_ROB_RD_OLD_USE         [i][j])
    486                     << *( in_RETIRE_ROB_RD_NEW_USE         [i][j])
    487                     << *( in_RETIRE_ROB_RE_OLD_USE         [i][j])
    488                     << *( in_RETIRE_ROB_RE_NEW_USE         [i][j])
    489                     << *( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])
    490                     << *( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])
    491                     << *( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])
    492                     << *( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]);
    493       }
    494 #ifdef SYSTEMCASS_SPECIFIC
    495     // List dependency information
    496     for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    497       {
    498         uint32_t x=_param->_nb_inst_retire_rob [i];
    499         for (uint32_t j=0; j<x; j++)
    500           {
    501             (*(out_RETIRE_ROB_ACK                [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]));
    502             (*(out_RETIRE_ROB_ACK                [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]));
    503             (*(out_RETIRE_ROB_ACK                [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]));
    504             (*(out_RETIRE_ROB_ACK                [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]));
    505 
    506             (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_VAL                [i][j]));
    507             (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_RD_OLD_USE         [i][j]));
    508             (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]));
    509             (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]));
    510             (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]));
    511 
    512             (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_VAL                [i][j]));
    513             (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_RD_NEW_USE         [i][j]));
    514             (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]));
    515             (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]));
    516             (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]));
    517 
    518             (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_VAL                [i][j]));
    519             (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_RE_OLD_USE         [i][j]));
    520             (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]));
    521             (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]));
    522             (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]));
    523 
    524             (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_VAL                [i][j]));
    525             (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_RE_NEW_USE         [i][j]));
    526             (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]));
    527             (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]));
    528             (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]));
    529           }
    530       }
    531 #endif   
    532 
     489//     log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_retire");
     490
     491//     SC_METHOD (genMealy_retire);
     492//     dont_initialize ();
     493// //     sensitive_neg << *(in_CLOCK);
     494//     for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     495//       {
     496//      uint32_t x=_param->_nb_inst_retire_rob [i];
     497//      for (uint32_t j=0; j<x; j++)
     498//        sensitive << *( in_RETIRE_ROB_VAL                [i][j])
     499//                  << *( in_RETIRE_ROB_RD_OLD_USE         [i][j])
     500//                  << *( in_RETIRE_ROB_RD_NEW_USE         [i][j])
     501//                  << *( in_RETIRE_ROB_RE_OLD_USE         [i][j])
     502//                  << *( in_RETIRE_ROB_RE_NEW_USE         [i][j])
     503//                  << *( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])
     504//                  << *( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])
     505//                  << *( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])
     506//                  << *( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]);
     507//       }
     508// #ifdef SYSTEMCASS_SPECIFIC
     509//     // List dependency information
     510//     for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     511//       {
     512//      uint32_t x=_param->_nb_inst_retire_rob [i];
     513//      for (uint32_t j=0; j<x; j++)
     514//        {
     515//          (*(out_RETIRE_ROB_ACK                [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]));
     516//          (*(out_RETIRE_ROB_ACK                [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]));
     517//          (*(out_RETIRE_ROB_ACK                [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]));
     518//          (*(out_RETIRE_ROB_ACK                [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]));
     519
     520//          (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_VAL                [i][j]));
     521//          (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_RD_OLD_USE         [i][j]));
     522//          (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]));
     523//          (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]));
     524//          (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]));
     525
     526//          (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_VAL                [i][j]));
     527//          (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_RD_NEW_USE         [i][j]));
     528//          (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]));
     529//          (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]));
     530//          (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]));
     531
     532//          (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_VAL                [i][j]));
     533//          (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_RE_OLD_USE         [i][j]));
     534//          (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]));
     535//          (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]));
     536//          (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]));
     537
     538//          (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_VAL                [i][j]));
     539//          (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_RE_NEW_USE         [i][j]));
     540//          (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]));
     541//          (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]));
     542//          (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]));
     543//        }
     544//       }
     545// #endif   
     546      }
    533547#endif
    534548    log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     
    542556
    543557#ifdef STATISTICS
    544     log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate Statistics file");
    545 
    546     delete _stat;
     558    if (usage_is_set(_usage,USE_STATISTICS))
     559      {
     560        log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate Statistics file");
     561       
     562        delete _stat;
     563      }
    547564#endif
    548565
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_allocation.cpp

    r82 r88  
    9090       out_GPR_READ_ACK           [j] = interface->set_signal_valack_out (ACK);
    9191       if (_param->_have_port_ooo_engine_id == true)
    92         in_GPR_READ_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t     > ("ooo_engine_id", log2(_param->_nb_ooo_engine));
     92        in_GPR_READ_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t     > ("ooo_engine_id", _param->_size_ooo_engine_id);
    9393       out_GPR_READ_DATA          [j] = interface->set_signal_out<Tgeneral_data_t> ("data"         , _param->_size_general_data);
    9494       out_GPR_READ_DATA_VAL      [j] = interface->set_signal_out<Tcontrol_t     > ("data_val"     , 1);
     
    166166       out_SPR_READ_ACK           [j] = interface->set_signal_valack_out (ACK);
    167167       if (_param->_have_port_ooo_engine_id == true)
    168         in_SPR_READ_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t     > ("ooo_engine_id", log2(_param->_nb_ooo_engine));
     168        in_SPR_READ_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t     > ("ooo_engine_id", _param->_size_ooo_engine_id);
    169169       out_SPR_READ_DATA          [j] = interface->set_signal_out<Tspecial_data_t> ("data"         , _param->_size_special_data);
    170170       out_SPR_READ_DATA_VAL      [j] = interface->set_signal_out<Tcontrol_t     > ("data_val"     , 1);
     
    236236       out_GPR_WRITE_ACK           [j] = interface->set_signal_valack_out (ACK);
    237237       if (_param->_have_port_ooo_engine_id == true)
    238         in_GPR_WRITE_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t     > ("ooo_engine_id", log2(_param->_nb_ooo_engine));
     238        in_GPR_WRITE_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t     > ("ooo_engine_id", _param->_size_ooo_engine_id);
    239239
    240240       for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     
    302302       out_SPR_WRITE_ACK           [j] = interface->set_signal_valack_out (ACK);
    303303       if (_param->_have_port_ooo_engine_id == true)
    304         in_SPR_WRITE_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t     > ("ooo_engine_id", log2(_param->_nb_ooo_engine));
     304        in_SPR_WRITE_OOO_ENGINE_ID [j] = interface->set_signal_in <Tcontext_t     > ("ooo_engine_id", _param->_size_ooo_engine_id);
    305305
    306306       for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     
    400400      }
    401401
    402     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    403     in_RETIRE_ROB_VAL                      = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
    404    out_RETIRE_ROB_ACK                      = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine];
    405     in_RETIRE_ROB_RD_OLD_USE               = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
    406     in_RETIRE_ROB_RD_NEW_USE               = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
    407     in_RETIRE_ROB_RE_OLD_USE               = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
    408     in_RETIRE_ROB_RE_NEW_USE               = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
    409    out_RETIRE_ROB_GPR_STATUS_OLD_VAL       = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine];
    410    out_RETIRE_ROB_GPR_STATUS_NEW_VAL       = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine];
    411     in_RETIRE_ROB_GPR_STATUS_OLD_ACK       = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
    412     in_RETIRE_ROB_GPR_STATUS_NEW_ACK       = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
    413    out_RETIRE_ROB_SPR_STATUS_OLD_VAL       = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine];
    414    out_RETIRE_ROB_SPR_STATUS_NEW_VAL       = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine];
    415     in_RETIRE_ROB_SPR_STATUS_OLD_ACK       = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
    416     in_RETIRE_ROB_SPR_STATUS_NEW_ACK       = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
    417 
    418     for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    419       {
    420         uint32_t x=_param->_nb_inst_retire_rob [i];
    421 
    422          in_RETIRE_ROB_VAL                      [i] = new SC_IN (Tcontrol_t) * [x];
    423         out_RETIRE_ROB_ACK                      [i] = new SC_OUT(Tcontrol_t) * [x];
    424          in_RETIRE_ROB_RD_OLD_USE               [i] = new SC_IN (Tcontrol_t) * [x];
    425          in_RETIRE_ROB_RD_NEW_USE               [i] = new SC_IN (Tcontrol_t) * [x];
    426          in_RETIRE_ROB_RE_OLD_USE               [i] = new SC_IN (Tcontrol_t) * [x];
    427          in_RETIRE_ROB_RE_NEW_USE               [i] = new SC_IN (Tcontrol_t) * [x];
    428         out_RETIRE_ROB_GPR_STATUS_OLD_VAL       [i] = new SC_OUT(Tcontrol_t) * [x];
    429         out_RETIRE_ROB_GPR_STATUS_NEW_VAL       [i] = new SC_OUT(Tcontrol_t) * [x];
    430          in_RETIRE_ROB_GPR_STATUS_OLD_ACK       [i] = new SC_IN (Tcontrol_t) * [x];
    431          in_RETIRE_ROB_GPR_STATUS_NEW_ACK       [i] = new SC_IN (Tcontrol_t) * [x];
    432         out_RETIRE_ROB_SPR_STATUS_OLD_VAL       [i] = new SC_OUT(Tcontrol_t) * [x];
    433         out_RETIRE_ROB_SPR_STATUS_NEW_VAL       [i] = new SC_OUT(Tcontrol_t) * [x];
    434          in_RETIRE_ROB_SPR_STATUS_OLD_ACK       [i] = new SC_IN (Tcontrol_t) * [x];
    435          in_RETIRE_ROB_SPR_STATUS_NEW_ACK       [i] = new SC_IN (Tcontrol_t) * [x];
     402//     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     403//     in_RETIRE_ROB_VAL                      = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
     404//    out_RETIRE_ROB_ACK                      = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine];
     405//     in_RETIRE_ROB_RD_OLD_USE               = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
     406//     in_RETIRE_ROB_RD_NEW_USE               = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
     407//     in_RETIRE_ROB_RE_OLD_USE               = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
     408//     in_RETIRE_ROB_RE_NEW_USE               = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
     409//    out_RETIRE_ROB_GPR_STATUS_OLD_VAL       = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine];
     410//    out_RETIRE_ROB_GPR_STATUS_NEW_VAL       = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine];
     411//     in_RETIRE_ROB_GPR_STATUS_OLD_ACK       = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
     412//     in_RETIRE_ROB_GPR_STATUS_NEW_ACK       = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
     413//    out_RETIRE_ROB_SPR_STATUS_OLD_VAL       = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine];
     414//    out_RETIRE_ROB_SPR_STATUS_NEW_VAL       = new SC_OUT(Tcontrol_t) ** [_param->_nb_ooo_engine];
     415//     in_RETIRE_ROB_SPR_STATUS_OLD_ACK       = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
     416//     in_RETIRE_ROB_SPR_STATUS_NEW_ACK       = new SC_IN (Tcontrol_t) ** [_param->_nb_ooo_engine];
     417
     418//     for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     419//       {
     420//      uint32_t x=_param->_nb_inst_retire_rob [i];
     421
     422//       in_RETIRE_ROB_VAL                      [i] = new SC_IN (Tcontrol_t) * [x];
     423//      out_RETIRE_ROB_ACK                      [i] = new SC_OUT(Tcontrol_t) * [x];
     424//       in_RETIRE_ROB_RD_OLD_USE               [i] = new SC_IN (Tcontrol_t) * [x];
     425//       in_RETIRE_ROB_RD_NEW_USE               [i] = new SC_IN (Tcontrol_t) * [x];
     426//       in_RETIRE_ROB_RE_OLD_USE               [i] = new SC_IN (Tcontrol_t) * [x];
     427//       in_RETIRE_ROB_RE_NEW_USE               [i] = new SC_IN (Tcontrol_t) * [x];
     428//      out_RETIRE_ROB_GPR_STATUS_OLD_VAL       [i] = new SC_OUT(Tcontrol_t) * [x];
     429//      out_RETIRE_ROB_GPR_STATUS_NEW_VAL       [i] = new SC_OUT(Tcontrol_t) * [x];
     430//       in_RETIRE_ROB_GPR_STATUS_OLD_ACK       [i] = new SC_IN (Tcontrol_t) * [x];
     431//       in_RETIRE_ROB_GPR_STATUS_NEW_ACK       [i] = new SC_IN (Tcontrol_t) * [x];
     432//      out_RETIRE_ROB_SPR_STATUS_OLD_VAL       [i] = new SC_OUT(Tcontrol_t) * [x];
     433//      out_RETIRE_ROB_SPR_STATUS_NEW_VAL       [i] = new SC_OUT(Tcontrol_t) * [x];
     434//       in_RETIRE_ROB_SPR_STATUS_OLD_ACK       [i] = new SC_IN (Tcontrol_t) * [x];
     435//       in_RETIRE_ROB_SPR_STATUS_NEW_ACK       [i] = new SC_IN (Tcontrol_t) * [x];
    436436   
    437         for (uint32_t j=0; j<x; j++)
    438           {
    439             {
    440               Interface_fifo * interface = _interfaces->set_interface("retire_rob_"+toString(i)+"_"+toString(j)
    441 #ifdef POSITION
    442                                                                       ,IN
    443                                                                       ,WEST
    444                                                                       ,"Interface to update status (retire)"
    445 #endif
    446                                                                       );
    447 
    448                in_RETIRE_ROB_VAL                      [i][j] = interface->set_signal_valack_in (VAL);
    449               out_RETIRE_ROB_ACK                      [i][j] = interface->set_signal_valack_out(ACK);
    450                in_RETIRE_ROB_RD_OLD_USE               [i][j] = interface->set_signal_in <Tcontrol_t> ("rd_old_use", 1);
    451                in_RETIRE_ROB_RD_NEW_USE               [i][j] = interface->set_signal_in <Tcontrol_t> ("rd_new_use", 1);
    452                in_RETIRE_ROB_RE_OLD_USE               [i][j] = interface->set_signal_in <Tcontrol_t> ("re_old_use", 1);
    453                in_RETIRE_ROB_RE_NEW_USE               [i][j] = interface->set_signal_in <Tcontrol_t> ("re_new_use", 1);
    454             }
    455             {
    456               Interface_fifo * interface = _interfaces->set_interface("retire_rob_gpr_status_old_"+toString(i)+"_"+toString(j)
    457 #ifdef POSITION
    458                                                                       ,IN
    459                                                                       ,EAST
    460                                                                       ,"Interface to update status (retire)"
    461 #endif
    462                                                                       );
    463 
    464               out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j] = interface->set_signal_valack_out(VAL);
    465                in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j] = interface->set_signal_valack_in (ACK);
    466             }
    467             {
    468               Interface_fifo * interface = _interfaces->set_interface("retire_rob_gpr_status_new_"+toString(i)+"_"+toString(j)
    469 #ifdef POSITION
    470                                                                       ,IN
    471                                                                       ,EAST
    472                                                                       ,"Interface to update status (retire)"
    473 #endif
    474                                                                       );
    475 
    476               out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j] = interface->set_signal_valack_out(VAL);
    477                in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j] = interface->set_signal_valack_in (ACK);
    478             }
    479             {
    480               Interface_fifo * interface = _interfaces->set_interface("retire_rob_spr_status_old_"+toString(i)+"_"+toString(j)
    481 #ifdef POSITION
    482                                                                       ,IN
    483                                                                       ,EAST
    484                                                                       ,"Interface to update status (retire)"
    485 #endif
    486                                                                       );
    487 
    488               out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j] = interface->set_signal_valack_out(VAL);
    489                in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j] = interface->set_signal_valack_in (ACK);
    490             }
    491             {
    492               Interface_fifo * interface = _interfaces->set_interface("retire_rob_spr_status_new_"+toString(i)+"_"+toString(j)
    493 #ifdef POSITION
    494                                                                       ,IN
    495                                                                       ,EAST
    496                                                                       ,"Interface to update status (retire)"
    497 #endif
    498                                                                       );
    499 
    500               out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j] = interface->set_signal_valack_out(VAL);
    501                in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j] = interface->set_signal_valack_in (ACK);
    502             }
    503           }
    504       }
     437//      for (uint32_t j=0; j<x; j++)
     438//        {
     439//          {
     440//            Interface_fifo * interface = _interfaces->set_interface("retire_rob_"+toString(i)+"_"+toString(j)
     441// #ifdef POSITION
     442//                                                                    ,IN
     443//                                                                    ,WEST
     444//                                                                    ,"Interface to update status (retire)"
     445// #endif
     446//                                                                    );
     447
     448//             in_RETIRE_ROB_VAL                      [i][j] = interface->set_signal_valack_in (VAL);
     449//            out_RETIRE_ROB_ACK                      [i][j] = interface->set_signal_valack_out(ACK);
     450//             in_RETIRE_ROB_RD_OLD_USE               [i][j] = interface->set_signal_in <Tcontrol_t> ("rd_old_use", 1);
     451//             in_RETIRE_ROB_RD_NEW_USE               [i][j] = interface->set_signal_in <Tcontrol_t> ("rd_new_use", 1);
     452//             in_RETIRE_ROB_RE_OLD_USE               [i][j] = interface->set_signal_in <Tcontrol_t> ("re_old_use", 1);
     453//             in_RETIRE_ROB_RE_NEW_USE               [i][j] = interface->set_signal_in <Tcontrol_t> ("re_new_use", 1);
     454//          }
     455//          {
     456//            Interface_fifo * interface = _interfaces->set_interface("retire_rob_gpr_status_old_"+toString(i)+"_"+toString(j)
     457// #ifdef POSITION
     458//                                                                    ,IN
     459//                                                                    ,EAST
     460//                                                                    ,"Interface to update status (retire)"
     461// #endif
     462//                                                                    );
     463
     464//            out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j] = interface->set_signal_valack_out(VAL);
     465//             in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j] = interface->set_signal_valack_in (ACK);
     466//          }
     467//          {
     468//            Interface_fifo * interface = _interfaces->set_interface("retire_rob_gpr_status_new_"+toString(i)+"_"+toString(j)
     469// #ifdef POSITION
     470//                                                                    ,IN
     471//                                                                    ,EAST
     472//                                                                    ,"Interface to update status (retire)"
     473// #endif
     474//                                                                    );
     475
     476//            out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j] = interface->set_signal_valack_out(VAL);
     477//             in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j] = interface->set_signal_valack_in (ACK);
     478//          }
     479//          {
     480//            Interface_fifo * interface = _interfaces->set_interface("retire_rob_spr_status_old_"+toString(i)+"_"+toString(j)
     481// #ifdef POSITION
     482//                                                                    ,IN
     483//                                                                    ,EAST
     484//                                                                    ,"Interface to update status (retire)"
     485// #endif
     486//                                                                    );
     487
     488//            out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j] = interface->set_signal_valack_out(VAL);
     489//             in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j] = interface->set_signal_valack_in (ACK);
     490//          }
     491//          {
     492//            Interface_fifo * interface = _interfaces->set_interface("retire_rob_spr_status_new_"+toString(i)+"_"+toString(j)
     493// #ifdef POSITION
     494//                                                                    ,IN
     495//                                                                    ,EAST
     496//                                                                    ,"Interface to update status (retire)"
     497// #endif
     498//                                                                    );
     499
     500//            out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j] = interface->set_signal_valack_out(VAL);
     501//             in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j] = interface->set_signal_valack_in (ACK);
     502//          }
     503//        }
     504//       }
    505505
    506506    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    507507
    508508#ifdef POSITION
    509     _component->generate_file();
     509    if (usage_is_set(_usage,USE_POSITION))
     510      _component->generate_file();
    510511#endif
    511512
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_deallocation.cpp

    r81 r88  
    2323    log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
    2424
     25    if (usage_is_set(_usage,USE_VHDL))
     26      {
    2527//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    2628    delete    in_CLOCK ;
     
    9597    delete []  in_INSERT_ROB_SPR_STATUS_ACK       ;
    9698
    97     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    98     delete []  in_RETIRE_ROB_VAL                      ;
    99     delete [] out_RETIRE_ROB_ACK                      ;
    100     delete []  in_RETIRE_ROB_RD_OLD_USE               ;
    101     delete []  in_RETIRE_ROB_RD_NEW_USE               ;
    102     delete []  in_RETIRE_ROB_RE_OLD_USE               ;
    103     delete []  in_RETIRE_ROB_RE_NEW_USE               ;
    104     delete [] out_RETIRE_ROB_GPR_STATUS_OLD_VAL       ;
    105     delete [] out_RETIRE_ROB_GPR_STATUS_NEW_VAL       ;
    106     delete []  in_RETIRE_ROB_GPR_STATUS_OLD_ACK       ;
    107     delete []  in_RETIRE_ROB_GPR_STATUS_NEW_ACK       ;
    108     delete [] out_RETIRE_ROB_SPR_STATUS_OLD_VAL       ;
    109     delete [] out_RETIRE_ROB_SPR_STATUS_NEW_VAL       ;
    110     delete []  in_RETIRE_ROB_SPR_STATUS_OLD_ACK       ;
    111     delete []  in_RETIRE_ROB_SPR_STATUS_NEW_ACK       ;
    112 
     99//     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     100//     delete []  in_RETIRE_ROB_VAL                      ;
     101//     delete [] out_RETIRE_ROB_ACK                      ;
     102//     delete []  in_RETIRE_ROB_RD_OLD_USE               ;
     103//     delete []  in_RETIRE_ROB_RD_NEW_USE               ;
     104//     delete []  in_RETIRE_ROB_RE_OLD_USE               ;
     105//     delete []  in_RETIRE_ROB_RE_NEW_USE               ;
     106//     delete [] out_RETIRE_ROB_GPR_STATUS_OLD_VAL       ;
     107//     delete [] out_RETIRE_ROB_GPR_STATUS_NEW_VAL       ;
     108//     delete []  in_RETIRE_ROB_GPR_STATUS_OLD_ACK       ;
     109//     delete []  in_RETIRE_ROB_GPR_STATUS_NEW_ACK       ;
     110//     delete [] out_RETIRE_ROB_SPR_STATUS_OLD_VAL       ;
     111//     delete [] out_RETIRE_ROB_SPR_STATUS_NEW_VAL       ;
     112//     delete []  in_RETIRE_ROB_SPR_STATUS_OLD_ACK       ;
     113//     delete []  in_RETIRE_ROB_SPR_STATUS_NEW_ACK       ;
     114      }
    113115    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    114116
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_end_cycle.cpp

    r81 r88  
    2424
    2525#ifdef STATISTICS
    26     _stat->end_cycle();
     26    if (usage_is_set(_usage,USE_STATISTICS))
     27      _stat->end_cycle();
    2728#endif   
    2829
     
    3031    // Evaluation before read the ouput signal
    3132//  sc_start(0);
    32     _interfaces->testbench();
     33    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     34      _interfaces->testbench();
    3335#endif
    3436
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_gpr_read.cpp

    r81 r88  
    2323  void Register_unit_Glue::genMealy_gpr_read (void)
    2424  {
    25     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     25    log_begin(Register_unit_Glue,FUNCTION);
     26    log_function(Register_unit_Glue,FUNCTION,_name.c_str());
    2627
    27     for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
     28//     if (not PORT_READ(in_NRESET))
     29//       {
     30//      for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
     31//        PORT_WRITE(out_GPR_READ_ACK      [j], 0);
     32//       }
     33//     else
    2834      {
    29         Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_READ_OOO_ENGINE_ID[j]):0;
    30         Tcontrol_t registerfile_ack = PORT_READ(in_GPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]);
    31         Tcontrol_t status_ack       = PORT_READ(in_GPR_READ_STATUS_ACK       [ooo_engine_id][j]);
    32 
    33         // multiplexor
    34         PORT_WRITE(out_GPR_READ_ACK      [j], registerfile_ack and status_ack);
    35         PORT_WRITE(out_GPR_READ_DATA     [j], PORT_READ(in_GPR_READ_REGISTERFILE_DATA[ooo_engine_id][j]));
    36         PORT_WRITE(out_GPR_READ_DATA_VAL [j], PORT_READ(in_GPR_READ_STATUS_DATA_VAL  [ooo_engine_id][j]));
     35        for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
     36          {
     37            Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_READ_OOO_ENGINE_ID[j]):0;
     38            Tcontrol_t registerfile_ack = PORT_READ(in_GPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]);
     39            Tcontrol_t status_ack       = PORT_READ(in_GPR_READ_STATUS_ACK       [ooo_engine_id][j]);
     40           
     41            // multiplexor
     42            PORT_WRITE(out_GPR_READ_ACK      [j], registerfile_ack and status_ack);
     43            PORT_WRITE(out_GPR_READ_DATA     [j], PORT_READ(in_GPR_READ_REGISTERFILE_DATA[ooo_engine_id][j]));
     44            PORT_WRITE(out_GPR_READ_DATA_VAL [j], PORT_READ(in_GPR_READ_STATUS_DATA_VAL  [ooo_engine_id][j]));
     45          }
    3746      }
    3847
    39     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     48    log_end(Register_unit_Glue,FUNCTION);
    4049  };
    4150
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_gpr_read_registerfile.cpp

    r81 r88  
    2323  void Register_unit_Glue::genMealy_gpr_read_registerfile (void)
    2424  {
    25     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     25    log_begin(Register_unit_Glue,FUNCTION);
     26    log_function(Register_unit_Glue,FUNCTION,_name.c_str());
    2627
    27     for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
     28//     if (not PORT_READ(in_NRESET))
     29//       {
     30//      for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
     31//        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     32//          PORT_WRITE(out_GPR_READ_REGISTERFILE_VAL [i][j],0);
     33//       }
     34//     else
    2835      {
    29         Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_READ_OOO_ENGINE_ID[j]):0;
    30         Tcontrol_t val              = PORT_READ(in_GPR_READ_VAL [j]);
    31         Tcontrol_t status_ack       = PORT_READ(in_GPR_READ_STATUS_ACK       [ooo_engine_id][j]);
    32    
    33         Tcontrol_t registerfile_val = val and status_ack;
    34 
    35         for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     36        for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
    3637          {
    37             Tcontrol_t id = (i == ooo_engine_id)?1:0;
    38             PORT_WRITE(out_GPR_READ_REGISTERFILE_VAL [i][j], (id and registerfile_val));
     38            Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_READ_OOO_ENGINE_ID[j]):0;
     39            Tcontrol_t val              = PORT_READ(in_GPR_READ_VAL [j]);
     40            Tcontrol_t status_ack       = PORT_READ(in_GPR_READ_STATUS_ACK       [ooo_engine_id][j]);
     41           
     42            Tcontrol_t registerfile_val = val and status_ack;
     43           
     44            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     45              {
     46                Tcontrol_t id = (i == ooo_engine_id)?1:0;
     47                PORT_WRITE(out_GPR_READ_REGISTERFILE_VAL [i][j], (id and registerfile_val));
     48              }
    3949          }
    4050      }
    4151
    42     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     52    log_end(Register_unit_Glue,FUNCTION);
    4353  };
    4454
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_gpr_read_status.cpp

    r81 r88  
    2323  void Register_unit_Glue::genMealy_gpr_read_status (void)
    2424  {
    25     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     25    log_begin(Register_unit_Glue,FUNCTION);
     26    log_function(Register_unit_Glue,FUNCTION,_name.c_str());
    2627
    27     for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
     28//     if (not PORT_READ(in_NRESET))
     29//       {
     30//      for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
     31//        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     32//          PORT_WRITE(out_GPR_READ_STATUS_VAL       [i][j], 0);
     33//       }
     34//     else
    2835      {
    29         Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_READ_OOO_ENGINE_ID[j]):0;
    30         Tcontrol_t val              = PORT_READ(in_GPR_READ_VAL [j]);
    31         Tcontrol_t registerfile_ack = PORT_READ(in_GPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]);
    32    
    33         Tcontrol_t status_val       = val and registerfile_ack;
    34 
    35         for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     36        for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
    3637          {
    37             Tcontrol_t id = (i == ooo_engine_id)?1:0;
    38             PORT_WRITE(out_GPR_READ_STATUS_VAL       [i][j], (id and status_val));
     38            Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_READ_OOO_ENGINE_ID[j]):0;
     39            Tcontrol_t val              = PORT_READ(in_GPR_READ_VAL [j]);
     40            Tcontrol_t registerfile_ack = PORT_READ(in_GPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]);
     41           
     42            Tcontrol_t status_val       = val and registerfile_ack;
     43           
     44            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     45              {
     46                Tcontrol_t id = (i == ooo_engine_id)?1:0;
     47                PORT_WRITE(out_GPR_READ_STATUS_VAL       [i][j], (id and status_val));
     48              }
    3949          }
    4050      }
    4151
    42     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     52    log_end(Register_unit_Glue,FUNCTION);
    4353  };
    4454
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_gpr_registerfile.cpp

    r81 r88  
    2323  void Register_unit_Glue::genMealy_gpr_write_registerfile (void)
    2424  {
    25     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     25    log_begin(Register_unit_Glue,FUNCTION);
     26    log_function(Register_unit_Glue,FUNCTION,_name.c_str());
    2627
    27     for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
     28//     if (not PORT_READ(in_NRESET))
     29//       {
     30//      for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
     31//        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     32//          PORT_WRITE(out_GPR_WRITE_REGISTERFILE_VAL [i][j], 0);
     33//       }
     34//     else
    2835      {
    29         Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_WRITE_OOO_ENGINE_ID[j]):0;
    30         Tcontrol_t val              = PORT_READ(in_GPR_WRITE_VAL [j]);
    31         Tcontrol_t status_ack       = PORT_READ(in_GPR_WRITE_STATUS_ACK       [ooo_engine_id][j]);
    32         Tcontrol_t registerfile_val = val and status_ack;
    33        
    34         for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     36        for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
    3537          {
    36             Tcontrol_t id = (i == ooo_engine_id)?1:0;
    37             PORT_WRITE(out_GPR_WRITE_REGISTERFILE_VAL [i][j], (id and registerfile_val));
     38            Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_WRITE_OOO_ENGINE_ID[j]):0;
     39            Tcontrol_t val              = PORT_READ(in_GPR_WRITE_VAL [j]);
     40            Tcontrol_t status_ack       = PORT_READ(in_GPR_WRITE_STATUS_ACK       [ooo_engine_id][j]);
     41            Tcontrol_t registerfile_val = val and status_ack;
     42           
     43            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     44              {
     45                Tcontrol_t id = (i == ooo_engine_id)?1:0;
     46                PORT_WRITE(out_GPR_WRITE_REGISTERFILE_VAL [i][j], (id and registerfile_val));
     47              }
    3848          }
    3949      }
    4050
    41     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     51    log_end(Register_unit_Glue,FUNCTION);
    4252  };
    4353
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_gpr_write.cpp

    r81 r88  
    2323  void Register_unit_Glue::genMealy_gpr_write (void)
    2424  {
    25     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
    26 
    27     for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
     25    log_begin(Register_unit_Glue,FUNCTION);
     26    log_function(Register_unit_Glue,FUNCTION,_name.c_str());
     27//     if (not PORT_READ(in_NRESET))
     28//       {
     29//      for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
     30//        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     31//          PORT_WRITE(out_GPR_WRITE_ACK [j], 0);
     32//       }
     33//     else
    2834      {
    29         Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_WRITE_OOO_ENGINE_ID[j]):0;
    30         Tcontrol_t registerfile_ack = PORT_READ(in_GPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]);
    31         Tcontrol_t status_ack       = PORT_READ(in_GPR_WRITE_STATUS_ACK       [ooo_engine_id][j]);
    32 
    33         // multiplexor
    34         PORT_WRITE(out_GPR_WRITE_ACK [j],registerfile_ack and status_ack);
     35        for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
     36          {
     37            Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_WRITE_OOO_ENGINE_ID[j]):0;
     38            Tcontrol_t registerfile_ack = PORT_READ(in_GPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]);
     39            Tcontrol_t status_ack       = PORT_READ(in_GPR_WRITE_STATUS_ACK       [ooo_engine_id][j]);
     40           
     41            // multiplexor
     42            PORT_WRITE(out_GPR_WRITE_ACK [j],registerfile_ack and status_ack);
     43          }
    3544      }
    36 
    37     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     45   
     46    log_end(Register_unit_Glue,FUNCTION);
    3847  };
    3948
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_gpr_write_status.cpp

    r81 r88  
    2323  void Register_unit_Glue::genMealy_gpr_write_status (void)
    2424  {
    25     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     25    log_begin(Register_unit_Glue,FUNCTION);
     26    log_function(Register_unit_Glue,FUNCTION,_name.c_str());
    2627
    27     for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
     28//     if (not PORT_READ(in_NRESET))
     29//       {
     30//      for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
     31//        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     32//          PORT_WRITE(out_GPR_WRITE_STATUS_VAL       [i][j], 0);
     33//       }
     34//     else
    2835      {
    29         Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_WRITE_OOO_ENGINE_ID[j]):0;
    30         Tcontrol_t val              = PORT_READ(in_GPR_WRITE_VAL [j]);
    31         Tcontrol_t registerfile_ack = PORT_READ(in_GPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]);
    32         Tcontrol_t status_val       = val and registerfile_ack;
    33        
    34         for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     36        for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
    3537          {
    36             Tcontrol_t id = (i == ooo_engine_id)?1:0;
    37             PORT_WRITE(out_GPR_WRITE_STATUS_VAL       [i][j], (id and status_val));
     38            Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_GPR_WRITE_OOO_ENGINE_ID[j]):0;
     39            Tcontrol_t val              = PORT_READ(in_GPR_WRITE_VAL [j]);
     40            Tcontrol_t registerfile_ack = PORT_READ(in_GPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]);
     41            Tcontrol_t status_val       = val and registerfile_ack;
     42           
     43            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     44              {
     45                Tcontrol_t id = (i == ooo_engine_id)?1:0;
     46                PORT_WRITE(out_GPR_WRITE_STATUS_VAL       [i][j], (id and status_val));
     47              }
    3848          }
    3949      }
    4050
    41     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     51    log_end(Register_unit_Glue,FUNCTION);
    4252  };
    4353
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_insert.cpp

    r81 r88  
    2323  void Register_unit_Glue::genMealy_insert (void)
    2424  {
    25     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     25    log_begin(Register_unit_Glue,FUNCTION);
     26    log_function(Register_unit_Glue,FUNCTION,_name.c_str());
    2627
    2728    for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    28       {
    29         uint32_t x=_param->_nb_inst_insert_rob [i];
     29      for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++)
     30        {
     31          Tcontrol_t val            = PORT_READ(in_INSERT_ROB_VAL [i][j]);
     32          Tcontrol_t gpr_use        = PORT_READ(in_INSERT_ROB_RD_USE [i][j]);
     33          Tcontrol_t spr_use        = PORT_READ(in_INSERT_ROB_RE_USE [i][j]);
     34          Tcontrol_t gpr_status_ack = PORT_READ(in_INSERT_ROB_GPR_STATUS_ACK [i][j]);
     35          Tcontrol_t spr_status_ack = PORT_READ(in_INSERT_ROB_SPR_STATUS_ACK [i][j]);
     36         
     37          Tcontrol_t ack            = (gpr_status_ack and
     38                                       spr_status_ack);     
     39          Tcontrol_t gpr_status_val = (val     and
     40                                       gpr_use and
     41                                       spr_status_ack);
     42          Tcontrol_t spr_status_val = (val     and
     43                                       spr_use and
     44                                       gpr_status_ack);
    3045
    31         for (uint32_t j=0; j<x; j++)
    32           {
    33             Tcontrol_t val = PORT_READ(in_INSERT_ROB_VAL [i][j]);
    34             Tcontrol_t gpr_use = PORT_READ(in_INSERT_ROB_RD_USE [i][j]);
    35             Tcontrol_t spr_use = PORT_READ(in_INSERT_ROB_RE_USE [i][j]);
    36             Tcontrol_t gpr_ack = PORT_READ(in_INSERT_ROB_GPR_STATUS_ACK [i][j]);
    37             Tcontrol_t spr_ack = PORT_READ(in_INSERT_ROB_SPR_STATUS_ACK [i][j]);
    38            
    39             PORT_WRITE(out_INSERT_ROB_ACK [i][j], gpr_ack and spr_ack);     
    40             PORT_WRITE(out_INSERT_ROB_GPR_STATUS_VAL [i][j], val and gpr_use and spr_ack);
    41             PORT_WRITE(out_INSERT_ROB_SPR_STATUS_VAL [i][j], val and spr_use and gpr_ack);
    42           }
    43       }
     46          log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"  * insert_rob [%d][%d]",i,j);
     47          log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * val            (r) : %d",val           );
     48          log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * ack            (w) : %d",ack           );
     49          log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * gpr_use (rd)   (r) : %d",gpr_use       );
     50          log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * gpr_status_val (w) : %d",gpr_status_val);
     51          log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * gpr_status_ack (r) : %d",gpr_status_ack);
     52          log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * spr_use (re)   (r) : %d",spr_use       );
     53          log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * spr_status_val (w) : %d",spr_status_val);
     54          log_printf(TRACE,OOO_Engine_Glue,FUNCTION,"    * spr_status_ack (r) : %d",spr_status_ack);
    4455
    45     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     56          PORT_WRITE(out_INSERT_ROB_ACK            [i][j], ack           );
     57          PORT_WRITE(out_INSERT_ROB_GPR_STATUS_VAL [i][j], gpr_status_val);
     58          PORT_WRITE(out_INSERT_ROB_SPR_STATUS_VAL [i][j], spr_status_val);
     59
     60        }
     61
     62    log_end(Register_unit_Glue,FUNCTION);
    4663  };
    4764
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_retire.cpp

    r81 r88  
    88 */
    99
     10/*
    1011#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h"
    1112
     
    2324  void Register_unit_Glue::genMealy_retire (void)
    2425  {
    25     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     26    log_begin(Register_unit_Glue,FUNCTION);
     27    log_function(Register_unit_Glue,FUNCTION,_name.c_str());
    2628
    2729    for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     
    5759      }
    5860
    59     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     61    log_end(Register_unit_Glue,FUNCTION);
    6062  };
    6163
     
    6870}; // end namespace behavioural
    6971}; // end namespace morpheo             
     72*/
    7073#endif
    7174//#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_spr_read.cpp

    r81 r88  
    2323  void Register_unit_Glue::genMealy_spr_read (void)
    2424  {
    25     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     25    log_begin(Register_unit_Glue,FUNCTION);
     26    log_function(Register_unit_Glue,FUNCTION,_name.c_str());
    2627
    27     for (uint32_t j=0; j<_param->_nb_spr_read; j++)
     28//     if (not PORT_READ(in_NRESET))
     29//       {
     30//      for (uint32_t j=0; j<_param->_nb_spr_read; j++)
     31//        PORT_WRITE(out_SPR_READ_ACK      [j], 0);
     32//       }
     33//     else
    2834      {
    29         Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_READ_OOO_ENGINE_ID[j]):0;
    30         Tcontrol_t registerfile_ack = PORT_READ(in_SPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]);
    31         Tcontrol_t status_ack       = PORT_READ(in_SPR_READ_STATUS_ACK       [ooo_engine_id][j]);
    32 
    33         // multiplexor
    34         PORT_WRITE(out_SPR_READ_ACK      [j], registerfile_ack and status_ack);
    35         PORT_WRITE(out_SPR_READ_DATA     [j], PORT_READ(in_SPR_READ_REGISTERFILE_DATA[ooo_engine_id][j]));
    36         PORT_WRITE(out_SPR_READ_DATA_VAL [j], PORT_READ(in_SPR_READ_STATUS_DATA_VAL  [ooo_engine_id][j]));
     35        for (uint32_t j=0; j<_param->_nb_spr_read; j++)
     36          {
     37            Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_READ_OOO_ENGINE_ID[j]):0;
     38            Tcontrol_t registerfile_ack = PORT_READ(in_SPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]);
     39            Tcontrol_t status_ack       = PORT_READ(in_SPR_READ_STATUS_ACK       [ooo_engine_id][j]);
     40           
     41            // multiplexor
     42            PORT_WRITE(out_SPR_READ_ACK      [j], registerfile_ack and status_ack);
     43            PORT_WRITE(out_SPR_READ_DATA     [j], PORT_READ(in_SPR_READ_REGISTERFILE_DATA[ooo_engine_id][j]));
     44            PORT_WRITE(out_SPR_READ_DATA_VAL [j], PORT_READ(in_SPR_READ_STATUS_DATA_VAL  [ooo_engine_id][j]));
     45          }
    3746      }
    3847
    39     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     48    log_end(Register_unit_Glue,FUNCTION);
    4049  };
    4150
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_spr_read_registerfile.cpp

    r81 r88  
    2323  void Register_unit_Glue::genMealy_spr_read_registerfile (void)
    2424  {
    25     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     25    log_begin(Register_unit_Glue,FUNCTION);
     26    log_function(Register_unit_Glue,FUNCTION,_name.c_str());
    2627
    27     for (uint32_t j=0; j<_param->_nb_spr_read; j++)
     28//     if (not PORT_READ(in_NRESET))
     29//       {
     30//      for (uint32_t j=0; j<_param->_nb_spr_read; j++)
     31//        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     32//          PORT_WRITE(out_SPR_READ_REGISTERFILE_VAL [i][j],0);
     33//       }
     34//     else
    2835      {
    29         Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_READ_OOO_ENGINE_ID[j]):0;
    30         Tcontrol_t val              = PORT_READ(in_SPR_READ_VAL [j]);
    31         Tcontrol_t status_ack       = PORT_READ(in_SPR_READ_STATUS_ACK       [ooo_engine_id][j]);
    32    
    33         Tcontrol_t registerfile_val = val and status_ack;
    34 
    35         for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     36        for (uint32_t j=0; j<_param->_nb_spr_read; j++)
    3637          {
    37             Tcontrol_t id = (i == ooo_engine_id)?1:0;
    38             PORT_WRITE(out_SPR_READ_REGISTERFILE_VAL [i][j], (id and registerfile_val));
     38            Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_READ_OOO_ENGINE_ID[j]):0;
     39            Tcontrol_t val              = PORT_READ(in_SPR_READ_VAL [j]);
     40           
     41            Tcontrol_t registerfile_val = val and PORT_READ(in_SPR_READ_STATUS_ACK [ooo_engine_id][j]);
     42           
     43            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     44              {
     45                Tcontrol_t id = (i == ooo_engine_id)?1:0;
     46                PORT_WRITE(out_SPR_READ_REGISTERFILE_VAL [i][j], (id and registerfile_val));
     47              }
    3948          }
    4049      }
    4150
    42     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     51    log_end(Register_unit_Glue,FUNCTION);
    4352  };
    4453
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_spr_read_status.cpp

    r81 r88  
    2323  void Register_unit_Glue::genMealy_spr_read_status (void)
    2424  {
    25     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     25    log_begin(Register_unit_Glue,FUNCTION);
     26    log_function(Register_unit_Glue,FUNCTION,_name.c_str());
    2627
    27     for (uint32_t j=0; j<_param->_nb_spr_read; j++)
     28//     if (not PORT_READ(in_NRESET))
     29//       {
     30//      for (uint32_t j=0; j<_param->_nb_spr_read; j++)
     31//        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     32//          PORT_WRITE(out_SPR_READ_STATUS_VAL       [i][j], 0);
     33//       }
     34//     else
    2835      {
    29         Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_READ_OOO_ENGINE_ID[j]):0;
    30         Tcontrol_t val              = PORT_READ(in_SPR_READ_VAL [j]);
    31         Tcontrol_t registerfile_ack = PORT_READ(in_SPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]);
    32    
    33         Tcontrol_t status_val       = val and registerfile_ack;
    34 
    35         for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     36        for (uint32_t j=0; j<_param->_nb_spr_read; j++)
    3637          {
    37             Tcontrol_t id = (i == ooo_engine_id)?1:0;
    38             PORT_WRITE(out_SPR_READ_STATUS_VAL       [i][j], (id and status_val));
     38            Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_READ_OOO_ENGINE_ID[j]):0;
     39            Tcontrol_t val              = PORT_READ(in_SPR_READ_VAL [j]);
     40           
     41            Tcontrol_t status_val       = val and PORT_READ(in_SPR_READ_REGISTERFILE_ACK [ooo_engine_id][j]);
     42           
     43            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     44              {
     45                Tcontrol_t id = (i == ooo_engine_id)?1:0;
     46                PORT_WRITE(out_SPR_READ_STATUS_VAL       [i][j], (id and status_val));
     47              }
    3948          }
    4049      }
    4150
    42     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     51    log_end(Register_unit_Glue,FUNCTION);
    4352  };
    4453
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_spr_registerfile.cpp

    r81 r88  
    2323  void Register_unit_Glue::genMealy_spr_write_registerfile (void)
    2424  {
    25     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     25    log_begin(Register_unit_Glue,FUNCTION);
     26    log_function(Register_unit_Glue,FUNCTION,_name.c_str());
    2627
    27     for (uint32_t j=0; j<_param->_nb_spr_write; j++)
     28//     if (not PORT_READ(in_NRESET))
     29//       {
     30//      for (uint32_t j=0; j<_param->_nb_spr_write; j++)
     31//        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     32//          PORT_WRITE(out_SPR_WRITE_REGISTERFILE_VAL [i][j], 0);
     33//       }
     34//     else
    2835      {
    29         Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_WRITE_OOO_ENGINE_ID[j]):0;
    30         Tcontrol_t val              = PORT_READ(in_SPR_WRITE_VAL [j]);
    31         Tcontrol_t status_ack       = PORT_READ(in_SPR_WRITE_STATUS_ACK       [ooo_engine_id][j]);
    32         Tcontrol_t registerfile_val = val and status_ack;
    33        
    34         for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     36        for (uint32_t j=0; j<_param->_nb_spr_write; j++)
    3537          {
    36             Tcontrol_t id = (i == ooo_engine_id)?1:0;
    37             PORT_WRITE(out_SPR_WRITE_REGISTERFILE_VAL [i][j], (id and registerfile_val));
     38            Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_WRITE_OOO_ENGINE_ID[j]):0;
     39            Tcontrol_t val              = PORT_READ(in_SPR_WRITE_VAL [j]);
     40            Tcontrol_t status_ack       = PORT_READ(in_SPR_WRITE_STATUS_ACK       [ooo_engine_id][j]);
     41            Tcontrol_t registerfile_val = val and status_ack;
     42           
     43            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     44              {
     45                Tcontrol_t id = (i == ooo_engine_id)?1:0;
     46                PORT_WRITE(out_SPR_WRITE_REGISTERFILE_VAL [i][j], (id and registerfile_val));
     47              }
    3848          }
    3949      }
    4050
    41     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     51    log_end(Register_unit_Glue,FUNCTION);
    4252  };
    4353
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_spr_write.cpp

    r81 r88  
    2323  void Register_unit_Glue::genMealy_spr_write (void)
    2424  {
    25     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     25    log_begin(Register_unit_Glue,FUNCTION);
     26    log_function(Register_unit_Glue,FUNCTION,_name.c_str());
    2627
    27     for (uint32_t j=0; j<_param->_nb_spr_write; j++)
     28//     if (not PORT_READ(in_NRESET))
     29//       {
     30//      for (uint32_t j=0; j<_param->_nb_spr_write; j++)
     31//        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     32//          PORT_WRITE(out_SPR_WRITE_ACK [j], 0);
     33//       }
     34//     else
    2835      {
    29         Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_WRITE_OOO_ENGINE_ID[j]):0;
    30         Tcontrol_t registerfile_ack = PORT_READ(in_SPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]);
    31         Tcontrol_t status_ack       = PORT_READ(in_SPR_WRITE_STATUS_ACK       [ooo_engine_id][j]);
    32 
    33         // multiplexor
    34         PORT_WRITE(out_SPR_WRITE_ACK [j],registerfile_ack and status_ack);
     36        for (uint32_t j=0; j<_param->_nb_spr_write; j++)
     37          {
     38            Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_WRITE_OOO_ENGINE_ID[j]):0;
     39            Tcontrol_t registerfile_ack = PORT_READ(in_SPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]);
     40            Tcontrol_t status_ack       = PORT_READ(in_SPR_WRITE_STATUS_ACK       [ooo_engine_id][j]);
     41           
     42            // multiplexor
     43            PORT_WRITE(out_SPR_WRITE_ACK [j],registerfile_ack and status_ack);
     44          }
    3545      }
    3646
    37     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     47    log_end(Register_unit_Glue,FUNCTION);
    3848  };
    3949
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_spr_write_status.cpp

    r81 r88  
    2323  void Register_unit_Glue::genMealy_spr_write_status (void)
    2424  {
    25     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     25    log_begin(Register_unit_Glue,FUNCTION);
     26    log_function(Register_unit_Glue,FUNCTION,_name.c_str());
    2627
    27     for (uint32_t j=0; j<_param->_nb_spr_write; j++)
     28//     if (not PORT_READ(in_NRESET))
     29//       {
     30//      for (uint32_t j=0; j<_param->_nb_spr_write; j++)
     31//        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     32//          PORT_WRITE(out_SPR_WRITE_STATUS_VAL       [i][j], 0);
     33//       }
     34//     else
    2835      {
    29         Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_WRITE_OOO_ENGINE_ID[j]):0;
    30         Tcontrol_t val              = PORT_READ(in_SPR_WRITE_VAL [j]);
    31         Tcontrol_t registerfile_ack = PORT_READ(in_SPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]);
    32         Tcontrol_t status_val       = val and registerfile_ack;
    33        
    34         for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     36        for (uint32_t j=0; j<_param->_nb_spr_write; j++)
    3537          {
    36             Tcontrol_t id = (i == ooo_engine_id)?1:0;
    37             PORT_WRITE(out_SPR_WRITE_STATUS_VAL       [i][j], (id and status_val));
     38            Tcontext_t ooo_engine_id    = (_param->_have_port_ooo_engine_id == true)?PORT_READ(in_SPR_WRITE_OOO_ENGINE_ID[j]):0;
     39            Tcontrol_t val              = PORT_READ(in_SPR_WRITE_VAL [j]);
     40            Tcontrol_t registerfile_ack = PORT_READ(in_SPR_WRITE_REGISTERFILE_ACK [ooo_engine_id][j]);
     41            Tcontrol_t status_val       = val and registerfile_ack;
     42           
     43            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     44              {
     45                Tcontrol_t id = (i == ooo_engine_id)?1:0;
     46                PORT_WRITE(out_SPR_WRITE_STATUS_VAL       [i][j], (id and status_val));
     47              }
    3848          }
    3949      }
    4050
    41     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     51    log_end(Register_unit_Glue,FUNCTION);
    4252  };
    4353
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_transition.cpp

    r81 r88  
    2222  void Register_unit_Glue::transition (void)
    2323  {
    24     log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin");
     24    log_begin(Register_unit_Glue,FUNCTION);
    2525
    2626#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     
    2828#endif
    2929
    30     log_printf(FUNC,Register_unit_Glue,FUNCTION,"End");
     30    log_end(Register_unit_Glue,FUNCTION);
    3131  };
    3232
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_vhdl_body.cpp

    r81 r88  
    3737        for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--)
    3838          {
    39             vhdl->set_body ("\tin_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else");
     39            vhdl->set_body ("\tin_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else");
    4040          }
    4141        vhdl->set_body ("\tin_GPR_READ_REGISTERFILE_0_"+toString(j)+"_ACK and in_GPR_READ_STATUS_0_"+toString(j)+"_ACK;");
     
    4848        for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--)
    4949          {
    50             vhdl->set_body ("\tin_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else");
     50            vhdl->set_body ("\tin_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else");
    5151          }
    5252        vhdl->set_body ("\tin_GPR_READ_REGISTERFILE_0_"+toString(j)+"_DATA;");
     
    5959        for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--)
    6060          {
    61             vhdl->set_body ("\tin_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else");
     61            vhdl->set_body ("\tin_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else");
    6262          }
    6363        vhdl->set_body ("\tin_GPR_READ_STATUS_0_"+toString(j)+"_DATA_VAL;");
     
    7171            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    7272              {
    73                 vhdl->set_body ("out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_READ_"+toString(j)+"_VAL and in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else '0';");
     73                vhdl->set_body ("out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_READ_"+toString(j)+"_VAL and in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';");
    7474              }
    7575          }
     
    8080            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    8181              {
    82                 vhdl->set_body ("out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_READ_"+toString(j)+"_VAL and in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else '0';");
     82                vhdl->set_body ("out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_READ_"+toString(j)+"_VAL and in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';");
    8383              }
    8484          }
     
    102102        for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--)
    103103          {
    104             vhdl->set_body ("\tin_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else");
     104            vhdl->set_body ("\tin_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else");
    105105          }
    106106        vhdl->set_body ("\tin_GPR_WRITE_REGISTERFILE_0_"+toString(j)+"_ACK and in_GPR_WRITE_STATUS_0_"+toString(j)+"_ACK;");
     
    114114            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    115115              {
    116                 vhdl->set_body ("out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_WRITE_"+toString(j)+"_VAL and in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else '0';");
     116                vhdl->set_body ("out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_WRITE_"+toString(j)+"_VAL and in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';");
    117117              }
    118118          }
     
    123123            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    124124              {
    125                 vhdl->set_body ("out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_WRITE_"+toString(j)+"_VAL and in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else '0';");
     125                vhdl->set_body ("out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_GPR_WRITE_"+toString(j)+"_VAL and in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';");
    126126              }
    127127          }
     
    145145        for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--)
    146146          {
    147             vhdl->set_body ("\tin_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else");
     147            vhdl->set_body ("\tin_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else");
    148148          }
    149149        vhdl->set_body ("\tin_SPR_READ_REGISTERFILE_0_"+toString(j)+"_ACK and in_SPR_READ_STATUS_0_"+toString(j)+"_ACK;");
     
    156156        for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--)
    157157          {
    158             vhdl->set_body ("\tin_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else");
     158            vhdl->set_body ("\tin_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else");
    159159          }
    160160        vhdl->set_body ("\tin_SPR_READ_REGISTERFILE_0_"+toString(j)+"_DATA;");
     
    167167        for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--)
    168168          {
    169             vhdl->set_body ("\tin_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else");
     169            vhdl->set_body ("\tin_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else");
    170170          }
    171171        vhdl->set_body ("\tin_SPR_READ_STATUS_0_"+toString(j)+"_DATA_VAL;");
     
    179179            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    180180              {
    181                 vhdl->set_body ("out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_READ_"+toString(j)+"_VAL and in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else '0';");
     181                vhdl->set_body ("out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_READ_"+toString(j)+"_VAL and in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';");
    182182              }
    183183          }
     
    188188            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    189189              {
    190                 vhdl->set_body ("out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_READ_"+toString(j)+"_VAL and in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else '0';");
     190                vhdl->set_body ("out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_READ_"+toString(j)+"_VAL and in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';");
    191191              }
    192192          }
     
    210210        for (uint32_t i=_param->_nb_ooo_engine-1; i>=1; i--)
    211211          {
    212             vhdl->set_body ("\tin_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else");
     212            vhdl->set_body ("\tin_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK and in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else");
    213213          }
    214214        vhdl->set_body ("\tin_SPR_WRITE_REGISTERFILE_0_"+toString(j)+"_ACK and in_SPR_WRITE_STATUS_0_"+toString(j)+"_ACK;");
     
    222222            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    223223              {
    224                 vhdl->set_body ("out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_WRITE_"+toString(j)+"_VAL and in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else '0';");
     224                vhdl->set_body ("out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_WRITE_"+toString(j)+"_VAL and in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';");
    225225              }
    226226          }
     
    231231            for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    232232              {
    233                 vhdl->set_body ("out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_WRITE_"+toString(j)+"_VAL and in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(log2(_param->_nb_ooo_engine),i)+" else '0';");
     233                vhdl->set_body ("out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL <= in_SPR_WRITE_"+toString(j)+"_VAL and in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK when in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID = "+std_logic_conv(_param->_size_ooo_engine_id,i)+" else '0';");
    234234              }
    235235          }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Register_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         ../Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/include/test.h

    r81 r88  
    1616
    1717#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Register_unit.h"
     18#include "Common/include/Time.h"
    1819
    1920using namespace std;
     
    2829void test    (string name,
    2930              morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::Parameters * param);
    30 
    31 class Time
    32 {
    33 private : timeval time_begin;
    34 // private : timeval time_end;
    35  
    36 public  : Time ()
    37   {
    38     gettimeofday(&time_begin     ,NULL);
    39   };
    40 
    41 public  : ~Time ()
    42   {
    43     cout << *this;
    44   };
    45 
    46 public  : friend ostream& operator<< (ostream& output_stream,
    47                                       const Time & x)
    48   {
    49     timeval time_end;
    50    
    51     gettimeofday(&time_end       ,NULL);
    52    
    53     uint32_t nb_cycles = static_cast<uint32_t>(sc_simulation_time());
    54 
    55     double average = static_cast<double>(nb_cycles) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec);
    56    
    57     output_stream << nb_cycles << "\t(" << average << " cycles / seconds )" << endl;
    58 
    59     return output_stream;
    60   }
    61 };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/src/main.cpp

    r81 r88  
    104104         _nb_special_register       ,
    105105         _nb_inst_insert_rob        ,
    106          _nb_inst_retire_rob        );
     106         _nb_inst_retire_rob        ,
     107         true //is_toplevel
     108         );
    107109     
    108110      cout << param->print(1);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/src/test.cpp

    r82 r88  
    2222#endif
    2323
     24  Tusage_t _usage = USE_ALL;
     25
     26//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     27//   _usage = usage_unset(_usage,USE_VHDL                 );
     28//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     30//   _usage = usage_unset(_usage,USE_POSITION             );
     31//   _usage = usage_unset(_usage,USE_STATISTICS           );
     32//   _usage = usage_unset(_usage,USE_INFORMATION          );
     33
    2434  Register_unit * _Register_unit = new Register_unit
    2535    (name.c_str(),
     
    2838#endif
    2939     _param,
    30      USE_ALL);
     40     _usage);
    3141 
    3242#ifdef SYSTEMC
     
    7585  sc_signal<Tspecial_address_t>  ***  in_INSERT_ROB_RE_NUM_REG        ;
    7686
    77     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    78   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_VAL               ;
    79   sc_signal<Tcontrol_t        >  *** out_RETIRE_ROB_ACK               ;
    80   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RD_OLD_USE        ;
    81   sc_signal<Tgeneral_address_t>  ***  in_RETIRE_ROB_RD_OLD_NUM_REG    ; // old_use=1 : status[old_num_reg]<- 0
    82   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RD_NEW_USE        ;
    83   sc_signal<Tgeneral_address_t>  ***  in_RETIRE_ROB_RD_NEW_NUM_REG    ; // new_use=1 : status[new_num_reg]<- 1
    84   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RE_OLD_USE        ;
    85   sc_signal<Tspecial_address_t>  ***  in_RETIRE_ROB_RE_OLD_NUM_REG    ;
    86   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RE_NEW_USE        ;
    87   sc_signal<Tspecial_address_t>  ***  in_RETIRE_ROB_RE_NEW_NUM_REG    ;
     87//     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     88//   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_VAL               ;
     89//   sc_signal<Tcontrol_t        >  *** out_RETIRE_ROB_ACK               ;
     90//   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RD_OLD_USE        ;
     91//   sc_signal<Tgeneral_address_t>  ***  in_RETIRE_ROB_RD_OLD_NUM_REG    ; // old_use=1 : status[old_num_reg]<- 0
     92//   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RD_NEW_USE        ;
     93//   sc_signal<Tgeneral_address_t>  ***  in_RETIRE_ROB_RD_NEW_NUM_REG    ; // new_use=1 : status[new_num_reg]<- 1
     94//   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RE_OLD_USE        ;
     95//   sc_signal<Tspecial_address_t>  ***  in_RETIRE_ROB_RE_OLD_NUM_REG    ;
     96//   sc_signal<Tcontrol_t        >  ***  in_RETIRE_ROB_RE_NEW_USE        ;
     97//   sc_signal<Tspecial_address_t>  ***  in_RETIRE_ROB_RE_NEW_NUM_REG    ;
    8898
    8999  string rename = "signal";
     
    192202       }
    193203
    194     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    195       in_RETIRE_ROB_VAL            = new sc_signal<Tcontrol_t        > ** [_param->_nb_ooo_engine];
    196      out_RETIRE_ROB_ACK            = new sc_signal<Tcontrol_t        > ** [_param->_nb_ooo_engine];
    197       in_RETIRE_ROB_RD_OLD_USE     = new sc_signal<Tcontrol_t        > ** [_param->_nb_ooo_engine];
    198       in_RETIRE_ROB_RD_OLD_NUM_REG = new sc_signal<Tgeneral_address_t> ** [_param->_nb_ooo_engine];
    199       in_RETIRE_ROB_RE_OLD_USE     = new sc_signal<Tcontrol_t        > ** [_param->_nb_ooo_engine];
    200       in_RETIRE_ROB_RE_OLD_NUM_REG = new sc_signal<Tspecial_address_t> ** [_param->_nb_ooo_engine];
    201       in_RETIRE_ROB_RD_NEW_USE     = new sc_signal<Tcontrol_t        > ** [_param->_nb_ooo_engine];
    202       in_RETIRE_ROB_RD_NEW_NUM_REG = new sc_signal<Tgeneral_address_t> ** [_param->_nb_ooo_engine];
    203       in_RETIRE_ROB_RE_NEW_USE     = new sc_signal<Tcontrol_t        > ** [_param->_nb_ooo_engine];
    204       in_RETIRE_ROB_RE_NEW_NUM_REG = new sc_signal<Tspecial_address_t> ** [_param->_nb_ooo_engine];
    205 
    206      for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    207        {
    208          uint32_t x=_param->_nb_inst_retire_rob [i];
    209 
    210           in_RETIRE_ROB_VAL            [i] = new sc_signal<Tcontrol_t        > * [x];
    211          out_RETIRE_ROB_ACK            [i] = new sc_signal<Tcontrol_t        > * [x];
    212           in_RETIRE_ROB_RD_OLD_USE     [i] = new sc_signal<Tcontrol_t        > * [x];
    213           in_RETIRE_ROB_RD_OLD_NUM_REG [i] = new sc_signal<Tgeneral_address_t> * [x];
    214           in_RETIRE_ROB_RE_OLD_USE     [i] = new sc_signal<Tcontrol_t        > * [x];
    215           in_RETIRE_ROB_RE_OLD_NUM_REG [i] = new sc_signal<Tspecial_address_t> * [x];
    216           in_RETIRE_ROB_RD_NEW_USE     [i] = new sc_signal<Tcontrol_t        > * [x];
    217           in_RETIRE_ROB_RD_NEW_NUM_REG [i] = new sc_signal<Tgeneral_address_t> * [x];
    218           in_RETIRE_ROB_RE_NEW_USE     [i] = new sc_signal<Tcontrol_t        > * [x];
    219           in_RETIRE_ROB_RE_NEW_NUM_REG [i] = new sc_signal<Tspecial_address_t> * [x];
    220 
    221          for (uint32_t j=0; j<x; j++)
    222            {
    223               in_RETIRE_ROB_VAL            [i][j] = new sc_signal<Tcontrol_t        > (rename.c_str());
    224              out_RETIRE_ROB_ACK            [i][j] = new sc_signal<Tcontrol_t        > (rename.c_str());
    225               in_RETIRE_ROB_RD_OLD_USE     [i][j] = new sc_signal<Tcontrol_t        > (rename.c_str());
    226               in_RETIRE_ROB_RD_OLD_NUM_REG [i][j] = new sc_signal<Tgeneral_address_t> (rename.c_str());
    227               in_RETIRE_ROB_RE_OLD_USE     [i][j] = new sc_signal<Tcontrol_t        > (rename.c_str());
    228               in_RETIRE_ROB_RE_OLD_NUM_REG [i][j] = new sc_signal<Tspecial_address_t> (rename.c_str());
    229               in_RETIRE_ROB_RD_NEW_USE     [i][j] = new sc_signal<Tcontrol_t        > (rename.c_str());
    230               in_RETIRE_ROB_RD_NEW_NUM_REG [i][j] = new sc_signal<Tgeneral_address_t> (rename.c_str());
    231               in_RETIRE_ROB_RE_NEW_USE     [i][j] = new sc_signal<Tcontrol_t        > (rename.c_str());
    232               in_RETIRE_ROB_RE_NEW_NUM_REG [i][j] = new sc_signal<Tspecial_address_t> (rename.c_str());
    233            }
    234        }
     204//     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     205//       in_RETIRE_ROB_VAL            = new sc_signal<Tcontrol_t        > ** [_param->_nb_ooo_engine];
     206//      out_RETIRE_ROB_ACK            = new sc_signal<Tcontrol_t        > ** [_param->_nb_ooo_engine];
     207//       in_RETIRE_ROB_RD_OLD_USE     = new sc_signal<Tcontrol_t        > ** [_param->_nb_ooo_engine];
     208//       in_RETIRE_ROB_RD_OLD_NUM_REG = new sc_signal<Tgeneral_address_t> ** [_param->_nb_ooo_engine];
     209//       in_RETIRE_ROB_RE_OLD_USE     = new sc_signal<Tcontrol_t        > ** [_param->_nb_ooo_engine];
     210//       in_RETIRE_ROB_RE_OLD_NUM_REG = new sc_signal<Tspecial_address_t> ** [_param->_nb_ooo_engine];
     211//       in_RETIRE_ROB_RD_NEW_USE     = new sc_signal<Tcontrol_t        > ** [_param->_nb_ooo_engine];
     212//       in_RETIRE_ROB_RD_NEW_NUM_REG = new sc_signal<Tgeneral_address_t> ** [_param->_nb_ooo_engine];
     213//       in_RETIRE_ROB_RE_NEW_USE     = new sc_signal<Tcontrol_t        > ** [_param->_nb_ooo_engine];
     214//       in_RETIRE_ROB_RE_NEW_NUM_REG = new sc_signal<Tspecial_address_t> ** [_param->_nb_ooo_engine];
     215
     216//      for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     217//        {
     218//       uint32_t x=_param->_nb_inst_retire_rob [i];
     219
     220//        in_RETIRE_ROB_VAL            [i] = new sc_signal<Tcontrol_t        > * [x];
     221//       out_RETIRE_ROB_ACK            [i] = new sc_signal<Tcontrol_t        > * [x];
     222//        in_RETIRE_ROB_RD_OLD_USE     [i] = new sc_signal<Tcontrol_t        > * [x];
     223//        in_RETIRE_ROB_RD_OLD_NUM_REG [i] = new sc_signal<Tgeneral_address_t> * [x];
     224//        in_RETIRE_ROB_RE_OLD_USE     [i] = new sc_signal<Tcontrol_t        > * [x];
     225//        in_RETIRE_ROB_RE_OLD_NUM_REG [i] = new sc_signal<Tspecial_address_t> * [x];
     226//        in_RETIRE_ROB_RD_NEW_USE     [i] = new sc_signal<Tcontrol_t        > * [x];
     227//        in_RETIRE_ROB_RD_NEW_NUM_REG [i] = new sc_signal<Tgeneral_address_t> * [x];
     228//        in_RETIRE_ROB_RE_NEW_USE     [i] = new sc_signal<Tcontrol_t        > * [x];
     229//        in_RETIRE_ROB_RE_NEW_NUM_REG [i] = new sc_signal<Tspecial_address_t> * [x];
     230
     231//       for (uint32_t j=0; j<x; j++)
     232//         {
     233//            in_RETIRE_ROB_VAL            [i][j] = new sc_signal<Tcontrol_t        > (rename.c_str());
     234//           out_RETIRE_ROB_ACK            [i][j] = new sc_signal<Tcontrol_t        > (rename.c_str());
     235//            in_RETIRE_ROB_RD_OLD_USE     [i][j] = new sc_signal<Tcontrol_t        > (rename.c_str());
     236//            in_RETIRE_ROB_RD_OLD_NUM_REG [i][j] = new sc_signal<Tgeneral_address_t> (rename.c_str());
     237//            in_RETIRE_ROB_RE_OLD_USE     [i][j] = new sc_signal<Tcontrol_t        > (rename.c_str());
     238//            in_RETIRE_ROB_RE_OLD_NUM_REG [i][j] = new sc_signal<Tspecial_address_t> (rename.c_str());
     239//            in_RETIRE_ROB_RD_NEW_USE     [i][j] = new sc_signal<Tcontrol_t        > (rename.c_str());
     240//            in_RETIRE_ROB_RD_NEW_NUM_REG [i][j] = new sc_signal<Tgeneral_address_t> (rename.c_str());
     241//            in_RETIRE_ROB_RE_NEW_USE     [i][j] = new sc_signal<Tcontrol_t        > (rename.c_str());
     242//            in_RETIRE_ROB_RE_NEW_NUM_REG [i][j] = new sc_signal<Tspecial_address_t> (rename.c_str());
     243//         }
     244//        }
    235245
    236246 
     
    292302        (*(_Register_unit-> in_INSERT_ROB_RE_NUM_REG [i][j]))(*( in_INSERT_ROB_RE_NUM_REG [i][j]));
    293303      }
    294   for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    295     for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)
    296       {
    297         (*(_Register_unit-> in_RETIRE_ROB_VAL            [i][j]))(*( in_RETIRE_ROB_VAL            [i][j]));
    298         (*(_Register_unit->out_RETIRE_ROB_ACK            [i][j]))(*(out_RETIRE_ROB_ACK            [i][j]));
    299         (*(_Register_unit-> in_RETIRE_ROB_RD_OLD_USE     [i][j]))(*( in_RETIRE_ROB_RD_OLD_USE     [i][j]));
    300         (*(_Register_unit-> in_RETIRE_ROB_RD_OLD_NUM_REG [i][j]))(*( in_RETIRE_ROB_RD_OLD_NUM_REG [i][j]));
    301         (*(_Register_unit-> in_RETIRE_ROB_RE_OLD_USE     [i][j]))(*( in_RETIRE_ROB_RE_OLD_USE     [i][j]));
    302         (*(_Register_unit-> in_RETIRE_ROB_RE_OLD_NUM_REG [i][j]))(*( in_RETIRE_ROB_RE_OLD_NUM_REG [i][j]));
    303         (*(_Register_unit-> in_RETIRE_ROB_RD_NEW_USE     [i][j]))(*( in_RETIRE_ROB_RD_NEW_USE     [i][j]));
    304         (*(_Register_unit-> in_RETIRE_ROB_RD_NEW_NUM_REG [i][j]))(*( in_RETIRE_ROB_RD_NEW_NUM_REG [i][j]));
    305         (*(_Register_unit-> in_RETIRE_ROB_RE_NEW_USE     [i][j]))(*( in_RETIRE_ROB_RE_NEW_USE     [i][j]));
    306         (*(_Register_unit-> in_RETIRE_ROB_RE_NEW_NUM_REG [i][j]))(*( in_RETIRE_ROB_RE_NEW_NUM_REG [i][j]));
    307       }
     304//   for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     305//     for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)
     306//       {
     307//      (*(_Register_unit-> in_RETIRE_ROB_VAL            [i][j]))(*( in_RETIRE_ROB_VAL            [i][j]));
     308//      (*(_Register_unit->out_RETIRE_ROB_ACK            [i][j]))(*(out_RETIRE_ROB_ACK            [i][j]));
     309//      (*(_Register_unit-> in_RETIRE_ROB_RD_OLD_USE     [i][j]))(*( in_RETIRE_ROB_RD_OLD_USE     [i][j]));
     310//      (*(_Register_unit-> in_RETIRE_ROB_RD_OLD_NUM_REG [i][j]))(*( in_RETIRE_ROB_RD_OLD_NUM_REG [i][j]));
     311//      (*(_Register_unit-> in_RETIRE_ROB_RE_OLD_USE     [i][j]))(*( in_RETIRE_ROB_RE_OLD_USE     [i][j]));
     312//      (*(_Register_unit-> in_RETIRE_ROB_RE_OLD_NUM_REG [i][j]))(*( in_RETIRE_ROB_RE_OLD_NUM_REG [i][j]));
     313//      (*(_Register_unit-> in_RETIRE_ROB_RD_NEW_USE     [i][j]))(*( in_RETIRE_ROB_RD_NEW_USE     [i][j]));
     314//      (*(_Register_unit-> in_RETIRE_ROB_RD_NEW_NUM_REG [i][j]))(*( in_RETIRE_ROB_RD_NEW_NUM_REG [i][j]));
     315//      (*(_Register_unit-> in_RETIRE_ROB_RE_NEW_USE     [i][j]))(*( in_RETIRE_ROB_RE_NEW_USE     [i][j]));
     316//      (*(_Register_unit-> in_RETIRE_ROB_RE_NEW_NUM_REG [i][j]))(*( in_RETIRE_ROB_RE_NEW_NUM_REG [i][j]));
     317//       }
    308318 
    309319  cout << "<" << name << "> Start Simulation ............" << endl;
     
    331341  const  int32_t percent_transaction_insert     = 70;
    332342  const  int32_t percent_transaction_insert_use = 70;
    333   const  int32_t percent_transaction_retire     = 70;
    334   const  int32_t percent_transaction_retire_use = 70;
     343//   const  int32_t percent_transaction_retire     = 70;
     344//   const  int32_t percent_transaction_retire_use = 70;
    335345  const uint32_t nb_request                     = max_nb_general_register;
    336346
     
    365375      for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++)
    366376        in_INSERT_ROB_VAL [i][j]->write(0);
    367       for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)
    368         in_RETIRE_ROB_VAL [i][j]->write(0);
     377//       for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)
     378//      in_RETIRE_ROB_VAL [i][j]->write(0);
    369379    }
    370380     
     
    709719        }
    710720
    711       LABEL("retire rob");
    712 
    713       cpt = 0;
    714      
    715       while (cpt < nb_request)
    716         {
    717           for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    718             {
    719               uint32_t x=_param->_nb_inst_retire_rob [i];
    720               for (uint32_t j=0; j<x; j++)
    721                 {
    722                   in_RETIRE_ROB_VAL            [i][j]->write((rand() % 100) < percent_transaction_retire);
    723                   in_RETIRE_ROB_RD_OLD_USE     [i][j]->write((rand() % 100) < percent_transaction_retire_use);
    724                   in_RETIRE_ROB_RD_OLD_NUM_REG [i][j]->write(rand() % _param->_nb_general_register [i]);
    725                   in_RETIRE_ROB_RD_NEW_USE     [i][j]->write((rand() % 100) < percent_transaction_retire_use);
    726                   in_RETIRE_ROB_RD_NEW_NUM_REG [i][j]->write(rand() % _param->_nb_general_register [i]);           
    727                   in_RETIRE_ROB_RE_OLD_USE     [i][j]->write((rand() % 100) < percent_transaction_retire_use);
    728                   in_RETIRE_ROB_RE_OLD_NUM_REG [i][j]->write(rand() % _param->_nb_special_register [i]);           
    729                   in_RETIRE_ROB_RE_NEW_USE     [i][j]->write((rand() % 100) < percent_transaction_retire_use);
    730                   in_RETIRE_ROB_RE_NEW_NUM_REG [i][j]->write(rand() % _param->_nb_special_register [i]);           
    731                 }
    732             }
    733          
    734           SC_START(1);
    735          
    736           for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    737             {
    738               uint32_t x=_param->_nb_inst_retire_rob [i];
    739               for (uint32_t j=0; j<x; j++)
    740                 {
    741                   if (in_RETIRE_ROB_VAL [i][j]->read() and out_RETIRE_ROB_ACK [i][j]->read())
    742                     {
    743                       cpt ++;
     721//       LABEL("retire rob");
     722
     723//       cpt = 0;
     724     
     725//       while (cpt < nb_request)
     726//      {
     727//        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     728//          {
     729//            uint32_t x=_param->_nb_inst_retire_rob [i];
     730//            for (uint32_t j=0; j<x; j++)
     731//              {
     732//                in_RETIRE_ROB_VAL            [i][j]->write((rand() % 100) < percent_transaction_retire);
     733//                in_RETIRE_ROB_RD_OLD_USE     [i][j]->write((rand() % 100) < percent_transaction_retire_use);
     734//                in_RETIRE_ROB_RD_OLD_NUM_REG [i][j]->write(rand() % _param->_nb_general_register [i]);
     735//                in_RETIRE_ROB_RD_NEW_USE     [i][j]->write((rand() % 100) < percent_transaction_retire_use);
     736//                in_RETIRE_ROB_RD_NEW_NUM_REG [i][j]->write(rand() % _param->_nb_general_register [i]);           
     737//                in_RETIRE_ROB_RE_OLD_USE     [i][j]->write((rand() % 100) < percent_transaction_retire_use);
     738//                in_RETIRE_ROB_RE_OLD_NUM_REG [i][j]->write(rand() % _param->_nb_special_register [i]);           
     739//                in_RETIRE_ROB_RE_NEW_USE     [i][j]->write((rand() % 100) < percent_transaction_retire_use);
     740//                in_RETIRE_ROB_RE_NEW_NUM_REG [i][j]->write(rand() % _param->_nb_special_register [i]);           
     741//              }
     742//          }
     743         
     744//        SC_START(1);
     745         
     746//        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     747//          {
     748//            uint32_t x=_param->_nb_inst_retire_rob [i];
     749//            for (uint32_t j=0; j<x; j++)
     750//              {
     751//                if (in_RETIRE_ROB_VAL [i][j]->read() and out_RETIRE_ROB_ACK [i][j]->read())
     752//                  {
     753//                    cpt ++;
    744754                     
    745                       if (in_RETIRE_ROB_RD_OLD_USE [i][j]->read())
    746                         gpr_status [i][in_RETIRE_ROB_RD_OLD_NUM_REG [i][j]->read()] = 0;
    747                       if (in_RETIRE_ROB_RD_NEW_USE [i][j]->read())
    748                         gpr_status [i][in_RETIRE_ROB_RD_NEW_NUM_REG [i][j]->read()] = 1;
    749                       if (in_RETIRE_ROB_RE_OLD_USE [i][j]->read())
    750                         spr_status [i][in_RETIRE_ROB_RE_OLD_NUM_REG [i][j]->read()] = 0;
    751                       if (in_RETIRE_ROB_RE_NEW_USE [i][j]->read())
    752                         spr_status [i][in_RETIRE_ROB_RE_NEW_NUM_REG [i][j]->read()] = 1;
    753                     }
    754                 }
    755             }
    756         }
    757       for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    758         for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)
    759           in_RETIRE_ROB_VAL [i][j]->write(0);
     755//                    if (in_RETIRE_ROB_RD_OLD_USE [i][j]->read())
     756//                      gpr_status [i][in_RETIRE_ROB_RD_OLD_NUM_REG [i][j]->read()] = 0;
     757//                    if (in_RETIRE_ROB_RD_NEW_USE [i][j]->read())
     758//                      gpr_status [i][in_RETIRE_ROB_RD_NEW_NUM_REG [i][j]->read()] = 1;
     759//                    if (in_RETIRE_ROB_RE_OLD_USE [i][j]->read())
     760//                      spr_status [i][in_RETIRE_ROB_RE_OLD_NUM_REG [i][j]->read()] = 0;
     761//                    if (in_RETIRE_ROB_RE_NEW_USE [i][j]->read())
     762//                      spr_status [i][in_RETIRE_ROB_RE_NEW_NUM_REG [i][j]->read()] = 1;
     763//                  }
     764//              }
     765//          }
     766//      }
     767//       for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     768//      for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)
     769//        in_RETIRE_ROB_VAL [i][j]->write(0);
    760770
    761771      LABEL("(GPR) Read - and test data writted");
     
    889899  delete []  in_INSERT_ROB_RE_USE            ;
    890900  delete []  in_INSERT_ROB_RE_NUM_REG        ;
    891   delete []  in_RETIRE_ROB_VAL               ;
    892   delete [] out_RETIRE_ROB_ACK               ;
    893   delete []  in_RETIRE_ROB_RD_OLD_USE        ;
    894   delete []  in_RETIRE_ROB_RD_OLD_NUM_REG    ;
    895   delete []  in_RETIRE_ROB_RD_NEW_USE        ;
    896   delete []  in_RETIRE_ROB_RD_NEW_NUM_REG    ;
    897   delete []  in_RETIRE_ROB_RE_OLD_USE        ;
    898   delete []  in_RETIRE_ROB_RE_OLD_NUM_REG    ;
    899   delete []  in_RETIRE_ROB_RE_NEW_USE        ;
    900   delete []  in_RETIRE_ROB_RE_NEW_NUM_REG    ;
     901//   delete []  in_RETIRE_ROB_VAL               ;
     902//   delete [] out_RETIRE_ROB_ACK               ;
     903//   delete []  in_RETIRE_ROB_RD_OLD_USE        ;
     904//   delete []  in_RETIRE_ROB_RD_OLD_NUM_REG    ;
     905//   delete []  in_RETIRE_ROB_RD_NEW_USE        ;
     906//   delete []  in_RETIRE_ROB_RD_NEW_NUM_REG    ;
     907//   delete []  in_RETIRE_ROB_RE_OLD_USE        ;
     908//   delete []  in_RETIRE_ROB_RE_OLD_NUM_REG    ;
     909//   delete []  in_RETIRE_ROB_RE_NEW_USE        ;
     910//   delete []  in_RETIRE_ROB_RE_NEW_NUM_REG    ;
    901911#endif
    902912
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Parameters.h

    r81 r88  
    2525  {
    2626    //-----[ fields ]------------------------------------------------------------
    27   public : const uint32_t    _nb_ooo_engine            ;
    28   public : const uint32_t    _size_general_data        ;
    29   public : const uint32_t    _size_special_data        ;
    30   public : const uint32_t    _nb_gpr_read              ;
    31   public : const uint32_t    _nb_gpr_write             ;
    32   public : const uint32_t    _nb_gpr_bank              ;
    33   public : const uint32_t    _nb_gpr_port_read_by_bank ;
    34   public : const uint32_t    _nb_gpr_port_write_by_bank;
    35   public : const uint32_t    _nb_spr_read              ;
    36   public : const uint32_t    _nb_spr_write             ;
    37   public : const uint32_t    _nb_spr_bank              ;
    38   public : const uint32_t    _nb_spr_port_read_by_bank ;
    39   public : const uint32_t    _nb_spr_port_write_by_bank;
    40   public : const uint32_t  * _nb_general_register      ;
    41   public : const uint32_t  * _nb_special_register      ;
    42   public : const uint32_t  * _nb_inst_insert_rob       ;
    43   public : const uint32_t  * _nb_inst_retire_rob       ;
     27  public : uint32_t    _nb_ooo_engine            ;
     28//public : uint32_t    _size_general_data        ;
     29//public : uint32_t    _size_special_data        ;
     30  public : uint32_t    _nb_gpr_read              ;
     31  public : uint32_t    _nb_gpr_write             ;
     32  public : uint32_t    _nb_gpr_bank              ;
     33  public : uint32_t    _nb_gpr_port_read_by_bank ;
     34  public : uint32_t    _nb_gpr_port_write_by_bank;
     35  public : uint32_t    _nb_spr_read              ;
     36  public : uint32_t    _nb_spr_write             ;
     37  public : uint32_t    _nb_spr_bank              ;
     38  public : uint32_t    _nb_spr_port_read_by_bank ;
     39  public : uint32_t    _nb_spr_port_write_by_bank;
     40  public : uint32_t  * _nb_general_register      ;
     41  public : uint32_t  * _nb_special_register      ;
     42  public : uint32_t  * _nb_inst_insert_rob       ;
     43  public : uint32_t  * _nb_inst_retire_rob       ;
    4444
    45   public : const bool        _have_port_ooo_engine_id  ;
    46   public :       uint32_t    _size_gpr_address         ;
    47   public :       uint32_t    _size_spr_address         ;
     45//public : bool        _have_port_ooo_engine_id  ;
     46  public : uint32_t    _size_gpr_address         ;
     47  public : uint32_t    _size_spr_address         ;
    4848
    4949  public : morpheo::behavioural::generic::registerfile::Parameters                                                     ** _param_gpr        ;
     
    5151  public : morpheo::behavioural::generic::registerfile::Parameters                                                     ** _param_spr        ;
    5252  public : morpheo::behavioural::generic::registerfile::Parameters                                                     ** _param_spr_status ;
    53   public : morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters                          ** __param_gpr       ;
    54   public : morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters                          ** __param_gpr_status;
    55   public : morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters                          ** __param_spr       ;
    56   public : morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters                          ** __param_spr_status;
     53  private: morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters                          ** __param_gpr       ;
     54  private: morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters                          ** __param_gpr_status;
     55  private: morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters                          ** __param_spr       ;
     56  private: morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters                          ** __param_spr_status;
    5757  public : morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Parameters  * _param_glue       ;
    5858
     
    7474                        uint32_t  * nb_special_register      ,
    7575                        uint32_t  * nb_inst_insert_rob       ,
    76                         uint32_t  * nb_inst_retire_rob       );
     76                        uint32_t  * nb_inst_retire_rob       ,
     77                        bool        is_toplevel=false);
    7778
    78   public : Parameters  (Parameters & param) ;
     79//public : Parameters  (Parameters & param) ;
    7980  public : ~Parameters () ;
    8081
     82  public :        void            copy       (void);
     83
    8184  public :        Parameters_test msg_error  (void);
     85
    8286  public :        std::string   print      (uint32_t depth);
    8387  public : friend std::ostream& operator<< (std::ostream& output_stream,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Register_unit.h

    r82 r88  
    102102  public    : SC_IN (Tspecial_address_t)  ***  in_INSERT_ROB_RE_NUM_REG        ;
    103103
    104     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    105   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_VAL               ;
    106   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_ROB_ACK               ;
    107   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RD_OLD_USE        ;
    108   public    : SC_IN (Tgeneral_address_t)  ***  in_RETIRE_ROB_RD_OLD_NUM_REG    ; // old_use=1 : status[old_num_reg]<- 0
    109   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RD_NEW_USE        ;
    110   public    : SC_IN (Tgeneral_address_t)  ***  in_RETIRE_ROB_RD_NEW_NUM_REG    ; // new_use=1 : status[new_num_reg]<- 1
    111   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RE_OLD_USE        ;
    112   public    : SC_IN (Tspecial_address_t)  ***  in_RETIRE_ROB_RE_OLD_NUM_REG    ;
    113   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RE_NEW_USE        ;
    114   public    : SC_IN (Tspecial_address_t)  ***  in_RETIRE_ROB_RE_NEW_NUM_REG    ;
     104//     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     105//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_VAL               ;
     106//   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_ROB_ACK               ;
     107//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RD_OLD_USE        ;
     108//   public    : SC_IN (Tgeneral_address_t)  ***  in_RETIRE_ROB_RD_OLD_NUM_REG    ; // old_use=1 : status[old_num_reg]<- 0
     109//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RD_NEW_USE        ;
     110//   public    : SC_IN (Tgeneral_address_t)  ***  in_RETIRE_ROB_RD_NEW_NUM_REG    ; // new_use=1 : status[new_num_reg]<- 1
     111//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RE_OLD_USE        ;
     112//   public    : SC_IN (Tspecial_address_t)  ***  in_RETIRE_ROB_RE_OLD_NUM_REG    ;
     113//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RE_NEW_USE        ;
     114//   public    : SC_IN (Tspecial_address_t)  ***  in_RETIRE_ROB_RE_NEW_NUM_REG    ;
    115115
    116116    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Parameters.cpp

    r81 r88  
    3434                          uint32_t  * nb_special_register      ,
    3535                          uint32_t  * nb_inst_insert_rob       ,
    36                           uint32_t  * nb_inst_retire_rob       ):
    37     _nb_ooo_engine             (nb_ooo_engine            ),
    38     _size_general_data         (size_general_data        ),
    39     _size_special_data         (size_special_data        ),
    40     _nb_gpr_read               (nb_gpr_read              ),
    41     _nb_gpr_write              (nb_gpr_write             ),
    42     _nb_gpr_bank               (nb_gpr_bank              ),
    43     _nb_gpr_port_read_by_bank  (nb_gpr_port_read_by_bank ),
    44     _nb_gpr_port_write_by_bank (nb_gpr_port_write_by_bank),
    45     _nb_spr_read               (nb_spr_read              ),
    46     _nb_spr_write              (nb_spr_write             ),
    47     _nb_spr_bank               (nb_spr_bank              ),
    48     _nb_spr_port_read_by_bank  (nb_spr_port_read_by_bank ),
    49     _nb_spr_port_write_by_bank (nb_spr_port_write_by_bank),
    50     _nb_general_register       (nb_general_register      ),
    51     _nb_special_register       (nb_special_register      ),
    52     _nb_inst_insert_rob        (nb_inst_insert_rob       ),
    53     _nb_inst_retire_rob        (nb_inst_retire_rob       ),
    54     _have_port_ooo_engine_id   (nb_ooo_engine>1          )
    55    
     36                          uint32_t  * nb_inst_retire_rob       ,
     37                          bool        is_toplevel              )
    5638  {
    5739    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
     40
     41
     42    _nb_ooo_engine             = nb_ooo_engine            ;
     43    _nb_gpr_read               = nb_gpr_read              ;
     44    _nb_gpr_write              = nb_gpr_write             ;
     45    _nb_gpr_bank               = nb_gpr_bank              ;
     46    _nb_gpr_port_read_by_bank  = nb_gpr_port_read_by_bank ;
     47    _nb_gpr_port_write_by_bank = nb_gpr_port_write_by_bank;
     48    _nb_spr_read               = nb_spr_read              ;
     49    _nb_spr_write              = nb_spr_write             ;
     50    _nb_spr_bank               = nb_spr_bank              ;
     51    _nb_spr_port_read_by_bank  = nb_spr_port_read_by_bank ;
     52    _nb_spr_port_write_by_bank = nb_spr_port_write_by_bank;
     53    _nb_general_register       = nb_general_register      ;
     54    _nb_special_register       = nb_special_register      ;
     55    _nb_inst_insert_rob        = nb_inst_insert_rob       ;
     56    _nb_inst_retire_rob        = nb_inst_retire_rob       ;
    5857
    5958    _size_gpr_address = log2(nb_general_register [0]);
     
    7473          _size_spr_address = new_size;
    7574      }
    76 
    7775
    7876    _param_gpr         = new morpheo::behavioural::generic::registerfile::Parameters * [_nb_ooo_engine];
     
    8684    __param_spr_status = new morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters * [_nb_ooo_engine];
    8785   
    88    for (uint32_t i=0; i<_nb_ooo_engine; i++)
    89      {
    90        Tcrossbar_t crossbar = PARTIAL_CROSSBAR;
    91  
    92        __param_gpr        [i] = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters
    93          (_nb_gpr_read              ,
    94           _nb_gpr_write             ,
    95           _nb_general_register[i]   ,
    96           _size_general_data        ,
    97           _nb_gpr_bank              ,
    98           _nb_gpr_port_read_by_bank ,
    99           _nb_gpr_port_write_by_bank,
    100           crossbar                  );
    101 
    102        __param_gpr_status [i] = new morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters
    103          (_nb_gpr_read ,
    104           _nb_gpr_write+_nb_inst_insert_rob[i]+2*_nb_inst_retire_rob[i],
    105           0,
    106           nb_general_register[i],
    107           1);
    108 
    109        __param_spr        [i] = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters
    110          (_nb_spr_read              ,
    111           _nb_spr_write             ,
    112           _nb_special_register[i]   ,
    113           _size_special_data        ,
    114           _nb_spr_bank              ,
    115           _nb_spr_port_read_by_bank ,
    116           _nb_spr_port_write_by_bank,
    117           crossbar                  );
    118 
    119        __param_spr_status [i] = new morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters
    120          (_nb_spr_read ,
    121           _nb_spr_write+_nb_inst_insert_rob[i]+2*_nb_inst_retire_rob[i],
    122           0,
    123           nb_special_register[i],
    124           1);   
    125 
    126        _param_gpr        [i] = new morpheo::behavioural::generic::registerfile::Parameters (__param_gpr        [i]);
    127        _param_gpr_status [i] = new morpheo::behavioural::generic::registerfile::Parameters (__param_gpr_status [i]);
    128        _param_spr        [i] = new morpheo::behavioural::generic::registerfile::Parameters (__param_spr        [i]);
    129        _param_spr_status [i] = new morpheo::behavioural::generic::registerfile::Parameters (__param_spr_status [i]);
    130      }
    131 
    132    _param_glue       = new morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Parameters  (_nb_ooo_engine        ,
    133                                                                                                                                          _size_general_data    ,
    134                                                                                                                                          _size_special_data    ,
    135                                                                                                                                          _nb_gpr_read          ,
    136                                                                                                                                          _nb_spr_read          ,   
    137                                                                                                                                          _nb_gpr_write         ,
    138                                                                                                                                          _nb_spr_write         ,
    139                                                                                                                                          _nb_inst_insert_rob   ,
    140                                                                                                                                          _nb_inst_retire_rob   );
    141      
     86    for (uint32_t i=0; i<_nb_ooo_engine; i++)
     87      {
     88        Tcrossbar_t crossbar = PARTIAL_CROSSBAR;
     89       
     90        __param_gpr        [i] = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters
     91          (_nb_gpr_read              ,
     92           _nb_gpr_write             ,
     93           _nb_general_register[i]   ,
     94            size_general_data        ,
     95           _nb_gpr_bank              ,
     96           _nb_gpr_port_read_by_bank ,
     97           _nb_gpr_port_write_by_bank,
     98           crossbar                  );
     99       
     100        __param_gpr_status [i] = new morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters
     101          (_nb_gpr_read ,
     102//         _nb_gpr_write+_nb_inst_insert_rob[i]+2*_nb_inst_retire_rob[i],
     103           _nb_gpr_write+_nb_inst_insert_rob[i],
     104           0,
     105           nb_general_register[i],
     106           1);
     107       
     108        __param_spr        [i] = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters
     109          (_nb_spr_read              ,
     110           _nb_spr_write             ,
     111           _nb_special_register[i]   ,
     112            size_special_data        ,
     113           _nb_spr_bank              ,
     114           _nb_spr_port_read_by_bank ,
     115           _nb_spr_port_write_by_bank,
     116           crossbar                  );
     117       
     118        __param_spr_status [i] = new morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters
     119          (_nb_spr_read ,
     120//         _nb_spr_write+_nb_inst_insert_rob[i]+2*_nb_inst_retire_rob[i],
     121           _nb_spr_write+_nb_inst_insert_rob[i],
     122           0,
     123           nb_special_register[i],
     124           1);   
     125       
     126        _param_gpr        [i] = new morpheo::behavioural::generic::registerfile::Parameters (__param_gpr        [i]);
     127        _param_gpr_status [i] = new morpheo::behavioural::generic::registerfile::Parameters (__param_gpr_status [i]);
     128        _param_spr        [i] = new morpheo::behavioural::generic::registerfile::Parameters (__param_spr        [i]);
     129        _param_spr_status [i] = new morpheo::behavioural::generic::registerfile::Parameters (__param_spr_status [i]);
     130      }
    142131   
    143 
    144 
     132    _param_glue       = new morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Parameters  (_nb_ooo_engine        ,
     133                                                                                                                                           size_general_data    ,
     134                                                                                                                                           size_special_data    ,
     135                                                                                                                                          _nb_gpr_read          ,
     136                                                                                                                                          _nb_spr_read          ,   
     137                                                                                                                                          _nb_gpr_write         ,
     138                                                                                                                                          _nb_spr_write         ,
     139                                                                                                                                          _nb_inst_insert_rob   ,
     140                                                                                                                                          _nb_inst_retire_rob   );
     141   
    145142    test();
    146     log_printf(FUNC,Register_unit,FUNCTION,"End");
     143   
     144    if (is_toplevel)
     145      {
     146        _size_ooo_engine_id        = log2(nb_ooo_engine);
     147        _size_general_data         = size_general_data;
     148        _size_special_data         = size_special_data;
     149       
     150        _have_port_ooo_engine_id   = _size_ooo_engine_id > 0;
     151
     152        copy();
     153      }
     154   
     155   log_printf(FUNC,Register_unit,FUNCTION,"End");
    147156  };
    148157 
     158// #undef  FUNCTION
     159// #define FUNCTION "Register_unit::Parameters (copy)"
     160//   Parameters::Parameters (Parameters & param):
     161//     _nb_ooo_engine             (param._nb_ooo_engine            ),
     162//     _size_general_data         (param._size_general_data        ),
     163//     _size_special_data         (param._size_special_data        ),
     164//     _nb_gpr_read               (param._nb_gpr_read              ),
     165//     _nb_gpr_write              (param._nb_gpr_write             ),
     166//     _nb_gpr_bank               (param._nb_gpr_bank              ),
     167//     _nb_gpr_port_read_by_bank  (param._nb_gpr_port_read_by_bank ),
     168//     _nb_gpr_port_write_by_bank (param._nb_gpr_port_write_by_bank),
     169//     _nb_spr_read               (param._nb_spr_read              ),
     170//     _nb_spr_write              (param._nb_spr_write             ),
     171//     _nb_spr_bank               (param._nb_spr_bank              ),
     172//     _nb_spr_port_read_by_bank  (param._nb_spr_port_read_by_bank ),
     173//     _nb_spr_port_write_by_bank (param._nb_spr_port_write_by_bank),
     174//     _nb_general_register       (param._nb_general_register      ),
     175//     _nb_special_register       (param._nb_special_register      ),
     176//     _nb_inst_insert_rob        (param._nb_inst_insert_rob       ),
     177//     _nb_inst_retire_rob        (param._nb_inst_retire_rob       ),
     178//     _have_port_ooo_engine_id   (param._have_port_ooo_engine_id  )
     179//   {
     180//     log_printf(FUNC,Register_unit,FUNCTION,"Begin");
     181
     182//     _size_gpr_address = param._size_gpr_address;
     183//     _size_spr_address = param._size_spr_address;
     184
     185//     __param_gpr        = param.__param_gpr       ;
     186//     __param_gpr_status = param.__param_gpr_status;
     187//     __param_spr        = param.__param_spr       ;
     188//     __param_spr_status = param.__param_spr_status;
     189//     _param_gpr         = param._param_gpr       ;
     190//     _param_gpr_status  = param._param_gpr_status;
     191//     _param_spr         = param._param_spr       ;
     192//     _param_spr_status  = param._param_spr_status;
     193//     _param_glue        = param._param_glue      ;
     194
     195//     test();
     196//     log_printf(FUNC,Register_unit,FUNCTION,"End");
     197//   };
     198
    149199#undef  FUNCTION
    150 #define FUNCTION "Register_unit::Parameters (copy)"
    151   Parameters::Parameters (Parameters & param):
    152     _nb_ooo_engine             (param._nb_ooo_engine            ),
    153     _size_general_data         (param._size_general_data        ),
    154     _size_special_data         (param._size_special_data        ),
    155     _nb_gpr_read               (param._nb_gpr_read              ),
    156     _nb_gpr_write              (param._nb_gpr_write             ),
    157     _nb_gpr_bank               (param._nb_gpr_bank              ),
    158     _nb_gpr_port_read_by_bank  (param._nb_gpr_port_read_by_bank ),
    159     _nb_gpr_port_write_by_bank (param._nb_gpr_port_write_by_bank),
    160     _nb_spr_read               (param._nb_spr_read              ),
    161     _nb_spr_write              (param._nb_spr_write             ),
    162     _nb_spr_bank               (param._nb_spr_bank              ),
    163     _nb_spr_port_read_by_bank  (param._nb_spr_port_read_by_bank ),
    164     _nb_spr_port_write_by_bank (param._nb_spr_port_write_by_bank),
    165     _nb_general_register       (param._nb_general_register      ),
    166     _nb_special_register       (param._nb_special_register      ),
    167     _nb_inst_insert_rob        (param._nb_inst_insert_rob       ),
    168     _nb_inst_retire_rob        (param._nb_inst_retire_rob       ),
    169     _have_port_ooo_engine_id   (param._have_port_ooo_engine_id  )
     200#define FUNCTION "Register_unit::~Parameters"
     201  Parameters::~Parameters (void)
    170202  {
    171203    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
    172204
    173     _size_gpr_address = param._size_gpr_address;
    174     _size_spr_address = param._size_spr_address;
    175 
    176     __param_gpr        = param.__param_gpr       ;
    177     __param_gpr_status = param.__param_gpr_status;
    178     __param_spr        = param.__param_spr       ;
    179     __param_spr_status = param.__param_spr_status;
    180     _param_gpr         = param._param_gpr       ;
    181     _param_gpr_status  = param._param_gpr_status;
    182     _param_spr         = param._param_spr       ;
    183     _param_spr_status  = param._param_spr_status;
    184     _param_glue        = param._param_glue      ;
    185 
    186     test();
    187     log_printf(FUNC,Register_unit,FUNCTION,"End");
    188   };
    189 
    190 #undef  FUNCTION
    191 #define FUNCTION "Register_unit::~Parameters"
    192   Parameters::~Parameters ()
    193   {
    194     log_printf(FUNC,Register_unit,FUNCTION,"Begin");
    195 
    196     delete [] _param_gpr       ;
    197     delete [] _param_gpr_status;
    198     delete [] _param_spr       ;
    199     delete [] _param_spr_status;
     205    for (uint32_t i=0; i<_nb_ooo_engine; i++)
     206      {
     207        delete _param_gpr         [i];
     208        delete _param_gpr_status  [i];
     209        delete _param_spr         [i];
     210        delete _param_spr_status  [i];
     211        delete __param_gpr        [i];
     212        delete __param_gpr_status [i];
     213        delete __param_spr        [i];
     214        delete __param_spr_status [i];
     215      }
     216    delete [] _param_gpr        ;
     217    delete [] _param_gpr_status ;
     218    delete [] _param_spr        ;
     219    delete [] _param_spr_status ;
    200220    delete [] __param_gpr       ;
    201221    delete [] __param_gpr_status;
     
    207227  };
    208228
     229#undef  FUNCTION
     230#define FUNCTION "Register_unit::copy"
     231  void Parameters::copy (void)
     232  {
     233    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
     234
     235    for (uint32_t i=0; i<_nb_ooo_engine; i++)
     236      {
     237        COPY(__param_gpr        [i]);
     238        COPY(__param_gpr_status [i]);
     239        COPY(__param_spr        [i]);
     240        COPY(__param_spr_status [i]);
     241      }
     242    COPY(_param_glue);
     243   
     244    log_printf(FUNC,Register_unit,FUNCTION,"End");
     245  };
     246
    209247}; // end namespace register_unit
    210248}; // end namespace execute_loop
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit.cpp

    r81 r88  
    3737    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
    3838
     39#if DEBUG_Register_unit == true
     40    log_printf(INFO,Register_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     41
     42    std::cout << *param << std::endl;
     43#endif   
     44
    3945    log_printf(INFO,Register_unit,FUNCTION,"Allocation");
    4046    allocation (
     
    4551
    4652#ifdef STATISTICS
    47     log_printf(INFO,Register_unit,FUNCTION,"Allocation of statistics");
     53    if (usage_is_set(_usage,USE_STATISTICS))
     54      {
     55        log_printf(INFO,Register_unit,FUNCTION,_("<%s> : Allocation of statistics"),_name.c_str());
    4856
    49     // Allocation of statistics
    50     statistics_declaration(param_statistics);
     57        statistics_declaration(param_statistics);
     58      }
    5159#endif
    5260
    5361#ifdef VHDL
    54     // generate the vhdl
    55     log_printf(INFO,Register_unit,FUNCTION,"Generate the vhdl");
    56 
    57     vhdl();
     62    if (usage_is_set(_usage,USE_VHDL))
     63      {
     64        // generate the vhdl
     65        log_printf(INFO,Register_unit,FUNCTION,"Generate the vhdl");
     66       
     67        vhdl();
     68      }
    5869#endif
    5970
    6071#ifdef SYSTEMC
     72    if (usage_is_set(_usage,USE_SYSTEMC))
     73      {
    6174//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    6275    log_printf(INFO,Register_unit,FUNCTION,"Method - transition");
     
    7083    // List dependency information
    7184#endif   
    72 
     85      }
    7386#endif
    7487    log_printf(FUNC,Register_unit,FUNCTION,"End");
     
    8295
    8396#ifdef STATISTICS
    84     log_printf(INFO,Register_unit,FUNCTION,"Generate Statistics file");
    85     delete _stat;
     97    if (usage_is_set(_usage,USE_STATISTICS))
     98      {
     99        log_printf(INFO,Register_unit,FUNCTION,"Generate Statistics file");
     100        delete _stat;
     101      }
    86102#endif
    87103
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp

    r82 r88  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
     
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Register_unit.h"
    99
    10 namespace morpheo                    {
     10namespace morpheo {
    1111namespace behavioural {
    1212namespace core {
     
    1414namespace execute_loop {
    1515namespace register_unit {
    16 
    17 
    1816
    1917#undef  FUNCTION
     
    4038    _interfaces = entity->set_interfaces();
    4139
    42     // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     40    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4341
    4442    Interface * interface = _interfaces->set_interface(""
     
    5351    in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
    5452
    55     // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     53    // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5654    in_GPR_READ_VAL                 = new SC_IN (Tcontrol_t        )   * [_param->_nb_gpr_read];
    5755    out_GPR_READ_ACK                 = new SC_OUT(Tcontrol_t        )   * [_param->_nb_gpr_read];
     
    7573        out_GPR_READ_ACK           [i]= interface->set_signal_valack_out (ACK);
    7674        if (_param->_have_port_ooo_engine_id == true)
    77           in_GPR_READ_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t        > ("ooo_engine_id" , log2(_param->_nb_ooo_engine));
     75          in_GPR_READ_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t        > ("ooo_engine_id" , _param->_size_ooo_engine_id);
    7876        in_GPR_READ_NUM_REG       [i]= interface->set_signal_in <Tgeneral_address_t> ("num_reg"       , _param->_size_gpr_address);
    7977        out_GPR_READ_DATA          [i]= interface->set_signal_out<Tgeneral_data_t   > ("data"          , _param->_size_general_data);
     
    8179      }
    8280
    83     // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     81    // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8482    in_GPR_WRITE_VAL                 = new SC_IN (Tcontrol_t        )   * [_param->_nb_gpr_write];
    8583    out_GPR_WRITE_ACK                 = new SC_OUT(Tcontrol_t        )   * [_param->_nb_gpr_write];
     
    102100        out_GPR_WRITE_ACK           [i]= interface->set_signal_valack_out (ACK);
    103101        if (_param->_have_port_ooo_engine_id == true)
    104           in_GPR_WRITE_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t        > ("ooo_engine_id" , log2(_param->_nb_ooo_engine));
     102          in_GPR_WRITE_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t        > ("ooo_engine_id" , _param->_size_ooo_engine_id);
    105103        in_GPR_WRITE_NUM_REG       [i]= interface->set_signal_in <Tgeneral_address_t> ("num_reg"       , _param->_size_gpr_address);
    106104        in_GPR_WRITE_DATA          [i]= interface->set_signal_in <Tgeneral_data_t   > ("data"          , _param->_size_general_data);
    107105      }
    108106
    109     // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     107    // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    110108    in_SPR_READ_VAL                 = new SC_IN (Tcontrol_t        )   * [_param->_nb_spr_read];
    111109    out_SPR_READ_ACK                 = new SC_OUT(Tcontrol_t        )   * [_param->_nb_spr_read];
     
    129127        out_SPR_READ_ACK           [i]= interface->set_signal_valack_out (ACK);
    130128        if (_param->_have_port_ooo_engine_id == true)
    131           in_SPR_READ_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t        > ("ooo_engine_id" , log2(_param->_nb_ooo_engine));
     129          in_SPR_READ_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t        > ("ooo_engine_id" , _param->_size_ooo_engine_id);
    132130        in_SPR_READ_NUM_REG       [i]= interface->set_signal_in <Tspecial_address_t> ("num_reg"       , _param->_size_spr_address);
    133131        out_SPR_READ_DATA          [i]= interface->set_signal_out<Tspecial_data_t   > ("data"          , _param->_size_special_data);
     
    135133      }
    136134
    137     // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     135    // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    138136    in_SPR_WRITE_VAL                 = new SC_IN (Tcontrol_t        )   * [_param->_nb_spr_write];
    139137    out_SPR_WRITE_ACK                 = new SC_OUT(Tcontrol_t        )   * [_param->_nb_spr_write];
     
    156154        out_SPR_WRITE_ACK           [i]= interface->set_signal_valack_out (ACK);
    157155        if (_param->_have_port_ooo_engine_id == true)
    158           in_SPR_WRITE_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t        > ("ooo_engine_id" , log2(_param->_nb_ooo_engine));
     156          in_SPR_WRITE_OOO_ENGINE_ID [i]= interface->set_signal_in <Tcontext_t        > ("ooo_engine_id" , _param->_size_ooo_engine_id);
    159157        in_SPR_WRITE_NUM_REG       [i]= interface->set_signal_in <Tspecial_address_t> ("num_reg"       , _param->_size_spr_address);
    160158        in_SPR_WRITE_DATA          [i]= interface->set_signal_in <Tspecial_data_t   > ("data"          , _param->_size_special_data);
    161159      }
    162160
    163     // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     161    // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    164162    in_INSERT_ROB_VAL        = new SC_IN (Tcontrol_t        )  ** [_param->_nb_ooo_engine];
    165163    out_INSERT_ROB_ACK        = new SC_OUT(Tcontrol_t        )  ** [_param->_nb_ooo_engine];
     
    201199      }
    202200
    203     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    204     in_RETIRE_ROB_VAL            = new SC_IN (Tcontrol_t        )  ** [_param->_nb_ooo_engine];
    205     out_RETIRE_ROB_ACK            = new SC_OUT(Tcontrol_t        )  ** [_param->_nb_ooo_engine];
    206     in_RETIRE_ROB_RD_OLD_USE     = new SC_IN (Tcontrol_t        )  ** [_param->_nb_ooo_engine];
    207     in_RETIRE_ROB_RD_OLD_NUM_REG = new SC_IN (Tgeneral_address_t)  ** [_param->_nb_ooo_engine];
    208     in_RETIRE_ROB_RE_OLD_USE     = new SC_IN (Tcontrol_t        )  ** [_param->_nb_ooo_engine];
    209     in_RETIRE_ROB_RE_OLD_NUM_REG = new SC_IN (Tspecial_address_t)  ** [_param->_nb_ooo_engine];
    210     in_RETIRE_ROB_RD_NEW_USE     = new SC_IN (Tcontrol_t        )  ** [_param->_nb_ooo_engine];
    211     in_RETIRE_ROB_RD_NEW_NUM_REG = new SC_IN (Tgeneral_address_t)  ** [_param->_nb_ooo_engine];
    212     in_RETIRE_ROB_RE_NEW_USE     = new SC_IN (Tcontrol_t        )  ** [_param->_nb_ooo_engine];
    213     in_RETIRE_ROB_RE_NEW_NUM_REG = new SC_IN (Tspecial_address_t)  ** [_param->_nb_ooo_engine];
    214 
    215     for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    216       {
    217         uint32_t x=_param->_nb_inst_retire_rob [i];
    218 
    219         in_RETIRE_ROB_VAL            [i] = new SC_IN (Tcontrol_t        )  * [x];
    220         out_RETIRE_ROB_ACK            [i] = new SC_OUT(Tcontrol_t        )  * [x];
    221         in_RETIRE_ROB_RD_OLD_USE     [i] = new SC_IN (Tcontrol_t        )  * [x];
    222         in_RETIRE_ROB_RD_OLD_NUM_REG [i] = new SC_IN (Tgeneral_address_t)  * [x];
    223         in_RETIRE_ROB_RE_OLD_USE     [i] = new SC_IN (Tcontrol_t        )  * [x];
    224         in_RETIRE_ROB_RE_OLD_NUM_REG [i] = new SC_IN (Tspecial_address_t)  * [x];
    225         in_RETIRE_ROB_RD_NEW_USE     [i] = new SC_IN (Tcontrol_t        )  * [x];
    226         in_RETIRE_ROB_RD_NEW_NUM_REG [i] = new SC_IN (Tgeneral_address_t)  * [x];
    227         in_RETIRE_ROB_RE_NEW_USE     [i] = new SC_IN (Tcontrol_t        )  * [x];
    228         in_RETIRE_ROB_RE_NEW_NUM_REG [i] = new SC_IN (Tspecial_address_t)  * [x];
    229 
    230         for (uint32_t j=0; j<x; j++)
    231           {
    232             Interface_fifo * interface = _interfaces->set_interface("retire_rob_"+toString(i)+"_"+toString(j)
    233 #ifdef POSITION
    234                                                                     ,IN
    235                                                                     ,WEST
    236                                                                     ,"Interface to update status (retire)"
    237 #endif
    238                                                                     );
    239 
    240 
    241             in_RETIRE_ROB_VAL            [i][j] = interface->set_signal_valack_in  (VAL);
    242            out_RETIRE_ROB_ACK            [i][j] = interface->set_signal_valack_out (ACK);
    243             in_RETIRE_ROB_RD_OLD_USE     [i][j] = interface->set_signal_in <Tcontrol_t        > ("rd_old_use"    , 1);
    244             in_RETIRE_ROB_RD_OLD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_old_num_reg", _param->_size_gpr_address);
    245             in_RETIRE_ROB_RE_OLD_USE     [i][j] = interface->set_signal_in <Tcontrol_t        > ("re_old_use"    , 1);
    246             in_RETIRE_ROB_RE_OLD_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_old_num_reg", _param->_size_spr_address);
    247             in_RETIRE_ROB_RD_NEW_USE     [i][j] = interface->set_signal_in <Tcontrol_t        > ("rd_new_use"    , 1);
    248             in_RETIRE_ROB_RD_NEW_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_new_num_reg", _param->_size_gpr_address);
    249             in_RETIRE_ROB_RE_NEW_USE     [i][j] = interface->set_signal_in <Tcontrol_t        > ("re_new_use"    , 1);
    250             in_RETIRE_ROB_RE_NEW_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_new_num_reg", _param->_size_spr_address);
    251           }
    252       }
    253     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     201//     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     202//     in_RETIRE_ROB_VAL            = new SC_IN (Tcontrol_t        )  ** [_param->_nb_ooo_engine];
     203//     out_RETIRE_ROB_ACK            = new SC_OUT(Tcontrol_t        )  ** [_param->_nb_ooo_engine];
     204//     in_RETIRE_ROB_RD_OLD_USE     = new SC_IN (Tcontrol_t        )  ** [_param->_nb_ooo_engine];
     205//     in_RETIRE_ROB_RD_OLD_NUM_REG = new SC_IN (Tgeneral_address_t)  ** [_param->_nb_ooo_engine];
     206//     in_RETIRE_ROB_RE_OLD_USE     = new SC_IN (Tcontrol_t        )  ** [_param->_nb_ooo_engine];
     207//     in_RETIRE_ROB_RE_OLD_NUM_REG = new SC_IN (Tspecial_address_t)  ** [_param->_nb_ooo_engine];
     208//     in_RETIRE_ROB_RD_NEW_USE     = new SC_IN (Tcontrol_t        )  ** [_param->_nb_ooo_engine];
     209//     in_RETIRE_ROB_RD_NEW_NUM_REG = new SC_IN (Tgeneral_address_t)  ** [_param->_nb_ooo_engine];
     210//     in_RETIRE_ROB_RE_NEW_USE     = new SC_IN (Tcontrol_t        )  ** [_param->_nb_ooo_engine];
     211//     in_RETIRE_ROB_RE_NEW_NUM_REG = new SC_IN (Tspecial_address_t)  ** [_param->_nb_ooo_engine];
     212
     213//     for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     214//       {
     215//      uint32_t x=_param->_nb_inst_retire_rob [i];
     216
     217//      in_RETIRE_ROB_VAL            [i] = new SC_IN (Tcontrol_t        )  * [x];
     218//      out_RETIRE_ROB_ACK            [i] = new SC_OUT(Tcontrol_t        )  * [x];
     219//      in_RETIRE_ROB_RD_OLD_USE     [i] = new SC_IN (Tcontrol_t        )  * [x];
     220//      in_RETIRE_ROB_RD_OLD_NUM_REG [i] = new SC_IN (Tgeneral_address_t)  * [x];
     221//      in_RETIRE_ROB_RE_OLD_USE     [i] = new SC_IN (Tcontrol_t        )  * [x];
     222//      in_RETIRE_ROB_RE_OLD_NUM_REG [i] = new SC_IN (Tspecial_address_t)  * [x];
     223//      in_RETIRE_ROB_RD_NEW_USE     [i] = new SC_IN (Tcontrol_t        )  * [x];
     224//      in_RETIRE_ROB_RD_NEW_NUM_REG [i] = new SC_IN (Tgeneral_address_t)  * [x];
     225//      in_RETIRE_ROB_RE_NEW_USE     [i] = new SC_IN (Tcontrol_t        )  * [x];
     226//      in_RETIRE_ROB_RE_NEW_NUM_REG [i] = new SC_IN (Tspecial_address_t)  * [x];
     227
     228//      for (uint32_t j=0; j<x; j++)
     229//        {
     230//          Interface_fifo * interface = _interfaces->set_interface("retire_rob_"+toString(i)+"_"+toString(j)
     231// #ifdef POSITION
     232//                                                                  ,IN
     233//                                                                  ,WEST
     234//                                                                  ,"Interface to update status (retire)"
     235// #endif
     236//                                                                  );
     237
     238
     239//          in_RETIRE_ROB_VAL            [i][j] = interface->set_signal_valack_in  (VAL);
     240//         out_RETIRE_ROB_ACK            [i][j] = interface->set_signal_valack_out (ACK);
     241//          in_RETIRE_ROB_RD_OLD_USE     [i][j] = interface->set_signal_in <Tcontrol_t        > ("rd_old_use"    , 1);
     242//          in_RETIRE_ROB_RD_OLD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_old_num_reg", _param->_size_gpr_address);
     243//          in_RETIRE_ROB_RE_OLD_USE     [i][j] = interface->set_signal_in <Tcontrol_t        > ("re_old_use"    , 1);
     244//          in_RETIRE_ROB_RE_OLD_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_old_num_reg", _param->_size_spr_address);
     245//          in_RETIRE_ROB_RD_NEW_USE     [i][j] = interface->set_signal_in <Tcontrol_t        > ("rd_new_use"    , 1);
     246//          in_RETIRE_ROB_RD_NEW_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_new_num_reg", _param->_size_gpr_address);
     247//          in_RETIRE_ROB_RE_NEW_USE     [i][j] = interface->set_signal_in <Tcontrol_t        > ("re_new_use"    , 1);
     248//          in_RETIRE_ROB_RE_NEW_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_new_num_reg", _param->_size_spr_address);
     249//        }
     250//       }
     251
     252    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    254253
    255254    std::string name;
     
    263262      {
    264263        name = _name+"_gpr_"+toString(i);
     264        log_printf(INFO,Register_unit,FUNCTION,_("Create   : %s"),name.c_str());
    265265
    266266        component_gpr        [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile
     
    284284
    285285        name = _name+"_gpr_status_"+toString(i);
     286        log_printf(INFO,Register_unit,FUNCTION,_("Create   : %s"),name.c_str());
    286287
    287288        component_gpr_status [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile
     
    305306
    306307        name = _name+"_spr_"+toString(i);
     308        log_printf(INFO,Register_unit,FUNCTION,_("Create   : %s"),name.c_str());
    307309         
    308310        component_spr        [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile
     
    325327
    326328        name = _name+"_spr_status_"+toString(i);
     329        log_printf(INFO,Register_unit,FUNCTION,_("Create   : %s"),name.c_str());
    327330
    328331        component_spr_status [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile
     
    347350
    348351    name = _name+"_glue";
     352    log_printf(INFO,Register_unit,FUNCTION,_("Create   : %s"),name.c_str());
    349353     
    350354    component_glue       = new morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Register_unit_Glue::Register_unit_Glue     
     
    373377        name_component = _name+"_gpr_"+toString(i);
    374378       
    375         std::cout << "Instance : " << name_component << std::endl;
     379        log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str());
    376380       
    377381#ifdef POSITION
     
    430434          name_component = _name+"_gpr_status_"+toString(i);
    431435         
    432           std::cout << "Instance : " << name_component << std::endl;
     436          log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str());
    433437         
    434438#ifdef POSITION
     
    516520            }
    517521
    518           for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)
    519             {
    520               _component->port_map(name_component,
    521                                    "in_WRITE_"+toString(x)+"_VAL" ,
    522                                    _name+"_glue",
    523                                    "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL");
    524               _component->port_map(name_component,
    525                                    "out_WRITE_"+toString(x)+"_ACK",
    526                                    _name+"_glue",
    527                                    "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" );
    528 
    529               _component->port_map(name_component,
    530                                    "in_WRITE_"+toString(x)+"_DATA" ,
    531                                    _name+"_glue",
    532                                    "out_CONST_0");
    533               _component->port_map(_name+"_glue",
    534                                    "out_CONST_0",
    535                                    name_component,
    536                                    "in_WRITE_"+toString(x)+"_DATA" );
    537 
    538               _component->port_map(name_component,
    539                                    "in_WRITE_"+toString(x++)+"_ADDRESS",
    540                                    _name,
    541                                    "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG");
     522//        for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)
     523//          {
     524//            _component->port_map(name_component,
     525//                                 "in_WRITE_"+toString(x)+"_VAL" ,
     526//                                 _name+"_glue",
     527//                                 "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL");
     528//            _component->port_map(name_component,
     529//                                 "out_WRITE_"+toString(x)+"_ACK",
     530//                                 _name+"_glue",
     531//                                 "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" );
     532
     533//            _component->port_map(name_component,
     534//                                 "in_WRITE_"+toString(x)+"_DATA" ,
     535//                                 _name+"_glue",
     536//                                 "out_CONST_0");
     537//            _component->port_map(_name+"_glue",
     538//                                 "out_CONST_0",
     539//                                 name_component,
     540//                                 "in_WRITE_"+toString(x)+"_DATA" );
     541
     542//            _component->port_map(name_component,
     543//                                 "in_WRITE_"+toString(x++)+"_ADDRESS",
     544//                                 _name,
     545//                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG");
    542546             
    543               _component->port_map(name_component,
    544                                    "in_WRITE_"+toString(x)+"_VAL" ,
    545                                    _name+"_glue",
    546                                    "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL");
    547               _component->port_map(name_component,
    548                                    "out_WRITE_"+toString(x)+"_ACK",
    549                                    _name+"_glue",
    550                                    "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" );
    551 
    552               _component->port_map(name_component,
    553                                    "in_WRITE_"+toString(x)+"_DATA" ,
    554                                    _name+"_glue",
    555                                    "out_CONST_1"
    556                                    );
    557               _component->port_map(_name+"_glue",
    558                                    "out_CONST_1",
    559                                    name_component,
    560                                    "in_WRITE_"+toString(x)+"_DATA"
    561                                    );
    562 
    563               _component->port_map(name_component,
    564                                    "in_WRITE_"+toString(x++)+"_ADDRESS",
    565                                    _name,
    566                                    "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG");
    567             }
     547//            _component->port_map(name_component,
     548//                                 "in_WRITE_"+toString(x)+"_VAL" ,
     549//                                 _name+"_glue",
     550//                                 "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL");
     551//            _component->port_map(name_component,
     552//                                 "out_WRITE_"+toString(x)+"_ACK",
     553//                                 _name+"_glue",
     554//                                 "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" );
     555
     556//            _component->port_map(name_component,
     557//                                 "in_WRITE_"+toString(x)+"_DATA" ,
     558//                                 _name+"_glue",
     559//                                 "out_CONST_1"
     560//                                 );
     561//            _component->port_map(_name+"_glue",
     562//                                 "out_CONST_1",
     563//                                 name_component,
     564//                                 "in_WRITE_"+toString(x)+"_DATA"
     565//                                 );
     566
     567//            _component->port_map(name_component,
     568//                                 "in_WRITE_"+toString(x++)+"_ADDRESS",
     569//                                 _name,
     570//                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG");
     571//          }
    568572
    569573        }
     
    574578        name_component = _name+"_spr_"+toString(i);
    575579       
    576         std::cout << "Instance : " << name_component << std::endl;
     580        log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str());
    577581       
    578582#ifdef POSITION
     
    631635          name_component = _name+"_spr_status_"+toString(i);
    632636         
    633           std::cout << "Instance : " << name_component << std::endl;
    634          
     637          log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str());   
     638 
    635639#ifdef POSITION
    636640          _component->interface_map (name_component,"",
     
    717721            }
    718722
    719           for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)
    720             {
    721               _component->port_map(name_component,
    722                                    "in_WRITE_"+toString(x)+"_VAL" ,
    723                                    _name+"_glue",
    724                                    "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL");
    725               _component->port_map(name_component,
    726                                    "out_WRITE_"+toString(x)+"_ACK",
    727                                    _name+"_glue",
    728                                    "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" );
    729 
    730               _component->port_map(name_component,
    731                                    "in_WRITE_"+toString(x)+"_DATA" ,
    732                                    _name+"_glue",
    733                                    "out_CONST_0");
    734               _component->port_map(_name+"_glue",
    735                                    "out_CONST_0",
    736                                    name_component,
    737                                    "in_WRITE_"+toString(x)+"_DATA"
    738                                    );
    739 
    740               _component->port_map(name_component,
    741                                    "in_WRITE_"+toString(x++)+"_ADDRESS",
    742                                    _name,
    743                                    "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG");
     723//        for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)
     724//          {
     725//            _component->port_map(name_component,
     726//                                 "in_WRITE_"+toString(x)+"_VAL" ,
     727//                                 _name+"_glue",
     728//                                 "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL");
     729//            _component->port_map(name_component,
     730//                                 "out_WRITE_"+toString(x)+"_ACK",
     731//                                 _name+"_glue",
     732//                                 "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" );
     733
     734//            _component->port_map(name_component,
     735//                                 "in_WRITE_"+toString(x)+"_DATA" ,
     736//                                 _name+"_glue",
     737//                                 "out_CONST_0");
     738//            _component->port_map(_name+"_glue",
     739//                                 "out_CONST_0",
     740//                                 name_component,
     741//                                 "in_WRITE_"+toString(x)+"_DATA"
     742//                                 );
     743
     744//            _component->port_map(name_component,
     745//                                 "in_WRITE_"+toString(x++)+"_ADDRESS",
     746//                                 _name,
     747//                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG");
    744748             
    745               _component->port_map(name_component,
    746                                    "in_WRITE_"+toString(x)+"_VAL" ,
    747                                    _name+"_glue",
    748                                    "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL");
    749               _component->port_map(name_component,
    750                                    "out_WRITE_"+toString(x)+"_ACK",
    751                                    _name+"_glue",
    752                                    "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" );
    753 
    754               _component->port_map(name_component,
    755                                    "in_WRITE_"+toString(x)+"_DATA" ,
    756                                    _name+"_glue",
    757                                    "out_CONST_1"
    758                                    );
    759               _component->port_map(_name+"_glue",
    760                                    "out_CONST_1",
    761                                    name_component,
    762                                    "in_WRITE_"+toString(x)+"_DATA"
    763                                    );
    764 
    765               _component->port_map(name_component,
    766                                    "in_WRITE_"+toString(x++)+"_ADDRESS",
    767                                    _name,
    768                                    "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG");
    769             }
     749//            _component->port_map(name_component,
     750//                                 "in_WRITE_"+toString(x)+"_VAL" ,
     751//                                 _name+"_glue",
     752//                                 "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL");
     753//            _component->port_map(name_component,
     754//                                 "out_WRITE_"+toString(x)+"_ACK",
     755//                                 _name+"_glue",
     756//                                 "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" );
     757
     758//            _component->port_map(name_component,
     759//                                 "in_WRITE_"+toString(x)+"_DATA" ,
     760//                                 _name+"_glue",
     761//                                 "out_CONST_1"
     762//                                 );
     763//            _component->port_map(_name+"_glue",
     764//                                 "out_CONST_1",
     765//                                 name_component,
     766//                                 "in_WRITE_"+toString(x)+"_DATA"
     767//                                 );
     768
     769//            _component->port_map(name_component,
     770//                                 "in_WRITE_"+toString(x++)+"_ADDRESS",
     771//                                 _name,
     772//                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG");
     773//          }
    770774
    771775        }
     
    775779      name_component = _name+"_glue";
    776780     
    777       std::cout << "Instance : " << name_component << std::endl;
    778     
     781      log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str()); 
     782   
    779783#ifdef POSITION
    780784      _component->interface_map (name_component,"",
     
    10101014        }
    10111015
    1012       for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    1013         {
    1014           uint32_t x     =_param->_nb_inst_retire_rob [i];
    1015           uint32_t gpr_j = _param->_nb_gpr_write + _param->_nb_inst_insert_rob [i];
    1016           uint32_t spr_j = _param->_nb_spr_write + _param->_nb_inst_insert_rob [i];
    1017 
    1018           for (uint32_t j=0; j<x; j++)
    1019             {
    1020               _component->port_map(name_component,
    1021                                    "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL",
    1022                                    _name,
    1023                                    "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL");
    1024               _component->port_map(name_component,
    1025                                    "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK",
    1026                                    _name,
    1027                                    "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK");
    1028               _component->port_map(name_component,
    1029                                    "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE",
    1030                                    _name,
    1031                                    "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE");
    1032               _component->port_map(name_component,
    1033                                    "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE",
    1034                                    _name,
    1035                                    "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE");
    1036               _component->port_map(name_component,
    1037                                    "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE",
    1038                                    _name,
    1039                                    "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE");
    1040               _component->port_map(name_component,
    1041                                    "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE",
    1042                                    _name,
    1043                                    "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE");
     1016//       for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     1017//      {
     1018//        uint32_t x     =_param->_nb_inst_retire_rob [i];
     1019//        uint32_t gpr_j = _param->_nb_gpr_write + _param->_nb_inst_insert_rob [i];
     1020//        uint32_t spr_j = _param->_nb_spr_write + _param->_nb_inst_insert_rob [i];
     1021
     1022//        for (uint32_t j=0; j<x; j++)
     1023//          {
     1024//            _component->port_map(name_component,
     1025//                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL",
     1026//                                 _name,
     1027//                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL");
     1028//            _component->port_map(name_component,
     1029//                                 "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK",
     1030//                                 _name,
     1031//                                 "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK");
     1032//            _component->port_map(name_component,
     1033//                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE",
     1034//                                 _name,
     1035//                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE");
     1036//            _component->port_map(name_component,
     1037//                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE",
     1038//                                 _name,
     1039//                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE");
     1040//            _component->port_map(name_component,
     1041//                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE",
     1042//                                 _name,
     1043//                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE");
     1044//            _component->port_map(name_component,
     1045//                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE",
     1046//                                 _name,
     1047//                                 "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE");
    10441048           
    1045               _component->port_map(name_component,
    1046                                    "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL",
    1047                                    _name+"_gpr_status_"+toString(i),
    1048                                    "in_WRITE_"+toString(gpr_j)+"_VAL");
    1049               _component->port_map(name_component,
    1050                                    "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK",
    1051                                    _name+"_gpr_status_"+toString(i),
    1052                                    "out_WRITE_"+toString(gpr_j++)+"_ACK");
    1053               _component->port_map(name_component,
    1054                                    "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL",
    1055                                    _name+"_gpr_status_"+toString(i),
    1056                                    "in_WRITE_"+toString(gpr_j)+"_VAL");
    1057               _component->port_map(name_component,
    1058                                    "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK",
    1059                                    _name+"_gpr_status_"+toString(i),
    1060                                    "out_WRITE_"+toString(gpr_j++)+"_ACK");
    1061               _component->port_map(name_component,
    1062                                    "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL",
    1063                                    _name+"_spr_status_"+toString(i),
    1064                                    "in_WRITE_"+toString(spr_j)+"_VAL");
    1065               _component->port_map(name_component,
    1066                                    "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK",
    1067                                    _name+"_spr_status_"+toString(i),
    1068                                    "out_WRITE_"+toString(spr_j++)+"_ACK");
    1069               _component->port_map(name_component,
    1070                                    "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL",
    1071                                    _name+"_spr_status_"+toString(i),
    1072                                    "in_WRITE_"+toString(spr_j)+"_VAL");
    1073               _component->port_map(name_component,
    1074                                    "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK",
    1075                                    _name+"_spr_status_"+toString(i),
    1076                                    "out_WRITE_"+toString(spr_j++)+"_ACK");
    1077             }
    1078         }
     1049//            _component->port_map(name_component,
     1050//                                 "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL",
     1051//                                 _name+"_gpr_status_"+toString(i),
     1052//                                 "in_WRITE_"+toString(gpr_j)+"_VAL");
     1053//            _component->port_map(name_component,
     1054//                                 "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK",
     1055//                                 _name+"_gpr_status_"+toString(i),
     1056//                                 "out_WRITE_"+toString(gpr_j++)+"_ACK");
     1057//            _component->port_map(name_component,
     1058//                                 "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL",
     1059//                                 _name+"_gpr_status_"+toString(i),
     1060//                                 "in_WRITE_"+toString(gpr_j)+"_VAL");
     1061//            _component->port_map(name_component,
     1062//                                 "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK",
     1063//                                 _name+"_gpr_status_"+toString(i),
     1064//                                 "out_WRITE_"+toString(gpr_j++)+"_ACK");
     1065//            _component->port_map(name_component,
     1066//                                 "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL",
     1067//                                 _name+"_spr_status_"+toString(i),
     1068//                                 "in_WRITE_"+toString(spr_j)+"_VAL");
     1069//            _component->port_map(name_component,
     1070//                                 "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK",
     1071//                                 _name+"_spr_status_"+toString(i),
     1072//                                 "out_WRITE_"+toString(spr_j++)+"_ACK");
     1073//            _component->port_map(name_component,
     1074//                                 "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL",
     1075//                                 _name+"_spr_status_"+toString(i),
     1076//                                 "in_WRITE_"+toString(spr_j)+"_VAL");
     1077//            _component->port_map(name_component,
     1078//                                 "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK",
     1079//                                 _name+"_spr_status_"+toString(i),
     1080//                                 "out_WRITE_"+toString(spr_j++)+"_ACK");
     1081//          }
     1082//      }
    10791083    }// glue
    10801084
    1081 //     _component->test_map ();
    1082 
    1083 #ifdef POSITION
    1084     _component->generate_file();
     1085#if DEBUG_Register_unit == true
     1086    _component->test_map ();
     1087#endif
     1088
     1089#ifdef POSITION
     1090    if (usage_is_set(_usage,USE_POSITION))
     1091      _component->generate_file();
    10851092#endif
    10861093
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_deallocation.cpp

    r81 r88  
    2222    log_printf(FUNC,Register_unit,FUNCTION,"Begin");
    2323
     24    if (usage_is_set(_usage,USE_SYSTEMC))
     25      {
    2426//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    2527    delete     in_CLOCK ;
     
    5961    delete []  in_INSERT_ROB_RE_USE            ;
    6062    delete []  in_INSERT_ROB_RE_NUM_REG        ;
    61     delete []  in_RETIRE_ROB_VAL               ;
    62     delete [] out_RETIRE_ROB_ACK               ;
    63     delete []  in_RETIRE_ROB_RD_OLD_USE        ;
    64     delete []  in_RETIRE_ROB_RD_OLD_NUM_REG    ;
    65     delete []  in_RETIRE_ROB_RD_NEW_USE        ;
    66     delete []  in_RETIRE_ROB_RD_NEW_NUM_REG    ;
    67     delete []  in_RETIRE_ROB_RE_OLD_USE        ;
    68     delete []  in_RETIRE_ROB_RE_OLD_NUM_REG    ;
    69     delete []  in_RETIRE_ROB_RE_NEW_USE        ;
    70     delete []  in_RETIRE_ROB_RE_NEW_NUM_REG    ;
     63//     delete []  in_RETIRE_ROB_VAL               ;
     64//     delete [] out_RETIRE_ROB_ACK               ;
     65//     delete []  in_RETIRE_ROB_RD_OLD_USE        ;
     66//     delete []  in_RETIRE_ROB_RD_OLD_NUM_REG    ;
     67//     delete []  in_RETIRE_ROB_RD_NEW_USE        ;
     68//     delete []  in_RETIRE_ROB_RD_NEW_NUM_REG    ;
     69//     delete []  in_RETIRE_ROB_RE_OLD_USE        ;
     70//     delete []  in_RETIRE_ROB_RE_OLD_NUM_REG    ;
     71//     delete []  in_RETIRE_ROB_RE_NEW_USE        ;
     72//     delete []  in_RETIRE_ROB_RE_NEW_NUM_REG    ;
     73      }
    7174
    7275    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_end_cycle.cpp

    r81 r88  
    2323
    2424#ifdef STATISTICS
    25     _stat->end_cycle();
     25    if (usage_is_set(_usage,USE_STATISTICS))
     26      _stat->end_cycle();
    2627#endif   
    2728
     
    2930    // Evaluation before read the ouput signal
    3031//  sc_start(0);
    31     _interfaces->testbench();
     32    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     33      _interfaces->testbench();
    3234#endif
    3335
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Execute_loop_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/config_min.cfg

    r87 r88  
    101032      32      +1      # size_general_data                         
    11112       2       +1      # size_special_data                         
    12 1       1       +1      # size_read_queue                            [0]    [read_unit]
    13 1       1       +1      # size_reservation_station                   [0]    [read_unit]
    14 1       1       +1      # nb_inst_retire                             [0]    [read_unit]
    15 2       2       +1      # size_store_queue                           [0]    [load_store_unit]
    16 1       1       +1      # size_load_queue                            [0]    [load_store_unit]
    17 1       1       +1      # size_speculative_access_queue              [0]    [load_store_unit]
    18 1       1       +1      # nb_port_check                              [0]    [load_store_unit]
    19 2       2       +1      # speculative_load                           [0]    [load_store_unit]
    20 0       0       +1      # nb_bypass_memory                           [0]    [load_store_unit]
    21 1       1       +1      # size_write_queue                           [0]    [write_unit]
    22 1       1       +1      # size_execute_queue                         [0]    [write_unit]
    23 1       1       +1      # nb_bypass_write                            [0]    [write_unit]
    24 1       1       +1      # nb_gpr_bank                                       
    25 1       1       +1      # nb_gpr_port_read_by_bank                         
    26 1       1       +1      # nb_gpr_port_write_by_bank                         
    27 1       1       +1      # nb_spr_bank                                       
    28 1       1       +1      # nb_spr_port_read_by_bank                         
    29 1       1       +1      # nb_spr_port_write_by_bank                         
    30 64      64      +1      # nb_general_register                        [0]    [nb_ooo_engine]               
    31 16      16      +1      # nb_special_register                        [0]    [nb_ooo_engine]               
    32 1       1       +1      # nb_inst_insert_rob                         [0]    [nb_ooo_engine]               
    33 1       1       +1      # nb_inst_retire_rob                         [0]    [nb_ooo_engine]               
    34 1       1       +1      # execution_unit_to_write_unit_priority                                     
    35 1       1       +1      # execution_unit_to_write_unit_table_routing [0][0] [nb_execute_unit][nb_write_unit]
    36 1       1       +1      # execution_unit_to_write_unit_table_routing [1][0] [nb_execute_unit][nb_write_unit]
    37 1       1       +1      # execution_unit_to_write_unit_table_thread  [0][0] [nb_write_unit][nb_thread]   
    38 1       1       +1      # read_unit_to_execution_unit_priority                                       
    39 1       1       +1      # read_unit_to_execution_unit_table_routing  [0][0] [nb_read_unit][nb_execute_unit]
    40 1       1       +1      # read_unit_to_execution_unit_table_routing  [0][1] [nb_read_unit][nb_execute_unit]
    41 1       1       +1      # read_unit_to_execution_unit_table_thread   [0][0] [nb_execute_unit][nb_thread]   
    42 1       1       +1      # read_unit_to_execution_unit_table_thread   [1][0] [nb_execute_unit][nb_thread]   
     121       1       +1      # size_read_queue                            [0]       [nb_read_unit]
     131       1       +1      # size_reservation_station                   [0]       [nb_read_unit]
     141       1       +1      # nb_inst_retire                             [0]       [nb_read_unit]
     151       1       +1      # nb_inst_functionnal_unit                   [0]       [nb_inst_functionnal]
     162       2       +1      # size_store_queue                           [0]       [nb_load_store_unit]
     171       1       +1      # size_load_queue                            [0]       [nb_load_store_unit]
     181       1       +1      # size_speculative_access_queue              [0]       [nb_load_store_unit]
     191       1       +1      # nb_port_check                              [0]       [nb_load_store_unit]
     202       2       +1      # speculative_load                           [0]       [nb_load_store_unit]
     210       0       +1      # nb_bypass_memory                           [0]       [nb_load_store_unit]
     221       1       +1      # nb_cache_port                              [0]       [nb_load_store_unit]
     231       1       +1      # nb_inst_memory                             [0]       [nb_load_store_unit]
     241       1       +1      # size_write_queue                           [0]       [nb_write_unit]
     251       1       +1      # size_execute_queue                         [0]       [nb_write_unit]
     261       1       +1      # nb_bypass_write                            [0]       [nb_write_unit]
     271       1       +1      # nb_gpr_bank                                         
     281       1       +1      # nb_gpr_port_read_by_bank                             
     291       1       +1      # nb_gpr_port_write_by_bank                           
     301       1       +1      # nb_spr_bank                                         
     311       1       +1      # nb_spr_port_read_by_bank                             
     321       1       +1      # nb_spr_port_write_by_bank                           
     3364      64      +1      # nb_general_register                        [0]       [nb_ooo_engine]           
     3416      16      +1      # nb_special_register                        [0]       [nb_ooo_engine]           
     351       1       +1      # nb_inst_insert_rob                         [0]       [nb_ooo_engine]           
     361       1       +1      # nb_inst_retire_rob                         [0]       [nb_ooo_engine]           
     371       1       +1      # execution_unit_to_write_unit_priority                                         
     381       1       +1      # execution_unit_to_write_unit_table_routing [0][0][0] [nb_execute_unit][nb_execute_unit_port][nb_write_unit]
     391       1       +1      # execution_unit_to_write_unit_table_routing [1][0][0] [nb_execute_unit][nb_execute_unit_port][nb_write_unit]
     401       1       +1      # execution_unit_to_write_unit_table_thread  [0][0]    [nb_write_unit][nb_thread]         
     411       1       +1      # read_unit_to_execution_unit_priority                                         
     421       1       +1      # read_unit_to_execution_unit_table_routing  [0][0][0] [nb_read_unit][nb_execute_unit][nb_execute_unit_port]
     431       1       +1      # read_unit_to_execution_unit_table_routing  [0][1][0] [nb_read_unit][nb_execute_unit][nb_execute_unit_port]
     441       1       +1      # read_unit_to_execution_unit_table_thread   [0][0]    [nb_execute_unit][nb_thread]   
     451       1       +1      # read_unit_to_execution_unit_table_thread   [1][0]    [nb_execute_unit][nb_thread]   
     460       0       +1      # is_load_store_unit                         [0]       [nb_execute_unit]
     471       1       +1      # is_load_store_unit                         [1]       [nb_execute_unit]
     480       0       +1      # translate_num_execute_unit                 [0]       [nb_execute_unit]
     490       0       +1      # translate_num_execute_unit                 [1]       [nb_execute_unit]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/include/test.h

    r81 r88  
    1616
    1717#include "Common/include/Time.h"
     18#include "Behavioural/include/Selftest.h"
    1819#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Execute_loop.h"
    1920
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/src/main.cpp

    r81 r88  
    1414  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
    1515  err (_("list_params is :\n"));
    16   err (_(" * nb_read_unit                                                               (uint32_t           )\n"));
    17   err (_(" * nb_functionnal_unit                                                        (uint32_t           )\n"));
    18   err (_(" * nb_load_store_unit                                                         (uint32_t           )\n"));
    19   err (_(" * nb_write_unit                                                              (uint32_t           )\n"));
    20   err (_(" * nb_context                                                                 (uint32_t           )\n"));
    21   err (_(" * nb_front_end                                                               (uint32_t           )\n"));
    22   err (_(" * nb_ooo_engine                                                              (uint32_t           )\n"));
    23   err (_(" * nb_packet                                                                  (uint32_t           )\n"));
    24   err (_(" * size_general_data                                                          (uint32_t           )\n"));
    25   err (_(" * size_special_data                                                          (uint32_t           )\n"));
    26   err (_(" * size_read_queue                           [read_unit]                      (uint32_t           )\n"));
    27   err (_(" * size_reservation_station                  [read_unit]                      (uint32_t           )\n"));
    28   err (_(" * nb_inst_retire                            [read_unit]                      (uint32_t           )\n"));
    29   err (_(" * size_store_queue                          [load_store_unit]                (uint32_t           )\n"));
    30   err (_(" * size_load_queue                           [load_store_unit]                (uint32_t           )\n"));
    31   err (_(" * size_speculative_access_queue             [load_store_unit]                (uint32_t           )\n"));
    32   err (_(" * nb_port_check                             [load_store_unit]                (uint32_t           )\n"));
    33   err (_(" * speculative_load                          [load_store_unit]                (Tspeculative_load_t)\n"));
    34   err (_(" * nb_bypass_memory                          [load_store_unit]                (uint32_t           )\n"));
    35   err (_(" * size_write_queue                          [write_unit]                     (uint32_t           )\n"));
    36   err (_(" * size_execute_queue                        [write_unit]                     (uint32_t           )\n"));
    37   err (_(" * nb_bypass_write                           [write_unit]                     (uint32_t           )\n"));
    38   err (_(" * nb_gpr_bank                                                                (uint32_t           )\n"));
    39   err (_(" * nb_gpr_port_read_by_bank                                                   (uint32_t           )\n"));
    40   err (_(" * nb_gpr_port_write_by_bank                                                  (uint32_t           )\n"));
    41   err (_(" * nb_spr_bank                                                                (uint32_t           )\n"));
    42   err (_(" * nb_spr_port_read_by_bank                                                   (uint32_t           )\n"));
    43   err (_(" * nb_spr_port_write_by_bank                                                  (uint32_t           )\n"));
    44   err (_(" * nb_general_register                       [nb_ooo_engine]                  (uint32_t           )\n"));
    45   err (_(" * nb_special_register                       [nb_ooo_engine]                  (uint32_t           )\n"));
    46   err (_(" * nb_inst_insert_rob                        [nb_ooo_engine]                  (uint32_t           )\n"));
    47   err (_(" * nb_inst_retire_rob                        [nb_ooo_engine]                  (uint32_t           )\n"));
    48   err (_(" * execution_unit_to_write_unit_priority                                      (Tpriority_t        )\n"));
    49   err (_(" * execution_unit_to_write_unit_table_routing[nb_execute_unit][nb_write_unit] (bool               )\n"));
    50   err (_(" * execution_unit_to_write_unit_table_thread [nb_write_unit][nb_thread]       (bool               )\n"));
    51   err (_(" * read_unit_to_execution_unit_priority                                       (Tpriority_t        )\n"));
    52   err (_(" * read_unit_to_execution_unit_table_routing [nb_read_unit][nb_execute_unit]  (bool               )\n"));
    53   err (_(" * read_unit_to_execution_unit_table_thread  [nb_execute_unit][nb_thread]     (bool               )\n"));
     16  err (_(" * nb_read_unit                                                                                     (uint32_t           )\n"));
     17  err (_(" * nb_functionnal_unit                                                                              (uint32_t           )\n"));
     18  err (_(" * nb_load_store_unit                                                                               (uint32_t           )\n"));
     19  err (_(" * nb_write_unit                                                                                    (uint32_t           )\n"));
     20  err (_(" * nb_context                                                                                       (uint32_t           )\n"));
     21  err (_(" * nb_front_end                                                                                     (uint32_t           )\n"));
     22  err (_(" * nb_ooo_engine                                                                                    (uint32_t           )\n"));
     23  err (_(" * nb_packet                                                                                        (uint32_t           )\n"));
     24  err (_(" * size_general_data                                                                                (uint32_t           )\n"));
     25  err (_(" * size_special_data                                                                                (uint32_t           )\n"));
     26  err (_(" * size_read_queue                           [nb_read_unit]                                         (uint32_t           )\n"));
     27  err (_(" * size_reservation_station                  [nb_read_unit]                                         (uint32_t           )\n"));
     28  err (_(" * nb_inst_retire                            [nb_read_unit]                                         (uint32_t           )\n"));
     29  err (_(" * nb_inst_functionnal_unit                  [nb_functionnal_unit]                                  (uint32_t           )\n"));
     30  err (_(" * size_store_queue                          [nb_load_store_unit]                                   (uint32_t           )\n"));
     31  err (_(" * size_load_queue                           [nb_load_store_unit]                                   (uint32_t           )\n"));
     32  err (_(" * size_speculative_access_queue             [nb_load_store_unit]                                   (uint32_t           )\n"));
     33  err (_(" * nb_port_check                             [nb_load_store_unit]                                   (uint32_t           )\n"));
     34  err (_(" * speculative_load                          [nb_load_store_unit]                                   (Tspeculative_load_t)\n"));
     35  err (_(" * nb_bypass_memory                          [nb_load_store_unit]                                   (uint32_t           )\n"));
     36  err (_(" * nb_cache_port                             [nb_load_store_unit]                                   (uint32_t           )\n"));
     37  err (_(" * nb_inst_memory                            [nb_load_store_unit]                                   (uint32_t           )\n"));
     38  err (_(" * size_write_queue                          [nb_write_unit]                                        (uint32_t           )\n"));
     39  err (_(" * size_execute_queue                        [nb_write_unit]                                        (uint32_t           )\n"));
     40  err (_(" * nb_bypass_write                           [nb_write_unit]                                        (uint32_t           )\n"));
     41  err (_(" * nb_gpr_bank                                                                                      (uint32_t           )\n"));
     42  err (_(" * nb_gpr_port_read_by_bank                                                                         (uint32_t           )\n"));
     43  err (_(" * nb_gpr_port_write_by_bank                                                                        (uint32_t           )\n"));
     44  err (_(" * nb_spr_bank                                                                                      (uint32_t           )\n"));
     45  err (_(" * nb_spr_port_read_by_bank                                                                         (uint32_t           )\n"));
     46  err (_(" * nb_spr_port_write_by_bank                                                                        (uint32_t           )\n"));
     47  err (_(" * nb_general_register                       [nb_ooo_engine]                                        (uint32_t           )\n"));
     48  err (_(" * nb_special_register                       [nb_ooo_engine]                                        (uint32_t           )\n"));
     49  err (_(" * nb_inst_insert_rob                        [nb_ooo_engine]                                        (uint32_t           )\n"));
     50  err (_(" * nb_inst_retire_rob                        [nb_ooo_engine]                                        (uint32_t           )\n"));
     51  err (_(" * execution_unit_to_write_unit_priority                                                            (Tpriority_t        )\n"));
     52  err (_(" * execution_unit_to_write_unit_table_routing[nb_execute_unit][nb_execute_unit_port][nb_write_unit] (bool               )\n"));
     53  err (_(" * execution_unit_to_write_unit_table_thread [nb_write_unit][nb_thread]                             (bool               )\n"));
     54  err (_(" * read_unit_to_execution_unit_priority                                                             (Tpriority_t        )\n"));
     55  err (_(" * read_unit_to_execution_unit_table_routing [nb_read_unit][nb_execute_unit][nb_execute_unit_port]  (bool               )\n"));
     56  err (_(" * read_unit_to_execution_unit_table_thread  [nb_execute_unit][nb_thread]                           (bool               )\n"));
     57  err (_(" * is_load_store_unit                        [nb_execute_unit]                                      (bool               )\n"));
     58  err (_(" * translate_num_execute_unit                [nb_execute_unit]                                      (uint32_t           )\n"));
     59
    5460
    5561  exit (1);
     
    6268#endif
    6369{
     70  // Command
     71  for (int32_t i=0; i<argc; ++i)
     72    msg("%s ",argv[i]);
     73  msg("\n");
     74 
    6475  if (argc < 2+NB_PARAMS)
    6576    usage (argc, argv);
     
    8495  int32_t nb_params = (2+NB_PARAMS+
    8596                       3*nb_read_unit+
    86                        6*nb_load_store_unit+
     97                       1*nb_functionnal_unit+
     98                       8*nb_load_store_unit+
    8799                       3*nb_write_unit+
    88100                       4*nb_ooo_engine+
    89                        nb_execute_unit*nb_write_unit+
     101//                     sum_execute_unit_port*nb_write_unit+
    90102                       nb_write_unit*nb_thread+
    91                        nb_read_unit*nb_execute_unit+
    92                        nb_execute_unit*nb_thread);
    93  
    94  
    95  
    96   if (argc != nb_params)
    97     {
    98       msg(_("Need %d parameters."),nb_params);
    99       usage (argc, argv);
    100     }
     103//                     nb_read_unit*sum_execute_unit_port+
     104                       nb_execute_unit*nb_thread+
     105                       2*nb_execute_unit);
     106 
     107  if (argc <= nb_params)
     108    usage (argc, argv);
     109 
    101110  uint32_t            * size_read_queue          = new uint32_t [nb_read_unit];
    102111  for (uint32_t i=0; i<nb_read_unit; i++)
     
    111120    nb_inst_retire [i] = atoi(argv[x++]);
    112121
     122  uint32_t            * nb_inst_functionnal_unit = new uint32_t [nb_functionnal_unit];
     123  for (uint32_t i=0; i<nb_functionnal_unit; i++)
     124    nb_inst_functionnal_unit [i] = atoi(argv[x++]);
     125
    113126  uint32_t          * size_store_queue              = new uint32_t [nb_load_store_unit];
    114127  for (uint32_t i=0; i<nb_load_store_unit; i++)
     
    134147  for (uint32_t i=0; i<nb_load_store_unit; i++)
    135148    nb_bypass_memory              [i] = atoi(argv[x++]);
     149
     150  uint32_t          * nb_cache_port                 = new uint32_t [nb_load_store_unit];
     151  for (uint32_t i=0; i<nb_load_store_unit; i++)
     152    nb_cache_port                 [i] = atoi(argv[x++]);
     153
     154  uint32_t          * nb_inst_memory                = new uint32_t [nb_load_store_unit];
     155  for (uint32_t i=0; i<nb_load_store_unit; i++)
     156    nb_inst_memory                [i] = atoi(argv[x++]);
     157
     158
     159  uint32_t sum_execute_unit_port = 0;
     160  for (uint32_t i=0; i<nb_load_store_unit; i++)
     161    sum_execute_unit_port += nb_inst_memory[i];
     162  for (uint32_t i=0; i<nb_functionnal_unit; i++)
     163    sum_execute_unit_port += nb_inst_functionnal_unit[i];
     164
     165  nb_params = (2+NB_PARAMS+
     166               3*nb_read_unit+
     167               1*nb_functionnal_unit+
     168               8*nb_load_store_unit+
     169               3*nb_write_unit+
     170               4*nb_ooo_engine+
     171               sum_execute_unit_port*nb_write_unit+
     172               nb_write_unit*nb_thread+
     173               nb_read_unit*sum_execute_unit_port+
     174               nb_execute_unit*nb_thread+
     175               2*nb_execute_unit);
     176 
     177  if (argc != nb_params)
     178    {
     179      msg("nb_functionnal_unit   : %d\n",nb_functionnal_unit);
     180      msg("nb_load_store_unit    : %d\n",nb_load_store_unit );
     181      msg("sum_execute_unit_port : %d.\n",sum_execute_unit_port);
     182      msg(_("Have %d parameters.\n"),argc     );
     183      msg(_("Need %d parameters.\n"),nb_params);
     184      usage (argc, argv);
     185    }
    136186
    137187  uint32_t * size_write_queue   = new uint32_t [nb_write_unit];
     
    172222  Tpriority_t execution_unit_to_write_unit_priority = fromString<Tpriority_t>(argv[x++]);
    173223
    174   bool ** execution_unit_to_write_unit_table_routing = new bool * [nb_execute_unit];
     224  bool *** execution_unit_to_write_unit_table_routing = new bool ** [nb_execute_unit];
    175225  for (uint32_t i=0; i<nb_execute_unit; i++)
    176226    {
    177       execution_unit_to_write_unit_table_routing [i] = new bool [nb_write_unit];
    178       for (uint32_t j=0; j<nb_write_unit; j++)
    179         execution_unit_to_write_unit_table_routing [i][j] = atoi(argv[x++]);
    180     }
     227      uint32_t nb_execute_unit_port = (i<nb_load_store_unit)?nb_inst_memory[i]:nb_inst_functionnal_unit[i-nb_load_store_unit];
     228
     229      execution_unit_to_write_unit_table_routing [i] = new bool * [nb_execute_unit_port];
     230     
     231      for (uint32_t j=0; j<nb_execute_unit_port; j++)
     232        {
     233          execution_unit_to_write_unit_table_routing [i][j] = new bool [nb_write_unit];
     234         
     235          for (uint32_t k=0; k<nb_write_unit; k++)
     236            execution_unit_to_write_unit_table_routing [i][j][k] = atoi(argv[x++]);
     237        }
     238    }
     239
    181240  bool ** execution_unit_to_write_unit_table_thread = new bool * [nb_write_unit];
    182241  for (uint32_t i=0; i<nb_write_unit; i++)
     
    188247  Tpriority_t read_unit_to_execution_unit_priority  = fromString<Tpriority_t>(argv[x++]);
    189248
    190   bool ** read_unit_to_execution_unit_table_routing = new bool * [nb_read_unit];
     249  bool *** read_unit_to_execution_unit_table_routing = new bool ** [nb_read_unit];
    191250  for (uint32_t i=0; i<nb_read_unit; i++)
    192251    {
    193       read_unit_to_execution_unit_table_routing [i] = new bool [nb_execute_unit];
     252      read_unit_to_execution_unit_table_routing [i] = new bool * [nb_execute_unit];
    194253      for (uint32_t j=0; j<nb_execute_unit; j++)
    195         read_unit_to_execution_unit_table_routing [i][j] = atoi(argv[x++]);
    196     }
     254        {
     255          uint32_t nb_execute_unit_port = (j<nb_load_store_unit)?nb_inst_memory[j]:nb_inst_functionnal_unit[j-nb_load_store_unit];
     256          read_unit_to_execution_unit_table_routing [i][j] = new bool [nb_execute_unit_port];
     257
     258          for (uint32_t k=0; k<nb_execute_unit_port; k++)
     259            read_unit_to_execution_unit_table_routing [i][j][k] = atoi(argv[x++]);
     260        }
     261    }
     262
    197263  bool ** read_unit_to_execution_unit_table_thread = new bool * [nb_execute_unit];
    198264  for (uint32_t i=0; i<nb_execute_unit; i++)
     
    202268        read_unit_to_execution_unit_table_thread [i][j] =  atoi(argv[x++]);
    203269    }
    204   execute_timing_t *** timing = new execute_timing_t ** [nb_execute_unit];
    205  
     270
     271  bool * is_load_store_unit = new bool [nb_execute_unit];
     272  for (uint32_t i=0; i<nb_execute_unit; i++)
     273    is_load_store_unit [i] = fromString<bool>(argv[x++]);
     274
     275  uint32_t * translate_num_execute_unit = new uint32_t [nb_execute_unit];
     276  for (uint32_t i=0; i<nb_execute_unit; i++)
     277    translate_num_execute_unit [i] = fromString<uint32_t>(argv[x++]);
     278
     279  execute_timing_t *** timing = new execute_timing_t ** [nb_functionnal_unit];
    206280  // alloc and reset timing array
    207   for (uint32_t i=0; i< nb_execute_unit; i++)
     281  for (uint32_t i=0; i< nb_functionnal_unit; i++)
    208282    {
    209283      timing [i] = new execute_timing_t * [MAX_TYPE];
     
    218292    }
    219293 
    220   for (uint32_t i=0; i< nb_load_store_unit; i++)
    221     for (uint32_t k=0; k< MAX_OPERATION; k++)
    222       timing[i][TYPE_MEMORY][k]._delay = timing[i][TYPE_MEMORY][k]._latence = 1;
    223294  for (uint32_t i=0; i< nb_functionnal_unit; i++)
    224295    for (uint32_t j=0; j< MAX_TYPE; j++)
    225       if (j != TYPE_MEMORY)
    226         for (uint32_t k=0; k< MAX_OPERATION; k++)
    227           timing[i+nb_load_store_unit][j][k]._delay = timing[i+nb_load_store_unit][j][k]._latence = 1;
    228 
    229   morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t) = &(morpheo::behavioural::custom::default_get_custom_information);
     296      {
     297        if ( (j != TYPE_MEMORY) and
     298             not ((i!=0) and ((j == TYPE_SPECIAL) or
     299                              (j == TYPE_CUSTOM))))
     300          for (uint32_t k=0; k< MAX_OPERATION; k++)
     301            timing[i][j][k]._delay = timing[i][j][k]._latence = 1;
     302      }
     303
     304  morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void) = &(morpheo::behavioural::custom::default_get_custom_information);
    230305
    231306  try
     
    247322         size_reservation_station                      ,
    248323         nb_inst_retire                                ,
    249          
     324
     325         nb_inst_functionnal_unit                      ,
    250326         timing                                        ,
    251327         get_custom_information                        ,
     
    256332         nb_port_check                                 ,
    257333         speculative_load                              ,
    258          
    259334         nb_bypass_memory                              ,
     335         nb_cache_port                                 ,
     336         nb_inst_memory                                ,
     337
    260338         size_write_queue                              ,
    261339         size_execute_queue                            ,
     
    279357         read_unit_to_execution_unit_priority          ,
    280358         read_unit_to_execution_unit_table_routing     ,
    281          read_unit_to_execution_unit_table_thread      );
    282      
    283       msg(_("%s"),param->print(1).c_str());
     359         read_unit_to_execution_unit_table_thread      ,
     360
     361         is_load_store_unit                            , //[nb_execute_unit]
     362         translate_num_execute_unit                    , //[nb_execute_unit]
     363         true // is_toplevel
     364         );
    284365     
    285366      test (name,param);
     
    287368  catch (morpheo::ErrorMorpheo & error)
    288369    {
    289       msg (_("<%s> : %s.\n"),name.c_str(), error.what ());
     370      msg (_("%s\n"),error.what ());
    290371      exit (EXIT_FAILURE);
    291372    }
    292373  catch (...)
    293374    {
    294       err (_("<%s> : This test must generate a error.\n"),name.c_str());
     375      err (_("This test must generate a error.\n"));
    295376      exit (EXIT_FAILURE);
    296377    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/src/test.cpp

    r82 r88  
    77 */
    88
    9 #define NB_ITERATION  1
     9#define NB_ITERATION  128
    1010#define CYCLE_MAX     (128*NB_ITERATION)
    1111
     
    2121
    2222#ifdef STATISTICS
    23   morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50);
     23  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
    2424#endif
     25
     26  Tusage_t _usage = USE_ALL;
     27
     28//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     29//   _usage = usage_unset(_usage,USE_VHDL                 );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     31//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     32//   _usage = usage_unset(_usage,USE_POSITION             );
     33//   _usage = usage_unset(_usage,USE_STATISTICS           );
     34//   _usage = usage_unset(_usage,USE_INFORMATION          );
    2535
    2636  Execute_loop * _Execute_loop = new Execute_loop
     
    3040#endif
    3141     _param,
    32      USE_ALL);
     42     _usage);
    3343 
    3444#ifdef SYSTEMC
     
    7585  ALLOC1_SC_SIGNAL(out_EXECUTE_LOOP_OUT_NO_SEQUENCE         ,"out_EXECUTE_LOOP_OUT_NO_SEQUENCE         ",Tcontrol_t        ,_param->_nb_write_unit);
    7686  ALLOC1_SC_SIGNAL(out_EXECUTE_LOOP_OUT_ADDRESS             ,"out_EXECUTE_LOOP_OUT_ADDRESS             ",Tgeneral_data_t   ,_param->_nb_write_unit);
    77   ALLOC1_SC_SIGNAL(out_DCACHE_REQ_VAL                       ,"out_DCACHE_REQ_VAL                       ",Tcontrol_t        ,_param->_nb_load_store_unit);
    78   ALLOC1_SC_SIGNAL( in_DCACHE_REQ_ACK                       ," in_DCACHE_REQ_ACK                       ",Tcontrol_t        ,_param->_nb_load_store_unit);
    79   ALLOC1_SC_SIGNAL(out_DCACHE_REQ_CONTEXT_ID                ,"out_DCACHE_REQ_CONTEXT_ID                ",Tcontext_t        ,_param->_nb_load_store_unit);
    80   ALLOC1_SC_SIGNAL(out_DCACHE_REQ_PACKET_ID                 ,"out_DCACHE_REQ_PACKET_ID                 ",Tpacket_t         ,_param->_nb_load_store_unit);
    81   ALLOC1_SC_SIGNAL(out_DCACHE_REQ_ADDRESS                   ,"out_DCACHE_REQ_ADDRESS                   ",Tdcache_address_t ,_param->_nb_load_store_unit);
    82   ALLOC1_SC_SIGNAL(out_DCACHE_REQ_TYPE                      ,"out_DCACHE_REQ_TYPE                      ",Tdcache_type_t    ,_param->_nb_load_store_unit);
    83   ALLOC1_SC_SIGNAL(out_DCACHE_REQ_WDATA                     ,"out_DCACHE_REQ_WDATA                     ",Tdcache_data_t    ,_param->_nb_load_store_unit);
    84   ALLOC1_SC_SIGNAL( in_DCACHE_RSP_VAL                       ," in_DCACHE_RSP_VAL                       ",Tcontrol_t        ,_param->_nb_load_store_unit);
    85   ALLOC1_SC_SIGNAL(out_DCACHE_RSP_ACK                       ,"out_DCACHE_RSP_ACK                       ",Tcontrol_t        ,_param->_nb_load_store_unit);
    86   ALLOC1_SC_SIGNAL( in_DCACHE_RSP_CONTEXT_ID                ," in_DCACHE_RSP_CONTEXT_ID                ",Tcontext_t        ,_param->_nb_load_store_unit);
    87   ALLOC1_SC_SIGNAL( in_DCACHE_RSP_PACKET_ID                 ," in_DCACHE_RSP_PACKET_ID                 ",Tpacket_t         ,_param->_nb_load_store_unit);
    88   ALLOC1_SC_SIGNAL( in_DCACHE_RSP_RDATA                     ," in_DCACHE_RSP_RDATA                     ",Tdcache_data_t    ,_param->_nb_load_store_unit);
    89   ALLOC1_SC_SIGNAL( in_DCACHE_RSP_ERROR                     ," in_DCACHE_RSP_ERROR                     ",Tdcache_error_t   ,_param->_nb_load_store_unit);
    90   ALLOC2_SC_SIGNAL( in_INSERT_ROB_VAL                       ," in_INSERT_ROB_VAL                       ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    91   ALLOC2_SC_SIGNAL(out_INSERT_ROB_ACK                       ,"out_INSERT_ROB_ACK                       ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    92   ALLOC2_SC_SIGNAL( in_INSERT_ROB_RD_USE                    ," in_INSERT_ROB_RD_USE                    ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    93   ALLOC2_SC_SIGNAL( in_INSERT_ROB_RD_NUM_REG                ," in_INSERT_ROB_RD_NUM_REG                ",Tgeneral_address_t,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    94   ALLOC2_SC_SIGNAL( in_INSERT_ROB_RE_USE                    ," in_INSERT_ROB_RE_USE                    ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    95   ALLOC2_SC_SIGNAL( in_INSERT_ROB_RE_NUM_REG                ," in_INSERT_ROB_RE_NUM_REG                ",Tspecial_address_t,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    96   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_VAL                       ," in_RETIRE_ROB_VAL                       ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    97   ALLOC2_SC_SIGNAL(out_RETIRE_ROB_ACK                       ,"out_RETIRE_ROB_ACK                       ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    98   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RD_OLD_USE                ," in_RETIRE_ROB_RD_OLD_USE                ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    99   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RD_OLD_NUM_REG            ," in_RETIRE_ROB_RD_OLD_NUM_REG            ",Tgeneral_address_t,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    100   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RD_NEW_USE                ," in_RETIRE_ROB_RD_NEW_USE                ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    101   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RD_NEW_NUM_REG            ," in_RETIRE_ROB_RD_NEW_NUM_REG            ",Tgeneral_address_t,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    102   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RE_OLD_USE                ," in_RETIRE_ROB_RE_OLD_USE                ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    103   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RE_OLD_NUM_REG            ," in_RETIRE_ROB_RE_OLD_NUM_REG            ",Tspecial_address_t,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    104   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RE_NEW_USE                ," in_RETIRE_ROB_RE_NEW_USE                ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    105   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RE_NEW_NUM_REG            ," in_RETIRE_ROB_RE_NEW_NUM_REG            ",Tspecial_address_t,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
     87  ALLOC1_SC_SIGNAL(out_EXECUTE_LOOP_OUT_DATA                ,"out_EXECUTE_LOOP_OUT_DATA                ",Tgeneral_data_t   ,_param->_nb_write_unit);
     88  ALLOC2_SC_SIGNAL(out_DCACHE_REQ_VAL                       ,"out_DCACHE_REQ_VAL                       ",Tcontrol_t        ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     89  ALLOC2_SC_SIGNAL( in_DCACHE_REQ_ACK                       ," in_DCACHE_REQ_ACK                       ",Tcontrol_t        ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     90  ALLOC2_SC_SIGNAL(out_DCACHE_REQ_CONTEXT_ID                ,"out_DCACHE_REQ_CONTEXT_ID                ",Tcontext_t        ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     91  ALLOC2_SC_SIGNAL(out_DCACHE_REQ_PACKET_ID                 ,"out_DCACHE_REQ_PACKET_ID                 ",Tpacket_t         ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     92  ALLOC2_SC_SIGNAL(out_DCACHE_REQ_ADDRESS                   ,"out_DCACHE_REQ_ADDRESS                   ",Tdcache_address_t ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     93  ALLOC2_SC_SIGNAL(out_DCACHE_REQ_TYPE                      ,"out_DCACHE_REQ_TYPE                      ",Tdcache_type_t    ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     94  ALLOC2_SC_SIGNAL(out_DCACHE_REQ_WDATA                     ,"out_DCACHE_REQ_WDATA                     ",Tdcache_data_t    ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     95  ALLOC2_SC_SIGNAL( in_DCACHE_RSP_VAL                       ," in_DCACHE_RSP_VAL                       ",Tcontrol_t        ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     96  ALLOC2_SC_SIGNAL(out_DCACHE_RSP_ACK                       ,"out_DCACHE_RSP_ACK                       ",Tcontrol_t        ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     97  ALLOC2_SC_SIGNAL( in_DCACHE_RSP_CONTEXT_ID                ," in_DCACHE_RSP_CONTEXT_ID                ",Tcontext_t        ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     98  ALLOC2_SC_SIGNAL( in_DCACHE_RSP_PACKET_ID                 ," in_DCACHE_RSP_PACKET_ID                 ",Tpacket_t         ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     99  ALLOC2_SC_SIGNAL( in_DCACHE_RSP_RDATA                     ," in_DCACHE_RSP_RDATA                     ",Tdcache_data_t    ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     100  ALLOC2_SC_SIGNAL( in_DCACHE_RSP_ERROR                     ," in_DCACHE_RSP_ERROR                     ",Tdcache_error_t   ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     101  ALLOC2_SC_SIGNAL( in_INSERT_ROB_VAL                       ," in_INSERT_ROB_VAL                       ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     102  ALLOC2_SC_SIGNAL(out_INSERT_ROB_ACK                       ,"out_INSERT_ROB_ACK                       ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     103  ALLOC2_SC_SIGNAL( in_INSERT_ROB_RD_USE                    ," in_INSERT_ROB_RD_USE                    ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     104  ALLOC2_SC_SIGNAL( in_INSERT_ROB_RD_NUM_REG                ," in_INSERT_ROB_RD_NUM_REG                ",Tgeneral_address_t,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     105  ALLOC2_SC_SIGNAL( in_INSERT_ROB_RE_USE                    ," in_INSERT_ROB_RE_USE                    ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     106  ALLOC2_SC_SIGNAL( in_INSERT_ROB_RE_NUM_REG                ," in_INSERT_ROB_RE_NUM_REG                ",Tspecial_address_t,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     107//   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_VAL                       ," in_RETIRE_ROB_VAL                       ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     108//   ALLOC2_SC_SIGNAL(out_RETIRE_ROB_ACK                       ,"out_RETIRE_ROB_ACK                       ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     109//   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RD_OLD_USE                ," in_RETIRE_ROB_RD_OLD_USE                ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     110//   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RD_OLD_NUM_REG            ," in_RETIRE_ROB_RD_OLD_NUM_REG            ",Tgeneral_address_t,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     111//   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RD_NEW_USE                ," in_RETIRE_ROB_RD_NEW_USE                ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     112//   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RD_NEW_NUM_REG            ," in_RETIRE_ROB_RD_NEW_NUM_REG            ",Tgeneral_address_t,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     113//   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RE_OLD_USE                ," in_RETIRE_ROB_RE_OLD_USE                ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     114//   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RE_OLD_NUM_REG            ," in_RETIRE_ROB_RE_OLD_NUM_REG            ",Tspecial_address_t,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     115//   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RE_NEW_USE                ," in_RETIRE_ROB_RE_NEW_USE                ",Tcontrol_t        ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     116//   ALLOC2_SC_SIGNAL( in_RETIRE_ROB_RE_NEW_NUM_REG            ," in_RETIRE_ROB_RE_NEW_NUM_REG            ",Tspecial_address_t,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
    106117 
    107118  /********************************************************
     
    122133  if (_param->_have_port_ooo_engine_id)
    123134  INSTANCE1_SC_SIGNAL(_Execute_loop, in_EXECUTE_LOOP_IN_OOO_ENGINE_ID        ,_param->_nb_read_unit);
    124   if (_param->_have_port_packet_id)
     135  if (_param->_have_port_rob_ptr  )
    125136  INSTANCE1_SC_SIGNAL(_Execute_loop, in_EXECUTE_LOOP_IN_PACKET_ID            ,_param->_nb_read_unit);
    126137  INSTANCE1_SC_SIGNAL(_Execute_loop, in_EXECUTE_LOOP_IN_OPERATION            ,_param->_nb_read_unit);
     
    149160  if (_param->_have_port_ooo_engine_id)
    150161  INSTANCE1_SC_SIGNAL(_Execute_loop,out_EXECUTE_LOOP_OUT_OOO_ENGINE_ID       ,_param->_nb_write_unit);
    151   if (_param->_have_port_packet_id)
     162  if (_param->_have_port_rob_ptr  )
    152163  INSTANCE1_SC_SIGNAL(_Execute_loop,out_EXECUTE_LOOP_OUT_PACKET_ID           ,_param->_nb_write_unit);
    153164//INSTANCE1_SC_SIGNAL(_Execute_loop,out_EXECUTE_LOOP_OUT_OPERATION           ,_param->_nb_write_unit);
     
    157168  INSTANCE1_SC_SIGNAL(_Execute_loop,out_EXECUTE_LOOP_OUT_NO_SEQUENCE         ,_param->_nb_write_unit);
    158169  INSTANCE1_SC_SIGNAL(_Execute_loop,out_EXECUTE_LOOP_OUT_ADDRESS             ,_param->_nb_write_unit);
    159   INSTANCE1_SC_SIGNAL(_Execute_loop,out_DCACHE_REQ_VAL                       ,_param->_nb_load_store_unit);
    160   INSTANCE1_SC_SIGNAL(_Execute_loop, in_DCACHE_REQ_ACK                       ,_param->_nb_load_store_unit);
     170  INSTANCE1_SC_SIGNAL(_Execute_loop,out_EXECUTE_LOOP_OUT_DATA                ,_param->_nb_write_unit);
     171  INSTANCE2_SC_SIGNAL(_Execute_loop,out_DCACHE_REQ_VAL                       ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     172  INSTANCE2_SC_SIGNAL(_Execute_loop, in_DCACHE_REQ_ACK                       ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
    161173  if (_param->_have_port_dcache_context_id)
    162   INSTANCE1_SC_SIGNAL(_Execute_loop,out_DCACHE_REQ_CONTEXT_ID                ,_param->_nb_load_store_unit);
    163   INSTANCE1_SC_SIGNAL(_Execute_loop,out_DCACHE_REQ_PACKET_ID                 ,_param->_nb_load_store_unit);
    164   INSTANCE1_SC_SIGNAL(_Execute_loop,out_DCACHE_REQ_ADDRESS                   ,_param->_nb_load_store_unit);
    165   INSTANCE1_SC_SIGNAL(_Execute_loop,out_DCACHE_REQ_TYPE                      ,_param->_nb_load_store_unit);
    166   INSTANCE1_SC_SIGNAL(_Execute_loop,out_DCACHE_REQ_WDATA                     ,_param->_nb_load_store_unit);
    167   INSTANCE1_SC_SIGNAL(_Execute_loop, in_DCACHE_RSP_VAL                       ,_param->_nb_load_store_unit);
    168   INSTANCE1_SC_SIGNAL(_Execute_loop,out_DCACHE_RSP_ACK                       ,_param->_nb_load_store_unit);
     174  INSTANCE2_SC_SIGNAL(_Execute_loop,out_DCACHE_REQ_CONTEXT_ID                ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     175  INSTANCE2_SC_SIGNAL(_Execute_loop,out_DCACHE_REQ_PACKET_ID                 ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     176  INSTANCE2_SC_SIGNAL(_Execute_loop,out_DCACHE_REQ_ADDRESS                   ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     177  INSTANCE2_SC_SIGNAL(_Execute_loop,out_DCACHE_REQ_TYPE                      ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     178  INSTANCE2_SC_SIGNAL(_Execute_loop,out_DCACHE_REQ_WDATA                     ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     179  INSTANCE2_SC_SIGNAL(_Execute_loop, in_DCACHE_RSP_VAL                       ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     180  INSTANCE2_SC_SIGNAL(_Execute_loop,out_DCACHE_RSP_ACK                       ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
    169181  if (_param->_have_port_dcache_context_id)
    170   INSTANCE1_SC_SIGNAL(_Execute_loop, in_DCACHE_RSP_CONTEXT_ID                ,_param->_nb_load_store_unit);
    171   INSTANCE1_SC_SIGNAL(_Execute_loop, in_DCACHE_RSP_PACKET_ID                 ,_param->_nb_load_store_unit);
    172   INSTANCE1_SC_SIGNAL(_Execute_loop, in_DCACHE_RSP_RDATA                     ,_param->_nb_load_store_unit);
    173   INSTANCE1_SC_SIGNAL(_Execute_loop, in_DCACHE_RSP_ERROR                     ,_param->_nb_load_store_unit);
    174   INSTANCE2_SC_SIGNAL(_Execute_loop, in_INSERT_ROB_VAL                       ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    175   INSTANCE2_SC_SIGNAL(_Execute_loop,out_INSERT_ROB_ACK                       ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    176   INSTANCE2_SC_SIGNAL(_Execute_loop, in_INSERT_ROB_RD_USE                    ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    177   INSTANCE2_SC_SIGNAL(_Execute_loop, in_INSERT_ROB_RD_NUM_REG                ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    178   INSTANCE2_SC_SIGNAL(_Execute_loop, in_INSERT_ROB_RE_USE                    ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    179   INSTANCE2_SC_SIGNAL(_Execute_loop, in_INSERT_ROB_RE_NUM_REG                ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    180   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_VAL                       ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    181   INSTANCE2_SC_SIGNAL(_Execute_loop,out_RETIRE_ROB_ACK                       ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    182   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RD_OLD_USE                ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    183   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RD_OLD_NUM_REG            ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    184   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RD_NEW_USE                ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    185   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RD_NEW_NUM_REG            ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    186   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RE_OLD_USE                ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    187   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RE_OLD_NUM_REG            ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    188   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RE_NEW_USE                ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    189   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RE_NEW_NUM_REG            ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
     182  INSTANCE2_SC_SIGNAL(_Execute_loop, in_DCACHE_RSP_CONTEXT_ID                ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     183  INSTANCE2_SC_SIGNAL(_Execute_loop, in_DCACHE_RSP_PACKET_ID                 ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     184  INSTANCE2_SC_SIGNAL(_Execute_loop, in_DCACHE_RSP_RDATA                     ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     185  INSTANCE2_SC_SIGNAL(_Execute_loop, in_DCACHE_RSP_ERROR                     ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     186  INSTANCE2_SC_SIGNAL(_Execute_loop, in_INSERT_ROB_VAL                       ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     187  INSTANCE2_SC_SIGNAL(_Execute_loop,out_INSERT_ROB_ACK                       ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     188  INSTANCE2_SC_SIGNAL(_Execute_loop, in_INSERT_ROB_RD_USE                    ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     189  INSTANCE2_SC_SIGNAL(_Execute_loop, in_INSERT_ROB_RD_NUM_REG                ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     190  INSTANCE2_SC_SIGNAL(_Execute_loop, in_INSERT_ROB_RE_USE                    ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     191  INSTANCE2_SC_SIGNAL(_Execute_loop, in_INSERT_ROB_RE_NUM_REG                ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     192//   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_VAL                       ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     193//   INSTANCE2_SC_SIGNAL(_Execute_loop,out_RETIRE_ROB_ACK                       ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     194//   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RD_OLD_USE                ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     195//   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RD_OLD_NUM_REG            ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     196//   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RD_NEW_USE                ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     197//   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RD_NEW_NUM_REG            ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     198//   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RE_OLD_USE                ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     199//   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RE_OLD_NUM_REG            ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     200//   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RE_NEW_USE                ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     201//   INSTANCE2_SC_SIGNAL(_Execute_loop, in_RETIRE_ROB_RE_NEW_NUM_REG            ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
    190202
    191203  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    233245  delete in_NRESET;
    234246
    235   delete []  in_EXECUTE_LOOP_IN_VAL                  ;
    236   delete [] out_EXECUTE_LOOP_IN_ACK                  ;
    237   delete []  in_EXECUTE_LOOP_IN_CONTEXT_ID           ;
    238   delete []  in_EXECUTE_LOOP_IN_FRONT_END_ID         ;
    239   delete []  in_EXECUTE_LOOP_IN_OOO_ENGINE_ID        ;
    240   delete []  in_EXECUTE_LOOP_IN_PACKET_ID            ;
    241   delete []  in_EXECUTE_LOOP_IN_OPERATION            ;
    242   delete []  in_EXECUTE_LOOP_IN_TYPE                 ;
    243   delete []  in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_WRITE;
    244   delete []  in_EXECUTE_LOOP_IN_LOAD_QUEUE_PTR_WRITE ;
    245   delete []  in_EXECUTE_LOOP_IN_HAS_IMMEDIAT         ;
    246   delete []  in_EXECUTE_LOOP_IN_IMMEDIAT             ;
    247   delete []  in_EXECUTE_LOOP_IN_READ_RA              ;
    248   delete []  in_EXECUTE_LOOP_IN_NUM_REG_RA           ;
    249   delete []  in_EXECUTE_LOOP_IN_READ_RB              ;
    250   delete []  in_EXECUTE_LOOP_IN_NUM_REG_RB           ;
    251   delete []  in_EXECUTE_LOOP_IN_READ_RC              ;
    252   delete []  in_EXECUTE_LOOP_IN_NUM_REG_RC           ;
    253   delete []  in_EXECUTE_LOOP_IN_WRITE_RD             ;
    254   delete []  in_EXECUTE_LOOP_IN_NUM_REG_RD           ;
    255   delete []  in_EXECUTE_LOOP_IN_WRITE_RE             ;
    256   delete []  in_EXECUTE_LOOP_IN_NUM_REG_RE           ;
    257   delete [] out_EXECUTE_LOOP_OUT_VAL                 ;
    258   delete []  in_EXECUTE_LOOP_OUT_ACK                 ;
    259   delete [] out_EXECUTE_LOOP_OUT_CONTEXT_ID          ;
    260   delete [] out_EXECUTE_LOOP_OUT_FRONT_END_ID        ;
    261   delete [] out_EXECUTE_LOOP_OUT_OOO_ENGINE_ID       ;
    262   delete [] out_EXECUTE_LOOP_OUT_PACKET_ID           ;
    263 //delete [] out_EXECUTE_LOOP_OUT_OPERATION           ;
    264 //delete [] out_EXECUTE_LOOP_OUT_TYPE                ;
    265   delete [] out_EXECUTE_LOOP_OUT_FLAGS               ;
    266   delete [] out_EXECUTE_LOOP_OUT_EXCEPTION           ;
    267   delete [] out_EXECUTE_LOOP_OUT_NO_SEQUENCE         ;
    268   delete [] out_EXECUTE_LOOP_OUT_ADDRESS             ;
    269   delete [] out_DCACHE_REQ_VAL                       ;
    270   delete []  in_DCACHE_REQ_ACK                       ;
    271   delete [] out_DCACHE_REQ_CONTEXT_ID                ;
    272   delete [] out_DCACHE_REQ_PACKET_ID                 ;
    273   delete [] out_DCACHE_REQ_ADDRESS                   ;
    274   delete [] out_DCACHE_REQ_TYPE                      ;
    275   delete [] out_DCACHE_REQ_WDATA                     ;
    276   delete []  in_DCACHE_RSP_VAL                       ;
    277   delete [] out_DCACHE_RSP_ACK                       ;
    278   delete []  in_DCACHE_RSP_CONTEXT_ID                ;
    279   delete []  in_DCACHE_RSP_PACKET_ID                 ;
    280   delete []  in_DCACHE_RSP_RDATA                     ;
    281   delete []  in_DCACHE_RSP_ERROR                     ;
    282   delete []  in_INSERT_ROB_VAL                       ;
    283   delete [] out_INSERT_ROB_ACK                       ;
    284   delete []  in_INSERT_ROB_RD_USE                    ;
    285   delete []  in_INSERT_ROB_RD_NUM_REG                ;
    286   delete []  in_INSERT_ROB_RE_USE                    ;
    287   delete []  in_INSERT_ROB_RE_NUM_REG                ;
    288   delete []  in_RETIRE_ROB_VAL                       ;
    289   delete [] out_RETIRE_ROB_ACK                       ;
    290   delete []  in_RETIRE_ROB_RD_OLD_USE                ;
    291   delete []  in_RETIRE_ROB_RD_OLD_NUM_REG            ;
    292   delete []  in_RETIRE_ROB_RD_NEW_USE                ;
    293   delete []  in_RETIRE_ROB_RD_NEW_NUM_REG            ;
    294   delete []  in_RETIRE_ROB_RE_OLD_USE                ;
    295   delete []  in_RETIRE_ROB_RE_OLD_NUM_REG            ;
    296   delete []  in_RETIRE_ROB_RE_NEW_USE                ;
    297   delete []  in_RETIRE_ROB_RE_NEW_NUM_REG            ;
     247  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_VAL                  ,_param->_nb_read_unit);
     248  DELETE1_SC_SIGNAL(out_EXECUTE_LOOP_IN_ACK                  ,_param->_nb_read_unit);
     249  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_CONTEXT_ID           ,_param->_nb_read_unit);
     250  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_FRONT_END_ID         ,_param->_nb_read_unit);
     251  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_OOO_ENGINE_ID        ,_param->_nb_read_unit);
     252  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_PACKET_ID            ,_param->_nb_read_unit);
     253  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_OPERATION            ,_param->_nb_read_unit);
     254  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_TYPE                 ,_param->_nb_read_unit);
     255  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_WRITE,_param->_nb_read_unit);
     256  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_read_unit);
     257  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_HAS_IMMEDIAT         ,_param->_nb_read_unit);
     258  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_IMMEDIAT             ,_param->_nb_read_unit);
     259  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_READ_RA              ,_param->_nb_read_unit);
     260  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_NUM_REG_RA           ,_param->_nb_read_unit);
     261  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_READ_RB              ,_param->_nb_read_unit);
     262  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_NUM_REG_RB           ,_param->_nb_read_unit);
     263  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_READ_RC              ,_param->_nb_read_unit);
     264  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_NUM_REG_RC           ,_param->_nb_read_unit);
     265  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_WRITE_RD             ,_param->_nb_read_unit);
     266  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_NUM_REG_RD           ,_param->_nb_read_unit);
     267  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_WRITE_RE             ,_param->_nb_read_unit);
     268  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_IN_NUM_REG_RE           ,_param->_nb_read_unit);
     269  DELETE1_SC_SIGNAL(out_EXECUTE_LOOP_OUT_VAL                 ,_param->_nb_write_unit);
     270  DELETE1_SC_SIGNAL( in_EXECUTE_LOOP_OUT_ACK                 ,_param->_nb_write_unit);
     271  DELETE1_SC_SIGNAL(out_EXECUTE_LOOP_OUT_CONTEXT_ID          ,_param->_nb_write_unit);
     272  DELETE1_SC_SIGNAL(out_EXECUTE_LOOP_OUT_FRONT_END_ID        ,_param->_nb_write_unit);
     273  DELETE1_SC_SIGNAL(out_EXECUTE_LOOP_OUT_OOO_ENGINE_ID       ,_param->_nb_write_unit);
     274  DELETE1_SC_SIGNAL(out_EXECUTE_LOOP_OUT_PACKET_ID           ,_param->_nb_write_unit);
     275//DELETE1_SC_SIGNAL(out_EXECUTE_LOOP_OUT_OPERATION           ,_param->_nb_write_unit);
     276//DELETE1_SC_SIGNAL(out_EXECUTE_LOOP_OUT_TYPE                ,_param->_nb_write_unit);
     277  DELETE1_SC_SIGNAL(out_EXECUTE_LOOP_OUT_FLAGS               ,_param->_nb_write_unit);
     278  DELETE1_SC_SIGNAL(out_EXECUTE_LOOP_OUT_EXCEPTION           ,_param->_nb_write_unit);
     279  DELETE1_SC_SIGNAL(out_EXECUTE_LOOP_OUT_NO_SEQUENCE         ,_param->_nb_write_unit);
     280  DELETE1_SC_SIGNAL(out_EXECUTE_LOOP_OUT_ADDRESS             ,_param->_nb_write_unit);
     281  DELETE1_SC_SIGNAL(out_EXECUTE_LOOP_OUT_DATA                ,_param->_nb_write_unit);
     282  DELETE2_SC_SIGNAL(out_DCACHE_REQ_VAL                       ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     283  DELETE2_SC_SIGNAL( in_DCACHE_REQ_ACK                       ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     284  DELETE2_SC_SIGNAL(out_DCACHE_REQ_CONTEXT_ID                ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     285  DELETE2_SC_SIGNAL(out_DCACHE_REQ_PACKET_ID                 ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     286  DELETE2_SC_SIGNAL(out_DCACHE_REQ_ADDRESS                   ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     287  DELETE2_SC_SIGNAL(out_DCACHE_REQ_TYPE                      ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     288  DELETE2_SC_SIGNAL(out_DCACHE_REQ_WDATA                     ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     289  DELETE2_SC_SIGNAL( in_DCACHE_RSP_VAL                       ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     290  DELETE2_SC_SIGNAL(out_DCACHE_RSP_ACK                       ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     291  DELETE2_SC_SIGNAL( in_DCACHE_RSP_CONTEXT_ID                ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     292  DELETE2_SC_SIGNAL( in_DCACHE_RSP_PACKET_ID                 ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     293  DELETE2_SC_SIGNAL( in_DCACHE_RSP_RDATA                     ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     294  DELETE2_SC_SIGNAL( in_DCACHE_RSP_ERROR                     ,_param->_nb_load_store_unit,_param->_nb_cache_port[it1]);
     295  DELETE2_SC_SIGNAL( in_INSERT_ROB_VAL                       ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     296  DELETE2_SC_SIGNAL(out_INSERT_ROB_ACK                       ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     297  DELETE2_SC_SIGNAL( in_INSERT_ROB_RD_USE                    ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     298  DELETE2_SC_SIGNAL( in_INSERT_ROB_RD_NUM_REG                ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     299  DELETE2_SC_SIGNAL( in_INSERT_ROB_RE_USE                    ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     300  DELETE2_SC_SIGNAL( in_INSERT_ROB_RE_NUM_REG                ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     301//   DELETE2_SC_SIGNAL( in_RETIRE_ROB_VAL                       ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     302//   DELETE2_SC_SIGNAL(out_RETIRE_ROB_ACK                       ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     303//   DELETE2_SC_SIGNAL( in_RETIRE_ROB_RD_OLD_USE                ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     304//   DELETE2_SC_SIGNAL( in_RETIRE_ROB_RD_OLD_NUM_REG            ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     305//   DELETE2_SC_SIGNAL( in_RETIRE_ROB_RD_NEW_USE                ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     306//   DELETE2_SC_SIGNAL( in_RETIRE_ROB_RD_NEW_NUM_REG            ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     307//   DELETE2_SC_SIGNAL( in_RETIRE_ROB_RE_OLD_USE                ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     308//   DELETE2_SC_SIGNAL( in_RETIRE_ROB_RE_OLD_NUM_REG            ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     309//   DELETE2_SC_SIGNAL( in_RETIRE_ROB_RE_NEW_USE                ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     310//   DELETE2_SC_SIGNAL( in_RETIRE_ROB_RE_NEW_NUM_REG            ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
    298311
    299312#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Execute_loop.h

    r82 r88  
    2929#include "Behavioural/include/Usage.h"
    3030
     31#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/include/Execute_loop_Glue.h"
    3132#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/include/Read_unit.h"
    3233#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Functionnal_unit.h"
     
    107108  public    : SC_OUT(Tcontrol_t        )   ** out_EXECUTE_LOOP_OUT_NO_SEQUENCE         ;//[nb_write_unit]
    108109  public    : SC_OUT(Tgeneral_data_t   )   ** out_EXECUTE_LOOP_OUT_ADDRESS             ;//[nb_write_unit]
     110  public    : SC_OUT(Tgeneral_data_t   )   ** out_EXECUTE_LOOP_OUT_DATA                ;//[nb_write_unit]
    109111
    110112    // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    111   public    : SC_OUT(Tcontrol_t        )   ** out_DCACHE_REQ_VAL                       ;//[nb_load_store_queue]
    112   public    : SC_IN (Tcontrol_t        )   **  in_DCACHE_REQ_ACK                       ;//[nb_load_store_queue]
    113   public    : SC_OUT(Tcontext_t        )   ** out_DCACHE_REQ_CONTEXT_ID                ;//[nb_load_store_queue]
    114   public    : SC_OUT(Tpacket_t         )   ** out_DCACHE_REQ_PACKET_ID                 ;//[nb_load_store_queue]
    115   public    : SC_OUT(Tdcache_address_t )   ** out_DCACHE_REQ_ADDRESS                   ;//[nb_load_store_queue]
    116   public    : SC_OUT(Tdcache_type_t    )   ** out_DCACHE_REQ_TYPE                      ;//[nb_load_store_queue]
    117   public    : SC_OUT(Tdcache_data_t    )   ** out_DCACHE_REQ_WDATA                     ;//[nb_load_store_queue]
     113  public    : SC_OUT(Tcontrol_t        )  *** out_DCACHE_REQ_VAL                       ;//[nb_load_store_queue][nb_cache_port]
     114  public    : SC_IN (Tcontrol_t        )  ***  in_DCACHE_REQ_ACK                       ;//[nb_load_store_queue][nb_cache_port]
     115  public    : SC_OUT(Tcontext_t        )  *** out_DCACHE_REQ_CONTEXT_ID                ;//[nb_load_store_queue][nb_cache_port]
     116  public    : SC_OUT(Tpacket_t         )  *** out_DCACHE_REQ_PACKET_ID                 ;//[nb_load_store_queue][nb_cache_port]
     117  public    : SC_OUT(Tdcache_address_t )  *** out_DCACHE_REQ_ADDRESS                   ;//[nb_load_store_queue][nb_cache_port]
     118  public    : SC_OUT(Tdcache_type_t    )  *** out_DCACHE_REQ_TYPE                      ;//[nb_load_store_queue][nb_cache_port]
     119  public    : SC_OUT(Tdcache_data_t    )  *** out_DCACHE_REQ_WDATA                     ;//[nb_load_store_queue][nb_cache_port]
    118120
    119121    // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    120   public    : SC_IN (Tcontrol_t        )   **  in_DCACHE_RSP_VAL                       ;//[nb_load_store_queue]
    121   public    : SC_OUT(Tcontrol_t        )   ** out_DCACHE_RSP_ACK                       ;//[nb_load_store_queue]
    122   public    : SC_IN (Tcontext_t        )   **  in_DCACHE_RSP_CONTEXT_ID                ;//[nb_load_store_queue]
    123   public    : SC_IN (Tpacket_t         )   **  in_DCACHE_RSP_PACKET_ID                 ;//[nb_load_store_queue]
    124   public    : SC_IN (Tdcache_data_t    )   **  in_DCACHE_RSP_RDATA                     ;//[nb_load_store_queue]
    125   public    : SC_IN (Tdcache_error_t   )   **  in_DCACHE_RSP_ERROR                     ;//[nb_load_store_queue]
     122  public    : SC_IN (Tcontrol_t        )  ***  in_DCACHE_RSP_VAL                       ;//[nb_load_store_queue][nb_cache_port]
     123  public    : SC_OUT(Tcontrol_t        )  *** out_DCACHE_RSP_ACK                       ;//[nb_load_store_queue][nb_cache_port]
     124  public    : SC_IN (Tcontext_t        )  ***  in_DCACHE_RSP_CONTEXT_ID                ;//[nb_load_store_queue][nb_cache_port]
     125  public    : SC_IN (Tpacket_t         )  ***  in_DCACHE_RSP_PACKET_ID                 ;//[nb_load_store_queue][nb_cache_port]
     126  public    : SC_IN (Tdcache_data_t    )  ***  in_DCACHE_RSP_RDATA                     ;//[nb_load_store_queue][nb_cache_port]
     127  public    : SC_IN (Tdcache_error_t   )  ***  in_DCACHE_RSP_ERROR                     ;//[nb_load_store_queue][nb_cache_port]
    126128   
    127129    // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    133135  public    : SC_IN (Tspecial_address_t)  ***  in_INSERT_ROB_RE_NUM_REG                ;//[nb_ooo_engine][nb_inst_insert_rob]
    134136
    135     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    136   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_VAL                       ;//[nb_ooo_engine][nb_inst_retire_rob]
    137   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_ROB_ACK                       ;//[nb_ooo_engine][nb_inst_retire_rob]
    138   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RD_OLD_USE                ;//[nb_ooo_engine][nb_inst_retire_rob]
    139   public    : SC_IN (Tgeneral_address_t)  ***  in_RETIRE_ROB_RD_OLD_NUM_REG            ;//[nb_ooo_engine][nb_inst_retire_rob]
    140   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RD_NEW_USE                ;//[nb_ooo_engine][nb_inst_retire_rob]
    141   public    : SC_IN (Tgeneral_address_t)  ***  in_RETIRE_ROB_RD_NEW_NUM_REG            ;//[nb_ooo_engine][nb_inst_retire_rob]
    142   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RE_OLD_USE                ;//[nb_ooo_engine][nb_inst_retire_rob]
    143   public    : SC_IN (Tspecial_address_t)  ***  in_RETIRE_ROB_RE_OLD_NUM_REG            ;//[nb_ooo_engine][nb_inst_retire_rob]
    144   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RE_NEW_USE                ;//[nb_ooo_engine][nb_inst_retire_rob]
    145   public    : SC_IN (Tspecial_address_t)  ***  in_RETIRE_ROB_RE_NEW_NUM_REG            ;//[nb_ooo_engine][nb_inst_retire_rob]
     137//     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     138//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_VAL                       ;//[nb_ooo_engine][nb_inst_retire_rob]
     139//   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_ROB_ACK                       ;//[nb_ooo_engine][nb_inst_retire_rob]
     140//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RD_OLD_USE                ;//[nb_ooo_engine][nb_inst_retire_rob]
     141//   public    : SC_IN (Tgeneral_address_t)  ***  in_RETIRE_ROB_RD_OLD_NUM_REG            ;//[nb_ooo_engine][nb_inst_retire_rob]
     142//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RD_NEW_USE                ;//[nb_ooo_engine][nb_inst_retire_rob]
     143//   public    : SC_IN (Tgeneral_address_t)  ***  in_RETIRE_ROB_RD_NEW_NUM_REG            ;//[nb_ooo_engine][nb_inst_retire_rob]
     144//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RE_OLD_USE                ;//[nb_ooo_engine][nb_inst_retire_rob]
     145//   public    : SC_IN (Tspecial_address_t)  ***  in_RETIRE_ROB_RE_OLD_NUM_REG            ;//[nb_ooo_engine][nb_inst_retire_rob]
     146//   public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_ROB_RE_NEW_USE                ;//[nb_ooo_engine][nb_inst_retire_rob]
     147//   public    : SC_IN (Tspecial_address_t)  ***  in_RETIRE_ROB_RE_NEW_NUM_REG            ;//[nb_ooo_engine][nb_inst_retire_rob]
    146148
    147149    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    148150
     151  public : morpheo::behavioural::core::multi_execute_loop::execute_loop::execute_loop_glue::                                 Execute_loop_Glue             * _component_glue                        ;
    149152  public : morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::                        Read_unit                    ** _component_read_unit                   ;
    150153  public : morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::Functionnal_unit             ** _component_functionnal_unit            ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Parameters.h

    r81 r88  
    1212#include "Behavioural/include/Parameters.h"
    1313#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Types.h"
     14#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/include/Parameters.h"
    1415#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/include/Parameters.h"
    1516#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Parameters.h"
     
    3637  public : uint32_t              _nb_load_store_unit                            ;
    3738  public : uint32_t              _nb_write_unit                                 ;
    38     // generic parameters                                                            
     39    // generic parameters                                                            
    3940  public : uint32_t              _nb_context                                    ;
    4041  public : uint32_t              _nb_front_end                                  ;
    4142  public : uint32_t              _nb_ooo_engine                                 ;
    4243  public : uint32_t              _nb_packet                                     ;
    43   public : uint32_t              _size_general_data                             ;
    44   public : uint32_t              _size_special_data                             ;
    45     // specific parameters                                                           
    46     //  * read_unit                                                                   
    47   public : uint32_t            * _size_read_queue                               ; //[nb_read_unit]
    48   public : uint32_t            * _size_reservation_station                      ; //[nb_read_unit]
    49   public : uint32_t            * _nb_inst_retire                                ; //[nb_read_unit]
    50   public : uint32_t            * _read_unit_nb_register_write                   ; //[nb_read_unit]
    51   public : uint32_t            * _read_unit_nb_bypass_write                     ; //[nb_read_unit]
    52   public : uint32_t            * _read_unit_nb_bypass_memory                    ; //[nb_read_unit]
    53   public : bool               ** _link_read_unit_with_load_store_unit           ; //[nb_read_unit][nb_load_store_unit]
    54   public : bool               ** _link_read_unit_with_write_unit                ; //[nb_read_unit][nb_write_unit]
    55   public : bool               ** _link_read_unit_with_thread                    ; //[nb_read_unit][nb_thread]
    56 
    57     //  * functionnal_unit                                                           
    58   public : execute_timing_t  *** _timing                                        ; //[nb_execute_unit][nb_type][nb_operation]
    59   public : morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (uint32_t);
     44//public : uint32_t              _size_general_data                             ;
     45//public : uint32_t              _size_special_data                             ;
     46    // specific parameters                                                           
     47    //  * functionnal_unit                                                           
     48  public : uint32_t            * _nb_inst_functionnal_unit                      ; //[nb_functionnal_unit]
     49  public : execute_timing_t  *** _timing                                        ; //[nb_functionnal_unit][nb_type][nb_operation]
     50  public : morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (void);
     51
    6052    //  * load_store_unit   
    6153  public : uint32_t            * _size_store_queue                              ; //[nb_load_store_unit]
     
    6557  public : Tspeculative_load_t * _speculative_load                              ; //[nb_load_store_unit]
    6658  public : uint32_t            * _nb_bypass_memory                              ; //[nb_load_store_unit]
    67     //  * write_unit                                                                 
     59  public : uint32_t            * _nb_cache_port                                 ; //[nb_load_store_unit]
     60  public : uint32_t            * _nb_inst_memory                                ; //[nb_load_store_unit]
     61    //  * read_unit                                                                   
     62  public : uint32_t            * _size_read_queue                               ; //[nb_read_unit]
     63  public : uint32_t            * _size_reservation_station                      ; //[nb_read_unit]
     64  public : uint32_t            * _nb_inst_retire                                ; //[nb_read_unit]
     65  public : uint32_t            * _read_unit_nb_register_write                   ; //[nb_read_unit]
     66  public : uint32_t            * _read_unit_nb_bypass_write                     ; //[nb_read_unit]
     67  public : uint32_t            * _read_unit_nb_bypass_memory                    ; //[nb_read_unit]
     68  public : bool              *** _link_read_unit_with_load_store_unit           ; //[nb_read_unit][nb_load_store_unit][nb_inst_memory]
     69  public : bool               ** _link_read_unit_with_write_unit                ; //[nb_read_unit][nb_write_unit]
     70  public : bool               ** _link_read_unit_with_thread                    ; //[nb_read_unit][nb_thread]
     71    //  * write_unit                                                                 
    6872  public : uint32_t            * _size_write_queue                              ; //[nb_write_unit]
    6973  public : uint32_t            * _size_execute_queue                            ; //[nb_write_unit]
    7074  public : uint32_t            * _nb_bypass_write                               ; //[nb_write_unit]
    71     //  * register_unit                                                              
     75    //  * register_unit                                                              
    7276  public : uint32_t              _nb_gpr_read                                   ;
    7377  public : uint32_t              _nb_gpr_write                                  ;
     
    8690    //  * network
    8791  public : Tpriority_t           _execution_unit_to_write_unit_priority         ;
    88   public : bool               ** _execution_unit_to_write_unit_table_routing    ; //[nb_execute_unit][nb_write_unit]
     92  public : bool              *** _execution_unit_to_write_unit_table_routing    ; //[nb_execute_unit][nb_execute_unit_port][nb_write_unit]
    8993  public : bool               ** _execution_unit_to_write_unit_table_thread     ; //[nb_write_unit][nb_thread]
    9094
    9195  public : Tpriority_t           _read_unit_to_execution_unit_priority          ;
    92   public : bool               ** _read_unit_to_execution_unit_table_routing     ; //[nb_read_unit][nb_execute_unit]
     96  public : bool              *** _read_unit_to_execution_unit_table_routing     ; //[nb_read_unit][nb_execute_unit][nb_execute_unit_port]
    9397  public : bool               ** _read_unit_to_execution_unit_table_execute_type; //[nb_execute_unit][nb_type]
    9498  public : bool               ** _read_unit_to_execution_unit_table_thread      ; //[nb_execute_unit][nb_thread]
     
    98102
    99103  public : uint32_t              _nb_execute_unit              ;
    100 
    101   public : uint32_t              _size_context_id              ;
    102   public : uint32_t              _size_front_end_id            ;
    103   public : uint32_t              _size_ooo_engine_id           ;
    104   public : uint32_t              _size_packet_id               ;
    105   public : bool                  _have_port_context_id         ;
    106   public : bool                  _have_port_front_end_id       ;
    107   public : bool                  _have_port_ooo_engine_id      ;
    108   public : bool                  _have_port_packet_id          ;
    109   public : bool                  _have_port_load_queue_ptr     ;
     104  public : uint32_t            * _nb_execute_unit_port         ;
     105
     106//public : uint32_t              _size_context_id              ;
     107//public : uint32_t              _size_front_end_id            ;
     108//public : uint32_t              _size_ooo_engine_id           ;
     109//public : uint32_t              _size_packet_id               ;
     110//public : bool                  _have_port_context_id         ;
     111//public : bool                  _have_port_front_end_id       ;
     112//public : bool                  _have_port_ooo_engine_id      ;
     113//public : bool                  _have_port_packet_id          ;
     114//public : bool                  _have_port_load_queue_ptr     ;
    110115  public : bool                  _have_port_dcache_context_id  ;
    111116   
     
    115120  public : uint32_t              _max_size_load_queue    ;
    116121
    117   public : uint32_t              _size_general_register        ;
    118   public : uint32_t              _size_special_register        ;
     122//public : uint32_t              _size_general_register        ;
     123//public : uint32_t              _size_special_register        ;
    119124
    120125  public : uint32_t              _max_size_dcache_context_id;
     
    125130  public : std::set<uint32_t>  * _set_read_unit_source_bypass_memory  ; //[nb_read_unit]
    126131
     132  public : morpheo::behavioural::core::multi_execute_loop::execute_loop::execute_loop_glue::                                 Parameters  * _param_glue;
    127133  public : morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::                        Parameters ** _param_read_unit;
    128134  public : morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::Parameters ** _param_functionnal_unit;
     
    135141    //-----[ methods ]-----------------------------------------------------------
    136142  public : Parameters  (uint32_t              nb_read_unit                                  ,
    137                         uint32_t              nb_functionnal_unit                           ,
    138                         uint32_t              nb_load_store_unit                            ,
    139                         uint32_t              nb_write_unit                                 ,
    140                        
    141                         uint32_t              nb_context                                    ,
    142                         uint32_t              nb_front_end                                  ,
    143                         uint32_t              nb_ooo_engine                                 ,
    144                         uint32_t              nb_packet                                     ,
    145                         uint32_t              size_general_data                             ,
    146                         uint32_t              size_special_data                             ,
    147                        
    148                         uint32_t            * size_read_queue                               ,
    149                         uint32_t            * size_reservation_station                      ,
    150                         uint32_t            * nb_inst_retire                                ,
    151                        
    152                         execute_timing_t  *** timing                                        ,
    153                         morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t),
    154                        
    155                         uint32_t            * size_store_queue                              ,
    156                         uint32_t            * size_load_queue                               ,
    157                         uint32_t            * size_speculative_access_queue                 ,
    158                         uint32_t            * nb_port_check                                 ,
    159                         Tspeculative_load_t * speculative_load                              ,
    160                         uint32_t            * nb_bypass_memory                              ,
    161                        
    162                         uint32_t            * size_write_queue                              ,
    163                         uint32_t            * size_execute_queue                            ,
    164                         uint32_t            * nb_bypass_write                               ,
    165                        
    166                         uint32_t              nb_gpr_bank                                   ,
    167                         uint32_t              nb_gpr_port_read_by_bank                      ,
    168                         uint32_t              nb_gpr_port_write_by_bank                     ,
    169                         uint32_t              nb_spr_bank                                   ,
    170                         uint32_t              nb_spr_port_read_by_bank                      ,
    171                         uint32_t              nb_spr_port_write_by_bank                     ,
    172                         uint32_t            * nb_general_register                           ,
    173                         uint32_t            * nb_special_register                           ,
    174                         uint32_t            * nb_inst_insert_rob                            ,
    175                         uint32_t            * nb_inst_retire_rob                            ,
    176                        
    177                         Tpriority_t           execution_unit_to_write_unit_priority         ,
    178                         bool               ** execution_unit_to_write_unit_table_routing    ,
    179                         bool               ** execution_unit_to_write_unit_table_thread     ,
    180                        
    181                         Tpriority_t           read_unit_to_execution_unit_priority          ,
    182                         bool               ** read_unit_to_execution_unit_table_routing     ,
    183                         bool               ** read_unit_to_execution_unit_table_thread     
    184                         );
     143                        uint32_t              nb_functionnal_unit                           ,
     144                        uint32_t              nb_load_store_unit                            ,
     145                        uint32_t              nb_write_unit                                 ,
     146                       
     147                        uint32_t              nb_context                                    ,
     148                        uint32_t              nb_front_end                                  ,
     149                        uint32_t              nb_ooo_engine                                 ,
     150                        uint32_t              nb_packet                                     ,
     151                        uint32_t              size_general_data                             ,
     152                        uint32_t              size_special_data                             ,
     153                       
     154                        uint32_t            * size_read_queue                               ,//[nb_read_unit]
     155                        uint32_t            * size_reservation_station                      ,//[nb_read_unit]
     156                        uint32_t            * nb_inst_retire                                ,//[nb_read_unit]
     157                       
     158                        uint32_t            * nb_inst_functionnal_unit                      ,//[nb_functionnal_unit]
     159                        execute_timing_t  *** timing                                        ,//[nb_functionnal_unit][nb_type][nb_operation]
     160                        morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void),
     161                       
     162                        uint32_t            * size_store_queue                              ,//[nb_load_store_unit]
     163                        uint32_t            * size_load_queue                               ,//[nb_load_store_unit]
     164                        uint32_t            * size_speculative_access_queue                 ,//[nb_load_store_unit]
     165                        uint32_t            * nb_port_check                                 ,//[nb_load_store_unit]
     166                        Tspeculative_load_t * speculative_load                              ,//[nb_load_store_unit]
     167                        uint32_t            * nb_bypass_memory                              ,//[nb_load_store_unit]
     168                        uint32_t            * nb_cache_port                                 ,//[nb_load_store_unit]
     169                        uint32_t            * nb_inst_memory                                ,//[nb_load_store_unit]
     170                       
     171                        uint32_t            * size_write_queue                              ,//[nb_write_unit]
     172                        uint32_t            * size_execute_queue                            ,//[nb_write_unit]
     173                        uint32_t            * nb_bypass_write                               ,//[nb_write_unit]
     174                       
     175                        uint32_t              nb_gpr_bank                                   ,
     176                        uint32_t              nb_gpr_port_read_by_bank                      ,
     177                        uint32_t              nb_gpr_port_write_by_bank                     ,
     178                        uint32_t              nb_spr_bank                                   ,
     179                        uint32_t              nb_spr_port_read_by_bank                      ,
     180                        uint32_t              nb_spr_port_write_by_bank                     ,
     181                        uint32_t            * nb_general_register                           ,//[nb_ooo_engine]
     182                        uint32_t            * nb_special_register                           ,//[nb_ooo_engine]
     183                        uint32_t            * nb_inst_insert_rob                            ,//[nb_ooo_engine]
     184                        uint32_t            * nb_inst_retire_rob                            ,//[nb_ooo_engine]
     185                       
     186                        Tpriority_t           execution_unit_to_write_unit_priority         ,
     187                        bool              *** execution_unit_to_write_unit_table_routing    ,//[nb_execute_unit][nb_execute_unit_port][nb_write_unit]
     188                        bool               ** execution_unit_to_write_unit_table_thread     ,//[nb_write_unit][nb_thread]
     189                       
     190                        Tpriority_t           read_unit_to_execution_unit_priority          ,
     191                        bool              *** read_unit_to_execution_unit_table_routing     ,//[nb_read_unit][nb_execute_unit][nb_execute_unit_port]
     192                        bool               ** read_unit_to_execution_unit_table_thread      ,//[nb_execute_unit][nb_thread]
     193
     194                        bool                * is_load_store_unit                            ,//[nb_execute_unit]
     195                        uint32_t            * translate_num_execute_unit                    ,//[nb_execute_unit]
     196
     197                        bool                  is_toplevel=false
     198                        );
    185199//   public : Parameters  (Parameters & param) ;
    186   public : ~Parameters () ;
     200  public : ~Parameters (void) ;
     201
     202  public :        void            copy       (void);
    187203
    188204  public :        Parameters_test msg_error  (void);
    189205
    190   public :        std::string   print      (uint32_t depth);
    191   public : friend std::ostream& operator<< (std::ostream& output_stream,
    192                                             morpheo::behavioural::core::multi_execute_loop::execute_loop::Parameters & x);
     206  public :        std::string     print      (uint32_t depth);
     207  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     208                                              morpheo::behavioural::core::multi_execute_loop::execute_loop::Parameters & x);
    193209  };
    194210
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Execute_loop.cpp

    r81 r88  
    3636    log_printf(FUNC,Execute_loop,FUNCTION,"Begin");
    3737
     38#if DEBUG_Execute_loop == true
     39    log_printf(INFO,Execute_loop,FUNCTION,_("<%s> Parameters"),_name.c_str());
     40
     41    std::cout << *param << std::endl;
     42#endif   
     43
    3844    log_printf(INFO,Execute_loop,FUNCTION,"Allocation");
    3945
     
    4551
    4652#ifdef STATISTICS
    47     if (_usage & USE_STATISTICS)
     53    if (usage_is_set(_usage,USE_STATISTICS))
    4854      {
    4955        log_printf(INFO,Execute_loop,FUNCTION,"Allocation of statistics");
     
    5460
    5561#ifdef VHDL
    56     if (_usage & USE_VHDL)
     62    if (usage_is_set(_usage,USE_VHDL))
    5763      {
    5864        // generate the vhdl
     
    6470
    6571#ifdef SYSTEMC
    66     if (_usage & USE_SYSTEMC)
     72    if (usage_is_set(_usage,USE_SYSTEMC))
    6773      {
    6874        log_printf(INFO,Execute_loop,FUNCTION,"Method - transition");
     
    8894
    8995#ifdef STATISTICS
    90     if (_usage & USE_STATISTICS)
     96    if (usage_is_set(_usage,USE_STATISTICS))
    9197      {
    9298        log_printf(INFO,Execute_loop,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Execute_loop_allocation.cpp

    r82 r88  
    6262       ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_FRONT_END_ID         ,"front_end_id"         ,Tcontext_t        ,_param->_size_front_end_id);
    6363       ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_OOO_ENGINE_ID        ,"ooo_engine_id"        ,Tcontext_t        ,_param->_size_ooo_engine_id);
    64        ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_PACKET_ID            ,"packet_id"            ,Tpacket_t         ,_param->_size_packet_id);
     64       ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_PACKET_ID            ,"packet_id"            ,Tpacket_t         ,_param->_size_rob_ptr  );
    6565       ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_OPERATION            ,"operation"            ,Toperation_t      ,_param->_size_operation);
    6666       ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_TYPE                 ,"type"                 ,Ttype_t           ,_param->_size_type);         
    67        ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_max_size_store_queue);
     67       ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr);
    6868       if (_param->_have_port_load_queue_ptr)
    69        ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_max_size_load_queue);
     69       ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr);
    7070       ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_HAS_IMMEDIAT         ,"has_immediat"         ,Tcontrol_t        ,1);
    7171       ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_IMMEDIAT             ,"immediat"             ,Tgeneral_data_t   ,_param->_size_general_data);
     
    9090       ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_FRONT_END_ID ,"front_end_id" ,Tcontext_t     ,_param->_size_front_end_id);
    9191       ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t     ,_param->_size_ooo_engine_id);
    92        ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_PACKET_ID    ,"packet_id"    ,Tpacket_t      ,_param->_size_packet_id);
     92       ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_PACKET_ID    ,"packet_id"    ,Tpacket_t      ,_param->_size_rob_ptr  );
    9393//     ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_OPERATION    ,"operation"    ,Toperation_t   ,_param->_size_operation);
    9494//     ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_TYPE         ,"type"         ,Ttype_t        ,_param->_size_type);
     
    9797       ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_NO_SEQUENCE  ,"no_sequence"  ,Tcontrol_t     ,1);
    9898       ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_ADDRESS      ,"address"      ,Tgeneral_data_t,_param->_size_general_data);
     99       ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_DATA         ,"data"         ,Tgeneral_data_t,_param->_size_general_data);
    99100     }
    100101    // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    101102     {
    102        ALLOC1_INTERFACE("dcache_req",OUT, NORTH, "Data cache port : request", _param->_nb_load_store_unit);
    103        
    104        ALLOC1_VALACK_OUT(out_DCACHE_REQ_VAL,VAL);
    105        ALLOC1_VALACK_IN ( in_DCACHE_REQ_ACK,ACK);
    106        ALLOC1_SIGNAL_OUT(out_DCACHE_REQ_CONTEXT_ID,"context_id",Tcontext_t       ,_param->_max_size_dcache_context_id);
    107        ALLOC1_SIGNAL_OUT(out_DCACHE_REQ_PACKET_ID ,"packet_id" ,Tpacket_t        ,_param->_max_size_dcache_packet_id );
    108        ALLOC1_SIGNAL_OUT(out_DCACHE_REQ_ADDRESS   ,"address"   ,Tdcache_address_t,_param->_size_general_data);
    109        ALLOC1_SIGNAL_OUT(out_DCACHE_REQ_TYPE      ,"type"      ,Tdcache_type_t   ,_param->_size_dcache_type);
    110        ALLOC1_SIGNAL_OUT(out_DCACHE_REQ_WDATA     ,"wdata"     ,Tdcache_data_t   ,_param->_size_general_data);
     103       ALLOC2_INTERFACE("dcache_req",OUT, NORTH, "Data cache port : request", _param->_nb_load_store_unit, _param->_nb_cache_port[it1]);
     104       
     105       _ALLOC2_VALACK_OUT(out_DCACHE_REQ_VAL,VAL, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]);
     106       _ALLOC2_VALACK_IN ( in_DCACHE_REQ_ACK,ACK, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]);
     107       _ALLOC2_SIGNAL_OUT(out_DCACHE_REQ_CONTEXT_ID,"context_id",Tcontext_t       ,_param->_max_size_dcache_context_id, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]);
     108       _ALLOC2_SIGNAL_OUT(out_DCACHE_REQ_PACKET_ID ,"packet_id" ,Tpacket_t        ,_param->_max_size_dcache_packet_id , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]);
     109       _ALLOC2_SIGNAL_OUT(out_DCACHE_REQ_ADDRESS   ,"address"   ,Tdcache_address_t,_param->_size_general_data         , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]);
     110       _ALLOC2_SIGNAL_OUT(out_DCACHE_REQ_TYPE      ,"type"      ,Tdcache_type_t   ,_param->_size_dcache_type          , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]);
     111       _ALLOC2_SIGNAL_OUT(out_DCACHE_REQ_WDATA     ,"wdata"     ,Tdcache_data_t   ,_param->_size_general_data         , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]);
    111112     }
    112113    // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    113114     {
    114        ALLOC1_INTERFACE("dcache_rsp",IN, NORTH, "Data cache port : respons", _param->_nb_load_store_unit);
    115 
    116        ALLOC1_VALACK_IN ( in_DCACHE_RSP_VAL,VAL);
    117        ALLOC1_VALACK_OUT(out_DCACHE_RSP_ACK,ACK);
    118        ALLOC1_SIGNAL_IN ( in_DCACHE_RSP_CONTEXT_ID,"context_id",Tcontext_t     ,_param->_max_size_dcache_context_id);
    119        ALLOC1_SIGNAL_IN ( in_DCACHE_RSP_PACKET_ID ,"packet_id" ,Tpacket_t      ,_param->_max_size_dcache_packet_id);
    120        ALLOC1_SIGNAL_IN ( in_DCACHE_RSP_RDATA     ,"rdata"     ,Tdcache_data_t ,_param->_size_general_data);
    121        ALLOC1_SIGNAL_IN ( in_DCACHE_RSP_ERROR     ,"error"     ,Tdcache_error_t,_param->_size_dcache_error);
     115       ALLOC2_INTERFACE("dcache_rsp",IN, NORTH, "Data cache port : respons", _param->_nb_load_store_unit, _param->_nb_cache_port[it1]);
     116
     117       _ALLOC2_VALACK_IN ( in_DCACHE_RSP_VAL,VAL, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]);
     118       _ALLOC2_VALACK_OUT(out_DCACHE_RSP_ACK,ACK, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]);
     119       _ALLOC2_SIGNAL_IN ( in_DCACHE_RSP_CONTEXT_ID,"context_id",Tcontext_t     ,_param->_max_size_dcache_context_id, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]);
     120       _ALLOC2_SIGNAL_IN ( in_DCACHE_RSP_PACKET_ID ,"packet_id" ,Tpacket_t      ,_param->_max_size_dcache_packet_id , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]);
     121       _ALLOC2_SIGNAL_IN ( in_DCACHE_RSP_RDATA     ,"rdata"     ,Tdcache_data_t ,_param->_size_general_data         , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]);
     122       _ALLOC2_SIGNAL_IN ( in_DCACHE_RSP_ERROR     ,"error"     ,Tdcache_error_t,_param->_size_dcache_error         , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]);
    122123     }
    123124    // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    124125     {
    125        ALLOC2_INTERFACE("insert_rob",IN, EAST, "Rename's stage : insert a new instruction in the Re Order Buffer",_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_interface_it1]);
    126        
    127        _ALLOC2_VALACK_IN ( in_INSERT_ROB_VAL,VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    128        _ALLOC2_VALACK_OUT(out_INSERT_ROB_ACK,ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    129 
    130        _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RD_USE    ,"rd_use"    ,Tcontrol_t        ,1                             ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    131        _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RD_NUM_REG,"rd_num_reg",Tgeneral_address_t,_param->_size_general_register,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    132        _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RE_USE    ,"re_use"    ,Tcontrol_t        ,1                             ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
    133        _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RE_NUM_REG,"re_num_reg",Tspecial_address_t,_param->_size_special_register,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[alloc_signal_it1]);
     126       ALLOC2_INTERFACE("insert_rob",IN, EAST, "Rename's stage : insert a new instruction in the Re Order Buffer",_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     127       
     128       _ALLOC2_VALACK_IN ( in_INSERT_ROB_VAL,VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     129       _ALLOC2_VALACK_OUT(out_INSERT_ROB_ACK,ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     130
     131       _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RD_USE    ,"rd_use"    ,Tcontrol_t        ,1                             ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     132       _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RD_NUM_REG,"rd_num_reg",Tgeneral_address_t,_param->_size_general_register,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     133       _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RE_USE    ,"re_use"    ,Tcontrol_t        ,1                             ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
     134       _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RE_NUM_REG,"re_num_reg",Tspecial_address_t,_param->_size_special_register,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]);
    134135     }
    135     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    136      {
    137        ALLOC2_INTERFACE("retire_rob",IN, EAST, "Rename's stage : retire a new instruction in the Re Order Buffer",_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_interface_it1]);
    138        
    139        _ALLOC2_VALACK_IN ( in_RETIRE_ROB_VAL,VAL,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    140        _ALLOC2_VALACK_OUT(out_RETIRE_ROB_ACK,ACK,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    141 
    142        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_OLD_USE    ,"rd_old_use"    ,Tcontrol_t        ,1                             ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    143        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_OLD_NUM_REG,"rd_old_num_reg",Tgeneral_address_t,_param->_size_general_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    144        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_NEW_USE    ,"rd_new_use"    ,Tcontrol_t        ,1                             ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    145        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_NEW_NUM_REG,"rd_new_num_reg",Tgeneral_address_t,_param->_size_general_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    146        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_OLD_USE    ,"re_old_use"    ,Tcontrol_t        ,1                             ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    147        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_OLD_NUM_REG,"re_old_num_reg",Tspecial_address_t,_param->_size_special_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    148        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_NEW_USE    ,"re_new_use"    ,Tcontrol_t        ,1                             ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    149        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_NEW_NUM_REG,"re_new_num_reg",Tspecial_address_t,_param->_size_special_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[alloc_signal_it1]);
    150      }
     136//     // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     137//      {
     138//        ALLOC2_INTERFACE("retire_rob",IN, EAST, "Rename's stage : retire a new instruction in the Re Order Buffer",_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     139       
     140//        _ALLOC2_VALACK_IN ( in_RETIRE_ROB_VAL,VAL,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     141//        _ALLOC2_VALACK_OUT(out_RETIRE_ROB_ACK,ACK,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     142
     143//        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_OLD_USE    ,"rd_old_use"    ,Tcontrol_t        ,1                             ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     144//        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_OLD_NUM_REG,"rd_old_num_reg",Tgeneral_address_t,_param->_size_general_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     145//        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_NEW_USE    ,"rd_new_use"    ,Tcontrol_t        ,1                             ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     146//        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_NEW_NUM_REG,"rd_new_num_reg",Tgeneral_address_t,_param->_size_general_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     147//        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_OLD_USE    ,"re_old_use"    ,Tcontrol_t        ,1                             ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     148//        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_OLD_NUM_REG,"re_old_num_reg",Tspecial_address_t,_param->_size_special_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     149//        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_NEW_USE    ,"re_new_use"    ,Tcontrol_t        ,1                             ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     150//        _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_NEW_NUM_REG,"re_new_num_reg",Tspecial_address_t,_param->_size_special_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]);
     151//      }
    151152
    152153     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    153154     std::string name;
     155
     156     {
     157       name = _name+"_glue";
     158       log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
     159       
     160       _component_glue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::execute_loop_glue::Execute_loop_Glue
     161         (name.c_str()
     162#ifdef STATISTICS
     163          ,param_statistics
     164#endif
     165          ,_param->_param_glue
     166          ,_usage);
     167       
     168       _component->set_component (_component_glue->_component
     169#ifdef POSITION
     170                                  , 50, 50, 10, 10
     171#endif
     172                                  );
     173     }
    154174       
    155175     _component_read_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::Read_unit * [_param->_nb_read_unit];
     
    157177       {
    158178         name = _name+"_read_unit_"+toString(i);
    159          std::cout << "Create   : " << name << std::endl;
     179         log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
    160180
    161181         _component_read_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::Read_unit
     
    178198       {
    179199         name = _name+"_functionnal_unit_"+toString(i);
    180          std::cout << "Create   : " << name << std::endl;
     200         log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
    181201
    182202         _component_functionnal_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::Functionnal_unit
     
    199219       {
    200220         name = _name+"_load_store_unit_"+toString(i);
    201          std::cout << "Create   : " << name << std::endl;
     221         log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
    202222
    203223         _component_load_store_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit
     
    220240       {
    221241         name = _name+"_write_unit_"+toString(i);
    222          std::cout << "Create   : " << name << std::endl;
     242         log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
    223243
    224244         _component_write_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Write_unit
     
    239259     {
    240260       name = _name+"_read_unit_to_execution_unit";
    241        std::cout << "Create   : " << name << std::endl;
     261       log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
    242262       
    243263       _component_read_unit_to_execution_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::network::read_unit_to_execution_unit::Read_unit_to_Execution_unit
     
    258278     {
    259279       name = _name+"_execution_unit_to_write_unit";
    260        std::cout << "Create   : " << name << std::endl;
     280       log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
    261281       
    262282       _component_execution_unit_to_write_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::network::execution_unit_to_write_unit::Execution_unit_to_Write_unit
     
    277297     {
    278298       name = _name+"_register_unit";
    279        std::cout << "Create   : " << name << std::endl;
     299       log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
    280300       
    281301       _component_register_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::Register_unit
     
    296316     // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    297317     std::string src,dest;
     318
     319     // ===================================================================
     320     // =====[ GLUE ]======================================================
     321     // ===================================================================
     322     {
     323       src = _name+"_glue";
     324       log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
     325       
     326       {
     327         dest = _name;
     328#ifdef POSITION
     329         _component->interface_map (src ,"",
     330                                    dest,"");
     331#endif
     332         PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK");
     333         PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET");
     334       }
     335
     336       for (uint32_t i=0; i<_param->_nb_gpr_write; i++)
     337         {
     338           {
     339             dest = _name+"_write_unit_"+toString(i);
     340             
     341#ifdef POSITION
     342             _component->interface_map (src ,"gpr_write_write_unit_"+toString(i),
     343                                        dest,"gpr_write");
     344#endif
     345
     346             //  in_GPR_WRITE_WRITE_UNIT_VAL               
     347             // out_GPR_WRITE_WRITE_UNIT_ACK               
     348             //  in_GPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID     
     349             //  in_GPR_WRITE_WRITE_UNIT_NUM_REG           
     350             //  in_GPR_WRITE_WRITE_UNIT_DATA             
     351           }
     352
     353           {
     354             dest = _name+"_register_unit";
     355             
     356#ifdef POSITION
     357             _component->interface_map (src ,"gpr_write_register_file_"+toString(i),
     358                                        dest,"gpr_write_"+toString(i));
     359#endif
     360             // out_GPR_WRITE_REGISTER_FILE_VAL           
     361             //  in_GPR_WRITE_REGISTER_FILE_ACK           
     362             // out_GPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID 
     363             // out_GPR_WRITE_REGISTER_FILE_NUM_REG       
     364             // out_GPR_WRITE_REGISTER_FILE_DATA           
     365           }
     366
     367           {
     368             dest = _name+"_read_unit_0";
     369
     370#ifdef POSITION
     371             _component->interface_map (src ,"gpr_write_read_unit_"+toString(i),
     372                                        dest,"gpr_write");
     373#endif
     374
     375             // out_GPR_WRITE_READ_UNIT_VAL               
     376             // out_GPR_WRITE_READ_UNIT_OOO_ENGINE_ID     
     377             // out_GPR_WRITE_READ_UNIT_NUM_REG           
     378             // out_GPR_WRITE_READ_UNIT_DATA               
     379           }
     380         }
     381
     382       for (uint32_t i=0; i<_param->_nb_spr_write; i++)
     383         {
     384           {
     385             dest = _name+"_write_unit_"+toString(i);
     386             
     387#ifdef POSITION
     388             _component->interface_map (src ,"spr_write_write_unit_"+toString(i),
     389                                        dest,"spr_write");
     390#endif
     391
     392             //  in_SPR_WRITE_WRITE_UNIT_VAL               
     393             // out_SPR_WRITE_WRITE_UNIT_ACK               
     394             //  in_SPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID     
     395             //  in_SPR_WRITE_WRITE_UNIT_NUM_REG           
     396             //  in_SPR_WRITE_WRITE_UNIT_DATA             
     397           }
     398
     399           {
     400             dest = _name+"_register_unit";
     401             
     402#ifdef POSITION
     403             _component->interface_map (src ,"spr_write_register_file_"+toString(i),
     404                                        dest,"spr_write_"+toString(i));
     405#endif
     406             // out_SPR_WRITE_REGISTER_FILE_VAL           
     407             //  in_SPR_WRITE_REGISTER_FILE_ACK           
     408             // out_SPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID 
     409             // out_SPR_WRITE_REGISTER_FILE_NUM_REG       
     410             // out_SPR_WRITE_REGISTER_FILE_DATA           
     411           }
     412
     413           {
     414             dest = _name+"_read_unit_0";
     415
     416#ifdef POSITION
     417             _component->interface_map (src ,"spr_write_read_unit_"+toString(i),
     418                                        dest,"spr_write");
     419#endif
     420
     421             // out_SPR_WRITE_READ_UNIT_VAL               
     422             // out_SPR_WRITE_READ_UNIT_OOO_ENGINE_ID     
     423             // out_SPR_WRITE_READ_UNIT_NUM_REG           
     424             // out_SPR_WRITE_READ_UNIT_DATA               
     425           }
     426         }
     427
     428       
     429     }
    298430
    299431     // ===================================================================
     
    306438         {
    307439           src = _name+"_read_unit_"+toString(i);
    308            std::cout << "Instance : " << src << std::endl;
     440           log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    309441           
    310442           {
     
    334466             if (_param->_have_port_ooo_engine_id)
    335467             PORT_MAP(_component ,src , "in_READ_UNIT_IN_OOO_ENGINE_ID"        ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_OOO_ENGINE_ID"        );
    336              if (_param->_have_port_packet_id)
     468             if (_param->_have_port_rob_ptr  )
    337469             PORT_MAP(_component ,src , "in_READ_UNIT_IN_PACKET_ID"            ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_PACKET_ID"            );
    338470             PORT_MAP(_component ,src , "in_READ_UNIT_IN_OPERATION"            ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_OPERATION"            );
     
    361493               
    362494#ifdef POSITION
    363                _component->interface_map (src ,"read_unit_"+toString(i),
     495               _component->interface_map (src ,"read_unit_"+toString(j),
    364496                                          dest,"read_unit_"+toString(it_read_unit_out));
    365497#endif
    366498             
    367                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_VAL"                  ,
    368                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_VAL"                  );
    369                PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(i               )+"_ACK"                  ,
    370                                     dest,"out_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_ACK"                  );
     499               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_VAL"                  ,
     500                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_VAL"                  );
     501               COMPONENT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(j               )+"_ACK"                  ,
     502                                         dest,"out_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_ACK"                  );
    371503               if (_param->_have_port_context_id)
    372                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_CONTEXT_ID"           ,
    373                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_CONTEXT_ID"           );
     504               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_CONTEXT_ID"           ,
     505                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_CONTEXT_ID"           );
    374506               if (_param->_have_port_front_end_id)
    375                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_FRONT_END_ID"         ,
    376                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_FRONT_END_ID"         );
     507               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_FRONT_END_ID"         ,
     508                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_FRONT_END_ID"         );
    377509               if (_param->_have_port_ooo_engine_id)
    378                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_OOO_ENGINE_ID"        ,
    379                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_OOO_ENGINE_ID"        );
    380                if (_param->_have_port_packet_id)
    381                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_PACKET_ID"            ,
    382                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_PACKET_ID"            );
    383                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_OPERATION"            ,
    384                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_OPERATION"            );
    385                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_TYPE"                 ,
    386                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_TYPE"                 );
    387                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_STORE_QUEUE_PTR_WRITE",
    388                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_STORE_QUEUE_PTR_WRITE");
     510               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_OOO_ENGINE_ID"        ,
     511                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_OOO_ENGINE_ID"        );
     512               if (_param->_have_port_rob_ptr  )
     513               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_PACKET_ID"            ,
     514                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_PACKET_ID"            );
     515               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_OPERATION"            ,
     516                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_OPERATION"            );
     517               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_TYPE"                 ,
     518                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_TYPE"                 );
     519               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_STORE_QUEUE_PTR_WRITE",
     520                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_STORE_QUEUE_PTR_WRITE");
    389521               if (_param->_have_port_load_queue_ptr)
    390                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_LOAD_QUEUE_PTR_WRITE" ,
    391                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_LOAD_QUEUE_PTR_WRITE" );
    392                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_HAS_IMMEDIAT"         ,
    393                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_HAS_IMMEDIAT"         );
    394                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_IMMEDIAT"             ,
    395                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_IMMEDIAT"             );
    396                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_DATA_RA"              ,
    397                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_DATA_RA"              );
    398                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_DATA_RB"              ,
    399                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_DATA_RB"              );
    400                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_DATA_RC"              ,
    401                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_DATA_RC"              );
    402                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_WRITE_RD"             ,
    403                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_WRITE_RD"             );
    404                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_NUM_REG_RD"           ,
    405                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_NUM_REG_RD"           );
    406                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_WRITE_RE"             ,
    407                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_WRITE_RE"             );
    408                PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(i               )+"_NUM_REG_RE"           ,
    409                                     dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_NUM_REG_RE"           );
     522               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_LOAD_QUEUE_PTR_WRITE" ,
     523                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_LOAD_QUEUE_PTR_WRITE" );
     524               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_HAS_IMMEDIAT"         ,
     525                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_HAS_IMMEDIAT"         );
     526               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_IMMEDIAT"             ,
     527                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_IMMEDIAT"             );
     528               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_DATA_RA"              ,
     529                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_DATA_RA"              );
     530               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_DATA_RB"              ,
     531                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_DATA_RB"              );
     532               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_DATA_RC"              ,
     533                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_DATA_RC"              );
     534               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_WRITE_RD"             ,
     535                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_WRITE_RD"             );
     536               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_NUM_REG_RD"           ,
     537                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_NUM_REG_RD"           );
     538               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_WRITE_RE"             ,
     539                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_WRITE_RE"             );
     540               COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j               )+"_NUM_REG_RE"           ,
     541                                         dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_NUM_REG_RE"           );
    410542             
    411              it_read_unit_out ++;
    412543           }
     544           it_read_unit_out ++;
    413545           
    414546           // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    421553                                        dest,"gpr_read_"+toString(2*i+1));
    422554#endif
    423              PORT_MAP(_component ,src ,"out_GPR_READ_0_VAL"          , dest, "in_GPR_READ_"+toString(2*i  )+"_VAL"          );
    424              PORT_MAP(_component ,src , "in_GPR_READ_0_ACK"          , dest,"out_GPR_READ_"+toString(2*i  )+"_ACK"          );
     555             COMPONENT_MAP(_component ,src ,"out_GPR_READ_0_VAL"          , dest, "in_GPR_READ_"+toString(2*i  )+"_VAL"          );
     556             COMPONENT_MAP(_component ,src , "in_GPR_READ_0_ACK"          , dest,"out_GPR_READ_"+toString(2*i  )+"_ACK"          );
    425557             if (_param->_have_port_ooo_engine_id)
    426              PORT_MAP(_component ,src ,"out_GPR_READ_0_OOO_ENGINE_ID", dest, "in_GPR_READ_"+toString(2*i  )+"_OOO_ENGINE_ID");
    427              PORT_MAP(_component ,src ,"out_GPR_READ_0_NUM_REG"      , dest, "in_GPR_READ_"+toString(2*i  )+"_NUM_REG"      );
    428              PORT_MAP(_component ,src , "in_GPR_READ_0_DATA"         , dest,"out_GPR_READ_"+toString(2*i  )+"_DATA"         );
    429              PORT_MAP(_component ,src , "in_GPR_READ_0_DATA_VAL"     , dest,"out_GPR_READ_"+toString(2*i  )+"_DATA_VAL"     );
    430              PORT_MAP(_component ,src ,"out_GPR_READ_1_VAL"          , dest, "in_GPR_READ_"+toString(2*i+1)+"_VAL"          );
    431              PORT_MAP(_component ,src , "in_GPR_READ_1_ACK"          , dest,"out_GPR_READ_"+toString(2*i+1)+"_ACK"          );
     558             COMPONENT_MAP(_component ,src ,"out_GPR_READ_0_OOO_ENGINE_ID", dest, "in_GPR_READ_"+toString(2*i  )+"_OOO_ENGINE_ID");
     559             COMPONENT_MAP(_component ,src ,"out_GPR_READ_0_NUM_REG"      , dest, "in_GPR_READ_"+toString(2*i  )+"_NUM_REG"      );
     560             COMPONENT_MAP(_component ,src , "in_GPR_READ_0_DATA"         , dest,"out_GPR_READ_"+toString(2*i  )+"_DATA"         );
     561             COMPONENT_MAP(_component ,src , "in_GPR_READ_0_DATA_VAL"     , dest,"out_GPR_READ_"+toString(2*i  )+"_DATA_VAL"     );
     562             COMPONENT_MAP(_component ,src ,"out_GPR_READ_1_VAL"          , dest, "in_GPR_READ_"+toString(2*i+1)+"_VAL"          );
     563             COMPONENT_MAP(_component ,src , "in_GPR_READ_1_ACK"          , dest,"out_GPR_READ_"+toString(2*i+1)+"_ACK"          );
    432564             if (_param->_have_port_ooo_engine_id)
    433              PORT_MAP(_component ,src ,"out_GPR_READ_1_OOO_ENGINE_ID", dest, "in_GPR_READ_"+toString(2*i+1)+"_OOO_ENGINE_ID");
    434              PORT_MAP(_component ,src ,"out_GPR_READ_1_NUM_REG"      , dest, "in_GPR_READ_"+toString(2*i+1)+"_NUM_REG"      );
    435              PORT_MAP(_component ,src , "in_GPR_READ_1_DATA"         , dest,"out_GPR_READ_"+toString(2*i+1)+"_DATA"         );
    436              PORT_MAP(_component ,src , "in_GPR_READ_1_DATA_VAL"     , dest,"out_GPR_READ_"+toString(2*i+1)+"_DATA_VAL"     );
     565             COMPONENT_MAP(_component ,src ,"out_GPR_READ_1_OOO_ENGINE_ID", dest, "in_GPR_READ_"+toString(2*i+1)+"_OOO_ENGINE_ID");
     566             COMPONENT_MAP(_component ,src ,"out_GPR_READ_1_NUM_REG"      , dest, "in_GPR_READ_"+toString(2*i+1)+"_NUM_REG"      );
     567             COMPONENT_MAP(_component ,src , "in_GPR_READ_1_DATA"         , dest,"out_GPR_READ_"+toString(2*i+1)+"_DATA"         );
     568             COMPONENT_MAP(_component ,src , "in_GPR_READ_1_DATA_VAL"     , dest,"out_GPR_READ_"+toString(2*i+1)+"_DATA_VAL"     );
    437569           }
    438570           
     
    442574#ifdef POSITION
    443575             _component->interface_map (src ,"spr_read_0",
    444                                         dest,"spr_read_"+toString(2*i  ));
    445 #endif
    446              PORT_MAP(_component ,src ,"out_SPR_READ_0_VAL"          , dest, "in_SPR_READ_"+toString(2*i  )+"_VAL"          );
    447              PORT_MAP(_component ,src , "in_SPR_READ_0_ACK"          , dest,"out_SPR_READ_"+toString(2*i  )+"_ACK"          );
     576                                        dest,"spr_read_"+toString(i));
     577#endif
     578             COMPONENT_MAP(_component ,src ,"out_SPR_READ_0_VAL"          , dest, "in_SPR_READ_"+toString(i)+"_VAL"          );
     579             COMPONENT_MAP(_component ,src , "in_SPR_READ_0_ACK"          , dest,"out_SPR_READ_"+toString(i)+"_ACK"          );
    448580             if (_param->_have_port_ooo_engine_id)
    449              PORT_MAP(_component ,src ,"out_SPR_READ_0_OOO_ENGINE_ID", dest, "in_SPR_READ_"+toString(2*i  )+"_OOO_ENGINE_ID");
    450              PORT_MAP(_component ,src ,"out_SPR_READ_0_NUM_REG"      , dest, "in_SPR_READ_"+toString(2*i  )+"_NUM_REG"      );
    451              PORT_MAP(_component ,src , "in_SPR_READ_0_DATA"         , dest,"out_SPR_READ_"+toString(2*i  )+"_DATA"         );
    452              PORT_MAP(_component ,src , "in_SPR_READ_0_DATA_VAL"     , dest,"out_SPR_READ_"+toString(2*i  )+"_DATA_VAL"     );
     581             COMPONENT_MAP(_component ,src ,"out_SPR_READ_0_OOO_ENGINE_ID", dest, "in_SPR_READ_"+toString(i)+"_OOO_ENGINE_ID");
     582             COMPONENT_MAP(_component ,src ,"out_SPR_READ_0_NUM_REG"      , dest, "in_SPR_READ_"+toString(i)+"_NUM_REG"      );
     583             COMPONENT_MAP(_component ,src , "in_SPR_READ_0_DATA"         , dest,"out_SPR_READ_"+toString(i)+"_DATA"         );
     584             COMPONENT_MAP(_component ,src , "in_SPR_READ_0_DATA_VAL"     , dest,"out_SPR_READ_"+toString(i)+"_DATA_VAL"     );
    453585           }
    454586           
     
    459591                it++)
    460592             {
    461                dest = _name+"_write_unit_"+toString(*it);
     593               uint32_t num_port = (*it);
     594
     595               dest = _name+"_glue";
    462596#ifdef POSITION
    463597               _component->interface_map (src ,"gpr_write_"+toString(it_gpr_write),
    464                                           dest,"gpr_write");
     598                                          dest,"gpr_write_read_unit_"+toString(num_port));
    465599#endif
    466600               
    467                PORT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_VAL"          ,
    468                                     dest,"out_GPR_WRITE_0_VAL"          );
     601               COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_VAL"          ,
     602                                         dest,"out_GPR_WRITE_READ_UNIT_"+toString(num_port)+"_VAL"          );
    469603               if (_param->_have_port_ooo_engine_id)
    470                PORT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_OOO_ENGINE_ID",
    471                                     dest,"out_GPR_WRITE_0_OOO_ENGINE_ID");
    472                PORT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_NUM_REG"      ,
    473                                     dest,"out_GPR_WRITE_0_NUM_REG"      );
    474                PORT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_DATA"         ,
    475                                     dest,"out_GPR_WRITE_0_DATA"         );
    476 
    477                // PORT MAP to the "write_unit" component
    478 #ifdef POSITION
    479                _component->interface_map (dest,"gpr_write",
    480                                           src ,"gpr_write_"+toString(it_gpr_write));
    481 #endif
    482                
    483                PORT_MAP(_component ,dest,"out_GPR_WRITE_0_VAL"          ,
    484                                     src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_VAL"          );
    485                if (_param->_have_port_ooo_engine_id)
    486                PORT_MAP(_component ,dest,"out_GPR_WRITE_0_OOO_ENGINE_ID",
    487                                     src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_OOO_ENGINE_ID");
    488                PORT_MAP(_component ,dest,"out_GPR_WRITE_0_NUM_REG"      ,
    489                                     src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_NUM_REG"      );
    490                PORT_MAP(_component ,dest,"out_GPR_WRITE_0_DATA"         ,
    491                                     src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_DATA"         );
     604               COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_OOO_ENGINE_ID",
     605                                         dest,"out_GPR_WRITE_READ_UNIT_"+toString(num_port)+"_OOO_ENGINE_ID");
     606               COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_NUM_REG"      ,
     607                                         dest,"out_GPR_WRITE_READ_UNIT_"+toString(num_port)+"_NUM_REG"      );
     608               COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_DATA"         ,
     609                                         dest,"out_GPR_WRITE_READ_UNIT_"+toString(num_port)+"_DATA"         );
    492610               
    493611               it_gpr_write ++;
     
    500618                it++)
    501619             {
    502                dest = _name+"_write_unit_"+toString(*it);
     620               uint32_t num_port = (*it);
     621
     622               dest = _name+"_glue";
    503623#ifdef POSITION
    504624               _component->interface_map (src ,"spr_write_"+toString(it_spr_write),
    505                                           dest,"spr_write");
     625                                          dest,"spr_write_read_unit_"+toString(num_port));
    506626#endif
    507627               
    508                PORT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_VAL"          ,
    509                                     dest,"out_SPR_WRITE_0_VAL"          );
     628               COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_VAL"          ,
     629                                         dest,"out_SPR_WRITE_READ_UNIT_"+toString(num_port)+"_VAL"          );
     630
    510631               if (_param->_have_port_ooo_engine_id)
    511                PORT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_OOO_ENGINE_ID",
    512                                     dest,"out_SPR_WRITE_0_OOO_ENGINE_ID");
    513                PORT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_NUM_REG"      ,
    514                                     dest,"out_SPR_WRITE_0_NUM_REG"      );
    515                PORT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_DATA"         ,
    516                                     dest,"out_SPR_WRITE_0_DATA"         );
    517 
    518                // PORT MAP to the "write_unit" component
    519 #ifdef POSITION
    520                _component->interface_map (dest,"spr_write",
    521                                           src ,"spr_write_"+toString(it_spr_write));
    522 #endif
    523                PORT_MAP(_component ,dest,"out_SPR_WRITE_0_VAL"          ,
    524                                     src , "in_SPR_WRITE_"+toString(it_spr_write)+"_VAL"          );
    525                if (_param->_have_port_ooo_engine_id)
    526                PORT_MAP(_component ,dest,"out_SPR_WRITE_0_OOO_ENGINE_ID",
    527                                     src , "in_SPR_WRITE_"+toString(it_spr_write)+"_OOO_ENGINE_ID");
    528                PORT_MAP(_component ,dest,"out_SPR_WRITE_0_NUM_REG"      ,
    529                                     src , "in_SPR_WRITE_"+toString(it_spr_write)+"_NUM_REG"      );
    530                PORT_MAP(_component ,dest,"out_SPR_WRITE_0_DATA"         ,
    531                                     src , "in_SPR_WRITE_"+toString(it_spr_write)+"_DATA"         );
    532 
     632               COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_OOO_ENGINE_ID",
     633                                         dest,"out_SPR_WRITE_READ_UNIT_"+toString(num_port)+"_OOO_ENGINE_ID");
     634               COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_NUM_REG"      ,
     635                                         dest,"out_SPR_WRITE_READ_UNIT_"+toString(num_port)+"_NUM_REG"      );
     636               COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_DATA"         ,
     637                                         dest,"out_SPR_WRITE_READ_UNIT_"+toString(num_port)+"_DATA"         );
     638               
    533639               it_spr_write ++;
    534640             }
     
    550656                   
    551657                   if (_param->_have_port_ooo_engine_id)
    552                    PORT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_OOO_ENGINE_ID",
    553                                         dest,"out_BYPASS_WRITE_"+toString(j              )+"_OOO_ENGINE_ID");
    554                    PORT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_VAL"      ,
    555                                         dest,"out_BYPASS_WRITE_"+toString(j              )+"_GPR_VAL"      );
    556                    PORT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_NUM_REG"  ,
    557                                         dest,"out_BYPASS_WRITE_"+toString(j              )+"_GPR_NUM_REG"  );
    558                    PORT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_DATA"     ,
    559                                         dest,"out_BYPASS_WRITE_"+toString(j              )+"_GPR_DATA"     );
    560                    PORT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_VAL"      ,
    561                                         dest,"out_BYPASS_WRITE_"+toString(j              )+"_SPR_VAL"      );
    562                    PORT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_NUM_REG"  ,
    563                                         dest,"out_BYPASS_WRITE_"+toString(j              )+"_SPR_NUM_REG"  );
    564                    PORT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_DATA"     ,
    565                                         dest,"out_BYPASS_WRITE_"+toString(j              )+"_SPR_DATA"     );
     658                   COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_OOO_ENGINE_ID",
     659                                             dest,"out_BYPASS_WRITE_"+toString(j              )+"_OOO_ENGINE_ID");
     660                   COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_VAL"      ,
     661                                             dest,"out_BYPASS_WRITE_"+toString(j              )+"_GPR_VAL"      );
     662                   COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_NUM_REG"  ,
     663                                             dest,"out_BYPASS_WRITE_"+toString(j              )+"_GPR_NUM_REG"  );
     664                   COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_DATA"     ,
     665                                             dest,"out_BYPASS_WRITE_"+toString(j              )+"_GPR_DATA"     );
     666                   COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_VAL"      ,
     667                                             dest,"out_BYPASS_WRITE_"+toString(j              )+"_SPR_VAL"      );
     668                   COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_NUM_REG"  ,
     669                                             dest,"out_BYPASS_WRITE_"+toString(j              )+"_SPR_NUM_REG"  );
     670                   COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_DATA"     ,
     671                                             dest,"out_BYPASS_WRITE_"+toString(j              )+"_SPR_DATA"     );
    566672
    567673#ifdef POSITION
     
    570676#endif
    571677                   
    572                    if (_param->_have_port_ooo_engine_id)
    573                    PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j              )+"_OOO_ENGINE_ID",
    574                                         src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_OOO_ENGINE_ID");
    575                    PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j              )+"_GPR_VAL"      ,
    576                                         src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_VAL"      );
    577                    PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j              )+"_GPR_NUM_REG"  ,
    578                                         src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_NUM_REG"  );
    579                    PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j              )+"_GPR_DATA"     ,
    580                                         src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_DATA"     );
    581                    PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j              )+"_SPR_VAL"      ,
    582                                         src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_VAL"      );
    583                    PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j              )+"_SPR_NUM_REG"  ,
    584                                         src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_NUM_REG"  );
    585                    PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j              )+"_SPR_DATA"     ,
    586                                         src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_DATA"     );
     678//                 if (_param->_have_port_ooo_engine_id)
     679//                 PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j              )+"_OOO_ENGINE_ID",
     680//                                      src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_OOO_ENGINE_ID");
     681//                 PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j              )+"_GPR_VAL"      ,
     682//                                      src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_VAL"      );
     683//                 PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j              )+"_GPR_NUM_REG"  ,
     684//                                      src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_NUM_REG"  );
     685//                 PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j              )+"_GPR_DATA"     ,
     686//                                      src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_DATA"     );
     687//                 PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j              )+"_SPR_VAL"      ,
     688//                                      src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_VAL"      );
     689//                 PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j              )+"_SPR_NUM_REG"  ,
     690//                                      src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_NUM_REG"  );
     691//                 PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j              )+"_SPR_DATA"     ,
     692//                                      src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_DATA"     );
    587693
    588694                   it_bypass_write ++;
     
    606712                   
    607713                   if (_param->_have_port_ooo_engine_id)
    608                    PORT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_OOO_ENGINE_ID",
    609                                         dest,"out_BYPASS_MEMORY_"+toString(j               )+"_OOO_ENGINE_ID");
    610                    PORT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_VAL"          ,
    611                                         dest,"out_BYPASS_MEMORY_"+toString(j               )+"_VAL"          );
    612                    PORT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_NUM_REG"      ,
    613                                         dest,"out_BYPASS_MEMORY_"+toString(j               )+"_NUM_REG"      );
    614                    PORT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_DATA"         ,
    615                                         dest,"out_BYPASS_MEMORY_"+toString(j               )+"_DATA"         );
     714                   COMPONENT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_OOO_ENGINE_ID",
     715                                             dest,"out_BYPASS_MEMORY_"+toString(j               )+"_OOO_ENGINE_ID");
     716                   COMPONENT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_VAL"          ,
     717                                             dest,"out_BYPASS_MEMORY_"+toString(j               )+"_VAL"          );
     718                   COMPONENT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_NUM_REG"      ,
     719                                             dest,"out_BYPASS_MEMORY_"+toString(j               )+"_NUM_REG"      );
     720                   COMPONENT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_DATA"         ,
     721                                             dest,"out_BYPASS_MEMORY_"+toString(j               )+"_DATA"         );
    616722
    617723                   // port map to the "load_store_unit" component
     
    621727#endif
    622728                   
    623                    if (_param->_have_port_ooo_engine_id)
    624                    PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j               )+"_OOO_ENGINE_ID",
    625                                         src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_OOO_ENGINE_ID");
    626                    PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j               )+"_VAL"          ,
    627                                         src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_VAL"          );
    628                    PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j               )+"_NUM_REG"      ,
    629                                         src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_NUM_REG"      );
    630                    PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j               )+"_DATA"         ,
    631                                         src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_DATA"         );
     729//                 if (_param->_have_port_ooo_engine_id)
     730//                 PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j               )+"_OOO_ENGINE_ID",
     731//                                      src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_OOO_ENGINE_ID");
     732//                 PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j               )+"_VAL"          ,
     733//                                      src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_VAL"          );
     734//                 PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j               )+"_NUM_REG"      ,
     735//                                      src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_NUM_REG"      );
     736//                 PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j               )+"_DATA"         ,
     737//                                      src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_DATA"         );
    632738
    633739                   it_bypass_memory ++;
     
    651757
    652758             src = _name+"_functionnal_unit_"+toString(x);
    653              std::cout << "Instance : " << src << std::endl;
     759             log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    654760             
    655761             {
     
    669775#ifdef POSITION
    670776               _component->interface_map (src ,"execute_in",
    671                                           dest,"execute_unit_in_"+toString(i));
    672 #endif
    673 
    674                PORT_MAP(_component ,src , "in_EXECUTE_IN_VAL"                  ,
    675                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_VAL"                  );
    676                PORT_MAP(_component ,src ,"out_EXECUTE_IN_ACK"                  ,
    677                                     dest, "in_EXECUTE_UNIT_IN_"+toString(i)+"_ACK"                  );
     777                                          dest,"execute_unit_in_"+toString(i)+"_0");
     778#endif
     779
     780               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_VAL"                  ,
     781                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_VAL"                  );
     782               COMPONENT_MAP(_component ,src ,"out_EXECUTE_IN_ACK"                  ,
     783                                         dest, "in_EXECUTE_UNIT_IN_"+toString(i)+"_0_ACK"                  );
    678784               if (_param->_have_port_context_id)
    679                PORT_MAP(_component ,src , "in_EXECUTE_IN_CONTEXT_ID"           ,
    680                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_CONTEXT_ID"           );
     785               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_CONTEXT_ID"           ,
     786                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_CONTEXT_ID"           );
    681787               if (_param->_have_port_front_end_id)
    682                PORT_MAP(_component ,src , "in_EXECUTE_IN_FRONT_END_ID"         ,
    683                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_FRONT_END_ID"         );
     788               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_FRONT_END_ID"         ,
     789                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_FRONT_END_ID"         );
    684790               if (_param->_have_port_ooo_engine_id)
    685                PORT_MAP(_component ,src , "in_EXECUTE_IN_OOO_ENGINE_ID"        ,
    686                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID"        );
    687                if (_param->_have_port_packet_id)
    688                PORT_MAP(_component ,src , "in_EXECUTE_IN_PACKET_ID"            ,
    689                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_PACKET_ID"            );
    690                PORT_MAP(_component ,src , "in_EXECUTE_IN_OPERATION"            ,
    691                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OPERATION"            );
    692                PORT_MAP(_component ,src , "in_EXECUTE_IN_TYPE"                 ,
    693                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_TYPE"                 );
    694                PORT_MAP(_component ,src , "in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE",
    695                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_STORE_QUEUE_PTR_WRITE");
     791               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_OOO_ENGINE_ID"        ,
     792                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_OOO_ENGINE_ID"        );
     793               if (_param->_have_port_rob_ptr  )
     794               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_PACKET_ID"            ,
     795                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_PACKET_ID"            );
     796               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_OPERATION"            ,
     797                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_OPERATION"            );
     798               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_TYPE"                 ,
     799                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_TYPE"                 );
     800               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE",
     801                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_STORE_QUEUE_PTR_WRITE");
    696802               if (_param->_have_port_load_queue_ptr)
    697                PORT_MAP(_component ,src , "in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE" ,
    698                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" );
    699                PORT_MAP(_component ,src , "in_EXECUTE_IN_HAS_IMMEDIAT"         ,
    700                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_HAS_IMMEDIAT"         );
    701                PORT_MAP(_component ,src , "in_EXECUTE_IN_IMMEDIAT"             ,
    702                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_IMMEDIAT"             );
    703                PORT_MAP(_component ,src , "in_EXECUTE_IN_DATA_RA"              ,
    704                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RA"              );
    705                PORT_MAP(_component ,src , "in_EXECUTE_IN_DATA_RB"              ,
    706                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RB"              );
    707                PORT_MAP(_component ,src , "in_EXECUTE_IN_DATA_RC"              ,
    708                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RC"              );
    709                PORT_MAP(_component ,src , "in_EXECUTE_IN_WRITE_RD"             ,
    710                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RD"             );
    711                PORT_MAP(_component ,src , "in_EXECUTE_IN_NUM_REG_RD"           ,
    712                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RD"           );
    713                PORT_MAP(_component ,src , "in_EXECUTE_IN_WRITE_RE"             ,
    714                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RE"             );
    715                PORT_MAP(_component ,src , "in_EXECUTE_IN_NUM_REG_RE"           ,
    716                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RE"           );
     803               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE" ,
     804                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_LOAD_QUEUE_PTR_WRITE" );
     805               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_HAS_IMMEDIAT"         ,
     806                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_HAS_IMMEDIAT"         );
     807               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_IMMEDIAT"             ,
     808                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_IMMEDIAT"             );
     809               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_DATA_RA"              ,
     810                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_DATA_RA"              );
     811               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_DATA_RB"              ,
     812                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_DATA_RB"              );
     813               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_DATA_RC"              ,
     814                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_DATA_RC"              );
     815               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_WRITE_RD"             ,
     816                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_WRITE_RD"             );
     817               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_NUM_REG_RD"           ,
     818                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_NUM_REG_RD"           );
     819               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_WRITE_RE"             ,
     820                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_WRITE_RE"             );
     821               COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_NUM_REG_RE"           ,
     822                                         dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_NUM_REG_RE"           );
    717823             }
    718824             
     
    723829#ifdef POSITION
    724830               _component->interface_map (src ,"execute_out",
    725                                           dest,"execute_unit_out_"+toString(i));
    726 #endif
    727 
    728                PORT_MAP(_component ,src ,"out_EXECUTE_OUT_VAL"          ,
    729                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_VAL"          );
    730                PORT_MAP(_component ,src , "in_EXECUTE_OUT_ACK"          ,
    731                                     dest,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_ACK"          );
     831                                          dest,"execute_unit_out_"+toString(i)+"_0");
     832#endif
     833
     834               COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_VAL"          ,
     835                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_VAL"          );
     836               COMPONENT_MAP(_component ,src , "in_EXECUTE_OUT_ACK"          ,
     837                                         dest,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_0_ACK"          );
    732838               if (_param->_have_port_context_id)
    733                PORT_MAP(_component ,src ,"out_EXECUTE_OUT_CONTEXT_ID"   ,
    734                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_CONTEXT_ID"   );
     839               COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_CONTEXT_ID"   ,
     840                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_CONTEXT_ID"   );
    735841               if (_param->_have_port_front_end_id)
    736                PORT_MAP(_component ,src ,"out_EXECUTE_OUT_FRONT_END_ID" ,
    737                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_FRONT_END_ID" );
     842               COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_FRONT_END_ID" ,
     843                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_FRONT_END_ID" );
    738844               if (_param->_have_port_ooo_engine_id)
    739                PORT_MAP(_component ,src ,"out_EXECUTE_OUT_OOO_ENGINE_ID",
    740                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OOO_ENGINE_ID");
    741                if (_param->_have_port_packet_id)
    742                PORT_MAP(_component ,src ,"out_EXECUTE_OUT_PACKET_ID"    ,
    743                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_PACKET_ID"    );
    744 //             PORT_MAP(_component ,src ,"out_EXECUTE_OUT_OPERATION"    ,
    745 //                                  dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OPERATION"    );
    746                PORT_MAP(_component ,src ,"out_EXECUTE_OUT_TYPE"         ,
    747                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_TYPE"         );
    748                PORT_MAP(_component ,src ,"out_EXECUTE_OUT_WRITE_RD"     ,
    749                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RD"     );
    750                PORT_MAP(_component ,src ,"out_EXECUTE_OUT_NUM_REG_RD"   ,
    751                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RD"   );
    752                PORT_MAP(_component ,src ,"out_EXECUTE_OUT_DATA_RD"      ,
    753                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RD"      );
    754                PORT_MAP(_component ,src ,"out_EXECUTE_OUT_WRITE_RE"     ,
    755                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RE"     );
    756                PORT_MAP(_component ,src ,"out_EXECUTE_OUT_NUM_REG_RE"   ,
    757                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RE"   );
    758                PORT_MAP(_component ,src ,"out_EXECUTE_OUT_DATA_RE"      ,
    759                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RE"      );
    760                PORT_MAP(_component ,src ,"out_EXECUTE_OUT_EXCEPTION"    ,
    761                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_EXCEPTION"    );
    762                PORT_MAP(_component ,src ,"out_EXECUTE_OUT_NO_SEQUENCE"  ,
    763                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NO_SEQUENCE"  );
    764                PORT_MAP(_component ,src ,"out_EXECUTE_OUT_ADDRESS"      ,
    765                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_ADDRESS"      );
     845               COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_OOO_ENGINE_ID",
     846                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_OOO_ENGINE_ID");
     847               if (_param->_have_port_rob_ptr  )
     848               COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_PACKET_ID"    ,
     849                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_PACKET_ID"    );
     850//             COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_OPERATION"    ,
     851//                                       dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_OPERATION"    );
     852               COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_TYPE"         ,
     853                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_TYPE"         );
     854               COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_WRITE_RD"     ,
     855                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_WRITE_RD"     );
     856               COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_NUM_REG_RD"   ,
     857                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_NUM_REG_RD"   );
     858               COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_DATA_RD"      ,
     859                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_DATA_RD"      );
     860               COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_WRITE_RE"     ,
     861                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_WRITE_RE"     );
     862               COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_NUM_REG_RE"   ,
     863                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_NUM_REG_RE"   );
     864               COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_DATA_RE"      ,
     865                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_DATA_RE"      );
     866               COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_EXCEPTION"    ,
     867                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_EXCEPTION"    );
     868               COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_NO_SEQUENCE"  ,
     869                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_NO_SEQUENCE"  );
     870               COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_ADDRESS"      ,
     871                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_ADDRESS"      );
    766872             }
    767873           }
     
    773879 
    774880             src = _name+"_load_store_unit_"+toString(x);
    775              std::cout << "Instance : " << src << std::endl;
     881             log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    776882
    777883             // ~~~~~[ Interface "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    787893         
    788894             // ~~~~~[ Interface "memory_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    789              {
    790                dest = _name+"_read_unit_to_execution_unit";
    791 
    792 #ifdef POSITION
    793                _component->interface_map (src ,"memory_in",
    794                                           dest,"execute_unit_in_"+toString(i));
    795 #endif
    796 
    797                PORT_MAP(_component ,src , "in_MEMORY_IN_VAL"                  ,
    798                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_VAL"                  );
    799                PORT_MAP(_component ,src ,"out_MEMORY_IN_ACK"                  ,
    800                                     dest, "in_EXECUTE_UNIT_IN_"+toString(i)+"_ACK"                  );
    801                if (_param->_have_port_context_id)
    802                PORT_MAP(_component ,src , "in_MEMORY_IN_CONTEXT_ID"           ,
    803                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_CONTEXT_ID"           );
    804                if (_param->_have_port_front_end_id)
    805                PORT_MAP(_component ,src , "in_MEMORY_IN_FRONT_END_ID"         ,
    806                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_FRONT_END_ID"         );
    807                if (_param->_have_port_ooo_engine_id)
    808                PORT_MAP(_component ,src , "in_MEMORY_IN_OOO_ENGINE_ID"        ,
    809                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID"        );
    810                if (_param->_have_port_packet_id)
    811                PORT_MAP(_component ,src , "in_MEMORY_IN_PACKET_ID"            ,
    812                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_PACKET_ID"            );
    813                PORT_MAP(_component ,src , "in_MEMORY_IN_OPERATION"            ,
    814                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OPERATION"            );
    815                PORT_MAP(_component ,src , "in_MEMORY_IN_TYPE"                 ,
    816                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_TYPE"                 );
    817                PORT_MAP(_component ,src , "in_MEMORY_IN_STORE_QUEUE_PTR_WRITE",
    818                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_STORE_QUEUE_PTR_WRITE");
    819                if (_param->_have_port_load_queue_ptr)
    820                PORT_MAP(_component ,src , "in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE" ,
    821                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" );
    822                PORT_MAP(_component ,src , "in_MEMORY_IN_HAS_IMMEDIAT"         ,
    823                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_HAS_IMMEDIAT"         );
    824                PORT_MAP(_component ,src , "in_MEMORY_IN_IMMEDIAT"             ,
    825                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_IMMEDIAT"             );
    826                PORT_MAP(_component ,src , "in_MEMORY_IN_DATA_RA"              ,
    827                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RA"              );
    828                PORT_MAP(_component ,src , "in_MEMORY_IN_DATA_RB"              ,
    829                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RB"              );
    830                PORT_MAP(_component ,src , "in_MEMORY_IN_DATA_RC"              ,
    831                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RC"              );
    832                PORT_MAP(_component ,src , "in_MEMORY_IN_WRITE_RD"             ,
    833                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RD"             );
    834                PORT_MAP(_component ,src , "in_MEMORY_IN_NUM_REG_RD"           ,
    835                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RD"           );
    836                PORT_MAP(_component ,src , "in_MEMORY_IN_WRITE_RE"             ,
    837                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RE"             );
    838                PORT_MAP(_component ,src , "in_MEMORY_IN_NUM_REG_RE"           ,
    839                                     dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RE"           );
    840              }
     895             for (uint32_t j=0; j<_param->_nb_inst_memory [x]; j++)
     896               {
     897                 dest = _name+"_read_unit_to_execution_unit";
     898                 
     899#ifdef POSITION
     900                 _component->interface_map (src ,"memory_in_"+toString(j),
     901                                            dest,"execute_unit_in_"+toString(i)+"_"+toString(j));
     902#endif
     903
     904                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_VAL"                  ,
     905                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_VAL"                  );
     906                 COMPONENT_MAP(_component ,src ,"out_MEMORY_IN_"+toString(j)+"_ACK"                  ,
     907                                           dest, "in_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_ACK"                  );
     908                 if (_param->_have_port_context_id)
     909                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_CONTEXT_ID"           ,
     910                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"           );
     911                 if (_param->_have_port_front_end_id)
     912                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_FRONT_END_ID"         ,
     913                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID"         );
     914                 if (_param->_have_port_ooo_engine_id)
     915                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_OOO_ENGINE_ID"        ,
     916                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_OOO_ENGINE_ID"        );
     917                 if (_param->_have_port_rob_ptr  )
     918                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_PACKET_ID"            ,
     919                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_PACKET_ID"            );
     920                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_OPERATION"            ,
     921                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_OPERATION"            );
     922                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_TYPE"                 ,
     923                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_TYPE"                 );
     924                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_STORE_QUEUE_PTR_WRITE",
     925                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_STORE_QUEUE_PTR_WRITE");
     926                 if (_param->_have_port_load_queue_ptr)
     927                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_LOAD_QUEUE_PTR_WRITE" ,
     928                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_LOAD_QUEUE_PTR_WRITE" );
     929                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_HAS_IMMEDIAT"         ,
     930                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_HAS_IMMEDIAT"         );
     931                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_IMMEDIAT"             ,
     932                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_IMMEDIAT"             );
     933                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_DATA_RA"              ,
     934                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_DATA_RA"              );
     935                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_DATA_RB"              ,
     936                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_DATA_RB"              );
     937                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_DATA_RC"              ,
     938                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_DATA_RC"              );
     939                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_WRITE_RD"             ,
     940                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RD"             );
     941                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_NUM_REG_RD"           ,
     942                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD"           );
     943                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_WRITE_RE"             ,
     944                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RE"             );
     945                 COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_NUM_REG_RE"           ,
     946                                           dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE"           );
     947               }
    841948
    842949             // ~~~~~[ Interface "memory_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    843              {
     950             for (uint32_t j=0; j<_param->_nb_inst_memory [x]; j++)
     951               {
    844952               dest = _name+"_execution_unit_to_write_unit";
    845953               
    846954#ifdef POSITION
    847                _component->interface_map (src ,"memory_out",
    848                                           dest,"execute_unit_out_"+toString(i));
    849 #endif
    850 
    851                PORT_MAP(_component ,src ,"out_MEMORY_OUT_VAL"          ,
    852                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_VAL"          );
    853                PORT_MAP(_component ,src , "in_MEMORY_OUT_ACK"          ,
    854                                     dest,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_ACK"          );
     955               _component->interface_map (src ,"memory_out_"+toString(j)
     956                                          dest,"execute_unit_out_"+toString(i)+"_"+toString(j));
     957#endif
     958
     959               COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_VAL"          ,
     960                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_VAL"          );
     961               COMPONENT_MAP(_component ,src , "in_MEMORY_OUT_"+toString(j)+"_ACK"          ,
     962                                         dest,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_ACK"          );
    855963               if (_param->_have_port_context_id)
    856                PORT_MAP(_component ,src ,"out_MEMORY_OUT_CONTEXT_ID"   ,
    857                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_CONTEXT_ID"   );
     964               COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_CONTEXT_ID"   ,
     965                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"   );
    858966               if (_param->_have_port_front_end_id)
    859                PORT_MAP(_component ,src ,"out_MEMORY_OUT_FRONT_END_ID" ,
    860                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_FRONT_END_ID" );
     967               COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_FRONT_END_ID" ,
     968                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID" );
    861969               if (_param->_have_port_ooo_engine_id)
    862                PORT_MAP(_component ,src ,"out_MEMORY_OUT_OOO_ENGINE_ID",
    863                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OOO_ENGINE_ID");
    864                if (_param->_have_port_packet_id)
    865                PORT_MAP(_component ,src ,"out_MEMORY_OUT_PACKET_ID"    ,
    866                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_PACKET_ID"    );
    867 //             PORT_MAP(_component ,src ,"out_MEMORY_OUT_OPERATION"    ,
    868 //                                  dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OPERATION"    );
    869                PORT_MAP(_component ,src ,"out_MEMORY_OUT_TYPE"         ,
    870                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_TYPE"         );
    871                PORT_MAP(_component ,src ,"out_MEMORY_OUT_WRITE_RD"     ,
    872                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RD"     );
    873                PORT_MAP(_component ,src ,"out_MEMORY_OUT_NUM_REG_RD"   ,
    874                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RD"   );
    875                PORT_MAP(_component ,src ,"out_MEMORY_OUT_DATA_RD"      ,
    876                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RD"      );
    877                PORT_MAP(_component ,src ,"out_MEMORY_OUT_WRITE_RE"     ,
    878                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RE"     );
    879                PORT_MAP(_component ,src ,"out_MEMORY_OUT_NUM_REG_RE"   ,
    880                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RE"   );
    881                PORT_MAP(_component ,src ,"out_MEMORY_OUT_DATA_RE"      ,
    882                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RE"      );
    883                PORT_MAP(_component ,src ,"out_MEMORY_OUT_EXCEPTION"    ,
    884                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_EXCEPTION"    );
    885                PORT_MAP(_component ,src ,"out_MEMORY_OUT_NO_SEQUENCE"  ,
    886                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NO_SEQUENCE"  );
    887                PORT_MAP(_component ,src ,"out_MEMORY_OUT_ADDRESS"      ,
    888                                     dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_ADDRESS"      );
     970               COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_OOO_ENGINE_ID",
     971                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_OOO_ENGINE_ID");
     972               if (_param->_have_port_rob_ptr  )
     973               COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_PACKET_ID"    ,
     974                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_PACKET_ID"    );
     975//             COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_OPERATION"    ,
     976//                                       dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_OPERATION"    );
     977               COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_TYPE"         ,
     978                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_TYPE"         );
     979               COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_WRITE_RD"     ,
     980                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_WRITE_RD"     );
     981               COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_NUM_REG_RD"   ,
     982                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD"   );
     983               COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_DATA_RD"      ,
     984                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_DATA_RD"      );
     985               COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_WRITE_RE"     ,
     986                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_WRITE_RE"     );
     987               COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_NUM_REG_RE"   ,
     988                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE"   );
     989               COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_DATA_RE"      ,
     990                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_DATA_RE"      );
     991               COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_EXCEPTION"    ,
     992                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_EXCEPTION"    );
     993               COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_NO_SEQUENCE"  ,
     994                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_NO_SEQUENCE"  );
     995               COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_ADDRESS"      ,
     996                                         dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_ADDRESS"      );
    889997             }
    890 
     998             
    891999             // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1000             for (uint32_t j=0; j<_param->_nb_cache_port [x]; j++)
    8921001             {
    8931002               dest = _name;
    8941003               
    8951004#ifdef POSITION
    896                _component->interface_map (src ,"dcache_req",
    897                                           dest,"dcache_req_"+toString(i));
    898 #endif
    899                PORT_MAP(_component ,src ,"out_DCACHE_REQ_VAL"       ,dest,"out_DCACHE_REQ_"+toString(i)+"_VAL"       );
    900                PORT_MAP(_component ,src , "in_DCACHE_REQ_ACK"       ,dest, "in_DCACHE_REQ_"+toString(i)+"_ACK"       );
     1005               _component->interface_map (src ,"dcache_req_"+toString(j),
     1006                                          dest,"dcache_req_"+toString(x)+"_"+toString(j));
     1007#endif
     1008               PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_VAL"       ,dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_VAL"       );
     1009               PORT_MAP(_component ,src , "in_DCACHE_REQ_"+toString(j)+"_ACK"       ,dest, "in_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_ACK"       );
    9011010               if (_param->_have_port_dcache_context_id)
    902                PORT_MAP(_component ,src ,"out_DCACHE_REQ_CONTEXT_ID",dest,"out_DCACHE_REQ_"+toString(i)+"_CONTEXT_ID");
    903                PORT_MAP(_component ,src ,"out_DCACHE_REQ_PACKET_ID" ,dest,"out_DCACHE_REQ_"+toString(i)+"_PACKET_ID" );
    904                PORT_MAP(_component ,src ,"out_DCACHE_REQ_ADDRESS"   ,dest,"out_DCACHE_REQ_"+toString(i)+"_ADDRESS"   );
    905                PORT_MAP(_component ,src ,"out_DCACHE_REQ_TYPE"      ,dest,"out_DCACHE_REQ_"+toString(i)+"_TYPE"      );
    906                PORT_MAP(_component ,src ,"out_DCACHE_REQ_WDATA"     ,dest,"out_DCACHE_REQ_"+toString(i)+"_WDATA"     );
     1011               PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_CONTEXT_ID",dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_CONTEXT_ID");
     1012               PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_PACKET_ID" ,dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_PACKET_ID" );
     1013               PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_ADDRESS"   ,dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_ADDRESS"   );
     1014               PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_TYPE"      ,dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_TYPE"      );
     1015               PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_WDATA"     ,dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_WDATA"     );
    9071016             }
    9081017
    9091018             // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1019             for (uint32_t j=0; j<_param->_nb_cache_port [x]; j++)
    9101020             {
    9111021               dest = _name;
    9121022               
    9131023#ifdef POSITION
    914                _component->interface_map (src ,"dcache_rsp",
    915                                           dest,"dcache_rsp_"+toString(i));
    916 #endif
    917                PORT_MAP(_component ,src , "in_DCACHE_RSP_VAL"       ,dest, "in_DCACHE_RSP_"+toString(i)+"_VAL"       );
    918                PORT_MAP(_component ,src ,"out_DCACHE_RSP_ACK"       ,dest,"out_DCACHE_RSP_"+toString(i)+"_ACK"       );
     1024               _component->interface_map (src ,"dcache_rsp_"+toString(j),
     1025                                          dest,"dcache_rsp_"+toString(x)+"_"+toString(j));
     1026#endif
     1027               PORT_MAP(_component ,src , "in_DCACHE_RSP_"+toString(j)+"_VAL"       ,dest, "in_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_VAL"       );
     1028               PORT_MAP(_component ,src ,"out_DCACHE_RSP_"+toString(j)+"_ACK"       ,dest,"out_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_ACK"       );
    9191029               if (_param->_have_port_dcache_context_id)
    920                PORT_MAP(_component ,src , "in_DCACHE_RSP_CONTEXT_ID",dest, "in_DCACHE_RSP_"+toString(i)+"_CONTEXT_ID");
    921                PORT_MAP(_component ,src , "in_DCACHE_RSP_PACKET_ID" ,dest, "in_DCACHE_RSP_"+toString(i)+"_PACKET_ID" );
    922                PORT_MAP(_component ,src , "in_DCACHE_RSP_RDATA"     ,dest, "in_DCACHE_RSP_"+toString(i)+"_RDATA"     );
    923                PORT_MAP(_component ,src , "in_DCACHE_RSP_ERROR"     ,dest, "in_DCACHE_RSP_"+toString(i)+"_ERROR"     );
     1030               PORT_MAP(_component ,src , "in_DCACHE_RSP_"+toString(j)+"_CONTEXT_ID",dest, "in_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_CONTEXT_ID");
     1031               PORT_MAP(_component ,src , "in_DCACHE_RSP_"+toString(j)+"_PACKET_ID" ,dest, "in_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_PACKET_ID" );
     1032               PORT_MAP(_component ,src , "in_DCACHE_RSP_"+toString(j)+"_RDATA"     ,dest, "in_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_RDATA"     );
     1033               PORT_MAP(_component ,src , "in_DCACHE_RSP_"+toString(j)+"_ERROR"     ,dest, "in_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_ERROR"     );
    9241034             }
    9251035
     
    9371047       {
    9381048         src = _name+"_write_unit_"+toString(i);
    939          std::cout << "Instance : " << src << std::endl;
     1049         log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    9401050         
    9411051         {
     
    9571067#endif
    9581068           
    959            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_VAL"          ,
    960                                 dest,"out_WRITE_UNIT_IN_"+toString(i)+"_VAL"          );
    961            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_ACK"          ,
    962                                 dest, "in_WRITE_UNIT_IN_"+toString(i)+"_ACK"          );
     1069           COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_VAL"          ,
     1070                                     dest,"out_WRITE_UNIT_IN_"+toString(i)+"_VAL"          );
     1071           COMPONENT_MAP(_component ,src ,"out_WRITE_UNIT_IN_ACK"          ,
     1072                                     dest, "in_WRITE_UNIT_IN_"+toString(i)+"_ACK"          );
    9631073           if (_param->_have_port_context_id)
    964            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_CONTEXT_ID"   ,
    965                                 dest,"out_WRITE_UNIT_IN_"+toString(i)+"_CONTEXT_ID"   );
     1074           COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_CONTEXT_ID"   ,
     1075                                     dest,"out_WRITE_UNIT_IN_"+toString(i)+"_CONTEXT_ID"   );
    9661076           if (_param->_have_port_front_end_id)
    967            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_FRONT_END_ID" ,
    968                                 dest,"out_WRITE_UNIT_IN_"+toString(i)+"_FRONT_END_ID" );
     1077           COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_FRONT_END_ID" ,
     1078                                     dest,"out_WRITE_UNIT_IN_"+toString(i)+"_FRONT_END_ID" );
    9691079           if (_param->_have_port_ooo_engine_id)
    970            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_OOO_ENGINE_ID",
    971                                 dest,"out_WRITE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID");
    972            if (_param->_have_port_packet_id)
    973            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_PACKET_ID"    ,
    974                                 dest,"out_WRITE_UNIT_IN_"+toString(i)+"_PACKET_ID"    );
    975 //         PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_OPERATION"    ,
    976 //                              dest,"out_WRITE_UNIT_IN_"+toString(i)+"_OPERATION"    );
    977            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_TYPE"         ,
    978                                 dest,"out_WRITE_UNIT_IN_"+toString(i)+"_TYPE"         );
    979            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_WRITE_RD"     ,
    980                                 dest,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RD"     );
    981            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_NUM_REG_RD"   ,
    982                                 dest,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RD"   );
    983            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_DATA_RD"      ,
    984                                 dest,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RD"      );
    985            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_WRITE_RE"     ,
    986                                 dest,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RE"     );
    987            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_NUM_REG_RE"   ,
    988                                 dest,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RE"   );
    989            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_DATA_RE"      ,
    990                                 dest,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RE"      );
    991            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_EXCEPTION"    ,
    992                                 dest,"out_WRITE_UNIT_IN_"+toString(i)+"_EXCEPTION"    );
    993            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_NO_SEQUENCE"  ,
    994                                 dest,"out_WRITE_UNIT_IN_"+toString(i)+"_NO_SEQUENCE"  );
    995            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_ADDRESS"      ,
    996                                 dest,"out_WRITE_UNIT_IN_"+toString(i)+"_ADDRESS"      );
     1080           COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_OOO_ENGINE_ID",
     1081                                     dest,"out_WRITE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID");
     1082           if (_param->_have_port_rob_ptr  )
     1083           COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_PACKET_ID"    ,
     1084                                     dest,"out_WRITE_UNIT_IN_"+toString(i)+"_PACKET_ID"    );
     1085//         COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_OPERATION"    ,
     1086//                                   dest,"out_WRITE_UNIT_IN_"+toString(i)+"_OPERATION"    );
     1087           COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_TYPE"         ,
     1088                                     dest,"out_WRITE_UNIT_IN_"+toString(i)+"_TYPE"         );
     1089           COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_WRITE_RD"     ,
     1090                                     dest,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RD"     );
     1091           COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_NUM_REG_RD"   ,
     1092                                     dest,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RD"   );
     1093           COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_DATA_RD"      ,
     1094                                     dest,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RD"      );
     1095           COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_WRITE_RE"     ,
     1096                                     dest,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RE"     );
     1097           COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_NUM_REG_RE"   ,
     1098                                     dest,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RE"   );
     1099           COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_DATA_RE"      ,
     1100                                     dest,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RE"      );
     1101           COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_EXCEPTION"    ,
     1102                                     dest,"out_WRITE_UNIT_IN_"+toString(i)+"_EXCEPTION"    );
     1103           COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_NO_SEQUENCE"  ,
     1104                                     dest,"out_WRITE_UNIT_IN_"+toString(i)+"_NO_SEQUENCE"  );
     1105           COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_ADDRESS"      ,
     1106                                     dest,"out_WRITE_UNIT_IN_"+toString(i)+"_ADDRESS"      );
    9971107         }
    9981108
     
    10181128           PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_OOO_ENGINE_ID",
    10191129                                dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_OOO_ENGINE_ID");
    1020            if (_param->_have_port_packet_id)
     1130           if (_param->_have_port_rob_ptr  )
    10211131           PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_PACKET_ID"    ,
    10221132                                dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_PACKET_ID"    );
     
    10331143           PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_ADDRESS"      ,
    10341144                                dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_ADDRESS"      );
     1145           PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_DATA"         ,
     1146                                dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_DATA"         );
    10351147         }
     1148
    10361149         // -----[ Interface "gpr_write" ]-------------------------------------
    10371150         {
    1038            // Port map with "read_unit" is ok!
    1039 
    1040            dest = _name+"_register_unit";
     1151           dest = _name+"_glue";
    10411152#ifdef POSITION
    10421153           _component->interface_map (src ,"gpr_write",
    1043                                       dest,"gpr_write_"+toString(i));
    1044 #endif
    1045 
    1046            PORT_MAP(_component ,src ,"out_GPR_WRITE_0_VAL"          ,
    1047                                 dest, "in_GPR_WRITE_"+toString(i)+"_VAL"          );
    1048            PORT_MAP(_component ,src , "in_GPR_WRITE_0_ACK"          ,
    1049                                 dest,"out_GPR_WRITE_"+toString(i)+"_ACK"          );
    1050            if (_param->_have_port_context_id)
    1051            PORT_MAP(_component ,src ,"out_GPR_WRITE_0_OOO_ENGINE_ID",
    1052                                 dest, "in_GPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID");
    1053            PORT_MAP(_component ,src ,"out_GPR_WRITE_0_NUM_REG"      ,
    1054                                 dest, "in_GPR_WRITE_"+toString(i)+"_NUM_REG"      );
    1055            PORT_MAP(_component ,src ,"out_GPR_WRITE_0_DATA"         ,
    1056                                 dest, "in_GPR_WRITE_"+toString(i)+"_DATA"         );
     1154                                      dest,"gpr_write_write_unit_"+toString(i));
     1155#endif
     1156
     1157           COMPONENT_MAP(_component ,src ,"out_GPR_WRITE_0_VAL"          ,
     1158                                     dest, "in_GPR_WRITE_WRITE_UNIT_"+toString(i)+"_VAL"          );
     1159           COMPONENT_MAP(_component ,src , "in_GPR_WRITE_0_ACK"          ,
     1160                                     dest,"out_GPR_WRITE_WRITE_UNIT_"+toString(i)+"_ACK"          );
     1161           if (_param->_have_port_ooo_engine_id)
     1162           COMPONENT_MAP(_component ,src ,"out_GPR_WRITE_0_OOO_ENGINE_ID",
     1163                                     dest, "in_GPR_WRITE_WRITE_UNIT_"+toString(i)+"_OOO_ENGINE_ID");
     1164           COMPONENT_MAP(_component ,src ,"out_GPR_WRITE_0_NUM_REG"      ,
     1165                                     dest, "in_GPR_WRITE_WRITE_UNIT_"+toString(i)+"_NUM_REG"      );
     1166           COMPONENT_MAP(_component ,src ,"out_GPR_WRITE_0_DATA"         ,
     1167                                     dest, "in_GPR_WRITE_WRITE_UNIT_"+toString(i)+"_DATA"         );
    10571168         }
    10581169
     
    10611172           // Port map with "read_unit" is ok!
    10621173
    1063            dest = _name+"_register_unit";
     1174           dest = _name+"_glue";
    10641175#ifdef POSITION
    10651176           _component->interface_map (src ,"spr_write",
    1066                                       dest,"spr_write_"+toString(i));
    1067 #endif
    1068 
    1069            PORT_MAP(_component ,src ,"out_SPR_WRITE_0_VAL"          ,
    1070                                 dest, "in_SPR_WRITE_"+toString(i)+"_VAL"          );
    1071            PORT_MAP(_component ,src , "in_SPR_WRITE_0_ACK"          ,
    1072                                 dest,"out_SPR_WRITE_"+toString(i)+"_ACK"          );
    1073            if (_param->_have_port_context_id)
    1074            PORT_MAP(_component ,src ,"out_SPR_WRITE_0_OOO_ENGINE_ID",
    1075                                 dest, "in_SPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID");
    1076            PORT_MAP(_component ,src ,"out_SPR_WRITE_0_NUM_REG"      ,
    1077                                 dest, "in_SPR_WRITE_"+toString(i)+"_NUM_REG"      );
    1078            PORT_MAP(_component ,src ,"out_SPR_WRITE_0_DATA"         ,
    1079                                 dest, "in_SPR_WRITE_"+toString(i)+"_DATA"         );
     1177                                      dest,"spr_write_write_unit_"+toString(i));
     1178#endif
     1179
     1180           COMPONENT_MAP(_component ,src ,"out_SPR_WRITE_0_VAL"          ,
     1181                                     dest, "in_SPR_WRITE_WRITE_UNIT_"+toString(i)+"_VAL"          );
     1182           COMPONENT_MAP(_component ,src , "in_SPR_WRITE_0_ACK"          ,
     1183                                     dest,"out_SPR_WRITE_WRITE_UNIT_"+toString(i)+"_ACK"          );
     1184           if (_param->_have_port_ooo_engine_id)
     1185           COMPONENT_MAP(_component ,src ,"out_SPR_WRITE_0_OOO_ENGINE_ID",
     1186                                     dest, "in_SPR_WRITE_WRITE_UNIT_"+toString(i)+"_OOO_ENGINE_ID");
     1187           COMPONENT_MAP(_component ,src ,"out_SPR_WRITE_0_NUM_REG"      ,
     1188                                     dest, "in_SPR_WRITE_WRITE_UNIT_"+toString(i)+"_NUM_REG"      );
     1189           COMPONENT_MAP(_component ,src ,"out_SPR_WRITE_0_DATA"         ,
     1190                                     dest, "in_SPR_WRITE_WRITE_UNIT_"+toString(i)+"_DATA"         );
    10801191         }
    10811192
     
    10911202     {
    10921203       src = _name+"_register_unit";
    1093        std::cout << "Instance : " << src << std::endl;
     1204       log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    10941205       
    10951206       {
     
    11141225#endif
    11151226       
    1116          PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i  )+"_VAL"          ,dest,"out_GPR_READ_0_VAL"          );
    1117          PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i  )+"_ACK"          ,dest, "in_GPR_READ_0_ACK"          );
    1118          if (_param->_have_port_context_id)
    1119          PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i  )+"_OOO_ENGINE_ID",dest,"out_GPR_READ_0_OOO_ENGINE_ID");
    1120          PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i  )+"_NUM_REG"      ,dest,"out_GPR_READ_0_NUM_REG"      );
    1121          PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i  )+"_DATA"         ,dest, "in_GPR_READ_0_DATA"         );
    1122          PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i  )+"_DATA_VAL"     ,dest, "in_GPR_READ_0_DATA_VAL"     );
    1123 
    1124          PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i+1)+"_VAL"          ,dest,"out_GPR_READ_1_VAL"          );
    1125          PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i+1)+"_ACK"          ,dest, "in_GPR_READ_1_ACK"          );
    1126          if (_param->_have_port_context_id)
    1127          PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i+1)+"_OOO_ENGINE_ID",dest,"out_GPR_READ_1_OOO_ENGINE_ID");
    1128          PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i+1)+"_NUM_REG"      ,dest,"out_GPR_READ_1_NUM_REG"      );
    1129          PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i+1)+"_DATA"         ,dest, "in_GPR_READ_1_DATA"         );
    1130          PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i+1)+"_DATA_VAL"     ,dest, "in_GPR_READ_1_DATA_VAL"     );
     1227//       PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i  )+"_VAL"          ,dest,"out_GPR_READ_0_VAL"          );
     1228//       PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i  )+"_ACK"          ,dest, "in_GPR_READ_0_ACK"          );
     1229//       if (_param->_have_port_context_id)
     1230//       PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i  )+"_OOO_ENGINE_ID",dest,"out_GPR_READ_0_OOO_ENGINE_ID");
     1231//       PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i  )+"_NUM_REG"      ,dest,"out_GPR_READ_0_NUM_REG"      );
     1232//       PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i  )+"_DATA"         ,dest, "in_GPR_READ_0_DATA"         );
     1233//       PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i  )+"_DATA_VAL"     ,dest, "in_GPR_READ_0_DATA_VAL"     );
     1234
     1235//       PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i+1)+"_VAL"          ,dest,"out_GPR_READ_1_VAL"          );
     1236//       PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i+1)+"_ACK"          ,dest, "in_GPR_READ_1_ACK"          );
     1237//       if (_param->_have_port_context_id)
     1238//       PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i+1)+"_OOO_ENGINE_ID",dest,"out_GPR_READ_1_OOO_ENGINE_ID");
     1239//       PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i+1)+"_NUM_REG"      ,dest,"out_GPR_READ_1_NUM_REG"      );
     1240//       PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i+1)+"_DATA"         ,dest, "in_GPR_READ_1_DATA"         );
     1241//       PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i+1)+"_DATA_VAL"     ,dest, "in_GPR_READ_1_DATA_VAL"     );
    11311242         }
    11321243
     
    11341245       for (uint32_t i=0; i<_param->_nb_write_unit; i++)
    11351246         {
    1136            dest = _name+"_write_unit_"+toString(i);
    1137 #ifdef POSITION
    1138            _component->interface_map (src ,"gpr_write_"+toString(i)
    1139                                       dest,"gpr_write_0");
    1140 #endif
    1141        
    1142            PORT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_VAL"          ,dest,"out_GPR_WRITE_0_VAL"          );
    1143            PORT_MAP(_component ,src ,"out_GPR_WRITE_"+toString(i)+"_ACK"          ,dest, "in_GPR_WRITE_0_ACK"          );
    1144            if (_param->_have_port_context_id)
    1145            PORT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",dest,"out_GPR_WRITE_0_OOO_ENGINE_ID");
    1146            PORT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_NUM_REG"      ,dest,"out_GPR_WRITE_0_NUM_REG"      );
    1147            PORT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_DATA"         ,dest,"out_GPR_WRITE_0_DATA"         );
     1247           dest = _name+"_glue";
     1248#ifdef POSITION
     1249           _component->interface_map (src ,"gpr_write_"+toString(i),
     1250                                      dest,"gpr_write_register_file_"+toString(i));
     1251#endif
     1252       
     1253           COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_VAL"          ,dest,"out_GPR_WRITE_REGISTER_FILE_"+toString(i)+"_VAL"          );
     1254           COMPONENT_MAP(_component ,src ,"out_GPR_WRITE_"+toString(i)+"_ACK"          ,dest, "in_GPR_WRITE_REGISTER_FILE_"+toString(i)+"_ACK"          );
     1255           if (_param->_have_port_ooo_engine_id)
     1256           COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",dest,"out_GPR_WRITE_REGISTER_FILE_"+toString(i)+"_OOO_ENGINE_ID");
     1257           COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_NUM_REG"      ,dest,"out_GPR_WRITE_REGISTER_FILE_"+toString(i)+"_NUM_REG"      );
     1258           COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_DATA"         ,dest,"out_GPR_WRITE_REGISTER_FILE_"+toString(i)+"_DATA"         );
    11481259         }
    11491260
     
    11571268#endif
    11581269       
    1159            PORT_MAP(_component ,src , "in_SPR_READ_"+toString(i)+"_VAL"          ,dest,"out_SPR_READ_0_VAL"          );
    1160            PORT_MAP(_component ,src ,"out_SPR_READ_"+toString(i)+"_ACK"          ,dest, "in_SPR_READ_0_ACK"          );
    1161            if (_param->_have_port_context_id)
    1162            PORT_MAP(_component ,src , "in_SPR_READ_"+toString(i)+"_OOO_ENGINE_ID",dest,"out_SPR_READ_0_OOO_ENGINE_ID");
    1163            PORT_MAP(_component ,src , "in_SPR_READ_"+toString(i)+"_NUM_REG"      ,dest,"out_SPR_READ_0_NUM_REG"      );
    1164            PORT_MAP(_component ,src ,"out_SPR_READ_"+toString(i)+"_DATA"         ,dest, "in_SPR_READ_0_DATA"         );
    1165            PORT_MAP(_component ,src ,"out_SPR_READ_"+toString(i)+"_DATA_VAL"     ,dest, "in_SPR_READ_0_DATA_VAL"     );
     1270//         PORT_MAP(_component ,src , "in_SPR_READ_"+toString(i)+"_VAL"          ,dest,"out_SPR_READ_0_VAL"          );
     1271//         PORT_MAP(_component ,src ,"out_SPR_READ_"+toString(i)+"_ACK"          ,dest, "in_SPR_READ_0_ACK"          );
     1272//         if (_param->_have_port_context_id)
     1273//         PORT_MAP(_component ,src , "in_SPR_READ_"+toString(i)+"_OOO_ENGINE_ID",dest,"out_SPR_READ_0_OOO_ENGINE_ID");
     1274//         PORT_MAP(_component ,src , "in_SPR_READ_"+toString(i)+"_NUM_REG"      ,dest,"out_SPR_READ_0_NUM_REG"      );
     1275//         PORT_MAP(_component ,src ,"out_SPR_READ_"+toString(i)+"_DATA"         ,dest, "in_SPR_READ_0_DATA"         );
     1276//         PORT_MAP(_component ,src ,"out_SPR_READ_"+toString(i)+"_DATA_VAL"     ,dest, "in_SPR_READ_0_DATA_VAL"     );
    11661277         }
    11671278
     
    11691280       for (uint32_t i=0; i<_param->_nb_write_unit; i++)
    11701281         {
    1171            dest = _name+"_write_unit_"+toString(i);
    1172 #ifdef POSITION
    1173            _component->interface_map (src ,"spr_write_"+toString(i)
    1174                                       dest,"spr_write_0");
    1175 #endif
    1176        
    1177            PORT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_VAL"          ,dest,"out_SPR_WRITE_0_VAL"          );
    1178            PORT_MAP(_component ,src ,"out_SPR_WRITE_"+toString(i)+"_ACK"          ,dest, "in_SPR_WRITE_0_ACK"          );
    1179            if (_param->_have_port_context_id)
    1180            PORT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",dest,"out_SPR_WRITE_0_OOO_ENGINE_ID");
    1181            PORT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_NUM_REG"      ,dest,"out_SPR_WRITE_0_NUM_REG"      );
    1182            PORT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_DATA"         ,dest,"out_SPR_WRITE_0_DATA"         );
     1282           dest = _name+"_glue";
     1283#ifdef POSITION
     1284           _component->interface_map (src ,"spr_write_"+toString(i),
     1285                                      dest,"spr_write_register_file_"+toString(i));
     1286#endif
     1287       
     1288           COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_VAL"          ,dest,"out_SPR_WRITE_REGISTER_FILE_"+toString(i)+"_VAL"          );
     1289           COMPONENT_MAP(_component ,src ,"out_SPR_WRITE_"+toString(i)+"_ACK"          ,dest, "in_SPR_WRITE_REGISTER_FILE_"+toString(i)+"_ACK"          );
     1290           if (_param->_have_port_ooo_engine_id)
     1291           COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",dest,"out_SPR_WRITE_REGISTER_FILE_"+toString(i)+"_OOO_ENGINE_ID");
     1292           COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_NUM_REG"      ,dest,"out_SPR_WRITE_REGISTER_FILE_"+toString(i)+"_NUM_REG"      );
     1293           COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_DATA"         ,dest,"out_SPR_WRITE_REGISTER_FILE_"+toString(i)+"_DATA"         );
    11831294         }
    11841295   
     
    12111322         }
    12121323
    1213        // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1214        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    1215          {
    1216            uint32_t x=_param->_nb_inst_retire_rob [i];
     1324//        // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     1325//        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
     1326//       {
     1327//         uint32_t x=_param->_nb_inst_retire_rob [i];
    12171328           
    1218            for (uint32_t j=0; j<x; j++)
    1219              {
    1220                dest = _name;
    1221 #ifdef POSITION
    1222                _component->interface_map (src ,"retire_rob_"+toString(i)+"_"+toString(j),
    1223                                           dest,"retire_rob_"+toString(i)+"_"+toString(j));
    1224 #endif
    1225 
    1226                PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL"           ,
    1227                                     dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL"           );
    1228                PORT_MAP(_component ,src ,"out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK"           ,
    1229                                     dest,"out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK"           );
    1230                PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE"    ,
    1231                                     dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE"    );
    1232                PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG",
    1233                                     dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG");
    1234                PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE"    ,
    1235                                     dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE"    );
    1236                PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG",
    1237                                     dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG");
    1238                PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE"    ,
    1239                                     dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE"    );
    1240                PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG",
    1241                                     dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG");
    1242                PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE"    ,
    1243                                     dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE"    );
    1244                PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG",
    1245                                     dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG");
    1246              }
    1247          }
     1329//         for (uint32_t j=0; j<x; j++)
     1330//           {
     1331//             dest = _name;
     1332// #ifdef POSITION
     1333//             _component->interface_map (src ,"retire_rob_"+toString(i)+"_"+toString(j),
     1334//                                        dest,"retire_rob_"+toString(i)+"_"+toString(j));
     1335// #endif
     1336
     1337//             PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL"           ,
     1338//                                  dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL"           );
     1339//             PORT_MAP(_component ,src ,"out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK"           ,
     1340//                                  dest,"out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK"           );
     1341//             PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE"    ,
     1342//                                  dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE"    );
     1343//             PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG",
     1344//                                  dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG");
     1345//             PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE"    ,
     1346//                                  dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE"    );
     1347//             PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG",
     1348//                                  dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG");
     1349//             PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE"    ,
     1350//                                  dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE"    );
     1351//             PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG",
     1352//                                  dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG");
     1353//             PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE"    ,
     1354//                                  dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE"    );
     1355//             PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG",
     1356//                                  dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG");
     1357//           }
     1358//       }
    12481359     }
    12491360
     
    12531364     {
    12541365       src = _name+"_read_unit_to_execution_unit";
    1255        std::cout << "Instance : " << src << std::endl;
     1366       log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    12561367       
    12571368       {
     
    12771388#endif
    12781389             
    1279              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_VAL"                  ,
    1280                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_VAL"                  );
    1281              PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_ACK"                  ,
    1282                                   dest, "in_READ_UNIT_OUT_"+toString(j               )+"_ACK"                  );
    1283              if (_param->_have_port_context_id)
    1284              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_CONTEXT_ID"           ,
    1285                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_CONTEXT_ID"           );
    1286              if (_param->_have_port_front_end_id)
    1287              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_FRONT_END_ID"         ,
    1288                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_FRONT_END_ID"         );
    1289              if (_param->_have_port_ooo_engine_id)
    1290              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_OOO_ENGINE_ID"        ,
    1291                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_OOO_ENGINE_ID"        );
    1292              if (_param->_have_port_packet_id)
    1293              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_PACKET_ID"            ,
    1294                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_PACKET_ID"            );
    1295              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_OPERATION"            ,
    1296                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_OPERATION"            );
    1297              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_TYPE"                 ,
    1298                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_TYPE"                 );
    1299              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_STORE_QUEUE_PTR_WRITE",
    1300                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_STORE_QUEUE_PTR_WRITE");
    1301              if (_param->_have_port_load_queue_ptr)
    1302              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_LOAD_QUEUE_PTR_WRITE" ,
    1303                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_LOAD_QUEUE_PTR_WRITE" );
    1304              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_HAS_IMMEDIAT"         ,
    1305                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_HAS_IMMEDIAT"         );
    1306              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_IMMEDIAT"             ,
    1307                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_IMMEDIAT"             );
    1308              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_DATA_RA"              ,
    1309                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_DATA_RA"              );
    1310              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_DATA_RB"              ,
    1311                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_DATA_RB"              );
    1312              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_DATA_RC"              ,
    1313                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_DATA_RC"              );
    1314              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_WRITE_RD"             ,
    1315                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_WRITE_RD"             );
    1316              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_NUM_REG_RD"           ,
    1317                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_NUM_REG_RD"           );
    1318              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_WRITE_RE"             ,
    1319                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_WRITE_RE"             );
    1320              PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_NUM_REG_RE"           ,
    1321                                   dest,"out_READ_UNIT_OUT_"+toString(j               )+"_NUM_REG_RE"           );
     1390//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_VAL"                  ,
     1391//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_VAL"                  );
     1392//           PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_ACK"                  ,
     1393//                                dest, "in_READ_UNIT_OUT_"+toString(j               )+"_ACK"                  );
     1394//           if (_param->_have_port_context_id)
     1395//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_CONTEXT_ID"           ,
     1396//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_CONTEXT_ID"           );
     1397//           if (_param->_have_port_front_end_id)
     1398//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_FRONT_END_ID"         ,
     1399//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_FRONT_END_ID"         );
     1400//           if (_param->_have_port_ooo_engine_id)
     1401//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_OOO_ENGINE_ID"        ,
     1402//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_OOO_ENGINE_ID"        );
     1403//           if (_param->_have_port_rob_ptr  )
     1404//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_PACKET_ID"            ,
     1405//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_PACKET_ID"            );
     1406//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_OPERATION"            ,
     1407//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_OPERATION"            );
     1408//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_TYPE"                 ,
     1409//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_TYPE"                 );
     1410//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_STORE_QUEUE_PTR_WRITE",
     1411//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_STORE_QUEUE_PTR_WRITE");
     1412//           if (_param->_have_port_load_queue_ptr)
     1413//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_LOAD_QUEUE_PTR_WRITE" ,
     1414//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_LOAD_QUEUE_PTR_WRITE" );
     1415//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_HAS_IMMEDIAT"         ,
     1416//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_HAS_IMMEDIAT"         );
     1417//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_IMMEDIAT"             ,
     1418//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_IMMEDIAT"             );
     1419//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_DATA_RA"              ,
     1420//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_DATA_RA"              );
     1421//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_DATA_RB"              ,
     1422//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_DATA_RB"              );
     1423//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_DATA_RC"              ,
     1424//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_DATA_RC"              );
     1425//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_WRITE_RD"             ,
     1426//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_WRITE_RD"             );
     1427//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_NUM_REG_RD"           ,
     1428//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_NUM_REG_RD"           );
     1429//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_WRITE_RE"             ,
     1430//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_WRITE_RE"             );
     1431//           PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_NUM_REG_RE"           ,
     1432//                                dest,"out_READ_UNIT_OUT_"+toString(j               )+"_NUM_REG_RE"           );
    13221433             
    13231434             it_read_unit_out ++;
     
    13381449#endif
    13391450               
    1340                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_VAL"                  ,
    1341                                     dest, "in_EXECUTE_IN_VAL"                  );
    1342                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_IN_"+toString(i)+"_ACK"                  ,
    1343                                     dest,"out_EXECUTE_IN_ACK"                  );
    1344                if (_param->_have_port_context_id)
    1345                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_CONTEXT_ID"           ,
    1346                                     dest, "in_EXECUTE_IN_CONTEXT_ID"           );
    1347                if (_param->_have_port_front_end_id)
    1348                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_FRONT_END_ID"         ,
    1349                                     dest, "in_EXECUTE_IN_FRONT_END_ID"         );
    1350                if (_param->_have_port_ooo_engine_id)
    1351                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID"        ,
    1352                                     dest, "in_EXECUTE_IN_OOO_ENGINE_ID"        );
    1353                if (_param->_have_port_packet_id)
    1354                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_PACKET_ID"            ,
    1355                                     dest, "in_EXECUTE_IN_PACKET_ID"            );
    1356                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OPERATION"            ,
    1357                                     dest, "in_EXECUTE_IN_OPERATION"            );
    1358                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_TYPE"                 ,
    1359                                     dest, "in_EXECUTE_IN_TYPE"                 );
    1360                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_STORE_QUEUE_PTR_WRITE",
    1361                                     dest, "in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE");
    1362                if (_param->_have_port_load_queue_ptr)
    1363                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ,
    1364                                     dest, "in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE" );
    1365                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_HAS_IMMEDIAT"         ,
    1366                                     dest, "in_EXECUTE_IN_HAS_IMMEDIAT"         );
    1367                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_IMMEDIAT"             ,
    1368                                     dest, "in_EXECUTE_IN_IMMEDIAT"             );
    1369                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RA"              ,
    1370                                     dest, "in_EXECUTE_IN_DATA_RA"              );
    1371                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RB"              ,
    1372                                     dest, "in_EXECUTE_IN_DATA_RB"              );
    1373                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RC"              ,
    1374                                     dest, "in_EXECUTE_IN_DATA_RC"              );
    1375                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RD"             ,
    1376                                     dest, "in_EXECUTE_IN_WRITE_RD"             );
    1377                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RD"           ,
    1378                                     dest, "in_EXECUTE_IN_NUM_REG_RD"           );
    1379                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RE"             ,
    1380                                     dest, "in_EXECUTE_IN_WRITE_RE"             );
    1381                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RE"           ,
    1382                                     dest, "in_EXECUTE_IN_NUM_REG_RE"           );
     1451//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_VAL"                  ,
     1452//                                  dest, "in_EXECUTE_IN_VAL"                  );
     1453//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_IN_"+toString(i)+"_ACK"                  ,
     1454//                                  dest,"out_EXECUTE_IN_ACK"                  );
     1455//             if (_param->_have_port_context_id)
     1456//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_CONTEXT_ID"           ,
     1457//                                  dest, "in_EXECUTE_IN_CONTEXT_ID"           );
     1458//             if (_param->_have_port_front_end_id)
     1459//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_FRONT_END_ID"         ,
     1460//                                  dest, "in_EXECUTE_IN_FRONT_END_ID"         );
     1461//             if (_param->_have_port_ooo_engine_id)
     1462//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID"        ,
     1463//                                  dest, "in_EXECUTE_IN_OOO_ENGINE_ID"        );
     1464//             if (_param->_have_port_rob_ptr  )
     1465//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_PACKET_ID"            ,
     1466//                                  dest, "in_EXECUTE_IN_PACKET_ID"            );
     1467//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OPERATION"            ,
     1468//                                  dest, "in_EXECUTE_IN_OPERATION"            );
     1469//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_TYPE"                 ,
     1470//                                  dest, "in_EXECUTE_IN_TYPE"                 );
     1471//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_STORE_QUEUE_PTR_WRITE",
     1472//                                  dest, "in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE");
     1473//             if (_param->_have_port_load_queue_ptr)
     1474//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ,
     1475//                                  dest, "in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE" );
     1476//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_HAS_IMMEDIAT"         ,
     1477//                                  dest, "in_EXECUTE_IN_HAS_IMMEDIAT"         );
     1478//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_IMMEDIAT"             ,
     1479//                                  dest, "in_EXECUTE_IN_IMMEDIAT"             );
     1480//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RA"              ,
     1481//                                  dest, "in_EXECUTE_IN_DATA_RA"              );
     1482//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RB"              ,
     1483//                                  dest, "in_EXECUTE_IN_DATA_RB"              );
     1484//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RC"              ,
     1485//                                  dest, "in_EXECUTE_IN_DATA_RC"              );
     1486//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RD"             ,
     1487//                                  dest, "in_EXECUTE_IN_WRITE_RD"             );
     1488//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RD"           ,
     1489//                                  dest, "in_EXECUTE_IN_NUM_REG_RD"           );
     1490//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RE"             ,
     1491//                                  dest, "in_EXECUTE_IN_WRITE_RE"             );
     1492//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RE"           ,
     1493//                                  dest, "in_EXECUTE_IN_NUM_REG_RE"           );
    13831494             }
    13841495           else
     
    13911502#endif
    13921503               
    1393                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_VAL"                  ,
    1394                                     dest, "in_MEMORY_IN_VAL"                  );
    1395                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_IN_"+toString(i)+"_ACK"                  ,
    1396                                     dest,"out_MEMORY_IN_ACK"                  );
    1397                if (_param->_have_port_context_id)
    1398                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_CONTEXT_ID"           ,
    1399                                     dest, "in_MEMORY_IN_CONTEXT_ID"           );
    1400                if (_param->_have_port_front_end_id)
    1401                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_FRONT_END_ID"         ,
    1402                                     dest, "in_MEMORY_IN_FRONT_END_ID"         );
    1403                if (_param->_have_port_ooo_engine_id)
    1404                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID"        ,
    1405                                     dest, "in_MEMORY_IN_OOO_ENGINE_ID"        );
    1406                if (_param->_have_port_packet_id)
    1407                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_PACKET_ID"            ,
    1408                                     dest, "in_MEMORY_IN_PACKET_ID"            );
    1409                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OPERATION"            ,
    1410                                     dest, "in_MEMORY_IN_OPERATION"            );
    1411                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_TYPE"                 ,
    1412                                     dest, "in_MEMORY_IN_TYPE"                 );
    1413                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_STORE_QUEUE_PTR_WRITE",
    1414                                     dest, "in_MEMORY_IN_STORE_QUEUE_PTR_WRITE");
    1415                if (_param->_have_port_load_queue_ptr)
    1416                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ,
    1417                                     dest, "in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE" );
    1418                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_HAS_IMMEDIAT"         ,
    1419                                     dest, "in_MEMORY_IN_HAS_IMMEDIAT"         );
    1420                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_IMMEDIAT"             ,
    1421                                     dest, "in_MEMORY_IN_IMMEDIAT"             );
    1422                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RA"              ,
    1423                                     dest, "in_MEMORY_IN_DATA_RA"              );
    1424                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RB"              ,
    1425                                     dest, "in_MEMORY_IN_DATA_RB"              );
    1426                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RC"              ,
    1427                                     dest, "in_MEMORY_IN_DATA_RC"              );
    1428                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RD"             ,
    1429                                     dest, "in_MEMORY_IN_WRITE_RD"             );
    1430                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RD"           ,
    1431                                     dest, "in_MEMORY_IN_NUM_REG_RD"           );
    1432                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RE"             ,
    1433                                     dest, "in_MEMORY_IN_WRITE_RE"             );
    1434                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RE"           ,
    1435                                     dest, "in_MEMORY_IN_NUM_REG_RE"           );
     1504//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_VAL"                  ,
     1505//                                  dest, "in_MEMORY_IN_VAL"                  );
     1506//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_IN_"+toString(i)+"_ACK"                  ,
     1507//                                  dest,"out_MEMORY_IN_ACK"                  );
     1508//             if (_param->_have_port_context_id)
     1509//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_CONTEXT_ID"           ,
     1510//                                  dest, "in_MEMORY_IN_CONTEXT_ID"           );
     1511//             if (_param->_have_port_front_end_id)
     1512//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_FRONT_END_ID"         ,
     1513//                                  dest, "in_MEMORY_IN_FRONT_END_ID"         );
     1514//             if (_param->_have_port_ooo_engine_id)
     1515//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID"        ,
     1516//                                  dest, "in_MEMORY_IN_OOO_ENGINE_ID"        );
     1517//             if (_param->_have_port_rob_ptr  )
     1518//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_PACKET_ID"            ,
     1519//                                  dest, "in_MEMORY_IN_PACKET_ID"            );
     1520//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OPERATION"            ,
     1521//                                  dest, "in_MEMORY_IN_OPERATION"            );
     1522//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_TYPE"                 ,
     1523//                                  dest, "in_MEMORY_IN_TYPE"                 );
     1524//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_STORE_QUEUE_PTR_WRITE",
     1525//                                  dest, "in_MEMORY_IN_STORE_QUEUE_PTR_WRITE");
     1526//             if (_param->_have_port_load_queue_ptr)
     1527//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ,
     1528//                                  dest, "in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE" );
     1529//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_HAS_IMMEDIAT"         ,
     1530//                                  dest, "in_MEMORY_IN_HAS_IMMEDIAT"         );
     1531//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_IMMEDIAT"             ,
     1532//                                  dest, "in_MEMORY_IN_IMMEDIAT"             );
     1533//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RA"              ,
     1534//                                  dest, "in_MEMORY_IN_DATA_RA"              );
     1535//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RB"              ,
     1536//                                  dest, "in_MEMORY_IN_DATA_RB"              );
     1537//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RC"              ,
     1538//                                  dest, "in_MEMORY_IN_DATA_RC"              );
     1539//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RD"             ,
     1540//                                  dest, "in_MEMORY_IN_WRITE_RD"             );
     1541//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RD"           ,
     1542//                                  dest, "in_MEMORY_IN_NUM_REG_RD"           );
     1543//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RE"             ,
     1544//                                  dest, "in_MEMORY_IN_WRITE_RE"             );
     1545//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RE"           ,
     1546//                                  dest, "in_MEMORY_IN_NUM_REG_RE"           );
    14361547             }
    14371548         }
     
    14431554     {
    14441555       src = _name+"_execution_unit_to_write_unit";
    1445        std::cout << "Instance : " << src << std::endl;
     1556       log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    14461557
    14471558       {
     
    14681579                                          dest,"execute_out");
    14691580#endif
    1470                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_VAL"          ,
    1471                                     dest,"out_EXECUTE_OUT_VAL"          );
    1472                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_ACK"          ,
    1473                                     dest, "in_EXECUTE_OUT_ACK"          );
    1474                if (_param->_have_port_context_id)
    1475                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_CONTEXT_ID"   ,
    1476                                     dest,"out_EXECUTE_OUT_CONTEXT_ID"   );
    1477                if (_param->_have_port_front_end_id)
    1478                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_FRONT_END_ID" ,
    1479                                     dest,"out_EXECUTE_OUT_FRONT_END_ID" );
    1480                if (_param->_have_port_ooo_engine_id)
    1481                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OOO_ENGINE_ID",
    1482                                     dest,"out_EXECUTE_OUT_OOO_ENGINE_ID");
    1483                if (_param->_have_port_packet_id)
    1484                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_PACKET_ID"    ,
    1485                                     dest,"out_EXECUTE_OUT_PACKET_ID"    );
    1486 //             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OPERATION"    ,
    1487 //                                  dest,"out_EXECUTE_OUT_OPERATION"    );
    1488                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_TYPE"         ,
    1489                                     dest,"out_EXECUTE_OUT_TYPE"         );
    1490                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RD"     ,
    1491                                     dest,"out_EXECUTE_OUT_WRITE_RD"     );
    1492                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RD"   ,
    1493                                     dest,"out_EXECUTE_OUT_NUM_REG_RD"   );
    1494                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RD"      ,
    1495                                     dest,"out_EXECUTE_OUT_DATA_RD"      );
    1496                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RE"     ,
    1497                                     dest,"out_EXECUTE_OUT_WRITE_RE"     );
    1498                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RE"   ,
    1499                                     dest,"out_EXECUTE_OUT_NUM_REG_RE"   );
    1500                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RE"      ,
    1501                                     dest,"out_EXECUTE_OUT_DATA_RE"      );
    1502                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_EXCEPTION"    ,
    1503                                     dest,"out_EXECUTE_OUT_EXCEPTION"    );
    1504                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NO_SEQUENCE"  ,
    1505                                     dest,"out_EXECUTE_OUT_NO_SEQUENCE"  );
    1506                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_ADDRESS"      ,
    1507                                     dest,"out_EXECUTE_OUT_ADDRESS"      );
     1581//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_VAL"          ,
     1582//                                  dest,"out_EXECUTE_OUT_VAL"          );
     1583//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_ACK"          ,
     1584//                                  dest, "in_EXECUTE_OUT_ACK"          );
     1585//             if (_param->_have_port_context_id)
     1586//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_CONTEXT_ID"   ,
     1587//                                  dest,"out_EXECUTE_OUT_CONTEXT_ID"   );
     1588//             if (_param->_have_port_front_end_id)
     1589//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_FRONT_END_ID" ,
     1590//                                  dest,"out_EXECUTE_OUT_FRONT_END_ID" );
     1591//             if (_param->_have_port_ooo_engine_id)
     1592//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OOO_ENGINE_ID",
     1593//                                  dest,"out_EXECUTE_OUT_OOO_ENGINE_ID");
     1594//             if (_param->_have_port_rob_ptr  )
     1595//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_PACKET_ID"    ,
     1596//                                  dest,"out_EXECUTE_OUT_PACKET_ID"    );
     1597// //          PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OPERATION"    ,
     1598// //                               dest,"out_EXECUTE_OUT_OPERATION"    );
     1599//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_TYPE"         ,
     1600//                                  dest,"out_EXECUTE_OUT_TYPE"         );
     1601//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RD"     ,
     1602//                                  dest,"out_EXECUTE_OUT_WRITE_RD"     );
     1603//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RD"   ,
     1604//                                  dest,"out_EXECUTE_OUT_NUM_REG_RD"   );
     1605//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RD"      ,
     1606//                                  dest,"out_EXECUTE_OUT_DATA_RD"      );
     1607//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RE"     ,
     1608//                                  dest,"out_EXECUTE_OUT_WRITE_RE"     );
     1609//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RE"   ,
     1610//                                  dest,"out_EXECUTE_OUT_NUM_REG_RE"   );
     1611//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RE"      ,
     1612//                                  dest,"out_EXECUTE_OUT_DATA_RE"      );
     1613//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_EXCEPTION"    ,
     1614//                                  dest,"out_EXECUTE_OUT_EXCEPTION"    );
     1615//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NO_SEQUENCE"  ,
     1616//                                  dest,"out_EXECUTE_OUT_NO_SEQUENCE"  );
     1617//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_ADDRESS"      ,
     1618//                                  dest,"out_EXECUTE_OUT_ADDRESS"      );
    15081619             }
    15091620           else
     
    15151626                                          dest,"memory_out");
    15161627#endif
    1517                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_VAL"          ,
    1518                                     dest,"out_MEMORY_OUT_VAL"          );
    1519                PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_ACK"          ,
    1520                                     dest, "in_MEMORY_OUT_ACK"          );
    1521                if (_param->_have_port_context_id)
    1522                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_CONTEXT_ID"   ,
    1523                                     dest,"out_MEMORY_OUT_CONTEXT_ID"   );
    1524                if (_param->_have_port_front_end_id)
    1525                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_FRONT_END_ID" ,
    1526                                     dest,"out_MEMORY_OUT_FRONT_END_ID" );
    1527                if (_param->_have_port_ooo_engine_id)
    1528                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OOO_ENGINE_ID",
    1529                                     dest,"out_MEMORY_OUT_OOO_ENGINE_ID");
    1530                if (_param->_have_port_packet_id)
    1531                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_PACKET_ID"    ,
    1532                                     dest,"out_MEMORY_OUT_PACKET_ID"    );
    1533 //             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OPERATION"    ,
    1534 //                                  dest,"out_MEMORY_OUT_OPERATION"    );
    1535                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_TYPE"         ,
    1536                                     dest,"out_MEMORY_OUT_TYPE"         );
    1537                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RD"     ,
    1538                                     dest,"out_MEMORY_OUT_WRITE_RD"     );
    1539                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RD"   ,
    1540                                     dest,"out_MEMORY_OUT_NUM_REG_RD"   );
    1541                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RD"      ,
    1542                                     dest,"out_MEMORY_OUT_DATA_RD"      );
    1543                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RE"     ,
    1544                                     dest,"out_MEMORY_OUT_WRITE_RE"     );
    1545                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RE"   ,
    1546                                     dest,"out_MEMORY_OUT_NUM_REG_RE"   );
    1547                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RE"      ,
    1548                                     dest,"out_MEMORY_OUT_DATA_RE"      );
    1549                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_EXCEPTION"    ,
    1550                                     dest,"out_MEMORY_OUT_EXCEPTION"    );
    1551                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NO_SEQUENCE"  ,
    1552                                     dest,"out_MEMORY_OUT_NO_SEQUENCE"  );
    1553                PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_ADDRESS"      ,
    1554                                     dest,"out_MEMORY_OUT_ADDRESS"      );
     1628//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_VAL"          ,
     1629//                                  dest,"out_MEMORY_OUT_VAL"          );
     1630//             PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_ACK"          ,
     1631//                                  dest, "in_MEMORY_OUT_ACK"          );
     1632//             if (_param->_have_port_context_id)
     1633//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_CONTEXT_ID"   ,
     1634//                                  dest,"out_MEMORY_OUT_CONTEXT_ID"   );
     1635//             if (_param->_have_port_front_end_id)
     1636//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_FRONT_END_ID" ,
     1637//                                  dest,"out_MEMORY_OUT_FRONT_END_ID" );
     1638//             if (_param->_have_port_ooo_engine_id)
     1639//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OOO_ENGINE_ID",
     1640//                                  dest,"out_MEMORY_OUT_OOO_ENGINE_ID");
     1641//             if (_param->_have_port_rob_ptr  )
     1642//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_PACKET_ID"    ,
     1643//                                  dest,"out_MEMORY_OUT_PACKET_ID"    );
     1644// //          PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OPERATION"    ,
     1645// //                               dest,"out_MEMORY_OUT_OPERATION"    );
     1646//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_TYPE"         ,
     1647//                                  dest,"out_MEMORY_OUT_TYPE"         );
     1648//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RD"     ,
     1649//                                  dest,"out_MEMORY_OUT_WRITE_RD"     );
     1650//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RD"   ,
     1651//                                  dest,"out_MEMORY_OUT_NUM_REG_RD"   );
     1652//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RD"      ,
     1653//                                  dest,"out_MEMORY_OUT_DATA_RD"      );
     1654//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RE"     ,
     1655//                                  dest,"out_MEMORY_OUT_WRITE_RE"     );
     1656//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RE"   ,
     1657//                                  dest,"out_MEMORY_OUT_NUM_REG_RE"   );
     1658//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RE"      ,
     1659//                                  dest,"out_MEMORY_OUT_DATA_RE"      );
     1660//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_EXCEPTION"    ,
     1661//                                  dest,"out_MEMORY_OUT_EXCEPTION"    );
     1662//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NO_SEQUENCE"  ,
     1663//                                  dest,"out_MEMORY_OUT_NO_SEQUENCE"  );
     1664//             PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_ADDRESS"      ,
     1665//                                  dest,"out_MEMORY_OUT_ADDRESS"      );
    15551666             }
    15561667         }
     
    15661677#endif
    15671678           
    1568            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_VAL"          ,
    1569                                 dest, "in_WRITE_UNIT_IN_VAL"          );
    1570            PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_"+toString(i)+"_ACK"          ,
    1571                                 dest,"out_WRITE_UNIT_IN_ACK"          );
    1572            if (_param->_have_port_context_id)
    1573            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_CONTEXT_ID"   ,
    1574                                 dest, "in_WRITE_UNIT_IN_CONTEXT_ID"   );
    1575            if (_param->_have_port_front_end_id)
    1576            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_FRONT_END_ID" ,
    1577                                 dest, "in_WRITE_UNIT_IN_FRONT_END_ID" );
    1578            if (_param->_have_port_ooo_engine_id)
    1579            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID",
    1580                                 dest, "in_WRITE_UNIT_IN_OOO_ENGINE_ID");
    1581            if (_param->_have_port_packet_id)
    1582            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_PACKET_ID"    ,
    1583                                 dest, "in_WRITE_UNIT_IN_PACKET_ID"    );
    1584 //         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_OPERATION"    ,
    1585 //                              dest, "in_WRITE_UNIT_IN_OPERATION"    );
    1586            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_TYPE"         ,
    1587                                 dest, "in_WRITE_UNIT_IN_TYPE"         );
    1588            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RD"     ,
    1589                                 dest, "in_WRITE_UNIT_IN_WRITE_RD"     );
    1590            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RD"   ,
    1591                                 dest, "in_WRITE_UNIT_IN_NUM_REG_RD"   );
    1592            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RD"      ,
    1593                                 dest, "in_WRITE_UNIT_IN_DATA_RD"      );
    1594            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RE"     ,
    1595                                 dest, "in_WRITE_UNIT_IN_WRITE_RE"     );
    1596            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RE"   ,
    1597                                 dest, "in_WRITE_UNIT_IN_NUM_REG_RE"   );
    1598            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RE"      ,
    1599                                 dest, "in_WRITE_UNIT_IN_DATA_RE"      );
    1600            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_EXCEPTION"    ,
    1601                                 dest, "in_WRITE_UNIT_IN_EXCEPTION"    );
    1602            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_NO_SEQUENCE"  ,
    1603                                 dest, "in_WRITE_UNIT_IN_NO_SEQUENCE"  );
    1604            PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_ADDRESS"      ,
    1605                                 dest, "in_WRITE_UNIT_IN_ADDRESS"      );
     1679//         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_VAL"          ,
     1680//                              dest, "in_WRITE_UNIT_IN_VAL"          );
     1681//         PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_"+toString(i)+"_ACK"          ,
     1682//                              dest,"out_WRITE_UNIT_IN_ACK"          );
     1683//         if (_param->_have_port_context_id)
     1684//         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_CONTEXT_ID"   ,
     1685//                              dest, "in_WRITE_UNIT_IN_CONTEXT_ID"   );
     1686//         if (_param->_have_port_front_end_id)
     1687//         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_FRONT_END_ID" ,
     1688//                              dest, "in_WRITE_UNIT_IN_FRONT_END_ID" );
     1689//         if (_param->_have_port_ooo_engine_id)
     1690//         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID",
     1691//                              dest, "in_WRITE_UNIT_IN_OOO_ENGINE_ID");
     1692//         if (_param->_have_port_rob_ptr  )
     1693//         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_PACKET_ID"    ,
     1694//                              dest, "in_WRITE_UNIT_IN_PACKET_ID"    );
     1695// //      PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_OPERATION"    ,
     1696// //                           dest, "in_WRITE_UNIT_IN_OPERATION"    );
     1697//         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_TYPE"         ,
     1698//                              dest, "in_WRITE_UNIT_IN_TYPE"         );
     1699//         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RD"     ,
     1700//                              dest, "in_WRITE_UNIT_IN_WRITE_RD"     );
     1701//         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RD"   ,
     1702//                              dest, "in_WRITE_UNIT_IN_NUM_REG_RD"   );
     1703//         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RD"      ,
     1704//                              dest, "in_WRITE_UNIT_IN_DATA_RD"      );
     1705//         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RE"     ,
     1706//                              dest, "in_WRITE_UNIT_IN_WRITE_RE"     );
     1707//         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RE"   ,
     1708//                              dest, "in_WRITE_UNIT_IN_NUM_REG_RE"   );
     1709//         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RE"      ,
     1710//                              dest, "in_WRITE_UNIT_IN_DATA_RE"      );
     1711//         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_EXCEPTION"    ,
     1712//                              dest, "in_WRITE_UNIT_IN_EXCEPTION"    );
     1713//         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_NO_SEQUENCE"  ,
     1714//                              dest, "in_WRITE_UNIT_IN_NO_SEQUENCE"  );
     1715//         PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_ADDRESS"      ,
     1716//                              dest, "in_WRITE_UNIT_IN_ADDRESS"      );
    16061717         }
    16071718     }
    16081719     
     1720#if DEBUG_Execute_loop == true
    16091721     _component->test_map();
    1610      for (uint32_t i=0; i<_param->_nb_read_unit; i++)
    1611        _component_read_unit [i]->_component->test_map();
    1612      for (uint32_t i=0; i<_param->_nb_functionnal_unit; i++)
    1613        _component_functionnal_unit [i]->_component->test_map();
    1614      for (uint32_t i=0; i<_param->_nb_load_store_unit; i++)
    1615        _component_load_store_unit [i]->_component->test_map();
    1616      for (uint32_t i=0; i<_param->_nb_write_unit; i++)
    1617        _component_write_unit [i]->_component->test_map();
    1618      _component_read_unit_to_execution_unit->_component->test_map();
    1619      _component_execution_unit_to_write_unit->_component->test_map();
    1620      _component_register_unit->_component->test_map();
    1621 
    1622 #ifdef POSITION
    1623     _component->generate_file();
     1722#endif
     1723
     1724#ifdef POSITION
     1725     if (usage_is_set(_usage,USE_POSITION))
     1726       _component->generate_file();
    16241727#endif
    16251728
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Execute_loop_deallocation.cpp

    r81 r88  
     1
    12/*
    23 * $Id$
     
    78
    89#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Execute_loop.h"
    9 
     10#include "Behavioural/include/Allocation.h"
    1011namespace morpheo                    {
    1112namespace behavioural {
     
    2122    log_printf(FUNC,Execute_loop,FUNCTION,"Begin");
    2223
    23     if (_usage & USE_SYSTEMC)
     24    if (usage_is_set(_usage,USE_SYSTEMC))
    2425      {
    2526        delete     in_CLOCK ;
    2627        delete     in_NRESET;
    2728
    28         // ~~~~~[ Interface "execute_loop_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    29         delete []  in_EXECUTE_LOOP_IN_VAL                  ;
    30         delete [] out_EXECUTE_LOOP_IN_ACK                  ;
    31         if (_param->_have_port_context_id)
    32         delete []  in_EXECUTE_LOOP_IN_CONTEXT_ID           ;
    33         if (_param->_have_port_front_end_id)
    34         delete []  in_EXECUTE_LOOP_IN_FRONT_END_ID         ;
    35         if (_param->_have_port_ooo_engine_id)
    36         delete []  in_EXECUTE_LOOP_IN_OOO_ENGINE_ID        ;
    37         if (_param->_have_port_packet_id)
    38         delete []  in_EXECUTE_LOOP_IN_PACKET_ID            ;
    39         delete []  in_EXECUTE_LOOP_IN_OPERATION            ;
    40         delete []  in_EXECUTE_LOOP_IN_TYPE                 ;
    41         delete []  in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_WRITE;
    42         if (_param->_have_port_load_queue_ptr)
    43         delete []  in_EXECUTE_LOOP_IN_LOAD_QUEUE_PTR_WRITE ;
    44         delete []  in_EXECUTE_LOOP_IN_HAS_IMMEDIAT         ;
    45         delete []  in_EXECUTE_LOOP_IN_IMMEDIAT             ;
    46         delete []  in_EXECUTE_LOOP_IN_READ_RA              ;
    47         delete []  in_EXECUTE_LOOP_IN_NUM_REG_RA           ;
    48         delete []  in_EXECUTE_LOOP_IN_READ_RB              ;
    49         delete []  in_EXECUTE_LOOP_IN_NUM_REG_RB           ;
    50         delete []  in_EXECUTE_LOOP_IN_READ_RC              ;
    51         delete []  in_EXECUTE_LOOP_IN_NUM_REG_RC           ;
    52         delete []  in_EXECUTE_LOOP_IN_WRITE_RD             ;
    53         delete []  in_EXECUTE_LOOP_IN_NUM_REG_RD           ;
    54         delete []  in_EXECUTE_LOOP_IN_WRITE_RE             ;
    55         delete []  in_EXECUTE_LOOP_IN_NUM_REG_RE           ;
     29        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_VAL                  ,_param->_nb_read_unit,1);
     30        DELETE1_SIGNAL(out_EXECUTE_LOOP_IN_ACK                  ,_param->_nb_read_unit,1);
     31        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_CONTEXT_ID           ,_param->_nb_read_unit,_param->_size_context_id);
     32        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_FRONT_END_ID         ,_param->_nb_read_unit,_param->_size_front_end_id);
     33        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_OOO_ENGINE_ID        ,_param->_nb_read_unit,_param->_size_ooo_engine_id);
     34        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_PACKET_ID            ,_param->_nb_read_unit,_param->_size_rob_ptr  );
     35        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_OPERATION            ,_param->_nb_read_unit,_param->_size_operation);
     36        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_TYPE                 ,_param->_nb_read_unit,_param->_size_type);         
     37        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_WRITE,_param->_nb_read_unit,_param->_size_store_queue_ptr);
     38        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_read_unit,_param->_size_load_queue_ptr);
     39        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_HAS_IMMEDIAT         ,_param->_nb_read_unit,1);
     40        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_IMMEDIAT             ,_param->_nb_read_unit,_param->_size_general_data);
     41        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_READ_RA              ,_param->_nb_read_unit,1);
     42        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_NUM_REG_RA           ,_param->_nb_read_unit,_param->_size_general_register);
     43        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_READ_RB              ,_param->_nb_read_unit,1);
     44        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_NUM_REG_RB           ,_param->_nb_read_unit,_param->_size_general_register);
     45        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_READ_RC              ,_param->_nb_read_unit,1);
     46        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_NUM_REG_RC           ,_param->_nb_read_unit,_param->_size_special_register);
     47        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_WRITE_RD             ,_param->_nb_read_unit,1);
     48        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_NUM_REG_RD           ,_param->_nb_read_unit,_param->_size_general_register);
     49        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_WRITE_RE             ,_param->_nb_read_unit,1);
     50        DELETE1_SIGNAL( in_EXECUTE_LOOP_IN_NUM_REG_RE           ,_param->_nb_read_unit,_param->_size_special_register);
     51       
     52        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_VAL          ,_param->_nb_write_unit,1);
     53        DELETE1_SIGNAL( in_EXECUTE_LOOP_OUT_ACK          ,_param->_nb_write_unit,1);
     54        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_CONTEXT_ID   ,_param->_nb_write_unit,_param->_size_context_id);
     55        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_FRONT_END_ID ,_param->_nb_write_unit,_param->_size_front_end_id);
     56        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_OOO_ENGINE_ID,_param->_nb_write_unit,_param->_size_ooo_engine_id);
     57        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_PACKET_ID    ,_param->_nb_write_unit,_param->_size_rob_ptr  );
     58//      DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_OPERATION    ,_param->_nb_write_unit,_param->_size_operation);
     59//      DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_TYPE         ,_param->_nb_write_unit,_param->_size_type);
     60        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_FLAGS        ,_param->_nb_write_unit,_param->_size_special_data);
     61        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_EXCEPTION    ,_param->_nb_write_unit,_param->_size_exception);
     62        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_NO_SEQUENCE  ,_param->_nb_write_unit,1);
     63        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_ADDRESS      ,_param->_nb_write_unit,_param->_size_general_data);
     64        DELETE1_SIGNAL(out_EXECUTE_LOOP_OUT_DATA         ,_param->_nb_write_unit,_param->_size_general_data);
     65       
     66        DELETE2_SIGNAL(out_DCACHE_REQ_VAL       , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],1                                  );
     67        DELETE2_SIGNAL( in_DCACHE_REQ_ACK       , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],1                                  );
     68        DELETE2_SIGNAL(out_DCACHE_REQ_CONTEXT_ID, _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_max_size_dcache_context_id);
     69        DELETE2_SIGNAL(out_DCACHE_REQ_PACKET_ID , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_max_size_dcache_packet_id );
     70        DELETE2_SIGNAL(out_DCACHE_REQ_ADDRESS   , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_size_general_data         );
     71        DELETE2_SIGNAL(out_DCACHE_REQ_TYPE      , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_size_dcache_type          );
     72        DELETE2_SIGNAL(out_DCACHE_REQ_WDATA     , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_size_general_data         );
     73                                                                                                                                                     
     74        DELETE2_SIGNAL( in_DCACHE_RSP_VAL       , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],1                                  );
     75        DELETE2_SIGNAL(out_DCACHE_RSP_ACK       , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],1                                  );
     76        DELETE2_SIGNAL( in_DCACHE_RSP_CONTEXT_ID, _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_max_size_dcache_context_id);
     77        DELETE2_SIGNAL( in_DCACHE_RSP_PACKET_ID , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_max_size_dcache_packet_id );
     78        DELETE2_SIGNAL( in_DCACHE_RSP_RDATA     , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_size_general_data         );
     79        DELETE2_SIGNAL( in_DCACHE_RSP_ERROR     , _param->_nb_load_store_unit, _param->_nb_cache_port[it1],_param->_size_dcache_error         );
     80       
     81        DELETE2_SIGNAL( in_INSERT_ROB_VAL       ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1],1                             );
     82        DELETE2_SIGNAL(out_INSERT_ROB_ACK       ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1],1                             );
     83        DELETE2_SIGNAL( in_INSERT_ROB_RD_USE    ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1],1                             );
     84        DELETE2_SIGNAL( in_INSERT_ROB_RD_NUM_REG,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1],_param->_size_general_register);
     85        DELETE2_SIGNAL( in_INSERT_ROB_RE_USE    ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1],1                             );
     86        DELETE2_SIGNAL( in_INSERT_ROB_RE_NUM_REG,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1],_param->_size_special_register);
     87       
     88//         DELETE2_SIGNAL( in_RETIRE_ROB_VAL           ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],1                             );
     89//         DELETE2_SIGNAL(out_RETIRE_ROB_ACK           ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],1                             );
     90//         DELETE2_SIGNAL( in_RETIRE_ROB_RD_OLD_USE    ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],1                             );
     91//         DELETE2_SIGNAL( in_RETIRE_ROB_RD_OLD_NUM_REG,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],_param->_size_general_register);
     92//         DELETE2_SIGNAL( in_RETIRE_ROB_RD_NEW_USE    ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],1                             );
     93//         DELETE2_SIGNAL( in_RETIRE_ROB_RD_NEW_NUM_REG,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],_param->_size_general_register);
     94//         DELETE2_SIGNAL( in_RETIRE_ROB_RE_OLD_USE    ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],1                             );
     95//         DELETE2_SIGNAL( in_RETIRE_ROB_RE_OLD_NUM_REG,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],_param->_size_special_register);
     96//         DELETE2_SIGNAL( in_RETIRE_ROB_RE_NEW_USE    ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],1                             );
     97//         DELETE2_SIGNAL( in_RETIRE_ROB_RE_NEW_NUM_REG,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1],_param->_size_special_register);
     98      }
    5699
    57         // ~~~~~[ Interface "execute_loop_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    58         delete [] out_EXECUTE_LOOP_OUT_VAL                 ;
    59         delete []  in_EXECUTE_LOOP_OUT_ACK                 ;
    60         if (_param->_have_port_context_id)
    61         delete [] out_EXECUTE_LOOP_OUT_CONTEXT_ID          ;
    62         if (_param->_have_port_front_end_id)
    63         delete [] out_EXECUTE_LOOP_OUT_FRONT_END_ID        ;
    64         if (_param->_have_port_ooo_engine_id)
    65         delete [] out_EXECUTE_LOOP_OUT_OOO_ENGINE_ID       ;
    66         if (_param->_have_port_packet_id)
    67         delete [] out_EXECUTE_LOOP_OUT_PACKET_ID           ;
    68       //delete [] out_EXECUTE_LOOP_OUT_OPERATION           ;
    69       //delete [] out_EXECUTE_LOOP_OUT_TYPE                ;
    70         delete [] out_EXECUTE_LOOP_OUT_FLAGS               ;
    71         delete [] out_EXECUTE_LOOP_OUT_EXCEPTION           ;
    72         delete [] out_EXECUTE_LOOP_OUT_NO_SEQUENCE         ;
    73         delete [] out_EXECUTE_LOOP_OUT_ADDRESS             ;
    74 
    75         // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    76         delete [] out_DCACHE_REQ_VAL                       ;
    77         delete []  in_DCACHE_REQ_ACK                       ;
    78         if (_param->_have_port_dcache_context_id)
    79         delete [] out_DCACHE_REQ_CONTEXT_ID                ;
    80         delete [] out_DCACHE_REQ_PACKET_ID                 ;
    81         delete [] out_DCACHE_REQ_ADDRESS                   ;
    82         delete [] out_DCACHE_REQ_TYPE                      ;
    83         delete [] out_DCACHE_REQ_WDATA                     ;
    84 
    85         // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    86         delete []  in_DCACHE_RSP_VAL                       ;
    87         delete [] out_DCACHE_RSP_ACK                       ;
    88         if (_param->_have_port_dcache_context_id)
    89         delete []  in_DCACHE_RSP_CONTEXT_ID                ;
    90         delete []  in_DCACHE_RSP_PACKET_ID                 ;
    91         delete []  in_DCACHE_RSP_RDATA                     ;
    92         delete []  in_DCACHE_RSP_ERROR                     ;
    93    
    94         // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    95         delete []  in_INSERT_ROB_VAL                       ;
    96         delete [] out_INSERT_ROB_ACK                       ;
    97         delete []  in_INSERT_ROB_RD_USE                    ;
    98         delete []  in_INSERT_ROB_RD_NUM_REG                ;
    99         delete []  in_INSERT_ROB_RE_USE                    ;
    100         delete []  in_INSERT_ROB_RE_NUM_REG                ;
    101 
    102         // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    103         delete []  in_RETIRE_ROB_VAL                       ;
    104         delete [] out_RETIRE_ROB_ACK                       ;
    105         delete []  in_RETIRE_ROB_RD_OLD_USE                ;
    106         delete []  in_RETIRE_ROB_RD_OLD_NUM_REG            ;
    107         delete []  in_RETIRE_ROB_RD_NEW_USE                ;
    108         delete []  in_RETIRE_ROB_RD_NEW_NUM_REG            ;
    109         delete []  in_RETIRE_ROB_RE_OLD_USE                ;
    110         delete []  in_RETIRE_ROB_RE_OLD_NUM_REG            ;
    111         delete []  in_RETIRE_ROB_RE_NEW_USE                ;
    112         delete []  in_RETIRE_ROB_RE_NEW_NUM_REG            ;
    113       }
    114    
    115100    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    116101    delete    _component;
     102    delete    _component_glue                        ;
    117103    delete [] _component_read_unit                   ;
    118104    delete [] _component_functionnal_unit            ;
    119105    delete [] _component_load_store_unit             ;
    120106    delete [] _component_write_unit                  ;
    121     delete [] _component_read_unit_to_execution_unit ;
    122     delete [] _component_execution_unit_to_write_unit;
    123     delete [] _component_register_unit               ;
     107    delete   _component_read_unit_to_execution_unit ;
     108    delete   _component_execution_unit_to_write_unit;
     109    delete   _component_register_unit               ;
    124110   
    125111    log_printf(FUNC,Execute_loop,FUNCTION,"End");
     
    129115}; // end namespace multi_execute_loop
    130116}; // end namespace core
    131 
    132117}; // end namespace behavioural
    133118}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Execute_loop_end_cycle.cpp

    r81 r88  
    2323
    2424#ifdef STATISTICS
    25     _stat->end_cycle();
     25    if (usage_is_set(_usage,USE_STATISTICS))
     26      _stat->end_cycle();
    2627#endif   
    2728
     
    2930    // Evaluation before read the ouput signal
    3031//  sc_start(0);
    31     _interfaces->testbench();
     32    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     33      _interfaces->testbench();
    3234#endif
    3335
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Execute_loop_statistics_declaration.cpp

    r81 r88  
    3737     _stat->add_stat(_component_execution_unit_to_write_unit->_stat);
    3838     _stat->add_stat(_component_register_unit               ->_stat);
     39     _stat->add_stat(_component_glue                        ->_stat);
    3940
    4041    log_printf(FUNC,Execute_loop,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Parameters.cpp

    r81 r88  
    77
    88#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Parameters.h"
     9#include "Common/include/Max.h"
    910
    1011namespace morpheo {
     
    2930                          uint32_t              size_special_data                         ,
    3031                         
    31                           uint32_t            * size_read_queue                           ,
    32                           uint32_t            * size_reservation_station                  ,
    33                           uint32_t            * nb_inst_retire                            ,
     32                          uint32_t            * size_read_queue                           ,//[nb_read_unit]
     33                          uint32_t            * size_reservation_station                  ,//[nb_read_unit]
     34                          uint32_t            * nb_inst_retire                            ,//[nb_read_unit]
     35
     36                          uint32_t            * nb_inst_functionnal_unit                  ,//[nb_functionnal_unit]
     37                          execute_timing_t  *** timing                                    ,//[nb_functionnal_unit][nb_type][nb_operation]
     38                          morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void),
    3439                         
    35                           execute_timing_t  *** timing                                    ,
    36                           morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t),
    37                          
    38                           uint32_t            * size_store_queue                          ,
    39                           uint32_t            * size_load_queue                           ,
    40                           uint32_t            * size_speculative_access_queue             ,
    41                           uint32_t            * nb_port_check                             ,
    42                           Tspeculative_load_t * speculative_load                          ,
    43                           uint32_t            * nb_bypass_memory                          ,
    44 
    45                           uint32_t            * size_write_queue                          ,
    46                           uint32_t            * size_execute_queue                        ,
    47                           uint32_t            * nb_bypass_write                           ,
     40                          uint32_t            * size_store_queue                          ,//[nb_load_store_unit]
     41                          uint32_t            * size_load_queue                           ,//[nb_load_store_unit]
     42                          uint32_t            * size_speculative_access_queue             ,//[nb_load_store_unit]
     43                          uint32_t            * nb_port_check                             ,//[nb_load_store_unit]
     44                          Tspeculative_load_t * speculative_load                          ,//[nb_load_store_unit]
     45                          uint32_t            * nb_bypass_memory                          ,//[nb_load_store_unit]
     46                          uint32_t            * nb_cache_port                             ,//[nb_load_store_unit]
     47                          uint32_t            * nb_inst_memory                            ,//[nb_load_store_unit]
     48
     49                          uint32_t            * size_write_queue                          ,//[nb_write_unit]
     50                          uint32_t            * size_execute_queue                        ,//[nb_write_unit]
     51                          uint32_t            * nb_bypass_write                           ,//[nb_write_unit]
    4852                         
    4953                          uint32_t              nb_gpr_bank                               ,
     
    5357                          uint32_t              nb_spr_port_read_by_bank                  ,
    5458                          uint32_t              nb_spr_port_write_by_bank                 ,
    55                           uint32_t            * nb_general_register                       ,
    56                           uint32_t            * nb_special_register                       ,
    57                           uint32_t            * nb_inst_insert_rob                        ,
    58                           uint32_t            * nb_inst_retire_rob                        ,
     59                          uint32_t            * nb_general_register                       ,//[nb_ooo_engine]
     60                          uint32_t            * nb_special_register                       ,//[nb_ooo_engine]
     61                          uint32_t            * nb_inst_insert_rob                        ,//[nb_ooo_engine]
     62                          uint32_t            * nb_inst_retire_rob                        ,//[nb_ooo_engine]
    5963                         
    6064                          Tpriority_t           execution_unit_to_write_unit_priority     ,
    61                           bool               ** execution_unit_to_write_unit_table_routing,
    62                           bool               ** execution_unit_to_write_unit_table_thread ,
    63                          
    64                           Tpriority_t           read_unit_to_execution_unit_priority      ,
    65                           bool               ** read_unit_to_execution_unit_table_routing ,
    66                           bool               ** read_unit_to_execution_unit_table_thread     
    67                           )
     65                          bool              *** execution_unit_to_write_unit_table_routing,//[nb_execute_unit][nb_execute_unit_port][nb_write_unit]
     66                          bool               ** execution_unit_to_write_unit_table_thread ,//[nb_write_unit][nb_thread]
     67
     68                          Tpriority_t           read_unit_to_execution_unit_priority      ,
     69                          bool              *** read_unit_to_execution_unit_table_routing ,//[nb_read_unit][nb_execute_unit][nb_execute_unit_port]
     70                          bool               ** read_unit_to_execution_unit_table_thread  ,//[nb_execute_unit][nb_thread]
     71                         
     72                          bool                * is_load_store_unit                        ,//[nb_execute_unit]
     73                          uint32_t            * translate_num_execute_unit                ,//[nb_execute_unit]
     74                         
     75                          bool                  is_toplevel
     76                          )
    6877  {
    6978    log_printf(FUNC,Execute_loop,FUNCTION,"Begin");
    7079
    71     _nb_read_unit                          = nb_read_unit                         ;
    72     _nb_functionnal_unit                   = nb_functionnal_unit                  ;
    73     _nb_load_store_unit                    = nb_load_store_unit                   ;
    74     _nb_write_unit                         = nb_write_unit                        ;
    75    
    76     _nb_context                            = nb_context                           ;
    77     _nb_front_end                          = nb_front_end                         ;
    78     _nb_ooo_engine                         = nb_ooo_engine                        ;
    79     _nb_packet                             = nb_packet                            ;
    80     _size_general_data                     = size_general_data                    ;
    81     _size_special_data                     = size_special_data                    ;
    82    
    83     _size_read_queue                       = size_read_queue                      ;
    84     _size_reservation_station              = size_reservation_station             ;
    85     _nb_inst_retire                        = nb_inst_retire                       ;
    86    
    87     _timing                                = timing                               ;
    88     _get_custom_information                = get_custom_information               ;
    89    
    90     _size_store_queue                      = size_store_queue                     ;
    91     _size_load_queue                       = size_load_queue                      ;
    92     _size_speculative_access_queue         = size_speculative_access_queue        ;
    93     _nb_port_check                         = nb_port_check                        ;
    94     _speculative_load                      = speculative_load                     ;
    95     _nb_bypass_memory                      = nb_bypass_memory                     ;
    96 
    97     _size_write_queue                      = size_write_queue                     ;
    98     _size_execute_queue                    = size_execute_queue                   ;
    99     _nb_bypass_write                       = nb_bypass_write                      ;
    100    
    101     _nb_gpr_bank                           = nb_gpr_bank                          ;
    102     _nb_gpr_port_read_by_bank              = nb_gpr_port_read_by_bank             ;
    103     _nb_gpr_port_write_by_bank             = nb_gpr_port_write_by_bank            ;
    104     _nb_spr_bank                           = nb_spr_bank                          ;
    105     _nb_spr_port_read_by_bank              = nb_spr_port_read_by_bank             ;
    106     _nb_spr_port_write_by_bank             = nb_spr_port_write_by_bank            ;
    107     _nb_general_register                   = nb_general_register                  ;
    108     _nb_special_register                   = nb_special_register                  ;
    109     _nb_inst_insert_rob                    = nb_inst_insert_rob                   ;
    110     _nb_inst_retire_rob                    = nb_inst_retire_rob                   ;
     80    _nb_read_unit                               = nb_read_unit                         ;
     81    _nb_functionnal_unit                        = nb_functionnal_unit                  ;
     82    _nb_load_store_unit                         = nb_load_store_unit                   ;
     83    _nb_write_unit                              = nb_write_unit                        ;
     84                                               
     85    _nb_context                                 = nb_context                           ;
     86    _nb_front_end                               = nb_front_end                         ;
     87    _nb_ooo_engine                              = nb_ooo_engine                        ;
     88    _nb_packet                                  = nb_packet                            ;
     89                                               
     90    _size_read_queue                            = size_read_queue                      ;
     91    _size_reservation_station                   = size_reservation_station             ;
     92    _nb_inst_retire                             = nb_inst_retire                       ;
     93                                               
     94    _nb_inst_functionnal_unit                   = nb_inst_functionnal_unit             ;
     95    _timing                                     = timing                               ;
     96    _get_custom_information                     = get_custom_information               ;
     97                                               
     98    _size_store_queue                           = size_store_queue                     ;
     99    _size_load_queue                            = size_load_queue                      ;
     100    _size_speculative_access_queue              = size_speculative_access_queue        ;
     101    _nb_port_check                              = nb_port_check                        ;
     102    _speculative_load                           = speculative_load                     ;
     103    _nb_bypass_memory                           = nb_bypass_memory                     ;
     104    _nb_cache_port                              = nb_cache_port                        ;
     105    _nb_inst_memory                             = nb_inst_memory                       ;
     106                                               
     107    _size_write_queue                           = size_write_queue                     ;
     108    _size_execute_queue                         = size_execute_queue                   ;
     109    _nb_bypass_write                            = nb_bypass_write                      ;
     110                                               
     111    _nb_gpr_bank                                = nb_gpr_bank                          ;
     112    _nb_gpr_port_read_by_bank                   = nb_gpr_port_read_by_bank             ;
     113    _nb_gpr_port_write_by_bank                  = nb_gpr_port_write_by_bank            ;
     114    _nb_spr_bank                                = nb_spr_bank                          ;
     115    _nb_spr_port_read_by_bank                   = nb_spr_port_read_by_bank             ;
     116    _nb_spr_port_write_by_bank                  = nb_spr_port_write_by_bank            ;
     117    _nb_general_register                        = nb_general_register                  ;
     118    _nb_special_register                        = nb_special_register                  ;
     119    _nb_inst_insert_rob                         = nb_inst_insert_rob                   ;
     120    _nb_inst_retire_rob                         = nb_inst_retire_rob                   ;
    111121   
    112122    _execution_unit_to_write_unit_priority      = execution_unit_to_write_unit_priority;
     
    114124    _execution_unit_to_write_unit_table_thread  = execution_unit_to_write_unit_table_thread ;
    115125   
    116     _read_unit_to_execution_unit_priority       = read_unit_to_execution_unit_priority ;
     126    _read_unit_to_execution_unit_priority       = read_unit_to_execution_unit_priority      ;
    117127    _read_unit_to_execution_unit_table_routing  = read_unit_to_execution_unit_table_routing ;
    118128    _read_unit_to_execution_unit_table_thread   = read_unit_to_execution_unit_table_thread  ;
    119129
    120     _nb_execute_unit                       = _nb_functionnal_unit + _nb_load_store_unit;
    121 
    122     _size_context_id         = log2(nb_context            );
    123     _size_front_end_id       = log2(nb_front_end          );
    124     _size_ooo_engine_id      = log2(nb_ooo_engine         );
    125     _size_packet_id          = log2(nb_packet             );
    126 
    127     _have_port_context_id    = _size_context_id    >= 1;
    128     _have_port_front_end_id  = _size_front_end_id  >= 1;
    129     _have_port_ooo_engine_id = _size_ooo_engine_id >= 1;
    130     _have_port_packet_id     = _size_packet_id     >= 1;
    131 
    132     _is_load_store_unit         = new bool [_nb_execute_unit];
    133     _translate_num_execute_unit = new uint32_t [_nb_execute_unit];
    134 
     130    _is_load_store_unit                         = is_load_store_unit        ;
     131    _translate_num_execute_unit                 = translate_num_execute_unit;
     132
     133    _nb_execute_unit                            = _nb_functionnal_unit + _nb_load_store_unit;
     134
     135    _nb_execute_unit_port                       = new uint32_t [_nb_execute_unit];
     136   
    135137    _read_unit_to_execution_unit_table_execute_type = new bool * [_nb_execute_unit];
    136138    for (uint32_t i=0; i<_nb_execute_unit; i++)
    137139      {
    138         _is_load_store_unit [i] = false;
    139140        _read_unit_to_execution_unit_table_execute_type [i] = new bool [_nb_type];
    140141        for (uint32_t j=0; j<_nb_type; j++)
     
    144145    // Fill execute_type
    145146    for (uint32_t i=0; i<_nb_execute_unit; i++)
    146       for (uint32_t j=0; j<_nb_type; j++)
    147         for (uint32_t k=0; k<_nb_operation; k++)
    148           // Test if operation is implemnted
    149           if (timing[i][j][k]._latence > 0)
    150             {
    151               _read_unit_to_execution_unit_table_execute_type [i][j] = true;
    152               _is_load_store_unit [i] = (j == TYPE_MEMORY);
    153               break;
    154             }
     147      // is load store
     148      if (is_load_store_unit [i])
     149        _read_unit_to_execution_unit_table_execute_type [i][TYPE_MEMORY] = true;
     150      else
     151        for (uint32_t j=0; j<_nb_type; j++)
     152          if (is_type_valid (j))
     153            for (uint32_t k=0; k<_nb_operation; k++)
     154              {
     155                uint32_t x = translate_num_execute_unit [i];
     156                if (timing[x][j][k]._latence > 0)
     157                  {
     158                    log_printf(TRACE,Execute_loop,FUNCTION,"Execute unit '%d' (functional unit '%d') can execute type '%s'.",i,x,toString_type(j).c_str());
     159                    _read_unit_to_execution_unit_table_execute_type [i][j] = true;
     160                    break; // find an operation
     161                  }
     162              }
    155163
    156164    for (uint32_t i=0; i<_nb_execute_unit; i++)
    157       if (_is_load_store_unit [i])
    158         log_printf(TRACE,Execute_loop,FUNCTION,"Execute unit '%d' is a Load Store  unit",i);
    159       else
    160         log_printf(TRACE,Execute_loop,FUNCTION,"Execute unit '%d' is a Functionnal unit",i);
     165      {
     166        uint32_t x = translate_num_execute_unit [i];
     167       
     168        if (_is_load_store_unit [i])
     169          _nb_execute_unit_port [i] = _nb_inst_memory [x];
     170        else
     171          _nb_execute_unit_port [i] = _nb_inst_functionnal_unit [x];
     172      }
    161173
    162174    _nb_gpr_read  = 2*_nb_read_unit;
     
    165177    _nb_spr_write = 1*_nb_write_unit;
    166178
    167     _max_nb_general_register = 0;
    168     _max_nb_special_register = 0;
    169     for (uint32_t i=0; i<nb_ooo_engine; i++)
    170       {
    171         if (_nb_general_register[i] > _max_nb_general_register) _max_nb_general_register = _nb_general_register[i];
    172         if (_nb_special_register[i] > _max_nb_special_register) _max_nb_special_register = _nb_special_register[i];
    173       }
    174 
    175     _max_size_store_queue    = 0;
    176     _max_size_load_queue     = 0;
    177     for (uint32_t i=0; i<nb_load_store_unit; i++)
    178       {
    179         if (_size_store_queue[i] > _max_size_store_queue) _max_size_store_queue = _size_store_queue[i];
    180         if (_size_load_queue [i] > _max_size_load_queue ) _max_size_load_queue  = _size_load_queue [i];
    181       }
    182 
    183     _have_port_load_queue_ptr= _max_size_load_queue >= 2;
    184 
    185     _size_general_register = log2(_max_nb_general_register);
    186     _size_special_register = log2(_max_nb_special_register);
     179    _max_nb_general_register = max<uint32_t>(nb_general_register,nb_ooo_engine);
     180    _max_nb_special_register = max<uint32_t>(nb_special_register,nb_ooo_engine);
     181
     182    _max_size_store_queue    = max<uint32_t>(size_store_queue,nb_load_store_unit);
     183    _max_size_load_queue     = max<uint32_t>(size_load_queue ,nb_load_store_unit);
    187184
    188185    uint32_t _nb_thread = get_nb_thread(_nb_context,
     
    190187                                        _nb_ooo_engine);
    191188
     189    uint32_t _max_nb_inst_memory = max<uint32_t>(_nb_inst_memory,_nb_load_store_unit);
     190
    192191    _set_read_unit_source_register_write = new std::set<uint32_t> [_nb_read_unit];
    193192    _set_read_unit_source_bypass_write   = new std::set<uint32_t> [_nb_read_unit];
     
    198197    _read_unit_nb_bypass_memory           = new uint32_t [_nb_read_unit];
    199198
    200     _link_read_unit_with_load_store_unit  = new bool * [nb_read_unit];
    201     _link_read_unit_with_write_unit       = new bool * [nb_read_unit];
    202     _link_read_unit_with_thread           = new bool * [nb_read_unit];
     199    _link_read_unit_with_load_store_unit  = new bool ** [nb_read_unit];
     200    _link_read_unit_with_write_unit       = new bool *  [nb_read_unit];
     201    _link_read_unit_with_thread           = new bool *  [nb_read_unit];
    203202
    204203    for (uint32_t i=0; i<_nb_read_unit; i++)
     
    208207        _read_unit_nb_bypass_memory  [i] = 0;
    209208
    210         _link_read_unit_with_load_store_unit [i] = new bool [_nb_execute_unit];
    211         _link_read_unit_with_write_unit      [i] = new bool [_nb_write_unit];
    212         _link_read_unit_with_thread          [i] = new bool [_nb_thread];
     209        _link_read_unit_with_load_store_unit [i] = new bool * [_nb_execute_unit];
     210        _link_read_unit_with_write_unit      [i] = new bool   [_nb_write_unit];
     211        _link_read_unit_with_thread          [i] = new bool   [_nb_thread];
    213212
    214213        for (uint32_t j=0; j<_nb_execute_unit; j++)
    215           _link_read_unit_with_load_store_unit [i][j] = false;
     214          {
     215            _link_read_unit_with_load_store_unit [i][j] = new bool [_max_nb_inst_memory];
     216
     217            for (uint32_t k=0; k<_max_nb_inst_memory; k++)
     218              _link_read_unit_with_load_store_unit [i][j][k] = false;
     219          }
    216220        for (uint32_t j=0; j<_nb_write_unit; j++)
    217221          _link_read_unit_with_write_unit [i][j] = false;
     
    220224       
    221225        // fill link array
    222         for (uint32_t j=0; j<_nb_execute_unit; j++)
    223           {
    224             // Test if this read unit can send operation at this execute_unit
    225             if (_read_unit_to_execution_unit_table_routing [i][j])
    226               {
    227                 if (_is_load_store_unit [j])
    228                   {
    229                     _link_read_unit_with_load_store_unit [i][j] = true;
    230                   }
    231                
    232                 for (uint32_t k=0; k<_nb_thread; k++)
    233                   {
    234                     if (_read_unit_to_execution_unit_table_thread [j][k])
    235                       {
    236                         _link_read_unit_with_thread [i][k] = true;
    237                       }
    238                   }
    239                 // Scearch associed write_unit
    240                 for (uint32_t k=0; k<_nb_write_unit; k++)
    241                   {
    242                     // Test if this execute_unit can send operation at this write_unit
    243                     // Test if have not a previous link ! (a same read_unit can send operation à two execute_unit and each execute_unit send at the same write_unit)
    244                     if (_execution_unit_to_write_unit_table_routing [j][k] and
    245                         not _link_read_unit_with_write_unit [i][k])
    246                       // if yes : this write_unit can have operation sended by this read_unit
    247                       {
    248                         _link_read_unit_with_write_unit [i][k] = true;
    249                       }
    250                   }
    251               }
    252           }
     226        for (uint32_t x=0; x<_nb_execute_unit; x++)
     227          for (uint32_t y=0; y<_nb_execute_unit_port[x]; y++)
     228            {
     229              // Test if this read unit can send operation at this execute_unit
     230              if (_read_unit_to_execution_unit_table_routing [i][x][y])
     231                {
     232                  if (_is_load_store_unit [x])
     233                    {
     234                      _link_read_unit_with_load_store_unit [i][x][y] = true;
     235                    }
     236                 
     237                  for (uint32_t k=0; k<_nb_thread; k++)
     238                    {
     239                      if (_read_unit_to_execution_unit_table_thread [x][k])
     240                        {
     241                          _link_read_unit_with_thread [i][k] = true;
     242                        }
     243                    }
     244                  // Scearch associed write_unit
     245                  for (uint32_t k=0; k<_nb_write_unit; k++)
     246                    {
     247                      // Test if this execute_unit can send operation at this write_unit
     248                      // Test if have not a previous link ! (a same read_unit can send operation à two execute_unit and each execute_unit send at the same write_unit)
     249                      if (_execution_unit_to_write_unit_table_routing [x][y][k] and
     250                          not _link_read_unit_with_write_unit [i][k])
     251                        // if yes : this write_unit can have operation sended by this read_unit
     252                        {
     253                          _link_read_unit_with_write_unit [i][k] = true;
     254                        }
     255                    }
     256                }
     257            }
    253258      }
    254259
     
    258263
    259264   
    260     std::cout << "_link_......." << std::endl;
    261     std::cout << "_link_read_unit_with_load_store_unit" << std::endl;
     265//     std::cout << "_link_......." << std::endl;
     266//     std::cout << "_link_read_unit_with_load_store_unit" << std::endl;
     267//     for (uint32_t i=0; i<_nb_read_unit; i++)
     268//       {
     269//      std::cout << "\t" << std::endl;
     270//      for (uint32_t j=0; j<_nb_execute_unit; j++)
     271//        for (uint32_t k=0; k<_nb_execute_unit_port[j]; k++)
     272//          std::cout << _link_read_unit_with_load_store_unit [i][j][k] << " ";
     273//      std::cout << std::endl;
     274//       }
     275//     std::cout << "_link_read_unit_with_write_unit" << std::endl;
     276//     for (uint32_t i=0; i<_nb_read_unit; i++)
     277//       {
     278//      std::cout << "\t" << std::endl;
     279//      for (uint32_t j=0; j<_nb_write_unit; j++)
     280//        std::cout << _link_read_unit_with_write_unit [i][j] << " ";
     281//      std::cout << std::endl;
     282//       }
     283//     std::cout << "_link_read_unit_with_thread" << std::endl;
     284//     for (uint32_t i=0; i<_nb_read_unit; i++)
     285//       {
     286//      std::cout << "\t" << std::endl;
     287//      for (uint32_t j=0; j<_nb_thread; j++)
     288//        std::cout << _link_read_unit_with_thread [i][j] << " ";
     289//      std::cout << std::endl;
     290//       }
     291
     292//     std::cout << "_set_......." << std::endl;
     293
    262294    for (uint32_t i=0; i<_nb_read_unit; i++)
    263295      {
    264         std::cout << "\t" << std::endl;
    265         for (uint32_t j=0; j<_nb_execute_unit; j++)
    266           std::cout << _link_read_unit_with_load_store_unit [i][j] << " ";
    267         std::cout << std::endl;
    268       }
    269     std::cout << "_link_read_unit_with_write_unit" << std::endl;
    270     for (uint32_t i=0; i<_nb_read_unit; i++)
    271       {
    272         std::cout << "\t" << std::endl;
    273         for (uint32_t j=0; j<_nb_write_unit; j++)
    274           std::cout << _link_read_unit_with_write_unit [i][j] << " ";
    275         std::cout << std::endl;
    276       }
    277     std::cout << "_link_read_unit_with_thread" << std::endl;
    278     for (uint32_t i=0; i<_nb_read_unit; i++)
    279       {
    280         std::cout << "\t" << std::endl;
    281         for (uint32_t j=0; j<_nb_thread; j++)
    282           std::cout << _link_read_unit_with_thread [i][j] << " ";
    283         std::cout << std::endl;
    284       }
    285 
    286     std::cout << "_set_......." << std::endl;
    287 
    288     for (uint32_t i=0; i<_nb_read_unit; i++)
    289       {
    290         std::cout << " * Read_unit[" << i << "]" << std::endl;
     296//      std::cout << " * Read_unit[" << i << "]" << std::endl;
    291297        for (uint32_t j=0; j<_nb_write_unit; j++)
    292298          {
    293             std::cout << "   * Write_unit[" << j << "]" << std::endl;
     299//          std::cout << "   * Write_unit[" << j << "]" << std::endl;
    294300            // Test the thread executed on this write_unit
    295301            for (uint32_t k=0; k<_nb_thread; k++)
    296302              {
    297                 std::cout << "     * Thread[" << k << "]" << std::endl;
     303//              std::cout << "     * Thread[" << k << "]" << std::endl;
    298304                if ( (_execution_unit_to_write_unit_table_thread [j][k]) and
    299305                     (_link_read_unit_with_thread [i][k]))
    300306                  {
    301                     std::cout << "       * Find !!!!" << std::endl;
    302                     std::cout << "         * Read_unit "+toString(i)+" must take the gpr_write with write_unit "+toString(j)+"." << std::endl;
     307//                  std::cout << "       * Find !!!!" << std::endl;
     308//                  std::cout << "         * Read_unit "+toString(i)+" must take the gpr_write with write_unit "+toString(j)+"." << std::endl;
    303309                    _set_read_unit_source_register_write[i].insert(j);
    304310                    _read_unit_nb_register_write        [i] ++;
    305311
    306                     std::cout << "       * bypass_write : " << _nb_bypass_write [j] << std::endl;
    307                     std::cout << "         * Read_unit "+toString(i)+" must take the bypass_write with write_unit "+toString(j)+"." << std::endl;                   
     312//                  std::cout << "       * bypass_write : " << _nb_bypass_write [j] << std::endl;
     313//                  std::cout << "         * Read_unit "+toString(i)+" must take the bypass_write with write_unit "+toString(j)+"." << std::endl;                   
    308314                    _set_read_unit_source_bypass_write  [i].insert(j);
    309315                    _read_unit_nb_bypass_write          [i] += _nb_bypass_write [j];
     
    316322    for (uint32_t i=0; i<_nb_read_unit; i++)
    317323      {
    318         std::cout << " * Read_unit[" << i << "]" << std::endl;
     324//      std::cout << " * Read_unit[" << i << "]" << std::endl;
    319325        for (uint32_t j=0; j<_nb_execute_unit; j++)
    320326          {
    321             std::cout << "   * Execute_unit[" << j << "]" << std::endl;
     327            uint32_t x = translate_num_execute_unit [j];
     328
     329//          std::cout << "   * Execute_unit[" << j << "]" << std::endl;
    322330            // Test the thread executed on this execute_unit
    323331            for (uint32_t k=0; k<_nb_thread; k++)       
    324332              {
    325                 std::cout << "     * Thread[" << k << "]" << std::endl;
     333//              std::cout << "     * Thread[" << k << "]" << std::endl;
    326334                if ((_read_unit_to_execution_unit_table_thread [j][k]) and
    327335                    (_link_read_unit_with_thread [i][k]) and
    328336                    (_is_load_store_unit [j]))
    329337                  {
    330                     std::cout << "       * Find !!!!" << std::endl;
    331                     std::cout << "       * Bypass_memory !!!!" << std::endl;
    332                     std::cout << "         * Read_unit "+toString(i)+" must take the bypass_memory with load_store_unit "+toString(j)+"." << std::endl;             
     338//                  std::cout << "       * Find !!!!" << std::endl;
     339//                  std::cout << "       * Bypass_memory !!!!" << std::endl;
     340//                  std::cout << "         * Read_unit "+toString(i)+" must take the bypass_memory with load_store_unit "+toString(j)+"." << std::endl;             
    333341                   
    334342                    _set_read_unit_source_bypass_memory [i].insert(j);
    335                     _read_unit_nb_bypass_memory         [i] += _nb_bypass_memory [j];
    336                     break;
     343                    _read_unit_nb_bypass_memory         [i] += _nb_bypass_memory [x];
     344                   
     345                    break; // loop on thread
    337346                  }
    338347              }
     
    340349      }
    341350
     351    uint32_t size_ooo_engine_id      = log2(nb_ooo_engine        );
     352    uint32_t size_general_register   = log2(_max_nb_general_register);
     353    uint32_t size_special_register   = log2(_max_nb_special_register);
     354   
    342355    test();
     356
     357    log_printf(TRACE,Execute_loop,FUNCTION,"Parameters : glue");
     358
     359    _param_glue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::execute_loop_glue::Parameters
     360        (_nb_gpr_write              ,
     361         _nb_spr_write              ,
     362          size_ooo_engine_id        ,
     363          size_general_register     ,
     364          size_special_register     ,
     365          size_general_data         ,
     366          size_special_data         );
     367
     368    log_printf(TRACE,Execute_loop,FUNCTION,"Parameters : read_unit");
    343369
    344370    _param_read_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::Parameters * [_nb_read_unit];
     
    351377         _nb_ooo_engine                    ,
    352378         _nb_packet                        ,
    353          _size_general_data                ,
    354          _size_special_data                ,
     379          size_general_data                ,
     380          size_special_data                ,
    355381         _max_nb_general_register          ,
    356382         _max_nb_special_register          ,
     
    363389         _read_unit_nb_bypass_memory    [i]);
    364390   
     391    log_printf(TRACE,Execute_loop,FUNCTION,"Parameters : execute_unit");
     392
    365393    _param_functionnal_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::Parameters * [_nb_functionnal_unit];
    366394    _param_load_store_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters * [_nb_load_store_unit];
    367395
    368     uint32_t x=0;
    369     uint32_t y=0;
    370 
    371396    for (uint32_t i=0; i<_nb_execute_unit; i++)
    372       if (_is_load_store_unit [i] == false)
    373         {
    374           _translate_num_execute_unit [i] = x;
    375 
     397      {
     398        uint32_t x = _translate_num_execute_unit [i];
     399        if (_is_load_store_unit [i] == false)
    376400          _param_functionnal_unit [x] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::Parameters
    377401            (_nb_context                 ,
     
    379403             _nb_ooo_engine              ,
    380404             _nb_packet                  ,
    381              _size_general_data          ,
     405              size_general_data          ,
    382406             _max_nb_general_register    ,
    383              _size_special_data          ,
     407              size_special_data          ,
    384408             _max_nb_special_register    ,
    385409             _max_size_store_queue       ,
    386410             _max_size_load_queue        ,
    387              _timing                  [i],
     411             _timing                  [x],
    388412             _get_custom_information     );
    389 
    390           x++;
    391         }
    392       else
    393         {
    394           _translate_num_execute_unit [i] = y;
    395 
    396           _param_load_store_unit [y] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters
    397             (_size_store_queue              [y],
    398              _size_load_queue               [y],
    399              _size_speculative_access_queue [y],
    400              _nb_port_check                 [y],
    401              _speculative_load              [y],
    402              _nb_bypass_memory              [y],
     413        else
     414          _param_load_store_unit [x] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Parameters
     415            (_size_store_queue              [x],
     416             _size_load_queue               [x],
     417             _size_speculative_access_queue [x],
     418             _nb_port_check                 [x],
     419             _speculative_load              [x],
     420             _nb_bypass_memory              [x],
     421             _nb_cache_port                 [x],
     422             _nb_inst_memory                [x],
    403423             _nb_context                       ,
    404424             _nb_front_end                     ,
    405425             _nb_ooo_engine                    ,
    406426             _nb_packet                        ,
    407              _size_general_data                ,
    408              _size_special_data                ,
     427              size_general_data                ,
     428              size_special_data                ,
    409429             _max_nb_special_register          ,
    410430             _max_nb_general_register          );
    411 
    412           y ++;
    413         }
    414 
    415     for (uint32_t i=0; i<_nb_load_store_unit; i++)
    416 
     431      }
     432
     433    log_printf(TRACE,Execute_loop,FUNCTION,"Parameters : write_unit");
     434   
    417435    _param_write_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters * [_nb_write_unit];
    418436    for (uint32_t i=0; i<_nb_write_unit; i++)
     
    424442         _nb_ooo_engine              ,
    425443         _nb_packet                  ,
    426          _size_general_data          ,
     444          size_general_data          ,
    427445         _max_nb_general_register    ,
    428          _size_special_data          ,
     446          size_special_data          ,
    429447         _max_nb_special_register    ,
    430448         _nb_bypass_write         [i]);
    431449
    432450
     451    log_printf(TRACE,Execute_loop,FUNCTION,"Parameters : read_unit_to_execution_unit");
     452
    433453    _param_read_unit_to_execution_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::network::read_unit_to_execution_unit::Parameters
    434454      (_nb_read_unit                                  ,
     455       _nb_inst_retire                                ,
    435456       _nb_execute_unit                               ,
     457       _nb_execute_unit_port                          ,
    436458       _nb_context                                    ,
    437459       _nb_front_end                                  ,
    438460       _nb_ooo_engine                                 ,
    439461       _nb_packet                                     ,
    440        _size_general_data                             ,
    441        _size_special_data                             ,
     462        size_general_data                             ,
     463        size_special_data                             ,
    442464       _max_nb_general_register                       ,
    443465       _max_nb_special_register                       ,
     
    449471       _read_unit_to_execution_unit_table_thread      );
    450472   
     473    log_printf(TRACE,Execute_loop,FUNCTION,"Parameters : execution_unit_to_write_unit");
     474
    451475    _param_execution_unit_to_write_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::network::execution_unit_to_write_unit::Parameters
    452476      (_nb_execute_unit                           ,
     477       _nb_execute_unit_port                      ,
    453478       _nb_write_unit                             ,
    454479       _nb_context                                ,
     
    456481       _nb_ooo_engine                             ,
    457482       _nb_packet                                 ,
    458        _size_general_data                         ,
    459        _size_special_data                         ,
     483        size_general_data                         ,
     484        size_special_data                         ,
    460485       _max_nb_general_register                   ,
    461486       _max_nb_special_register                   ,
     
    464489       _execution_unit_to_write_unit_table_thread );
    465490     
     491    log_printf(TRACE,Execute_loop,FUNCTION,"Parameters : register_unit");
     492
    466493    _param_register_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::Parameters
    467494        (_nb_ooo_engine             ,
    468          _size_general_data         ,
    469          _size_special_data         ,
     495          size_general_data         ,
     496          size_special_data         ,
    470497         _nb_gpr_read               ,
    471498         _nb_gpr_write              ,
     
    483510         _nb_inst_retire_rob        );
    484511
    485    
    486512    _max_size_dcache_context_id = 0;
    487513    _max_size_dcache_packet_id  = 0;
     
    494520
    495521    _have_port_dcache_context_id = (_max_size_dcache_context_id>1);
     522
     523
     524    if (is_toplevel)
     525      {
     526        _size_context_id         = log2(nb_context);
     527        _size_front_end_id       = log2(nb_front_end);
     528        _size_ooo_engine_id      = size_ooo_engine_id;
     529        _size_rob_ptr            = log2(nb_packet);
     530        _size_general_data       = size_general_data;
     531        _size_special_data       = size_special_data;
     532        _size_general_register   = size_general_register;
     533        _size_special_register   = size_special_register;
     534
     535        _size_store_queue_ptr    = log2(_max_size_store_queue);
     536        _size_load_queue_ptr     = log2(_max_size_load_queue );
     537       
     538        _have_port_context_id    = _size_context_id     > 0;
     539        _have_port_front_end_id  = _size_front_end_id   > 0;
     540        _have_port_ooo_engine_id = _size_ooo_engine_id  > 0;
     541        _have_port_rob_ptr       = _size_rob_ptr        > 0;
     542        _have_port_load_queue_ptr= _size_load_queue_ptr > 0;
     543
     544        copy();
     545      }
    496546
    497547    log_printf(FUNC,Execute_loop,FUNCTION,"End");
     
    511561#undef  FUNCTION
    512562#define FUNCTION "Execute_loop::~Parameters"
    513   Parameters::~Parameters ()
     563  Parameters::~Parameters (void)
    514564  {
    515565    log_printf(FUNC,Execute_loop,FUNCTION,"Begin");
    516566
     567    delete    _param_glue;
     568    for (uint32_t i=0; i<_nb_read_unit; i++)
     569      delete _param_read_unit [i];
    517570    delete [] _param_read_unit;
     571
     572    for (uint32_t i=0; i<_nb_execute_unit; i++)
     573      {
     574        uint32_t x = _translate_num_execute_unit [i];
     575
     576        if (_is_load_store_unit [i] == false)
     577          delete _param_functionnal_unit [x];
     578        else
     579          delete _param_load_store_unit [x];
     580      }
    518581    delete [] _param_functionnal_unit;
    519582    delete [] _param_load_store_unit;
     583    for (uint32_t i=0; i<_nb_write_unit; i++)
     584      delete _param_write_unit [i];
    520585    delete [] _param_write_unit;
    521586    delete    _param_read_unit_to_execution_unit;
     
    535600    delete [] _is_load_store_unit;
    536601    delete [] _translate_num_execute_unit;
     602    delete [] _nb_execute_unit_port;
     603    log_printf(FUNC,Execute_loop,FUNCTION,"End");
     604  };
     605
     606
     607#undef  FUNCTION
     608#define FUNCTION "Execute_loop::copy"
     609  void Parameters::copy (void)
     610  {
     611    log_printf(FUNC,Execute_loop,FUNCTION,"Begin");
     612
     613    COPY(_param_glue);
     614    for (uint32_t i=0; i<_nb_read_unit; i++)
     615      COPY(_param_read_unit [i]);
     616
     617    for (uint32_t i=0; i<_nb_execute_unit; i++)
     618      {
     619        uint32_t x = _translate_num_execute_unit [i];
     620
     621        if (_is_load_store_unit [i] == false)
     622          COPY(_param_functionnal_unit [x]);
     623        else
     624          COPY(_param_load_store_unit [x]);
     625      }
     626    for (uint32_t i=0; i<_nb_write_unit; i++)
     627      COPY(_param_write_unit [i]);
     628    COPY(_param_read_unit_to_execution_unit);
     629    COPY(_param_execution_unit_to_write_unit);
     630    COPY(_param_register_unit);
    537631
    538632    log_printf(FUNC,Execute_loop,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Parameters_msg_error.cpp

    r81 r88  
    2525    Parameters_test test ("Execute_loop");
    2626
     27    for (uint32_t i=0; i<_nb_functionnal_unit; i++)
     28      if (_nb_inst_functionnal_unit [i] != 1)
     29        test.error(toString(_("Functionnal_unit [%d] must treat once instruction.\n"),i));
     30
    2731    log_printf(FUNC,Execute_loop,FUNCTION,"End");
    2832
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Parameters_print.cpp

    r81 r88  
    6868        xml. singleton_begin("speculative_load             "); xml.attribut("value",toString(_speculative_load             [i])); xml.singleton_end();
    6969        xml. singleton_begin("nb_bypass_memory             "); xml.attribut("value",toString(_nb_bypass_memory             [i])); xml.singleton_end();
     70        xml. singleton_begin("nb_cache_port                "); xml.attribut("value",toString(_nb_cache_port                [i])); xml.singleton_end();
     71        xml. singleton_begin("nb_inst_memory               "); xml.attribut("value",toString(_nb_inst_memory               [i])); xml.singleton_end();
    7072        xml.balise_close();
    7173      }
     
    109111    str += _param_execution_unit_to_write_unit->print(depth+1);
    110112    str += _param_register_unit->print(depth+1);
     113    str += _param_glue->print(depth+1);
    111114
    112115    xml.comment("\n"+str);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/Makefile

    r83 r88  
    2424library_clean                   : Context_State_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/config_min.cfg

    r83 r88  
    221       1       +1      # nb_context
    331       1       +1      # nb_decod_unit
    4 1       1       +1      # nb_ooo_engine
    541       1       +1      # nb_inst_branch_complete
    650       0       +1      # size_depth                    [0] [nb_context]
    7630      30      +1      # size_address                 
    871       1       +1      # size_inst_decod               [0] [nb_decod_unit]
    9 1       1       +1      # size_inst_commit              [0] [nb_ooo_engine]
     81       1       +1      # size_inst_commit
    1090       0       +1      # link_context_to_decod_unit    [0] [nb_context]
    11 0       0       +1      # link_decod_unit_to_ooo_engine [0] [nb_decod_unit]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/config_mono_context.cfg

    r83 r88  
    221       1       +1      # nb_context
    331       1       *4      # nb_decod_unit
    4 1       1       *4      # nb_ooo_engine
    541       4       *4      # nb_inst_branch_complete
    650       2       +1      # size_depth                    [0] [nb_context]
    7630      30      +1      # size_address                 
    871       4       *4      # size_inst_decod               [0] [nb_decod_unit]
    9 1       4       *4      # size_inst_commit              [0] [nb_ooo_engine]
     81       4       *4      # size_inst_commit
    1090       0       +1      # link_context_to_decod_unit    [0] [nb_context]
    11 0       0       +1      # link_decod_unit_to_ooo_engine [0] [nb_decod_unit]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/config_multi_context.cfg

    r83 r88  
    228       8       +1      # nb_context
    334       4       *4      # nb_decod_unit
    4 2       2       *4      # nb_ooo_engine
    542       2       *4      # nb_inst_branch_complete
    654       4       +1      # size_depth                    [0] [nb_context]
     
    17162       2       *4      # size_inst_decod               [2] [nb_decod_unit]
    18174       4       *4      # size_inst_decod               [3] [nb_decod_unit]
    19 8       8       *4      # size_inst_commit              [0] [nb_ooo_engine]
    20 2       2       *4      # size_inst_commit              [1] [nb_ooo_engine]
     188       8       *4      # size_inst_commit
    21190       0       +1      # link_context_to_decod_unit    [0] [nb_context]
    22201       1       +1      # link_context_to_decod_unit    [1] [nb_context]
     
    27252       2       +1      # link_context_to_decod_unit    [6] [nb_context]
    28263       3       +1      # link_context_to_decod_unit    [7] [nb_context]
    29 0       0       +1      # link_decod_unit_to_ooo_engine [0] [nb_decod_unit]
    30 1       1       +1      # link_decod_unit_to_ooo_engine [1] [nb_decod_unit]
    31 0       0       +1      # link_decod_unit_to_ooo_engine [2] [nb_decod_unit]
    32 1       1       +1      # link_decod_unit_to_ooo_engine [3] [nb_decod_unit]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/src/main.cpp

    r83 r88  
    1616  err (_(" * nb_context                                    (uint32_t)\n"));
    1717  err (_(" * nb_decod_unit                                 (uint32_t)\n"));
    18   err (_(" * nb_ooo_engine                                 (uint32_t)\n"));
    1918  err (_(" * nb_inst_branch_complete                       (uint32_t)\n"));
    2019  err (_(" * size_depth                    [nb_context]    (uint32_t)\n"));
    2120  err (_(" * size_address                                  (uint32_t)\n"));
    2221  err (_(" * size_inst_decod               [nb_decod_unit] (uint32_t)\n"));
    23   err (_(" * size_inst_commit              [nb_ooo_engine] (uint32_t)\n"));
     22  err (_(" * size_inst_commit                              (uint32_t)\n"));
    2423  err (_(" * link_context_to_decod_unit    [nb_context]    (uint32_t)\n"));
    25   err (_(" * link_decod_unit_to_ooo_engine [nb_decod_unit] (uint32_t)\n"));
    2624
    2725  exit (1);
     
    4543  uint32_t   _nb_context              = fromString<uint32_t>(argv[x++]);
    4644  uint32_t   _nb_decod_unit           = fromString<uint32_t>(argv[x++]);
    47   uint32_t   _nb_ooo_engine           = fromString<uint32_t>(argv[x++]);
    4845  uint32_t   _nb_inst_branch_complete = fromString<uint32_t>(argv[x++]);
    4946
    50   if (argc != static_cast<int>(2+NB_PARAMS+2*_nb_context+2*_nb_decod_unit+1*_nb_ooo_engine))
     47  if (argc != static_cast<int>(2+NB_PARAMS+2*_nb_context+1*_nb_decod_unit))
    5148    usage (argc, argv);
    5249
     
    6057  for (uint32_t i=0; i<_nb_decod_unit; i++)
    6158    _size_inst_decod [i] = fromString<uint32_t>(argv[x++]);
    62   uint32_t * _size_inst_commit              = new uint32_t [_nb_ooo_engine];
    63   for (uint32_t i=0; i<_nb_ooo_engine; i++)
    64     _size_inst_commit [i] = fromString<uint32_t>(argv[x++]);
     59  uint32_t   _size_inst_commit              = fromString<uint32_t>(argv[x++]);
    6560  uint32_t * _link_context_to_decod_unit    = new uint32_t [_nb_context];
    6661  for (uint32_t i=0; i<_nb_context; i++)
    6762    _link_context_to_decod_unit [i] = fromString<uint32_t>(argv[x++]);
    68   uint32_t * _link_decod_unit_to_ooo_engine = new uint32_t [_nb_decod_unit];
    69   for (uint32_t i=0; i<_nb_decod_unit; i++)
    70     _link_decod_unit_to_ooo_engine [i] = fromString<uint32_t>(argv[x++]);
    7163
    7264  int _return = EXIT_SUCCESS;
     
    7668        (_nb_context                   ,
    7769         _nb_decod_unit                ,
    78          _nb_ooo_engine                ,
    7970         _nb_inst_branch_complete      ,
    8071         _size_depth                   ,
     
    8374         _size_inst_commit             ,
    8475         _link_context_to_decod_unit   ,
    85          _link_decod_unit_to_ooo_engine
     76         true
    8677         );
    8778     
     
    9889  delete [] _size_depth;                   
    9990  delete [] _size_inst_decod;             
    100   delete [] _size_inst_commit;             
    10191  delete [] _link_context_to_decod_unit;   
    102   delete [] _link_decod_unit_to_ooo_engine;
    10392
    10493  try
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/SelfTest/src/test.cpp

    r83 r88  
    4848  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    4949
     50  ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_VAL               ," in_BRANCH_EVENT_VAL               ",Tcontrol_t   ,_param->_nb_context);
     51  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ACK               ,"out_BRANCH_EVENT_ACK               ",Tcontrol_t   ,_param->_nb_context);
     52//ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_CONTEXT_ID        ," in_BRANCH_EVENT_CONTEXT_ID        ",Tcontext_t   ,_param->_nb_context);
     53//ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_DEPTH             ," in_BRANCH_EVENT_DEPTH             ",Tdepth_t     ,_param->_nb_context);
     54//ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_MISS_PREDICTION   ," in_BRANCH_EVENT_MISS_PREDICTION   ",Tcontrol_t   ,_param->_nb_context);
     55  ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_ADDRESS_SRC       ," in_BRANCH_EVENT_ADDRESS_SRC       ",Taddress_t   ,_param->_nb_context);
     56  ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_ADDRESS_DEST      ," in_BRANCH_EVENT_ADDRESS_DEST      ",Taddress_t   ,_param->_nb_context);
     57
    5058  ALLOC1_SC_SIGNAL( in_DECOD_EVENT_VAL                ," in_DECOD_EVENT_VAL                ",Tcontrol_t   ,_param->_nb_decod_unit);
    5159  ALLOC1_SC_SIGNAL(out_DECOD_EVENT_ACK                ,"out_DECOD_EVENT_ACK                ",Tcontrol_t   ,_param->_nb_decod_unit);
     
    5765  ALLOC1_SC_SIGNAL( in_DECOD_EVENT_ADDRESS_EPCR       ," in_DECOD_EVENT_ADDRESS_EPCR       ",Taddress_t   ,_param->_nb_decod_unit);
    5866                                                                                           
    59   ALLOC1_SC_SIGNAL( in_COMMIT_EVENT_VAL               ," in_COMMIT_EVENT_VAL               ",Tcontrol_t   ,_param->_nb_ooo_engine);
    60   ALLOC1_SC_SIGNAL(out_COMMIT_EVENT_ACK               ,"out_COMMIT_EVENT_ACK               ",Tcontrol_t   ,_param->_nb_ooo_engine);
    61   ALLOC1_SC_SIGNAL( in_COMMIT_EVENT_CONTEXT_ID        ," in_COMMIT_EVENT_CONTEXT_ID        ",Tcontext_t   ,_param->_nb_ooo_engine);
    62   ALLOC1_SC_SIGNAL( in_COMMIT_EVENT_DEPTH             ," in_COMMIT_EVENT_DEPTH             ",Tdepth_t     ,_param->_nb_ooo_engine);
    63   ALLOC1_SC_SIGNAL( in_COMMIT_EVENT_TYPE              ," in_COMMIT_EVENT_TYPE              ",Tevent_type_t,_param->_nb_ooo_engine);
    64   ALLOC1_SC_SIGNAL( in_COMMIT_EVENT_IS_DELAY_SLOT     ," in_COMMIT_EVENT_IS_DELAY_SLOT     ",Tcontrol_t   ,_param->_nb_ooo_engine);
    65   ALLOC1_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS           ," in_COMMIT_EVENT_ADDRESS           ",Taddress_t   ,_param->_nb_ooo_engine);
    66   ALLOC1_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EPCR      ," in_COMMIT_EVENT_ADDRESS_EPCR      ",Taddress_t   ,_param->_nb_ooo_engine);
    67   ALLOC1_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EEAR_VAL  ," in_COMMIT_EVENT_ADDRESS_EEAR_VAL  ",Tcontrol_t   ,_param->_nb_ooo_engine);
    68   ALLOC1_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EEAR      ," in_COMMIT_EVENT_ADDRESS_EEAR      ",Taddress_t   ,_param->_nb_ooo_engine);
     67  ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_VAL               ," in_COMMIT_EVENT_VAL               ",Tcontrol_t   );
     68  ALLOC_SC_SIGNAL (out_COMMIT_EVENT_ACK               ,"out_COMMIT_EVENT_ACK               ",Tcontrol_t   );
     69  ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_CONTEXT_ID        ," in_COMMIT_EVENT_CONTEXT_ID        ",Tcontext_t   );
     70  ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_DEPTH             ," in_COMMIT_EVENT_DEPTH             ",Tdepth_t     );
     71  ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_TYPE              ," in_COMMIT_EVENT_TYPE              ",Tevent_type_t);
     72  ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_IS_DELAY_SLOT     ," in_COMMIT_EVENT_IS_DELAY_SLOT     ",Tcontrol_t   );
     73  ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS           ," in_COMMIT_EVENT_ADDRESS           ",Taddress_t   );
     74  ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR      ," in_COMMIT_EVENT_ADDRESS_EPCR      ",Taddress_t   );
     75  ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL  ," in_COMMIT_EVENT_ADDRESS_EEAR_VAL  ",Tcontrol_t   );
     76  ALLOC_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EEAR      ," in_COMMIT_EVENT_ADDRESS_EEAR      ",Taddress_t   );
    6977
    7078  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL            ," in_BRANCH_COMPLETE_VAL            ",Tcontrol_t   ,_param->_nb_inst_branch_complete);
     
    7886
    7987                                                                                           
    80   ALLOC1_SC_SIGNAL( in_NB_INST_DECOD_ALL              ," in_NB_INST_DECOD_ALL              ",Tcounter_t   ,_param->_nb_decod_unit);
    81   ALLOC1_SC_SIGNAL( in_NB_INST_COMMIT_ALL             ," in_NB_INST_COMMIT_ALL             ",Tcounter_t   ,_param->_nb_ooo_engine);
    82   ALLOC1_SC_SIGNAL( in_NB_INST_COMMIT_MEM             ," in_NB_INST_COMMIT_MEM             ",Tcounter_t   ,_param->_nb_ooo_engine);
     88  ALLOC1_SC_SIGNAL( in_NB_INST_DECOD_ALL              ," in_NB_INST_DECOD_ALL              ",Tcounter_t   ,_param->_nb_context   );
     89  ALLOC1_SC_SIGNAL( in_NB_INST_COMMIT_ALL             ," in_NB_INST_COMMIT_ALL             ",Tcounter_t   ,_param->_nb_context   );
     90  ALLOC1_SC_SIGNAL( in_NB_INST_COMMIT_MEM             ," in_NB_INST_COMMIT_MEM             ",Tcounter_t   ,_param->_nb_context   );
    8391                                                                                           
    8492  ALLOC1_SC_SIGNAL(out_EVENT_VAL                      ,"out_EVENT_VAL                      ",Tcontrol_t   ,_param->_nb_context   );
     
    8997  ALLOC1_SC_SIGNAL(out_EVENT_IS_DS_TAKE               ,"out_EVENT_IS_DS_TAKE               ",Tcontrol_t   ,_param->_nb_context   );
    9098                                                                                           
    91   ALLOC1_SC_SIGNAL(out_SPR_VAL                        ,"out_SPR_VAL                        ",Tcontrol_t   ,_param->_nb_context   );
    92   ALLOC1_SC_SIGNAL( in_SPR_ACK                        ," in_SPR_ACK                        ",Tcontrol_t   ,_param->_nb_context   );
    93   ALLOC1_SC_SIGNAL(out_SPR_EPCR                       ,"out_SPR_EPCR                       ",Taddress_t   ,_param->_nb_context   );
    94   ALLOC1_SC_SIGNAL(out_SPR_EEAR                       ,"out_SPR_EEAR                       ",Taddress_t   ,_param->_nb_context   );
    95   ALLOC1_SC_SIGNAL(out_SPR_EEAR_WEN                   ,"out_SPR_EEAR_WEN                   ",Tcontrol_t   ,_param->_nb_context   );
    96   ALLOC1_SC_SIGNAL(out_SPR_SR_DSX                     ,"out_SPR_SR_DSX                     ",Tcontrol_t   ,_param->_nb_context   );
    97   ALLOC1_SC_SIGNAL(out_SPR_SR_TO_ESR                  ,"out_SPR_SR_TO_ESR                  ",Tcontrol_t   ,_param->_nb_context   );
     99  ALLOC1_SC_SIGNAL(out_SPR_EVENT_VAL                  ,"out_SPR_EVENT_VAL                  ",Tcontrol_t   ,_param->_nb_context   );
     100  ALLOC1_SC_SIGNAL( in_SPR_EVENT_ACK                  ," in_SPR_EVENT_ACK                  ",Tcontrol_t   ,_param->_nb_context   );
     101  ALLOC1_SC_SIGNAL(out_SPR_EVENT_EPCR                 ,"out_SPR_EVENT_EPCR                 ",Taddress_t   ,_param->_nb_context   );
     102  ALLOC1_SC_SIGNAL(out_SPR_EVENT_EEAR                 ,"out_SPR_EVENT_EEAR                 ",Taddress_t   ,_param->_nb_context   );
     103  ALLOC1_SC_SIGNAL(out_SPR_EVENT_EEAR_WEN             ,"out_SPR_EVENT_EEAR_WEN             ",Tcontrol_t   ,_param->_nb_context   );
     104  ALLOC1_SC_SIGNAL(out_SPR_EVENT_SR_DSX               ,"out_SPR_EVENT_SR_DSX               ",Tcontrol_t   ,_param->_nb_context   );
     105  ALLOC1_SC_SIGNAL(out_SPR_EVENT_SR_TO_ESR            ,"out_SPR_EVENT_SR_TO_ESR            ",Tcontrol_t   ,_param->_nb_context   );
    98106                                                                                           
    99107  ALLOC1_SC_SIGNAL(out_CONTEXT_DECOD_ENABLE           ,"out_CONTEXT_DECOD_ENABLE           ",Tcontrol_t   ,_param->_nb_context   );
    100108                                                                                           
    101   ALLOC1_SC_SIGNAL( in_DEPTH_TAIL                     ," in_DEPTH_TAIL                     ",Tdepth_t     ,_param->_nb_context   );
     109  ALLOC1_SC_SIGNAL( in_DEPTH_MIN                      ," in_DEPTH_MIN                      ",Tdepth_t     ,_param->_nb_context   );
    102110 
     111  ALLOC1_SC_SIGNAL( in_SPR_SR_IEE                     ," in_SPR_SR_IEE                     ",Tcontrol_t   ,_param->_nb_context   );
     112  ALLOC1_SC_SIGNAL( in_SPR_SR_EPH                     ," in_SPR_SR_EPH                     ",Tcontrol_t   ,_param->_nb_context   );
     113
     114  ALLOC1_SC_SIGNAL( in_INTERRUPT_ENABLE               ," in_INTERRUPT_ENABLE               ",Tcontrol_t   ,_param->_nb_context   );
     115
    103116  /********************************************************
    104117   * Instanciation
     
    110123  (*(_Context_State->in_NRESET))       (*(in_NRESET));
    111124
     125  INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_EVENT_VAL               ,_param->_nb_context);
     126  INSTANCE1_SC_SIGNAL(_Context_State,out_BRANCH_EVENT_ACK               ,_param->_nb_context);
     127//INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_EVENT_CONTEXT_ID        ,_param->_nb_context);
     128//INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_EVENT_DEPTH             ,_param->_nb_context);
     129//INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_EVENT_MISS_PREDICTION   ,_param->_nb_context);
     130  INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_EVENT_ADDRESS_SRC       ,_param->_nb_context);
     131  INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_EVENT_ADDRESS_DEST      ,_param->_nb_context);
    112132  INSTANCE1_SC_SIGNAL(_Context_State, in_DECOD_EVENT_VAL                ,_param->_nb_decod_unit);
    113133  INSTANCE1_SC_SIGNAL(_Context_State,out_DECOD_EVENT_ACK                ,_param->_nb_decod_unit);
    114134  if (_param->_have_port_context_id)                                   
    115135  INSTANCE1_SC_SIGNAL(_Context_State, in_DECOD_EVENT_CONTEXT_ID         ,_param->_nb_decod_unit);
    116   if (_param->_have_port_max_depth)                                     
     136  if (_param->_have_port_depth)                                 
    117137  INSTANCE1_SC_SIGNAL(_Context_State, in_DECOD_EVENT_DEPTH              ,_param->_nb_decod_unit);
    118138  INSTANCE1_SC_SIGNAL(_Context_State, in_DECOD_EVENT_TYPE               ,_param->_nb_decod_unit);
     
    121141  INSTANCE1_SC_SIGNAL(_Context_State, in_DECOD_EVENT_ADDRESS_EPCR       ,_param->_nb_decod_unit);
    122142                                                                       
    123   INSTANCE1_SC_SIGNAL(_Context_State, in_COMMIT_EVENT_VAL               ,_param->_nb_ooo_engine);
    124   INSTANCE1_SC_SIGNAL(_Context_State,out_COMMIT_EVENT_ACK               ,_param->_nb_ooo_engine);
     143  INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_VAL               );
     144  INSTANCE_SC_SIGNAL (_Context_State,out_COMMIT_EVENT_ACK               );
    125145  if (_param->_have_port_context_id)                                   
    126   INSTANCE1_SC_SIGNAL(_Context_State, in_COMMIT_EVENT_CONTEXT_ID        ,_param->_nb_ooo_engine);
    127   if (_param->_have_port_max_depth)                                     
    128   INSTANCE1_SC_SIGNAL(_Context_State, in_COMMIT_EVENT_DEPTH             ,_param->_nb_ooo_engine);
    129   INSTANCE1_SC_SIGNAL(_Context_State, in_COMMIT_EVENT_TYPE              ,_param->_nb_ooo_engine);
    130   INSTANCE1_SC_SIGNAL(_Context_State, in_COMMIT_EVENT_IS_DELAY_SLOT     ,_param->_nb_ooo_engine);
    131   INSTANCE1_SC_SIGNAL(_Context_State, in_COMMIT_EVENT_ADDRESS           ,_param->_nb_ooo_engine);
    132   INSTANCE1_SC_SIGNAL(_Context_State, in_COMMIT_EVENT_ADDRESS_EPCR      ,_param->_nb_ooo_engine);
    133   INSTANCE1_SC_SIGNAL(_Context_State, in_COMMIT_EVENT_ADDRESS_EEAR_VAL  ,_param->_nb_ooo_engine);
    134   INSTANCE1_SC_SIGNAL(_Context_State, in_COMMIT_EVENT_ADDRESS_EEAR      ,_param->_nb_ooo_engine);
     146  INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_CONTEXT_ID        );
     147  if (_param->_have_port_depth)                                 
     148  INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_DEPTH             );
     149  INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_TYPE              );
     150  INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_IS_DELAY_SLOT     );
     151  INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_ADDRESS           );
     152  INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_ADDRESS_EPCR      );
     153  INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_ADDRESS_EEAR_VAL  );
     154  INSTANCE_SC_SIGNAL (_Context_State, in_COMMIT_EVENT_ADDRESS_EEAR      );
    135155
    136156  INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_COMPLETE_VAL            ,_param->_nb_inst_branch_complete);
     
    138158  if (_param->_have_port_context_id)                                   
    139159  INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_COMPLETE_CONTEXT_ID     ,_param->_nb_inst_branch_complete);
    140   if (_param->_have_port_max_depth)                                     
     160  if (_param->_have_port_depth)                                 
    141161  INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_COMPLETE_DEPTH          ,_param->_nb_inst_branch_complete);
    142162  INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete);
     
    145165  INSTANCE1_SC_SIGNAL(_Context_State, in_BRANCH_COMPLETE_ADDRESS_DEST   ,_param->_nb_inst_branch_complete);
    146166
    147   INSTANCE1_SC_SIGNAL(_Context_State, in_NB_INST_DECOD_ALL              ,_param->_nb_decod_unit);
    148   INSTANCE1_SC_SIGNAL(_Context_State, in_NB_INST_COMMIT_ALL             ,_param->_nb_ooo_engine);
    149   INSTANCE1_SC_SIGNAL(_Context_State, in_NB_INST_COMMIT_MEM             ,_param->_nb_ooo_engine);
     167  INSTANCE1_SC_SIGNAL(_Context_State, in_NB_INST_DECOD_ALL              ,_param->_nb_context   );
     168  INSTANCE1_SC_SIGNAL(_Context_State, in_NB_INST_COMMIT_ALL             ,_param->_nb_context   );
     169  INSTANCE1_SC_SIGNAL(_Context_State, in_NB_INST_COMMIT_MEM             ,_param->_nb_context   );
    150170                                                                       
    151171  INSTANCE1_SC_SIGNAL(_Context_State,out_EVENT_VAL                      ,_param->_nb_context   );
     
    156176  INSTANCE1_SC_SIGNAL(_Context_State,out_EVENT_IS_DS_TAKE               ,_param->_nb_context   );
    157177                                                                       
    158   INSTANCE1_SC_SIGNAL(_Context_State,out_SPR_VAL                        ,_param->_nb_context   );
    159   INSTANCE1_SC_SIGNAL(_Context_State, in_SPR_ACK                        ,_param->_nb_context   );
    160   INSTANCE1_SC_SIGNAL(_Context_State,out_SPR_EPCR                       ,_param->_nb_context   );
    161   INSTANCE1_SC_SIGNAL(_Context_State,out_SPR_EEAR                       ,_param->_nb_context   );
    162   INSTANCE1_SC_SIGNAL(_Context_State,out_SPR_EEAR_WEN                   ,_param->_nb_context   );
    163   INSTANCE1_SC_SIGNAL(_Context_State,out_SPR_SR_DSX                     ,_param->_nb_context   );
    164   INSTANCE1_SC_SIGNAL(_Context_State,out_SPR_SR_TO_ESR                  ,_param->_nb_context   );
     178  INSTANCE1_SC_SIGNAL(_Context_State,out_SPR_EVENT_VAL                  ,_param->_nb_context   );
     179  INSTANCE1_SC_SIGNAL(_Context_State, in_SPR_EVENT_ACK                  ,_param->_nb_context   );
     180  INSTANCE1_SC_SIGNAL(_Context_State,out_SPR_EVENT_EPCR                 ,_param->_nb_context   );
     181  INSTANCE1_SC_SIGNAL(_Context_State,out_SPR_EVENT_EEAR                 ,_param->_nb_context   );
     182  INSTANCE1_SC_SIGNAL(_Context_State,out_SPR_EVENT_EEAR_WEN             ,_param->_nb_context   );
     183  INSTANCE1_SC_SIGNAL(_Context_State,out_SPR_EVENT_SR_DSX               ,_param->_nb_context   );
     184  INSTANCE1_SC_SIGNAL(_Context_State,out_SPR_EVENT_SR_TO_ESR            ,_param->_nb_context   );
    165185                                                                       
    166186  INSTANCE1_SC_SIGNAL(_Context_State,out_CONTEXT_DECOD_ENABLE           ,_param->_nb_context   );
    167187
    168188  for (uint32_t i=0; i<_param->_nb_context; i++)
    169     if (_param->_have_port_depth [i])
    170       INSTANCE_SC_SIGNAL(_Context_State, in_DEPTH_TAIL [i]);
     189    if (_param->_have_port_depth)
     190      INSTANCE_SC_SIGNAL(_Context_State, in_DEPTH_MIN [i]);
     191
     192  INSTANCE1_SC_SIGNAL(_Context_State, in_SPR_SR_IEE                     ,_param->_nb_context   );
     193  INSTANCE1_SC_SIGNAL(_Context_State, in_SPR_SR_EPH                     ,_param->_nb_context   );
     194
     195  INSTANCE1_SC_SIGNAL(_Context_State, in_INTERRUPT_ENABLE               ,_param->_nb_context   );
    171196
    172197  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    206231      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
    207232        in_DECOD_EVENT_VAL [i]->write(0);
    208       for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    209         in_COMMIT_EVENT_VAL [i]->write(0);
     233      in_COMMIT_EVENT_VAL ->write(0);
    210234      for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
    211235        in_BRANCH_COMPLETE_VAL [i]->write(0);
     
    213237      for (uint32_t i=0; i<_param->_nb_context; i++)
    214238        {
    215           in_EVENT_ACK [i]->write(0);
    216           in_SPR_ACK   [i]->write(0);
     239          in_BRANCH_EVENT_VAL [i]->write(0);
     240          in_EVENT_ACK        [i]->write(0);
     241          in_SPR_EVENT_ACK    [i]->write(0);
     242          in_SPR_SR_IEE       [i]->write(0);
     243          in_SPR_SR_EPH       [i]->write(0);
     244          in_INTERRUPT_ENABLE [i]->write(0);
    217245
    218246          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[i]->read(), 1);
     
    220248
    221249      for (uint32_t i=0; i<_param->_nb_context; i++)
    222         if (_param->_have_port_depth [i])
    223           in_DEPTH_TAIL [i]->write(i%_param->_size_depth[i]);
     250        if (_param->_have_port_depth)
     251          in_DEPTH_MIN  [i]->write((_param->_array_size_depth[i]==0)?0:(i%_param->_array_size_depth[i]));
    224252     
    225253      uint32_t context    = rand()%_param->_nb_context;
    226       uint32_t decod_unit = _param->_link_context_to_decod_unit    [context];
    227       uint32_t ooo_engine = _param->_link_decod_unit_to_ooo_engine [decod_unit];
    228254
    229255      if (1)
     
    232258         
    233259          LABEL("msync (begin)");
    234           in_NB_INST_DECOD_ALL  [decod_unit]->write(1);
    235           in_NB_INST_COMMIT_ALL [ooo_engine]->write(1);
    236           in_NB_INST_COMMIT_MEM [ooo_engine]->write(1);
     260          in_NB_INST_DECOD_ALL  [context]->write(1);
     261          in_NB_INST_COMMIT_ALL [context]->write(1);
     262          in_NB_INST_COMMIT_MEM [context]->write(1);
    237263         
    238264          uint32_t port = rand()%_param->_nb_decod_unit;
     
    242268          in_DECOD_EVENT_ADDRESS       [port]->write(0x100);
    243269          in_DECOD_EVENT_ADDRESS_EPCR  [port]->write(0xdeadbeef);
    244           if (_param->_have_port_depth [context])
    245           in_DECOD_EVENT_DEPTH         [port]->write((context+1)%_param->_size_depth[context]);
     270          if (_param->_have_port_depth)
     271          in_DECOD_EVENT_DEPTH         [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
    246272          in_DECOD_EVENT_TYPE          [port]->write(EVENT_TYPE_MSYNC);
    247273         
     
    263289          SC_START(3);
    264290         
    265           in_NB_INST_DECOD_ALL  [decod_unit]->write(0);
    266           in_NB_INST_COMMIT_ALL [ooo_engine]->write(1);
    267           in_NB_INST_COMMIT_MEM [ooo_engine]->write(0);
     291          in_NB_INST_DECOD_ALL  [context]->write(0);
     292          in_NB_INST_COMMIT_ALL [context]->write(1);
     293          in_NB_INST_COMMIT_MEM [context]->write(0);
    268294         
    269295          SC_START(1);
     
    274300          SC_START(3);
    275301         
    276           in_NB_INST_DECOD_ALL  [decod_unit]->write(1);
     302          in_NB_INST_DECOD_ALL  [context]->write(1);
    277303          SC_START(1);
    278304         
    279305          LABEL("msync (wait end)");
    280306          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0);
    281           in_NB_INST_DECOD_ALL  [decod_unit]->write(0);
    282           in_NB_INST_COMMIT_MEM [ooo_engine]->write(1);
    283          
    284           SC_START(3);
    285          
    286           in_NB_INST_COMMIT_MEM [ooo_engine]->write(0);
     307          in_NB_INST_DECOD_ALL  [context]->write(0);
     308          in_NB_INST_COMMIT_MEM [context]->write(1);
     309         
     310          SC_START(3);
     311         
     312          in_NB_INST_COMMIT_MEM [context]->write(0);
    287313          SC_START(1);
    288314          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     
    294320
    295321          LABEL("psync (begin)");
    296           in_NB_INST_DECOD_ALL  [decod_unit]->write(1);
    297           in_NB_INST_COMMIT_ALL [ooo_engine]->write(1);
    298           in_NB_INST_COMMIT_MEM [ooo_engine]->write(1);
     322          in_NB_INST_DECOD_ALL  [context]->write(1);
     323          in_NB_INST_COMMIT_ALL [context]->write(1);
     324          in_NB_INST_COMMIT_MEM [context]->write(1);
    299325         
    300326          uint32_t port = rand()%_param->_nb_decod_unit;
     
    304330          in_DECOD_EVENT_ADDRESS       [port]->write(0x200);
    305331          in_DECOD_EVENT_ADDRESS_EPCR  [port]->write(0xdeadbebe);
    306           if (_param->_have_port_depth [context])
    307           in_DECOD_EVENT_DEPTH         [port]->write((context+1)%_param->_size_depth[context]);
     332          if (_param->_have_port_depth)
     333          in_DECOD_EVENT_DEPTH         [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
    308334          in_DECOD_EVENT_TYPE          [port]->write(EVENT_TYPE_PSYNC);
    309335         
     
    325351          SC_START(3);
    326352         
    327           in_NB_INST_DECOD_ALL  [decod_unit]->write(0);
    328           in_NB_INST_COMMIT_ALL [ooo_engine]->write(0);
    329           in_NB_INST_COMMIT_MEM [ooo_engine]->write(0);
     353          in_NB_INST_DECOD_ALL  [context]->write(0);
     354          in_NB_INST_COMMIT_ALL [context]->write(0);
     355          in_NB_INST_COMMIT_MEM [context]->write(0);
    330356         
    331357          SC_START(1);
     
    361387
    362388          LABEL("csync (begin)");
    363           in_NB_INST_DECOD_ALL  [decod_unit]->write(1);
    364           in_NB_INST_COMMIT_ALL [ooo_engine]->write(1);
    365           in_NB_INST_COMMIT_MEM [ooo_engine]->write(1);
     389          in_NB_INST_DECOD_ALL  [context]->write(1);
     390          in_NB_INST_COMMIT_ALL [context]->write(1);
     391          in_NB_INST_COMMIT_MEM [context]->write(1);
    366392         
    367393          uint32_t port = rand()%_param->_nb_decod_unit;
     
    371397          in_DECOD_EVENT_ADDRESS       [port]->write(0x200);
    372398          in_DECOD_EVENT_ADDRESS_EPCR  [port]->write(0xdeadbebe);
    373           if (_param->_have_port_depth [context])
    374           in_DECOD_EVENT_DEPTH         [port]->write((context+1)%_param->_size_depth[context]);
     399          if (_param->_have_port_depth)
     400          in_DECOD_EVENT_DEPTH         [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
    375401          in_DECOD_EVENT_TYPE          [port]->write(EVENT_TYPE_CSYNC);
    376402         
     
    392418          SC_START(3);
    393419         
    394           in_NB_INST_DECOD_ALL  [decod_unit]->write(0);
    395           in_NB_INST_COMMIT_ALL [ooo_engine]->write(0);
    396           in_NB_INST_COMMIT_MEM [ooo_engine]->write(0);
     420          in_NB_INST_DECOD_ALL  [context]->write(0);
     421          in_NB_INST_COMMIT_ALL [context]->write(0);
     422          in_NB_INST_COMMIT_MEM [context]->write(0);
    397423         
    398424          SC_START(1);
     
    426452         
    427453          LABEL("spr (begin)");
    428           in_NB_INST_DECOD_ALL  [decod_unit]->write(1);
    429           in_NB_INST_COMMIT_ALL [ooo_engine]->write(1);
    430           in_NB_INST_COMMIT_MEM [ooo_engine]->write(1);
     454          in_NB_INST_DECOD_ALL  [context]->write(1);
     455          in_NB_INST_COMMIT_ALL [context]->write(1);
     456          in_NB_INST_COMMIT_MEM [context]->write(1);
    431457         
    432458          uint32_t port = rand()%_param->_nb_decod_unit;
     
    436462          in_DECOD_EVENT_ADDRESS       [port]->write(0x100);
    437463          in_DECOD_EVENT_ADDRESS_EPCR  [port]->write(0xdeadbeef);
    438           if (_param->_have_port_depth [context])
    439           in_DECOD_EVENT_DEPTH         [port]->write((context+1)%_param->_size_depth[context]);
     464          if (_param->_have_port_depth)
     465          in_DECOD_EVENT_DEPTH         [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
    440466          in_DECOD_EVENT_TYPE          [port]->write(EVENT_TYPE_SPR_ACCESS);
    441467         
     
    457483          SC_START(3);
    458484         
    459           in_NB_INST_DECOD_ALL  [decod_unit]->write(0);
    460           in_NB_INST_COMMIT_ALL [ooo_engine]->write(0);
    461           in_NB_INST_COMMIT_MEM [ooo_engine]->write(0);
     485          in_NB_INST_DECOD_ALL  [context]->write(0);
     486          in_NB_INST_COMMIT_ALL [context]->write(0);
     487          in_NB_INST_COMMIT_MEM [context]->write(0);
    462488         
    463489          SC_START(1);
     
    468494          SC_START(3);
    469495         
    470           in_NB_INST_DECOD_ALL  [decod_unit]->write(1);
     496          in_NB_INST_DECOD_ALL  [context]->write(1);
    471497          SC_START(1);
    472498         
    473499          LABEL("spr (wait end)");
    474500          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 0);
    475           in_NB_INST_DECOD_ALL  [decod_unit]->write(0);
    476           in_NB_INST_COMMIT_ALL [ooo_engine]->write(1);
    477          
    478           SC_START(3);
    479          
    480           in_NB_INST_COMMIT_ALL [ooo_engine]->write(0);
     501          in_NB_INST_DECOD_ALL  [context]->write(0);
     502          in_NB_INST_COMMIT_ALL [context]->write(1);
     503         
     504          SC_START(3);
     505         
     506          in_NB_INST_COMMIT_ALL [context]->write(0);
    481507          SC_START(1);
    482508          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     
    488514         
    489515          LABEL("miss (begin)");
    490           in_NB_INST_DECOD_ALL  [decod_unit]->write(1);
    491           in_NB_INST_COMMIT_ALL [ooo_engine]->write(1);
    492           in_NB_INST_COMMIT_MEM [ooo_engine]->write(1);
     516          in_NB_INST_DECOD_ALL  [context]->write(1);
     517          in_NB_INST_COMMIT_ALL [context]->write(1);
     518          in_NB_INST_COMMIT_MEM [context]->write(1);
    493519         
    494520          uint32_t port = rand()%_param->_nb_inst_branch_complete;
    495521         
    496522          in_BRANCH_COMPLETE_CONTEXT_ID       [port]->write(context);
    497           if (_param->_have_port_depth [context])
    498           in_BRANCH_COMPLETE_DEPTH            [port]->write((context+1)%_param->_size_depth[context]);
     523          if (_param->_have_port_depth)
     524          in_BRANCH_COMPLETE_DEPTH            [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
    499525          in_BRANCH_COMPLETE_ADDRESS_SRC      [port]->write(0x400);
    500526          in_BRANCH_COMPLETE_ADDRESS_DEST     [port]->write(0x500);
     
    519545          SC_START(3);
    520546         
    521           in_NB_INST_DECOD_ALL  [decod_unit]->write(0);
    522           in_NB_INST_COMMIT_ALL [ooo_engine]->write(0);
    523           in_NB_INST_COMMIT_MEM [ooo_engine]->write(0);
     547          in_NB_INST_DECOD_ALL  [context]->write(0);
     548          in_NB_INST_COMMIT_ALL [context]->write(0);
     549          in_NB_INST_COMMIT_MEM [context]->write(0);
    524550         
    525551          SC_START(1);
     
    558584         
    559585          LABEL("miss (begin)");
    560           in_NB_INST_DECOD_ALL  [decod_unit]->write(1);
    561           in_NB_INST_COMMIT_ALL [ooo_engine]->write(1);
    562           in_NB_INST_COMMIT_MEM [ooo_engine]->write(1);
     586          in_NB_INST_DECOD_ALL  [context]->write(1);
     587          in_NB_INST_COMMIT_ALL [context]->write(1);
     588          in_NB_INST_COMMIT_MEM [context]->write(1);
    563589         
    564590          uint32_t port = rand()%_param->_nb_inst_branch_complete;
    565591         
    566592          in_BRANCH_COMPLETE_CONTEXT_ID       [port]->write(context);
    567           if (_param->_have_port_depth [context])
    568           in_BRANCH_COMPLETE_DEPTH            [port]->write((context+1)%_param->_size_depth[context]);
     593          if (_param->_have_port_depth)
     594          in_BRANCH_COMPLETE_DEPTH            [port]->write((_param->_array_size_depth[context]==0)?0:((context+1)%_param->_array_size_depth[context]));
    569595          in_BRANCH_COMPLETE_ADDRESS_SRC      [port]->write(0x600);
    570596          in_BRANCH_COMPLETE_ADDRESS_DEST     [port]->write(0x700);
     
    589615          SC_START(3);
    590616         
    591           in_NB_INST_DECOD_ALL  [decod_unit]->write(0);
    592           in_NB_INST_COMMIT_ALL [ooo_engine]->write(0);
    593           in_NB_INST_COMMIT_MEM [ooo_engine]->write(0);
     617          in_NB_INST_DECOD_ALL  [context]->write(0);
     618          in_NB_INST_COMMIT_ALL [context]->write(0);
     619          in_NB_INST_COMMIT_MEM [context]->write(0);
    594620         
    595621          SC_START(1);
     
    626652         
    627653          LABEL("exception (begin)");
    628           in_NB_INST_DECOD_ALL  [decod_unit]->write(1);
    629           in_NB_INST_COMMIT_ALL [ooo_engine]->write(1);
    630           in_NB_INST_COMMIT_MEM [ooo_engine]->write(1);
    631          
    632           uint32_t port = rand()%_param->_nb_ooo_engine;
     654          in_NB_INST_DECOD_ALL  [context]->write(1);
     655          in_NB_INST_COMMIT_ALL [context]->write(1);
     656          in_NB_INST_COMMIT_MEM [context]->write(1);
     657         
     658          uint32_t port = rand()%_param->_nb_decod_unit;
    633659         
    634660          in_DECOD_EVENT_CONTEXT_ID       [port]->write(context);
    635           if (_param->_have_port_depth [context])
    636           in_DECOD_EVENT_DEPTH            [port]->write((context)%_param->_size_depth[context]);
     661          if (_param->_have_port_depth)
     662          in_DECOD_EVENT_DEPTH            [port]->write((_param->_array_size_depth[context]==0)?0:((context)%_param->_array_size_depth[context]));
    637663          in_DECOD_EVENT_TYPE             [port]->write(EVENT_TYPE_EXCEPTION);
    638664          in_DECOD_EVENT_IS_DELAY_SLOT    [port]->write(0);
     
    657683          SC_START(3);
    658684         
    659           in_NB_INST_DECOD_ALL  [decod_unit]->write(0);
    660           in_NB_INST_COMMIT_ALL [ooo_engine]->write(0);
    661           in_NB_INST_COMMIT_MEM [ooo_engine]->write(0);
     685          in_NB_INST_DECOD_ALL  [context]->write(0);
     686          in_NB_INST_COMMIT_ALL [context]->write(0);
     687          in_NB_INST_COMMIT_MEM [context]->write(0);
    662688         
    663689          SC_START(1);
     
    693719          do
    694720            {
    695               in_SPR_ACK [context]->write(rand()%percent_transaction_spr);
    696          
    697               SC_START(0);
    698          
    699               if (out_SPR_VAL [context]->read() and in_SPR_ACK [context]->read())
    700                 {
    701                   TEST(Taddress_t,out_SPR_EPCR      [context]->read(),0x900);
    702                 //TEST(Taddress_t,out_SPR_EEAR      [context]->read(),);
    703                   TEST(Tcontrol_t,out_SPR_EEAR_WEN  [context]->read(),0);
    704                   TEST(Tcontrol_t,out_SPR_SR_DSX    [context]->read(),0);
    705                   TEST(Tcontrol_t,out_SPR_SR_TO_ESR [context]->read(),1);
    706                  
    707                   find = true;
    708                 }
    709              
    710               SC_START(1);
    711             }
    712           while (not find);
    713 
    714           in_SPR_ACK [context]->write(0);
     721              in_SPR_EVENT_ACK [context]->write(rand()%percent_transaction_spr);
     722         
     723              SC_START(0);
     724         
     725              if (out_SPR_EVENT_VAL [context]->read() and in_SPR_EVENT_ACK [context]->read())
     726                {
     727                  TEST(Taddress_t,out_SPR_EVENT_EPCR      [context]->read(),0x900);
     728                //TEST(Taddress_t,out_SPR_EVENT_EEAR      [context]->read(),);
     729                  TEST(Tcontrol_t,out_SPR_EVENT_EEAR_WEN  [context]->read(),0);
     730                  TEST(Tcontrol_t,out_SPR_EVENT_SR_DSX    [context]->read(),0);
     731                  TEST(Tcontrol_t,out_SPR_EVENT_SR_TO_ESR [context]->read(),1);
     732                 
     733                  find = true;
     734                }
     735             
     736              SC_START(1);
     737            }
     738          while (not find);
     739
     740          in_SPR_EVENT_ACK [context]->write(0);
    715741        }
    716742
     
    720746         
    721747          LABEL("exception (begin)");
    722           in_NB_INST_DECOD_ALL  [decod_unit]->write(1);
    723           in_NB_INST_COMMIT_ALL [ooo_engine]->write(1);
    724           in_NB_INST_COMMIT_MEM [ooo_engine]->write(1);
    725          
    726           uint32_t port = rand()%_param->_nb_ooo_engine;
     748          in_NB_INST_DECOD_ALL  [context]->write(1);
     749          in_NB_INST_COMMIT_ALL [context]->write(1);
     750          in_NB_INST_COMMIT_MEM [context]->write(1);
     751         
     752          uint32_t port = rand()%_param->_nb_decod_unit;
    727753         
    728754          in_DECOD_EVENT_CONTEXT_ID       [port]->write(context);
    729           if (_param->_have_port_depth [context])
    730           in_DECOD_EVENT_DEPTH            [port]->write((context)%_param->_size_depth[context]);
     755          if (_param->_have_port_depth)
     756          in_DECOD_EVENT_DEPTH            [port]->write((_param->_array_size_depth[context]==0)?0:((context)%_param->_array_size_depth[context]));
    731757          in_DECOD_EVENT_TYPE             [port]->write(EVENT_TYPE_EXCEPTION);
    732758          in_DECOD_EVENT_IS_DELAY_SLOT    [port]->write(1);
     
    751777          SC_START(3);
    752778         
    753           in_NB_INST_DECOD_ALL  [decod_unit]->write(0);
    754           in_NB_INST_COMMIT_ALL [ooo_engine]->write(0);
    755           in_NB_INST_COMMIT_MEM [ooo_engine]->write(0);
     779          in_NB_INST_DECOD_ALL  [context]->write(0);
     780          in_NB_INST_COMMIT_ALL [context]->write(0);
     781          in_NB_INST_COMMIT_MEM [context]->write(0);
    756782         
    757783          SC_START(1);
     
    787813          do
    788814            {
    789               in_SPR_ACK [context]->write(rand()%percent_transaction_spr);
    790          
    791               SC_START(0);
    792          
    793               if (out_SPR_VAL [context]->read() and in_SPR_ACK [context]->read())
    794                 {
    795                   TEST(Taddress_t,out_SPR_EPCR      [context]->read(),0x900);
    796                 //TEST(Taddress_t,out_SPR_EEAR      [context]->read(),);
    797                   TEST(Tcontrol_t,out_SPR_EEAR_WEN  [context]->read(),0);
    798                   TEST(Tcontrol_t,out_SPR_SR_DSX    [context]->read(),1);
    799                   TEST(Tcontrol_t,out_SPR_SR_TO_ESR [context]->read(),1);
    800                  
    801                   find = true;
    802                 }
    803              
    804               SC_START(1);
    805             }
    806           while (not find);
    807 
    808           in_SPR_ACK [context]->write(0);
     815              in_SPR_EVENT_ACK [context]->write(rand()%percent_transaction_spr);
     816         
     817              SC_START(0);
     818         
     819              if (out_SPR_EVENT_VAL [context]->read() and in_SPR_EVENT_ACK [context]->read())
     820                {
     821                  TEST(Taddress_t,out_SPR_EVENT_EPCR      [context]->read(),0x900);
     822                //TEST(Taddress_t,out_SPR_EVENT_EEAR      [context]->read(),);
     823                  TEST(Tcontrol_t,out_SPR_EVENT_EEAR_WEN  [context]->read(),0);
     824                  TEST(Tcontrol_t,out_SPR_EVENT_SR_DSX    [context]->read(),1);
     825                  TEST(Tcontrol_t,out_SPR_EVENT_SR_TO_ESR [context]->read(),1);
     826                 
     827                  find = true;
     828                }
     829             
     830              SC_START(1);
     831            }
     832          while (not find);
     833
     834          in_SPR_EVENT_ACK [context]->write(0);
    809835        }
    810836
     
    814840         
    815841          LABEL("exception (begin)");
    816           in_NB_INST_DECOD_ALL  [decod_unit]->write(1);
    817           in_NB_INST_COMMIT_ALL [ooo_engine]->write(1);
    818           in_NB_INST_COMMIT_MEM [ooo_engine]->write(1);
    819          
    820           uint32_t port = rand()%_param->_nb_ooo_engine;
    821          
    822           in_COMMIT_EVENT_CONTEXT_ID       [port]->write(context);
    823           if (_param->_have_port_depth [context])
    824           in_COMMIT_EVENT_DEPTH            [port]->write((context)%_param->_size_depth[context]);
    825           in_COMMIT_EVENT_TYPE             [port]->write(EVENT_TYPE_EXCEPTION);
    826           in_COMMIT_EVENT_IS_DELAY_SLOT    [port]->write(0);
    827           in_COMMIT_EVENT_ADDRESS          [port]->write(0xa00);
    828           in_COMMIT_EVENT_ADDRESS_EPCR     [port]->write(0xb00);
    829           in_COMMIT_EVENT_ADDRESS_EEAR     [port]->write(0xc00);
    830           in_COMMIT_EVENT_ADDRESS_EEAR_VAL [port]->write(0);
    831 
    832           TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
    833          
    834           do
    835             {
    836               in_COMMIT_EVENT_VAL [port]->write(rand()%percent_transaction_commit_event);
    837              
    838               SC_START(1);
    839             }
    840           while (not ( in_COMMIT_EVENT_VAL [port]->read() and
    841                        out_COMMIT_EVENT_ACK [port]->read()));
    842           in_COMMIT_EVENT_VAL [port]->write(0);
     842          in_NB_INST_DECOD_ALL  [context]->write(1);
     843          in_NB_INST_COMMIT_ALL [context]->write(1);
     844          in_NB_INST_COMMIT_MEM [context]->write(1);
     845         
     846          in_COMMIT_EVENT_CONTEXT_ID       ->write(context);
     847          if (_param->_have_port_depth)
     848          in_COMMIT_EVENT_DEPTH            ->write((_param->_array_size_depth[context]==0)?0:((context)%_param->_array_size_depth[context]));
     849          in_COMMIT_EVENT_TYPE             ->write(EVENT_TYPE_EXCEPTION);
     850          in_COMMIT_EVENT_IS_DELAY_SLOT    ->write(0);
     851          in_COMMIT_EVENT_ADDRESS          ->write(0xa00);
     852          in_COMMIT_EVENT_ADDRESS_EPCR     ->write(0xb00);
     853          in_COMMIT_EVENT_ADDRESS_EEAR     ->write(0xc00);
     854          in_COMMIT_EVENT_ADDRESS_EEAR_VAL ->write(0);
     855
     856          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     857         
     858          do
     859            {
     860              in_COMMIT_EVENT_VAL ->write(rand()%percent_transaction_commit_event);
     861             
     862              SC_START(1);
     863            }
     864          while (not ( in_COMMIT_EVENT_VAL ->read() and
     865                       out_COMMIT_EVENT_ACK ->read()));
     866          in_COMMIT_EVENT_VAL ->write(0);
    843867         
    844868          LABEL("exception (wait end)");
     
    847871          SC_START(3);
    848872         
    849           in_NB_INST_DECOD_ALL  [decod_unit]->write(0);
    850           in_NB_INST_COMMIT_ALL [ooo_engine]->write(0);
    851           in_NB_INST_COMMIT_MEM [ooo_engine]->write(0);
     873          in_NB_INST_DECOD_ALL  [context]->write(0);
     874          in_NB_INST_COMMIT_ALL [context]->write(0);
     875          in_NB_INST_COMMIT_MEM [context]->write(0);
    852876         
    853877          SC_START(1);
     
    883907          do
    884908            {
    885               in_SPR_ACK [context]->write(rand()%percent_transaction_spr);
    886          
    887               SC_START(0);
    888          
    889               if (out_SPR_VAL [context]->read() and in_SPR_ACK [context]->read())
    890                 {
    891                   TEST(Taddress_t,out_SPR_EPCR      [context]->read(),0xb00);
    892                   TEST(Taddress_t,out_SPR_EEAR      [context]->read(),0xc00);
    893                   TEST(Tcontrol_t,out_SPR_EEAR_WEN  [context]->read(),0);
    894                   TEST(Tcontrol_t,out_SPR_SR_DSX    [context]->read(),0);
    895                   TEST(Tcontrol_t,out_SPR_SR_TO_ESR [context]->read(),1);
    896                  
    897                   find = true;
    898                 }
    899              
    900               SC_START(1);
    901             }
    902           while (not find);
    903 
    904           in_SPR_ACK [context]->write(0);
     909              in_SPR_EVENT_ACK [context]->write(rand()%percent_transaction_spr);
     910         
     911              SC_START(0);
     912         
     913              if (out_SPR_EVENT_VAL [context]->read() and in_SPR_EVENT_ACK [context]->read())
     914                {
     915                  TEST(Taddress_t,out_SPR_EVENT_EPCR      [context]->read(),0xb00);
     916                  TEST(Taddress_t,out_SPR_EVENT_EEAR      [context]->read(),0xc00);
     917                  TEST(Tcontrol_t,out_SPR_EVENT_EEAR_WEN  [context]->read(),0);
     918                  TEST(Tcontrol_t,out_SPR_EVENT_SR_DSX    [context]->read(),0);
     919                  TEST(Tcontrol_t,out_SPR_EVENT_SR_TO_ESR [context]->read(),1);
     920                 
     921                  find = true;
     922                }
     923             
     924              SC_START(1);
     925            }
     926          while (not find);
     927
     928          in_SPR_EVENT_ACK [context]->write(0);
    905929        }
    906930     
     
    910934         
    911935          LABEL("exception (begin)");
    912           in_NB_INST_DECOD_ALL  [decod_unit]->write(1);
    913           in_NB_INST_COMMIT_ALL [ooo_engine]->write(1);
    914           in_NB_INST_COMMIT_MEM [ooo_engine]->write(1);
    915          
    916           uint32_t port = rand()%_param->_nb_ooo_engine;
    917          
    918           in_COMMIT_EVENT_CONTEXT_ID       [port]->write(context);
    919           if (_param->_have_port_depth [context])
    920           in_COMMIT_EVENT_DEPTH            [port]->write((context)%_param->_size_depth[context]);
    921           in_COMMIT_EVENT_TYPE             [port]->write(EVENT_TYPE_EXCEPTION);
    922           in_COMMIT_EVENT_IS_DELAY_SLOT    [port]->write(1);
    923           in_COMMIT_EVENT_ADDRESS          [port]->write(0xd00);
    924           in_COMMIT_EVENT_ADDRESS_EPCR     [port]->write(0xe00);
    925           in_COMMIT_EVENT_ADDRESS_EEAR     [port]->write(0xf00);
    926           in_COMMIT_EVENT_ADDRESS_EEAR_VAL [port]->write(0);
    927 
    928           TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
    929          
    930           do
    931             {
    932               in_COMMIT_EVENT_VAL [port]->write(rand()%percent_transaction_commit_event);
    933              
    934               SC_START(1);
    935             }
    936           while (not ( in_COMMIT_EVENT_VAL [port]->read() and
    937                        out_COMMIT_EVENT_ACK [port]->read()));
    938           in_COMMIT_EVENT_VAL [port]->write(0);
     936          in_NB_INST_DECOD_ALL  [context]->write(1);
     937          in_NB_INST_COMMIT_ALL [context]->write(1);
     938          in_NB_INST_COMMIT_MEM [context]->write(1);
     939         
     940          in_COMMIT_EVENT_CONTEXT_ID       ->write(context);
     941          if (_param->_have_port_depth)
     942          in_COMMIT_EVENT_DEPTH            ->write((_param->_array_size_depth[context]==0)?0:((context)%_param->_array_size_depth[context]));
     943          in_COMMIT_EVENT_TYPE             ->write(EVENT_TYPE_EXCEPTION);
     944          in_COMMIT_EVENT_IS_DELAY_SLOT    ->write(1);
     945          in_COMMIT_EVENT_ADDRESS          ->write(0xd00);
     946          in_COMMIT_EVENT_ADDRESS_EPCR     ->write(0xe00);
     947          in_COMMIT_EVENT_ADDRESS_EEAR     ->write(0xf00);
     948          in_COMMIT_EVENT_ADDRESS_EEAR_VAL ->write(0);
     949
     950          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     951         
     952          do
     953            {
     954              in_COMMIT_EVENT_VAL ->write(rand()%percent_transaction_commit_event);
     955             
     956              SC_START(1);
     957            }
     958          while (not ( in_COMMIT_EVENT_VAL ->read() and
     959                       out_COMMIT_EVENT_ACK ->read()));
     960          in_COMMIT_EVENT_VAL ->write(0);
    939961         
    940962          LABEL("exception (wait end)");
     
    943965          SC_START(3);
    944966         
    945           in_NB_INST_DECOD_ALL  [decod_unit]->write(0);
    946           in_NB_INST_COMMIT_ALL [ooo_engine]->write(0);
    947           in_NB_INST_COMMIT_MEM [ooo_engine]->write(0);
     967          in_NB_INST_DECOD_ALL  [context]->write(0);
     968          in_NB_INST_COMMIT_ALL [context]->write(0);
     969          in_NB_INST_COMMIT_MEM [context]->write(0);
    948970         
    949971          SC_START(1);
     
    9791001          do
    9801002            {
    981               in_SPR_ACK [context]->write(rand()%percent_transaction_spr);
    982          
    983               SC_START(0);
    984          
    985               if (out_SPR_VAL [context]->read() and in_SPR_ACK [context]->read())
    986                 {
    987                   TEST(Taddress_t,out_SPR_EPCR      [context]->read(),0xe00);
    988                   TEST(Taddress_t,out_SPR_EEAR      [context]->read(),0xf00);
    989                   TEST(Tcontrol_t,out_SPR_EEAR_WEN  [context]->read(),0);
    990                   TEST(Tcontrol_t,out_SPR_SR_DSX    [context]->read(),1);
    991                   TEST(Tcontrol_t,out_SPR_SR_TO_ESR [context]->read(),1);
    992                  
    993                   find = true;
    994                 }
    995              
    996               SC_START(1);
    997             }
    998           while (not find);
    999 
    1000           in_SPR_ACK [context]->write(0);
     1003              in_SPR_EVENT_ACK [context]->write(rand()%percent_transaction_spr);
     1004         
     1005              SC_START(0);
     1006         
     1007              if (out_SPR_EVENT_VAL [context]->read() and in_SPR_EVENT_ACK [context]->read())
     1008                {
     1009                  TEST(Taddress_t,out_SPR_EVENT_EPCR      [context]->read(),0xe00);
     1010                  TEST(Taddress_t,out_SPR_EVENT_EEAR      [context]->read(),0xf00);
     1011                  TEST(Tcontrol_t,out_SPR_EVENT_EEAR_WEN  [context]->read(),0);
     1012                  TEST(Tcontrol_t,out_SPR_EVENT_SR_DSX    [context]->read(),1);
     1013                  TEST(Tcontrol_t,out_SPR_EVENT_SR_TO_ESR [context]->read(),1);
     1014                 
     1015                  find = true;
     1016                }
     1017             
     1018              SC_START(1);
     1019            }
     1020          while (not find);
     1021
     1022          in_SPR_EVENT_ACK [context]->write(0);
    10011023        }
    10021024
     
    10061028         
    10071029          LABEL("exception (begin)");
    1008           in_NB_INST_DECOD_ALL  [decod_unit]->write(1);
    1009           in_NB_INST_COMMIT_ALL [ooo_engine]->write(1);
    1010           in_NB_INST_COMMIT_MEM [ooo_engine]->write(1);
    1011          
    1012           uint32_t port = rand()%_param->_nb_ooo_engine;
    1013          
    1014           in_COMMIT_EVENT_CONTEXT_ID       [port]->write(context);
    1015           if (_param->_have_port_depth [context])
    1016           in_COMMIT_EVENT_DEPTH            [port]->write((context)%_param->_size_depth[context]);
    1017           in_COMMIT_EVENT_TYPE             [port]->write(EVENT_TYPE_EXCEPTION);
    1018           in_COMMIT_EVENT_IS_DELAY_SLOT    [port]->write(0);
    1019           in_COMMIT_EVENT_ADDRESS          [port]->write(0xa00);
    1020           in_COMMIT_EVENT_ADDRESS_EPCR     [port]->write(0xb00);
    1021           in_COMMIT_EVENT_ADDRESS_EEAR     [port]->write(0xc00);
    1022           in_COMMIT_EVENT_ADDRESS_EEAR_VAL [port]->write(1);
    1023 
    1024           TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
    1025          
    1026           do
    1027             {
    1028               in_COMMIT_EVENT_VAL [port]->write(rand()%percent_transaction_commit_event);
    1029              
    1030               SC_START(1);
    1031             }
    1032           while (not ( in_COMMIT_EVENT_VAL [port]->read() and
    1033                        out_COMMIT_EVENT_ACK [port]->read()));
    1034           in_COMMIT_EVENT_VAL [port]->write(0);
     1030          in_NB_INST_DECOD_ALL  [context]->write(1);
     1031          in_NB_INST_COMMIT_ALL [context]->write(1);
     1032          in_NB_INST_COMMIT_MEM [context]->write(1);
     1033         
     1034          in_COMMIT_EVENT_CONTEXT_ID       ->write(context);
     1035          if (_param->_have_port_depth)
     1036          in_COMMIT_EVENT_DEPTH            ->write((_param->_array_size_depth[context]==0)?0:((context)%_param->_array_size_depth[context]));
     1037          in_COMMIT_EVENT_TYPE             ->write(EVENT_TYPE_EXCEPTION);
     1038          in_COMMIT_EVENT_IS_DELAY_SLOT    ->write(0);
     1039          in_COMMIT_EVENT_ADDRESS          ->write(0xa00);
     1040          in_COMMIT_EVENT_ADDRESS_EPCR     ->write(0xb00);
     1041          in_COMMIT_EVENT_ADDRESS_EEAR     ->write(0xc00);
     1042          in_COMMIT_EVENT_ADDRESS_EEAR_VAL ->write(1);
     1043
     1044          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     1045         
     1046          do
     1047            {
     1048              in_COMMIT_EVENT_VAL ->write(rand()%percent_transaction_commit_event);
     1049             
     1050              SC_START(1);
     1051            }
     1052          while (not ( in_COMMIT_EVENT_VAL ->read() and
     1053                       out_COMMIT_EVENT_ACK ->read()));
     1054          in_COMMIT_EVENT_VAL ->write(0);
    10351055         
    10361056          LABEL("exception (wait end)");
     
    10391059          SC_START(3);
    10401060         
    1041           in_NB_INST_DECOD_ALL  [decod_unit]->write(0);
    1042           in_NB_INST_COMMIT_ALL [ooo_engine]->write(0);
    1043           in_NB_INST_COMMIT_MEM [ooo_engine]->write(0);
     1061          in_NB_INST_DECOD_ALL  [context]->write(0);
     1062          in_NB_INST_COMMIT_ALL [context]->write(0);
     1063          in_NB_INST_COMMIT_MEM [context]->write(0);
    10441064         
    10451065          SC_START(1);
     
    10751095          do
    10761096            {
    1077               in_SPR_ACK [context]->write(rand()%percent_transaction_spr);
    1078          
    1079               SC_START(0);
    1080          
    1081               if (out_SPR_VAL [context]->read() and in_SPR_ACK [context]->read())
    1082                 {
    1083                   TEST(Taddress_t,out_SPR_EPCR      [context]->read(),0xb00);
    1084                   TEST(Taddress_t,out_SPR_EEAR      [context]->read(),0xc00);
    1085                   TEST(Tcontrol_t,out_SPR_EEAR_WEN  [context]->read(),1);
    1086                   TEST(Tcontrol_t,out_SPR_SR_DSX    [context]->read(),0);
    1087                   TEST(Tcontrol_t,out_SPR_SR_TO_ESR [context]->read(),1);
    1088                  
    1089                   find = true;
    1090                 }
    1091              
    1092               SC_START(1);
    1093             }
    1094           while (not find);
    1095 
    1096           in_SPR_ACK [context]->write(0);
     1097              in_SPR_EVENT_ACK [context]->write(rand()%percent_transaction_spr);
     1098         
     1099              SC_START(0);
     1100         
     1101              if (out_SPR_EVENT_VAL [context]->read() and in_SPR_EVENT_ACK [context]->read())
     1102                {
     1103                  TEST(Taddress_t,out_SPR_EVENT_EPCR      [context]->read(),0xb00);
     1104                  TEST(Taddress_t,out_SPR_EVENT_EEAR      [context]->read(),0xc00);
     1105                  TEST(Tcontrol_t,out_SPR_EVENT_EEAR_WEN  [context]->read(),1);
     1106                  TEST(Tcontrol_t,out_SPR_EVENT_SR_DSX    [context]->read(),0);
     1107                  TEST(Tcontrol_t,out_SPR_EVENT_SR_TO_ESR [context]->read(),1);
     1108                 
     1109                  find = true;
     1110                }
     1111             
     1112              SC_START(1);
     1113            }
     1114          while (not find);
     1115
     1116          in_SPR_EVENT_ACK [context]->write(0);
    10971117        }
    10981118     
     
    11021122         
    11031123          LABEL("exception (begin)");
    1104           in_NB_INST_DECOD_ALL  [decod_unit]->write(1);
    1105           in_NB_INST_COMMIT_ALL [ooo_engine]->write(1);
    1106           in_NB_INST_COMMIT_MEM [ooo_engine]->write(1);
    1107          
    1108           uint32_t port = rand()%_param->_nb_ooo_engine;
    1109          
    1110           in_COMMIT_EVENT_CONTEXT_ID       [port]->write(context);
    1111           if (_param->_have_port_depth [context])
    1112           in_COMMIT_EVENT_DEPTH            [port]->write((context)%_param->_size_depth[context]);
    1113           in_COMMIT_EVENT_TYPE             [port]->write(EVENT_TYPE_EXCEPTION);
    1114           in_COMMIT_EVENT_IS_DELAY_SLOT    [port]->write(1);
    1115           in_COMMIT_EVENT_ADDRESS          [port]->write(0xd00);
    1116           in_COMMIT_EVENT_ADDRESS_EPCR     [port]->write(0xe00);
    1117           in_COMMIT_EVENT_ADDRESS_EEAR     [port]->write(0xf00);
    1118           in_COMMIT_EVENT_ADDRESS_EEAR_VAL [port]->write(1);
    1119 
    1120           TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
    1121          
    1122           do
    1123             {
    1124               in_COMMIT_EVENT_VAL [port]->write(rand()%percent_transaction_commit_event);
    1125              
    1126               SC_START(1);
    1127             }
    1128           while (not ( in_COMMIT_EVENT_VAL [port]->read() and
    1129                        out_COMMIT_EVENT_ACK [port]->read()));
    1130           in_COMMIT_EVENT_VAL [port]->write(0);
     1124          in_NB_INST_DECOD_ALL  [context]->write(1);
     1125          in_NB_INST_COMMIT_ALL [context]->write(1);
     1126          in_NB_INST_COMMIT_MEM [context]->write(1);
     1127         
     1128          in_COMMIT_EVENT_CONTEXT_ID       ->write(context);
     1129          if (_param->_have_port_depth)
     1130          in_COMMIT_EVENT_DEPTH            ->write((_param->_array_size_depth[context]==0)?0:((context)%_param->_array_size_depth[context]));
     1131          in_COMMIT_EVENT_TYPE             ->write(EVENT_TYPE_EXCEPTION);
     1132          in_COMMIT_EVENT_IS_DELAY_SLOT    ->write(1);
     1133          in_COMMIT_EVENT_ADDRESS          ->write(0xd00);
     1134          in_COMMIT_EVENT_ADDRESS_EPCR     ->write(0xe00);
     1135          in_COMMIT_EVENT_ADDRESS_EEAR     ->write(0xf00);
     1136          in_COMMIT_EVENT_ADDRESS_EEAR_VAL ->write(1);
     1137
     1138          TEST(Tcontrol_t, out_CONTEXT_DECOD_ENABLE[context]->read(), 1);
     1139         
     1140          do
     1141            {
     1142              in_COMMIT_EVENT_VAL ->write(rand()%percent_transaction_commit_event);
     1143             
     1144              SC_START(1);
     1145            }
     1146          while (not ( in_COMMIT_EVENT_VAL ->read() and
     1147                       out_COMMIT_EVENT_ACK ->read()));
     1148          in_COMMIT_EVENT_VAL ->write(0);
    11311149         
    11321150          LABEL("exception (wait end)");
     
    11351153          SC_START(3);
    11361154         
    1137           in_NB_INST_DECOD_ALL  [decod_unit]->write(0);
    1138           in_NB_INST_COMMIT_ALL [ooo_engine]->write(0);
    1139           in_NB_INST_COMMIT_MEM [ooo_engine]->write(0);
     1155          in_NB_INST_DECOD_ALL  [context]->write(0);
     1156          in_NB_INST_COMMIT_ALL [context]->write(0);
     1157          in_NB_INST_COMMIT_MEM [context]->write(0);
    11401158         
    11411159          SC_START(1);
     
    11711189          do
    11721190            {
    1173               in_SPR_ACK [context]->write(rand()%percent_transaction_spr);
    1174          
    1175               SC_START(0);
    1176          
    1177               if (out_SPR_VAL [context]->read() and in_SPR_ACK [context]->read())
    1178                 {
    1179                   TEST(Taddress_t,out_SPR_EPCR      [context]->read(),0xe00);
    1180                   TEST(Taddress_t,out_SPR_EEAR      [context]->read(),0xf00);
    1181                   TEST(Tcontrol_t,out_SPR_EEAR_WEN  [context]->read(),1);
    1182                   TEST(Tcontrol_t,out_SPR_SR_DSX    [context]->read(),1);
    1183                   TEST(Tcontrol_t,out_SPR_SR_TO_ESR [context]->read(),1);
    1184                  
    1185                   find = true;
    1186                 }
    1187              
    1188               SC_START(1);
    1189             }
    1190           while (not find);
    1191 
    1192           in_SPR_ACK [context]->write(0);
     1191              in_SPR_EVENT_ACK [context]->write(rand()%percent_transaction_spr);
     1192         
     1193              SC_START(0);
     1194         
     1195              if (out_SPR_EVENT_VAL [context]->read() and in_SPR_EVENT_ACK [context]->read())
     1196                {
     1197                  TEST(Taddress_t,out_SPR_EVENT_EPCR      [context]->read(),0xe00);
     1198                  TEST(Taddress_t,out_SPR_EVENT_EEAR      [context]->read(),0xf00);
     1199                  TEST(Tcontrol_t,out_SPR_EVENT_EEAR_WEN  [context]->read(),1);
     1200                  TEST(Tcontrol_t,out_SPR_EVENT_SR_DSX    [context]->read(),1);
     1201                  TEST(Tcontrol_t,out_SPR_EVENT_SR_TO_ESR [context]->read(),1);
     1202                 
     1203                  find = true;
     1204                }
     1205             
     1206              SC_START(1);
     1207            }
     1208          while (not find);
     1209
     1210          in_SPR_EVENT_ACK [context]->write(0);
    11931211        }
    11941212
     
    12101228  delete in_NRESET;
    12111229
     1230  DELETE1_SC_SIGNAL( in_BRANCH_EVENT_VAL               ,_param->_nb_context);
     1231  DELETE1_SC_SIGNAL(out_BRANCH_EVENT_ACK               ,_param->_nb_context);
     1232//DELETE1_SC_SIGNAL( in_BRANCH_EVENT_CONTEXT_ID        ,_param->_nb_context);
     1233//DELETE1_SC_SIGNAL( in_BRANCH_EVENT_DEPTH             ,_param->_nb_context);
     1234//DELETE1_SC_SIGNAL( in_BRANCH_EVENT_MISS_PREDICTION   ,_param->_nb_context);
     1235  DELETE1_SC_SIGNAL( in_BRANCH_EVENT_ADDRESS_SRC       ,_param->_nb_context);
     1236  DELETE1_SC_SIGNAL( in_BRANCH_EVENT_ADDRESS_DEST      ,_param->_nb_context);
    12121237  DELETE1_SC_SIGNAL( in_DECOD_EVENT_VAL                ,_param->_nb_decod_unit);
    12131238  DELETE1_SC_SIGNAL(out_DECOD_EVENT_ACK                ,_param->_nb_decod_unit);
     
    12181243  DELETE1_SC_SIGNAL( in_DECOD_EVENT_ADDRESS            ,_param->_nb_decod_unit);
    12191244  DELETE1_SC_SIGNAL( in_DECOD_EVENT_ADDRESS_EPCR       ,_param->_nb_decod_unit);
    1220   DELETE1_SC_SIGNAL( in_COMMIT_EVENT_VAL               ,_param->_nb_ooo_engine);
    1221   DELETE1_SC_SIGNAL(out_COMMIT_EVENT_ACK               ,_param->_nb_ooo_engine);
    1222   DELETE1_SC_SIGNAL( in_COMMIT_EVENT_CONTEXT_ID        ,_param->_nb_ooo_engine);
    1223   DELETE1_SC_SIGNAL( in_COMMIT_EVENT_DEPTH             ,_param->_nb_ooo_engine);
    1224   DELETE1_SC_SIGNAL( in_COMMIT_EVENT_TYPE              ,_param->_nb_ooo_engine);
    1225   DELETE1_SC_SIGNAL( in_COMMIT_EVENT_IS_DELAY_SLOT     ,_param->_nb_ooo_engine);
    1226   DELETE1_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS           ,_param->_nb_ooo_engine);
    1227   DELETE1_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EPCR      ,_param->_nb_ooo_engine);
    1228   DELETE1_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EEAR_VAL  ,_param->_nb_ooo_engine);
    1229   DELETE1_SC_SIGNAL( in_COMMIT_EVENT_ADDRESS_EEAR      ,_param->_nb_ooo_engine);
     1245  DELETE_SC_SIGNAL ( in_COMMIT_EVENT_VAL               );
     1246  DELETE_SC_SIGNAL (out_COMMIT_EVENT_ACK               );
     1247  DELETE_SC_SIGNAL ( in_COMMIT_EVENT_CONTEXT_ID        );
     1248  DELETE_SC_SIGNAL ( in_COMMIT_EVENT_DEPTH             );
     1249  DELETE_SC_SIGNAL ( in_COMMIT_EVENT_TYPE              );
     1250  DELETE_SC_SIGNAL ( in_COMMIT_EVENT_IS_DELAY_SLOT     );
     1251  DELETE_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS           );
     1252  DELETE_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR      );
     1253  DELETE_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL  );
     1254  DELETE_SC_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EEAR      );
    12301255  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL            ,_param->_nb_inst_branch_complete);
    12311256  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ACK            ,_param->_nb_inst_branch_complete);
     
    12361261  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS_SRC    ,_param->_nb_inst_branch_complete);
    12371262  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS_DEST   ,_param->_nb_inst_branch_complete);
    1238   DELETE1_SC_SIGNAL( in_NB_INST_DECOD_ALL              ,_param->_nb_decod_unit);
    1239   DELETE1_SC_SIGNAL( in_NB_INST_COMMIT_ALL             ,_param->_nb_ooo_engine);
    1240   DELETE1_SC_SIGNAL( in_NB_INST_COMMIT_MEM             ,_param->_nb_ooo_engine);
     1263  DELETE1_SC_SIGNAL( in_NB_INST_DECOD_ALL              ,_param->_nb_context   );
     1264  DELETE1_SC_SIGNAL( in_NB_INST_COMMIT_ALL             ,_param->_nb_context   );
     1265  DELETE1_SC_SIGNAL( in_NB_INST_COMMIT_MEM             ,_param->_nb_context   );
    12411266  DELETE1_SC_SIGNAL(out_EVENT_VAL                      ,_param->_nb_context   );
    12421267  DELETE1_SC_SIGNAL( in_EVENT_ACK                      ,_param->_nb_context   );
     
    12451270  DELETE1_SC_SIGNAL(out_EVENT_ADDRESS_NEXT_VAL         ,_param->_nb_context   );
    12461271  DELETE1_SC_SIGNAL(out_EVENT_IS_DS_TAKE               ,_param->_nb_context   );
    1247   DELETE1_SC_SIGNAL(out_SPR_VAL                        ,_param->_nb_context   );
    1248   DELETE1_SC_SIGNAL( in_SPR_ACK                        ,_param->_nb_context   );
    1249   DELETE1_SC_SIGNAL(out_SPR_EPCR                       ,_param->_nb_context   );
    1250   DELETE1_SC_SIGNAL(out_SPR_EEAR                       ,_param->_nb_context   );
    1251   DELETE1_SC_SIGNAL(out_SPR_EEAR_WEN                   ,_param->_nb_context   );
    1252   DELETE1_SC_SIGNAL(out_SPR_SR_DSX                     ,_param->_nb_context   );
    1253   DELETE1_SC_SIGNAL(out_SPR_SR_TO_ESR                  ,_param->_nb_context   );
     1272  DELETE1_SC_SIGNAL(out_SPR_EVENT_VAL                  ,_param->_nb_context   );
     1273  DELETE1_SC_SIGNAL( in_SPR_EVENT_ACK                  ,_param->_nb_context   );
     1274  DELETE1_SC_SIGNAL(out_SPR_EVENT_EPCR                 ,_param->_nb_context   );
     1275  DELETE1_SC_SIGNAL(out_SPR_EVENT_EEAR                 ,_param->_nb_context   );
     1276  DELETE1_SC_SIGNAL(out_SPR_EVENT_EEAR_WEN             ,_param->_nb_context   );
     1277  DELETE1_SC_SIGNAL(out_SPR_EVENT_SR_DSX               ,_param->_nb_context   );
     1278  DELETE1_SC_SIGNAL(out_SPR_EVENT_SR_TO_ESR            ,_param->_nb_context   );
    12541279  DELETE1_SC_SIGNAL(out_CONTEXT_DECOD_ENABLE           ,_param->_nb_context   );
    1255   DELETE1_SC_SIGNAL( in_DEPTH_TAIL                     ,_param->_nb_context   );
     1280  DELETE1_SC_SIGNAL( in_DEPTH_MIN                      ,_param->_nb_context   );
     1281  DELETE1_SC_SIGNAL( in_SPR_SR_IEE                     ,_param->_nb_context   );
     1282  DELETE1_SC_SIGNAL( in_SPR_SR_EPH                     ,_param->_nb_context   );
     1283
     1284  DELETE1_SC_SIGNAL( in_INTERRUPT_ENABLE               ,_param->_nb_context   );
    12561285    }
    12571286#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Context_State.h

    r83 r88  
    6262  public    : SC_CLOCK                      *  in_CLOCK        ;
    6363  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
     64
     65    // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     66  public    : SC_IN (Tcontrol_t         )  **  in_BRANCH_EVENT_VAL                   ;//[nb_context]
     67  public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_EVENT_ACK                   ;//[nb_context]
     68//public    : SC_IN (Tcontext_t         )  **  in_BRANCH_EVENT_CONTEXT_ID            ;//[nb_context]
     69//public    : SC_IN (Tdepth_t           )  **  in_BRANCH_EVENT_DEPTH                 ;//[nb_context]
     70//public    : SC_IN (Tcontrol_t         )  **  in_BRANCH_EVENT_MISS_PREDICTION       ;//[nb_context]
     71  public    : SC_IN (Taddress_t         )  **  in_BRANCH_EVENT_ADDRESS_SRC           ;//[nb_context]
     72  public    : SC_IN (Taddress_t         )  **  in_BRANCH_EVENT_ADDRESS_DEST          ;//[nb_context]
    6473
    6574    // ~~~~~[ Interface : "decod_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    7483
    7584    // ~~~~~[ Interface : "commit_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    76   public    : SC_IN (Tcontrol_t         )  **  in_COMMIT_EVENT_VAL                   ;//[nb_ooo_engine]
    77   public    : SC_OUT(Tcontrol_t         )  ** out_COMMIT_EVENT_ACK                   ;//[nb_ooo_engine]
    78   public    : SC_IN (Tcontext_t         )  **  in_COMMIT_EVENT_CONTEXT_ID            ;//[nb_ooo_engine]
    79   public    : SC_IN (Tdepth_t           )  **  in_COMMIT_EVENT_DEPTH                 ;//[nb_ooo_engine]
    80   public    : SC_IN (Tevent_type_t      )  **  in_COMMIT_EVENT_TYPE                  ;//[nb_ooo_engine]
    81   public    : SC_IN (Tcontrol_t         )  **  in_COMMIT_EVENT_IS_DELAY_SLOT         ;//[nb_ooo_engine]
    82   public    : SC_IN (Taddress_t         )  **  in_COMMIT_EVENT_ADDRESS               ;//[nb_ooo_engine]
    83   public    : SC_IN (Taddress_t         )  **  in_COMMIT_EVENT_ADDRESS_EPCR          ;//[nb_ooo_engine]
    84   public    : SC_IN (Tcontrol_t         )  **  in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ;//[nb_ooo_engine]
    85   public    : SC_IN (Taddress_t         )  **  in_COMMIT_EVENT_ADDRESS_EEAR          ;//[nb_ooo_engine]
     85  public    : SC_IN (Tcontrol_t         )   *  in_COMMIT_EVENT_VAL                   ;
     86  public    : SC_OUT(Tcontrol_t         )   * out_COMMIT_EVENT_ACK                   ;
     87  public    : SC_IN (Tcontext_t         )   *  in_COMMIT_EVENT_CONTEXT_ID            ;
     88  public    : SC_IN (Tdepth_t           )   *  in_COMMIT_EVENT_DEPTH                 ;
     89  public    : SC_IN (Tevent_type_t      )   *  in_COMMIT_EVENT_TYPE                  ;
     90  public    : SC_IN (Tcontrol_t         )   *  in_COMMIT_EVENT_IS_DELAY_SLOT         ;
     91  public    : SC_IN (Taddress_t         )   *  in_COMMIT_EVENT_ADDRESS               ;
     92  public    : SC_IN (Taddress_t         )   *  in_COMMIT_EVENT_ADDRESS_EPCR          ;
     93  public    : SC_IN (Tcontrol_t         )   *  in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ;
     94  public    : SC_IN (Taddress_t         )   *  in_COMMIT_EVENT_ADDRESS_EEAR          ;
    8695
    8796    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    96105
    97106    // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    98   public    : SC_IN (Tcounter_t         )  **  in_NB_INST_DECOD_ALL                  ;//[nb_decod_unit]
    99   public    : SC_IN (Tcounter_t         )  **  in_NB_INST_COMMIT_ALL                 ;//[nb_ooo_engine]
    100   public    : SC_IN (Tcounter_t         )  **  in_NB_INST_COMMIT_MEM                 ;//[nb_ooo_engine]
     107  public    : SC_IN (Tcounter_t         )  **  in_NB_INST_DECOD_ALL                  ;//[nb_context]
     108  public    : SC_IN (Tcounter_t         )  **  in_NB_INST_COMMIT_ALL                 ;//[nb_context]
     109  public    : SC_IN (Tcounter_t         )  **  in_NB_INST_COMMIT_MEM                 ;//[nb_context]
    101110
    102111    // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    108117  public    : SC_OUT(Tcontrol_t         )  ** out_EVENT_IS_DS_TAKE                   ;//[nb_context]
    109118
    110     // ~~~~~[ Interface "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    111   public    : SC_OUT(Tcontrol_t         )  ** out_SPR_VAL                            ;//[nb_context]
    112   public    : SC_IN (Tcontrol_t         )  **  in_SPR_ACK                            ;//[nb_context]
    113   public    : SC_OUT(Taddress_t         )  ** out_SPR_EPCR                           ;//[nb_context]
    114   public    : SC_OUT(Taddress_t         )  ** out_SPR_EEAR                           ;//[nb_context]
    115   public    : SC_OUT(Tcontrol_t         )  ** out_SPR_EEAR_WEN                       ;//[nb_context]
    116   public    : SC_OUT(Tcontrol_t         )  ** out_SPR_SR_DSX                         ;//[nb_context]
    117   public    : SC_OUT(Tcontrol_t         )  ** out_SPR_SR_TO_ESR                      ;//[nb_context]
     119    // ~~~~~[ Interface "spr_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     120  public    : SC_OUT(Tcontrol_t         )  ** out_SPR_EVENT_VAL                      ;//[nb_context]
     121  public    : SC_IN (Tcontrol_t         )  **  in_SPR_EVENT_ACK                      ;//[nb_context]
     122  public    : SC_OUT(Taddress_t         )  ** out_SPR_EVENT_EPCR                     ;//[nb_context]
     123  public    : SC_OUT(Taddress_t         )  ** out_SPR_EVENT_EEAR                     ;//[nb_context]
     124  public    : SC_OUT(Tcontrol_t         )  ** out_SPR_EVENT_EEAR_WEN                 ;//[nb_context]
     125  public    : SC_OUT(Tcontrol_t         )  ** out_SPR_EVENT_SR_DSX                   ;//[nb_context]
     126  public    : SC_OUT(Tcontrol_t         )  ** out_SPR_EVENT_SR_TO_ESR                ;//[nb_context]
    118127
    119128    // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    121130
    122131    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    123   public    : SC_IN (Tdepth_t           )  **  in_DEPTH_TAIL                         ;//[nb_context]
     132  public    : SC_IN (Tdepth_t           )  **  in_DEPTH_MIN                          ;//[nb_context]
     133
     134    // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
     135  public    : SC_IN (Tcontrol_t         )  **  in_SPR_SR_IEE                         ;//[nb_context] - Interrupt Exception Enabled
     136  public    : SC_IN (Tcontrol_t         )  **  in_SPR_SR_EPH                         ;//[nb_context] - Exception Prefix High
     137
     138    // ~~~~~[ Interface : "interrupt" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     139  public    : SC_IN (Tcontrol_t         )  **  in_INTERRUPT_ENABLE                   ;//[nb_context] - Interrupt Exception
    124140                                                                                     
    125141    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     
    135151  private   : Tcontrol_t                    * reg_EVENT_IS_DS_TAKE                   ;//[nb_context]
    136152  private   : Tdepth_t                      * reg_EVENT_DEPTH                        ;//[nb_context]
     153  private   : Tcontrol_t                    * reg_INTERRUPT_ENABLE                   ;//[nb_context]
    137154
    138155    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     156  private   : Tcontrol_t                    * internal_BRANCH_EVENT_ACK              ;//[nb_context]
    139157  private   : Tcontrol_t                    * internal_DECOD_EVENT_ACK               ;//[nb_decod_unit]
    140   private   : Tcontrol_t                    * internal_COMMIT_EVENT_ACK              ;//[nb_ooo_engine]
     158  private   : Tcontrol_t                      internal_COMMIT_EVENT_ACK              ;
    141159  private   : Tcontrol_t                    * internal_BRANCH_COMPLETE_ACK           ;//[nb_inst_branch_complete]
    142160  private   : Tcontrol_t                    * internal_EVENT_VAL                     ;//[nb_context]
    143   private   : Tcontrol_t                    * internal_SPR_VAL                       ;//[nb_context]
     161  private   : Tcontrol_t                    * internal_SPR_EVENT_VAL                 ;//[nb_context]
    144162#endif
    145163
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Parameters.h

    r83 r88  
    2626  public : uint32_t   _nb_context                   ;
    2727  public : uint32_t   _nb_decod_unit                ;
    28   public : uint32_t   _nb_ooo_engine                ;
    2928  public : uint32_t   _nb_inst_branch_complete      ;
    30   public : uint32_t * _size_depth                   ; //[nb_context]
    31   public : uint32_t   _size_address                 ;
    32   public : uint32_t * _size_inst_decod              ; //[nb_decod_unit]
    33   public : uint32_t * _size_inst_commit             ; //[nb_ooo_engine]
     29  public : uint32_t * _array_size_depth             ; //[nb_context]
     30//public : uint32_t * _size_depth                   ; //[nb_context]
     31//public : uint32_t   _size_address                 ;
     32//public : uint32_t * _size_nb_inst_decod           ; //[nb_decod_unit]
     33//public : uint32_t   _size_nb_inst_commit          ;
    3434  public : uint32_t * _link_context_to_decod_unit   ; //[nb_context]
    35   public : uint32_t * _link_decod_unit_to_ooo_engine; //[nb_decod_unit]
    36 
    37   public : uint32_t   _size_context_id;
    38   public : uint32_t   _size_max_depth ;
    39 
    40   public : bool       _have_port_context_id;
    41   public : bool     * _have_port_depth     ;
    42   public : bool       _have_port_max_depth ;
    4335
    4436    //-----[ methods ]-----------------------------------------------------------
    4537  public : Parameters  (uint32_t   nb_context,
    4638                        uint32_t   nb_decod_unit,
    47                         uint32_t   nb_ooo_engine,
    4839                        uint32_t   nb_inst_branch_complete,
    4940                        uint32_t * size_depth,               
    5041                        uint32_t   size_address,
    51                         uint32_t * size_inst_decod,           
    52                         uint32_t * size_inst_commit,         
     42                        uint32_t * size_nb_inst_decod,           
     43                        uint32_t   size_nb_inst_commit,         
    5344                        uint32_t * link_context_to_decod_unit,
    54                         uint32_t * link_decod_unit_to_ooo_engine);
     45                        bool       is_toplevel=false);
    5546//   public : Parameters  (Parameters & param) ;
    5647  public : ~Parameters () ;
     48
     49  public :        void            copy       (void);
    5750
    5851  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State.cpp

    r83 r88  
    3939    usage_environment(_usage);
    4040
     41#if DEBUG_Context_State == true
     42    log_printf(INFO,Context_State,FUNCTION,_("<%s> Parameters"),_name.c_str());
     43
     44    std::cout << *param << std::endl;
     45#endif   
     46
    4147    log_printf(INFO,Context_State,FUNCTION,_("Allocation"));
    4248
     
    6975    if (usage_is_set(_usage,USE_SYSTEMC))
    7076      {
    71         // Constant
     77        // Constant
     78        for (uint32_t i=0; i<_param->_nb_context; i++)
     79          {
     80            internal_BRANCH_EVENT_ACK [i] = 1;
     81            PORT_WRITE(out_BRANCH_EVENT_ACK [i], internal_BRANCH_EVENT_ACK [i]);
     82          }
     83
    7284        for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
    7385          {
     
    7688          }
    7789
    78         for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    79           {
    80             internal_COMMIT_EVENT_ACK [i] = 1;
    81             PORT_WRITE(out_COMMIT_EVENT_ACK [i], internal_COMMIT_EVENT_ACK [i]);
    82           }
     90        internal_COMMIT_EVENT_ACK = 1;
     91        PORT_WRITE(out_COMMIT_EVENT_ACK, internal_COMMIT_EVENT_ACK);
    8392
    8493        for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_allocation.cpp

    r83 r88  
    5656    }
    5757
     58    // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     59    {
     60      ALLOC1_INTERFACE("branch_event", IN,SOUTH, "branch_event", _param->_nb_context);
     61     
     62      ALLOC1_VALACK_IN ( in_BRANCH_EVENT_VAL                   ,VAL);
     63      ALLOC1_VALACK_OUT(out_BRANCH_EVENT_ACK                   ,ACK);
     64//    ALLOC1_SIGNAL_IN ( in_BRANCH_EVENT_CONTEXT_ID            ,"context_id"             ,Tcontext_t         ,_param->_size_context_id);
     65//    ALLOC1_SIGNAL_IN ( in_BRANCH_EVENT_DEPTH                 ,"depth"                  ,Tdepth_t           ,_param->_size_depth);
     66//    ALLOC1_SIGNAL_IN ( in_BRANCH_EVENT_MISS_PREDICTION       ,"miss_prediction"        ,Tcontrol_t         ,1);
     67      ALLOC1_SIGNAL_IN ( in_BRANCH_EVENT_ADDRESS_SRC           ,"address_src"            ,Taddress_t         ,_param->_size_instruction_address);
     68      ALLOC1_SIGNAL_IN ( in_BRANCH_EVENT_ADDRESS_DEST          ,"address_dest"           ,Taddress_t         ,_param->_size_instruction_address);
     69    }
     70
    5871    // ~~~~~[ Interface : "decod_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5972    {
     
    6376      ALLOC1_VALACK_OUT(out_DECOD_EVENT_ACK                    ,ACK);
    6477      ALLOC1_SIGNAL_IN ( in_DECOD_EVENT_CONTEXT_ID             ,"context_id"             ,Tcontext_t         ,_param->_size_context_id);
    65       ALLOC1_SIGNAL_IN ( in_DECOD_EVENT_DEPTH                  ,"depth"                  ,Tdepth_t           ,_param->_size_max_depth);
     78      ALLOC1_SIGNAL_IN ( in_DECOD_EVENT_DEPTH                  ,"depth"                  ,Tdepth_t           ,_param->_size_depth);
    6679      ALLOC1_SIGNAL_IN ( in_DECOD_EVENT_TYPE                   ,"type"                   ,Tevent_type_t      ,_param->_size_event_type);
    6780      ALLOC1_SIGNAL_IN ( in_DECOD_EVENT_IS_DELAY_SLOT          ,"is_delay_slot"          ,Tcontrol_t         ,1);
    68       ALLOC1_SIGNAL_IN ( in_DECOD_EVENT_ADDRESS                ,"address"                ,Taddress_t         ,_param->_size_address);
    69       ALLOC1_SIGNAL_IN ( in_DECOD_EVENT_ADDRESS_EPCR           ,"address_epcr"           ,Taddress_t         ,_param->_size_address);
     81      ALLOC1_SIGNAL_IN ( in_DECOD_EVENT_ADDRESS                ,"address"                ,Taddress_t         ,_param->_size_instruction_address);
     82      ALLOC1_SIGNAL_IN ( in_DECOD_EVENT_ADDRESS_EPCR           ,"address_epcr"           ,Taddress_t         ,_param->_size_instruction_address);
    7083    }
    7184
    7285    // ~~~~~[ Interface : "commit_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    7386    {
    74       ALLOC1_INTERFACE("commit_event",IN ,EAST, _("Interface with the Re Order Buffer"), _param->_nb_ooo_engine);
    75 
    76       ALLOC1_VALACK_IN ( in_COMMIT_EVENT_VAL                   ,VAL);
    77       ALLOC1_VALACK_OUT(out_COMMIT_EVENT_ACK                   ,ACK);
    78       ALLOC1_SIGNAL_IN ( in_COMMIT_EVENT_CONTEXT_ID            ,"context_id"      ,Tcontext_t         ,_param->_size_context_id);
    79       ALLOC1_SIGNAL_IN ( in_COMMIT_EVENT_DEPTH                 ,"depth"           ,Tdepth_t           ,_param->_size_max_depth);
    80       ALLOC1_SIGNAL_IN ( in_COMMIT_EVENT_TYPE                  ,"type"            ,Tevent_type_t      ,_param->_size_event_type);
    81       ALLOC1_SIGNAL_IN ( in_COMMIT_EVENT_IS_DELAY_SLOT         ,"is_delay_slot"   ,Tcontrol_t         ,1);
    82       ALLOC1_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS               ,"address"         ,Taddress_t         ,_param->_size_address);
    83       ALLOC1_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EPCR          ,"address_epcr"    ,Taddress_t         ,_param->_size_address);
    84       ALLOC1_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ,"address_eear_val",Tcontrol_t         ,1);
    85       ALLOC1_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EEAR          ,"address_eear"    ,Taddress_t         ,_param->_size_address);
     87      ALLOC_INTERFACE("commit_event",IN ,EAST, _("Interface with the Re Order Buffer"));
     88
     89      ALLOC_VALACK_IN ( in_COMMIT_EVENT_VAL                   ,VAL);
     90      ALLOC_VALACK_OUT (out_COMMIT_EVENT_ACK                   ,ACK);
     91      ALLOC_SIGNAL_IN ( in_COMMIT_EVENT_CONTEXT_ID            ,"context_id"      ,Tcontext_t         ,_param->_size_context_id);
     92      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_DEPTH                 ,"depth"           ,Tdepth_t           ,_param->_size_depth);
     93      ALLOC_SIGNAL_IN ( in_COMMIT_EVENT_TYPE                  ,"type"            ,Tevent_type_t      ,_param->_size_event_type);
     94      ALLOC_SIGNAL_IN ( in_COMMIT_EVENT_IS_DELAY_SLOT         ,"is_delay_slot"   ,Tcontrol_t         ,1);
     95      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS               ,"address"         ,Taddress_t         ,_param->_size_instruction_address);
     96      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EPCR          ,"address_epcr"    ,Taddress_t         ,_param->_size_instruction_address);
     97      ALLOC_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ,"address_eear_val",Tcontrol_t         ,1);
     98      ALLOC_SIGNAL_IN  ( in_COMMIT_EVENT_ADDRESS_EEAR          ,"address_eear"    ,Taddress_t         ,_param->_size_instruction_address);
    8699    }
    87100
     
    93106      ALLOC1_VALACK_OUT(out_BRANCH_COMPLETE_ACK                ,ACK);
    94107      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_CONTEXT_ID         ,"context_id"     ,Tcontext_t         ,_param->_size_context_id);
    95       ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH              ,"depth"          ,Tdepth_t           ,_param->_size_max_depth);
     108      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH              ,"depth"          ,Tdepth_t           ,_param->_size_depth);
    96109      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_MISS_PREDICTION    ,"miss_prediction",Tcontrol_t         ,1);
    97110      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_TAKE               ,"take"           ,Tcontrol_t         ,1);
    98       ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS_SRC        ,"address_src"    ,Taddress_t         ,_param->_size_address);
    99       ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS_DEST       ,"address_dest"   ,Taddress_t         ,_param->_size_address);
     111      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS_SRC        ,"address_src"    ,Taddress_t         ,_param->_size_instruction_address);
     112      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS_DEST       ,"address_dest"   ,Taddress_t         ,_param->_size_instruction_address);
    100113    }
    101114
    102115    // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    103116    {
    104       ALLOC1_INTERFACE("nb_inst",IN ,EAST, _("Interface to count in fligt present instruction."), _param->_nb_decod_unit);
    105 
    106       ALLOC1_SIGNAL_IN ( in_NB_INST_DECOD_ALL                  ,"decod_all" ,Tcounter_t         ,_param->_size_inst_decod  [alloc_signal_it1]);
    107 //    ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_ALL                 ,"commit_all",Tcounter_t         ,_param->_size_inst_commit [alloc_signal_it1]);
    108 //    ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_MEM                 ,"commit_mem",Tcounter_t         ,_param->_size_inst_commit [alloc_signal_it1]);
    109     }
    110     {
    111       ALLOC1_INTERFACE("nb_inst",IN ,EAST, _("Interface to count in fligt present instruction."), _param->_nb_ooo_engine);
    112 
    113 //    ALLOC1_SIGNAL_IN ( in_NB_INST_DECOD_ALL                  ,"decod_all" ,Tcounter_t         ,_param->_size_inst_decod  [alloc_signal_it1]);
    114       ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_ALL                 ,"commit_all",Tcounter_t         ,_param->_size_inst_commit [alloc_signal_it1]);
    115       ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_MEM                 ,"commit_mem",Tcounter_t         ,_param->_size_inst_commit [alloc_signal_it1]);
     117      ALLOC1_INTERFACE("nb_inst",IN ,EAST, _("Interface to count in fligt present instruction."),_param->_nb_context);
     118
     119      ALLOC1_SIGNAL_IN ( in_NB_INST_DECOD_ALL                  ,"decod_all" ,Tcounter_t         ,_param->_size_nb_inst_decod);
     120      ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_ALL                 ,"commit_all",Tcounter_t         ,_param->_size_nb_inst_commit);
     121      ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_MEM                 ,"commit_mem",Tcounter_t         ,_param->_size_nb_inst_commit);
    116122    }
    117123
     
    122128      ALLOC1_VALACK_OUT(out_EVENT_VAL                          ,VAL);
    123129      ALLOC1_VALACK_IN ( in_EVENT_ACK                          ,ACK);
    124       ALLOC1_SIGNAL_OUT(out_EVENT_ADDRESS                      ,"address"         ,Taddress_t        ,_param->_size_address);
    125       ALLOC1_SIGNAL_OUT(out_EVENT_ADDRESS_NEXT                 ,"address_next"    ,Taddress_t        ,_param->_size_address);
     130      ALLOC1_SIGNAL_OUT(out_EVENT_ADDRESS                      ,"address"         ,Taddress_t        ,_param->_size_instruction_address);
     131      ALLOC1_SIGNAL_OUT(out_EVENT_ADDRESS_NEXT                 ,"address_next"    ,Taddress_t        ,_param->_size_instruction_address);
    126132      ALLOC1_SIGNAL_OUT(out_EVENT_ADDRESS_NEXT_VAL             ,"address_next_val",Tcontrol_t        ,1);
    127133      ALLOC1_SIGNAL_OUT(out_EVENT_IS_DS_TAKE                   ,"is_ds_take"      ,Tcontrol_t        ,1);
    128134    }
    129135
    130     // ~~~~~[ Interface "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    131     {
    132       ALLOC1_INTERFACE("spr",OUT,WEST, _("An exception occure : write \"exception PC\"."), _param->_nb_context);
    133 
    134       ALLOC1_VALACK_OUT(out_SPR_VAL                            ,VAL);
    135       ALLOC1_VALACK_IN ( in_SPR_ACK                            ,ACK);
    136       ALLOC1_SIGNAL_OUT(out_SPR_EPCR                           ,"epcr"     ,Taddress_t, _param->_size_address);
    137       ALLOC1_SIGNAL_OUT(out_SPR_EEAR                           ,"eear"     ,Taddress_t, _param->_size_address);
    138       ALLOC1_SIGNAL_OUT(out_SPR_EEAR_WEN                       ,"eear_wen" ,Tcontrol_t,1);
    139       ALLOC1_SIGNAL_OUT(out_SPR_SR_DSX                         ,"sr_dsx"   ,Tcontrol_t,1);
    140       ALLOC1_SIGNAL_OUT(out_SPR_SR_TO_ESR                      ,"sr_to_esr",Tcontrol_t,1);
     136    // ~~~~~[ Interface "spr_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     137    {
     138      ALLOC1_INTERFACE("spr_event",OUT,WEST, _("An exception occure : write \"exception PC\"."), _param->_nb_context);
     139
     140      ALLOC1_VALACK_OUT(out_SPR_EVENT_VAL                      ,VAL);
     141      ALLOC1_VALACK_IN ( in_SPR_EVENT_ACK                      ,ACK);
     142      ALLOC1_SIGNAL_OUT(out_SPR_EVENT_EPCR                     ,"epcr"     ,Taddress_t, _param->_size_instruction_address);
     143      ALLOC1_SIGNAL_OUT(out_SPR_EVENT_EEAR                     ,"eear"     ,Taddress_t, _param->_size_instruction_address);
     144      ALLOC1_SIGNAL_OUT(out_SPR_EVENT_EEAR_WEN                 ,"eear_wen" ,Tcontrol_t,1);
     145      ALLOC1_SIGNAL_OUT(out_SPR_EVENT_SR_DSX                   ,"sr_dsx"   ,Tcontrol_t,1);
     146      ALLOC1_SIGNAL_OUT(out_SPR_EVENT_SR_TO_ESR                ,"sr_to_esr",Tcontrol_t,1);
    141147    }
    142148
     
    152158      ALLOC1_INTERFACE("depth",IN ,NORTH, _("From prediction_unit."), _param->_nb_context);
    153159     
    154       ALLOC1_SIGNAL_IN ( in_DEPTH_TAIL                         ,"tail",Tdepth_t,_param->_size_depth [alloc_signal_it1]);
    155     }
    156 
    157     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    158    
    159     reg_STATE                  = new context_state_t [_param->_nb_context];
    160     reg_EVENT_ADDRESS          = new Taddress_t      [_param->_nb_context];
    161     reg_EVENT_ADDRESS_EPCR     = new Taddress_t      [_param->_nb_context];
    162     reg_EVENT_ADDRESS_EPCR_VAL = new Tcontrol_t      [_param->_nb_context];
    163     reg_EVENT_ADDRESS_EEAR     = new Taddress_t      [_param->_nb_context];
    164     reg_EVENT_ADDRESS_EEAR_VAL = new Tcontrol_t      [_param->_nb_context];
    165     reg_EVENT_IS_DELAY_SLOT    = new Tcontrol_t      [_param->_nb_context];
    166     reg_EVENT_IS_DS_TAKE       = new Tcontrol_t      [_param->_nb_context];
    167     reg_EVENT_DEPTH            = new Tdepth_t        [_param->_nb_context];
    168 
    169     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    170     internal_DECOD_EVENT_ACK     = new Tcontrol_t [_param->_nb_decod_unit];
    171     internal_COMMIT_EVENT_ACK    = new Tcontrol_t [_param->_nb_ooo_engine];
    172     internal_BRANCH_COMPLETE_ACK = new Tcontrol_t [_param->_nb_inst_branch_complete];
    173     internal_EVENT_VAL           = new Tcontrol_t [_param->_nb_context];
    174     internal_SPR_VAL             = new Tcontrol_t [_param->_nb_context];
    175    
     160      ALLOC1_SIGNAL_IN ( in_DEPTH_MIN                          ,"min" ,Tdepth_t,_param->_size_depth);
     161    }
     162
     163
     164    // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~         
     165    {
     166      ALLOC1_INTERFACE("spr",IN,EAST,_("Interface with the special registerFile"),_param->_nb_context);
     167     
     168      ALLOC1_SIGNAL_IN ( in_SPR_SR_IEE                         ,"SR_IEE",Tcontrol_t,1);
     169      ALLOC1_SIGNAL_IN ( in_SPR_SR_EPH                         ,"SR_EPH",Tcontrol_t,1);
     170    }
     171
     172    // ~~~~~[ Interface : "interrupt" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     173    {
     174      ALLOC1_INTERFACE("interrupt",IN,NORTH,_("Interrupt Exception"),_param->_nb_context);
     175
     176      ALLOC1_SIGNAL_IN ( in_INTERRUPT_ENABLE                   ,"ENABLE",Tcontrol_t,1);
     177    }
     178
     179    if (usage_is_set(_usage,USE_SYSTEMC))
     180      {
     181     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     182       
     183     reg_STATE                  = new context_state_t [_param->_nb_context];
     184     reg_EVENT_ADDRESS          = new Taddress_t      [_param->_nb_context];
     185     reg_EVENT_ADDRESS_EPCR     = new Taddress_t      [_param->_nb_context];
     186     reg_EVENT_ADDRESS_EPCR_VAL = new Tcontrol_t      [_param->_nb_context];
     187     reg_EVENT_ADDRESS_EEAR     = new Taddress_t      [_param->_nb_context];
     188     reg_EVENT_ADDRESS_EEAR_VAL = new Tcontrol_t      [_param->_nb_context];
     189     reg_EVENT_IS_DELAY_SLOT    = new Tcontrol_t      [_param->_nb_context];
     190     reg_EVENT_IS_DS_TAKE       = new Tcontrol_t      [_param->_nb_context];
     191     reg_EVENT_DEPTH            = new Tdepth_t        [_param->_nb_context];
     192     reg_INTERRUPT_ENABLE       = new Tcontrol_t      [_param->_nb_context];
     193       
     194     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     195     internal_BRANCH_EVENT_ACK    = new Tcontrol_t [_param->_nb_context];
     196     internal_DECOD_EVENT_ACK     = new Tcontrol_t [_param->_nb_decod_unit];
     197     internal_BRANCH_COMPLETE_ACK = new Tcontrol_t [_param->_nb_inst_branch_complete];
     198     internal_EVENT_VAL           = new Tcontrol_t [_param->_nb_context];
     199     internal_SPR_EVENT_VAL       = new Tcontrol_t [_param->_nb_context];
     200      }
     201
    176202    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    177203
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_deallocation.cpp

    r83 r88  
    2828        delete    in_NRESET;
    2929
     30        DELETE1_SIGNAL( in_BRANCH_EVENT_VAL                   ,_param->_nb_context,1);
     31        DELETE1_SIGNAL(out_BRANCH_EVENT_ACK                   ,_param->_nb_context,1);
     32//      DELETE1_SIGNAL( in_BRANCH_EVENT_CONTEXT_ID            ,_param->_nb_context,_param->_size_context_id);
     33//      DELETE1_SIGNAL( in_BRANCH_EVENT_DEPTH                 ,_param->_nb_context,_param->_size_depth);
     34//      DELETE1_SIGNAL( in_BRANCH_EVENT_MISS_PREDICTION       ,_param->_nb_context,1);
     35        DELETE1_SIGNAL( in_BRANCH_EVENT_ADDRESS_SRC           ,_param->_nb_context,_param->_size_instruction_address);
     36        DELETE1_SIGNAL( in_BRANCH_EVENT_ADDRESS_DEST          ,_param->_nb_context,_param->_size_instruction_address);
     37
    3038        DELETE1_SIGNAL( in_DECOD_EVENT_VAL                    ,_param->_nb_decod_unit,1);
    3139        DELETE1_SIGNAL(out_DECOD_EVENT_ACK                    ,_param->_nb_decod_unit,1);
    3240        DELETE1_SIGNAL( in_DECOD_EVENT_CONTEXT_ID             ,_param->_nb_decod_unit,_param->_size_context_id);
    33         DELETE1_SIGNAL( in_DECOD_EVENT_DEPTH                  ,_param->_nb_decod_unit,_param->_size_max_depth);
     41        DELETE1_SIGNAL( in_DECOD_EVENT_DEPTH                  ,_param->_nb_decod_unit,_param->_size_depth);
    3442        DELETE1_SIGNAL( in_DECOD_EVENT_TYPE                   ,_param->_nb_decod_unit,_param->_size_event_type);
    3543        DELETE1_SIGNAL( in_DECOD_EVENT_IS_DELAY_SLOT          ,_param->_nb_decod_unit,1);
    36         DELETE1_SIGNAL( in_DECOD_EVENT_ADDRESS                ,_param->_nb_decod_unit,_param->_size_address);
    37         DELETE1_SIGNAL( in_DECOD_EVENT_ADDRESS_EPCR           ,_param->_nb_decod_unit,_param->_size_address);
     44        DELETE1_SIGNAL( in_DECOD_EVENT_ADDRESS                ,_param->_nb_decod_unit,_param->_size_instruction_address);
     45        DELETE1_SIGNAL( in_DECOD_EVENT_ADDRESS_EPCR           ,_param->_nb_decod_unit,_param->_size_instruction_address);
    3846       
    39         DELETE1_SIGNAL( in_COMMIT_EVENT_VAL                   ,_param->_nb_ooo_engine,1);
    40         DELETE1_SIGNAL(out_COMMIT_EVENT_ACK                   ,_param->_nb_ooo_engine,1);
    41         DELETE1_SIGNAL( in_COMMIT_EVENT_CONTEXT_ID            ,_param->_nb_ooo_engine,_param->_size_context_id);
    42         DELETE1_SIGNAL( in_COMMIT_EVENT_DEPTH                 ,_param->_nb_ooo_engine,_param->_size_max_depth);
    43         DELETE1_SIGNAL( in_COMMIT_EVENT_TYPE                  ,_param->_nb_ooo_engine,_param->_size_event_type);
    44         DELETE1_SIGNAL( in_COMMIT_EVENT_IS_DELAY_SLOT         ,_param->_nb_ooo_engine,1);
    45         DELETE1_SIGNAL( in_COMMIT_EVENT_ADDRESS               ,_param->_nb_ooo_engine,_param->_size_address);
    46         DELETE1_SIGNAL( in_COMMIT_EVENT_ADDRESS_EPCR          ,_param->_nb_ooo_engine,_param->_size_address);
    47         DELETE1_SIGNAL( in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ,_param->_nb_ooo_engine,_param->_size_address);
    48         DELETE1_SIGNAL( in_COMMIT_EVENT_ADDRESS_EEAR          ,_param->_nb_ooo_engine,1);
     47        DELETE_SIGNAL ( in_COMMIT_EVENT_VAL                   ,1);
     48        DELETE_SIGNAL (out_COMMIT_EVENT_ACK                   ,1);
     49        DELETE_SIGNAL ( in_COMMIT_EVENT_CONTEXT_ID            ,_param->_size_context_id);
     50        DELETE_SIGNAL ( in_COMMIT_EVENT_DEPTH                 ,_param->_size_depth);
     51        DELETE_SIGNAL ( in_COMMIT_EVENT_TYPE                  ,_param->_size_event_type);
     52        DELETE_SIGNAL ( in_COMMIT_EVENT_IS_DELAY_SLOT         ,1);
     53        DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS               ,_param->_size_instruction_address);
     54        DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EPCR          ,_param->_size_instruction_address);
     55        DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL      ,_param->_size_instruction_address);
     56        DELETE_SIGNAL ( in_COMMIT_EVENT_ADDRESS_EEAR          ,1);
    4957
    5058        DELETE1_SIGNAL( in_BRANCH_COMPLETE_VAL                ,_param->_nb_inst_branch_complete,1);
    5159        DELETE1_SIGNAL(out_BRANCH_COMPLETE_ACK                ,_param->_nb_inst_branch_complete,1);
    5260        DELETE1_SIGNAL( in_BRANCH_COMPLETE_CONTEXT_ID         ,_param->_nb_inst_branch_complete,_param->_size_context_id);
    53         DELETE1_SIGNAL( in_BRANCH_COMPLETE_DEPTH              ,_param->_nb_inst_branch_complete,_param->_size_max_depth);
     61        DELETE1_SIGNAL( in_BRANCH_COMPLETE_DEPTH              ,_param->_nb_inst_branch_complete,_param->_size_depth);
    5462        DELETE1_SIGNAL( in_BRANCH_COMPLETE_MISS_PREDICTION    ,_param->_nb_inst_branch_complete,1);
    5563        DELETE1_SIGNAL( in_BRANCH_COMPLETE_TAKE               ,_param->_nb_inst_branch_complete,1);
    56         DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS_SRC        ,_param->_nb_inst_branch_complete,_param->_size_address);
    57         DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS_DEST       ,_param->_nb_inst_branch_complete,_param->_size_address);
     64        DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS_SRC        ,_param->_nb_inst_branch_complete,_param->_size_instruction_address);
     65        DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS_DEST       ,_param->_nb_inst_branch_complete,_param->_size_instruction_address);
    5866       
    59         DELETE1_SIGNAL( in_NB_INST_DECOD_ALL                  ,_param->_nb_decod_unit,_param->_size_inst_decod  [alloc_signal_it1]);
    60 //      DELETE1_SIGNAL( in_NB_INST_COMMIT_ALL                 ,_param->_nb_decod_unit,_param->_size_inst_commit [alloc_signal_it1]);
    61 //      DELETE1_SIGNAL( in_NB_INST_COMMIT_MEM                 ,_param->_nb_decod_unit,_param->_size_inst_commit [alloc_signal_it1]);
    62 //      DELETE1_SIGNAL( in_NB_INST_DECOD_ALL                  ,_param->_nb_ooo_engine,_param->_size_inst_decod  [alloc_signal_it1]);
    63         DELETE1_SIGNAL( in_NB_INST_COMMIT_ALL                 ,_param->_nb_ooo_engine,_param->_size_inst_commit [alloc_signal_it1]);
    64         DELETE1_SIGNAL( in_NB_INST_COMMIT_MEM                 ,_param->_nb_ooo_engine,_param->_size_inst_commit [alloc_signal_it1]);
     67        DELETE1_SIGNAL( in_NB_INST_DECOD_ALL                  ,_param->_nb_context,_param->_size_nb_inst_decod);
     68        DELETE1_SIGNAL( in_NB_INST_COMMIT_ALL                 ,_param->_nb_context,_param->_size_nb_inst_commit);
     69        DELETE1_SIGNAL( in_NB_INST_COMMIT_MEM                 ,_param->_nb_context,_param->_size_nb_inst_commit);
    6570       
    6671        DELETE1_SIGNAL(out_EVENT_VAL                          ,_param->_nb_context,1);
    6772        DELETE1_SIGNAL( in_EVENT_ACK                          ,_param->_nb_context,1);
    68         DELETE1_SIGNAL(out_EVENT_ADDRESS                      ,_param->_nb_context,_param->_size_address);
    69         DELETE1_SIGNAL(out_EVENT_ADDRESS_NEXT                 ,_param->_nb_context,_param->_size_address);
     73        DELETE1_SIGNAL(out_EVENT_ADDRESS                      ,_param->_nb_context,_param->_size_instruction_address);
     74        DELETE1_SIGNAL(out_EVENT_ADDRESS_NEXT                 ,_param->_nb_context,_param->_size_instruction_address);
    7075        DELETE1_SIGNAL(out_EVENT_ADDRESS_NEXT_VAL             ,_param->_nb_context,1);
    7176        DELETE1_SIGNAL(out_EVENT_IS_DS_TAKE                   ,_param->_nb_context,1);
    7277       
    73         DELETE1_SIGNAL(out_SPR_VAL                            ,_param->_nb_context,1);
    74         DELETE1_SIGNAL( in_SPR_ACK                            ,_param->_nb_context,1);
    75         DELETE1_SIGNAL(out_SPR_EPCR                           ,_param->_nb_context,_param->_size_address);
    76         DELETE1_SIGNAL(out_SPR_EEAR                           ,_param->_nb_context,_param->_size_address);
    77         DELETE1_SIGNAL(out_SPR_EEAR_WEN                       ,_param->_nb_context,1);
    78         DELETE1_SIGNAL(out_SPR_SR_DSX                         ,_param->_nb_context,1);
    79         DELETE1_SIGNAL(out_SPR_SR_TO_ESR                      ,_param->_nb_context,1);
     78        DELETE1_SIGNAL(out_SPR_EVENT_VAL                      ,_param->_nb_context,1);
     79        DELETE1_SIGNAL( in_SPR_EVENT_ACK                      ,_param->_nb_context,1);
     80        DELETE1_SIGNAL(out_SPR_EVENT_EPCR                     ,_param->_nb_context,_param->_size_instruction_address);
     81        DELETE1_SIGNAL(out_SPR_EVENT_EEAR                     ,_param->_nb_context,_param->_size_instruction_address);
     82        DELETE1_SIGNAL(out_SPR_EVENT_EEAR_WEN                 ,_param->_nb_context,1);
     83        DELETE1_SIGNAL(out_SPR_EVENT_SR_DSX                   ,_param->_nb_context,1);
     84        DELETE1_SIGNAL(out_SPR_EVENT_SR_TO_ESR                ,_param->_nb_context,1);
    8085       
    8186        DELETE1_SIGNAL(out_CONTEXT_DECOD_ENABLE               ,_param->_nb_context,1);
    8287
    83         DELETE1_SIGNAL( in_DEPTH_TAIL                         ,_param->_nb_context,_param->_size_depth [alloc_signal_it1]);
     88        DELETE1_SIGNAL( in_DEPTH_MIN                          ,_param->_nb_context,_param->_size_depth);
     89
     90        DELETE1_SIGNAL( in_SPR_SR_IEE                         ,_param->_nb_context,1);
     91        DELETE1_SIGNAL( in_SPR_SR_EPH                         ,_param->_nb_context,1);
     92
     93        DELETE1_SIGNAL( in_INTERRUPT_ENABLE                   ,_param->_nb_context,1);
     94
     95        // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     96        delete [] reg_STATE                 ;
     97        delete [] reg_EVENT_ADDRESS         ;
     98        delete [] reg_EVENT_ADDRESS_EPCR    ;
     99        delete [] reg_EVENT_ADDRESS_EPCR_VAL;
     100        delete [] reg_EVENT_ADDRESS_EEAR    ;
     101        delete [] reg_EVENT_ADDRESS_EEAR_VAL;
     102        delete [] reg_EVENT_IS_DELAY_SLOT   ;
     103        delete [] reg_EVENT_IS_DS_TAKE      ;
     104        delete [] reg_EVENT_DEPTH           ;
     105        delete [] reg_INTERRUPT_ENABLE      ;
     106       
     107        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     108        delete [] internal_BRANCH_EVENT_ACK ;
     109        delete [] internal_DECOD_EVENT_ACK  ;
     110        delete [] internal_EVENT_VAL        ;
     111        delete [] internal_SPR_EVENT_VAL    ;
    84112      }
    85 
    86     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    87     delete [] reg_STATE                 ;
    88     delete [] reg_EVENT_ADDRESS         ;
    89     delete [] reg_EVENT_ADDRESS_EPCR    ;
    90     delete [] reg_EVENT_ADDRESS_EPCR_VAL;
    91     delete [] reg_EVENT_ADDRESS_EEAR    ;
    92     delete [] reg_EVENT_ADDRESS_EEAR_VAL;
    93     delete [] reg_EVENT_IS_DELAY_SLOT   ;
    94     delete [] reg_EVENT_IS_DS_TAKE      ;
    95     delete [] reg_EVENT_DEPTH           ;
    96 
    97     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    98     delete [] internal_DECOD_EVENT_ACK  ;
    99     delete [] internal_COMMIT_EVENT_ACK ;
    100     delete [] internal_EVENT_VAL        ;
    101     delete [] internal_SPR_VAL          ;
    102    
     113       
    103114    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    104115
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_genMoore.cpp

    r83 r88  
    2222  {
    2323    log_begin(Context_State,FUNCTION);
     24    log_function(Context_State,FUNCTION,_name.c_str());
    2425
    2526    // -------------------------------------------------------------------
     
    3031        context_state_t state = reg_STATE [i];
    3132
    32         internal_EVENT_VAL [i] = ((state == CONTEXT_STATE_KO_EXCEP_ADDR) or
    33                                   (state == CONTEXT_STATE_KO_MISS_ADDR ) or
    34                                   (state == CONTEXT_STATE_KO_PSYNC_ADDR) or
    35                                   (state == CONTEXT_STATE_KO_CSYNC_ADDR));
    36 
     33        Tcontrol_t val              = ((state == CONTEXT_STATE_KO_EXCEP_ADDR) or
     34                                       (state == CONTEXT_STATE_KO_MISS_ADDR ) or
     35                                       (state == CONTEXT_STATE_KO_PSYNC_ADDR) or
     36                                       (state == CONTEXT_STATE_KO_CSYNC_ADDR));
     37       
     38        // SR can't change in this cycle
     39        // Exception Prefix High
     40        Taddress_t address          = reg_EVENT_ADDRESS [i] | (((state == CONTEXT_STATE_KO_EXCEP_ADDR) and PORT_READ(in_SPR_SR_EPH [i]))?(0xF000000>>2):0);
     41        Taddress_t address_next     = reg_EVENT_ADDRESS_EPCR [i];
     42        Tcontrol_t address_next_val = (state == CONTEXT_STATE_KO_MISS_ADDR) and (reg_EVENT_ADDRESS_EPCR_VAL [i]);
     43        Tcontrol_t is_ds_take       = (state == CONTEXT_STATE_KO_MISS_ADDR) and (reg_EVENT_IS_DS_TAKE       [i]);
    3744        // excep : address exception
    3845        // miss  : address delay_slot, and address dest
    3946        // psync : address next
    4047        // csync : address next
    41         PORT_WRITE(out_EVENT_VAL              [i], internal_EVENT_VAL     [i]);
    42         PORT_WRITE(out_EVENT_ADDRESS          [i], reg_EVENT_ADDRESS      [i]);
    43         PORT_WRITE(out_EVENT_ADDRESS_NEXT     [i], reg_EVENT_ADDRESS_EPCR [i]);
    44         PORT_WRITE(out_EVENT_ADDRESS_NEXT_VAL [i], (state == CONTEXT_STATE_KO_MISS_ADDR) and (reg_EVENT_ADDRESS_EPCR_VAL [i]));
    45         PORT_WRITE(out_EVENT_IS_DS_TAKE       [i], (state == CONTEXT_STATE_KO_MISS_ADDR) and (reg_EVENT_IS_DS_TAKE       [i]));
     48        internal_EVENT_VAL [i] = val;
     49        PORT_WRITE(out_EVENT_VAL              [i], val);
     50        PORT_WRITE(out_EVENT_ADDRESS          [i], address);
     51        PORT_WRITE(out_EVENT_ADDRESS_NEXT     [i], address_next);
     52        PORT_WRITE(out_EVENT_ADDRESS_NEXT_VAL [i], address_next_val);
     53        PORT_WRITE(out_EVENT_IS_DS_TAKE       [i], is_ds_take);
     54
     55        log_printf(TRACE,Context_State,FUNCTION,"  * EVENT Context      : %d", i);
     56        log_printf(TRACE,Context_State,FUNCTION,"    * VAL              : %d", val);
     57        log_printf(TRACE,Context_State,FUNCTION,"    * ADDRESS          : %.8x (%.8x)", address     , address     <<2);
     58        log_printf(TRACE,Context_State,FUNCTION,"    * ADDRESS_NEXT     : %.8x (%.8x)", address_next, address_next<<2);
     59        log_printf(TRACE,Context_State,FUNCTION,"    * ADDRESS_NEXT_VAL : %d", address_next_val);
     60        log_printf(TRACE,Context_State,FUNCTION,"    * IS_DS_TAKE       : %d", is_ds_take);
    4661      }
    4762
    4863    // -------------------------------------------------------------------
    49     // -----[ SPR ]-------------------------------------------------------
     64    // -----[ SPR_EVENT ]-------------------------------------------------
    5065    // -------------------------------------------------------------------
    5166    for (uint32_t i=0; i<_param->_nb_context; i++)
     
    5368        context_state_t state = reg_STATE [i];
    5469
    55         internal_SPR_VAL [i] = (state == CONTEXT_STATE_KO_EXCEP_SPR  );
     70        internal_SPR_EVENT_VAL [i] = (state == CONTEXT_STATE_KO_EXCEP_SPR  );
    5671
    57         PORT_WRITE(out_SPR_VAL       [i], internal_SPR_VAL           [i]);
    58         PORT_WRITE(out_SPR_EPCR      [i], reg_EVENT_ADDRESS_EPCR     [i]);
    59         PORT_WRITE(out_SPR_EEAR      [i], reg_EVENT_ADDRESS_EEAR     [i]);
    60         PORT_WRITE(out_SPR_EEAR_WEN  [i], reg_EVENT_ADDRESS_EEAR_VAL [i]);
    61         PORT_WRITE(out_SPR_SR_DSX    [i], reg_EVENT_IS_DELAY_SLOT    [i]);
    62         PORT_WRITE(out_SPR_SR_TO_ESR [i], 1);
     72        PORT_WRITE(out_SPR_EVENT_VAL       [i], internal_SPR_EVENT_VAL     [i]);
     73        PORT_WRITE(out_SPR_EVENT_EPCR      [i], reg_EVENT_ADDRESS_EPCR     [i]);
     74        PORT_WRITE(out_SPR_EVENT_EEAR      [i], reg_EVENT_ADDRESS_EEAR     [i]);
     75        PORT_WRITE(out_SPR_EVENT_EEAR_WEN  [i], reg_EVENT_ADDRESS_EEAR_VAL [i]);
     76        PORT_WRITE(out_SPR_EVENT_SR_DSX    [i], reg_EVENT_IS_DELAY_SLOT    [i]);
     77        PORT_WRITE(out_SPR_EVENT_SR_TO_ESR [i], 1);
    6378      }
    6479
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp

    r83 r88  
    2222  {
    2323    log_begin(Context_State,FUNCTION);
     24    log_function(Context_State,FUNCTION,_name.c_str());
    2425
    2526    if (PORT_READ(in_NRESET) == 0)
    2627      {
    27         for (uint32_t i=0; i<_param->_nb_context; i++)
    28           reg_STATE [i] = CONTEXT_STATE_OK;
     28        for (uint32_t i=0; i<_param->_nb_context; i++)
     29          {
     30            reg_STATE            [i] = CONTEXT_STATE_OK;
     31            reg_INTERRUPT_ENABLE [i] = 0;
     32          }
    2933      }
    3034    else
    3135      {
    32         // -------------------------------------------------------------------
    33         // -----[ DECOD_EVENT ]-----------------------------------------------
    34         // -------------------------------------------------------------------
    35 
    36         for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
    37           if (PORT_READ(in_DECOD_EVENT_VAL [i]) and internal_DECOD_EVENT_ACK [i])
    38             {
    39               Tcontext_t context    = (_param->_have_port_context_id     )?PORT_READ(in_DECOD_EVENT_CONTEXT_ID [i]):0;
    40               Tdepth_t   depth      = (_param->_have_port_max_depth      )?PORT_READ(in_DECOD_EVENT_DEPTH      [i]):0;
    41               Tdepth_t   depth_cur  = reg_EVENT_DEPTH [context];
    42               Tdepth_t   depth_base = (_param->_have_port_depth [context])?PORT_READ(in_DEPTH_TAIL       [context]):0;
    43               Tdepth_t   depth_max  = _param->_size_depth [context];
    44              
    45               Tdepth_t   depth0     = (depth_cur>=depth_base)?(depth_cur-depth_base):((depth_cur+depth_max-depth_base));
    46               Tdepth_t   depth1     = (depth    >=depth_base)?(depth    -depth_base):((depth    +depth_max-depth_base));
    47 
    48               context_state_t state = reg_STATE [context];
    49               Tevent_type_t   type  = PORT_READ(in_DECOD_EVENT_TYPE [i]);
    50              
    51               // miss > excep > spr/sync
    52               uint8_t    priority0  = (state == CONTEXT_STATE_KO_MISS)?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
    53               uint8_t    priority1  = (state == EVENT_TYPE_EXCEPTION)?1:0;
    54 
    55               // is_valid = can modify local information
    56               //  if context_state_ok : yes
    57               //  if context_state_ko : test the depth, and the priority of envent
    58 
    59               bool       is_valid   = ((state == CONTEXT_STATE_OK) or
    60                                        (depth1< depth0) or
    61                                        ((depth1==depth0) and (priority1>priority0)));
    62 
    63               if (is_valid)
    64                 {
    65                   // decod :
    66                   // type : csync, psync, msync, spr_access (l.mac, l.maci, l.macrc, l.msb, l.mfspr, l.mtspr), exception (l.sys)
    67                   context_state_t state_next    = state;
    68                   Taddress_t      address       = PORT_READ(in_DECOD_EVENT_ADDRESS       [i]);
    69                   Tcontrol_t      is_delay_slot = PORT_READ(in_DECOD_EVENT_IS_DELAY_SLOT [i]);
    70 
    71                   switch (type)
    72                     {
    73                     case EVENT_TYPE_EXCEPTION          :
    74                       {
    75                         state_next = CONTEXT_STATE_KO_EXCEP;
    76                         break;
    77                       }
    78                     case EVENT_TYPE_SPR_ACCESS         :
    79                       {
    80                         state_next = CONTEXT_STATE_KO_SPR  ;
    81                         address++; // take next address
    82                         if (is_delay_slot)
    83                           throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");
    84                         break;
    85                       }
    86                     case EVENT_TYPE_MSYNC              :
    87                       {
    88                         state_next = CONTEXT_STATE_KO_MSYNC;
    89                         address++;  // take next address
    90                         if (is_delay_slot)
    91                           throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");
    92                         break;
    93                       }
    94                     case EVENT_TYPE_PSYNC              :
    95                       {
    96                         state_next = CONTEXT_STATE_KO_PSYNC;
    97                         address++;  // take next address
    98                         if (is_delay_slot)
    99                           throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");
    100                         break;
    101                       }
    102                     case EVENT_TYPE_CSYNC              :
    103                       {
    104                         state_next = CONTEXT_STATE_KO_CSYNC;
    105                         address++;  // take next address
    106                         if (is_delay_slot)
    107                           throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");
    108                         break;
    109                       }               
    110                     case EVENT_TYPE_NONE               :
    111                     case EVENT_TYPE_MISS_SPECULATION   :
    112                     case EVENT_TYPE_BRANCH_NO_ACCURATE :
    113                     default :
    114                       {
    115                         throw ERRORMORPHEO(FUNCTION,toString(_("DECOD_EVENT [%d] : invalid event_type : %s.\n"),i,toString(type).c_str()));
    116                       }
    117                     }
    118 
    119                   reg_STATE                  [context] = state_next;
    120                   reg_EVENT_ADDRESS          [context] = address;
    121                   reg_EVENT_ADDRESS_EPCR     [context] = PORT_READ(in_DECOD_EVENT_ADDRESS_EPCR  [i]);
    122                   reg_EVENT_ADDRESS_EPCR_VAL [context] = 1;
    123                 //reg_EVENT_ADDRESS_EEAR     [context]
    124                   reg_EVENT_ADDRESS_EEAR_VAL [context] = 0;
    125                   reg_EVENT_IS_DELAY_SLOT    [context] = is_delay_slot;
    126                 //reg_EVENT_IS_DS_TAKE       [context] = 0;
    127                   reg_EVENT_DEPTH            [context] = depth;
    128                 }
    129             }
    130 
    131         // -------------------------------------------------------------------
    132         // -----[ COMMIT_EVENT ]----------------------------------------------
    133         // -------------------------------------------------------------------
    134 
    135         for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
    136           if (PORT_READ(in_COMMIT_EVENT_VAL [i]) and internal_COMMIT_EVENT_ACK [i])
    137             {
    138               Tcontext_t context    = (_param->_have_port_context_id     )?PORT_READ(in_COMMIT_EVENT_CONTEXT_ID [i]):0;
    139               Tdepth_t   depth      = (_param->_have_port_max_depth      )?PORT_READ(in_COMMIT_EVENT_DEPTH      [i]):0;
    140               Tdepth_t   depth_cur  = reg_EVENT_DEPTH [context];
    141               Tdepth_t   depth_base = (_param->_have_port_depth [context])?PORT_READ(in_DEPTH_TAIL        [context]):0;
    142               Tdepth_t   depth_max  = _param->_size_depth [context];
    143              
    144               Tdepth_t   depth0     = (depth_cur>=depth_base)?(depth_cur-depth_base):((depth_cur+depth_max-depth_base));
    145               Tdepth_t   depth1     = (depth    >=depth_base)?(depth    -depth_base):((depth    +depth_max-depth_base));
    146 
    147               context_state_t state = reg_STATE [context];
    148               Tevent_type_t   type  = PORT_READ(in_COMMIT_EVENT_TYPE [i]);
    149              
    150               // miss > excep > spr/sync
    151               uint8_t    priority0  = (state == CONTEXT_STATE_KO_MISS)?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
    152               uint8_t    priority1  = 1;
    153 
    154               // is_valid = can modify local information
    155               //  if context_state_ok : yes
    156               //  if context_state_ko : test the depth, and the priority of envent
    157 
    158               bool       is_valid   = ((state == CONTEXT_STATE_OK) or
    159                                        (depth1< depth0) or
    160                                        ((depth1==depth0) and (priority1>priority0)));
    161 
    162               if (is_valid)
    163                 {
    164                   // commit
    165                   // type : exception
    166                   context_state_t state_next = state;
    167                   switch (type)
    168                     {
    169                     case EVENT_TYPE_EXCEPTION          : {state_next = CONTEXT_STATE_KO_EXCEP; break;}
    170                     case EVENT_TYPE_SPR_ACCESS         :
    171                     case EVENT_TYPE_MSYNC              :
    172                     case EVENT_TYPE_PSYNC              :
    173                     case EVENT_TYPE_CSYNC              :
    174                     case EVENT_TYPE_NONE               :
    175                     case EVENT_TYPE_MISS_SPECULATION   :
    176                     case EVENT_TYPE_BRANCH_NO_ACCURATE :
    177                     default :
    178                       {
    179                         throw ERRORMORPHEO(FUNCTION,toString(_("COMMIT_EVENT [%d] : invalid event_type : %s.\n"),i,toString(type).c_str()));
    180                       }
    181                     }
    182                   reg_STATE                  [context] = state_next;
    183                   reg_EVENT_ADDRESS          [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS          [i]);
    184                   reg_EVENT_ADDRESS_EPCR     [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS_EPCR     [i]);
    185                   reg_EVENT_ADDRESS_EPCR_VAL [context] = 1;
    186                   reg_EVENT_ADDRESS_EEAR     [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS_EEAR     [i]);
    187                   reg_EVENT_ADDRESS_EEAR_VAL [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS_EEAR_VAL [i]);
    188                   reg_EVENT_IS_DELAY_SLOT    [context] = PORT_READ(in_COMMIT_EVENT_IS_DELAY_SLOT    [i]);
    189                 //reg_EVENT_IS_DS_TAKE       [context] = 0;
    190                   reg_EVENT_DEPTH            [context] = depth;
    191                 }
    192             }
    193 
    194         // -------------------------------------------------------------------
    195         // -----[ BRANCH_COMPLETE ]-------------------------------------------
    196         // -------------------------------------------------------------------
    197 
    198         for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
    199           if (PORT_READ(in_BRANCH_COMPLETE_VAL [i]) and internal_BRANCH_COMPLETE_ACK [i])
    200             {
    201               if (PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i]))
    202                 {
    203                   Tcontext_t context    = (_param->_have_port_context_id     )?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0;
    204                   Tdepth_t   depth      = (_param->_have_port_max_depth      )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
    205                   Tdepth_t   depth_cur  = reg_EVENT_DEPTH [context];
    206                   Tdepth_t   depth_base = (_param->_have_port_depth [context])?PORT_READ(in_DEPTH_TAIL        [context]):0;
    207                   Tdepth_t   depth_max  = _param->_size_depth [context];
    208                  
    209                   Tdepth_t   depth0     = (depth_cur>=depth_base)?(depth_cur-depth_base):((depth_cur+depth_max-depth_base));
    210                   Tdepth_t   depth1     = (depth    >=depth_base)?(depth    -depth_base):((depth    +depth_max-depth_base));
    211                  
    212                   context_state_t state = reg_STATE [context];
    213                  
    214                   // miss > excep > spr/sync
    215                   uint8_t    priority0  = (state == CONTEXT_STATE_KO_MISS)?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
    216                   uint8_t    priority1  = 2;
    217                  
    218                   // is_valid = can modify local information
    219                   //  if context_state_ok : yes
    220                   //  if context_state_ko : test the depth, and the priority of envent
    221                  
    222                   bool       is_valid   = ((state == CONTEXT_STATE_OK) or
    223                                            (depth1< depth0) or
    224                                            ((depth1==depth0) and (priority1>priority0)));
    225                  
    226                   if (is_valid)
    227                     {
    228                       // commit
    229                       Tcontrol_t take = PORT_READ(in_BRANCH_COMPLETE_TAKE [i]);
    230                       reg_STATE                  [context] = CONTEXT_STATE_KO_MISS;
    231                       reg_EVENT_ADDRESS          [context] = PORT_READ(in_BRANCH_COMPLETE_ADDRESS_SRC  [i])+1; //DELAY_SLOT
    232                       reg_EVENT_ADDRESS_EPCR     [context] = PORT_READ(in_BRANCH_COMPLETE_ADDRESS_DEST [i]);
    233                       reg_EVENT_ADDRESS_EPCR_VAL [context] = take; // if not take : in sequence
    234                     //reg_EVENT_ADDRESS_EEAR     [context];
    235                     //reg_EVENT_ADDRESS_EEAR_VAL [context];
    236                       reg_EVENT_IS_DELAY_SLOT    [context] = take;
    237                       reg_EVENT_IS_DS_TAKE       [context] = take;
    238                       reg_EVENT_DEPTH            [context] = depth;
    239                     }
    240                 }
    241             }
    242 
    243         // -------------------------------------------------------------------
    244         // -----[ EVENT ]-----------------------------------------------------
    245         // -------------------------------------------------------------------
    246         for (uint32_t i=0; i<_param->_nb_context; i++)
    247           if (internal_EVENT_VAL [i] and PORT_READ(in_EVENT_ACK [i]))
    248             {
    249               // Write pc
    250               context_state_t state = reg_STATE [i];
    251 
    252               switch (state)
    253                 {
    254                 case CONTEXT_STATE_KO_EXCEP_ADDR :
    255                   {
    256                     reg_STATE [i] = CONTEXT_STATE_KO_EXCEP_SPR;
    257                     break;
    258                   }
    259                 case CONTEXT_STATE_KO_MISS_ADDR  :
    260                 case CONTEXT_STATE_KO_PSYNC_ADDR :
    261                 case CONTEXT_STATE_KO_CSYNC_ADDR :
    262                   {
    263                     reg_STATE [i] = CONTEXT_STATE_OK;
    264                     break;
    265                   }
    266                 default :
    267                   {
     36        // -------------------------------------------------------------------
     37        // -----[ BRANCH_EVENT ]----------------------------------------------
     38        // -------------------------------------------------------------------
     39        for (uint32_t i=0; i<_param->_nb_context; ++i)
     40          if (PORT_READ(in_BRANCH_EVENT_VAL [i]) and internal_BRANCH_EVENT_ACK [i])
     41            {
     42//               throw ERRORMORPHEO(FUNCTION,_("Not yet implemented (Comming Soon).\n"));
     43
     44              context_state_t state = reg_STATE [i];
     45
     46              Tdepth_t   depth      = // (_param->_have_port_depth)?PORT_READ(in_BRANCH_EVENT_DEPTH [i]):
     47                0;
     48              Tdepth_t   depth_cur  = reg_EVENT_DEPTH [i];
     49              Tdepth_t   depth_min  = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [i]):0;
     50              Tdepth_t   depth_max  = _param->_array_size_depth [i];
     51             
     52//               Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));
     53//               Tdepth_t   depth1     = (depth    >=depth_min)?(depth    -depth_min):((depth    +depth_max-depth_min));
     54              Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max));
     55              Tdepth_t   depth1     = (depth    >=depth_min)?(depth    ):((depth    +depth_max));
     56
     57              // priority : miss > excep > spr/sync
     58              uint8_t    priority0  = (state == CONTEXT_STATE_KO_MISS)?2:((state == EVENT_TYPE_EXCEPTION)?1:0);
     59              uint8_t    priority1  = 2; // miss
     60
     61              // is_valid = can modify local information
     62              //   if context_state_ok : yes
     63              //   if context_state_ko : test the depth, and the priority of envent
     64
     65              bool       is_valid   = ((state == CONTEXT_STATE_OK) or
     66                                       (depth1< depth0) or
     67                                       ((depth1==depth0) and (priority1>priority0)));
     68
     69              if (is_valid)
     70                {
     71                  reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS;
     72                  reg_EVENT_ADDRESS          [i] =  PORT_READ(in_BRANCH_EVENT_ADDRESS_SRC [i])+1; // address delay slot
     73                  reg_EVENT_ADDRESS_EPCR     [i] =  PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST[i]);   // address_next
     74                  reg_EVENT_ADDRESS_EPCR_VAL [i] =  1; // address_dest is valid
     75                //reg_EVENT_ADDRESS_EEAR     [i] =  0;
     76                  reg_EVENT_ADDRESS_EEAR_VAL [i] =  0;
     77                  reg_EVENT_IS_DELAY_SLOT    [i] =  1;
     78                  reg_EVENT_IS_DS_TAKE       [i] =  0;// ??
     79                  reg_EVENT_DEPTH            [i] =  depth;
     80                }
     81            }
     82       
     83        // -------------------------------------------------------------------
     84        // -----[ DECOD_EVENT ]-----------------------------------------------
     85        // -------------------------------------------------------------------
     86
     87        for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     88          if (PORT_READ(in_DECOD_EVENT_VAL [i]) and internal_DECOD_EVENT_ACK [i])
     89            {
     90              Tcontext_t context    = (_param->_have_port_context_id )?PORT_READ(in_DECOD_EVENT_CONTEXT_ID [i]):0;
     91              Tdepth_t   depth      = (_param->_have_port_depth      )?PORT_READ(in_DECOD_EVENT_DEPTH      [i]):0;
     92              Tdepth_t   depth_cur  = reg_EVENT_DEPTH [context];
     93              Tdepth_t   depth_min = (_param->_have_port_depth      )?PORT_READ(in_DEPTH_MIN [context]):0;
     94              Tdepth_t   depth_max  = _param->_array_size_depth [context];
     95             
     96//               Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));
     97//               Tdepth_t   depth1     = (depth    >=depth_min)?(depth    -depth_min):((depth    +depth_max-depth_min));
     98              Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max));
     99              Tdepth_t   depth1     = (depth    >=depth_min)?(depth    ):((depth    +depth_max));
     100
     101              context_state_t state = reg_STATE [context];
     102              Tevent_type_t   type  = PORT_READ(in_DECOD_EVENT_TYPE [i]);
     103             
     104              // miss > excep > spr/sync
     105              uint8_t    priority0  = (state == CONTEXT_STATE_KO_MISS)?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
     106              uint8_t    priority1  = (state == EVENT_TYPE_EXCEPTION)?1:0;
     107
     108              // is_valid = can modify local information
     109              //  if context_state_ok : yes
     110              //  if context_state_ko : test the depth, and the priority of envent
     111
     112              bool       is_valid   = ((state == CONTEXT_STATE_OK) or
     113                                       (depth1< depth0) or
     114                                       ((depth1==depth0) and (priority1>priority0)));
     115
     116              if (is_valid)
     117                {
     118                  // decod :
     119                  // type : csync, psync, msync, spr_access (l.mac, l.maci, l.macrc, l.msb, l.mfspr, l.mtspr), exception (l.sys)
     120                  context_state_t state_next    = state;
     121                  Taddress_t      address       = PORT_READ(in_DECOD_EVENT_ADDRESS       [i]);
     122                  Tcontrol_t      is_delay_slot = PORT_READ(in_DECOD_EVENT_IS_DELAY_SLOT [i]);
     123
     124                  switch (type)
     125                    {
     126                    case EVENT_TYPE_EXCEPTION          :
     127                      {
     128                        state_next = CONTEXT_STATE_KO_EXCEP;
     129
     130                        break;
     131                      }
     132                    case EVENT_TYPE_SPR_ACCESS         :
     133                      {
     134                        state_next = CONTEXT_STATE_KO_SPR  ;
     135                        address++; // take next address
     136                        if (is_delay_slot)
     137                          throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");
     138                        break;
     139                      }
     140                    case EVENT_TYPE_MSYNC              :
     141                      {
     142                        state_next = CONTEXT_STATE_KO_MSYNC;
     143                        address++;  // take next address
     144                        if (is_delay_slot)
     145                          throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");
     146                        break;
     147                      }
     148                    case EVENT_TYPE_PSYNC              :
     149                      {
     150                        state_next = CONTEXT_STATE_KO_PSYNC;
     151                        address++;  // take next address
     152                        if (is_delay_slot)
     153                          throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");
     154                        break;
     155                      }
     156                    case EVENT_TYPE_CSYNC              :
     157                      {
     158                        state_next = CONTEXT_STATE_KO_CSYNC;
     159                        address++;  // take next address
     160                        if (is_delay_slot)
     161                          throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");
     162                        break;
     163                      }               
     164                    case EVENT_TYPE_NONE               :
     165                    case EVENT_TYPE_MISS_SPECULATION   :
     166                    case EVENT_TYPE_BRANCH_NO_ACCURATE :
     167                    default :
     168                      {
     169                        throw ERRORMORPHEO(FUNCTION,toString(_("DECOD_EVENT [%d] : invalid event_type : %s.\n"),i,toString(type).c_str()));
     170                      }
     171                    }
     172
     173                  reg_STATE                  [context] = state_next;
     174                  reg_EVENT_ADDRESS          [context] = address;
     175                  reg_EVENT_ADDRESS_EPCR     [context] = PORT_READ(in_DECOD_EVENT_ADDRESS_EPCR  [i]);
     176                  reg_EVENT_ADDRESS_EPCR_VAL [context] = 1;
     177                //reg_EVENT_ADDRESS_EEAR     [context]
     178                  reg_EVENT_ADDRESS_EEAR_VAL [context] = 0;
     179                  reg_EVENT_IS_DELAY_SLOT    [context] = is_delay_slot;
     180                //reg_EVENT_IS_DS_TAKE       [context] = 0;
     181                  reg_EVENT_DEPTH            [context] = depth;
     182                }
     183            }
     184
     185        // -------------------------------------------------------------------
     186        // -----[ COMMIT_EVENT ]----------------------------------------------
     187        // -------------------------------------------------------------------
     188
     189        if (PORT_READ(in_COMMIT_EVENT_VAL ) and internal_COMMIT_EVENT_ACK )
     190          {
     191            Tcontext_t context    = (_param->_have_port_context_id)?PORT_READ(in_COMMIT_EVENT_CONTEXT_ID ):0;
     192            Tdepth_t   depth      = (_param->_have_port_depth     )?PORT_READ(in_COMMIT_EVENT_DEPTH      ):0;
     193            Tdepth_t   depth_cur  = reg_EVENT_DEPTH [context];
     194            Tdepth_t   depth_min = (_param->_have_port_depth     )?PORT_READ(in_DEPTH_MIN [context]):0;
     195            Tdepth_t   depth_max  = _param->_array_size_depth [context];
     196           
     197//             Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));
     198//             Tdepth_t   depth1     = (depth    >=depth_min)?(depth    -depth_min):((depth    +depth_max-depth_min));
     199            Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max));
     200            Tdepth_t   depth1     = (depth    >=depth_min)?(depth    ):((depth    +depth_max));
     201
     202            context_state_t state = reg_STATE [context];
     203            Tevent_type_t   type  = PORT_READ(in_COMMIT_EVENT_TYPE );
     204           
     205            // miss > excep > spr/sync
     206            uint8_t    priority0  = (state == CONTEXT_STATE_KO_MISS)?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
     207            uint8_t    priority1  = 1; // exception
     208
     209            // is_valid = can modify local information
     210            //  if context_state_ok : yes
     211            //  if context_state_ko : test the depth, and the priority of envent
     212
     213            bool       is_valid   = ((state == CONTEXT_STATE_OK) or
     214                                     (depth1< depth0) or
     215                                     ((depth1==depth0) and (priority1>priority0)));
     216
     217            if (is_valid)
     218              {
     219                // commit
     220                // type : exception
     221                context_state_t state_next = state;
     222                switch (type)
     223                  {
     224                  case EVENT_TYPE_EXCEPTION          : {state_next = CONTEXT_STATE_KO_EXCEP; break;}
     225                  case EVENT_TYPE_SPR_ACCESS         :
     226                  case EVENT_TYPE_MSYNC              :
     227                  case EVENT_TYPE_PSYNC              :
     228                  case EVENT_TYPE_CSYNC              :
     229                  case EVENT_TYPE_NONE               :
     230                  case EVENT_TYPE_MISS_SPECULATION   :
     231                  case EVENT_TYPE_BRANCH_NO_ACCURATE :
     232                  default :
     233                    {
     234                      throw ERRORMORPHEO(FUNCTION,toString(_("COMMIT_EVENT : invalid event_type : %s.\n"),toString(type).c_str()));
     235                    }
     236                  }
     237                reg_STATE                  [context] = state_next;
     238                reg_EVENT_ADDRESS          [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS          );
     239                reg_EVENT_ADDRESS_EPCR     [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS_EPCR     );
     240                reg_EVENT_ADDRESS_EPCR_VAL [context] = 1;
     241                reg_EVENT_ADDRESS_EEAR     [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS_EEAR     );
     242                reg_EVENT_ADDRESS_EEAR_VAL [context] = PORT_READ(in_COMMIT_EVENT_ADDRESS_EEAR_VAL );
     243                reg_EVENT_IS_DELAY_SLOT    [context] = PORT_READ(in_COMMIT_EVENT_IS_DELAY_SLOT    );
     244              //reg_EVENT_IS_DS_TAKE       [context] = 0;
     245                reg_EVENT_DEPTH            [context] = depth;
     246              }
     247          }
     248
     249        // -------------------------------------------------------------------
     250        // -----[ BRANCH_COMPLETE ]-------------------------------------------
     251        // -------------------------------------------------------------------
     252
     253        for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
     254          if (PORT_READ(in_BRANCH_COMPLETE_VAL [i]) and internal_BRANCH_COMPLETE_ACK [i])
     255            {
     256              if (PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i]))
     257                {
     258                  Tcontext_t context    = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0;
     259                  Tdepth_t   depth      = (_param->_have_port_depth     )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
     260                  Tdepth_t   depth_cur  = reg_EVENT_DEPTH [context];
     261                  Tdepth_t   depth_min = (_param->_have_port_depth     )?PORT_READ(in_DEPTH_MIN [context]):0;
     262                  Tdepth_t   depth_max  = _param->_array_size_depth [context];
     263                 
     264//                   Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));
     265//                   Tdepth_t   depth1     = (depth    >=depth_min)?(depth    -depth_min):((depth    +depth_max-depth_min));
     266                  Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max));
     267                  Tdepth_t   depth1     = (depth    >=depth_min)?(depth    ):((depth    +depth_max));
     268                 
     269                  context_state_t state = reg_STATE [context];
     270                 
     271                  // miss > excep > spr/sync
     272                  uint8_t    priority0  = (state == CONTEXT_STATE_KO_MISS)?2:((state == CONTEXT_STATE_KO_EXCEP)?1:0);
     273                  uint8_t    priority1  = 2; // miss
     274                 
     275                  // is_valid = can modify local information
     276                  //  if context_state_ok : yes
     277                  //  if context_state_ko : test the depth, and the priority of envent
     278                 
     279                  bool       is_valid   = ((state == CONTEXT_STATE_OK) or
     280                                           (depth1< depth0) or
     281                                           ((depth1==depth0) and (priority1>priority0)));
     282                 
     283                  if (is_valid)
     284                    {
     285                      // commit
     286                      Tcontrol_t take = PORT_READ(in_BRANCH_COMPLETE_TAKE [i]);
     287                      reg_STATE                  [context] = CONTEXT_STATE_KO_MISS;
     288                      reg_EVENT_ADDRESS          [context] = PORT_READ(in_BRANCH_COMPLETE_ADDRESS_SRC  [i])+1; //DELAY_SLOT
     289                      reg_EVENT_ADDRESS_EPCR     [context] = PORT_READ(in_BRANCH_COMPLETE_ADDRESS_DEST [i]);
     290                      reg_EVENT_ADDRESS_EPCR_VAL [context] = take; // if not take : in sequence
     291                    //reg_EVENT_ADDRESS_EEAR     [context];
     292                      reg_EVENT_ADDRESS_EEAR_VAL [context] = 0;
     293                      reg_EVENT_IS_DELAY_SLOT    [context] = take;
     294                      reg_EVENT_IS_DS_TAKE       [context] = take;
     295                      reg_EVENT_DEPTH            [context] = depth;
     296                    }
     297                }
     298            }
     299
     300        // -------------------------------------------------------------------
     301        // -----[ EVENT ]-----------------------------------------------------
     302        // -------------------------------------------------------------------
     303        for (uint32_t i=0; i<_param->_nb_context; i++)
     304          if (internal_EVENT_VAL [i] and PORT_READ(in_EVENT_ACK [i]))
     305            {
     306              // Write pc
     307              context_state_t state = reg_STATE [i];
     308
     309              switch (state)
     310                {
     311                case CONTEXT_STATE_KO_EXCEP_ADDR :
     312                  {
     313                    reg_STATE [i] = CONTEXT_STATE_KO_EXCEP_SPR;
     314                    break;
     315                  }
     316                case CONTEXT_STATE_KO_MISS_ADDR  :
     317                case CONTEXT_STATE_KO_PSYNC_ADDR :
     318                case CONTEXT_STATE_KO_CSYNC_ADDR :
     319                  {
     320                    reg_STATE [i] = CONTEXT_STATE_OK;
     321                    break;
     322                  }
     323                default :
     324                  {
    268325#ifdef DEBUG_TEST
    269                     throw ERRORMORPHEO(FUNCTION,toString(_("SPR[%d], Invalid state : %s.\n"),i,toString(state).c_str()));
     326                    throw ERRORMORPHEO(FUNCTION,toString(_("SPR[%d], Invalid state : %s.\n"),i,toString(state).c_str()));
    270327#endif
    271                     break;
    272                   }
    273                 }
    274             }
    275 
    276         // -------------------------------------------------------------------
    277         // -----[ SPR ]-------------------------------------------------------
    278         // -------------------------------------------------------------------
    279         for (uint32_t i=0; i<_param->_nb_context; i++)
    280           if (internal_SPR_VAL [i] and PORT_READ(in_SPR_ACK [i]))
    281             {
    282               // Write spr
     328                    break;
     329                  }
     330                }
     331            }
     332
     333        // -------------------------------------------------------------------
     334        // -----[ SPR_EVENT ]-------------------------------------------------
     335        // -------------------------------------------------------------------
     336        for (uint32_t i=0; i<_param->_nb_context; i++)
     337          if (internal_SPR_EVENT_VAL [i] and PORT_READ(in_SPR_EVENT_ACK [i]))
     338            {
     339              // Write spr
    283340#ifdef DEBUG_TEST
    284               context_state_t state = reg_STATE [i];
    285            
    286               if (state != CONTEXT_STATE_KO_EXCEP_SPR)
    287                 throw ERRORMORPHEO(FUNCTION,toString(_("SPR[%d], Invalid state : %s.\n"),i,toString(state).c_str()));
     341              context_state_t state = reg_STATE [i];
     342           
     343              if (state != CONTEXT_STATE_KO_EXCEP_SPR)
     344                throw ERRORMORPHEO(FUNCTION,toString(_("SPR_EVENT[%d], Invalid state : %s.\n"),i,toString(state).c_str()));
    288345#endif
    289              
    290               reg_STATE [i] = CONTEXT_STATE_OK;
    291             }
    292 
    293         // -------------------------------------------------------------------
    294         // -----[ next state ]------------------------------------------------
    295         // -------------------------------------------------------------------
    296         for (uint32_t i=0; i<_param->_nb_context; i++)
    297           {
    298             uint32_t x = _param->_link_context_to_decod_unit    [i];
    299             uint32_t y = _param->_link_decod_unit_to_ooo_engine [x];
    300 
    301             Tcounter_t inst_all = PORT_READ(in_NB_INST_COMMIT_ALL [y]) + PORT_READ(in_NB_INST_DECOD_ALL [x]);
    302             Tcounter_t inst_mem = PORT_READ(in_NB_INST_COMMIT_MEM [y]) + PORT_READ(in_NB_INST_DECOD_ALL [x]);
    303 
    304             context_state_t state = reg_STATE [i];
    305 
    306             switch (state)
    307               {
    308               case CONTEXT_STATE_OK              :
    309                 {
    310                   // nothing, wait an event
    311                   break;
    312                 }
    313               case CONTEXT_STATE_KO_EXCEP        :
    314                 {
    315                   // Wait end of all instruction
    316                   if (inst_all == 0)
    317                     state = CONTEXT_STATE_KO_EXCEP_ADDR;
    318                   break;
    319                 }
    320               case CONTEXT_STATE_KO_MISS         :
    321                 {
    322                   // Wait end of all instruction
    323                   if (inst_all == 0)
    324                     state = CONTEXT_STATE_KO_MISS_ADDR;
    325                   break;
    326                 }
    327               case CONTEXT_STATE_KO_EXCEP_ADDR   :
    328                 {
    329                   // nothing, wait the update of internal register (pc)
    330                   break;
    331                 }
    332               case CONTEXT_STATE_KO_EXCEP_SPR    :
    333                 {
    334                   // nothing, wait the update of internal register (epcr, eear, sr, esr)
    335                   break;
    336                 }
    337               case CONTEXT_STATE_KO_MISS_ADDR    :
    338                 {
    339                   // nothing, wait the update of internal register (pc)
    340                   break;
    341                 }
    342               case CONTEXT_STATE_KO_PSYNC        :
    343                 {
    344                   // Wait end of all instruction
    345                   if (inst_all == 0)
    346 //                  state = CONTEXT_STATE_KO_PSYNC_FLUSH;
    347                     state = CONTEXT_STATE_KO_PSYNC_ADDR ;
    348                   break;
    349                 }
    350 //            case CONTEXT_STATE_KO_PSYNC_FLUSH  :
    351 //              {
    352 //                // nothing, wait end of flush (ifetch)
    353 //                break;
    354 //              }
    355               case CONTEXT_STATE_KO_PSYNC_ADDR   :
    356                 {
    357                   // nothing, wait the pc write
    358                   break;
    359                 }
    360               case CONTEXT_STATE_KO_CSYNC        :
    361                 {
    362                   // Wait end of all instruction
    363                   if (inst_all == 0)
    364                     state = CONTEXT_STATE_KO_CSYNC_ADDR ;
    365 //                  state = CONTEXT_STATE_KO_CSYNC_FLUSH;
    366                   break;
    367                 }
    368 //            case CONTEXT_STATE_KO_CSYNC_FLUSH  :
    369 //              {
    370 //                // nothing, wait end of flush (all internal structure)
    371 //                break;
    372 //              }
    373               case CONTEXT_STATE_KO_CSYNC_ADDR   :
    374                 {
    375                   // nothing, wait the pc write
    376                   break;
    377                 }
    378               case CONTEXT_STATE_KO_MSYNC        :
    379                 {
    380                   // Wait end of memory instruction
    381                   if (inst_mem == 0)
    382                     state = CONTEXT_STATE_KO_MSYNC_ISSUE;
    383                   break;
    384                 }
    385               case CONTEXT_STATE_KO_MSYNC_ISSUE  :
    386                 {
    387                   // Wait the msync issue
    388                   if (inst_mem != 0)
    389                     state = CONTEXT_STATE_KO_MSYNC_EXEC;
    390                   break;
    391                 }
    392               case CONTEXT_STATE_KO_MSYNC_EXEC   :
    393                 {
    394                   // Wait the end of msync
    395                   if (inst_mem == 0)
    396                     state = CONTEXT_STATE_OK;
    397                   break;
    398                 }
    399               case CONTEXT_STATE_KO_SPR          :
    400                 {
    401                   // Wait end of all instruction
    402                   if (inst_all == 0)
    403                     state = CONTEXT_STATE_KO_SPR_ISSUE;
    404                   break;
    405                 }
    406               case CONTEXT_STATE_KO_SPR_ISSUE    :
    407                 {
    408                   // Wait the spr_access issue
    409                   if (inst_all != 0)
    410                     state = CONTEXT_STATE_KO_SPR_EXEC;
    411                   break;
    412                 }
    413               case CONTEXT_STATE_KO_SPR_EXEC     :
    414                 {
    415                   // Wait the spr_access execution
    416                   if (inst_all == 0)
    417                     state = CONTEXT_STATE_OK;
    418                   break;
    419                 }
    420 
    421               default :
    422                 {
    423                   throw ERRORMORPHEO(FUNCTION,toString(_("Context[%d], Unknow state : %s.\n"),i,toString(state).c_str()));
    424                 }
    425               }
    426             reg_STATE [i] = state;
    427           }
     346             
     347              reg_STATE [i] = CONTEXT_STATE_OK;
     348            }
     349
     350        // -------------------------------------------------------------------
     351        // -----[ next state ]------------------------------------------------
     352        // -------------------------------------------------------------------
     353        for (uint32_t i=0; i<_param->_nb_context; i++)
     354          {
     355//             uint32_t x = _param->_link_context_to_decod_unit    [i];
     356
     357            Tcounter_t inst_all = PORT_READ(in_NB_INST_COMMIT_ALL[i]) + PORT_READ(in_NB_INST_DECOD_ALL [i]);
     358            Tcounter_t inst_mem = PORT_READ(in_NB_INST_COMMIT_MEM[i]) + PORT_READ(in_NB_INST_DECOD_ALL [i]);
     359
     360            context_state_t state = reg_STATE [i];
     361
     362            switch (state)
     363              {
     364              case CONTEXT_STATE_OK              :
     365                {
     366                  // nothing, wait an event
     367                  break;
     368                }
     369              case CONTEXT_STATE_KO_EXCEP        :
     370                {
     371                  // Wait end of all instruction
     372                  if (inst_all == 0)
     373                    state = CONTEXT_STATE_KO_EXCEP_ADDR;
     374                  break;
     375                }
     376              case CONTEXT_STATE_KO_MISS         :
     377                {
     378                  // Wait end of all instruction
     379                  if (inst_all == 0)
     380                    state = CONTEXT_STATE_KO_MISS_ADDR;
     381                  break;
     382                }
     383              case CONTEXT_STATE_KO_EXCEP_ADDR   :
     384                {
     385                  // nothing, wait the update of internal register (pc)
     386                  break;
     387                }
     388              case CONTEXT_STATE_KO_EXCEP_SPR    :
     389                {
     390                  // nothing, wait the update of internal register (epcr, eear, sr, esr)
     391                  break;
     392                }
     393              case CONTEXT_STATE_KO_MISS_ADDR    :
     394                {
     395                  // nothing, wait the update of internal register (pc)
     396                  break;
     397                }
     398              case CONTEXT_STATE_KO_PSYNC        :
     399                {
     400                  // Wait end of all instruction
     401                  if (inst_all == 0)
     402//                  state = CONTEXT_STATE_KO_PSYNC_FLUSH;
     403                    state = CONTEXT_STATE_KO_PSYNC_ADDR ;
     404                  break;
     405                }
     406//            case CONTEXT_STATE_KO_PSYNC_FLUSH  :
     407//              {
     408//                // nothing, wait end of flush (ifetch)
     409//                break;
     410//              }
     411              case CONTEXT_STATE_KO_PSYNC_ADDR   :
     412                {
     413                  // nothing, wait the pc write
     414                  break;
     415                }
     416              case CONTEXT_STATE_KO_CSYNC        :
     417                {
     418                  // Wait end of all instruction
     419                  if (inst_all == 0)
     420                    state = CONTEXT_STATE_KO_CSYNC_ADDR ;
     421//                  state = CONTEXT_STATE_KO_CSYNC_FLUSH;
     422                  break;
     423                }
     424//            case CONTEXT_STATE_KO_CSYNC_FLUSH  :
     425//              {
     426//                // nothing, wait end of flush (all internal structure)
     427//                break;
     428//              }
     429              case CONTEXT_STATE_KO_CSYNC_ADDR   :
     430                {
     431                  // nothing, wait the pc write
     432                  break;
     433                }
     434              case CONTEXT_STATE_KO_MSYNC        :
     435                {
     436                  // Wait end of memory instruction
     437                  if (inst_mem == 0)
     438                    state = CONTEXT_STATE_KO_MSYNC_ISSUE;
     439                  break;
     440                }
     441              case CONTEXT_STATE_KO_MSYNC_ISSUE  :
     442                {
     443                  // Wait the msync issue
     444                  if (inst_mem != 0)
     445                    state = CONTEXT_STATE_KO_MSYNC_EXEC;
     446                  break;
     447                }
     448              case CONTEXT_STATE_KO_MSYNC_EXEC   :
     449                {
     450                  // Wait the end of msync
     451                  if (inst_mem == 0)
     452                    state = CONTEXT_STATE_OK;
     453                  break;
     454                }
     455              case CONTEXT_STATE_KO_SPR          :
     456                {
     457                  // Wait end of all instruction
     458                  if (inst_all == 0)
     459                    state = CONTEXT_STATE_KO_SPR_ISSUE;
     460                  break;
     461                }
     462              case CONTEXT_STATE_KO_SPR_ISSUE    :
     463                {
     464                  // Wait the spr_access issue
     465                  if (inst_all != 0)
     466                    state = CONTEXT_STATE_KO_SPR_EXEC;
     467                  break;
     468                }
     469              case CONTEXT_STATE_KO_SPR_EXEC     :
     470                {
     471                  // Wait the spr_access execution
     472                  if (inst_all == 0)
     473                    state = CONTEXT_STATE_OK;
     474                  break;
     475                }
     476
     477              default :
     478                {
     479                  throw ERRORMORPHEO(FUNCTION,toString(_("Context[%d], Unknow state : %s.\n"),i,toString(state).c_str()));
     480                }
     481              }
     482            reg_STATE [i] = state;
     483          }
     484
     485        for (uint32_t i=0; i<_param->_nb_context; ++i)
     486          {
     487            reg_INTERRUPT_ENABLE [i] = PORT_READ(in_INTERRUPT_ENABLE [i]) and PORT_READ(in_SPR_SR_IEE [i]);
     488
     489            if (reg_INTERRUPT_ENABLE [i])
     490              throw ERRORMORPHEO(FUNCTION,toString(_("Context[%d], Have an interruption, Not yet supported (Comming Soon).\n"),i));
     491          }
    428492      }
    429493
     
    431495    for (uint32_t i=0; i<_param->_nb_context; i++)
    432496      {
    433         log_printf(TRACE,Context_State,FUNCTION,"Context State [%d]",i);
    434         log_printf(TRACE,Context_State,FUNCTION," * reg_STATE                  : %s"  ,toString(reg_STATE [i]).c_str());
    435         log_printf(TRACE,Context_State,FUNCTION," * reg_EVENT_ADDRESS          : 0x%x",reg_EVENT_ADDRESS          [i]);
    436         log_printf(TRACE,Context_State,FUNCTION," * reg_EVENT_ADDRESS_EPCR     : 0x%x",reg_EVENT_ADDRESS_EPCR     [i]);
    437         log_printf(TRACE,Context_State,FUNCTION," * reg_EVENT_ADDRESS_EPCR_VAL : %d"  ,reg_EVENT_ADDRESS_EPCR_VAL [i]);
    438         log_printf(TRACE,Context_State,FUNCTION," * reg_EVENT_ADDRESS_EEAR     : 0x%x",reg_EVENT_ADDRESS_EEAR     [i]);
    439         log_printf(TRACE,Context_State,FUNCTION," * reg_EVENT_ADDRESS_EEAR_VAL : %d"  ,reg_EVENT_ADDRESS_EEAR_VAL [i]);
    440         log_printf(TRACE,Context_State,FUNCTION," * reg_EVENT_IS_DELAY_SLOT    : %d"  ,reg_EVENT_IS_DELAY_SLOT    [i]);
    441         log_printf(TRACE,Context_State,FUNCTION," * reg_EVENT_IS_DS_TAKE       : %d"  ,reg_EVENT_IS_DS_TAKE       [i]);
    442         log_printf(TRACE,Context_State,FUNCTION," * reg_EVENT_DEPTH            : %d"  ,reg_EVENT_DEPTH            [i]);
     497        log_printf(TRACE,Context_State,FUNCTION,"  * Dump Context State [%d]",i);
     498        log_printf(TRACE,Context_State,FUNCTION,"    * reg_STATE                  : %s"         ,toString(reg_STATE [i]).c_str());
     499        log_printf(TRACE,Context_State,FUNCTION,"    * reg_EVENT_ADDRESS          : 0x%x (0x%x)",reg_EVENT_ADDRESS          [i],reg_EVENT_ADDRESS      [i]<<2);
     500        log_printf(TRACE,Context_State,FUNCTION,"    * reg_EVENT_ADDRESS_EPCR     : 0x%x (0x%x)",reg_EVENT_ADDRESS_EPCR     [i],reg_EVENT_ADDRESS_EPCR [i]<<2);
     501        log_printf(TRACE,Context_State,FUNCTION,"    * reg_EVENT_ADDRESS_EPCR_VAL : %d"         ,reg_EVENT_ADDRESS_EPCR_VAL [i]);
     502        log_printf(TRACE,Context_State,FUNCTION,"    * reg_EVENT_ADDRESS_EEAR     : 0x%x (0x%x)",reg_EVENT_ADDRESS_EEAR     [i],reg_EVENT_ADDRESS_EEAR [i]<<2);
     503        log_printf(TRACE,Context_State,FUNCTION,"    * reg_EVENT_ADDRESS_EEAR_VAL : %d"         ,reg_EVENT_ADDRESS_EEAR_VAL [i]);
     504        log_printf(TRACE,Context_State,FUNCTION,"    * reg_EVENT_IS_DELAY_SLOT    : %d"         ,reg_EVENT_IS_DELAY_SLOT    [i]);
     505        log_printf(TRACE,Context_State,FUNCTION,"    * reg_EVENT_IS_DS_TAKE       : %d"         ,reg_EVENT_IS_DS_TAKE       [i]);
     506        log_printf(TRACE,Context_State,FUNCTION,"    * reg_EVENT_DEPTH            : %d"         ,reg_EVENT_DEPTH            [i]);
    443507      }
    444508#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Parameters.cpp

    r83 r88  
    2121  Parameters::Parameters (uint32_t   nb_context,
    2222                          uint32_t   nb_decod_unit,
    23                           uint32_t   nb_ooo_engine,
    2423                          uint32_t   nb_inst_branch_complete,
    2524                          uint32_t * size_depth,               
    2625                          uint32_t   size_address,
    27                           uint32_t * size_inst_decod,           
    28                           uint32_t * size_inst_commit,         
     26                          uint32_t * size_nb_inst_decod,           
     27                          uint32_t   size_nb_inst_commit,         
    2928                          uint32_t * link_context_to_decod_unit,
    30                           uint32_t * link_decod_unit_to_ooo_engine)
     29                          bool       is_toplevel)
    3130  {
    3231    log_begin(Context_State,FUNCTION);
     
    3433    _nb_context                    = nb_context                   ;
    3534    _nb_decod_unit                 = nb_decod_unit                ;
    36     _nb_ooo_engine                 = nb_ooo_engine                ;
    3735    _nb_inst_branch_complete       = nb_inst_branch_complete      ;
    38     _size_depth                    = size_depth                   ;
    39     _size_address                  = size_address                 ;
    40     _size_inst_decod               = size_inst_decod              ;
    41     _size_inst_commit              = size_inst_commit             ;
     36    _array_size_depth              = size_depth                   ;
     37//  _size_address                  = size_address                 ;
     38//  _size_nb_inst_decod            = size_nb_inst_decod           ;
     39//  _size_nb_inst_commit           = size_nb_inst_commit          ;
    4240    _link_context_to_decod_unit    = link_context_to_decod_unit   ;
    43     _link_decod_unit_to_ooo_engine = link_decod_unit_to_ooo_engine;
     41
     42    test();
     43
     44    if (is_toplevel)
     45      {
     46        _size_context_id               = log2(_nb_context);
     47        _size_depth                    = log2(max<uint32_t>(size_depth,_nb_context));
     48        _size_instruction_address      = size_address;
     49        _size_nb_inst_decod            = max<uint32_t>(size_nb_inst_decod,_nb_decod_unit);
     50        _size_nb_inst_commit           = size_nb_inst_commit;
     51
     52        _have_port_context_id          = (_size_context_id>0);
     53        _have_port_depth               = (_size_depth > 0);
     54
     55        copy ();
     56      }
    4457   
    45     _size_context_id               = log2(_nb_context);
    46     _size_max_depth                = max<uint32_t>(_size_depth,_nb_context);
    47 
    48     _have_port_context_id          = (_size_context_id>0);
    49     _have_port_max_depth           = (_size_max_depth >0);
    50     _have_port_depth               = new bool [_nb_context];
    51     for (uint32_t i=0; i<_nb_context; i++)
    52       _have_port_depth [i] = (_size_depth [i] >0);
    53    
    54     test();
    5558    log_end(Context_State,FUNCTION);
    5659  };
     
    7073  {
    7174    log_begin(Context_State,FUNCTION);
    72     delete [] _have_port_depth;
     75    log_end(Context_State,FUNCTION);
     76  };
     77
     78#undef  FUNCTION
     79#define FUNCTION "Context_State::copy"
     80  void Parameters::copy (void)
     81  {
     82    log_begin(Context_State,FUNCTION);
    7383    log_end(Context_State,FUNCTION);
    7484  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Parameters_msg_error.cpp

    r83 r88  
    4141        test.error(toString(_("The decod_unit [%d] have none context as source."),i));
    4242
    43     bool _is_link_ooo_engine_from_decod_unit [_nb_ooo_engine];
    44     for (uint32_t i=0; i<_nb_ooo_engine; i++)
    45       _is_link_ooo_engine_from_decod_unit [i] = false;
    46 
    47     for (uint32_t i=0; i<_nb_decod_unit; i++)
    48       {
    49         if (_link_decod_unit_to_ooo_engine [i] < _nb_ooo_engine)
    50           _is_link_ooo_engine_from_decod_unit [_link_decod_unit_to_ooo_engine[i]] = true;
    51         else
    52           test.error(toString(_("The decod_unit [%d] is linked with invalid ooo_engine."),i));
    53       }
    54 
    55     for (uint32_t i=0; i<_nb_ooo_engine; i++)
    56       if (_is_link_ooo_engine_from_decod_unit [i] == false)
    57         test.error(toString(_("The ooo_engine [%d] have none decod_unit as source."),i));
    58 
    5943    log_end(Context_State,FUNCTION);
    6044
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Parameters_print.cpp

    r83 r88  
    2727    xml.balise_open("context_state");
    2828    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("nb_ooo_engine                "); xml.attribut("value",toString(_nb_ooo_engine                )); xml.singleton_end();
     29//  xml.singleton_begin("nb_decod_unit                "); xml.attribut("value",toString(_nb_decod_unit                )); xml.singleton_end();
    3130    xml.singleton_begin("nb_inst_branch_complete      "); xml.attribut("value",toString(_nb_inst_branch_complete      )); xml.singleton_end();
    32     xml.singleton_begin("size_address                 "); xml.attribut("value",toString(_size_address                 )); xml.singleton_end();
     31//  xml.singleton_begin("size_address                 "); xml.attribut("value",toString(_size_address                 )); xml.singleton_end();
     32//  xml.singleton_begin("size_inst_commit             "); xml.attribut("value",toString(_size_inst_commit             )); xml.singleton_end();
    3333
    3434    for (uint32_t i=0;i<_nb_context; i++)
     
    3838        xml.  attribut("id"  ,toString(i));
    3939        xml. balise_open_end();
    40         xml.  singleton_begin("size_depth                   "); xml.attribut("value",toString(_size_depth                    [i])); xml.singleton_end();
     40//         xml.  singleton_begin("size_depth                   "); xml.attribut("value",toString(_size_depth                    [i])); xml.singleton_end();
    4141        xml.  singleton_begin("link_context_to_decod_unit   "); xml.attribut("value",toString(_link_context_to_decod_unit    [i])); xml.singleton_end();
    4242        xml. balise_close();
     
    4949        xml.  attribut("id"  ,toString(i));
    5050        xml. balise_open_end();
    51         xml.  singleton_begin("size_inst_decod              "); xml.attribut("value",toString(_size_inst_decod              [i])); xml.singleton_end();
    52         xml.  singleton_begin("link_decod_unit_to_ooo_engine"); xml.attribut("value",toString(_link_decod_unit_to_ooo_engine[i])); xml.singleton_end();
    53         xml. balise_close();
    54       }
    55 
    56     for (uint32_t i=0;i<_nb_ooo_engine; i++)
    57       {
    58         xml. balise_open_begin("component");
    59         xml.  attribut("type","ooo_engine");
    60         xml.  attribut("id"  ,toString(i));
    61         xml. balise_open_end();
    62         xml.  singleton_begin("size_inst_commit             "); xml.attribut("value",toString(_size_inst_commit             [i])); xml.singleton_end();
     51//      xml.  singleton_begin("size_inst_decod              "); xml.attribut("value",toString(_size_inst_decod              [i])); xml.singleton_end();
    6352        xml. balise_close();
    6453      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/include/Types.h

    r86 r88  
    3939    Ttype_t             _type              ;
    4040    Toperation_t        _operation         ;
     41    Tcontrol_t          _no_execute        ;
    4142    Tcontrol_t          _has_immediat      ;
    4243    Tgeneral_data_t     _immediat          ;
     
    5253    Tspecial_address_t  _num_reg_re        ;
    5354    Texception_t        _exception_use     ;
     55    Texception_t        _exception         ;
    5456    Tbranch_condition_t _branch_condition  ;
    5557//     Tcontrol_t          _branch_stack_write;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/src/Instruction.cpp

    r86 r88  
    1414#include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/include/Instruction.h"
    1515#include "Behavioural/include/Constants.h"
     16#include "Behavioural/include/Operation.h"
    1617
    1718namespace morpheo {
     
    124125       
    125126    inst->_exception_use = EXCEPTION_USE_ILLEGAL_INSTRUCTION;
     127    inst->_exception     = EXCEPTION_ILLEGAL_INSTRUCTION;
    126128
    127129    if (inst->_is_delay_slot)
     
    138140
    139141    uint32_t opcod = range<uint32_t>(inst->_instruction,31,26);
    140 
    141     inst->_type = TYPE_CUSTOM;
     142   
    142143    switch (opcod)
    143144      {
    144       case OPCOD_L_CUST1 : {inst->_operation = OPERATION_CUSTOM_L_1; break;}
    145       case OPCOD_L_CUST2 : {inst->_operation = OPERATION_CUSTOM_L_2; break;}
    146       case OPCOD_L_CUST3 : {inst->_operation = OPERATION_CUSTOM_L_3; break;}
    147       case OPCOD_L_CUST4 : {inst->_operation = OPERATION_CUSTOM_L_4; break;}
    148       case OPCOD_L_CUST5 : {inst->_operation = OPERATION_CUSTOM_L_5; break;}
    149       case OPCOD_L_CUST6 : {inst->_operation = OPERATION_CUSTOM_L_6; break;}
    150       case OPCOD_L_CUST7 : {inst->_operation = OPERATION_CUSTOM_L_7; break;}
    151       case OPCOD_L_CUST8 : {inst->_operation = OPERATION_CUSTOM_L_8; break;}
     145      case OPCOD_L_CUST1 : {inst->_type = instruction_information(INSTRUCTION_L_CUST1)._type; inst->_operation = instruction_information(INSTRUCTION_L_CUST1)._operation; break;}
     146      case OPCOD_L_CUST2 : {inst->_type = instruction_information(INSTRUCTION_L_CUST2)._type; inst->_operation = instruction_information(INSTRUCTION_L_CUST2)._operation; break;}
     147      case OPCOD_L_CUST3 : {inst->_type = instruction_information(INSTRUCTION_L_CUST3)._type; inst->_operation = instruction_information(INSTRUCTION_L_CUST3)._operation; break;}
     148      case OPCOD_L_CUST4 : {inst->_type = instruction_information(INSTRUCTION_L_CUST4)._type; inst->_operation = instruction_information(INSTRUCTION_L_CUST4)._operation; break;}
     149      case OPCOD_L_CUST5 : {inst->_type = instruction_information(INSTRUCTION_L_CUST5)._type; inst->_operation = instruction_information(INSTRUCTION_L_CUST5)._operation; break;}
     150      case OPCOD_L_CUST6 : {inst->_type = instruction_information(INSTRUCTION_L_CUST6)._type; inst->_operation = instruction_information(INSTRUCTION_L_CUST6)._operation; break;}
     151      case OPCOD_L_CUST7 : {inst->_type = instruction_information(INSTRUCTION_L_CUST7)._type; inst->_operation = instruction_information(INSTRUCTION_L_CUST7)._operation; break;}
     152      case OPCOD_L_CUST8 : {inst->_type = instruction_information(INSTRUCTION_L_CUST8)._type; inst->_operation = instruction_information(INSTRUCTION_L_CUST8)._operation; break;}
     153
    152154      default            : {throw ERRORMORPHEO("instruction_l_custom",_("Invalid Custom Opcod."));}
    153155      }
     
    164166    uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 0);
    165167
    166     inst->_type = TYPE_CUSTOM;
    167168    switch (opcod)
    168169      {
    169 //       case OPCOD_LF_CUST1_D : {inst->_operation = OPERATION_CUSTOM_LF_1_D; break;}
    170 //       case OPCOD_LF_CUST1_S : {inst->_operation = OPERATION_CUSTOM_LF_1_S; break;}
     170//       case OPCOD_LF_CUST1_D : {inst->_type = instruction_information(INSTRUCTION_LF_CUST1_D)._type; inst->_operation = instruction_information(INSTRUCTION_LF_CUST1_D)._operation; break;}
     171//       case OPCOD_LF_CUST1_S : {inst->_type = instruction_information(INSTRUCTION_LF_CUST1_S)._type; inst->_operation = instruction_information(INSTRUCTION_LF_CUST1_S)._operation; break;}
    171172      default               : {throw ERRORMORPHEO("instruction_lf_custom",_("Invalid Custom Opcod."));}
    172173      }
     
    183184    uint32_t opcod = range<uint32_t>(inst->_instruction, 7, 0);
    184185
    185     inst->_type = TYPE_CUSTOM;
    186186    switch (opcod)
    187187      {
    188 //       case OPCOD_LV_CUST1 : {inst->_operation = OPERATION_CUSTOM_LV_1; break;}
    189 //       case OPCOD_LV_CUST2 : {inst->_operation = OPERATION_CUSTOM_LV_2; break;}
    190 //       case OPCOD_LV_CUST3 : {inst->_operation = OPERATION_CUSTOM_LV_3; break;}
    191 //       case OPCOD_LV_CUST4 : {inst->_operation = OPERATION_CUSTOM_LV_4; break;}
     188//       case OPCOD_LV_CUST1 : {inst->_type = instruction_information(INSTRUCTION_LV_CUST1)._type; inst->_operation = instruction_information(INSTRUCTION_LV_CUST1)._operation; break;}
     189//       case OPCOD_LV_CUST2 : {inst->_type = instruction_information(INSTRUCTION_LV_CUST2)._type; inst->_operation = instruction_information(INSTRUCTION_LV_CUST2)._operation; break;}
     190//       case OPCOD_LV_CUST3 : {inst->_type = instruction_information(INSTRUCTION_LV_CUST3)._type; inst->_operation = instruction_information(INSTRUCTION_LV_CUST3)._operation; break;}
     191//       case OPCOD_LV_CUST4 : {inst->_type = instruction_information(INSTRUCTION_LV_CUST4)._type; inst->_operation = instruction_information(INSTRUCTION_LV_CUST4)._operation; break;}
    192192      default             : {throw ERRORMORPHEO("instruction_lv_custom",_("Invalid Custom Opcod."));}
    193193      }
     
    252252  {
    253253    log_printf(TRACE,Decod,"instruction_l_add","  * instruction   : l.add");
    254     inst->_type               = TYPE_ALU;
    255     inst->_operation          = OPERATION_ALU_L_ADD;
     254    inst->_type               = instruction_information(INSTRUCTION_L_ADD)._type     ; //TYPE_ALU;
     255    inst->_operation          = instruction_information(INSTRUCTION_L_ADD)._operation; //OPERATION_ALU_L_ADD;
    256256    inst->_has_immediat       = 0;
    257257//  inst->_immediat           = ;
     
    267267    inst->_num_reg_re         = SPR_LOGIC_SR_CY_OV;
    268268    inst->_exception_use      = EXCEPTION_USE_RANGE;
    269 //  inst->_branch_condition   = ;
    270 //  inst->_branch_stack_write = ;
    271 //  inst->_branch_direction   = ;
    272 //  inst->_address_next       = ;
     269    inst->_exception          = EXCEPTION_DECOD_NONE;
     270//  inst->_branch_condition   = ;
     271//  inst->_branch_stack_write = ;
     272//  inst->_branch_direction   = ;
     273//  inst->_address_next       = ;
     274    inst->_no_execute         = 0;
    273275    inst->_event_type         = EVENT_TYPE_NONE;
    274276  }
     
    278280    log_printf(TRACE,Decod,"instruction_l_addc","  * instruction   : l.addc");
    279281
    280     inst->_type               = TYPE_ALU;
    281     inst->_operation          = OPERATION_ALU_L_ADD;
     282    inst->_type               = instruction_information(INSTRUCTION_L_ADDC)._type     ; //TYPE_ALU;
     283    inst->_operation          = instruction_information(INSTRUCTION_L_ADDC)._operation; //OPERATION_ALU_L_ADD;
    282284    inst->_has_immediat       = 0;
    283285//  inst->_immediat           = ;
     
    293295    inst->_num_reg_re         = SPR_LOGIC_SR_CY_OV;
    294296    inst->_exception_use      = EXCEPTION_USE_RANGE;
    295 //  inst->_branch_condition   = ;
    296 //  inst->_branch_stack_write = ;
    297 //  inst->_branch_direction   = ;
    298 //  inst->_address_next       = ;
     297    inst->_exception          = EXCEPTION_DECOD_NONE;
     298//  inst->_branch_condition   = ;
     299//  inst->_branch_stack_write = ;
     300//  inst->_branch_direction   = ;
     301//  inst->_address_next       = ;
     302    inst->_no_execute         = 0;
    299303    inst->_event_type         = EVENT_TYPE_NONE;
    300304  }
     
    304308    log_printf(TRACE,Decod,"instruction_l_addi","  * instruction   : l.addi");
    305309
    306     inst->_type               = TYPE_ALU;
    307     inst->_operation          = OPERATION_ALU_L_ADD;
     310    inst->_type               = instruction_information(INSTRUCTION_L_ADDI)._type     ; //TYPE_ALU;
     311    inst->_operation          = instruction_information(INSTRUCTION_L_ADDI)._operation; //OPERATION_ALU_L_ADD;
    308312    inst->_has_immediat       = 1;
    309313    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    319323    inst->_num_reg_re         = SPR_LOGIC_SR_CY_OV;
    320324    inst->_exception_use      = EXCEPTION_USE_RANGE;
    321 //  inst->_branch_condition   = ;
    322 //  inst->_branch_stack_write = ;
    323 //  inst->_branch_direction   = ;
    324 //  inst->_address_next       = ;
     325    inst->_exception          = EXCEPTION_DECOD_NONE;
     326//  inst->_branch_condition   = ;
     327//  inst->_branch_stack_write = ;
     328//  inst->_branch_direction   = ;
     329//  inst->_address_next       = ;
     330    inst->_no_execute         = 0;
    325331    inst->_event_type         = EVENT_TYPE_NONE;
    326332  }
     
    330336    log_printf(TRACE,Decod,"instruction_l_addic","  * instruction   : l.addic");
    331337
    332     inst->_type               = TYPE_ALU;
    333     inst->_operation          = OPERATION_ALU_L_ADD;
     338    inst->_type               = instruction_information(INSTRUCTION_L_ADDIC)._type     ; //TYPE_ALU;
     339    inst->_operation          = instruction_information(INSTRUCTION_L_ADDIC)._operation; //OPERATION_ALU_L_ADD;
    334340    inst->_has_immediat       = 1;
    335341    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    345351    inst->_num_reg_re         = SPR_LOGIC_SR_CY_OV;
    346352    inst->_exception_use      = EXCEPTION_USE_RANGE;
    347 //  inst->_branch_condition   = ;
    348 //  inst->_branch_stack_write = ;
    349 //  inst->_branch_direction   = ;
    350 //  inst->_address_next       = ;
     353    inst->_exception          = EXCEPTION_DECOD_NONE;
     354//  inst->_branch_condition   = ;
     355//  inst->_branch_stack_write = ;
     356//  inst->_branch_direction   = ;
     357//  inst->_address_next       = ;
     358    inst->_no_execute         = 0;
    351359    inst->_event_type         = EVENT_TYPE_NONE;
    352360  }
     
    356364    log_printf(TRACE,Decod,"instruction_l_and","  * instruction   : l.and");
    357365
    358     inst->_type               = TYPE_ALU;
    359     inst->_operation          = OPERATION_ALU_L_AND;
    360     inst->_has_immediat       = 0;
    361 //  inst->_immediat           = ;
    362     inst->_read_ra            = 1;
    363     inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
    364     inst->_read_rb            = 1;
    365     inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
    366     inst->_read_rc            = 0;
    367 //  inst->_num_reg_rc         = ;
    368     inst->_write_rd           = 1;
    369     inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
    370     inst->_write_re           = 0;
    371 //  inst->_num_reg_re         = ;
    372     inst->_exception_use      = EXCEPTION_USE_NONE;
    373 //  inst->_branch_condition   = ;
    374 //  inst->_branch_stack_write = ;
    375 //  inst->_branch_direction   = ;
    376 //  inst->_address_next       = ;
     366    inst->_type               = instruction_information(INSTRUCTION_L_AND)._type     ; //TYPE_ALU;
     367    inst->_operation          = instruction_information(INSTRUCTION_L_AND)._operation; //OPERATION_ALU_L_AND;
     368    inst->_has_immediat       = 0;
     369//  inst->_immediat           = ;
     370    inst->_read_ra            = 1;
     371    inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
     372    inst->_read_rb            = 1;
     373    inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
     374    inst->_read_rc            = 0;
     375//  inst->_num_reg_rc         = ;
     376    inst->_write_rd           = 1;
     377    inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
     378    inst->_write_re           = 0;
     379//  inst->_num_reg_re         = ;
     380    inst->_exception_use      = EXCEPTION_USE_NONE;
     381    inst->_exception          = EXCEPTION_DECOD_NONE;
     382//  inst->_branch_condition   = ;
     383//  inst->_branch_stack_write = ;
     384//  inst->_branch_direction   = ;
     385//  inst->_address_next       = ;
     386    inst->_no_execute         = 0;
    377387    inst->_event_type         = EVENT_TYPE_NONE;
    378388  }
     
    382392    log_printf(TRACE,Decod,"instruction_l_andi","  * instruction   : l.andi");
    383393
    384     inst->_type               = TYPE_ALU;
    385     inst->_operation          = OPERATION_ALU_L_AND;
     394    inst->_type               = instruction_information(INSTRUCTION_L_ANDI)._type     ; //TYPE_ALU;
     395    inst->_operation          = instruction_information(INSTRUCTION_L_ANDI)._operation; //OPERATION_ALU_L_AND;
    386396    inst->_has_immediat       = 1;
    387397    inst->_immediat           = EXTENDZ(inst->_instruction,16);
     
    397407//  inst->_num_reg_re         = ;
    398408    inst->_exception_use      = EXCEPTION_USE_NONE;
    399 //  inst->_branch_condition   = ;
    400 //  inst->_branch_stack_write = ;
    401 //  inst->_branch_direction   = ;
    402 //  inst->_address_next       = ;
     409    inst->_exception          = EXCEPTION_DECOD_NONE;
     410//  inst->_branch_condition   = ;
     411//  inst->_branch_stack_write = ;
     412//  inst->_branch_direction   = ;
     413//  inst->_address_next       = ;
     414    inst->_no_execute         = 0;
    403415    inst->_event_type         = EVENT_TYPE_NONE;
    404416  }
     
    408420    log_printf(TRACE,Decod,"instruction_l_bf","  * instruction   : l.bf");
    409421
    410     Tgeneral_data_t address_next = inst->_address+(EXTENDS(inst->_instruction,26)<<2);
    411 
    412     inst->_type               = TYPE_BRANCH;
    413     inst->_operation          = OPERATION_BRANCH_L_TEST_F;
     422    Tgeneral_data_t address_next = signed(param->_size_data,inst->_address+EXTENDS(inst->_instruction,26)// <<2
     423                                                   );
     424
     425    inst->_type               = instruction_information(INSTRUCTION_L_BF)._type     ; //TYPE_BRANCH;
     426    inst->_operation          = instruction_information(INSTRUCTION_L_BF)._operation; //OPERATION_BRANCH_L_TEST_F;
    414427    inst->_has_immediat       = 1;
    415428    inst->_immediat           = address_next;
     
    425438//  inst->_num_reg_re         = ;
    426439    inst->_exception_use      = EXCEPTION_USE_NONE;
     440    inst->_exception          = EXCEPTION_DECOD_NONE;
    427441    inst->_branch_condition   = BRANCH_CONDITION_FLAG_SET;
    428442//  inst->_branch_stack_write = 0;
     
    430444    inst->_branch_direction   = range<Tgeneral_data_t   >(inst->_instruction,25,25);
    431445    inst->_address_next       = address_next;
     446    inst->_no_execute         = 0;
    432447    inst->_event_type         = EVENT_TYPE_NONE;
    433448  }
     
    437452    log_printf(TRACE,Decod,"instruction_l_bnf","  * instruction   : l.bnf");
    438453
    439     Tgeneral_data_t address_next = inst->_address+(EXTENDS(inst->_instruction,26)<<2);
    440 
    441     inst->_type               = TYPE_BRANCH;
    442     inst->_operation          = OPERATION_BRANCH_L_TEST_NF;
     454    Tgeneral_data_t address_next = signed(param->_size_data,inst->_address+EXTENDS(inst->_instruction,26)// <<2
     455                                                   );
     456
     457    inst->_type               = instruction_information(INSTRUCTION_L_BNF)._type     ; //TYPE_BRANCH;
     458    inst->_operation          = instruction_information(INSTRUCTION_L_BNF)._operation; //OPERATION_BRANCH_L_TEST_NF;
    443459    inst->_has_immediat       = 1;
    444460    inst->_immediat           = address_next;
     
    454470//  inst->_num_reg_re         = ;
    455471    inst->_exception_use      = EXCEPTION_USE_NONE;
     472    inst->_exception          = EXCEPTION_DECOD_NONE;
    456473    inst->_branch_condition   = BRANCH_CONDITION_FLAG_UNSET;
    457474//  inst->_branch_stack_write = 0;
    458475    inst->_branch_direction   = range<Tgeneral_data_t   >(inst->_instruction,25,25);
    459476    inst->_address_next       = address_next;
     477    inst->_no_execute         = 0;
    460478    inst->_event_type         = EVENT_TYPE_NONE;
    461479  }
     
    465483    log_printf(TRACE,Decod,"instruction_l_cmov","  * instruction   : l.cmov");
    466484
    467     inst->_type               = TYPE_MOVE;
    468     inst->_operation          = OPERATION_MOVE_L_CMOV;
     485    inst->_type               = instruction_information(INSTRUCTION_L_CMOV)._type     ; //TYPE_MOVE;
     486    inst->_operation          = instruction_information(INSTRUCTION_L_CMOV)._operation; //OPERATION_MOVE_L_CMOV;
    469487    inst->_has_immediat       = 0;
    470488//  inst->_immediat           = ;
     
    480498//  inst->_num_reg_re         = ;
    481499    inst->_exception_use      = EXCEPTION_USE_NONE;
    482 //  inst->_branch_condition   = ;
    483 //  inst->_branch_stack_write = ;
    484 //  inst->_branch_direction   = ;
    485 //  inst->_address_next       = ;
     500    inst->_exception          = EXCEPTION_DECOD_NONE;
     501//  inst->_branch_condition   = ;
     502//  inst->_branch_stack_write = ;
     503//  inst->_branch_direction   = ;
     504//  inst->_address_next       = ;
     505    inst->_no_execute         = 0;
    486506    inst->_event_type         = EVENT_TYPE_NONE;
    487507  }
     
    497517    else
    498518      {
    499     inst->_type               = TYPE_SPECIAL;
    500     inst->_operation          = OPERATION_SPECIAL_L_CSYNC;
     519    inst->_type               = instruction_information(INSTRUCTION_L_CSYNC)._type     ; //TYPE_SPECIAL;
     520    inst->_operation          = instruction_information(INSTRUCTION_L_CSYNC)._operation; //OPERATION_SPECIAL_L_CSYNC;
    501521    inst->_has_immediat       = 0;
    502522//  inst->_immediat           = ;
     
    512532//  inst->_num_reg_re         = ;
    513533    inst->_exception_use      = EXCEPTION_USE_NONE;
     534    inst->_exception          = EXCEPTION_DECOD_NONE;
    514535//  inst->_branch_condition   = ;
    515536//  inst->_branch_stack_write = ;
    516537//  inst->_branch_direction   = ;
    517538//  inst->_address_next       = ; // don't change
     539    inst->_no_execute         = 0;
    518540    inst->_event_type         = EVENT_TYPE_CSYNC;
    519541      }
     
    533555    log_printf(TRACE,Decod,"instruction_l_div","  * instruction   : l.div");
    534556
    535     inst->_type               = TYPE_MUL_DIV;
    536     inst->_operation          = OPERATION_MUL_DIV_L_DIV;
     557    inst->_type               = instruction_information(INSTRUCTION_L_DIV)._type     ; //TYPE_DIV;
     558    inst->_operation          = instruction_information(INSTRUCTION_L_DIV)._operation; //OPERATION_DIV_L_DIV;
    537559    inst->_has_immediat       = 0;
    538560//  inst->_immediat           = ;
     
    548570    inst->_num_reg_re         = SPR_LOGIC_SR_CY_OV;
    549571    inst->_exception_use      = EXCEPTION_USE_RANGE;
    550 //  inst->_branch_condition   = ;
    551 //  inst->_branch_stack_write = ;
    552 //  inst->_branch_direction   = ;
    553 //  inst->_address_next       = ;
     572    inst->_exception          = EXCEPTION_DECOD_NONE;
     573//  inst->_branch_condition   = ;
     574//  inst->_branch_stack_write = ;
     575//  inst->_branch_direction   = ;
     576//  inst->_address_next       = ;
     577    inst->_no_execute         = 0;
    554578    inst->_event_type         = EVENT_TYPE_NONE;
    555579  }
     
    559583    log_printf(TRACE,Decod,"instruction_l_divu","  * instruction   : l.divu");
    560584
    561     inst->_type               = TYPE_MUL_DIV;
    562     inst->_operation          = OPERATION_MUL_DIV_L_DIVU;
     585    inst->_type               = instruction_information(INSTRUCTION_L_DIVU)._type     ; //TYPE_DIV;
     586    inst->_operation          = instruction_information(INSTRUCTION_L_DIVU)._operation; //OPERATION_DIV_L_DIVU;
    563587    inst->_has_immediat       = 0;
    564588//  inst->_immediat           = ;
     
    574598    inst->_num_reg_re         = SPR_LOGIC_SR_CY_OV;
    575599    inst->_exception_use      = EXCEPTION_USE_RANGE;
    576 //  inst->_branch_condition   = ;
    577 //  inst->_branch_stack_write = ;
    578 //  inst->_branch_direction   = ;
    579 //  inst->_address_next       = ;
     600    inst->_exception          = EXCEPTION_DECOD_NONE;
     601//  inst->_branch_condition   = ;
     602//  inst->_branch_stack_write = ;
     603//  inst->_branch_direction   = ;
     604//  inst->_address_next       = ;
     605    inst->_no_execute         = 0;
    580606    inst->_event_type         = EVENT_TYPE_NONE;
    581607  }
     
    585611    log_printf(TRACE,Decod,"instruction_l_extbs","  * instruction   : l.extbs");
    586612
    587     inst->_type               = TYPE_EXTEND;
    588     inst->_operation          = OPERATION_EXTEND_L_EXTEND_S;
     613    inst->_type               = instruction_information(INSTRUCTION_L_EXTBS)._type     ; //TYPE_EXTEND;
     614    inst->_operation          = instruction_information(INSTRUCTION_L_EXTBS)._operation; //OPERATION_EXTEND_L_EXTEND_S;
    589615    inst->_has_immediat       = 1;
    590616    inst->_immediat           = 8;
     
    600626//  inst->_num_reg_re         = ;
    601627    inst->_exception_use      = EXCEPTION_USE_NONE;
    602 //  inst->_branch_condition   = ;
    603 //  inst->_branch_stack_write = ;
    604 //  inst->_branch_direction   = ;
    605 //  inst->_address_next       = ;
     628    inst->_exception          = EXCEPTION_DECOD_NONE;
     629//  inst->_branch_condition   = ;
     630//  inst->_branch_stack_write = ;
     631//  inst->_branch_direction   = ;
     632//  inst->_address_next       = ;
     633    inst->_no_execute         = 0;
    606634    inst->_event_type         = EVENT_TYPE_NONE;
    607635  }
     
    611639    log_printf(TRACE,Decod,"instruction_l_extbz","  * instruction   : l.extbz");
    612640
    613     inst->_type               = TYPE_EXTEND;
    614     inst->_operation          = OPERATION_EXTEND_L_EXTEND_Z;
     641    inst->_type               = instruction_information(INSTRUCTION_L_EXTBZ)._type     ; //TYPE_EXTEND;
     642    inst->_operation          = instruction_information(INSTRUCTION_L_EXTBZ)._operation; //OPERATION_EXTEND_L_EXTEND_Z;
    615643    inst->_has_immediat       = 1;
    616644    inst->_immediat           = 8;
     
    626654//  inst->_num_reg_re         = ;
    627655    inst->_exception_use      = EXCEPTION_USE_NONE;
    628 //  inst->_branch_condition   = ;
    629 //  inst->_branch_stack_write = ;
    630 //  inst->_branch_direction   = ;
    631 //  inst->_address_next       = ;
     656    inst->_exception          = EXCEPTION_DECOD_NONE;
     657//  inst->_branch_condition   = ;
     658//  inst->_branch_stack_write = ;
     659//  inst->_branch_direction   = ;
     660//  inst->_address_next       = ;
     661    inst->_no_execute         = 0;
    632662    inst->_event_type         = EVENT_TYPE_NONE;
    633663  }
     
    637667    log_printf(TRACE,Decod,"instruction_l_exths","  * instruction   : l.exths");
    638668
    639     inst->_type               = TYPE_EXTEND;
    640     inst->_operation          = OPERATION_EXTEND_L_EXTEND_S;
     669    inst->_type               = instruction_information(INSTRUCTION_L_EXTHS)._type     ; //TYPE_EXTEND;
     670    inst->_operation          = instruction_information(INSTRUCTION_L_EXTHS)._operation; //OPERATION_EXTEND_L_EXTEND_S;
    641671    inst->_has_immediat       = 1;
    642672    inst->_immediat           = 16;
     
    652682//  inst->_num_reg_re         = ;
    653683    inst->_exception_use      = EXCEPTION_USE_NONE;
    654 //  inst->_branch_condition   = ;
    655 //  inst->_branch_stack_write = ;
    656 //  inst->_branch_direction   = ;
    657 //  inst->_address_next       = ;
     684    inst->_exception          = EXCEPTION_DECOD_NONE;
     685//  inst->_branch_condition   = ;
     686//  inst->_branch_stack_write = ;
     687//  inst->_branch_direction   = ;
     688//  inst->_address_next       = ;
     689    inst->_no_execute         = 0;
    658690    inst->_event_type         = EVENT_TYPE_NONE;
    659691  }
     
    663695    log_printf(TRACE,Decod,"instruction_l_exthz","  * instruction   : l.exthz");
    664696
    665     inst->_type               = TYPE_EXTEND;
    666     inst->_operation          = OPERATION_EXTEND_L_EXTEND_Z;
     697    inst->_type               = instruction_information(INSTRUCTION_L_EXTHZ)._type     ; //TYPE_EXTEND;
     698    inst->_operation          = instruction_information(INSTRUCTION_L_EXTHZ)._operation; //OPERATION_EXTEND_L_EXTEND_Z;
    667699    inst->_has_immediat       = 1;
    668700    inst->_immediat           = 16;
     
    678710//  inst->_num_reg_re         = ;
    679711    inst->_exception_use      = EXCEPTION_USE_NONE;
    680 //  inst->_branch_condition   = ;
    681 //  inst->_branch_stack_write = ;
    682 //  inst->_branch_direction   = ;
    683 //  inst->_address_next       = ;
     712    inst->_exception          = EXCEPTION_DECOD_NONE;
     713//  inst->_branch_condition   = ;
     714//  inst->_branch_stack_write = ;
     715//  inst->_branch_direction   = ;
     716//  inst->_address_next       = ;
     717    inst->_no_execute         = 0;
    684718    inst->_event_type         = EVENT_TYPE_NONE;
    685719  }
     
    689723    log_printf(TRACE,Decod,"instruction_l_extws","  * instruction   : l.extws");
    690724
    691     inst->_type               = TYPE_EXTEND;
    692     inst->_operation          = OPERATION_EXTEND_L_EXTEND_S;
     725    inst->_type               = instruction_information(INSTRUCTION_L_EXTWS)._type     ; //TYPE_EXTEND;
     726    inst->_operation          = instruction_information(INSTRUCTION_L_EXTWS)._operation; //OPERATION_EXTEND_L_EXTEND_S;
    693727    inst->_has_immediat       = 1;
    694728    inst->_immediat           = 32;
     
    704738//  inst->_num_reg_re         = ;
    705739    inst->_exception_use      = EXCEPTION_USE_NONE;
    706 //  inst->_branch_condition   = ;
    707 //  inst->_branch_stack_write = ;
    708 //  inst->_branch_direction   = ;
    709 //  inst->_address_next       = ;
     740    inst->_exception          = EXCEPTION_DECOD_NONE;
     741//  inst->_branch_condition   = ;
     742//  inst->_branch_stack_write = ;
     743//  inst->_branch_direction   = ;
     744//  inst->_address_next       = ;
     745    inst->_no_execute         = 0;
    710746    inst->_event_type         = EVENT_TYPE_NONE;
    711747  }
     
    715751    log_printf(TRACE,Decod,"instruction_l_extwz","  * instruction   : l.extwz");
    716752
    717     inst->_type               = TYPE_EXTEND;
    718     inst->_operation          = OPERATION_EXTEND_L_EXTEND_Z;
     753    inst->_type               = instruction_information(INSTRUCTION_L_EXTWZ)._type     ; //TYPE_EXTEND;
     754    inst->_operation          = instruction_information(INSTRUCTION_L_EXTWZ)._operation; //OPERATION_EXTEND_L_EXTEND_Z;
    719755    inst->_has_immediat       = 1;
    720756    inst->_immediat           = 32;
     
    730766//  inst->_num_reg_re         = ;
    731767    inst->_exception_use      = EXCEPTION_USE_NONE;
    732 //  inst->_branch_condition   = ;
    733 //  inst->_branch_stack_write = ;
    734 //  inst->_branch_direction   = ;
    735 //  inst->_address_next       = ;
     768    inst->_exception          = EXCEPTION_DECOD_NONE;
     769//  inst->_branch_condition   = ;
     770//  inst->_branch_stack_write = ;
     771//  inst->_branch_direction   = ;
     772//  inst->_address_next       = ;
     773    inst->_no_execute         = 0;
    736774    inst->_event_type         = EVENT_TYPE_NONE;
    737775  }
     
    741779    log_printf(TRACE,Decod,"instruction_l_ff1","  * instruction   : l.ff1");
    742780
    743     inst->_type               = TYPE_FIND;
    744     inst->_operation          = OPERATION_FIND_L_FF1;
    745     inst->_has_immediat       = 0;
    746 //  inst->_immediat           = ;
    747     inst->_read_ra            = 1;
    748     inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
    749     inst->_read_rb            = 0;
    750 //  inst->_num_reg_rb         = ;
    751     inst->_read_rc            = 0;
    752 //  inst->_num_reg_rc         = ;
    753     inst->_write_rd           = 1;
    754     inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
    755     inst->_write_re           = 0;
    756 //  inst->_num_reg_re         = ;
    757     inst->_exception_use      = EXCEPTION_USE_NONE;
    758 //  inst->_branch_condition   = ;
    759 //  inst->_branch_stack_write = ;
    760 //  inst->_branch_direction   = ;
    761 //  inst->_address_next       = ;
     781    inst->_type               = instruction_information(INSTRUCTION_L_FF1)._type     ; //TYPE_FIND;
     782    inst->_operation          = instruction_information(INSTRUCTION_L_FF1)._operation; //OPERATION_FIND_L_FF1;
     783    inst->_has_immediat       = 0;
     784//  inst->_immediat           = ;
     785    inst->_read_ra            = 1;
     786    inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
     787    inst->_read_rb            = 0;
     788//  inst->_num_reg_rb         = ;
     789    inst->_read_rc            = 0;
     790//  inst->_num_reg_rc         = ;
     791    inst->_write_rd           = 1;
     792    inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
     793    inst->_write_re           = 0;
     794//  inst->_num_reg_re         = ;
     795    inst->_exception_use      = EXCEPTION_USE_NONE;
     796    inst->_exception          = EXCEPTION_DECOD_NONE;
     797//  inst->_branch_condition   = ;
     798//  inst->_branch_stack_write = ;
     799//  inst->_branch_direction   = ;
     800//  inst->_address_next       = ;
     801    inst->_no_execute         = 0;
    762802    inst->_event_type         = EVENT_TYPE_NONE;
    763803  }
     
    767807    log_printf(TRACE,Decod,"instruction_l_fl1","  * instruction   : l.fl1");
    768808
    769     inst->_type               = TYPE_FIND;
    770     inst->_operation          = OPERATION_FIND_L_FL1;
    771     inst->_has_immediat       = 0;
    772 //  inst->_immediat           = ;
    773     inst->_read_ra            = 1;
    774     inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
    775     inst->_read_rb            = 0;
    776 //  inst->_num_reg_rb         = ;
    777     inst->_read_rc            = 0;
    778 //  inst->_num_reg_rc         = ;
    779     inst->_write_rd           = 1;
    780     inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
    781     inst->_write_re           = 0;
    782 //  inst->_num_reg_re         = ;
    783     inst->_exception_use      = EXCEPTION_USE_NONE;
    784 //  inst->_branch_condition   = ;
    785 //  inst->_branch_stack_write = ;
    786 //  inst->_branch_direction   = ;
    787 //  inst->_address_next       = ;
     809    inst->_type               = instruction_information(INSTRUCTION_L_FL1)._type     ; //TYPE_FIND;
     810    inst->_operation          = instruction_information(INSTRUCTION_L_FL1)._operation; //OPERATION_FIND_L_FL1;
     811    inst->_has_immediat       = 0;
     812//  inst->_immediat           = ;
     813    inst->_read_ra            = 1;
     814    inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
     815    inst->_read_rb            = 0;
     816//  inst->_num_reg_rb         = ;
     817    inst->_read_rc            = 0;
     818//  inst->_num_reg_rc         = ;
     819    inst->_write_rd           = 1;
     820    inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
     821    inst->_write_re           = 0;
     822//  inst->_num_reg_re         = ;
     823    inst->_exception_use      = EXCEPTION_USE_NONE;
     824    inst->_exception          = EXCEPTION_DECOD_NONE;
     825//  inst->_branch_condition   = ;
     826//  inst->_branch_stack_write = ;
     827//  inst->_branch_direction   = ;
     828//  inst->_address_next       = ;
     829    inst->_no_execute         = 0;
    788830    inst->_event_type         = EVENT_TYPE_NONE;
    789831  }
     
    793835    log_printf(TRACE,Decod,"instruction_l_j","  * instruction   : l.j");
    794836
    795     inst->_type               = TYPE_BRANCH;
    796     inst->_operation          = OPERATION_BRANCH_NONE;
     837    inst->_type               = instruction_information(INSTRUCTION_L_J)._type     ; //TYPE_BRANCH;
     838    inst->_operation          = instruction_information(INSTRUCTION_L_J)._operation; //OPERATION_BRANCH_NONE;
    797839    inst->_has_immediat       = 0;
    798840//  inst->_immediat           = ;
     
    808850//  inst->_num_reg_re         = ;
    809851    inst->_exception_use      = EXCEPTION_USE_NONE;
     852    inst->_exception          = EXCEPTION_DECOD_NONE;
    810853    inst->_branch_condition   = BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK;
    811854//  inst->_branch_stack_write = 0;
    812855    inst->_branch_direction   = 1;
    813     inst->_address_next       = inst->_address+(EXTENDS(inst->_instruction,26)<<2);
     856    inst->_address_next       = signed(param->_size_data,inst->_address+EXTENDS(inst->_instruction,26)// <<2
     857                                                               );
     858    inst->_no_execute         = 1;
    814859    inst->_event_type         = EVENT_TYPE_NONE;
    815860  }
     
    819864    log_printf(TRACE,Decod,"instruction_l_jal","  * instruction   : l.jal");
    820865
    821     inst->_type               = TYPE_BRANCH;
    822     inst->_operation          = OPERATION_BRANCH_L_JALR;
     866    inst->_type               = instruction_information(INSTRUCTION_L_JAL)._type     ; //TYPE_BRANCH;
     867    inst->_operation          = instruction_information(INSTRUCTION_L_JAL)._operation; //OPERATION_BRANCH_L_JALR;
    823868    inst->_has_immediat       = 1;
    824869    inst->_immediat           = inst->_address_next+1;
     
    834879//  inst->_num_reg_re         = ;
    835880    inst->_exception_use      = EXCEPTION_USE_NONE;
     881    inst->_exception          = EXCEPTION_DECOD_NONE;
    836882    inst->_branch_condition   = BRANCH_CONDITION_NONE_WITH_WRITE_STACK; // Always jump
    837883//  inst->_branch_stack_write = 1;
    838884    inst->_branch_direction   = 1;
    839     inst->_address_next       = inst->_address+(EXTENDS(inst->_instruction,26)<<2);
     885    inst->_address_next       = signed(param->_size_data,inst->_address+EXTENDS(inst->_instruction,26)// <<2
     886                                                );
     887    inst->_no_execute         = 0;
    840888    inst->_event_type         = EVENT_TYPE_NONE;
    841889  }
     
    853901    else
    854902      {
    855     inst->_type               = TYPE_BRANCH;
    856     inst->_operation          = OPERATION_BRANCH_L_JALR;
     903    inst->_type               = instruction_information(INSTRUCTION_L_JALR)._type     ; //TYPE_BRANCH;
     904    inst->_operation          = instruction_information(INSTRUCTION_L_JALR)._operation; //OPERATION_BRANCH_L_JALR;
    857905    inst->_has_immediat       = 0;
    858906//  inst->_immediat           = ;
     
    868916//  inst->_num_reg_re         = ;
    869917    inst->_exception_use      = EXCEPTION_USE_NONE;
     918    inst->_exception          = EXCEPTION_DECOD_NONE;
    870919//  inst->_branch_condition   = (inst->_num_reg_rb == 9)?BRANCH_CONDITION_READ_STACK:BRANCH_CONDITION_READ_REGISTER;
    871920    inst->_branch_condition   = BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK;
     
    873922    inst->_branch_direction   = 1;
    874923//  inst->_address_next       = ;
     924    inst->_no_execute         = 0;
    875925    inst->_event_type         = EVENT_TYPE_NONE;
    876926      }
     
    881931    log_printf(TRACE,Decod,"instruction_l_jr","  * instruction   : l.jr");
    882932
    883     inst->_type               = TYPE_BRANCH;
    884     inst->_operation          = OPERATION_BRANCH_L_JALR;
     933    inst->_type               = instruction_information(INSTRUCTION_L_JR)._type     ; //TYPE_BRANCH;
     934    inst->_operation          = instruction_information(INSTRUCTION_L_JR)._operation; //OPERATION_BRANCH_L_JALR;
    885935    inst->_has_immediat       = 0;
    886936//  inst->_immediat           = ;
     
    896946//  inst->_num_reg_re         = ;
    897947    inst->_exception_use      = EXCEPTION_USE_NONE;
     948    inst->_exception          = EXCEPTION_DECOD_NONE;
    898949    inst->_branch_condition   = (inst->_num_reg_rb == 9)?BRANCH_CONDITION_READ_STACK:BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK;
    899950//  inst->_branch_stack_write = 0;
    900951    inst->_branch_direction   = 1;
    901952//  inst->_address_next       = ;
     953    inst->_no_execute         = 0;
    902954    inst->_event_type         = EVENT_TYPE_NONE;
    903955  }
     
    907959    log_printf(TRACE,Decod,"instruction_l_lbs","  * instruction   : l.lbs");
    908960
    909     inst->_type               = TYPE_MEMORY;
    910     inst->_operation          = OPERATION_MEMORY_LOAD_8_S;
     961    inst->_type               = instruction_information(INSTRUCTION_L_LBS)._type     ; //TYPE_MEMORY;
     962    inst->_operation          = instruction_information(INSTRUCTION_L_LBS)._operation; //OPERATION_MEMORY_LOAD_8_S;
    911963    inst->_has_immediat       = 1;
    912964    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    922974//  inst->_num_reg_re         = ;
    923975    inst->_exception_use      = EXCEPTION_USE_MEMORY_WITHOUT_ALIGNMENT;
    924 //  inst->_branch_condition   = ;
    925 //  inst->_branch_stack_write = ;
    926 //  inst->_branch_direction   = ;
    927 //  inst->_address_next       = ;
     976    inst->_exception          = EXCEPTION_DECOD_NONE;
     977//  inst->_branch_condition   = ;
     978//  inst->_branch_stack_write = ;
     979//  inst->_branch_direction   = ;
     980//  inst->_address_next       = ;
     981    inst->_no_execute         = 0;
    928982    inst->_event_type         = EVENT_TYPE_NONE;
    929983  }
     
    933987    log_printf(TRACE,Decod,"instruction_l_lbz","  * instruction   : l.lbz");
    934988
    935     inst->_type               = TYPE_MEMORY;
    936     inst->_operation          = OPERATION_MEMORY_LOAD_8_Z;
     989    inst->_type               = instruction_information(INSTRUCTION_L_LBZ)._type     ; //TYPE_MEMORY;
     990    inst->_operation          = instruction_information(INSTRUCTION_L_LBZ)._operation; //OPERATION_MEMORY_LOAD_8_Z;
    937991    inst->_has_immediat       = 1;
    938992    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    9481002//  inst->_num_reg_re         = ;
    9491003    inst->_exception_use      = EXCEPTION_USE_MEMORY_WITHOUT_ALIGNMENT;
    950 //  inst->_branch_condition   = ;
    951 //  inst->_branch_stack_write = ;
    952 //  inst->_branch_direction   = ;
    953 //  inst->_address_next       = ;
     1004    inst->_exception          = EXCEPTION_DECOD_NONE;
     1005//  inst->_branch_condition   = ;
     1006//  inst->_branch_stack_write = ;
     1007//  inst->_branch_direction   = ;
     1008//  inst->_address_next       = ;
     1009    inst->_no_execute         = 0;
    9541010    inst->_event_type         = EVENT_TYPE_NONE;
    9551011  }
     
    9591015    log_printf(TRACE,Decod,"instruction_l_ld","  * instruction   : l.ld");
    9601016
    961     inst->_type               = TYPE_MEMORY;
    962     inst->_operation          = OPERATION_MEMORY_LOAD_64_S;
     1017    inst->_type               = instruction_information(INSTRUCTION_L_LD)._type     ; //TYPE_MEMORY;
     1018    inst->_operation          = instruction_information(INSTRUCTION_L_LD)._operation; //OPERATION_MEMORY_LOAD_64_S;
    9631019    inst->_has_immediat       = 1;
    9641020    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    9741030//  inst->_num_reg_re         = ;
    9751031    inst->_exception_use      = EXCEPTION_USE_MEMORY_WITH_ALIGNMENT;
    976 //  inst->_branch_condition   = ;
    977 //  inst->_branch_stack_write = ;
    978 //  inst->_branch_direction   = ;
    979 //  inst->_address_next       = ;
     1032    inst->_exception          = EXCEPTION_DECOD_NONE;
     1033//  inst->_branch_condition   = ;
     1034//  inst->_branch_stack_write = ;
     1035//  inst->_branch_direction   = ;
     1036//  inst->_address_next       = ;
     1037    inst->_no_execute         = 0;
    9801038    inst->_event_type         = EVENT_TYPE_NONE;
    9811039  }
     
    9851043    log_printf(TRACE,Decod,"instruction_l_lhs","  * instruction   : l.lhs");
    9861044
    987     inst->_type               = TYPE_MEMORY;
    988     inst->_operation          = OPERATION_MEMORY_LOAD_16_S;
     1045    inst->_type               = instruction_information(INSTRUCTION_L_LHS)._type     ; //TYPE_MEMORY;
     1046    inst->_operation          = instruction_information(INSTRUCTION_L_LHS)._operation; //OPERATION_MEMORY_LOAD_16_S;
    9891047    inst->_has_immediat       = 1;
    9901048    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    10001058//  inst->_num_reg_re         = ;
    10011059    inst->_exception_use      = EXCEPTION_USE_MEMORY_WITH_ALIGNMENT;
    1002 //  inst->_branch_condition   = ;
    1003 //  inst->_branch_stack_write = ;
    1004 //  inst->_branch_direction   = ;
    1005 //  inst->_address_next       = ;
     1060    inst->_exception          = EXCEPTION_DECOD_NONE;
     1061//  inst->_branch_condition   = ;
     1062//  inst->_branch_stack_write = ;
     1063//  inst->_branch_direction   = ;
     1064//  inst->_address_next       = ;
     1065    inst->_no_execute         = 0;
    10061066    inst->_event_type         = EVENT_TYPE_NONE;
    10071067  }
     
    10111071    log_printf(TRACE,Decod,"instruction_l_lhz","  * instruction   : l.lhz");
    10121072
    1013     inst->_type               = TYPE_MEMORY;
    1014     inst->_operation          = OPERATION_MEMORY_LOAD_16_Z;
     1073    inst->_type               = instruction_information(INSTRUCTION_L_LHZ)._type     ; //TYPE_MEMORY;
     1074    inst->_operation          = instruction_information(INSTRUCTION_L_LHZ)._operation; //OPERATION_MEMORY_LOAD_16_Z;
    10151075    inst->_has_immediat       = 1;
    10161076    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    10261086//  inst->_num_reg_re         = ;
    10271087    inst->_exception_use      = EXCEPTION_USE_MEMORY_WITH_ALIGNMENT;
    1028 //  inst->_branch_condition   = ;
    1029 //  inst->_branch_stack_write = ;
    1030 //  inst->_branch_direction   = ;
    1031 //  inst->_address_next       = ;
     1088    inst->_exception          = EXCEPTION_DECOD_NONE;
     1089//  inst->_branch_condition   = ;
     1090//  inst->_branch_stack_write = ;
     1091//  inst->_branch_direction   = ;
     1092//  inst->_address_next       = ;
     1093    inst->_no_execute         = 0;
    10321094    inst->_event_type         = EVENT_TYPE_NONE;
    10331095  }
     
    10371099    log_printf(TRACE,Decod,"instruction_l_lws","  * instruction   : l.lws");
    10381100
    1039     inst->_type               = TYPE_MEMORY;
    1040     inst->_operation          = OPERATION_MEMORY_LOAD_32_S;
     1101    inst->_type               = instruction_information(INSTRUCTION_L_LWS)._type     ; //TYPE_MEMORY;
     1102    inst->_operation          = instruction_information(INSTRUCTION_L_LWS)._operation; //OPERATION_MEMORY_LOAD_32_S;
    10411103    inst->_has_immediat       = 1;
    10421104    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    10521114//  inst->_num_reg_re         = ;
    10531115    inst->_exception_use      = EXCEPTION_USE_MEMORY_WITH_ALIGNMENT;
    1054 //  inst->_branch_condition   = ;
    1055 //  inst->_branch_stack_write = ;
    1056 //  inst->_branch_direction   = ;
    1057 //  inst->_address_next       = ;
     1116    inst->_exception          = EXCEPTION_DECOD_NONE;
     1117//  inst->_branch_condition   = ;
     1118//  inst->_branch_stack_write = ;
     1119//  inst->_branch_direction   = ;
     1120//  inst->_address_next       = ;
     1121    inst->_no_execute         = 0;
    10581122    inst->_event_type         = EVENT_TYPE_NONE;
    10591123  }
     
    10631127    log_printf(TRACE,Decod,"instruction_l_lwz","  * instruction   : l.lwz");
    10641128
    1065     inst->_type               = TYPE_MEMORY;
    1066     inst->_operation          = OPERATION_MEMORY_LOAD_32_Z;
     1129    inst->_type               = instruction_information(INSTRUCTION_L_LWZ)._type     ; //TYPE_MEMORY;
     1130    inst->_operation          = instruction_information(INSTRUCTION_L_LWZ)._operation; //OPERATION_MEMORY_LOAD_32_Z;
    10671131    inst->_has_immediat       = 1;
    10681132    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    10781142//  inst->_num_reg_re         = ;
    10791143    inst->_exception_use      = EXCEPTION_USE_MEMORY_WITH_ALIGNMENT;
    1080 //  inst->_branch_condition   = ;
    1081 //  inst->_branch_stack_write = ;
    1082 //  inst->_branch_direction   = ;
    1083 //  inst->_address_next       = ;
     1144    inst->_exception          = EXCEPTION_DECOD_NONE;
     1145//  inst->_branch_condition   = ;
     1146//  inst->_branch_stack_write = ;
     1147//  inst->_branch_direction   = ;
     1148//  inst->_address_next       = ;
     1149    inst->_no_execute         = 0;
    10841150    inst->_event_type         = EVENT_TYPE_NONE;
    10851151  }
     
    10891155    log_printf(TRACE,Decod,"instruction_l_mac","  * instruction   : l.mac");
    10901156
    1091     inst->_type               = TYPE_SPECIAL;
    1092     inst->_operation          = OPERATION_SPECIAL_L_MAC;
    1093     inst->_has_immediat       = 0;
    1094 //  inst->_immediat           = ;
    1095     inst->_read_ra            = 1;
    1096     inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
    1097     inst->_read_rb            = 1;
    1098     inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
    1099     inst->_read_rc            = 0;
    1100 //  inst->_num_reg_rc         = ;
    1101     inst->_write_rd           = 0;
    1102 //  inst->_num_reg_rd         = ;
    1103     inst->_write_re           = 0;
    1104 //  inst->_num_reg_re         = ;
    1105     inst->_exception_use      = EXCEPTION_USE_NONE;
     1157    inst->_type               = instruction_information(INSTRUCTION_L_MAC)._type     ; //TYPE_SPECIAL;
     1158    inst->_operation          = instruction_information(INSTRUCTION_L_MAC)._operation; //OPERATION_SPECIAL_L_MAC;
     1159    inst->_has_immediat       = 0;
     1160//  inst->_immediat           = ;
     1161    inst->_read_ra            = 1;
     1162    inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
     1163    inst->_read_rb            = 1;
     1164    inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
     1165    inst->_read_rc            = 0;
     1166//  inst->_num_reg_rc         = ;
     1167    inst->_write_rd           = 0;
     1168//  inst->_num_reg_rd         = ;
     1169    inst->_write_re           = 0;
     1170//  inst->_num_reg_re         = ;
     1171    inst->_exception_use      = EXCEPTION_USE_NONE;
     1172    inst->_exception          = EXCEPTION_DECOD_NONE;
    11061173//  inst->_branch_condition   = ;
    11071174//  inst->_branch_stack_write = ;
    11081175//  inst->_branch_direction   = ;
    11091176//  inst->_address_next       = ; // don't change
     1177    inst->_no_execute         = 0;
    11101178    inst->_event_type         = EVENT_TYPE_SPR_ACCESS;
    11111179  }
     
    11151183    log_printf(TRACE,Decod,"instruction_l_maci","  * instruction   : l.maci");
    11161184
    1117     inst->_type               = TYPE_SPECIAL;
    1118     inst->_operation          = OPERATION_SPECIAL_L_MAC;
     1185    inst->_type               = instruction_information(INSTRUCTION_L_MACI)._type     ; //TYPE_SPECIAL;
     1186    inst->_operation          = instruction_information(INSTRUCTION_L_MACI)._operation; //OPERATION_SPECIAL_L_MAC;
    11191187    inst->_has_immediat       = 1;
    11201188    inst->_immediat           = EXTENDS(((range<Tgeneral_data_t   >(inst->_instruction,25,21)<<11)|
     
    11311199//  inst->_num_reg_re         = ;
    11321200    inst->_exception_use      = EXCEPTION_USE_NONE;
     1201    inst->_exception          = EXCEPTION_DECOD_NONE;
    11331202//  inst->_branch_condition   = ;
    11341203//  inst->_branch_stack_write = ;
    11351204//  inst->_branch_direction   = ;
    11361205//  inst->_address_next       = ; // don't change
     1206    inst->_no_execute         = 0;
    11371207    inst->_event_type         = EVENT_TYPE_SPR_ACCESS;
    11381208  }
     
    11481218    else
    11491219      {
    1150     inst->_type               = TYPE_SPECIAL;
    1151     inst->_operation          = OPERATION_SPECIAL_L_MACRC;
     1220    inst->_type               = instruction_information(INSTRUCTION_L_MACRC)._type     ; //TYPE_SPECIAL;
     1221    inst->_operation          = instruction_information(INSTRUCTION_L_MACRC)._operation; //OPERATION_SPECIAL_L_MACRC;
    11521222    inst->_has_immediat       = 0;
    11531223//  inst->_immediat           = ;
     
    11631233//  inst->_num_reg_re         = ;
    11641234    inst->_exception_use      = EXCEPTION_USE_NONE;
     1235    inst->_exception          = EXCEPTION_DECOD_NONE;
    11651236//  inst->_branch_condition   = ;
    11661237//  inst->_branch_stack_write = ;
    11671238//  inst->_branch_direction   = ;
    11681239//  inst->_address_next       = ; // don't change
     1240    inst->_no_execute         = 0;
    11691241    inst->_event_type         = EVENT_TYPE_SPR_ACCESS;
    11701242      }
     
    11751247    log_printf(TRACE,Decod,"instruction_l_mfspr","  * instruction   : l.mfspr");
    11761248
    1177     inst->_type               = TYPE_SPECIAL;
    1178     inst->_operation          = OPERATION_SPECIAL_L_MFSPR;
     1249    inst->_type               = instruction_information(INSTRUCTION_L_MFSPR)._type     ; //TYPE_SPECIAL;
     1250    inst->_operation          = instruction_information(INSTRUCTION_L_MFSPR)._operation; //OPERATION_SPECIAL_L_MFSPR;
    11791251    inst->_has_immediat       = 1;
    11801252    inst->_immediat           = EXTENDZ(inst->_instruction,16);
     
    11901262//  inst->_num_reg_re         = ;
    11911263    inst->_exception_use      = EXCEPTION_USE_NONE;
     1264    inst->_exception          = EXCEPTION_DECOD_NONE;
    11921265//  inst->_branch_condition   = ;
    11931266//  inst->_branch_stack_write = ;
    11941267//  inst->_branch_direction   = ;
    11951268//  inst->_address_next       = ; // don't change
     1269    inst->_no_execute         = 0;
    11961270    inst->_event_type         = EVENT_TYPE_SPR_ACCESS;
    11971271  }
     
    12011275    log_printf(TRACE,Decod,"instruction_l_movhi","  * instruction   : l.movhi");
    12021276
    1203     inst->_type               = TYPE_MOVE;
    1204     inst->_operation          = OPERATION_MOVE_L_MOVHI;
     1277    inst->_type               = instruction_information(INSTRUCTION_L_MOVHI)._type     ; //TYPE_MOVE;
     1278    inst->_operation          = instruction_information(INSTRUCTION_L_MOVHI)._operation; //OPERATION_MOVE_L_MOVHI;
    12051279    inst->_has_immediat       = 1;
    12061280    inst->_immediat           = EXTENDZ(inst->_instruction,16);
     
    12161290//  inst->_num_reg_re         = ;
    12171291    inst->_exception_use      = EXCEPTION_USE_NONE;
    1218 //  inst->_branch_condition   = ;
    1219 //  inst->_branch_stack_write = ;
    1220 //  inst->_branch_direction   = ;
    1221 //  inst->_address_next       = ;
     1292    inst->_exception          = EXCEPTION_DECOD_NONE;
     1293//  inst->_branch_condition   = ;
     1294//  inst->_branch_stack_write = ;
     1295//  inst->_branch_direction   = ;
     1296//  inst->_address_next       = ;
     1297    inst->_no_execute         = 0;
    12221298    inst->_event_type         = EVENT_TYPE_NONE;
    12231299  }
     
    12271303    log_printf(TRACE,Decod,"instruction_l_msb","  * instruction   : l.msb");
    12281304
    1229     inst->_type               = TYPE_SPECIAL;
    1230     inst->_operation          = OPERATION_SPECIAL_L_MSB;
    1231     inst->_has_immediat       = 0;
    1232 //  inst->_immediat           = ;
    1233     inst->_read_ra            = 1;
    1234     inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
    1235     inst->_read_rb            = 1;
    1236     inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
    1237     inst->_read_rc            = 0;
    1238 //  inst->_num_reg_rc         = ;
    1239     inst->_write_rd           = 0;
    1240 //  inst->_num_reg_rd         = ;
    1241     inst->_write_re           = 0;
    1242 //  inst->_num_reg_re         = ;
    1243     inst->_exception_use      = EXCEPTION_USE_NONE;
     1305    inst->_type               = instruction_information(INSTRUCTION_L_MSB)._type     ; //TYPE_SPECIAL;
     1306    inst->_operation          = instruction_information(INSTRUCTION_L_MSB)._operation; //OPERATION_SPECIAL_L_MSB;
     1307    inst->_has_immediat       = 0;
     1308//  inst->_immediat           = ;
     1309    inst->_read_ra            = 1;
     1310    inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
     1311    inst->_read_rb            = 1;
     1312    inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
     1313    inst->_read_rc            = 0;
     1314//  inst->_num_reg_rc         = ;
     1315    inst->_write_rd           = 0;
     1316//  inst->_num_reg_rd         = ;
     1317    inst->_write_re           = 0;
     1318//  inst->_num_reg_re         = ;
     1319    inst->_exception_use      = EXCEPTION_USE_NONE;
     1320    inst->_exception          = EXCEPTION_DECOD_NONE;
    12441321//  inst->_branch_condition   = ;
    12451322//  inst->_branch_stack_write = ;
    12461323//  inst->_branch_direction   = ;
    12471324//  inst->_address_next       = ; // don't change
     1325    inst->_no_execute         = 0;
    12481326    inst->_event_type         = EVENT_TYPE_SPR_ACCESS;
    12491327  }
     
    12591337    else
    12601338      {
    1261     inst->_type               = TYPE_SPECIAL;
    1262     inst->_operation          = OPERATION_SPECIAL_L_MSYNC;
     1339    inst->_type               = instruction_information(INSTRUCTION_L_MSYNC)._type     ; //TYPE_SPECIAL;
     1340    inst->_operation          = instruction_information(INSTRUCTION_L_MSYNC)._operation; //OPERATION_SPECIAL_L_MSYNC;
    12631341    inst->_has_immediat       = 0;
    12641342//  inst->_immediat           = ;
     
    12741352//  inst->_num_reg_re         = ;
    12751353    inst->_exception_use      = EXCEPTION_USE_NONE;
     1354    inst->_exception          = EXCEPTION_DECOD_NONE;
    12761355//  inst->_branch_condition   = ;
    12771356//  inst->_branch_stack_write = ;
    12781357//  inst->_branch_direction   = ;
    12791358//  inst->_address_next       = ; // don't change
     1359    inst->_no_execute         = 0;
    12801360    inst->_event_type         = EVENT_TYPE_MSYNC;
    12811361      }
     
    12861366    log_printf(TRACE,Decod,"instruction_l_mtspr","  * instruction   : l.mtspr");
    12871367
    1288     inst->_type               = TYPE_SPECIAL;
    1289     inst->_operation          = OPERATION_SPECIAL_L_MTSPR;
     1368    inst->_type               = instruction_information(INSTRUCTION_L_MTSPR)._type     ; //TYPE_SPECIAL;
     1369    inst->_operation          = instruction_information(INSTRUCTION_L_MTSPR)._operation; //OPERATION_SPECIAL_L_MTSPR;
    12901370    inst->_has_immediat       = 1;
    12911371    inst->_immediat           = EXTENDZ(((range<Tgeneral_data_t   >(inst->_instruction,25,21)<<11)|
     
    13021382//  inst->_num_reg_re         = ;
    13031383    inst->_exception_use      = EXCEPTION_USE_NONE;
     1384    inst->_exception          = EXCEPTION_DECOD_NONE;
    13041385//  inst->_branch_condition   = ;
    13051386//  inst->_branch_stack_write = ;
    13061387//  inst->_branch_direction   = ;
    13071388//  inst->_address_next       = ; // don't change
     1389    inst->_no_execute         = 0;
    13081390    inst->_event_type         = EVENT_TYPE_SPR_ACCESS;
    13091391  }
     
    13131395    log_printf(TRACE,Decod,"instruction_l_mul","  * instruction   : l.mul");
    13141396
    1315     inst->_type               = TYPE_MUL_DIV;
    1316     inst->_operation          = OPERATION_MUL_DIV_L_MUL;
     1397    inst->_type               = instruction_information(INSTRUCTION_L_MUL)._type     ; //TYPE_MUL;
     1398    inst->_operation          = instruction_information(INSTRUCTION_L_MUL)._operation; //OPERATION_MUL_L_MUL;
    13171399    inst->_has_immediat       = 0;
    13181400//  inst->_immediat           = ;
     
    13281410    inst->_num_reg_re         = SPR_LOGIC_SR_CY_OV;
    13291411    inst->_exception_use      = EXCEPTION_USE_RANGE;
    1330 //  inst->_branch_condition   = ;
    1331 //  inst->_branch_stack_write = ;
    1332 //  inst->_branch_direction   = ;
    1333 //  inst->_address_next       = ;
     1412    inst->_exception          = EXCEPTION_DECOD_NONE;
     1413//  inst->_branch_condition   = ;
     1414//  inst->_branch_stack_write = ;
     1415//  inst->_branch_direction   = ;
     1416//  inst->_address_next       = ;
     1417    inst->_no_execute         = 0;
    13341418    inst->_event_type         = EVENT_TYPE_NONE;
    13351419  }
     
    13391423    log_printf(TRACE,Decod,"instruction_l_muli","  * instruction   : l.muli");
    13401424
    1341     inst->_type               = TYPE_MUL_DIV;
    1342     inst->_operation          = OPERATION_MUL_DIV_L_MUL;
     1425    inst->_type               = instruction_information(INSTRUCTION_L_MULI)._type     ; //TYPE_MUL;
     1426    inst->_operation          = instruction_information(INSTRUCTION_L_MULI)._operation; //OPERATION_MUL_L_MUL;
    13431427    inst->_has_immediat       = 1;
    13441428    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    13541438    inst->_num_reg_re         = SPR_LOGIC_SR_CY_OV;
    13551439    inst->_exception_use      = EXCEPTION_USE_RANGE;
    1356 //  inst->_branch_condition   = ;
    1357 //  inst->_branch_stack_write = ;
    1358 //  inst->_branch_direction   = ;
    1359 //  inst->_address_next       = ;
     1440    inst->_exception          = EXCEPTION_DECOD_NONE;
     1441//  inst->_branch_condition   = ;
     1442//  inst->_branch_stack_write = ;
     1443//  inst->_branch_direction   = ;
     1444//  inst->_address_next       = ;
     1445    inst->_no_execute         = 0;
    13601446    inst->_event_type         = EVENT_TYPE_NONE;
    13611447  }
     
    13651451    log_printf(TRACE,Decod,"instruction_l_mulu","  * instruction   : l.mulu");
    13661452
    1367     inst->_type               = TYPE_MUL_DIV;
    1368     inst->_operation          = OPERATION_MUL_DIV_L_MULU;
     1453    inst->_type               = instruction_information(INSTRUCTION_L_MULU)._type     ; //TYPE_MUL;
     1454    inst->_operation          = instruction_information(INSTRUCTION_L_MULU)._operation; //OPERATION_MUL_L_MULU;
    13691455    inst->_has_immediat       = 0;
    13701456//  inst->_immediat           = ;
     
    13801466    inst->_num_reg_re         = SPR_LOGIC_SR_CY_OV;
    13811467    inst->_exception_use      = EXCEPTION_USE_RANGE;
    1382 //  inst->_branch_condition   = ;
    1383 //  inst->_branch_stack_write = ;
    1384 //  inst->_branch_direction   = ;
    1385 //  inst->_address_next       = ;
     1468    inst->_exception          = EXCEPTION_DECOD_NONE;
     1469//  inst->_branch_condition   = ;
     1470//  inst->_branch_stack_write = ;
     1471//  inst->_branch_direction   = ;
     1472//  inst->_address_next       = ;
     1473    inst->_no_execute         = 0;
    13861474    inst->_event_type         = EVENT_TYPE_NONE;
    13871475  }
     
    13911479    log_printf(TRACE,Decod,"instruction_l_nop","  * instruction   : l.nop");
    13921480
    1393     inst->_type               = TYPE_SPECIAL;
    1394     inst->_operation          = OPERATION_SPECIAL_L_NOP;
     1481    inst->_type               = instruction_information(INSTRUCTION_L_NOP)._type     ; //TYPE_SPECIAL;
     1482    inst->_operation          = instruction_information(INSTRUCTION_L_NOP)._operation; //OPERATION_SPECIAL_L_NOP;
    13951483//  inst->_has_immediat       = 1;
    13961484//  inst->_immediat           = EXTENDZ(inst->_instruction,16);
     
    14081496//  inst->_num_reg_re         = ;
    14091497    inst->_exception_use      = EXCEPTION_USE_NONE;
    1410 //  inst->_branch_condition   = ;
    1411 //  inst->_branch_stack_write = ;
    1412 //  inst->_branch_direction   = ;
    1413 //  inst->_address_next       = ;
     1498    inst->_exception          = EXCEPTION_DECOD_NONE;
     1499//  inst->_branch_condition   = ;
     1500//  inst->_branch_stack_write = ;
     1501//  inst->_branch_direction   = ;
     1502//  inst->_address_next       = ;
     1503    inst->_no_execute         = 1;
    14141504    inst->_event_type         = EVENT_TYPE_NONE;
    14151505  }
     
    14191509    log_printf(TRACE,Decod,"instruction_l_or","  * instruction   : l.or");
    14201510
    1421     inst->_type               = TYPE_ALU;
    1422     inst->_operation          = OPERATION_ALU_L_OR;
    1423     inst->_has_immediat       = 0;
    1424 //  inst->_immediat           = ;
    1425     inst->_read_ra            = 1;
    1426     inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
    1427     inst->_read_rb            = 1;
    1428     inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
    1429     inst->_read_rc            = 0;
    1430 //  inst->_num_reg_rc         = ;
    1431     inst->_write_rd           = 1;
    1432     inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
    1433     inst->_write_re           = 0;
    1434 //  inst->_num_reg_re         = ;
    1435     inst->_exception_use      = EXCEPTION_USE_NONE;
    1436 //  inst->_branch_condition   = ;
    1437 //  inst->_branch_stack_write = ;
    1438 //  inst->_branch_direction   = ;
    1439 //  inst->_address_next       = ;
     1511    inst->_type               = instruction_information(INSTRUCTION_L_OR)._type     ; //TYPE_ALU;
     1512    inst->_operation          = instruction_information(INSTRUCTION_L_OR)._operation; //OPERATION_ALU_L_OR;
     1513    inst->_has_immediat       = 0;
     1514//  inst->_immediat           = ;
     1515    inst->_read_ra            = 1;
     1516    inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
     1517    inst->_read_rb            = 1;
     1518    inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
     1519    inst->_read_rc            = 0;
     1520//  inst->_num_reg_rc         = ;
     1521    inst->_write_rd           = 1;
     1522    inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
     1523    inst->_write_re           = 0;
     1524//  inst->_num_reg_re         = ;
     1525    inst->_exception_use      = EXCEPTION_USE_NONE;
     1526    inst->_exception          = EXCEPTION_DECOD_NONE;
     1527//  inst->_branch_condition   = ;
     1528//  inst->_branch_stack_write = ;
     1529//  inst->_branch_direction   = ;
     1530//  inst->_address_next       = ;
     1531    inst->_no_execute         = 0;
    14401532    inst->_event_type         = EVENT_TYPE_NONE;
    14411533  }
     
    14451537    log_printf(TRACE,Decod,"instruction_l_ori","  * instruction   : l.ori");
    14461538
    1447     inst->_type               = TYPE_ALU;
    1448     inst->_operation          = OPERATION_ALU_L_OR;
     1539    inst->_type               = instruction_information(INSTRUCTION_L_ORI)._type     ; //TYPE_ALU;
     1540    inst->_operation          = instruction_information(INSTRUCTION_L_ORI)._operation; //OPERATION_ALU_L_OR;
    14491541    inst->_has_immediat       = 1;
    14501542    inst->_immediat           = EXTENDZ(inst->_instruction,16);
     
    14601552//  inst->_num_reg_re         = ;
    14611553    inst->_exception_use      = EXCEPTION_USE_NONE;
    1462 //  inst->_branch_condition   = ;
    1463 //  inst->_branch_stack_write = ;
    1464 //  inst->_branch_direction   = ;
    1465 //  inst->_address_next       = ;
     1554    inst->_exception          = EXCEPTION_DECOD_NONE;
     1555//  inst->_branch_condition   = ;
     1556//  inst->_branch_stack_write = ;
     1557//  inst->_branch_direction   = ;
     1558//  inst->_address_next       = ;
     1559    inst->_no_execute         = 0;
    14661560    inst->_event_type         = EVENT_TYPE_NONE;
    14671561  }
     
    14771571    else
    14781572      {
    1479     inst->_type               = TYPE_SPECIAL;
    1480     inst->_operation          = OPERATION_SPECIAL_L_PSYNC;
     1573    inst->_type               = instruction_information(INSTRUCTION_L_PSYNC)._type     ; //TYPE_SPECIAL;
     1574    inst->_operation          = instruction_information(INSTRUCTION_L_PSYNC)._operation; //OPERATION_SPECIAL_L_PSYNC;
    14811575    inst->_has_immediat       = 0;
    14821576//  inst->_immediat           = ;
     
    14921586//  inst->_num_reg_re         = ;
    14931587    inst->_exception_use      = EXCEPTION_USE_NONE;
     1588    inst->_exception          = EXCEPTION_DECOD_NONE;
    14941589//  inst->_branch_condition   = ;
    14951590//  inst->_branch_stack_write = ;
    14961591//  inst->_branch_direction   = ;
    14971592//  inst->_address_next       = ; // don't change
     1593    inst->_no_execute         = 0;
    14981594    inst->_event_type         = EVENT_TYPE_PSYNC;
    14991595      }
     
    15041600    log_printf(TRACE,Decod,"instruction_l_rfe","  * instruction   : l.rfe");
    15051601
    1506     inst->_type               = TYPE_SPECIAL;
    1507     inst->_operation          = OPERATION_SPECIAL_L_RFE;
     1602    inst->_type               = instruction_information(INSTRUCTION_L_RFE)._type     ; //TYPE_SPECIAL;
     1603    inst->_operation          = instruction_information(INSTRUCTION_L_RFE)._operation; //OPERATION_SPECIAL_L_RFE;
    15081604    inst->_has_immediat       = 0;
    15091605//  inst->_immediat           = ;
     
    15191615//  inst->_num_reg_re         = ;
    15201616    inst->_exception_use      = EXCEPTION_USE_NONE;
     1617    inst->_exception          = EXCEPTION_DECOD_NONE;
    15211618//  inst->_branch_condition   = ;
    15221619//  inst->_branch_stack_write = ;
    15231620//  inst->_branch_direction   = ;
    15241621//  inst->_address_next       = ; // don't change
     1622    inst->_no_execute         = 1;
    15251623    inst->_event_type         = EVENT_TYPE_NONE; // can't anticip this instruction : must read EPCR in rename stage
    15261624  }
     
    15301628    log_printf(TRACE,Decod,"instruction_l_ror","  * instruction   : l.ror");
    15311629
    1532     inst->_type               = TYPE_SHIFT;
    1533     inst->_operation          = OPERATION_SHIFT_L_ROR;
    1534     inst->_has_immediat       = 0;
    1535 //  inst->_immediat           = ;
    1536     inst->_read_ra            = 1;
    1537     inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
    1538     inst->_read_rb            = 1;
    1539     inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
    1540     inst->_read_rc            = 0;
    1541 //  inst->_num_reg_rc         = ;
    1542     inst->_write_rd           = 1;
    1543     inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
    1544     inst->_write_re           = 0;
    1545 //  inst->_num_reg_re         = ;
    1546     inst->_exception_use      = EXCEPTION_USE_NONE;
    1547 //  inst->_branch_condition   = ;
    1548 //  inst->_branch_stack_write = ;
    1549 //  inst->_branch_direction   = ;
    1550 //  inst->_address_next       = ;
     1630    inst->_type               = instruction_information(INSTRUCTION_L_ROR)._type     ; //TYPE_SHIFT;
     1631    inst->_operation          = instruction_information(INSTRUCTION_L_ROR)._operation; //OPERATION_SHIFT_L_ROR;
     1632    inst->_has_immediat       = 0;
     1633//  inst->_immediat           = ;
     1634    inst->_read_ra            = 1;
     1635    inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
     1636    inst->_read_rb            = 1;
     1637    inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
     1638    inst->_read_rc            = 0;
     1639//  inst->_num_reg_rc         = ;
     1640    inst->_write_rd           = 1;
     1641    inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
     1642    inst->_write_re           = 0;
     1643//  inst->_num_reg_re         = ;
     1644    inst->_exception_use      = EXCEPTION_USE_NONE;
     1645    inst->_exception          = EXCEPTION_DECOD_NONE;
     1646//  inst->_branch_condition   = ;
     1647//  inst->_branch_stack_write = ;
     1648//  inst->_branch_direction   = ;
     1649//  inst->_address_next       = ;
     1650    inst->_no_execute         = 0;
    15511651    inst->_event_type         = EVENT_TYPE_NONE;
    15521652  }
     
    15561656    log_printf(TRACE,Decod,"instruction_l_rori","  * instruction   : l.rori");
    15571657
    1558     inst->_type               = TYPE_SHIFT;
    1559     inst->_operation          = OPERATION_SHIFT_L_ROR;
     1658    inst->_type               = instruction_information(INSTRUCTION_L_RORI)._type     ; //TYPE_SHIFT;
     1659    inst->_operation          = instruction_information(INSTRUCTION_L_RORI)._operation; //OPERATION_SHIFT_L_ROR;
    15601660    inst->_has_immediat       = 1;
    15611661    inst->_immediat           = range<Tgeneral_data_t   >(inst->_instruction, 5, 0);
     
    15711671//  inst->_num_reg_re         = ;
    15721672    inst->_exception_use      = EXCEPTION_USE_NONE;
    1573 //  inst->_branch_condition   = ;
    1574 //  inst->_branch_stack_write = ;
    1575 //  inst->_branch_direction   = ;
    1576 //  inst->_address_next       = ;
     1673    inst->_exception          = EXCEPTION_DECOD_NONE;
     1674//  inst->_branch_condition   = ;
     1675//  inst->_branch_stack_write = ;
     1676//  inst->_branch_direction   = ;
     1677//  inst->_address_next       = ;
     1678    inst->_no_execute         = 0;
    15771679    inst->_event_type         = EVENT_TYPE_NONE;
    15781680  }
     
    15821684    log_printf(TRACE,Decod,"instruction_l_sb","  * instruction   : l.sb");
    15831685
    1584     inst->_type               = TYPE_MEMORY;
    1585     inst->_operation          = OPERATION_MEMORY_STORE_8;
     1686    inst->_type               = instruction_information(INSTRUCTION_L_SB)._type     ; //TYPE_MEMORY;
     1687    inst->_operation          = instruction_information(INSTRUCTION_L_SB)._operation; //OPERATION_MEMORY_STORE_8;
    15861688    inst->_has_immediat       = 1;
    15871689    inst->_immediat           = EXTENDS(((range<Tgeneral_data_t   >(inst->_instruction,25,21)<<11)|
     
    15981700//  inst->_num_reg_re         = ;
    15991701    inst->_exception_use      = EXCEPTION_USE_MEMORY_WITHOUT_ALIGNMENT;
    1600 //  inst->_branch_condition   = ;
    1601 //  inst->_branch_stack_write = ;
    1602 //  inst->_branch_direction   = ;
    1603 //  inst->_address_next       = ;
     1702    inst->_exception          = EXCEPTION_DECOD_NONE;
     1703//  inst->_branch_condition   = ;
     1704//  inst->_branch_stack_write = ;
     1705//  inst->_branch_direction   = ;
     1706//  inst->_address_next       = ;
     1707    inst->_no_execute         = 0;
    16041708    inst->_event_type         = EVENT_TYPE_NONE;
    16051709  }
     
    16091713    log_printf(TRACE,Decod,"instruction_l_sb","  * instruction   : l.sb");
    16101714
    1611     inst->_type               = TYPE_MEMORY;
    1612     inst->_operation          = OPERATION_MEMORY_STORE_64;
     1715    inst->_type               = instruction_information(INSTRUCTION_L_SD)._type     ; //TYPE_MEMORY;
     1716    inst->_operation          = instruction_information(INSTRUCTION_L_SD)._operation; //OPERATION_MEMORY_STORE_64;
    16131717    inst->_has_immediat       = 1;
    16141718    inst->_immediat           = EXTENDS(((range<Tgeneral_data_t   >(inst->_instruction,25,21)<<11)|
     
    16251729//  inst->_num_reg_re         = ;
    16261730    inst->_exception_use      = EXCEPTION_USE_MEMORY_WITH_ALIGNMENT;
    1627 //  inst->_branch_condition   = ;
    1628 //  inst->_branch_stack_write = ;
    1629 //  inst->_branch_direction   = ;
    1630 //  inst->_address_next       = ;
     1731    inst->_exception          = EXCEPTION_DECOD_NONE;
     1732//  inst->_branch_condition   = ;
     1733//  inst->_branch_stack_write = ;
     1734//  inst->_branch_direction   = ;
     1735//  inst->_address_next       = ;
     1736    inst->_no_execute         = 0;
    16311737    inst->_event_type         = EVENT_TYPE_NONE;
    16321738  }
     
    16361742    log_printf(TRACE,Decod,"instruction_l_sfeq","  * instruction   : l.sfeq");
    16371743
    1638     inst->_type               = TYPE_TEST;
    1639     inst->_operation          = OPERATION_TEST_L_SFEQ;
     1744    inst->_type               = instruction_information(INSTRUCTION_L_SFEQ)._type     ; //TYPE_TEST;
     1745    inst->_operation          = instruction_information(INSTRUCTION_L_SFEQ)._operation; //OPERATION_TEST_L_SFEQ;
    16401746    inst->_has_immediat       = 0;
    16411747//  inst->_immediat           = ;
     
    16511757    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    16521758    inst->_exception_use      = EXCEPTION_USE_NONE;
    1653 //  inst->_branch_condition   = ;
    1654 //  inst->_branch_stack_write = ;
    1655 //  inst->_branch_direction   = ;
    1656 //  inst->_address_next       = ;
     1759    inst->_exception          = EXCEPTION_DECOD_NONE;
     1760//  inst->_branch_condition   = ;
     1761//  inst->_branch_stack_write = ;
     1762//  inst->_branch_direction   = ;
     1763//  inst->_address_next       = ;
     1764    inst->_no_execute         = 0;
    16571765    inst->_event_type         = EVENT_TYPE_NONE;
    16581766  }
     
    16621770    log_printf(TRACE,Decod,"instruction_l_sfeqi","  * instruction   : l.sfeqi");
    16631771
    1664     inst->_type               = TYPE_TEST;
    1665     inst->_operation          = OPERATION_TEST_L_SFEQ;
     1772    inst->_type               = instruction_information(INSTRUCTION_L_SFEQI)._type     ; //TYPE_TEST;
     1773    inst->_operation          = instruction_information(INSTRUCTION_L_SFEQI)._operation; //OPERATION_TEST_L_SFEQ;
    16661774    inst->_has_immediat       = 1;
    16671775    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    16771785    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    16781786    inst->_exception_use      = EXCEPTION_USE_NONE;
    1679 //  inst->_branch_condition   = ;
    1680 //  inst->_branch_stack_write = ;
    1681 //  inst->_branch_direction   = ;
    1682 //  inst->_address_next       = ;
     1787    inst->_exception          = EXCEPTION_DECOD_NONE;
     1788//  inst->_branch_condition   = ;
     1789//  inst->_branch_stack_write = ;
     1790//  inst->_branch_direction   = ;
     1791//  inst->_address_next       = ;
     1792    inst->_no_execute         = 0;
    16831793    inst->_event_type         = EVENT_TYPE_NONE;
    16841794  }
     
    16881798    log_printf(TRACE,Decod,"instruction_l_sfges","  * instruction   : l.sfges");
    16891799
    1690     inst->_type               = TYPE_TEST;
    1691     inst->_operation          = OPERATION_TEST_L_SFGES;
     1800    inst->_type               = instruction_information(INSTRUCTION_L_SFGES)._type     ; //TYPE_TEST;
     1801    inst->_operation          = instruction_information(INSTRUCTION_L_SFGES)._operation; //OPERATION_TEST_L_SFGES;
    16921802    inst->_has_immediat       = 0;
    16931803//  inst->_immediat           = ;
     
    17031813    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    17041814    inst->_exception_use      = EXCEPTION_USE_NONE;
    1705 //  inst->_branch_condition   = ;
    1706 //  inst->_branch_stack_write = ;
    1707 //  inst->_branch_direction   = ;
    1708 //  inst->_address_next       = ;
     1815    inst->_exception          = EXCEPTION_DECOD_NONE;
     1816//  inst->_branch_condition   = ;
     1817//  inst->_branch_stack_write = ;
     1818//  inst->_branch_direction   = ;
     1819//  inst->_address_next       = ;
     1820    inst->_no_execute         = 0;
    17091821    inst->_event_type         = EVENT_TYPE_NONE;
    17101822  }
     
    17141826    log_printf(TRACE,Decod,"instruction_l_sfgesi","  * instruction   : l.sfgesi");
    17151827
    1716     inst->_type               = TYPE_TEST;
    1717     inst->_operation          = OPERATION_TEST_L_SFGES;
     1828    inst->_type               = instruction_information(INSTRUCTION_L_SFGESI)._type     ; //TYPE_TEST;
     1829    inst->_operation          = instruction_information(INSTRUCTION_L_SFGESI)._operation; //OPERATION_TEST_L_SFGES;
    17181830    inst->_has_immediat       = 1;
    17191831    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    17291841    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    17301842    inst->_exception_use      = EXCEPTION_USE_NONE;
    1731 //  inst->_branch_condition   = ;
    1732 //  inst->_branch_stack_write = ;
    1733 //  inst->_branch_direction   = ;
    1734 //  inst->_address_next       = ;
     1843    inst->_exception          = EXCEPTION_DECOD_NONE;
     1844//  inst->_branch_condition   = ;
     1845//  inst->_branch_stack_write = ;
     1846//  inst->_branch_direction   = ;
     1847//  inst->_address_next       = ;
     1848    inst->_no_execute         = 0;
    17351849    inst->_event_type         = EVENT_TYPE_NONE;
    17361850  }
     
    17401854    log_printf(TRACE,Decod,"instruction_l_sfgeu","  * instruction   : l.sfgeu");
    17411855
    1742     inst->_type               = TYPE_TEST;
    1743     inst->_operation          = OPERATION_TEST_L_SFGEU;
     1856    inst->_type               = instruction_information(INSTRUCTION_L_SFGEU)._type     ; //TYPE_TEST;
     1857    inst->_operation          = instruction_information(INSTRUCTION_L_SFGEU)._operation; //OPERATION_TEST_L_SFGEU;
    17441858    inst->_has_immediat       = 0;
    17451859//  inst->_immediat           = ;
     
    17551869    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    17561870    inst->_exception_use      = EXCEPTION_USE_NONE;
    1757 //  inst->_branch_condition   = ;
    1758 //  inst->_branch_stack_write = ;
    1759 //  inst->_branch_direction   = ;
    1760 //  inst->_address_next       = ;
     1871    inst->_exception          = EXCEPTION_DECOD_NONE;
     1872//  inst->_branch_condition   = ;
     1873//  inst->_branch_stack_write = ;
     1874//  inst->_branch_direction   = ;
     1875//  inst->_address_next       = ;
     1876    inst->_no_execute         = 0;
    17611877    inst->_event_type         = EVENT_TYPE_NONE;
    17621878  }
     
    17661882    log_printf(TRACE,Decod,"instruction_l_sfgeui","  * instruction   : l.sfgeui");
    17671883
    1768     inst->_type               = TYPE_TEST;
    1769     inst->_operation          = OPERATION_TEST_L_SFGEU;
     1884    inst->_type               = instruction_information(INSTRUCTION_L_SFGEUI)._type     ; //TYPE_TEST;
     1885    inst->_operation          = instruction_information(INSTRUCTION_L_SFGEUI)._operation; //OPERATION_TEST_L_SFGEU;
    17701886    inst->_has_immediat       = 1;
    17711887    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    17811897    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    17821898    inst->_exception_use      = EXCEPTION_USE_NONE;
    1783 //  inst->_branch_condition   = ;
    1784 //  inst->_branch_stack_write = ;
    1785 //  inst->_branch_direction   = ;
    1786 //  inst->_address_next       = ;
     1899    inst->_exception          = EXCEPTION_DECOD_NONE;
     1900//  inst->_branch_condition   = ;
     1901//  inst->_branch_stack_write = ;
     1902//  inst->_branch_direction   = ;
     1903//  inst->_address_next       = ;
     1904    inst->_no_execute         = 0;
    17871905    inst->_event_type         = EVENT_TYPE_NONE;
    17881906  }
     
    17921910    log_printf(TRACE,Decod,"instruction_l_sfgts","  * instruction   : l.sfgts");
    17931911
    1794     inst->_type               = TYPE_TEST;
    1795     inst->_operation          = OPERATION_TEST_L_SFGTS;
     1912    inst->_type               = instruction_information(INSTRUCTION_L_SFGTS)._type     ; //TYPE_TEST;
     1913    inst->_operation          = instruction_information(INSTRUCTION_L_SFGTS)._operation; //OPERATION_TEST_L_SFGTS;
    17961914    inst->_has_immediat       = 0;
    17971915//  inst->_immediat           = ;
     
    18071925    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    18081926    inst->_exception_use      = EXCEPTION_USE_NONE;
    1809 //  inst->_branch_condition   = ;
    1810 //  inst->_branch_stack_write = ;
    1811 //  inst->_branch_direction   = ;
    1812 //  inst->_address_next       = ;
     1927    inst->_exception          = EXCEPTION_DECOD_NONE;
     1928//  inst->_branch_condition   = ;
     1929//  inst->_branch_stack_write = ;
     1930//  inst->_branch_direction   = ;
     1931//  inst->_address_next       = ;
     1932    inst->_no_execute         = 0;
    18131933    inst->_event_type         = EVENT_TYPE_NONE;
    18141934  }
     
    18181938    log_printf(TRACE,Decod,"instruction_l_sfgtsi","  * instruction   : l.sfgtsi");
    18191939
    1820     inst->_type               = TYPE_TEST;
    1821     inst->_operation          = OPERATION_TEST_L_SFGTS;
     1940    inst->_type               = instruction_information(INSTRUCTION_L_SFGTSI)._type     ; //TYPE_TEST;
     1941    inst->_operation          = instruction_information(INSTRUCTION_L_SFGTSI)._operation; //OPERATION_TEST_L_SFGTS;
    18221942    inst->_has_immediat       = 1;
    18231943    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    18331953    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    18341954    inst->_exception_use      = EXCEPTION_USE_NONE;
    1835 //  inst->_branch_condition   = ;
    1836 //  inst->_branch_stack_write = ;
    1837 //  inst->_branch_direction   = ;
    1838 //  inst->_address_next       = ;
     1955    inst->_exception          = EXCEPTION_DECOD_NONE;
     1956//  inst->_branch_condition   = ;
     1957//  inst->_branch_stack_write = ;
     1958//  inst->_branch_direction   = ;
     1959//  inst->_address_next       = ;
     1960    inst->_no_execute         = 0;
    18391961    inst->_event_type         = EVENT_TYPE_NONE;
    18401962  }
     
    18441966    log_printf(TRACE,Decod,"instruction_l_sfgtu","  * instruction   : l.sfgtu");
    18451967
    1846     inst->_type               = TYPE_TEST;
    1847     inst->_operation          = OPERATION_TEST_L_SFGTU;
     1968    inst->_type               = instruction_information(INSTRUCTION_L_SFGTU)._type     ; //TYPE_TEST;
     1969    inst->_operation          = instruction_information(INSTRUCTION_L_SFGTU)._operation; //OPERATION_TEST_L_SFGTU;
    18481970    inst->_has_immediat       = 0;
    18491971//  inst->_immediat           = ;
     
    18591981    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    18601982    inst->_exception_use      = EXCEPTION_USE_NONE;
    1861 //  inst->_branch_condition   = ;
    1862 //  inst->_branch_stack_write = ;
    1863 //  inst->_branch_direction   = ;
    1864 //  inst->_address_next       = ;
     1983    inst->_exception          = EXCEPTION_DECOD_NONE;
     1984//  inst->_branch_condition   = ;
     1985//  inst->_branch_stack_write = ;
     1986//  inst->_branch_direction   = ;
     1987//  inst->_address_next       = ;
     1988    inst->_no_execute         = 0;
    18651989    inst->_event_type         = EVENT_TYPE_NONE;
    18661990  }
     
    18701994    log_printf(TRACE,Decod,"instruction_l_sfgtui","  * instruction   : l.sfgtui");
    18711995
    1872     inst->_type               = TYPE_TEST;
    1873     inst->_operation          = OPERATION_TEST_L_SFGTU;
     1996    inst->_type               = instruction_information(INSTRUCTION_L_SFGTUI)._type     ; //TYPE_TEST;
     1997    inst->_operation          = instruction_information(INSTRUCTION_L_SFGTUI)._operation; //OPERATION_TEST_L_SFGTU;
    18741998    inst->_has_immediat       = 1;
    18751999    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    18852009    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    18862010    inst->_exception_use      = EXCEPTION_USE_NONE;
    1887 //  inst->_branch_condition   = ;
    1888 //  inst->_branch_stack_write = ;
    1889 //  inst->_branch_direction   = ;
    1890 //  inst->_address_next       = ;
     2011    inst->_exception          = EXCEPTION_DECOD_NONE;
     2012//  inst->_branch_condition   = ;
     2013//  inst->_branch_stack_write = ;
     2014//  inst->_branch_direction   = ;
     2015//  inst->_address_next       = ;
     2016    inst->_no_execute         = 0;
    18912017    inst->_event_type         = EVENT_TYPE_NONE;
    18922018  }
     
    18962022    log_printf(TRACE,Decod,"instruction_l_sfles","  * instruction   : l.sfles");
    18972023
    1898     inst->_type               = TYPE_TEST;
    1899     inst->_operation          = OPERATION_TEST_L_SFLES;
     2024    inst->_type               = instruction_information(INSTRUCTION_L_SFLES)._type     ; //TYPE_TEST;
     2025    inst->_operation          = instruction_information(INSTRUCTION_L_SFLES)._operation; //OPERATION_TEST_L_SFLES;
    19002026    inst->_has_immediat       = 0;
    19012027//  inst->_immediat           = ;
     
    19112037    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    19122038    inst->_exception_use      = EXCEPTION_USE_NONE;
    1913 //  inst->_branch_condition   = ;
    1914 //  inst->_branch_stack_write = ;
    1915 //  inst->_branch_direction   = ;
    1916 //  inst->_address_next       = ;
     2039    inst->_exception          = EXCEPTION_DECOD_NONE;
     2040//  inst->_branch_condition   = ;
     2041//  inst->_branch_stack_write = ;
     2042//  inst->_branch_direction   = ;
     2043//  inst->_address_next       = ;
     2044    inst->_no_execute         = 0;
    19172045    inst->_event_type         = EVENT_TYPE_NONE;
    19182046  }
     
    19222050    log_printf(TRACE,Decod,"instruction_l_sflesi","  * instruction   : l.sflesi");
    19232051
    1924     inst->_type               = TYPE_TEST;
    1925     inst->_operation          = OPERATION_TEST_L_SFLES;
     2052    inst->_type               = instruction_information(INSTRUCTION_L_SFLESI)._type     ; //TYPE_TEST;
     2053    inst->_operation          = instruction_information(INSTRUCTION_L_SFLESI)._operation; //OPERATION_TEST_L_SFLES;
    19262054    inst->_has_immediat       = 1;
    19272055    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    19372065    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    19382066    inst->_exception_use      = EXCEPTION_USE_NONE;
    1939 //  inst->_branch_condition   = ;
    1940 //  inst->_branch_stack_write = ;
    1941 //  inst->_branch_direction   = ;
    1942 //  inst->_address_next       = ;
     2067    inst->_exception          = EXCEPTION_DECOD_NONE;
     2068//  inst->_branch_condition   = ;
     2069//  inst->_branch_stack_write = ;
     2070//  inst->_branch_direction   = ;
     2071//  inst->_address_next       = ;
     2072    inst->_no_execute         = 0;
    19432073    inst->_event_type         = EVENT_TYPE_NONE;
    19442074  }
     
    19482078    log_printf(TRACE,Decod,"instruction_l_sfleu","  * instruction   : l.sfleu");
    19492079
    1950     inst->_type               = TYPE_TEST;
    1951     inst->_operation          = OPERATION_TEST_L_SFLEU;
     2080    inst->_type               = instruction_information(INSTRUCTION_L_SFLEU)._type     ; //TYPE_TEST;
     2081    inst->_operation          = instruction_information(INSTRUCTION_L_SFLEU)._operation; //OPERATION_TEST_L_SFLEU;
    19522082    inst->_has_immediat       = 0;
    19532083//  inst->_immediat           = ;
     
    19632093    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    19642094    inst->_exception_use      = EXCEPTION_USE_NONE;
    1965 //  inst->_branch_condition   = ;
    1966 //  inst->_branch_stack_write = ;
    1967 //  inst->_branch_direction   = ;
    1968 //  inst->_address_next       = ;
     2095    inst->_exception          = EXCEPTION_DECOD_NONE;
     2096//  inst->_branch_condition   = ;
     2097//  inst->_branch_stack_write = ;
     2098//  inst->_branch_direction   = ;
     2099//  inst->_address_next       = ;
     2100    inst->_no_execute         = 0;
    19692101    inst->_event_type         = EVENT_TYPE_NONE;
    19702102  }
     
    19742106    log_printf(TRACE,Decod,"instruction_l_sfleui","  * instruction   : l.sfleui");
    19752107
    1976     inst->_type               = TYPE_TEST;
    1977     inst->_operation          = OPERATION_TEST_L_SFLEU;
     2108    inst->_type               = instruction_information(INSTRUCTION_L_SFLEUI)._type     ; //TYPE_TEST;
     2109    inst->_operation          = instruction_information(INSTRUCTION_L_SFLEUI)._operation; //OPERATION_TEST_L_SFLEU;
    19782110    inst->_has_immediat       = 1;
    19792111    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    19892121    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    19902122    inst->_exception_use      = EXCEPTION_USE_NONE;
    1991 //  inst->_branch_condition   = ;
    1992 //  inst->_branch_stack_write = ;
    1993 //  inst->_branch_direction   = ;
    1994 //  inst->_address_next       = ;
     2123    inst->_exception          = EXCEPTION_DECOD_NONE;
     2124//  inst->_branch_condition   = ;
     2125//  inst->_branch_stack_write = ;
     2126//  inst->_branch_direction   = ;
     2127//  inst->_address_next       = ;
     2128    inst->_no_execute         = 0;
    19952129    inst->_event_type         = EVENT_TYPE_NONE;
    19962130  }
     
    20002134    log_printf(TRACE,Decod,"instruction_l_sflts","  * instruction   : l.sflts");
    20012135
    2002     inst->_type               = TYPE_TEST;
    2003     inst->_operation          = OPERATION_TEST_L_SFLTS;
     2136    inst->_type               = instruction_information(INSTRUCTION_L_SFLTS)._type     ; //TYPE_TEST;
     2137    inst->_operation          = instruction_information(INSTRUCTION_L_SFLTS)._operation; //OPERATION_TEST_L_SFLTS;
    20042138    inst->_has_immediat       = 0;
    20052139//  inst->_immediat           = ;
     
    20152149    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    20162150    inst->_exception_use      = EXCEPTION_USE_NONE;
    2017 //  inst->_branch_condition   = ;
    2018 //  inst->_branch_stack_write = ;
    2019 //  inst->_branch_direction   = ;
    2020 //  inst->_address_next       = ;
     2151    inst->_exception          = EXCEPTION_DECOD_NONE;
     2152//  inst->_branch_condition   = ;
     2153//  inst->_branch_stack_write = ;
     2154//  inst->_branch_direction   = ;
     2155//  inst->_address_next       = ;
     2156    inst->_no_execute         = 0;
    20212157    inst->_event_type         = EVENT_TYPE_NONE;
    20222158  }
     
    20262162    log_printf(TRACE,Decod,"instruction_l_sfltsi","  * instruction   : l.sfltsi");
    20272163
    2028     inst->_type               = TYPE_TEST;
    2029     inst->_operation          = OPERATION_TEST_L_SFLTS;
     2164    inst->_type               = instruction_information(INSTRUCTION_L_SFLTSI)._type     ; //TYPE_TEST;
     2165    inst->_operation          = instruction_information(INSTRUCTION_L_SFLTSI)._operation; //OPERATION_TEST_L_SFLTS;
    20302166    inst->_has_immediat       = 1;
    20312167    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    20412177    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    20422178    inst->_exception_use      = EXCEPTION_USE_NONE;
    2043 //  inst->_branch_condition   = ;
    2044 //  inst->_branch_stack_write = ;
    2045 //  inst->_branch_direction   = ;
    2046 //  inst->_address_next       = ;
     2179    inst->_exception          = EXCEPTION_DECOD_NONE;
     2180//  inst->_branch_condition   = ;
     2181//  inst->_branch_stack_write = ;
     2182//  inst->_branch_direction   = ;
     2183//  inst->_address_next       = ;
     2184    inst->_no_execute         = 0;
    20472185    inst->_event_type         = EVENT_TYPE_NONE;
    20482186  }
     
    20522190    log_printf(TRACE,Decod,"instruction_l_sfltu","  * instruction   : l.sfltu");
    20532191
    2054     inst->_type               = TYPE_TEST;
    2055     inst->_operation          = OPERATION_TEST_L_SFLTU;
     2192    inst->_type               = instruction_information(INSTRUCTION_L_SFLTU)._type     ; //TYPE_TEST;
     2193    inst->_operation          = instruction_information(INSTRUCTION_L_SFLTU)._operation; //OPERATION_TEST_L_SFLTU;
    20562194    inst->_has_immediat       = 0;
    20572195//  inst->_immediat           = ;
     
    20672205    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    20682206    inst->_exception_use      = EXCEPTION_USE_NONE;
    2069 //  inst->_branch_condition   = ;
    2070 //  inst->_branch_stack_write = ;
    2071 //  inst->_branch_direction   = ;
    2072 //  inst->_address_next       = ;
     2207    inst->_exception          = EXCEPTION_DECOD_NONE;
     2208//  inst->_branch_condition   = ;
     2209//  inst->_branch_stack_write = ;
     2210//  inst->_branch_direction   = ;
     2211//  inst->_address_next       = ;
     2212    inst->_no_execute         = 0;
    20732213    inst->_event_type         = EVENT_TYPE_NONE;
    20742214  }
     
    20782218    log_printf(TRACE,Decod,"instruction_l_sfltui","  * instruction   : l.sfltui");
    20792219
    2080     inst->_type               = TYPE_TEST;
    2081     inst->_operation          = OPERATION_TEST_L_SFLTU;
     2220    inst->_type               = instruction_information(INSTRUCTION_L_SFLTUI)._type     ; //TYPE_TEST;
     2221    inst->_operation          = instruction_information(INSTRUCTION_L_SFLTUI)._operation; //OPERATION_TEST_L_SFLTU;
    20822222    inst->_has_immediat       = 1;
    20832223    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    20932233    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    20942234    inst->_exception_use      = EXCEPTION_USE_NONE;
    2095 //  inst->_branch_condition   = ;
    2096 //  inst->_branch_stack_write = ;
    2097 //  inst->_branch_direction   = ;
    2098 //  inst->_address_next       = ;
     2235    inst->_exception          = EXCEPTION_DECOD_NONE;
     2236//  inst->_branch_condition   = ;
     2237//  inst->_branch_stack_write = ;
     2238//  inst->_branch_direction   = ;
     2239//  inst->_address_next       = ;
     2240    inst->_no_execute         = 0;
    20992241    inst->_event_type         = EVENT_TYPE_NONE;
    21002242  }
     
    21042246    log_printf(TRACE,Decod,"instruction_l_sfne","  * instruction   : l.sfne");
    21052247
    2106     inst->_type               = TYPE_TEST;
    2107     inst->_operation          = OPERATION_TEST_L_SFNE;
     2248    inst->_type               = instruction_information(INSTRUCTION_L_SFNE)._type     ; //TYPE_TEST;
     2249    inst->_operation          = instruction_information(INSTRUCTION_L_SFNE)._operation; //OPERATION_TEST_L_SFNE;
    21082250    inst->_has_immediat       = 0;
    21092251//  inst->_immediat           = ;
     
    21192261    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    21202262    inst->_exception_use      = EXCEPTION_USE_NONE;
    2121 //  inst->_branch_condition   = ;
    2122 //  inst->_branch_stack_write = ;
    2123 //  inst->_branch_direction   = ;
    2124 //  inst->_address_next       = ;
     2263    inst->_exception          = EXCEPTION_DECOD_NONE;
     2264//  inst->_branch_condition   = ;
     2265//  inst->_branch_stack_write = ;
     2266//  inst->_branch_direction   = ;
     2267//  inst->_address_next       = ;
     2268    inst->_no_execute         = 0;
    21252269    inst->_event_type         = EVENT_TYPE_NONE;
    21262270  }
     
    21302274    log_printf(TRACE,Decod,"instruction_l_sfnei","  * instruction   : l.sfnei");
    21312275
    2132     inst->_type               = TYPE_TEST;
    2133     inst->_operation          = OPERATION_TEST_L_SFNE;
     2276    inst->_type               = instruction_information(INSTRUCTION_L_SFNEI)._type     ; //TYPE_TEST;
     2277    inst->_operation          = instruction_information(INSTRUCTION_L_SFNEI)._operation; //OPERATION_TEST_L_SFNE;
    21342278    inst->_has_immediat       = 1;
    21352279    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    21452289    inst->_num_reg_re         = SPR_LOGIC_SR_F;
    21462290    inst->_exception_use      = EXCEPTION_USE_NONE;
    2147 //  inst->_branch_condition   = ;
    2148 //  inst->_branch_stack_write = ;
    2149 //  inst->_branch_direction   = ;
    2150 //  inst->_address_next       = ;
     2291    inst->_exception          = EXCEPTION_DECOD_NONE;
     2292//  inst->_branch_condition   = ;
     2293//  inst->_branch_stack_write = ;
     2294//  inst->_branch_direction   = ;
     2295//  inst->_address_next       = ;
     2296    inst->_no_execute         = 0;
    21512297    inst->_event_type         = EVENT_TYPE_NONE;
    21522298  }
     
    21562302    log_printf(TRACE,Decod,"instruction_l_sh","  * instruction   : l.sh");
    21572303
    2158     inst->_type               = TYPE_MEMORY;
    2159     inst->_operation          = OPERATION_MEMORY_STORE_16;
     2304    inst->_type               = instruction_information(INSTRUCTION_L_SH)._type     ; //TYPE_MEMORY;
     2305    inst->_operation          = instruction_information(INSTRUCTION_L_SH)._operation; //OPERATION_MEMORY_STORE_16;
    21602306    inst->_has_immediat       = 1;
    21612307    inst->_immediat           = EXTENDS(((range<Tgeneral_data_t   >(inst->_instruction,25,21)<<11)|
     
    21722318//  inst->_num_reg_re         = ;
    21732319    inst->_exception_use      = EXCEPTION_USE_MEMORY_WITH_ALIGNMENT;
    2174 //  inst->_branch_condition   = ;
    2175 //  inst->_branch_stack_write = ;
    2176 //  inst->_branch_direction   = ;
    2177 //  inst->_address_next       = ;
     2320    inst->_exception          = EXCEPTION_DECOD_NONE;
     2321//  inst->_branch_condition   = ;
     2322//  inst->_branch_stack_write = ;
     2323//  inst->_branch_direction   = ;
     2324//  inst->_address_next       = ;
     2325    inst->_no_execute         = 0;
    21782326    inst->_event_type         = EVENT_TYPE_NONE;
    21792327  }
     
    21832331    log_printf(TRACE,Decod,"instruction_l_sll","  * instruction   : l.sll");
    21842332
    2185     inst->_type               = TYPE_SHIFT;
    2186     inst->_operation          = OPERATION_SHIFT_L_SLL;
    2187     inst->_has_immediat       = 0;
    2188 //  inst->_immediat           = ;
    2189     inst->_read_ra            = 1;
    2190     inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
    2191     inst->_read_rb            = 1;
    2192     inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
    2193     inst->_read_rc            = 0;
    2194 //  inst->_num_reg_rc         = ;
    2195     inst->_write_rd           = 1;
    2196     inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
    2197     inst->_write_re           = 0;
    2198 //  inst->_num_reg_re         = ;
    2199     inst->_exception_use      = EXCEPTION_USE_NONE;
    2200 //  inst->_branch_condition   = ;
    2201 //  inst->_branch_stack_write = ;
    2202 //  inst->_branch_direction   = ;
    2203 //  inst->_address_next       = ;
     2333    inst->_type               = instruction_information(INSTRUCTION_L_SLL)._type     ; //TYPE_SHIFT;
     2334    inst->_operation          = instruction_information(INSTRUCTION_L_SLL)._operation; //OPERATION_SHIFT_L_SLL;
     2335    inst->_has_immediat       = 0;
     2336//  inst->_immediat           = ;
     2337    inst->_read_ra            = 1;
     2338    inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
     2339    inst->_read_rb            = 1;
     2340    inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
     2341    inst->_read_rc            = 0;
     2342//  inst->_num_reg_rc         = ;
     2343    inst->_write_rd           = 1;
     2344    inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
     2345    inst->_write_re           = 0;
     2346//  inst->_num_reg_re         = ;
     2347    inst->_exception_use      = EXCEPTION_USE_NONE;
     2348    inst->_exception          = EXCEPTION_DECOD_NONE;
     2349//  inst->_branch_condition   = ;
     2350//  inst->_branch_stack_write = ;
     2351//  inst->_branch_direction   = ;
     2352//  inst->_address_next       = ;
     2353    inst->_no_execute         = 0;
    22042354    inst->_event_type         = EVENT_TYPE_NONE;
    22052355  }
     
    22092359    log_printf(TRACE,Decod,"instruction_l_slli","  * instruction   : l.slli");
    22102360
    2211     inst->_type               = TYPE_SHIFT;
    2212     inst->_operation          = OPERATION_SHIFT_L_SLL;
     2361    inst->_type               = instruction_information(INSTRUCTION_L_SLLI)._type     ; //TYPE_SHIFT;
     2362    inst->_operation          = instruction_information(INSTRUCTION_L_SLLI)._operation; //OPERATION_SHIFT_L_SLL;
    22132363    inst->_has_immediat       = 1;
    22142364    inst->_immediat           = range<Tgeneral_data_t   >(inst->_instruction, 5, 0);
     
    22242374//  inst->_num_reg_re         = ;
    22252375    inst->_exception_use      = EXCEPTION_USE_NONE;
    2226 //  inst->_branch_condition   = ;
    2227 //  inst->_branch_stack_write = ;
    2228 //  inst->_branch_direction   = ;
    2229 //  inst->_address_next       = ;
     2376    inst->_exception          = EXCEPTION_DECOD_NONE;
     2377//  inst->_branch_condition   = ;
     2378//  inst->_branch_stack_write = ;
     2379//  inst->_branch_direction   = ;
     2380//  inst->_address_next       = ;
     2381    inst->_no_execute         = 0;
    22302382    inst->_event_type         = EVENT_TYPE_NONE;
    22312383  }
     
    22352387    log_printf(TRACE,Decod,"instruction_l_sra","  * instruction   : l.sra");
    22362388
    2237     inst->_type               = TYPE_SHIFT;
    2238     inst->_operation          = OPERATION_SHIFT_L_SRA;
    2239     inst->_has_immediat       = 0;
    2240 //  inst->_immediat           = ;
    2241     inst->_read_ra            = 1;
    2242     inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
    2243     inst->_read_rb            = 1;
    2244     inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
    2245     inst->_read_rc            = 0;
    2246 //  inst->_num_reg_rc         = ;
    2247     inst->_write_rd           = 1;
    2248     inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
    2249     inst->_write_re           = 0;
    2250 //  inst->_num_reg_re         = ;
    2251     inst->_exception_use      = EXCEPTION_USE_NONE;
    2252 //  inst->_branch_condition   = ;
    2253 //  inst->_branch_stack_write = ;
    2254 //  inst->_branch_direction   = ;
    2255 //  inst->_address_next       = ;
     2389    inst->_type               = instruction_information(INSTRUCTION_L_SRA)._type     ; //TYPE_SHIFT;
     2390    inst->_operation          = instruction_information(INSTRUCTION_L_SRA)._operation; //OPERATION_SHIFT_L_SRA;
     2391    inst->_has_immediat       = 0;
     2392//  inst->_immediat           = ;
     2393    inst->_read_ra            = 1;
     2394    inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
     2395    inst->_read_rb            = 1;
     2396    inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
     2397    inst->_read_rc            = 0;
     2398//  inst->_num_reg_rc         = ;
     2399    inst->_write_rd           = 1;
     2400    inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
     2401    inst->_write_re           = 0;
     2402//  inst->_num_reg_re         = ;
     2403    inst->_exception_use      = EXCEPTION_USE_NONE;
     2404    inst->_exception          = EXCEPTION_DECOD_NONE;
     2405//  inst->_branch_condition   = ;
     2406//  inst->_branch_stack_write = ;
     2407//  inst->_branch_direction   = ;
     2408//  inst->_address_next       = ;
     2409    inst->_no_execute         = 0;
    22562410    inst->_event_type         = EVENT_TYPE_NONE;
    22572411  }
     
    22612415    log_printf(TRACE,Decod,"instruction_l_srai","  * instruction   : l.srai");
    22622416
    2263     inst->_type               = TYPE_SHIFT;
    2264     inst->_operation          = OPERATION_SHIFT_L_SRA;
     2417    inst->_type               = instruction_information(INSTRUCTION_L_SRAI)._type     ; //TYPE_SHIFT;
     2418    inst->_operation          = instruction_information(INSTRUCTION_L_SRAI)._operation; //OPERATION_SHIFT_L_SRA;
    22652419    inst->_has_immediat       = 1;
    22662420    inst->_immediat           = range<Tgeneral_data_t   >(inst->_instruction, 5, 0);
     
    22762430//  inst->_num_reg_re         = ;
    22772431    inst->_exception_use      = EXCEPTION_USE_NONE;
    2278 //  inst->_branch_condition   = ;
    2279 //  inst->_branch_stack_write = ;
    2280 //  inst->_branch_direction   = ;
    2281 //  inst->_address_next       = ;
     2432    inst->_exception          = EXCEPTION_DECOD_NONE;
     2433//  inst->_branch_condition   = ;
     2434//  inst->_branch_stack_write = ;
     2435//  inst->_branch_direction   = ;
     2436//  inst->_address_next       = ;
     2437    inst->_no_execute         = 0;
    22822438    inst->_event_type         = EVENT_TYPE_NONE;
    22832439  }
     
    22872443    log_printf(TRACE,Decod,"instruction_l_srl","  * instruction   : l.srl");
    22882444
    2289     inst->_type               = TYPE_SHIFT;
    2290     inst->_operation          = OPERATION_SHIFT_L_SRL;
    2291     inst->_has_immediat       = 0;
    2292 //  inst->_immediat           = ;
    2293     inst->_read_ra            = 1;
    2294     inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
    2295     inst->_read_rb            = 1;
    2296     inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
    2297     inst->_read_rc            = 0;
    2298 //  inst->_num_reg_rc         = ;
    2299     inst->_write_rd           = 1;
    2300     inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
    2301     inst->_write_re           = 0;
    2302 //  inst->_num_reg_re         = ;
    2303     inst->_exception_use      = EXCEPTION_USE_NONE;
    2304 //  inst->_branch_condition   = ;
    2305 //  inst->_branch_stack_write = ;
    2306 //  inst->_branch_direction   = ;
    2307 //  inst->_address_next       = ;
     2445    inst->_type               = instruction_information(INSTRUCTION_L_SRL)._type     ; //TYPE_SHIFT;
     2446    inst->_operation          = instruction_information(INSTRUCTION_L_SRL)._operation; //OPERATION_SHIFT_L_SRL;
     2447    inst->_has_immediat       = 0;
     2448//  inst->_immediat           = ;
     2449    inst->_read_ra            = 1;
     2450    inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
     2451    inst->_read_rb            = 1;
     2452    inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
     2453    inst->_read_rc            = 0;
     2454//  inst->_num_reg_rc         = ;
     2455    inst->_write_rd           = 1;
     2456    inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
     2457    inst->_write_re           = 0;
     2458//  inst->_num_reg_re         = ;
     2459    inst->_exception_use      = EXCEPTION_USE_NONE;
     2460    inst->_exception          = EXCEPTION_DECOD_NONE;
     2461//  inst->_branch_condition   = ;
     2462//  inst->_branch_stack_write = ;
     2463//  inst->_branch_direction   = ;
     2464//  inst->_address_next       = ;
     2465    inst->_no_execute         = 0;
    23082466    inst->_event_type         = EVENT_TYPE_NONE;
    23092467  }
     
    23132471    log_printf(TRACE,Decod,"instruction_l_srli","  * instruction   : l.srli");
    23142472
    2315     inst->_type               = TYPE_SHIFT;
    2316     inst->_operation          = OPERATION_SHIFT_L_SRL;
     2473    inst->_type               = instruction_information(INSTRUCTION_L_SRLI)._type     ; //TYPE_SHIFT;
     2474    inst->_operation          = instruction_information(INSTRUCTION_L_SRLI)._operation; //OPERATION_SHIFT_L_SRL;
    23172475    inst->_has_immediat       = 1;
    23182476    inst->_immediat           = range<Tgeneral_data_t   >(inst->_instruction, 5, 0);
     
    23282486//  inst->_num_reg_re         = ;
    23292487    inst->_exception_use      = EXCEPTION_USE_NONE;
    2330 //  inst->_branch_condition   = ;
    2331 //  inst->_branch_stack_write = ;
    2332 //  inst->_branch_direction   = ;
    2333 //  inst->_address_next       = ;
     2488    inst->_exception          = EXCEPTION_DECOD_NONE;
     2489//  inst->_branch_condition   = ;
     2490//  inst->_branch_stack_write = ;
     2491//  inst->_branch_direction   = ;
     2492//  inst->_address_next       = ;
     2493    inst->_no_execute         = 0;
    23342494    inst->_event_type         = EVENT_TYPE_NONE;
    23352495  }
     
    23392499    log_printf(TRACE,Decod,"instruction_l_sub","  * instruction   : l.sub");
    23402500
    2341     inst->_type               = TYPE_ALU;
    2342     inst->_operation          = OPERATION_ALU_L_SUB;
     2501    inst->_type               = instruction_information(INSTRUCTION_L_SUB)._type     ; //TYPE_ALU;
     2502    inst->_operation          = instruction_information(INSTRUCTION_L_SUB)._operation; //OPERATION_ALU_L_SUB;
    23432503    inst->_has_immediat       = 0;
    23442504//  inst->_immediat           = ;
     
    23542514    inst->_num_reg_re         = SPR_LOGIC_SR_CY_OV;
    23552515    inst->_exception_use      = EXCEPTION_USE_RANGE;
    2356 //  inst->_branch_condition   = ;
    2357 //  inst->_branch_stack_write = ;
    2358 //  inst->_branch_direction   = ;
    2359 //  inst->_address_next       = ;
     2516    inst->_exception          = EXCEPTION_DECOD_NONE;
     2517//  inst->_branch_condition   = ;
     2518//  inst->_branch_stack_write = ;
     2519//  inst->_branch_direction   = ;
     2520//  inst->_address_next       = ;
     2521    inst->_no_execute         = 0;
    23602522    inst->_event_type         = EVENT_TYPE_NONE;
    23612523  }
     
    23652527    log_printf(TRACE,Decod,"instruction_l_sw","  * instruction   : l.sw");
    23662528
    2367     inst->_type               = TYPE_MEMORY;
    2368     inst->_operation          = OPERATION_MEMORY_STORE_32;
     2529    inst->_type               = instruction_information(INSTRUCTION_L_SW)._type     ; //TYPE_MEMORY;
     2530    inst->_operation          = instruction_information(INSTRUCTION_L_SW)._operation; //OPERATION_MEMORY_STORE_32;
    23692531    inst->_has_immediat       = 1;
    23702532    inst->_immediat           = EXTENDS(((range<Tgeneral_data_t   >(inst->_instruction,25,21)<<11)|
     
    23812543//  inst->_num_reg_re         = ;
    23822544    inst->_exception_use      = EXCEPTION_USE_MEMORY_WITH_ALIGNMENT;
    2383 //  inst->_branch_condition   = ;
    2384 //  inst->_branch_stack_write = ;
    2385 //  inst->_branch_direction   = ;
    2386 //  inst->_address_next       = ;
     2545    inst->_exception          = EXCEPTION_DECOD_NONE;
     2546//  inst->_branch_condition   = ;
     2547//  inst->_branch_stack_write = ;
     2548//  inst->_branch_direction   = ;
     2549//  inst->_address_next       = ;
     2550    inst->_no_execute         = 0;
    23872551    inst->_event_type         = EVENT_TYPE_NONE;
    23882552  }
     
    23982562    else
    23992563      {
    2400     inst->_type               = TYPE_SPECIAL;
    2401     inst->_operation          = OPERATION_SPECIAL_L_SYS;
     2564    inst->_type               = instruction_information(INSTRUCTION_L_SYS)._type     ; //TYPE_SPECIAL;
     2565    inst->_operation          = instruction_information(INSTRUCTION_L_SYS)._operation; //OPERATION_SPECIAL_L_SYS;
    24022566//  inst->_has_immediat       = 1;
    24032567//  inst->_immediat           = EXTENDZ(inst->_instruction,16);
     
    24152579//  inst->_num_reg_re         = ;
    24162580    inst->_exception_use      = EXCEPTION_USE_SYSCALL;
     2581    inst->_exception          = EXCEPTION_SYSCALL;
    24172582//  inst->_branch_condition   = ;
    24182583//  inst->_branch_stack_write = ;
     
    24262591
    24272592//  inst->_address_next       = ; // don't change
     2593    inst->_no_execute         = 1;
    24282594    inst->_event_type         = EVENT_TYPE_EXCEPTION;
    24292595      }
     
    24402606    else
    24412607      {
    2442     inst->_type               = TYPE_SPECIAL;
    2443     inst->_operation          = OPERATION_SPECIAL_L_TRAP;
     2608    inst->_type               = instruction_information(INSTRUCTION_L_TRAP)._type     ; //TYPE_SPECIAL;
     2609    inst->_operation          = instruction_information(INSTRUCTION_L_TRAP)._operation; //OPERATION_SPECIAL_L_TRAP;
    24442610    inst->_has_immediat       = 1;
    24452611    inst->_immediat           = EXTENDZ(inst->_instruction,16);
     
    24552621//  inst->_num_reg_re         = ;
    24562622    inst->_exception_use      = EXCEPTION_USE_TRAP;
    2457 //  inst->_branch_condition   = ;
    2458 //  inst->_branch_stack_write = ;
    2459 //  inst->_branch_direction   = ;
    2460 //  inst->_address_next       = ;
     2623    inst->_exception          = EXCEPTION_DECOD_NONE;
     2624//  inst->_branch_condition   = ;
     2625//  inst->_branch_stack_write = ;
     2626//  inst->_branch_direction   = ;
     2627//  inst->_address_next       = ;
     2628    inst->_no_execute         = 1;
    24612629    inst->_event_type         = EVENT_TYPE_NONE;
    24622630      }
     
    24672635    log_printf(TRACE,Decod,"instruction_l_xor","  * instruction   : l.xor");
    24682636
    2469     inst->_type               = TYPE_ALU;
    2470     inst->_operation          = OPERATION_ALU_L_XOR;
    2471     inst->_has_immediat       = 0;
    2472 //  inst->_immediat           = ;
    2473     inst->_read_ra            = 1;
    2474     inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
    2475     inst->_read_rb            = 1;
    2476     inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
    2477     inst->_read_rc            = 0;
    2478 //  inst->_num_reg_rc         = ;
    2479     inst->_write_rd           = 1;
    2480     inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
    2481     inst->_write_re           = 0;
    2482 //  inst->_num_reg_re         = ;
    2483     inst->_exception_use      = EXCEPTION_USE_NONE;
    2484 //  inst->_branch_condition   = ;
    2485 //  inst->_branch_stack_write = ;
    2486 //  inst->_branch_direction   = ;
    2487 //  inst->_address_next       = ;
     2637    inst->_type               = instruction_information(INSTRUCTION_L_XOR)._type     ; //TYPE_ALU;
     2638    inst->_operation          = instruction_information(INSTRUCTION_L_XOR)._operation; //OPERATION_ALU_L_XOR;
     2639    inst->_has_immediat       = 0;
     2640//  inst->_immediat           = ;
     2641    inst->_read_ra            = 1;
     2642    inst->_num_reg_ra         = range<Tgeneral_address_t>(inst->_instruction,20,16);
     2643    inst->_read_rb            = 1;
     2644    inst->_num_reg_rb         = range<Tgeneral_address_t>(inst->_instruction,15,11);
     2645    inst->_read_rc            = 0;
     2646//  inst->_num_reg_rc         = ;
     2647    inst->_write_rd           = 1;
     2648    inst->_num_reg_rd         = range<Tgeneral_address_t>(inst->_instruction,25,21);
     2649    inst->_write_re           = 0;
     2650//  inst->_num_reg_re         = ;
     2651    inst->_exception_use      = EXCEPTION_USE_NONE;
     2652    inst->_exception          = EXCEPTION_DECOD_NONE;
     2653//  inst->_branch_condition   = ;
     2654//  inst->_branch_stack_write = ;
     2655//  inst->_branch_direction   = ;
     2656//  inst->_address_next       = ;
     2657    inst->_no_execute         = 0;
    24882658    inst->_event_type         = EVENT_TYPE_NONE;
    24892659  }
     
    24932663    log_printf(TRACE,Decod,"instruction_l_xori","  * instruction   : l.xori");
    24942664
    2495     inst->_type               = TYPE_ALU;
    2496     inst->_operation          = OPERATION_ALU_L_XOR;
     2665    inst->_type               = instruction_information(INSTRUCTION_L_XORI)._type     ; //TYPE_ALU;
     2666    inst->_operation          = instruction_information(INSTRUCTION_L_XORI)._operation; //OPERATION_ALU_L_XOR;
    24972667    inst->_has_immediat       = 1;
    24982668    inst->_immediat           = EXTENDS(inst->_instruction,16);
     
    25082678//  inst->_num_reg_re         = ;
    25092679    inst->_exception_use      = EXCEPTION_USE_NONE;
    2510 //  inst->_branch_condition   = ;
    2511 //  inst->_branch_stack_write = ;
    2512 //  inst->_branch_direction   = ;
    2513 //  inst->_address_next       = ;
     2680    inst->_exception          = EXCEPTION_DECOD_NONE;
     2681//  inst->_branch_condition   = ;
     2682//  inst->_branch_stack_write = ;
     2683//  inst->_branch_direction   = ;
     2684//  inst->_address_next       = ;
     2685    inst->_no_execute         = 0;
    25142686    inst->_event_type         = EVENT_TYPE_NONE;
    25152687  }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Makefile.deps

    r81 r88  
    1313include                         $(DIR_MORPHEO)/Behavioural/Makefile.deps
    1414endif
     15ifndef Priority
     16include                         $(DIR_MORPHEO)/Behavioural/Generic/Priority/Makefile.deps
     17endif
    1518ifndef Custom
    1619include                         $(DIR_MORPHEO)/Behavioural/Custom/Makefile.deps
     
    2528Decod_LIBRARY                   =       -lDecod \
    2629                                        $(Custom_LIBRARY)               \
     30                                        $(Priority_LIBRARY)             \
    2731                                        $(Behavioural_LIBRARY) 
    2832
    29 Decod_DIR_LIBRARY               =       -L$(Decod_DIR)/lib      \
     33Decod_DIR_LIBRARY               =       -L$(Decod_DIR)/lib              \
    3034                                        $(Custom_DIR_LIBRARY)           \
     35                                        $(Priority_DIR_LIBRARY)         \
    3136                                        $(Behavioural_DIR_LIBRARY)
    3237
     
    3641                                @\
    3742                                $(MAKE) Behavioural_library;            \
     43                                $(MAKE) Priority_library;               \
    3844                                $(MAKE) Custom_library;                 \
    3945                                $(MAKE) --directory=$(Decod_DIR) --makefile=Makefile;
     
    4248                                @\
    4349                                $(MAKE) Behavioural_library_clean;      \
     50                                $(MAKE) Priority_library_clean;         \
    4451                                $(MAKE) Custom_library_clean;           \
    4552                                $(MAKE) --directory=$(Decod_DIR) --makefile=Makefile clean;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Decod_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/config_min.cfg

    r87 r88  
    11Decod
    221       1       *4      # nb_context           
    3 1       1       *4      # nb_inst_fetch        [0] [nb_context]
     31       1       *4      # nb_inst_fetch                 [0] [nb_context]
    441       1       *4      # nb_inst_decod       
    5 1       1       *2      # nb_branch_speculated
    6 0       0       +1      # size_branch_update_prediction
     51       1       *2      # nb_branch_speculated          [0] [nb_context]
    761       1       *2      # nb_context_select   
    8732      32      *2      # size_general_data   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/config_mono_context.cfg

    r87 r88  
    11Decod
    221       1       *4      # nb_context           
    3 4       16      *4      # nb_inst_fetch        [0] [nb_context]
    4 1       4       *4      # nb_inst_decod       
    5 1       1       *2      # nb_branch_speculated
    6 0       2       +1      # size_branch_update_prediction
     34       16      *4      # nb_inst_fetch                 [0] [nb_context]
     41       4       *4      # nb_inst_decod         
     51       1       *2      # nb_branch_speculated          [0] [nb_context]
    761       1       *2      # nb_context_select   
    8732      32      *2      # size_general_data   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/config_multi_context.cfg

    r87 r88  
    11Decod
    224       4       *4      # nb_context           
    3 1       1       *4      # nb_inst_fetch        [0] [nb_context]
    4 2       2       *4      # nb_inst_fetch        [1] [nb_context]
    5 4       4       *4      # nb_inst_fetch        [2] [nb_context]
    6 8       8       *4      # nb_inst_fetch        [3] [nb_context]
     31       1       *4      # nb_inst_fetch                 [0] [nb_context]
     42       2       *4      # nb_inst_fetch                 [1] [nb_context]
     54       4       *4      # nb_inst_fetch                 [2] [nb_context]
     68       8       *4      # nb_inst_fetch                 [3] [nb_context]
    771       8       *2      # nb_inst_decod       
    8 1       1       *2      # nb_branch_speculated
    9 2       2       *2      # size_branch_update_prediction
     81       1       *2      # nb_branch_speculated          [0] [nb_context]
     90       0       *2      # nb_branch_speculated          [1] [nb_context]
     101       1       *2      # nb_branch_speculated          [2] [nb_context]
     112       2       *2      # nb_branch_speculated          [3] [nb_context]
    10121       4       *2      # nb_context_select   
    111332      32      *2      # size_general_data   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/include/Decod_request.h

    r87 r88  
    3232  public : Ttype_t             _type                       ;
    3333  public : Toperation_t        _operation                  ;
     34  public : Tcontrol_t          _no_execute                 ;
    3435  public : Tcontrol_t          _is_delay_slot              ;
    3536  public : Tcontrol_t          _has_immediat               ;
     
    4647  public : Tspecial_address_t  _num_reg_re                 ;
    4748  public : Texception_t        _exception_use              ;
     49  public : Texception_t        _exception_ifetch           ;
     50  public : Texception_t        _exception_decod            ;
    4851  public : Tevent_type_t       _context_event_type         ;
    4952
     
    6467                    Ttype_t             type                       ,
    6568                    Toperation_t        operation                  ,
     69//                  Tcontrol_t          no_execute                 ,
    6670                    Tcontrol_t          is_delay_slot              ,
    6771                    Tcontrol_t          has_immediat               ,
     
    7882                    Tspecial_address_t  num_reg_re                 ,
    7983                    Texception_t        exception_use              ,
     84//                     Texception_t        exception_ifetch           ,
     85//                     Texception_t        exception_decod            ,
    8086                    Tevent_type_t       context_event_type         )
    8187    {
     
    110116      _exception_use               = exception_use              ;
    111117      _context_event_type          = context_event_type         ;
     118
     119      _no_execute                  = 0                          ;
     120      _exception_ifetch            = EXCEPTION_IFETCH_NONE      ;
     121      _exception_decod             = EXCEPTION_DECOD_NONE       ;
    112122    }
    113123  };
     
    246256    0xe3caa309,x,y,z,
    247257    BRANCH_STATE_NONE,0,BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK,0, 0x0,
    248     0,TYPE_MUL_DIV,OPERATION_MUL_DIV_L_DIV,false,
     258    0,TYPE_DIV,OPERATION_DIV_L_DIV,false,
    249259    0,0x0,1,10,1,20,0,0                 ,1,30,1,SPR_LOGIC_SR_CY_OV,
    250260    EXCEPTION_USE_RANGE,EVENT_TYPE_NONE));
     
    265275    0xe3caa30a,x,y,z,
    266276    BRANCH_STATE_NONE,0,BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK,0, 0x0,
    267     0,TYPE_MUL_DIV,OPERATION_MUL_DIV_L_DIVU,true,
     277    0,TYPE_DIV,OPERATION_DIV_L_DIVU,true,
    268278    0,0x0,1,10,1,20,0,0                 ,1,30,1,SPR_LOGIC_SR_CY_OV,
    269279    EXCEPTION_USE_RANGE,EVENT_TYPE_NONE));
     
    622632    0xe3caa306,x,y,z,
    623633    0,0,0,0,0,0,
    624     TYPE_MUL_DIV,OPERATION_MUL_DIV_L_MUL,false,
     634    TYPE_MUL,OPERATION_MUL_L_MUL,false,
    625635    0,0, 1,10, 1,20, 0,0, 1,30, 1,SPR_LOGIC_SR_CY_OV,
    626636    EXCEPTION_USE_RANGE,EVENT_TYPE_NONE));
     
    631641    0xb3ca03fa,x,y,z,
    632642    0,0,0,0,0,0,
    633     TYPE_MUL_DIV,OPERATION_MUL_DIV_L_MUL,false,
     643    TYPE_MUL,OPERATION_MUL_L_MUL,false,
    634644    1,0x3fa, 1,10, 0,0, 0,0, 1,30, 1,SPR_LOGIC_SR_CY_OV,
    635645    EXCEPTION_USE_RANGE,EVENT_TYPE_NONE));
     
    640650    0xb3cafc06,x,y,z,
    641651    0,0,0,0,0,0,
    642     TYPE_MUL_DIV,OPERATION_MUL_DIV_L_MUL,false,
     652    TYPE_MUL,OPERATION_MUL_L_MUL,false,
    643653    1,0xfffffc06, 1,10, 0,0, 0,0, 1,30, 1,SPR_LOGIC_SR_CY_OV,
    644654    EXCEPTION_USE_RANGE,EVENT_TYPE_NONE));
     
    649659    0xe3caa30b,x,y,z,
    650660    0,0,0,0,0,0,
    651     TYPE_MUL_DIV,OPERATION_MUL_DIV_L_MULU,false,
     661    TYPE_MUL,OPERATION_MUL_L_MULU,false,
    652662    0,0, 1,10, 1,20, 0,0, 1,30, 1,SPR_LOGIC_SR_CY_OV,
    653663    EXCEPTION_USE_RANGE,EVENT_TYPE_NONE));
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/main.cpp

    r87 r88  
    99#include "Behavioural/Custom/include/Custom_example.h"
    1010
    11 #define NB_PARAMS 8
     11#define NB_PARAMS 6
    1212
    1313void usage (int argc, char * argv[])
     
    1515  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
    1616  err (_("list_params is :\n"));
    17   err (_(" * nb_context                                (uint32_t         )\n"));
    18   err (_(" * nb_inst_fetch                [nb_context] (uint32_t         )\n"));
    19   err (_(" * nb_inst_decod                             (uint32_t         )\n"));
    20   err (_(" * nb_branch_speculated                      (uint32_t         )\n"));
    21   err (_(" * size_branch_update_prediction             (uint32_t         )\n"));
    22   err (_(" * nb_context_select                         (uint32_t         )\n"));
    23   err (_(" * size_general_data                         (uint32_t         )\n"));
    24   err (_(" * priority                                  (Tpriority_t      )\n"));
    25   err (_(" * load_balancing                            (Tload_balancing_t)\n"));
     17  err (_(" * nb_context                                 (uint32_t         )\n"));
     18  err (_(" * nb_inst_fetch                 [nb_context] (uint32_t         )\n"));
     19  err (_(" * nb_inst_decod                              (uint32_t         )\n"));
     20  err (_(" * nb_branch_speculated          [nb_context] (uint32_t         )\n"));
     21  err (_(" * nb_context_select                          (uint32_t         )\n"));
     22  err (_(" * size_general_data                          (uint32_t         )\n"));
     23  err (_(" * priority                                   (Tpriority_t      )\n"));
     24  err (_(" * load_balancing                             (Tload_balancing_t)\n"));
    2625
    2726  exit (1);
     
    4241  uint32_t            _nb_context           = fromString<uint32_t         >(argv[x++]);
    4342
    44   if (argc != static_cast<int>(2+NB_PARAMS+_nb_context))
     43  if (argc != static_cast<int>(2+NB_PARAMS+2*_nb_context))
    4544    usage (argc, argv);
    4645 
    47   uint32_t          * _nb_inst_fetch        = new uint32_t [_nb_context];
     46  uint32_t          * _nb_inst_fetch                = new uint32_t [_nb_context];
    4847  for (uint32_t i=0;i<_nb_context; i++)
    4948    _nb_inst_fetch [i] = fromString<uint32_t>(argv[x++]);
    5049
    5150  uint32_t            _nb_inst_decod                = fromString<uint32_t         >(argv[x++]);
    52   uint32_t            _nb_branch_speculated         = fromString<uint32_t         >(argv[x++]);
    53   uint32_t            _size_branch_update_prediction= fromString<uint32_t         >(argv[x++]);
     51
     52  uint32_t          * _nb_branch_speculated         = new uint32_t [_nb_context];
     53  for (uint32_t i=0;i<_nb_context; i++)
     54    _nb_branch_speculated [i] = fromString<uint32_t>(argv[x++]);
     55
     56//   uint32_t          * _size_branch_update_prediction= new uint32_t [_nb_context];
     57//   for (uint32_t i=0;i<_nb_context; i++)
     58//     _size_branch_update_prediction[i] = fromString<uint32_t>(argv[x++]);
     59
    5460  uint32_t            _nb_context_select            = fromString<uint32_t         >(argv[x++]);
    5561  uint32_t            _size_general_data            = fromString<uint32_t         >(argv[x++]);
     
    6369     
    6470      for (uint32_t j=0; j<NB_INSTRUCTION; j++)
    65         _instruction_implemeted [i][j] = true;
     71        _instruction_implemeted [i][j] = true;
    6672    }
    6773
     
    7076    {
    7177      morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod::Parameters
    72         (_nb_context                   ,
    73          _nb_inst_fetch                ,
    74          _nb_inst_decod                ,
    75          _nb_branch_speculated         ,
    76          _size_branch_update_prediction,
    77          _nb_context_select            ,
    78          _size_general_data            ,
    79          _priority                     ,
    80          _load_balancing               ,
    81          _instruction_implemeted       ,
    82          &(morpheo::behavioural::custom::example_get_custom_information)
    83          );
     78        (_nb_context                   ,
     79         _nb_inst_fetch                ,
     80         _nb_inst_decod                ,
     81         _nb_branch_speculated         ,
     82//          _size_branch_update_prediction,
     83         _nb_context_select            ,
     84         _size_general_data            ,
     85         _priority                     ,
     86         _load_balancing               ,
     87         _instruction_implemeted       ,
     88         &(morpheo::behavioural::custom::example_get_custom_information),
     89         true // is_toplevel
     90         );
    8491     
    8592      msg(_("%s"),param->print(1).c_str());
     
    100107  delete _nb_inst_fetch;
    101108  delete _instruction_implemeted;
     109  delete _nb_branch_speculated;
     110//   delete _size_branch_update_prediction;
     111
    102112  return (_return);
    103113}
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp

    r87 r88  
    2222
    2323#ifdef STATISTICS
    24   morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50);
     24  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,0);
    2525#endif
     26
     27  Tusage_t _usage = USE_ALL;
     28
     29//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     30//   _usage = usage_unset(_usage,USE_VHDL                 );
     31//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     32//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     33//   _usage = usage_unset(_usage,USE_POSITION             );
     34//   _usage = usage_unset(_usage,USE_STATISTICS           );
     35//   _usage = usage_unset(_usage,USE_INFORMATION          );
    2636
    2737  Decod * _Decod = new Decod
     
    3141#endif
    3242     _param,
    33      USE_ALL);
     43     _usage);
    3444 
    3545#ifdef SYSTEMC
     
    4252  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    4353
    44   ALLOC2_SC_SIGNAL( in_IFETCH_VAL                         ," in_IFETCH_VAL                         ",Tcontrol_t         ,_param->_nb_context,_param->_nb_inst_fetch[alloc_signal_it1]);
    45   ALLOC2_SC_SIGNAL(out_IFETCH_ACK                         ,"out_IFETCH_ACK                         ",Tcontrol_t         ,_param->_nb_context,_param->_nb_inst_fetch[alloc_signal_it1]);
    46   ALLOC2_SC_SIGNAL( in_IFETCH_INSTRUCTION                 ," in_IFETCH_INSTRUCTION                 ",Tinstruction_t     ,_param->_nb_context,_param->_nb_inst_fetch[alloc_signal_it1]);
     54  ALLOC2_SC_SIGNAL( in_IFETCH_VAL                         ," in_IFETCH_VAL                         ",Tcontrol_t         ,_param->_nb_context,_param->_nb_inst_fetch[it1]);
     55  ALLOC2_SC_SIGNAL(out_IFETCH_ACK                         ,"out_IFETCH_ACK                         ",Tcontrol_t         ,_param->_nb_context,_param->_nb_inst_fetch[it1]);
     56  ALLOC2_SC_SIGNAL( in_IFETCH_INSTRUCTION                 ," in_IFETCH_INSTRUCTION                 ",Tinstruction_t     ,_param->_nb_context,_param->_nb_inst_fetch[it1]);
    4757  ALLOC1_SC_SIGNAL( in_IFETCH_CONTEXT_ID                  ," in_IFETCH_CONTEXT_ID                  ",Tcontext_t         ,_param->_nb_context);
    4858  ALLOC1_SC_SIGNAL( in_IFETCH_ADDRESS                     ," in_IFETCH_ADDRESS                     ",Tgeneral_address_t ,_param->_nb_context);
     
    5161  ALLOC1_SC_SIGNAL( in_IFETCH_BRANCH_STATE                ," in_IFETCH_BRANCH_STATE                ",Tbranch_state_t    ,_param->_nb_context);
    5262  ALLOC1_SC_SIGNAL( in_IFETCH_BRANCH_UPDATE_PREDICTION_ID ," in_IFETCH_BRANCH_UPDATE_PREDICTION_ID ",Tprediction_ptr_t  ,_param->_nb_context);
     63  ALLOC1_SC_SIGNAL( in_IFETCH_EXCEPTION                   ," in_IFETCH_EXCEPTION                   ",Texception_t       ,_param->_nb_context);
     64
    5365  ALLOC1_SC_SIGNAL(out_DECOD_VAL                          ,"out_DECOD_VAL                          ",Tcontrol_t         ,_param->_nb_inst_decod);
    5466  ALLOC1_SC_SIGNAL( in_DECOD_ACK                          ," in_DECOD_ACK                          ",Tcontrol_t         ,_param->_nb_inst_decod);
     
    5769  ALLOC1_SC_SIGNAL(out_DECOD_TYPE                         ,"out_DECOD_TYPE                         ",Ttype_t            ,_param->_nb_inst_decod);
    5870  ALLOC1_SC_SIGNAL(out_DECOD_OPERATION                    ,"out_DECOD_OPERATION                    ",Toperation_t       ,_param->_nb_inst_decod);
     71  ALLOC1_SC_SIGNAL(out_DECOD_NO_EXECUTE                   ,"out_DECOD_NO_EXECUTE                   ",Tcontrol_t         ,_param->_nb_inst_decod);
    5972  ALLOC1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT                ,"out_DECOD_IS_DELAY_SLOT                ",Tcontrol_t         ,_param->_nb_inst_decod);
    6073  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS                      ,"out_DECOD_ADDRESS                      ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     
    7285  ALLOC1_SC_SIGNAL(out_DECOD_NUM_REG_RE                   ,"out_DECOD_NUM_REG_RE                   ",Tspecial_address_t ,_param->_nb_inst_decod);
    7386  ALLOC1_SC_SIGNAL(out_DECOD_EXCEPTION_USE                ,"out_DECOD_EXCEPTION_USE                ",Texception_t       ,_param->_nb_inst_decod);
     87  ALLOC1_SC_SIGNAL(out_DECOD_EXCEPTION                    ,"out_DECOD_EXCEPTION                    ",Texception_t       ,_param->_nb_inst_decod);
    7488  ALLOC1_SC_SIGNAL(out_PREDICT_VAL                        ,"out_PREDICT_VAL                        ",Tcontrol_t         ,_param->_nb_inst_decod);
    7589  ALLOC1_SC_SIGNAL( in_PREDICT_ACK                        ," in_PREDICT_ACK                        ",Tcontrol_t         ,_param->_nb_inst_decod);
     
    89103  ALLOC_SC_SIGNAL ( in_CONTEXT_EVENT_ACK                  ," in_CONTEXT_EVENT_ACK                  ",Tcontrol_t         );
    90104  ALLOC_SC_SIGNAL (out_CONTEXT_EVENT_CONTEXT_ID           ,"out_CONTEXT_EVENT_CONTEXT_ID           ",Tcontext_t         );
     105  ALLOC_SC_SIGNAL (out_CONTEXT_EVENT_DEPTH                ,"out_CONTEXT_EVENT_DEPTH                ",Tdepth_t           );
    91106  ALLOC_SC_SIGNAL (out_CONTEXT_EVENT_TYPE                 ,"out_CONTEXT_EVENT_TYPE                 ",Tevent_type_t      );
    92107  ALLOC_SC_SIGNAL (out_CONTEXT_EVENT_IS_DELAY_SLOT        ,"out_CONTEXT_EVENT_IS_DELAY_SLOT        ",Tcontrol_t         );
     
    103118  (*(_Decod->in_NRESET))       (*(in_NRESET));
    104119
    105   INSTANCE2_SC_SIGNAL(_Decod, in_IFETCH_VAL                         ,_param->_nb_context,_param->_nb_inst_fetch[alloc_signal_it1]);
    106   INSTANCE2_SC_SIGNAL(_Decod,out_IFETCH_ACK                         ,_param->_nb_context,_param->_nb_inst_fetch[alloc_signal_it1]);
    107   INSTANCE2_SC_SIGNAL(_Decod, in_IFETCH_INSTRUCTION                 ,_param->_nb_context,_param->_nb_inst_fetch[alloc_signal_it1]);
     120  INSTANCE2_SC_SIGNAL(_Decod, in_IFETCH_VAL                         ,_param->_nb_context,_param->_nb_inst_fetch[it1]);
     121  INSTANCE2_SC_SIGNAL(_Decod,out_IFETCH_ACK                         ,_param->_nb_context,_param->_nb_inst_fetch[it1]);
     122  INSTANCE2_SC_SIGNAL(_Decod, in_IFETCH_INSTRUCTION                 ,_param->_nb_context,_param->_nb_inst_fetch[it1]);
    108123  if (_param->_have_port_context_id)
    109124  INSTANCE1_SC_SIGNAL(_Decod, in_IFETCH_CONTEXT_ID                  ,_param->_nb_context);
    110125  INSTANCE1_SC_SIGNAL(_Decod, in_IFETCH_ADDRESS                     ,_param->_nb_context);
    111126//   INSTANCE1_SC_SIGNAL(_Decod, in_IFETCH_ADDRESS_NEXT                ,_param->_nb_context);
    112   if (_param->_have_port_inst_ifetch_ptr)
    113   INSTANCE1_SC_SIGNAL(_Decod, in_IFETCH_INST_IFETCH_PTR             ,_param->_nb_context);
    114127  INSTANCE1_SC_SIGNAL(_Decod, in_IFETCH_BRANCH_STATE                ,_param->_nb_context);
    115   if (_param->_have_port_branch_update_prediction_id)
    116   INSTANCE1_SC_SIGNAL(_Decod, in_IFETCH_BRANCH_UPDATE_PREDICTION_ID ,_param->_nb_context);
     128  INSTANCE1_SC_SIGNAL(_Decod, in_IFETCH_EXCEPTION                   ,_param->_nb_context);
     129
     130  for (uint32_t i=0; i<_param->_nb_context; i++)
     131    {
     132      if (_param->_have_port_inst_ifetch_ptr)
     133        INSTANCE_SC_SIGNAL(_Decod, in_IFETCH_INST_IFETCH_PTR [i]);
     134//       if (_param->_have_port_branch_update_prediction_id)
     135      if (_param->_have_port_depth)
     136        INSTANCE_SC_SIGNAL(_Decod, in_IFETCH_BRANCH_UPDATE_PREDICTION_ID [i]);
     137    }
     138
    117139  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_VAL                          ,_param->_nb_inst_decod);
    118140  INSTANCE1_SC_SIGNAL(_Decod, in_DECOD_ACK                          ,_param->_nb_inst_decod);
     
    123145  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_TYPE                         ,_param->_nb_inst_decod);
    124146  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_OPERATION                    ,_param->_nb_inst_decod);
     147  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod);
    125148  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod);
    126149  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_ADDRESS                      ,_param->_nb_inst_decod);
     
    138161  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_NUM_REG_RE                   ,_param->_nb_inst_decod);
    139162  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_EXCEPTION_USE                ,_param->_nb_inst_decod);
     163  INSTANCE1_SC_SIGNAL(_Decod,out_DECOD_EXCEPTION                    ,_param->_nb_inst_decod);
    140164  INSTANCE1_SC_SIGNAL(_Decod,out_PREDICT_VAL                        ,_param->_nb_inst_decod);
    141165  INSTANCE1_SC_SIGNAL(_Decod, in_PREDICT_ACK                        ,_param->_nb_inst_decod);
     
    144168  INSTANCE1_SC_SIGNAL(_Decod,out_PREDICT_MATCH_INST_IFETCH_PTR      ,_param->_nb_inst_decod);
    145169  INSTANCE1_SC_SIGNAL(_Decod,out_PREDICT_BRANCH_STATE               ,_param->_nb_inst_decod);
    146   if (_param->_have_port_branch_update_prediction_id)
     170//   if (_param->_have_port_branch_update_prediction_id)
     171  if (_param->_have_port_depth)
    147172  INSTANCE1_SC_SIGNAL(_Decod,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_inst_decod);
    148173  INSTANCE1_SC_SIGNAL(_Decod,out_PREDICT_BRANCH_CONDITION           ,_param->_nb_inst_decod);
     
    153178//   INSTANCE1_SC_SIGNAL(_Decod, in_PREDICT_CAN_CONTINUE               ,_param->_nb_inst_decod);
    154179  INSTANCE1_SC_SIGNAL(_Decod, in_CONTEXT_DECOD_ENABLE               ,_param->_nb_context);
    155   if (_param->_have_port_depth)
    156   INSTANCE1_SC_SIGNAL(_Decod, in_CONTEXT_DEPTH                      ,_param->_nb_context);
     180  for (uint32_t i=0; i<_param->_nb_context; i++)
     181    if (_param->_have_port_depth)
     182      INSTANCE_SC_SIGNAL(_Decod, in_CONTEXT_DEPTH [i]);
    157183  INSTANCE_SC_SIGNAL (_Decod,out_CONTEXT_EVENT_VAL                  );
    158184  INSTANCE_SC_SIGNAL (_Decod, in_CONTEXT_EVENT_ACK                  );
    159185  if (_param->_have_port_context_id)
    160186  INSTANCE_SC_SIGNAL (_Decod,out_CONTEXT_EVENT_CONTEXT_ID           );
     187  if (_param->_have_port_depth)
     188  INSTANCE_SC_SIGNAL (_Decod,out_CONTEXT_EVENT_DEPTH                );
    161189  INSTANCE_SC_SIGNAL (_Decod,out_CONTEXT_EVENT_TYPE                 );
    162190  INSTANCE_SC_SIGNAL (_Decod,out_CONTEXT_EVENT_IS_DELAY_SLOT        );
     
    236264                      if (_param->_have_port_inst_ifetch_ptr)
    237265                      in_IFETCH_INST_IFETCH_PTR [i]->write(0);
     266                      in_IFETCH_EXCEPTION       [i]->write(EXCEPTION_IFETCH_NONE);
    238267
    239268                      // Alignement
     
    336365                    TEST(Tcontrol_t         , out_PREDICT_MATCH_INST_IFETCH_PTR       [i]->read(),((request [context].front()._address)%_param->_nb_inst_fetch[context]) == 0);
    337366                    TEST(Tbranch_state_t    , out_PREDICT_BRANCH_STATE                [i]->read(), request [context].front()._branch_state               );
    338                     if (_param->_have_port_branch_update_prediction_id)
     367//                  if (_param->_have_port_branch_update_prediction_id)
     368                    if (_param->_have_port_depth)
    339369                    TEST(Tprediction_ptr_t  , out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i]->read(), request [context].front()._branch_update_prediction_id);
    340370                    TEST(Tbranch_condition_t, out_PREDICT_BRANCH_CONDITION            [i]->read(), request [context].front()._branch_condition           );
     
    358388                    if (_param->_have_port_context_id)
    359389                    TEST(Tcontext_t     ,out_CONTEXT_EVENT_CONTEXT_ID   ->read(), context);
     390                    if (_param->_have_port_depth )
     391                    TEST(Tcontext_t     ,out_CONTEXT_EVENT_DEPTH        ->read(), request [context].front()._depth        );
    360392                    TEST(Tevent_type_t  ,out_CONTEXT_EVENT_TYPE         ->read(), request [context].front()._context_event_type);
    361393                    TEST(Tcontrol_t     ,out_CONTEXT_EVENT_IS_DELAY_SLOT->read(), request [context].front()._is_delay_slot);
     
    403435  delete []  in_IFETCH_BRANCH_STATE                ;
    404436  delete []  in_IFETCH_BRANCH_UPDATE_PREDICTION_ID ;
     437  delete []  in_IFETCH_EXCEPTION                   ;
    405438 
    406439  delete [] out_DECOD_VAL                          ;
     
    410443  delete [] out_DECOD_TYPE                         ;
    411444  delete [] out_DECOD_OPERATION                    ;
     445  delete [] out_DECOD_NO_EXECUTE                   ;
    412446  delete [] out_DECOD_IS_DELAY_SLOT                ;
    413447  delete [] out_DECOD_ADDRESS                      ;
     
    425459  delete [] out_DECOD_NUM_REG_RE                   ;
    426460  delete [] out_DECOD_EXCEPTION_USE                ;
     461  delete [] out_DECOD_EXCEPTION                    ;
    427462 
    428463  delete [] out_PREDICT_VAL                        ;
     
    445480  delete     in_CONTEXT_EVENT_ACK                  ;
    446481  delete    out_CONTEXT_EVENT_CONTEXT_ID           ;
     482  delete    out_CONTEXT_EVENT_DEPTH                ;
    447483  delete    out_CONTEXT_EVENT_TYPE                 ;
    448484  delete    out_CONTEXT_EVENT_IS_DELAY_SLOT        ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h

    r86 r88  
    1313#endif
    1414
    15 #include <iostream>
    16 #include <list>
    1715#include "Common/include/ToString.h"
    1816#include "Common/include/Debug.h"
     
    2927#endif
    3028#include "Behavioural/include/Usage.h"
     29
     30#include "Behavioural/Generic/Priority/include/Priority.h"
     31
     32#include <iostream>
     33#include <list>
    3134
    3235namespace morpheo {
     
    7578  public    : SC_IN (Tbranch_state_t    )  **  in_IFETCH_BRANCH_STATE                ;//[nb_context]
    7679  public    : SC_IN (Tprediction_ptr_t  )  **  in_IFETCH_BRANCH_UPDATE_PREDICTION_ID ;//[nb_context]
    77                                                                                      
     80  public    : SC_IN (Texception_t       )  **  in_IFETCH_EXCEPTION                   ;//[nb_context]                                                                                 
    7881    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
    7982  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_VAL                          ;//[nb_inst_decod]
     
    8386  public    : SC_OUT(Ttype_t            )  ** out_DECOD_TYPE                         ;//[nb_inst_decod]
    8487  public    : SC_OUT(Toperation_t       )  ** out_DECOD_OPERATION                    ;//[nb_inst_decod]
     88  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_NO_EXECUTE                   ;//[nb_inst_decod]
    8589  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_IS_DELAY_SLOT                ;//[nb_inst_decod]
    8690  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_ADDRESS                      ;//[nb_inst_decod]
     
    98102  public    : SC_OUT(Tspecial_address_t )  ** out_DECOD_NUM_REG_RE                   ;//[nb_inst_decod]
    99103  public    : SC_OUT(Texception_t       )  ** out_DECOD_EXCEPTION_USE                ;//[nb_inst_decod]
     104  public    : SC_OUT(Texception_t       )  ** out_DECOD_EXCEPTION                    ;//[nb_inst_decod]
    100105
    101106    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    121126  public    : SC_IN (Tcontrol_t         )   *  in_CONTEXT_EVENT_ACK                  ;
    122127  public    : SC_OUT(Tcontext_t         )   * out_CONTEXT_EVENT_CONTEXT_ID           ;
     128  public    : SC_OUT(Tdepth_t           )   * out_CONTEXT_EVENT_DEPTH                ;
    123129  public    : SC_OUT(Tevent_type_t      )   * out_CONTEXT_EVENT_TYPE                 ;
    124130  public    : SC_OUT(Tcontrol_t         )   * out_CONTEXT_EVENT_IS_DELAY_SLOT        ;
     
    127133
    128134    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     135  private   : generic::priority::Priority   * _priority;
    129136
    130137    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    131   private   : uint32_t                        reg_CONTEXT_PRIORITY;
    132138  private   : Tgeneral_data_t               * reg_CONTEXT_ADDRESS_PREVIOUS     ; //[nb_context]
    133139  private   : Tcontrol_t                    * reg_CONTEXT_IS_DELAY_SLOT        ; //[nb_context]
     
    136142  private   : Tcontrol_t                    * internal_CONTEXT_IS_DELAY_SLOT   ; //[nb_context]
    137143
     144  private   : Tcontrol_t                    * internal_DECOD_VAL               ; //[nb_inst_decod]
    138145    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    139146  private   : decod_instruction_t           * _decod_instruction;
     
    141148  private   : function_decod_t           **** _function_decod   ; //[nb_context][type][opcod]
    142149  private   : function_decod_t           **** _function_custom  ; //[nb_context][type][opcod]
    143   private   : std::list<select_t>             select;
    144150#endif
    145151
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Parameters.h

    r86 r88  
    2929  public : uint32_t          * _nb_inst_fetch                ; //[nb_context]
    3030  public : uint32_t            _nb_inst_decod                ;
    31   public : uint32_t            _size_general_data            ;
    32   public : uint32_t            _nb_branch_speculated         ;
    33   public : uint32_t            _size_branch_update_prediction;
     31//public : uint32_t            _size_general_data            ;
     32  public : uint32_t          * _nb_branch_speculated         ; //[nb_context]
     33//public : uint32_t          * _size_branch_update_prediction; //[nb_context]
    3434  public : uint32_t            _nb_context_select            ;
    3535  public : Tpriority_t         _priority                     ;
    3636  public : Tload_balancing_t   _load_balancing               ;
    3737  public : bool             ** _instruction_implemeted       ; //[nb_context][nb_instruction]
    38   public : morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (uint32_t);
     38  public : morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (void);
    3939   
    40   public : uint32_t            _max_nb_inst_fetch     ;
    41 
    42   public : uint32_t            _size_address_inst     ;
    43   public : uint32_t            _size_context_id       ;
    44   public : uint32_t            _size_depth            ;
    45   public : uint32_t            _size_inst_ifetch_ptr  ;
    46                                                      
    47   public : bool                _have_port_context_id                 ;
    48   public : bool                _have_port_depth                      ;
    49   public : bool                _have_port_branch_update_prediction_id;
    50   public : bool                _have_port_inst_ifetch_ptr            ;
     40  public : uint32_t            _max_nb_inst_fetch;
     41//public : uint32_t            _size_address_inst;
    5142
    5243    //-----[ methods ]-----------------------------------------------------------
     
    5546                        uint32_t          * nb_inst_fetch                ,
    5647                        uint32_t            nb_inst_decod                ,
     48                        uint32_t          * nb_branch_speculated         ,
     49//                      uint32_t          * size_branch_update_prediction,
     50                        uint32_t            nb_context_select            ,
    5751                        uint32_t            size_general_data            ,
    58                         uint32_t            nb_branch_speculated         ,
    59                         uint32_t            size_branch_update_prediction,
    60                         uint32_t            nb_context_select            ,
    6152                        Tpriority_t         priority                     ,
    6253                        Tload_balancing_t   load_balancing               ,
    6354                        bool             ** instruction_implemeted       ,
    64                         morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t));
     55                        morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void),
     56                        bool                is_toplevel=false
     57                        );
    6558
    6659//   public : Parameters  (Parameters & param) ;
    6760  public : ~Parameters () ;
     61
     62  public :        void            copy       (void);
    6863
    6964  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Types.h

    r81 r88  
    1919namespace decod {
    2020
    21   class select_t
    22   {
    23   public : uint32_t _context ;
    24   public : uint32_t _inst_fetch;
    25    
    26   public : select_t (uint32_t context,
    27                      uint32_t inst_fetch)
    28     {
    29       _context    = context ;
    30       _inst_fetch = inst_fetch;
    31     }
    32   };
    33 
    3421
    3522}; // end namespace decod
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod.cpp

    r81 r88  
    3838    log_printf(FUNC,Decod,FUNCTION,"Begin");
    3939
     40#if DEBUG_Decod == true
     41    log_printf(INFO,Decod,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif   
     45
    4046    log_printf(INFO,Decod,FUNCTION,"Allocation");
    4147
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    5157        log_printf(INFO,Decod,FUNCTION,"Allocation of statistics");
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
     
    6672
    6773#ifdef SYSTEMC
    68     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    6975      {
    7076        log_printf(INFO,Decod,FUNCTION,"Method - transition");
     
    95101            if (_param->_have_port_context_id)
    96102            sensitive << (*(in_IFETCH_CONTEXT_ID                  [i]));
    97             if (_param->_have_port_branch_update_prediction_id)
     103            if (_param->_have_port_depth)
    98104            sensitive << (*(in_IFETCH_BRANCH_UPDATE_PREDICTION_ID [i]));
    99105            if (_param->_have_port_depth)
     
    110116
    111117# ifdef SYSTEMCASS_SPECIFIC
     118        /*
    112119        // List dependency information
    113120
     
    162169              }
    163170
    164             if (_param->_have_port_depth)
    165               {
    166             for (uint32_t x=0; x<_param->_nb_context; x++)
    167               {
     171            for (uint32_t x=0; x<_param->_nb_context; x++)
     172              {
     173            if (_param->_have_port_depth[i])
     174              {
     175
    168176                (*(out_DECOD_DEPTH [i])) (*(in_CONTEXT_DECOD_ENABLE [x]));
    169177                (*(out_DECOD_DEPTH [i])) (*(in_CONTEXT_DEPTH        [x]));
     
    402410                if (_param->_have_port_context_id)
    403411                (*(out_PREDICT_MATCH_INST_IFETCH_PTR [i])) (*(in_IFETCH_CONTEXT_ID      [x]));
    404                 if (_param->_have_port_inst_ifetch_ptr)
     412                if (_param->_have_port_inst_ifetch_ptr[i])
    405413                (*(out_PREDICT_MATCH_INST_IFETCH_PTR [i])) (*(in_IFETCH_INST_IFETCH_PTR [x]));
    406414                for (uint32_t y=0; y<_param->_nb_inst_fetch [x]; y++)
     
    601609              }
    602610          }
    603        
     611        */
    604612# endif   
    605613       
     
    617625
    618626#ifdef STATISTICS
    619     if (_usage & USE_STATISTICS)
     627    if (usage_is_set(_usage,USE_STATISTICS))
    620628      {
    621629        statistics_deallocation();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_allocation.cpp

    r86 r88  
    11/*
    2  * $Id$
     2 * $id: Decod_allocation.cpp 86 2008-05-14 17:08:56Z rosiere $
    33 *
    44 * [ Description ]
     
    5858    // ~~~~~[ Interface : "ifetch" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5959    {
    60       ALLOC2_INTERFACE("ifetch", IN, WEST, "Instruction's bundle", _param->_nb_context, _param->_nb_inst_fetch[alloc_interface_it1]);
     60      ALLOC2_INTERFACE("ifetch", IN, WEST, "Instruction's bundle", _param->_nb_context, _param->_nb_inst_fetch[it1]);
    6161
    6262     
    63       _ALLOC2_VALACK_IN ( in_IFETCH_VAL        ,VAL, _param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1]);
    64       _ALLOC2_VALACK_OUT(out_IFETCH_ACK        ,ACK, _param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1]);
    65       _ALLOC2_SIGNAL_IN ( in_IFETCH_INSTRUCTION,"instruction", Tinstruction_t, _param->_size_instruction,_param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1]);
     63      _ALLOC2_VALACK_IN ( in_IFETCH_VAL        ,VAL, _param->_nb_context, _param->_nb_inst_fetch[it1]);
     64      _ALLOC2_VALACK_OUT(out_IFETCH_ACK        ,ACK, _param->_nb_context, _param->_nb_inst_fetch[it1]);
     65      _ALLOC2_SIGNAL_IN ( in_IFETCH_INSTRUCTION,"instruction", Tinstruction_t, _param->_size_instruction,_param->_nb_context, _param->_nb_inst_fetch[it1]);
    6666    }
    6767    {
    6868      ALLOC1_INTERFACE("ifetch", IN, WEST, "Instruction's bundle", _param->_nb_context);
    6969     
    70       ALLOC1_SIGNAL_IN (in_IFETCH_CONTEXT_ID                 ,"context_id"                 ,Tcontext_t         ,_param->_size_context_id              );
    71       ALLOC1_SIGNAL_IN (in_IFETCH_ADDRESS                    ,"address"                    ,Tgeneral_address_t ,_param->_size_address_inst            );
    72 //    ALLOC1_SIGNAL_IN (in_IFETCH_ADDRESS_NEXT               ,"address_next"               ,Tgeneral_address_t ,_param->_size_address_inst            );
    73       ALLOC1_SIGNAL_IN (in_IFETCH_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t ,_param->_size_inst_ifetch_ptr         );
    74       ALLOC1_SIGNAL_IN (in_IFETCH_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state            );
    75       ALLOC1_SIGNAL_IN (in_IFETCH_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_branch_update_prediction);
     70      ALLOC1_SIGNAL_IN (in_IFETCH_CONTEXT_ID                 ,"context_id"                 ,Tcontext_t         ,_param->_size_context_id      );
     71      ALLOC1_SIGNAL_IN (in_IFETCH_ADDRESS                    ,"address"                    ,Tgeneral_address_t ,_param->_size_instruction_address    );
     72//    ALLOC1_SIGNAL_IN (in_IFETCH_ADDRESS_NEXT               ,"address_next"               ,Tgeneral_address_t ,_param->_size_instruction_address    );
     73      ALLOC1_SIGNAL_IN (in_IFETCH_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t ,_param->_size_inst_ifetch_ptr );
     74      ALLOC1_SIGNAL_IN (in_IFETCH_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state    );
     75      ALLOC1_SIGNAL_IN (in_IFETCH_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth           );
     76      ALLOC1_SIGNAL_IN (in_IFETCH_EXCEPTION                  ,"exception"                  ,Texception_t       ,_param->_size_exception_ifetch);
    7677    }
    7778
     
    8687      ALLOC1_SIGNAL_OUT(out_DECOD_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type                  );
    8788      ALLOC1_SIGNAL_OUT(out_DECOD_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation             );
     89      ALLOC1_SIGNAL_OUT(out_DECOD_NO_EXECUTE   ,"no_execute"   ,Tcontrol_t        ,1                                   );
    8890      ALLOC1_SIGNAL_OUT(out_DECOD_IS_DELAY_SLOT,"is_delay_slot",Tcontrol_t        ,1                                   );
    89       ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS      ,"address"      ,Tgeneral_data_t   ,_param->_size_address_inst          );
     91      ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS      ,"address"      ,Tgeneral_data_t   ,_param->_size_instruction_address          );
    9092      ALLOC1_SIGNAL_OUT(out_DECOD_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t        ,1                                   );
    9193      ALLOC1_SIGNAL_OUT(out_DECOD_IMMEDIAT     ,"immediat"     ,Tgeneral_data_t   ,_param->_size_general_data          );
     
    101103      ALLOC1_SIGNAL_OUT(out_DECOD_NUM_REG_RE   ,"num_reg_re"   ,Tspecial_address_t,_param->_size_special_register_logic);
    102104      ALLOC1_SIGNAL_OUT(out_DECOD_EXCEPTION_USE,"exception_use",Texception_t      ,_param->_size_exception_use         );
     105      ALLOC1_SIGNAL_OUT(out_DECOD_EXCEPTION    ,"exception"    ,Texception_t      ,_param->_size_exception_decod       );
    103106    }
    104107
     
    109112      ALLOC1_VALACK_OUT(out_PREDICT_VAL                        ,VAL);
    110113      ALLOC1_VALACK_IN ( in_PREDICT_ACK                        ,ACK);
    111       ALLOC1_SIGNAL_OUT(out_PREDICT_CONTEXT_ID                 ,"context_id"                 ,Tcontext_t         ,_param->_size_context_id              );
    112       ALLOC1_SIGNAL_OUT(out_PREDICT_MATCH_INST_IFETCH_PTR      ,"match_inst_ifetch_ptr"      ,Tcontrol_t         ,1                                     );
    113       ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state            );
    114       ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_branch_update_prediction);
    115       ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_CONDITION           ,"branch_condition"           ,Tbranch_condition_t,_param->_size_branch_condition        );
    116 //    ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_STACK_WRITE         ,"branch_stack_write"         ,Tcontrol_t         ,1                                     );
    117       ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_DIRECTION           ,"branch_direction"           ,Tcontrol_t         ,1                                     );
    118       ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_SRC                ,"address_src"                ,Tgeneral_data_t    ,_param->_size_address_inst            );
    119       ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_DEST               ,"address_dest"               ,Tgeneral_data_t    ,_param->_size_address_inst            );
    120 //    ALLOC1_SIGNAL_IN ( in_PREDICT_CAN_CONTINUE               ,"can_continue"               ,Tcontrol_t         ,1                                     );
     114      ALLOC1_SIGNAL_OUT(out_PREDICT_CONTEXT_ID                 ,"context_id"                 ,Tcontext_t         ,_param->_size_context_id      );
     115      ALLOC1_SIGNAL_OUT(out_PREDICT_MATCH_INST_IFETCH_PTR      ,"match_inst_ifetch_ptr"      ,Tcontrol_t         ,1                             );
     116      ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state    );
     117      ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth           );
     118      ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_CONDITION           ,"branch_condition"           ,Tbranch_condition_t,_param->_size_branch_condition);
     119//    ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_STACK_WRITE         ,"branch_stack_write"         ,Tcontrol_t         ,1                             );
     120      ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_DIRECTION           ,"branch_direction"           ,Tcontrol_t         ,1                             );
     121      ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_SRC                ,"address_src"                ,Tgeneral_data_t    ,_param->_size_instruction_address    );
     122      ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_DEST               ,"address_dest"               ,Tgeneral_data_t    ,_param->_size_instruction_address    );
     123//    ALLOC1_SIGNAL_IN ( in_PREDICT_CAN_CONTINUE               ,"can_continue"               ,Tcontrol_t         ,1                             );
    121124    }
    122125   
     
    136139      ALLOC_VALACK_IN ( in_CONTEXT_EVENT_ACK          ,ACK);
    137140      ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_CONTEXT_ID   ,"context_id"   ,Tcontext_t     ,_param->_size_context_id  );
     141      ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_DEPTH        ,"depth"        ,Tdepth_t       ,_param->_size_depth       );
    138142      ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_TYPE         ,"type"         ,Tevent_type_t  ,_param->_size_event_type  );
    139143      ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_IS_DELAY_SLOT,"is_delay_slot",Tcontrol_t     ,1                         );
    140       ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_ADDRESS      ,"address"      ,Tgeneral_data_t,_param->_size_address_inst);
    141       ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_ADDRESS_EPCR ,"address_epcr" ,Tgeneral_data_t,_param->_size_address_inst);
    142     }
    143 
    144     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    145 
     144      ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_ADDRESS      ,"address"      ,Tgeneral_data_t,_param->_size_instruction_address);
     145      ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_ADDRESS_EPCR ,"address_epcr" ,Tgeneral_data_t,_param->_size_instruction_address);
     146    }
     147
     148
     149    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     150    if (usage_is_set(_usage,USE_SYSTEMC))
     151      {
    146152    reg_CONTEXT_ADDRESS_PREVIOUS      = new Tgeneral_data_t [_param->_nb_context];
    147153    reg_CONTEXT_IS_DELAY_SLOT         = new Tcontrol_t      [_param->_nb_context];
     
    150156    internal_CONTEXT_ADDRESS_PREVIOUS = new Tgeneral_data_t [_param->_nb_context];
    151157    internal_CONTEXT_IS_DELAY_SLOT    = new Tcontrol_t      [_param->_nb_context];
     158
     159#ifdef STATISTICS
     160    internal_DECOD_VAL                = new Tcontrol_t      [_param->_nb_inst_decod];
     161#endif
     162      }
     163
     164    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     165    _priority = new generic::priority::Priority (_name+"_priority"      ,
     166                                                 _param->_priority      ,
     167                                                 _param->_load_balancing,
     168                                                 _param->_nb_context    ,
     169                                                 _param->_nb_inst_fetch ,
     170                                                 _param->_nb_context_select);
    152171
    153172    const uint32_t nb_opcod_type = 14;
     
    415434//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST4   ]) _function_decod [i][ 2][OPCOD_LV_CUST4   ] = &(instruction_lv_custom);
    416435
    417         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST1    ]) _function_custom[i][ 0][OPCOD_L_CUST1    ] = _param->_get_custom_information(i)._get_custom_decod(OPERATION_CUSTOM_L_1   );
    418         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST2    ]) _function_custom[i][ 0][OPCOD_L_CUST2    ] = _param->_get_custom_information(i)._get_custom_decod(OPERATION_CUSTOM_L_2   );
    419         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST3    ]) _function_custom[i][ 0][OPCOD_L_CUST3    ] = _param->_get_custom_information(i)._get_custom_decod(OPERATION_CUSTOM_L_3   );
    420         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST4    ]) _function_custom[i][ 0][OPCOD_L_CUST4    ] = _param->_get_custom_information(i)._get_custom_decod(OPERATION_CUSTOM_L_4   );
    421         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST5    ]) _function_custom[i][ 0][OPCOD_L_CUST5    ] = _param->_get_custom_information(i)._get_custom_decod(OPERATION_CUSTOM_L_5   );
    422         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST6    ]) _function_custom[i][ 0][OPCOD_L_CUST6    ] = _param->_get_custom_information(i)._get_custom_decod(OPERATION_CUSTOM_L_6   );
    423         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST7    ]) _function_custom[i][ 0][OPCOD_L_CUST7    ] = _param->_get_custom_information(i)._get_custom_decod(OPERATION_CUSTOM_L_7   );
    424         if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST8    ]) _function_custom[i][ 0][OPCOD_L_CUST8    ] = _param->_get_custom_information(i)._get_custom_decod(OPERATION_CUSTOM_L_8   );
    425 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_D ]) _function_custom[i][ 1][OPCOD_LF_CUST1_D ] = _param->_get_custom_information(i)._get_custom_decod(OPERATION_CUSTOM_LF_1_D);
    426 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_S ]) _function_custom[i][ 1][OPCOD_LF_CUST1_S ] = _param->_get_custom_information(i)._get_custom_decod(OPERATION_CUSTOM_LF_1_S);
    427 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST1   ]) _function_custom[i][ 2][OPCOD_LV_CUST1   ] = _param->_get_custom_information(i)._get_custom_decod(OPERATION_CUSTOM_LV_1  );
    428 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST2   ]) _function_custom[i][ 2][OPCOD_LV_CUST2   ] = _param->_get_custom_information(i)._get_custom_decod(OPERATION_CUSTOM_LV_2  );
    429 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST3   ]) _function_custom[i][ 2][OPCOD_LV_CUST3   ] = _param->_get_custom_information(i)._get_custom_decod(OPERATION_CUSTOM_LV_3  );
    430 //      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST4   ]) _function_custom[i][ 2][OPCOD_LV_CUST4   ] = _param->_get_custom_information(i)._get_custom_decod(OPERATION_CUSTOM_LV_4  );
     436        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST1    ]) _function_custom[i][ 0][OPCOD_L_CUST1    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_1   );
     437        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST2    ]) _function_custom[i][ 0][OPCOD_L_CUST2    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_2   );
     438        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST3    ]) _function_custom[i][ 0][OPCOD_L_CUST3    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_3   );
     439        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST4    ]) _function_custom[i][ 0][OPCOD_L_CUST4    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_4   );
     440        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST5    ]) _function_custom[i][ 0][OPCOD_L_CUST5    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_5   );
     441        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST6    ]) _function_custom[i][ 0][OPCOD_L_CUST6    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_6   );
     442        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST7    ]) _function_custom[i][ 0][OPCOD_L_CUST7    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_7   );
     443        if (_param->_instruction_implemeted[i][INSTRUCTION_L_CUST8    ]) _function_custom[i][ 0][OPCOD_L_CUST8    ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_L_8   );
     444//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_D ]) _function_custom[i][ 1][OPCOD_LF_CUST1_D ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LF_1_D);
     445//      if (_param->_instruction_implemeted[i][INSTRUCTION_LF_CUST1_S ]) _function_custom[i][ 1][OPCOD_LF_CUST1_S ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LF_1_S);
     446//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST1   ]) _function_custom[i][ 2][OPCOD_LV_CUST1   ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_1  );
     447//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST2   ]) _function_custom[i][ 2][OPCOD_LV_CUST2   ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_2  );
     448//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST3   ]) _function_custom[i][ 2][OPCOD_LV_CUST3   ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_3  );
     449//      if (_param->_instruction_implemeted[i][INSTRUCTION_LV_CUST4   ]) _function_custom[i][ 2][OPCOD_LV_CUST4   ] = _param->_get_custom_information()._get_custom_decod(OPERATION_CUSTOM_LV_4  );
    431450      }
    432451
     
    440459
    441460#ifdef POSITION
    442     _component->generate_file();
     461    if (usage_is_set(_usage,USE_POSITION))
     462      _component->generate_file();
    443463#endif
    444464
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_deallocation.cpp

    r86 r88  
    77
    88#include "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    2728        delete    in_CLOCK ;
    2829        delete    in_NRESET;
     30     
     31        DELETE2_SIGNAL( in_IFETCH_VAL        , _param->_nb_context, _param->_nb_inst_fetch[it1],1);
     32        DELETE2_SIGNAL(out_IFETCH_ACK        , _param->_nb_context, _param->_nb_inst_fetch[it1],1);
     33        DELETE2_SIGNAL( in_IFETCH_INSTRUCTION, _param->_nb_context, _param->_nb_inst_fetch[it1],_param->_size_instruction);
     34     
     35        DELETE1_SIGNAL(in_IFETCH_CONTEXT_ID                 , _param->_nb_context,_param->_size_context_id      );
     36        DELETE1_SIGNAL(in_IFETCH_ADDRESS                    , _param->_nb_context,_param->_size_instruction_address    );
     37//      DELETE1_SIGNAL(in_IFETCH_ADDRESS_NEXT               , _param->_nb_context,_param->_size_instruction_address    );
     38        DELETE1_SIGNAL(in_IFETCH_INST_IFETCH_PTR            , _param->_nb_context,_param->_size_inst_ifetch_ptr );
     39        DELETE1_SIGNAL(in_IFETCH_BRANCH_STATE               , _param->_nb_context,_param->_size_branch_state    );
     40        DELETE1_SIGNAL(in_IFETCH_BRANCH_UPDATE_PREDICTION_ID, _param->_nb_context,_param->_size_depth           );
     41        DELETE1_SIGNAL(in_IFETCH_EXCEPTION                  , _param->_nb_context,_param->_size_exception_ifetch);
    2942
    30         delete []  in_IFETCH_VAL                         ;
    31         delete [] out_IFETCH_ACK                         ;
    32         delete []  in_IFETCH_INSTRUCTION                 ;
    33         if (_param->_have_port_context_id)
    34         delete []  in_IFETCH_CONTEXT_ID                  ;
    35         delete []  in_IFETCH_ADDRESS                     ;
    36 //      delete []  in_IFETCH_ADDRESS_NEXT                ;
    37         if (_param->_have_port_inst_ifetch_ptr)
    38         delete []  in_IFETCH_INST_IFETCH_PTR             ;
    39         delete []  in_IFETCH_BRANCH_STATE                ;
    40         if (_param->_have_port_branch_update_prediction_id)
    41         delete []  in_IFETCH_BRANCH_UPDATE_PREDICTION_ID ;
     43        DELETE1_SIGNAL(out_DECOD_VAL          ,_param->_nb_inst_decod,1);
     44        DELETE1_SIGNAL( in_DECOD_ACK          ,_param->_nb_inst_decod,1);
     45        DELETE1_SIGNAL(out_DECOD_CONTEXT_ID   ,_param->_nb_inst_decod,_param->_size_context_id            );
     46        DELETE1_SIGNAL(out_DECOD_DEPTH        ,_param->_nb_inst_decod,_param->_size_depth                 );
     47        DELETE1_SIGNAL(out_DECOD_TYPE         ,_param->_nb_inst_decod,_param->_size_type                  );
     48        DELETE1_SIGNAL(out_DECOD_OPERATION    ,_param->_nb_inst_decod,_param->_size_operation             );
     49        DELETE1_SIGNAL(out_DECOD_NO_EXECUTE   ,_param->_nb_inst_decod,1                                   );
     50        DELETE1_SIGNAL(out_DECOD_IS_DELAY_SLOT,_param->_nb_inst_decod,1                                   );
     51        DELETE1_SIGNAL(out_DECOD_ADDRESS      ,_param->_nb_inst_decod,_param->_size_instruction_address          );
     52        DELETE1_SIGNAL(out_DECOD_HAS_IMMEDIAT ,_param->_nb_inst_decod,1                                   );
     53        DELETE1_SIGNAL(out_DECOD_IMMEDIAT     ,_param->_nb_inst_decod,_param->_size_general_data          );
     54        DELETE1_SIGNAL(out_DECOD_READ_RA      ,_param->_nb_inst_decod,1                                   );
     55        DELETE1_SIGNAL(out_DECOD_NUM_REG_RA   ,_param->_nb_inst_decod,_param->_size_general_register_logic);
     56        DELETE1_SIGNAL(out_DECOD_READ_RB      ,_param->_nb_inst_decod,1                                   );
     57        DELETE1_SIGNAL(out_DECOD_NUM_REG_RB   ,_param->_nb_inst_decod,_param->_size_general_register_logic);
     58        DELETE1_SIGNAL(out_DECOD_READ_RC      ,_param->_nb_inst_decod,1                                   );
     59        DELETE1_SIGNAL(out_DECOD_NUM_REG_RC   ,_param->_nb_inst_decod,_param->_size_special_register_logic);
     60        DELETE1_SIGNAL(out_DECOD_WRITE_RD     ,_param->_nb_inst_decod,1                                   );
     61        DELETE1_SIGNAL(out_DECOD_NUM_REG_RD   ,_param->_nb_inst_decod,_param->_size_general_register_logic);
     62        DELETE1_SIGNAL(out_DECOD_WRITE_RE     ,_param->_nb_inst_decod,1                                   );
     63        DELETE1_SIGNAL(out_DECOD_NUM_REG_RE   ,_param->_nb_inst_decod,_param->_size_special_register_logic);
     64        DELETE1_SIGNAL(out_DECOD_EXCEPTION_USE,_param->_nb_inst_decod,_param->_size_exception_use         );
     65        DELETE1_SIGNAL(out_DECOD_EXCEPTION    ,_param->_nb_inst_decod,_param->_size_exception_decod       );
    4266
    43         delete [] out_DECOD_VAL                          ;
    44         delete []  in_DECOD_ACK                          ;
    45         if (_param->_have_port_context_id)
    46         delete [] out_DECOD_CONTEXT_ID                   ;
    47         if (_param->_have_port_depth)
    48         delete [] out_DECOD_DEPTH                        ;
    49         delete [] out_DECOD_TYPE                         ;
    50         delete [] out_DECOD_OPERATION                    ;
    51         delete [] out_DECOD_IS_DELAY_SLOT                ;
    52         delete [] out_DECOD_ADDRESS                      ;
    53         delete [] out_DECOD_HAS_IMMEDIAT                 ;
    54         delete [] out_DECOD_IMMEDIAT                     ;
    55         delete [] out_DECOD_READ_RA                      ;
    56         delete [] out_DECOD_NUM_REG_RA                   ;
    57         delete [] out_DECOD_READ_RB                      ;
    58         delete [] out_DECOD_NUM_REG_RB                   ;
    59         delete [] out_DECOD_READ_RC                      ;
    60         delete [] out_DECOD_NUM_REG_RC                   ;
    61         delete [] out_DECOD_WRITE_RD                     ;
    62         delete [] out_DECOD_NUM_REG_RD                   ;
    63         delete [] out_DECOD_WRITE_RE                     ;
    64         delete [] out_DECOD_NUM_REG_RE                   ;
    65         delete [] out_DECOD_EXCEPTION_USE                ;
     67        DELETE1_SIGNAL(out_PREDICT_VAL                        ,_param->_nb_inst_decod,1);
     68        DELETE1_SIGNAL( in_PREDICT_ACK                        ,_param->_nb_inst_decod,1);
     69        DELETE1_SIGNAL(out_PREDICT_CONTEXT_ID                 ,_param->_nb_inst_decod,_param->_size_context_id      );
     70        DELETE1_SIGNAL(out_PREDICT_MATCH_INST_IFETCH_PTR      ,_param->_nb_inst_decod,1                             );
     71        DELETE1_SIGNAL(out_PREDICT_BRANCH_STATE               ,_param->_nb_inst_decod,_param->_size_branch_state    );
     72        DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_inst_decod,_param->_size_depth           );
     73        DELETE1_SIGNAL(out_PREDICT_BRANCH_CONDITION           ,_param->_nb_inst_decod,_param->_size_branch_condition);
     74//      DELETE1_SIGNAL(out_PREDICT_BRANCH_STACK_WRITE         ,_param->_nb_inst_decod,1                             );
     75        DELETE1_SIGNAL(out_PREDICT_BRANCH_DIRECTION           ,_param->_nb_inst_decod,1                             );
     76        DELETE1_SIGNAL(out_PREDICT_ADDRESS_SRC                ,_param->_nb_inst_decod,_param->_size_instruction_address    );
     77        DELETE1_SIGNAL(out_PREDICT_ADDRESS_DEST               ,_param->_nb_inst_decod,_param->_size_instruction_address    );
     78//      DELETE1_SIGNAL( in_PREDICT_CAN_CONTINUE               ,_param->_nb_inst_decod,1                             );
    6679
    67         delete [] out_PREDICT_VAL                        ;
    68         delete []  in_PREDICT_ACK                        ;
    69         if (_param->_have_port_context_id)
    70         delete [] out_PREDICT_CONTEXT_ID                 ;
    71         delete [] out_PREDICT_BRANCH_STATE               ;
    72         delete [] out_PREDICT_MATCH_INST_IFETCH_PTR      ;
    73         if (_param->_have_port_branch_update_prediction_id)
    74         delete [] out_PREDICT_BRANCH_UPDATE_PREDICTION_ID;
    75         delete [] out_PREDICT_BRANCH_CONDITION           ;
    76 //      delete [] out_PREDICT_BRANCH_STACK_WRITE         ;
    77         delete [] out_PREDICT_BRANCH_DIRECTION           ;
    78         delete [] out_PREDICT_ADDRESS_SRC                ;
    79         delete [] out_PREDICT_ADDRESS_DEST               ;
    80 //      delete []  in_PREDICT_CAN_CONTINUE               ;
     80        DELETE1_SIGNAL(in_CONTEXT_DECOD_ENABLE, _param->_nb_context,1);
     81        DELETE1_SIGNAL(in_CONTEXT_DEPTH       , _param->_nb_context,_param->_size_depth);
    8182
    82         delete []  in_CONTEXT_DECOD_ENABLE               ;
    83         if (_param->_have_port_depth)
    84         delete []  in_CONTEXT_DEPTH                      ;
     83        DELETE_SIGNAL (out_CONTEXT_EVENT_VAL          ,1);
     84        DELETE_SIGNAL ( in_CONTEXT_EVENT_ACK          ,1);
     85        DELETE_SIGNAL (out_CONTEXT_EVENT_CONTEXT_ID   ,_param->_size_context_id  );
     86        DELETE_SIGNAL (out_CONTEXT_EVENT_DEPTH        ,_param->_size_depth       );
     87        DELETE_SIGNAL (out_CONTEXT_EVENT_TYPE         ,_param->_size_event_type  );
     88        DELETE_SIGNAL (out_CONTEXT_EVENT_IS_DELAY_SLOT,1                         );
     89        DELETE_SIGNAL (out_CONTEXT_EVENT_ADDRESS      ,_param->_size_instruction_address);
     90        DELETE_SIGNAL (out_CONTEXT_EVENT_ADDRESS_EPCR ,_param->_size_instruction_address);
    8591
    86         delete    out_CONTEXT_EVENT_VAL                  ;
    87         delete     in_CONTEXT_EVENT_ACK                  ;
    88         if (_param->_have_port_context_id)
    89         delete    out_CONTEXT_EVENT_CONTEXT_ID           ;
    90         delete    out_CONTEXT_EVENT_TYPE                 ;
    91         delete    out_CONTEXT_EVENT_IS_DELAY_SLOT        ;
    92         delete    out_CONTEXT_EVENT_ADDRESS              ;
    93         delete    out_CONTEXT_EVENT_ADDRESS_EPCR         ;
     92
     93   
     94        delete    reg_CONTEXT_ADDRESS_PREVIOUS      ;
     95        delete [] reg_CONTEXT_IS_DELAY_SLOT         ;
     96       
     97        delete [] internal_CONTEXT_HAVE_TRANSACTION ;
     98        delete [] internal_CONTEXT_ADDRESS_PREVIOUS ;
     99        delete [] internal_CONTEXT_IS_DELAY_SLOT    ;
     100       
     101#ifdef STATISTICS
     102        delete [] internal_DECOD_VAL;
     103#endif
    94104      }
    95105
    96106    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    97     delete    reg_CONTEXT_ADDRESS_PREVIOUS      ;
    98     delete    reg_CONTEXT_IS_DELAY_SLOT         ;
     107    delete    _priority;
    99108
    100     delete    internal_CONTEXT_HAVE_TRANSACTION ;
    101     delete    internal_CONTEXT_ADDRESS_PREVIOUS ;
    102     delete    internal_CONTEXT_IS_DELAY_SLOT    ;
    103109
    104110    const uint32_t nb_opcod_type = 14;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
    33     _interfaces->testbench();
     34    if (usage_is_set(_usage,VHDL_TESTBENCH))
     35      _interfaces->testbench();
    3436#endif
    3537
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_genMealy.cpp

    r87 r88  
    2222  void Decod::genMealy (void)
    2323  {
    24     log_printf(TRACE,Decod,FUNCTION,"Begin");
     24    log_begin(Decod,FUNCTION);
     25    log_function(Decod,FUNCTION,_name.c_str());
    2526
    2627    //-----------------------------------
     
    3839      {
    3940        decod_val   [i] = false;
     41        predict_val [i] = false;
    4042      }
    4143
     
    5759    //-----------------------------------
    5860    // scan all decod "slot_out"
    59     log_printf(TRACE,Decod,FUNCTION,"KANE LIVE");   
    60     std::list<select_t>::iterator it=select.begin();
     61    std::list<generic::priority::select_t> * select = _priority->select();
     62    std::list<generic::priority::select_t>::iterator it=select->begin();
    6163    for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    6264      {
    63         while ((it != select.end())     and  // have a no scanned "slot_in" ?
     65        while ((it != select->end())    and  // have a no scanned "slot_in" ?
    6466               (decod_val [i] == false) and  // have not a previous selected entry?
    6567               (context_event_val == false)) // Have not a context_event (spr_access, exception, ...)
    6668          {
    67             log_printf(TRACE,Decod,FUNCTION,"loop");   
    68 
    6969            predict_val [i] = false;
    7070
    71             Tcontext_t x = it->_context ;
    72             uint32_t   y = it->_inst_fetch;
     71            Tcontext_t x = it->grp;
     72            uint32_t   y = it->elt;
    7373
    7474            // Test if this instruction is valid
     
    7676                (can_continue [x]                == 1))    // context can decod instruction (have not a previous event)
    7777              {
    78                 can_continue      [x] = can_continue_next [x];
     78                log_printf(TRACE,Decod,FUNCTION,"  * IFETCH [%d][%d]",x,y);   
     79
     80                can_continue [x] = can_continue_next [x];
    7981
    8082                decod_val  [i]    = true;                        // fetch_val and decod_enable
     
    9092                _decod_instruction->_is_delay_slot    = internal_CONTEXT_IS_DELAY_SLOT [x];
    9193
    92                 // Decod !
    93                 log_printf(TRACE,Decod,FUNCTION,"DECOD [%d]",i);
    94                 log_printf(TRACE,Decod,FUNCTION,"  * context       : %d",x);
    95                 log_printf(TRACE,Decod,FUNCTION,"  * fetch         : %d",y);
    96                 log_printf(TRACE,Decod,FUNCTION,"  * address       : %.8x",addr);
    97                 log_printf(TRACE,Decod,FUNCTION,"  * is_delay_slot : %d",internal_CONTEXT_IS_DELAY_SLOT [x]);
    98 
    99                 instruction_decod (_decod_instruction, _decod_param[x]);
    100 
    101                 Ttype_t type = _decod_instruction->_type;
     94                // Test IFetch exception
     95                Texception_t ifetch_exception = PORT_READ(in_IFETCH_EXCEPTION [x]);
     96
     97                if (ifetch_exception == EXCEPTION_IFETCH_NONE)
     98                  {
     99                    // Decod !
     100                    log_printf(TRACE,Decod,FUNCTION,"  * DECOD [%d]",i);
     101                    log_printf(TRACE,Decod,FUNCTION,"    * context       : %d",x);
     102                    log_printf(TRACE,Decod,FUNCTION,"    * fetch         : %d",y);
     103                    log_printf(TRACE,Decod,FUNCTION,"    * address       : %.8x (%.8x)",addr,(addr<<2));
     104                    log_printf(TRACE,Decod,FUNCTION,"    * is_delay_slot : %d",internal_CONTEXT_IS_DELAY_SLOT [x]);
     105                   
     106                    instruction_decod (_decod_instruction, _decod_param[x]);
     107                  }
     108                else
     109                  {
     110                    // No decod : nop
     111                    instruction_l_nop (_decod_instruction, _decod_param[x]);
     112
     113                    _decod_instruction->_exception_use = EXCEPTION_USE_NONE;
     114                    _decod_instruction->_exception     = exception_ifetch_to_exception_decod(ifetch_exception);
     115                   
     116                    // INSTRUCTION_TLB 
     117                    // INSTRUCTION_PAGE
     118                    // BUS_ERROR       
     119                    if (_decod_instruction->_is_delay_slot)
     120                      _decod_instruction->_address_next       = _decod_instruction->_address_previous;
     121                    else
     122                      _decod_instruction->_address_next       = _decod_instruction->_address;
     123                   
     124                    _decod_instruction->_event_type         = EVENT_TYPE_EXCEPTION;
     125                  }
     126
     127                Ttype_t  type  = _decod_instruction->_type;
     128                Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_CONTEXT_DEPTH [x]):0; // DEPTH_CURRENT
    102129
    103130                if (_param->_have_port_context_id)
    104131                PORT_WRITE(out_DECOD_CONTEXT_ID    [i], x);
    105132                if (_param->_have_port_depth)
    106                 PORT_WRITE(out_DECOD_DEPTH         [i], PORT_READ(in_CONTEXT_DEPTH [x]));
     133                PORT_WRITE(out_DECOD_DEPTH         [i], depth);
    107134                PORT_WRITE(out_DECOD_TYPE          [i], type);
    108135                PORT_WRITE(out_DECOD_OPERATION     [i], _decod_instruction->_operation     );
     136                PORT_WRITE(out_DECOD_NO_EXECUTE    [i], _decod_instruction->_no_execute    );
    109137                PORT_WRITE(out_DECOD_IS_DELAY_SLOT [i], _decod_instruction->_is_delay_slot );
    110138                PORT_WRITE(out_DECOD_ADDRESS       [i], addr);
     
    122150                PORT_WRITE(out_DECOD_NUM_REG_RE    [i], _decod_instruction->_num_reg_re    );
    123151                PORT_WRITE(out_DECOD_EXCEPTION_USE [i], _decod_instruction->_exception_use );
     152//              PORT_WRITE(out_DECOD_EXCEPTION     [i], _decod_instruction->_exception     );
    124153
    125154                if (type == TYPE_BRANCH)
    126155                  {
    127                     log_printf(TRACE,Decod,FUNCTION,"  * type is branch");
     156                    log_printf(TRACE,Decod,FUNCTION,"    * type is branch");
     157                    log_printf(TRACE,Decod,FUNCTION,"      * address src  : %.8x (%.8x)",_decod_instruction->_address     ,_decod_instruction->_address     <<2);
     158                    log_printf(TRACE,Decod,FUNCTION,"      * address dest : %.8x (%.8x)",_decod_instruction->_address_next,_decod_instruction->_address_next<<2);
    128159
    129160                    predict_val [i]     = ifetch_ack  [x][y] // and decod_val [i]
     
    136167                    PORT_WRITE(out_PREDICT_MATCH_INST_IFETCH_PTR       [i],y == ((_param->_have_port_inst_ifetch_ptr)?PORT_READ(in_IFETCH_INST_IFETCH_PTR [x]):0));
    137168                    PORT_WRITE(out_PREDICT_BRANCH_STATE                [i],PORT_READ(in_IFETCH_BRANCH_STATE                [x]));
    138                     if (_param->_have_port_branch_update_prediction_id)
    139                     PORT_WRITE(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i],PORT_READ(in_IFETCH_BRANCH_UPDATE_PREDICTION_ID [x]));
     169                    if (_param->_have_port_depth)
     170                    PORT_WRITE(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i],PORT_READ(in_IFETCH_BRANCH_UPDATE_PREDICTION_ID [x]));
    140171                    PORT_WRITE(out_PREDICT_BRANCH_CONDITION            [i],_decod_instruction->_branch_condition  );
    141172//                  PORT_WRITE(out_PREDICT_BRANCH_STACK_WRITE          [i],_decod_instruction->_branch_stack_write);
     
    145176               
    146177                    //can_continue_next [x] = PORT_READ(in_PREDICT_CAN_CONTINUE [i]); // can continue is set if direction is "not take" (also, continue is sequential order)
    147                     can_continue_next [x] = false; // one branch per context
     178                    can_continue_next [x] = false; // one branch per context, the DS don't execute
    148179                  }
    149180
     
    160191                    if (_param->_have_port_context_id)
    161192                    PORT_WRITE(out_CONTEXT_EVENT_CONTEXT_ID   , x);
     193                    if (_param->_have_port_depth)
     194                    PORT_WRITE(out_CONTEXT_EVENT_DEPTH        , depth);
    162195                    PORT_WRITE(out_CONTEXT_EVENT_TYPE         , _decod_instruction->_event_type    );
    163196                    PORT_WRITE(out_CONTEXT_EVENT_IS_DELAY_SLOT, _decod_instruction->_is_delay_slot );
     
    184217              }
    185218
    186             log_printf(TRACE,Decod,FUNCTION,"  - num_(decod, context, fetch) : %d %d %d",i, x, y);
    187             log_printf(TRACE,Decod,FUNCTION,"    - ifetch_ack        : %d",ifetch_ack  [x][y]);
    188             log_printf(TRACE,Decod,FUNCTION,"    - context_event_val : %d",context_event_val );
    189             log_printf(TRACE,Decod,FUNCTION,"    - predict_val       : %d",predict_val [i]   );
    190             log_printf(TRACE,Decod,FUNCTION,"    - decod_val         : %d",decod_val   [i]   );
     219            log_printf(TRACE,Decod,FUNCTION,"    - num_(decod, context, fetch) : %d %d %d",i, x, y);
     220            log_printf(TRACE,Decod,FUNCTION,"      - ifetch_ack        : %d",ifetch_ack  [x][y]);
     221            log_printf(TRACE,Decod,FUNCTION,"      - context_event_val : %d",context_event_val );
     222            log_printf(TRACE,Decod,FUNCTION,"      - predict_val       : %d",predict_val [i]   );
     223            log_printf(TRACE,Decod,FUNCTION,"      - decod_val         : %d",decod_val   [i]   );
    191224           
    192225            it ++;
     
    207240        PORT_WRITE(out_PREDICT_VAL [i], predict_val [i]);
    208241        PORT_WRITE(out_DECOD_VAL   [i], decod_val   [i]);
    209       }
    210 
    211     log_printf(FUNC,Decod,FUNCTION,"End");
     242       
     243#ifdef STATISTICS
     244        internal_DECOD_VAL [i] = decod_val [i];
     245#endif
     246      }
     247
     248    log_end(Decod,FUNCTION);
    212249  };
    213250
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_statistics_allocation.cpp

    r81 r88  
    2727                      "Decod",
    2828                      param_statistics);
    29    
    30     _stat_sum_inst_decod = _stat->create_variable ("sum_inst_decod" // ,"", "Sum of decod instruction"
    31                                                    );
    3229
     30    _stat_sum_inst_decod = _stat->create_variable("sum_inst_decod");
     31   
     32   
     33    _stat->create_expr_average_by_cycle ("average_nb_inst_decod","sum_inst_decod","","Average of decod instruction by cycle");
     34    _stat->create_expr_percent          ("percent_nb_inst_decod","average_nb_inst_decod", toString(_param->_nb_inst_decod), "Percent of decod instruction by cycle");
     35 
    3336
    34     _stat->create_expr_average_by_cycle ("average_sum_inst_decod","sum_inst_decod","","Average of decod instruction by cycle");
    35     _stat->create_expr_percent          ("percent_sum_inst_decod","average_sum_inst_decod", toString(_param->_nb_inst_decod), "Percent of decod instruction by cycle");
    3637 
    3738    log_printf(FUNC,Decod,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_transition.cpp

    r87 r88  
    2222  void Decod::transition (void)
    2323  {
    24     log_printf(FUNC,Decod,FUNCTION,"Begin");
     24    log_begin(Decod,FUNCTION);
    2525
    2626    if (PORT_READ(in_NRESET) == 0)
    2727      {
    28         reg_CONTEXT_PRIORITY = 0;
     28        _priority->reset();
    2929
    3030        for (uint32_t i=0; i<_param->_nb_context; i++)
     
    3636    else
    3737      {
    38         switch (_param->_priority)
    39           {
    40 //        case PRIORITY_STATIC :
    41 //          {
    42 //            reg_CONTEXT_PRIORITY = (reg_CONTEXT_PRIORITY+_param->_nb_context_select)%_param->_nb_context;
    43 //            break;
    44 //          }
    45           case PRIORITY_ROUND_ROBIN :
    46             {
    47               reg_CONTEXT_PRIORITY = (reg_CONTEXT_PRIORITY+1                         )%_param->_nb_context;
    48               break;
    49             }
    50           default:
    51             {
    52               break;
    53             }
    54           }
    55 
    56         // flush list
    57         select.clear();
    58        
    59         // Compute next scan order !!!
    60         switch (_param->_load_balancing)
    61           {
    62 //        case LOAD_BALANCING_BALANCE :
    63 //          {
    64 //            for (uint32_t j=0; j<_param->_max_nb_inst_fetch; j++)
    65 //              for (uint32_t i=0; i<_param->_nb_context_select; i++)
    66 //                {
    67 //                  uint32_t x=(reg_CONTEXT_PRIORITY+i)%_param->_nb_context;
    68                    
    69 //                  // Test valid inst_fetch
    70 //                  if (j < _param->_nb_inst_fetch[x])
    71 //                    select.push_back(select_t(x,j));
    72 //                }
    73                  
    74 //            break;
    75 //          }
    76           case LOAD_BALANCING_MAXIMUM_FOR_PRIORITY :
    77             {
    78 
    79               for (uint32_t i=0; i<_param->_nb_context_select; i++)
    80                 {
    81                   uint32_t x=(reg_CONTEXT_PRIORITY+i)%_param->_nb_context;
    82                  
    83                   for (uint32_t j=0; j<_param->_nb_inst_fetch[x]; j++)
    84                     select.push_back(select_t(x,j));
    85                 }
    86 
    87               break;
    88             }
    89           default :
    90             {
    91               break;
    92             }
    93           }
     38        _priority->transition();
    9439
    9540        // Compute "next previous" address
     
    9742          if (internal_CONTEXT_HAVE_TRANSACTION[i])
    9843            {
    99 #ifdef STATISTICS
    100               (*_stat_sum_inst_decod) ++;
    101 #endif
    102 
    10344              reg_CONTEXT_ADDRESS_PREVIOUS [i] = internal_CONTEXT_ADDRESS_PREVIOUS [i];
    10445              reg_CONTEXT_IS_DELAY_SLOT    [i] = internal_CONTEXT_IS_DELAY_SLOT    [i];
     
    10748//      for (uint32_t i=0; i<_param->_nb_context; i++)
    10849//        log_printf(TRACE,Decod,FUNCTION,"[%d] %.8x %d",i,reg_CONTEXT_ADDRESS_PREVIOUS [i], reg_CONTEXT_IS_DELAY_SLOT [i]);
     50
     51#ifdef STATISTICS
     52        if (usage_is_set(_usage,USE_STATISTICS))
     53          for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
     54            if (internal_DECOD_VAL [i] and PORT_READ(in_DECOD_ACK[i]))
     55              (*_stat_sum_inst_decod) ++;
     56#endif
    10957      }
    11058
     
    11361#endif
    11462
    115     log_printf(FUNC,Decod,FUNCTION,"End");
     63    log_end(Decod,FUNCTION);
    11664  };
    11765
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Parameters.cpp

    r87 r88  
    11/*
    2 
    32 * $Id$
    43 *
     
    2423                          uint32_t          * nb_inst_fetch                ,
    2524                          uint32_t            nb_inst_decod                ,
    26                           uint32_t            nb_branch_speculated         ,
    27                           uint32_t            size_branch_update_prediction,
     25                          uint32_t          * nb_branch_speculated         ,
     26//                        uint32_t          * size_branch_update_prediction,
    2827                          uint32_t            nb_context_select            ,
    2928                          uint32_t            size_general_data            ,
     
    3130                          Tload_balancing_t   load_balancing               ,
    3231                          bool             ** instruction_implemeted       ,
    33                           morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t))
     32                          morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void),
     33                          bool                is_toplevel
     34                          )
    3435  {
    3536    log_printf(FUNC,Decod,FUNCTION,"Begin");
     
    4041    _nb_branch_speculated          = nb_branch_speculated         ;
    4142    _nb_context_select             = nb_context_select            ;
    42     _size_branch_update_prediction = size_branch_update_prediction;
    43     _size_general_data             = size_general_data            ;
     43//  _size_branch_update_prediction = size_branch_update_prediction;
     44//  _size_general_data             = size_general_data            ;
    4445    _priority                      = priority                     ;
    4546    _load_balancing                = load_balancing               ;
     
    5253
    5354   
    54     _max_nb_inst_fetch                     = max<uint32_t>(nb_inst_fetch,nb_context);
     55    _max_nb_inst_fetch                        = max<uint32_t>(nb_inst_fetch,nb_context);
     56                                             
     57//  _size_address_inst                        = size_general_data-2;
    5558
    56     _size_address_inst                     = size_general_data-2;
    57     _size_context_id                       = log2(nb_context          );
    58     _size_depth                            = log2(nb_branch_speculated);
    59     _size_inst_ifetch_ptr                  = log2(_max_nb_inst_fetch  );
     59    test();
    6060
    61     _have_port_context_id                  = _size_context_id > 0;
    62     _have_port_depth                       = _size_depth      > 0;
    63     _have_port_branch_update_prediction_id = _size_branch_update_prediction > 0;
    64     _have_port_inst_ifetch_ptr             = _size_inst_ifetch_ptr > 0;
    65    
    66     test();
     61    if (is_toplevel)
     62      {
     63        _size_context_id                      = log2(nb_context          );
     64        _size_depth                           = log2(max<uint32_t>(_nb_branch_speculated,_nb_context));
     65//      _size_branch_update_prediction_id     = max<uint32_t>(_size_branch_update_prediction,_nb_context);
     66        _size_inst_ifetch_ptr                 = log2(_max_nb_inst_fetch  );
     67        _size_instruction_address             = size_general_data-2;
     68        _size_general_data                    = size_general_data;
     69
     70        _have_port_context_id                 = _size_context_id > 0;
     71        _have_port_depth                      = _size_depth                       > 0;
     72//      _have_port_branch_update_prediction_id= _size_branch_update_prediction_id > 0;
     73        _have_port_inst_ifetch_ptr            = _size_inst_ifetch_ptr             > 0;
     74
     75        copy ();
     76      }
     77
    6778    log_printf(FUNC,Decod,FUNCTION,"End");
    6879  };
     
    8293  {
    8394    log_printf(FUNC,Decod,FUNCTION,"Begin");
     95
     96    log_printf(FUNC,Decod,FUNCTION,"End");
     97  };
     98
     99#undef  FUNCTION
     100#define FUNCTION "Decod::copy"
     101  void Parameters::copy (void)
     102  {
     103    log_printf(FUNC,Decod,FUNCTION,"Begin");
     104
    84105    log_printf(FUNC,Decod,FUNCTION,"End");
    85106  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Parameters_msg_error.cpp

    r87 r88  
    3131      test.error(_("nb_inst_decod must be > 0.\n"));
    3232
    33     if ((_size_general_data != 32) and
    34         (_size_general_data != 64))
    35       test.error(_("size_general_data must be equal at 32 or 64 bits.\n"));
     33//  if ((_size_general_data != 32) and
     34//      (_size_general_data != 64))
     35//    test.error(_("size_general_data must be equal at 32 or 64 bits.\n"));
    3636
    37     if ((_nb_branch_speculated == 0) or
    38         (_nb_branch_speculated > _nb_context))
    39       test.error(_("nb_branch_speculated must be in [1:nb_context].\n"));
     37//     if ((_nb_branch_speculated == 0) or
     38//      (_nb_branch_speculated > _nb_context))
     39//       test.error(_("nb_branch_speculated must be in [1:nb_context].\n"));
    4040
    4141    if ((_nb_context_select == 0) or
     
    4848
    4949    if (sum_inst_fetch < _nb_inst_decod)
    50       test.error(_("The sum of the _nb_context_select most nb_inst_fetch must be greater that _nb_inst_decod"));
     50      test.error(_("The sum of the _nb_context_select most nb_inst_fetch must be greater that _nb_inst_decod\n"));
    5151
    5252    if ((_priority != PRIORITY_ROUND_ROBIN))
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Parameters_print.cpp

    r81 r88  
    3030    xml.singleton_begin("nb_inst_decod                "); xml.attribut("value",toString(_nb_inst_decod                )); xml.singleton_end();
    3131    xml.singleton_begin("nb_branch_speculated         "); xml.attribut("value",toString(_nb_branch_speculated         )); xml.singleton_end();
    32     xml.singleton_begin("size_branch_update_prediction"); xml.attribut("value",toString(_size_branch_update_prediction)); xml.singleton_end();
     32//  xml.singleton_begin("size_branch_update_prediction"); xml.attribut("value",toString(_size_branch_update_prediction)); xml.singleton_end();
    3333    xml.singleton_begin("nb_context_select            "); xml.attribut("value",toString(_nb_context_select            )); xml.singleton_end();
    3434    xml.singleton_begin("size_general_data            "); xml.attribut("value",toString(_size_general_data            )); xml.singleton_end();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/Makefile

    r82 r88  
    2424library_clean                   : Decod_queue_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/main.cpp

    r82 r88  
    5555         _size_queue       ,
    5656         _size_general_data,
    57          _nb_branch_speculated);
     57         _nb_branch_speculated,
     58         true // is_toplevel
     59         );
    5860     
    5961      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/test.cpp

    r82 r88  
    5858  ALLOC1_SC_SIGNAL( in_DECOD_IN_TYPE           ," in_DECOD_IN_TYPE          ",Ttype_t            ,_param->_nb_inst_decod);
    5959  ALLOC1_SC_SIGNAL( in_DECOD_IN_OPERATION      ," in_DECOD_IN_OPERATION     ",Toperation_t       ,_param->_nb_inst_decod);
     60  ALLOC1_SC_SIGNAL( in_DECOD_IN_NO_EXECUTE     ," in_DECOD_IN_NO_EXECUTE    ",Tcontrol_t         ,_param->_nb_inst_decod);
    6061  ALLOC1_SC_SIGNAL( in_DECOD_IN_IS_DELAY_SLOT  ," in_DECOD_IN_IS_DELAY_SLOT ",Tcontrol_t         ,_param->_nb_inst_decod);
    6162  ALLOC1_SC_SIGNAL( in_DECOD_IN_ADDRESS        ," in_DECOD_IN_ADDRESS       ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     
    7374  ALLOC1_SC_SIGNAL( in_DECOD_IN_NUM_REG_RE     ," in_DECOD_IN_NUM_REG_RE    ",Tspecial_address_t ,_param->_nb_inst_decod);
    7475  ALLOC1_SC_SIGNAL( in_DECOD_IN_EXCEPTION_USE  ," in_DECOD_IN_EXCEPTION_USE ",Texception_t       ,_param->_nb_inst_decod);
     76  ALLOC1_SC_SIGNAL( in_DECOD_IN_EXCEPTION      ," in_DECOD_IN_EXCEPTION     ",Texception_t       ,_param->_nb_inst_decod);
    7577                                                                                                 
    7678  ALLOC1_SC_SIGNAL(out_DECOD_OUT_VAL           ,"out_DECOD_OUT_VAL          ",Tcontrol_t         ,_param->_nb_inst_decod);
     
    8082  ALLOC1_SC_SIGNAL(out_DECOD_OUT_TYPE          ,"out_DECOD_OUT_TYPE         ",Ttype_t            ,_param->_nb_inst_decod);
    8183  ALLOC1_SC_SIGNAL(out_DECOD_OUT_OPERATION     ,"out_DECOD_OUT_OPERATION    ",Toperation_t       ,_param->_nb_inst_decod);
     84  ALLOC1_SC_SIGNAL(out_DECOD_OUT_NO_EXECUTE    ,"out_DECOD_OUT_NO_EXECUTE   ",Tcontrol_t         ,_param->_nb_inst_decod);
    8285  ALLOC1_SC_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,"out_DECOD_OUT_IS_DELAY_SLOT",Tcontrol_t         ,_param->_nb_inst_decod);
    8386  ALLOC1_SC_SIGNAL(out_DECOD_OUT_ADDRESS       ,"out_DECOD_OUT_ADDRESS      ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     
    9598  ALLOC1_SC_SIGNAL(out_DECOD_OUT_NUM_REG_RE    ,"out_DECOD_OUT_NUM_REG_RE   ",Tspecial_address_t ,_param->_nb_inst_decod);
    9699  ALLOC1_SC_SIGNAL(out_DECOD_OUT_EXCEPTION_USE ,"out_DECOD_OUT_EXCEPTION_USE",Texception_t       ,_param->_nb_inst_decod);
     100  ALLOC1_SC_SIGNAL(out_DECOD_OUT_EXCEPTION     ,"out_DECOD_OUT_EXCEPTION    ",Texception_t       ,_param->_nb_inst_decod);
    97101                                                                                                 
    98   ALLOC1_SC_SIGNAL( in_DEPTH_TAIL              ," in_DEPTH_TAIL             ",Tdepth_t           ,_param->_nb_context);
    99   ALLOC1_SC_SIGNAL( in_DEPTH_NB_BRANCH         ," in_DEPTH_NB_BRANCH        ",Tdepth_t           ,_param->_nb_context);
     102  ALLOC1_SC_SIGNAL( in_DEPTH_MIN               ," in_DEPTH_MIN              ",Tdepth_t           ,_param->_nb_context);
     103  ALLOC1_SC_SIGNAL( in_DEPTH_MAX               ," in_DEPTH_MAX              ",Tdepth_t           ,_param->_nb_context);
    100104
    101105  ALLOC1_SC_SIGNAL(out_NB_INST_ALL             ,"out_NB_INST_ALL            ",Tcounter_t         ,_param->_nb_context);
     
    118122  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_TYPE           ,_param->_nb_inst_decod);
    119123  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_OPERATION      ,_param->_nb_inst_decod);
     124  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_NO_EXECUTE     ,_param->_nb_inst_decod);
    120125  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_IS_DELAY_SLOT  ,_param->_nb_inst_decod);
    121126  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_ADDRESS        ,_param->_nb_inst_decod);
     
    133138  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_NUM_REG_RE     ,_param->_nb_inst_decod);
    134139  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_EXCEPTION_USE  ,_param->_nb_inst_decod);
    135  
     140  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_IN_EXCEPTION      ,_param->_nb_inst_decod);
     141
    136142  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_VAL           ,_param->_nb_inst_decod);
    137143  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DECOD_OUT_ACK           ,_param->_nb_inst_decod);
     
    142148  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_TYPE          ,_param->_nb_inst_decod);
    143149  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_OPERATION     ,_param->_nb_inst_decod);
     150  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_NO_EXECUTE    ,_param->_nb_inst_decod);
    144151  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod);
    145152  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_ADDRESS       ,_param->_nb_inst_decod);
     
    157164  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_NUM_REG_RE    ,_param->_nb_inst_decod);
    158165  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_EXCEPTION_USE ,_param->_nb_inst_decod);
    159  
    160   if (_param->_have_port_depth)
    161     {
    162   INSTANCE1_SC_SIGNAL(_Decod_queue, in_DEPTH_TAIL              ,_param->_nb_context);
    163   INSTANCE1_SC_SIGNAL(_Decod_queue, in_DEPTH_NB_BRANCH         ,_param->_nb_context);
    164     }
     166  INSTANCE1_SC_SIGNAL(_Decod_queue,out_DECOD_OUT_EXCEPTION     ,_param->_nb_inst_decod);
     167
     168  for (uint32_t i=0; i<_param->_nb_context; ++i)
     169    if (_param->_have_port_depth)
     170      INSTANCE_SC_SIGNAL(_Decod_queue, in_DEPTH_MIN  [i]);
     171  INSTANCE1_SC_SIGNAL(_Decod_queue, in_DEPTH_MAX               ,_param->_nb_context);
    165172 
    166173  INSTANCE1_SC_SIGNAL(_Decod_queue,out_NB_INST_ALL             ,_param->_nb_context);
     
    293300  DELETE1_SC_SIGNAL( in_DECOD_IN_TYPE           ,_param->_nb_inst_decod);
    294301  DELETE1_SC_SIGNAL( in_DECOD_IN_OPERATION      ,_param->_nb_inst_decod);
     302  DELETE1_SC_SIGNAL( in_DECOD_IN_NO_EXECUTE     ,_param->_nb_inst_decod);
    295303  DELETE1_SC_SIGNAL( in_DECOD_IN_IS_DELAY_SLOT  ,_param->_nb_inst_decod);
    296304  DELETE1_SC_SIGNAL( in_DECOD_IN_ADDRESS        ,_param->_nb_inst_decod);
     
    308316  DELETE1_SC_SIGNAL( in_DECOD_IN_NUM_REG_RE     ,_param->_nb_inst_decod);
    309317  DELETE1_SC_SIGNAL( in_DECOD_IN_EXCEPTION_USE  ,_param->_nb_inst_decod);
     318  DELETE1_SC_SIGNAL( in_DECOD_IN_EXCEPTION      ,_param->_nb_inst_decod);
    310319
    311320  DELETE1_SC_SIGNAL(out_DECOD_OUT_VAL           ,_param->_nb_inst_decod);
     
    315324  DELETE1_SC_SIGNAL(out_DECOD_OUT_TYPE          ,_param->_nb_inst_decod);
    316325  DELETE1_SC_SIGNAL(out_DECOD_OUT_OPERATION     ,_param->_nb_inst_decod);
     326  DELETE1_SC_SIGNAL(out_DECOD_OUT_NO_EXECUTE    ,_param->_nb_inst_decod);
    317327  DELETE1_SC_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod);
    318328  DELETE1_SC_SIGNAL(out_DECOD_OUT_ADDRESS       ,_param->_nb_inst_decod);
     
    330340  DELETE1_SC_SIGNAL(out_DECOD_OUT_NUM_REG_RE    ,_param->_nb_inst_decod);
    331341  DELETE1_SC_SIGNAL(out_DECOD_OUT_EXCEPTION_USE ,_param->_nb_inst_decod);
    332 
    333   DELETE1_SC_SIGNAL( in_DEPTH_TAIL              ,_param->_nb_context);
    334   DELETE1_SC_SIGNAL( in_DEPTH_NB_BRANCH         ,_param->_nb_context);
     342  DELETE1_SC_SIGNAL(out_DECOD_OUT_EXCEPTION     ,_param->_nb_inst_decod);
     343
     344  DELETE1_SC_SIGNAL( in_DEPTH_MIN               ,_param->_nb_context);
     345  DELETE1_SC_SIGNAL( in_DEPTH_MAX               ,_param->_nb_context);
    335346
    336347  DELETE1_SC_SIGNAL(out_NB_INST_ALL             ,_param->_nb_context);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Decod_queue.h

    r82 r88  
    5454  public    : Stat                           * _stat;
    5555  private   : counter_t                     ** _stat_nb_inst;
     56  private   : counter_t                      * _stat_use_queue;
    5657#endif
    5758
     
    7273  public    : SC_IN (Ttype_t            )  **  in_DECOD_IN_TYPE           ;//[nb_inst_decod]
    7374  public    : SC_IN (Toperation_t       )  **  in_DECOD_IN_OPERATION      ;//[nb_inst_decod]
     75  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_IN_NO_EXECUTE     ;//[nb_inst_decod]
    7476  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_IN_IS_DELAY_SLOT  ;//[nb_inst_decod]
    7577  public    : SC_IN (Tgeneral_data_t    )  **  in_DECOD_IN_ADDRESS        ;//[nb_inst_decod]
     
    8789  public    : SC_IN (Tspecial_address_t )  **  in_DECOD_IN_NUM_REG_RE     ;//[nb_inst_decod]
    8890  public    : SC_IN (Texception_t       )  **  in_DECOD_IN_EXCEPTION_USE  ;//[nb_inst_decod]
     91  public    : SC_IN (Texception_t       )  **  in_DECOD_IN_EXCEPTION      ;//[nb_inst_decod]
    8992
    9093    // ~~~~~[ Interface : "decod_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    9598  public    : SC_OUT(Ttype_t            )  ** out_DECOD_OUT_TYPE          ;//[nb_inst_decod]
    9699  public    : SC_OUT(Toperation_t       )  ** out_DECOD_OUT_OPERATION     ;//[nb_inst_decod]
     100  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_OUT_NO_EXECUTE    ;//[nb_inst_decod]
    97101  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_OUT_IS_DELAY_SLOT ;//[nb_inst_decod]
    98102  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_OUT_ADDRESS       ;//[nb_inst_decod]
     
    110114  public    : SC_OUT(Tspecial_address_t )  ** out_DECOD_OUT_NUM_REG_RE    ;//[nb_inst_decod]
    111115  public    : SC_OUT(Texception_t       )  ** out_DECOD_OUT_EXCEPTION_USE ;//[nb_inst_decod]
     116  public    : SC_OUT(Texception_t       )  ** out_DECOD_OUT_EXCEPTION     ;//[nb_inst_decod]
    112117
    113118    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    114   public    : SC_IN (Tdepth_t           )  **  in_DEPTH_TAIL              ;//[nb_context]
    115   public    : SC_IN (Tdepth_t           )  **  in_DEPTH_NB_BRANCH         ;//[nb_context]
     119  public    : SC_IN (Tdepth_t           )  **  in_DEPTH_MIN               ;//[nb_context]
     120  public    : SC_IN (Tdepth_t           )  **  in_DEPTH_MAX               ;//[nb_context]
    116121
    117122    // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Parameters.h

    r82 r88  
    2727  public : uint32_t            _nb_inst_decod        ;
    2828  public : uint32_t            _size_queue           ;
    29   public : uint32_t            _size_general_data    ;
     29//public : uint32_t            _size_general_data    ;
    3030  public : uint32_t          * _nb_branch_speculated ; //[nb_context]
    3131
    3232  public : uint32_t            _nb_bank              ;
    3333  public : uint32_t            _size_bank            ;
    34                                                      
    35   public : uint32_t            _size_context_id      ;
    36   public : uint32_t            _size_depth           ;
    37   public : uint32_t            _size_nb_inst         ;
    38                                                      
    39   public : bool                _have_port_context_id ;
    40   public : bool                _have_port_depth      ;
    4134
    4235    //-----[ methods ]-----------------------------------------------------------
     
    4538                        uint32_t   size_queue          ,
    4639                        uint32_t   size_general_data   ,
    47                         uint32_t * nb_branch_speculated);
     40                        uint32_t * nb_branch_speculated,
     41                        bool       is_toplevel=false   );
    4842//   public : Parameters  (Parameters & param) ;
    4943  public : ~Parameters () ;
     44
     45  public :        void            copy       (void);
    5046
    5147  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/include/Types.h

    r82 r88  
    2828  public : Ttype_t            * _type           ;
    2929  public : Toperation_t       * _operation      ;
     30  public : Tcontrol_t         * _no_execute     ;
    3031  public : Tcontrol_t         * _is_delay_slot  ;
    3132  public : Tgeneral_data_t    * _address        ;
     
    4344  public : Tspecial_address_t * _num_reg_re     ;
    4445  public : Texception_t       * _exception_use  ;
     46  public : Texception_t       * _exception      ;
    4547
    4648  public :  decod_queue_entry_t (uint32_t nb_inst):
     
    5254      _type           = new Ttype_t            [_nb_inst];
    5355      _operation      = new Toperation_t       [_nb_inst];
     56      _no_execute     = new Tcontrol_t         [_nb_inst];
    5457      _is_delay_slot  = new Tcontrol_t         [_nb_inst];
    5558      _address        = new Tgeneral_data_t    [_nb_inst];
     
    6770      _num_reg_re     = new Tspecial_address_t [_nb_inst];
    6871      _exception_use  = new Texception_t       [_nb_inst];
     72      _exception      = new Texception_t       [_nb_inst];
    6973
    7074      for (uint32_t i=0; i<_nb_inst; i++)
     
    7983      delete [] _type           ;
    8084      delete [] _operation      ;
     85      delete [] _no_execute     ;
    8186      delete [] _is_delay_slot  ;
    8287      delete [] _address        ;
     
    9499      delete [] _num_reg_re     ;
    95100      delete [] _exception_use  ;
     101      delete [] _exception      ;
    96102    }
    97103  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue.cpp

    r87 r88  
    3939
    4040    usage_environment(_usage);
     41
     42#if DEBUG_Decod_queue == true
     43    log_printf(INFO,Decod_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
     44
     45    std::cout << *param << std::endl;
     46#endif   
    4147
    4248    log_printf(INFO,Decod_queue,FUNCTION,_("Allocation"));
     
    98104        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    99105          sensitive << (*(in_DECOD_OUT_ACK [i]));
    100         if (_param->_have_port_depth)
    101106          for (uint32_t i=0; i<_param->_nb_context; i++)
    102             sensitive << (*(in_DEPTH_TAIL      [i]))
    103                       << (*(in_DEPTH_NB_BRANCH [i]));
     107            {
     108              if (_param->_have_port_depth)
     109              sensitive << (*(in_DEPTH_MIN [i]));
     110              sensitive << (*(in_DEPTH_MAX [i]));
     111            }
    104112
    105113# ifdef SYSTEMCASS_SPECIFIC
     
    108116          {
    109117            (*(out_DECOD_OUT_VAL [i])) (*(in_DECOD_OUT_ACK [i]));
    110             if (_param->_have_port_depth)
    111               for (uint32_t j=0; j<_param->_nb_context; j++)
    112                 {
    113                   (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_TAIL      [j]));
    114                   (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_NB_BRANCH [j]));
    115                 }
     118            for (uint32_t j=0; j<_param->_nb_context; j++)
     119              {
     120                if (_param->_have_port_depth)
     121                (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MIN [j]));
     122                (*(out_DECOD_OUT_VAL [i])) (*(in_DEPTH_MAX [j]));
     123              }
    116124          }
    117125# endif   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_allocation.cpp

    r82 r88  
    6565      ALLOC1_SIGNAL_IN ( in_DECOD_IN_TYPE           ,"type"         ,Ttype_t            ,_param->_size_type                  );
    6666      ALLOC1_SIGNAL_IN ( in_DECOD_IN_OPERATION      ,"operation"    ,Toperation_t       ,_param->_size_operation             );
     67      ALLOC1_SIGNAL_IN ( in_DECOD_IN_NO_EXECUTE     ,"no_execute"   ,Tcontrol_t         ,1                                   );
    6768      ALLOC1_SIGNAL_IN ( in_DECOD_IN_IS_DELAY_SLOT  ,"is_delay_slot",Tcontrol_t         ,1                                   );
    6869      ALLOC1_SIGNAL_IN ( in_DECOD_IN_ADDRESS        ,"address"      ,Tgeneral_data_t    ,_param->_size_general_data          );
     
    8081      ALLOC1_SIGNAL_IN ( in_DECOD_IN_NUM_REG_RE     ,"num_reg_re"   ,Tspecial_address_t ,_param->_size_special_register_logic);
    8182      ALLOC1_SIGNAL_IN ( in_DECOD_IN_EXCEPTION_USE  ,"exception_use",Texception_t       ,_param->_size_exception_use         );
     83      ALLOC1_SIGNAL_IN ( in_DECOD_IN_EXCEPTION      ,"exception"    ,Texception_t       ,_param->_size_exception_decod       );
    8284    }
    8385
     
    9294      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_TYPE           ,"type"         ,Ttype_t            ,_param->_size_type                  );
    9395      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_OPERATION      ,"operation"    ,Toperation_t       ,_param->_size_operation             );
     96      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_NO_EXECUTE     ,"no_execute"   ,Tcontrol_t         ,1                                   );
    9497      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_IS_DELAY_SLOT  ,"is_delay_slot",Tcontrol_t         ,1                                   );
    9598      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_ADDRESS        ,"address"      ,Tgeneral_data_t    ,_param->_size_general_data          );
     
    107110      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_NUM_REG_RE     ,"num_reg_re"   ,Tspecial_address_t ,_param->_size_special_register_logic);
    108111      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_EXCEPTION_USE  ,"exception_use",Texception_t       ,_param->_size_exception_use         );
     112      ALLOC1_SIGNAL_OUT(out_DECOD_OUT_EXCEPTION      ,"exception"    ,Texception_t       ,_param->_size_exception_decod       );
    109113    }
    110114
     
    113117      ALLOC1_INTERFACE("depth",IN ,NORTH,"Depth", _param->_nb_context);
    114118
    115       ALLOC1_SIGNAL_IN ( in_DEPTH_TAIL     ,"tail"     ,Tdepth_t           ,_param->_size_depth  );
    116       if (_param->_have_port_depth)
    117       ALLOC1_SIGNAL_IN ( in_DEPTH_NB_BRANCH,"nb_branch",Tdepth_t           ,_param->_size_depth+1);
     119      ALLOC1_SIGNAL_IN ( in_DEPTH_MIN      ,"min"      ,Tdepth_t           ,_param->_size_depth  );
     120      ALLOC1_SIGNAL_IN ( in_DEPTH_MAX      ,"max"      ,Tdepth_t           ,_param->_size_depth+1);
    118121    }
    119122
    120     // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     123    // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
    121124    {
    122125      ALLOC1_INTERFACE("nb_inst",OUT,NORTH,"Instruction's number", _param->_nb_context);
    123126
    124       ALLOC1_SIGNAL_OUT(out_NB_INST_ALL    ,"all"      ,Tcontext_t         ,_param->_size_nb_inst+1);
     127      ALLOC1_SIGNAL_OUT(out_NB_INST_ALL    ,"all"      ,Tcontext_t         ,_param->_size_nb_inst_decod);
    125128    }
    126129
     130    if (usage_is_set(_usage,USE_SYSTEMC))
     131      {
    127132    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    128133    reg_QUEUE              = new std::list<decod_queue_entry_t*>;
     
    133138    internal_DECOD_OUT_VAL = new Tcontrol_t [_param->_nb_inst_decod];
    134139    internal_DECOD_OUT_ACK = new Tcontrol_t [_param->_nb_inst_decod];
     140      }
    135141   
    136142    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_deallocation.cpp

    r82 r88  
    3535        DELETE1_SIGNAL( in_DECOD_IN_TYPE           ,_param->_nb_inst_decod,_param->_size_type                  );
    3636        DELETE1_SIGNAL( in_DECOD_IN_OPERATION      ,_param->_nb_inst_decod,_param->_size_operation             );
     37        DELETE1_SIGNAL( in_DECOD_IN_NO_EXECUTE     ,_param->_nb_inst_decod,1                                   );
    3738        DELETE1_SIGNAL( in_DECOD_IN_IS_DELAY_SLOT  ,_param->_nb_inst_decod,1                                   );
    3839        DELETE1_SIGNAL( in_DECOD_IN_ADDRESS        ,_param->_nb_inst_decod,_param->_size_general_data          );
     
    5051        DELETE1_SIGNAL( in_DECOD_IN_NUM_REG_RE     ,_param->_nb_inst_decod,_param->_size_special_register_logic);
    5152        DELETE1_SIGNAL( in_DECOD_IN_EXCEPTION_USE  ,_param->_nb_inst_decod,_param->_size_exception_use         );
     53        DELETE1_SIGNAL( in_DECOD_IN_EXCEPTION      ,_param->_nb_inst_decod,_param->_size_exception             );
    5254       
    5355        DELETE1_SIGNAL(out_DECOD_OUT_VAL           ,_param->_nb_inst_decod,1);
     
    5759        DELETE1_SIGNAL(out_DECOD_OUT_TYPE          ,_param->_nb_inst_decod,_param->_size_type                  );
    5860        DELETE1_SIGNAL(out_DECOD_OUT_OPERATION     ,_param->_nb_inst_decod,_param->_size_operation             );
     61        DELETE1_SIGNAL(out_DECOD_OUT_NO_EXECUTE    ,_param->_nb_inst_decod,1                                   );
    5962        DELETE1_SIGNAL(out_DECOD_OUT_IS_DELAY_SLOT ,_param->_nb_inst_decod,1                                   );
    6063        DELETE1_SIGNAL(out_DECOD_OUT_ADDRESS       ,_param->_nb_inst_decod,_param->_size_general_data          );
     
    7275        DELETE1_SIGNAL(out_DECOD_OUT_NUM_REG_RE    ,_param->_nb_inst_decod,_param->_size_special_register_logic);
    7376        DELETE1_SIGNAL(out_DECOD_OUT_EXCEPTION_USE ,_param->_nb_inst_decod,_param->_size_exception_use         );
     77        DELETE1_SIGNAL(out_DECOD_OUT_EXCEPTION     ,_param->_nb_inst_decod,_param->_size_exception             );
    7478       
    75         DELETE1_SIGNAL( in_DEPTH_TAIL     ,_param->_nb_context,_param->_size_depth  );
    76         if (_param->_have_port_depth)
    77         DELETE1_SIGNAL( in_DEPTH_NB_BRANCH,_param->_nb_context,_param->_size_depth+1);
     79        DELETE1_SIGNAL( in_DEPTH_MIN               ,_param->_nb_context,_param->_size_depth  );
     80        DELETE1_SIGNAL( in_DEPTH_MAX               ,_param->_nb_context,_param->_size_depth+1);
    7881
    79         DELETE1_SIGNAL(out_NB_INST_ALL    ,_param->_nb_context,_param->_size_nb_inst+1);
     82        DELETE1_SIGNAL(out_NB_INST_ALL             ,_param->_nb_context,_param->_size_nb_inst_decod);
     83
     84        // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     85        delete    reg_QUEUE;
     86        delete [] reg_NB_INST;
     87       
     88        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     89        delete [] internal_DECOD_IN_ACK ;
     90        delete [] internal_DECOD_OUT_VAL;
     91        delete [] internal_DECOD_OUT_ACK;
    8092      }
    81     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    82     delete    reg_QUEUE;
    83     delete [] reg_NB_INST;
    84    
    85     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    86     delete [] internal_DECOD_IN_ACK ;
    87     delete [] internal_DECOD_OUT_VAL;
    88     delete [] internal_DECOD_OUT_ACK;
    8993
    9094    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMealy_decod_out.cpp

    r82 r88  
    2323  {
    2424    log_begin(Decod_queue,FUNCTION);
     25    log_function(Decod_queue,FUNCTION,_name.c_str());
    2526
    2627    Tcontrol_t val [_param->_nb_inst_decod];
     
    3637        if (reg_QUEUE->front()->_val [i])
    3738          {
    38             log_printf(TRACE,Decod_queue,FUNCTION,_("Queue is not empty, slot [%d] is valid."),i);
     39            log_printf(TRACE,Decod_queue,FUNCTION,_("  * Queue is not empty, slot [%d] is valid."),i);
    3940
    4041            Tcontext_t context         = reg_QUEUE->front()->_context_id    [i];
    4142            Tdepth_t   depth           = reg_QUEUE->front()->_depth         [i];
    42             Tdepth_t   depth_base      = (_param->_have_port_depth)?PORT_READ(in_DEPTH_TAIL      [context]):0;
    43             Tdepth_t   depth_offset    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_NB_BRANCH [context]):0;
    44             Tdepth_t   depth_max       = depth_base + depth_offset;
     43            Tdepth_t   depth_min       = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context]):0;
     44            Tdepth_t   depth_max       = PORT_READ(in_DEPTH_MAX[context]);
    4545
    4646            // is a valid instruction ?
    47             //  * depth must be lower that depth max
    48             Tcontrol_t is_valid        = depth <= ((depth>depth_base)?(depth_max):(depth_max%_param->_nb_branch_speculated [context]));
     47            // If DEPTH_CURRENT :
     48            // equal at     DEPTH_MIN            -> not speculative
     49            // not include ]DEPTH_MIN:DEPTH_MAX[ -> previous branch miss
     50            //     include ]DEPTH_MIN:DEPTH_MAX[ -> speculative
    4951
    50             log_printf(TRACE,Decod_queue,FUNCTION,_("  * is_valid : %d"),is_valid);
     52            // All case
     53            // ....... min ...X... max ....... OK
     54            // ....... min ....... max ...X... KO
     55            // ...X... min ....... max ....... KO
     56            // ....... max ....... min ...X... OK
     57            // ...X... max ....... min ....... OK
     58            // ....... max ...X... min ....... KO
     59
     60            Tcontrol_t is_valid        = ((depth == depth_min) or
     61                                          ((depth_min < depth_max)?
     62                                           (depth<depth_max):
     63                                           ((depth > depth_min) or (depth < depth_max))));
     64//          Tcontrol_t is_valid        = depth <= depth_max;
     65
     66            log_printf(TRACE,Decod_queue,FUNCTION,_("    * is_valid : %d"),is_valid);
    5167
    5268            internal_DECOD_OUT_VAL [i] = 1; // in all case, val is set (entry is not empty, and instruction is valid)
     
    6581    for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    6682      {
     83        log_printf(TRACE,Decod_queue,FUNCTION,_("  * DECOD_OUT_VAL : %d"),val [i]);
     84
    6785        PORT_WRITE(out_DECOD_OUT_VAL [i],val [i]);
    6886      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_genMoore.cpp

    r82 r88  
    2323  {
    2424    log_begin(Decod_queue,FUNCTION);
     25    log_function(Decod_queue,FUNCTION,_name.c_str());
    2526
    2627    //--------------------------------------------------------------------
     
    4950          PORT_WRITE(out_DECOD_OUT_TYPE          [i],reg_QUEUE->front()->_type          [i]);
    5051          PORT_WRITE(out_DECOD_OUT_OPERATION     [i],reg_QUEUE->front()->_operation     [i]);
     52          PORT_WRITE(out_DECOD_OUT_NO_EXECUTE    [i],reg_QUEUE->front()->_no_execute    [i]);
    5153          PORT_WRITE(out_DECOD_OUT_IS_DELAY_SLOT [i],reg_QUEUE->front()->_is_delay_slot [i]);
    5254          PORT_WRITE(out_DECOD_OUT_ADDRESS       [i],reg_QUEUE->front()->_address       [i]);
     
    6466          PORT_WRITE(out_DECOD_OUT_NUM_REG_RE    [i],reg_QUEUE->front()->_num_reg_re    [i]);
    6567          PORT_WRITE(out_DECOD_OUT_EXCEPTION_USE [i],reg_QUEUE->front()->_exception_use [i]);
     68          PORT_WRITE(out_DECOD_OUT_EXCEPTION     [i],reg_QUEUE->front()->_exception     [i]);
    6669        }
    6770
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_statistics_allocation.cpp

    r82 r88  
    2929                      param_statistics);
    3030
    31     _stat_nb_inst = new counter_t * [_param->_nb_context];
     31    _stat_use_queue = _stat->create_variable ("use_queue");
     32    _stat_nb_inst   = new counter_t * [_param->_nb_context];
    3233
    3334    std::string expr_average_inst = "";
     
    3536    for (uint32_t i=0; i<_param->_nb_context; i++)
    3637      {
    37         _stat_nb_inst [i] = _stat->create_variable("nb_inst_"+toString(i));
    38        
    39         _stat->create_expr_average_by_cycle("average_inst_"+toString(i), "nb_inst_"+toString(i), "", toString(_("Average instruction by cycle (context %d)"),i));
    40         _stat->create_expr_percent         ("percent_use_inst_"+toString(i) , "average_inst_"+toString(i), toString(_param->_size_queue), toString(_("Percent instruction by cycle (context %d)"),i));
    41 
    42         if (i == 0)
    43           expr_average_inst = "nb_inst_"+toString(i);
     38        _stat_nb_inst [i] = _stat->create_variable("nb_inst_"+toString(i));
     39       
     40        _stat->create_expr_average_by_cycle("average_inst_"+toString(i), "nb_inst_"+toString(i), "", toString(_("Average instruction number in decod_queue by cycle (context %d)"),i));
     41        _stat->create_expr_percent         ("percent_use_inst_"+toString(i) , "average_inst_"+toString(i), toString(_param->_size_queue), toString(_("Percent decod_queue's occupation (context %d)"),i));
     42       
     43        if (i == 0)
     44          expr_average_inst = "nb_inst_"+toString(i);
    4445        else
    4546          expr_average_inst = "+ nb_inst_"+toString(i) + " " +expr_average_inst;
    4647      }
    4748
    48     _stat->create_expr_average_by_cycle("average_inst", expr_average_inst, "", _("Average instruction by cycle (all context)"));
    49     _stat->create_expr_percent         ("percent_use_inst" , "average_inst", toString(_param->_size_queue), _("Percent instruction by cycle (all context)"));
     49    _stat->create_expr_average_by_cycle("average_inst", expr_average_inst, "", _("Average instruction number in decod_queue by cycle (all context)"));
     50    _stat->create_expr_percent         ("percent_use_inst" , "average_inst", toString(_param->_size_queue), _("Percent decod_queue's occupation (all context)"));
     51   
     52    _stat->create_expr_average_by_cycle("average_use_queue", "use_queue", "", _("Average slot decod_queue occupation by cycle."));
     53    _stat->create_expr_percent         ("percent_use_queue", "average_use_queue", toString(_param->_size_queue), _("Percent slot decod_queue occupation."));
    5054   
    5155    log_end(Decod_queue,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_transition.cpp

    r87 r88  
    2323  {
    2424    log_begin(Decod_queue,FUNCTION);
     25    log_function(Decod_queue,FUNCTION,_name.c_str());
    2526
    2627    if (PORT_READ(in_NRESET) == 0)
     
    3536        //--------------------------------------------------------------------
    3637        //-----[ DECOD_IN ]---------------------------------------------------
    37         //--------------------------------------------------------------------
    38         for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
     38        //-------------------------------------------------------------------- 
     39        decod_queue_entry_t * entry = NULL;
     40        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    3941          {
    40             decod_queue_entry_t * entry = NULL;
    4142            if (PORT_READ(in_DECOD_IN_VAL [i]) and internal_DECOD_IN_ACK[i])
    4243              {
    43                 log_printf(TRACE,Decod_queue,FUNCTION,_("DECOD_IN  [%d]"),i);
     44                log_printf(TRACE,Decod_queue,FUNCTION,_("  * DECOD_IN  [%d]"),i);
    4445
    4546                if (entry == NULL)
    46                   entry = new decod_queue_entry_t (_param->_nb_inst_decod);
     47                 {
     48                   // Once creation and insert in queue
     49                   entry = new decod_queue_entry_t (_param->_nb_inst_decod);
     50                   reg_QUEUE->push_back(entry);
     51                 }
    4752
    4853                Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_DECOD_IN_CONTEXT_ID [i]):0;
    4954
    50                 log_printf(TRACE,Decod_queue,FUNCTION,_("  * context : %d"),context);
     55                log_printf(TRACE,Decod_queue,FUNCTION,_("    * context : %d"),context);
    5156
    5257                entry->_val           [i] = 1;
     
    5560                entry->_type          [i] = PORT_READ(in_DECOD_IN_TYPE          [i]);
    5661                entry->_operation     [i] = PORT_READ(in_DECOD_IN_OPERATION     [i]);
     62                entry->_no_execute    [i] = PORT_READ(in_DECOD_IN_NO_EXECUTE    [i]);
    5763                entry->_is_delay_slot [i] = PORT_READ(in_DECOD_IN_IS_DELAY_SLOT [i]);
    5864                entry->_address       [i] = PORT_READ(in_DECOD_IN_ADDRESS       [i]);
     
    7076                entry->_num_reg_re    [i] = PORT_READ(in_DECOD_IN_NUM_REG_RE    [i]);
    7177                entry->_exception_use [i] = PORT_READ(in_DECOD_IN_EXCEPTION_USE [i]);
     78                entry->_exception     [i] = PORT_READ(in_DECOD_IN_EXCEPTION     [i]);
    7279
    7380                reg_NB_INST [context] ++;
    74                 reg_QUEUE->push_back(entry);
    7581
    76                 log_printf(TRACE,Decod_queue,FUNCTION,_("  * nb_inst : %d"),reg_NB_INST [context]);
    77                 log_printf(TRACE,Decod_queue,FUNCTION,_("  * PUSH queue"));
     82                log_printf(TRACE,Decod_queue,FUNCTION,_("    * nb_inst : %d"),reg_NB_INST [context]);
     83                log_printf(TRACE,Decod_queue,FUNCTION,_("    * PUSH queue"));
    7884              }
    7985          }
     
    9197                if (internal_DECOD_OUT_VAL [i] and internal_DECOD_OUT_ACK[i])
    9298                  {
    93                     log_printf(TRACE,Decod_queue,FUNCTION,_("DECOD_OUT [%d]"),i);
     99                    log_printf(TRACE,Decod_queue,FUNCTION,_("  * DECOD_OUT [%d]"),i);
    94100               
    95101                    reg_QUEUE->front()->_val [i] = 0;
    96102
    97103                    Tcontext_t context = reg_QUEUE->front()->_context_id [i];
    98                     log_printf(TRACE,Decod_queue,FUNCTION,_("  * context : %d"),context);
     104                    log_printf(TRACE,Decod_queue,FUNCTION,_("    * context : %d"),context);
    99105                   
    100106                    reg_NB_INST [context] --;
    101                     log_printf(TRACE,Decod_queue,FUNCTION,_("  * nb_inst : %d"),reg_NB_INST [context]);
     107                    log_printf(TRACE,Decod_queue,FUNCTION,_("    * nb_inst : %d"),reg_NB_INST [context]);
    102108                  }
    103109                // Test if slot is (again) valid, if yes, then have less one instruction in the entry
     
    108114            if (not find) // no valid instruction in current slot
    109115              {
    110                 log_printf(TRACE,Decod_queue,FUNCTION,_("  * POP  queue"));
     116                log_printf(TRACE,Decod_queue,FUNCTION,_("    * POP  queue"));
    111117
    112118                // can pop the slot
     
    117123      }
    118124
    119 #if (DEBUG >= DEBUG_TRACE) and (DEBUG_Decod_queue)
     125#if defined(DEBUG) and defined(DEBUG_Decod_queue) and (DEBUG >= DEBUG_TRACE)
     126    log_printf(TRACE,Decod_queue,FUNCTION,"  * Dump decod_queue");
    120127    uint32_t x=0;
    121128    for (std::list<decod_queue_entry_t*>::iterator it=reg_QUEUE->begin();
     
    123130         it++)
    124131      {
    125         log_printf(TRACE,Decod_queue,FUNCTION,"[%d] ",x);
     132        log_printf(TRACE,Decod_queue,FUNCTION,"    * [%d] ",x);
    126133
    127134        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    128135          {
    129136            if ((*it)->_val [i])
    130               log_printf(TRACE,Decod_queue,FUNCTION," * [%d] %d, %d %d, %d %d %d, 0x%x, %d 0x%x, %d %d, %d %d, %d %d, %d %d, %d %d, %d "
     137              log_printf(TRACE,Decod_queue,FUNCTION,"      * [%d] %d, %d %d, %d %d %d %d, 0x%x, %d 0x%x, %d %d, %d %d, %d %d, %d %d, %d %d, %d %d"
    131138                         ,i
    132139                         ,(*it)->_val           [i]
     
    135142                         ,(*it)->_type          [i]
    136143                         ,(*it)->_operation     [i]
     144                         ,(*it)->_no_execute    [i]
    137145                         ,(*it)->_is_delay_slot [i]
    138146                         ,(*it)->_address       [i]
     
    150158                         ,(*it)->_num_reg_re    [i]
    151159                         ,(*it)->_exception_use [i]
     160                         ,(*it)->_exception     [i]
    152161                         );
    153162            else
    154               log_printf(TRACE,Decod_queue,FUNCTION," * [%d] %d"
     163              log_printf(TRACE,Decod_queue,FUNCTION,"      * [%d] %d"
    155164                         ,i
    156165                         ,(*it)->_val           [i]
     
    163172   
    164173#ifdef STATISTICS
    165     for (uint32_t i=0; i<_param->_nb_context; i++)
    166       *(_stat_nb_inst [i]) += reg_NB_INST [i];
     174    if (usage_is_set(_usage,USE_STATISTICS))
     175      {
     176        *(_stat_use_queue) += reg_QUEUE->size();
     177        for (uint32_t i=0; i<_param->_nb_context; i++)
     178          *(_stat_nb_inst [i]) += reg_NB_INST [i];
     179      }
    167180#endif
    168181
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Parameters.cpp

    r82 r88  
    1010
    1111namespace morpheo {
    12 namespace behavioural {
     12  namespace behavioural {
    1313namespace core {
    1414namespace multi_front_end {
     
    2424                          uint32_t   size_queue          ,
    2525                          uint32_t   size_general_data   ,
    26                           uint32_t * nb_branch_speculated)
     26                          uint32_t * nb_branch_speculated,
     27                          bool       is_toplevel         )
    2728  {
    2829    log_begin(Decod_queue,FUNCTION);
     
    3132    _nb_inst_decod        = nb_inst_decod       ;
    3233    _size_queue           = size_queue          ;
    33     _size_general_data    = size_general_data   ;
     34//  _size_general_data    = size_general_data   ;
    3435    _nb_branch_speculated = nb_branch_speculated;
    3536
     
    3738    _size_bank            = _size_queue / _nb_bank;
    3839   
    39     _size_context_id      = log2(nb_context);
    40     _size_depth           = log2(max<uint32_t>(_nb_branch_speculated,_nb_context));
    41     _size_nb_inst         = log2(_size_queue);
     40    test();
    4241
    43     _have_port_context_id = (_size_context_id > 0);
    44     _have_port_depth      = (_size_depth      > 0);
    45    
    46     test();
     42    if (is_toplevel)
     43      {
     44        _size_context_id      = log2(nb_context);
     45        _size_nb_inst_decod   = log2(_size_queue)+1;
     46        _size_depth           = log2(max<uint32_t>(_nb_branch_speculated,_nb_context));
     47        _size_general_data    = size_general_data;
     48
     49        _have_port_context_id = _size_context_id > 0;
     50        _have_port_depth      = _size_depth > 0;
     51
     52        copy ();
     53      }
     54
    4755    log_end(Decod_queue,FUNCTION);
    4856  };
     
    6270  {
    6371    log_begin(Decod_queue,FUNCTION);
     72
     73    log_end(Decod_queue,FUNCTION);
     74  };
     75
     76#undef  FUNCTION
     77#define FUNCTION "Decod_queue::copy"
     78  void Parameters::copy (void)
     79  {
     80    log_begin(Decod_queue,FUNCTION);
     81
    6482    log_end(Decod_queue,FUNCTION);
    6583  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/Makefile

    r83 r88  
    2424library_clean                   : Decod_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/config_min.cfg

    r83 r88  
    6632      32      +1      # size_general_data           
    771       1       +1      # nb_branch_speculated         [0][nb_context]
    8 1       1       +1      # size_branch_update_prediction
    981       1       +1      # nb_context_select           
    1091       1       +1      # select_priority             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/config_mono_context.cfg

    r87 r88  
    6632      32      +1      # size_general_data           
    771       1       *4      # nb_branch_speculated         [0][nb_context]
    8 0       1       +1      # size_branch_update_prediction
    981       1       +1      # nb_context_select           
    1091       1       +1      # select_priority             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/config_multi_context.cfg

    r87 r88  
    224       4       +1      # nb_context                   
    334       4       *4      # nb_inst_fetch                [0][nb_context]
    4 2       2       *4      # nb_inst_fetch                [1][nb_context]
    5 1       1       *4      # nb_inst_fetch                [2][nb_context]
    6 8       8       *4      # nb_inst_fetch                [3][nb_context]
    7 1       8       *4      # nb_inst_decod               
    8 16      16      *4      # size_queue                   
    9 32      32      +1      # size_general_data           
    10 1       1       *4      # nb_branch_speculated         [0][nb_context]
    11 2       2       *4      # nb_branch_speculated         [1][nb_context]
    12 1       1       *4      # nb_branch_speculated         [2][nb_context]
    13 4       4       *4      # nb_branch_speculated         [3][nb_context]
    14 2       2       +1      # size_branch_update_prediction
     42       2       *4      # nb_inst_fetch                 [1][nb_context]
     51       1       *4      # nb_inst_fetch                 [2][nb_context]
     68       8       *4      # nb_inst_fetch                 [3][nb_context]
     71       8       *4      # nb_inst_decod                 
     816      16      *4      # size_queue                   
     932      32      +1      # size_general_data             
     101       1       *4      # nb_branch_speculated          [0][nb_context]
     112       2       *4      # nb_branch_speculated          [1][nb_context]
     121       1       *4      # nb_branch_speculated          [2][nb_context]
     134       4       *4      # nb_branch_speculated          [3][nb_context]
    15141       4       *4      # nb_context_select           
    16151       1       +1      # select_priority             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/main.cpp

    r87 r88  
    99#include "Behavioural/Custom/include/Custom_example.h"
    1010
    11 #define NB_PARAMS 8
     11#define NB_PARAMS 7
    1212
    1313void usage (int argc, char * argv[])
     
    2121  err (_(" * size_general_data                          (uint32_t         )\n"));
    2222  err (_(" * nb_branch_speculated          [nb_context] (uint32_t         )\n"));
    23   err (_(" * size_branch_update_prediction              (uint32_t         )\n"));
    2423  err (_(" * nb_context_select                          (uint32_t         )\n"));
    2524  err (_(" * select_priority                            (Tpriority_t      )\n"));
     
    5655  for (uint32_t i=0; i<_nb_context; i++)
    5756    _nb_branch_speculated [i] = fromString<uint32_t>(argv[x++]);
    58   uint32_t            _size_branch_update_prediction= fromString<uint32_t         >(argv[x++]);
    5957  uint32_t            _nb_context_select            = fromString<uint32_t         >(argv[x++]);
    6058  Tpriority_t         _select_priority              = fromString<Tpriority_t      >(argv[x++]);
     
    8179         _size_general_data            ,
    8280         _nb_branch_speculated         ,
    83          _size_branch_update_prediction,
    8481         _nb_context_select            ,
    8582         _select_priority              ,
    8683         _select_load_balancing        ,
    8784         _instruction_implemeted       ,
    88          &(morpheo::behavioural::custom::example_get_custom_information)
     85         &(morpheo::behavioural::custom::example_get_custom_information),
     86         true
    8987         );
    9088     
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/test.cpp

    r87 r88  
    5353  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    5454
    55   ALLOC2_SC_SIGNAL( in_IFETCH_VAL                         ," in_IFETCH_VAL                         ",Tcontrol_t         ,_param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1]);
    56   ALLOC2_SC_SIGNAL(out_IFETCH_ACK                         ,"out_IFETCH_ACK                         ",Tcontrol_t         ,_param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1]);
    57   ALLOC2_SC_SIGNAL( in_IFETCH_INSTRUCTION                 ," in_IFETCH_INSTRUCTION                 ",Tinstruction_t     ,_param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1]);
     55  ALLOC2_SC_SIGNAL( in_IFETCH_VAL                         ," in_IFETCH_VAL                         ",Tcontrol_t         ,_param->_nb_context, _param->_nb_inst_fetch[it1]);
     56  ALLOC2_SC_SIGNAL(out_IFETCH_ACK                         ,"out_IFETCH_ACK                         ",Tcontrol_t         ,_param->_nb_context, _param->_nb_inst_fetch[it1]);
     57  ALLOC2_SC_SIGNAL( in_IFETCH_INSTRUCTION                 ," in_IFETCH_INSTRUCTION                 ",Tinstruction_t     ,_param->_nb_context, _param->_nb_inst_fetch[it1]);
    5858
    5959  ALLOC1_SC_SIGNAL(in_IFETCH_CONTEXT_ID                   ,"in_IFETCH_CONTEXT_ID                   ",Tcontext_t         ,_param->_nb_context);
     
    6363  ALLOC1_SC_SIGNAL(in_IFETCH_BRANCH_STATE                 ,"in_IFETCH_BRANCH_STATE                 ",Tbranch_state_t    ,_param->_nb_context);
    6464  ALLOC1_SC_SIGNAL(in_IFETCH_BRANCH_UPDATE_PREDICTION_ID  ,"in_IFETCH_BRANCH_UPDATE_PREDICTION_ID  ",Tprediction_ptr_t  ,_param->_nb_context);
     65  ALLOC1_SC_SIGNAL(in_IFETCH_EXCEPTION                    ,"in_IFETCH_EXCEPTION                    ",Texception_t       ,_param->_nb_context);
    6566
    6667  ALLOC1_SC_SIGNAL(out_DECOD_VAL                          ,"out_DECOD_VAL                          ",Tcontrol_t         ,_param->_nb_inst_decod);
     
    7071  ALLOC1_SC_SIGNAL(out_DECOD_TYPE                         ,"out_DECOD_TYPE                         ",Ttype_t            ,_param->_nb_inst_decod);
    7172  ALLOC1_SC_SIGNAL(out_DECOD_OPERATION                    ,"out_DECOD_OPERATION                    ",Toperation_t       ,_param->_nb_inst_decod);
     73  ALLOC1_SC_SIGNAL(out_DECOD_NO_EXECUTE                   ,"out_DECOD_NO_EXECUTE                   ",Tcontrol_t         ,_param->_nb_inst_decod);
    7274  ALLOC1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT                ,"out_DECOD_IS_DELAY_SLOT                ",Tcontrol_t         ,_param->_nb_inst_decod);
    7375  ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS                      ,"out_DECOD_ADDRESS                      ",Tgeneral_data_t    ,_param->_nb_inst_decod);
     
    8587  ALLOC1_SC_SIGNAL(out_DECOD_NUM_REG_RE                   ,"out_DECOD_NUM_REG_RE                   ",Tspecial_address_t ,_param->_nb_inst_decod);
    8688  ALLOC1_SC_SIGNAL(out_DECOD_EXCEPTION_USE                ,"out_DECOD_EXCEPTION_USE                ",Texception_t       ,_param->_nb_inst_decod);
     89  ALLOC1_SC_SIGNAL(out_DECOD_EXCEPTION                    ,"out_DECOD_EXCEPTION                    ",Texception_t       ,_param->_nb_inst_decod);
    8790
    8891  ALLOC1_SC_SIGNAL(out_PREDICT_VAL                        ,"out_PREDICT_VAL                        ",Tcontrol_t         ,_param->_nb_inst_decod);
     
    99102//ALLOC1_SC_SIGNAL( in_PREDICT_CAN_CONTINUE               ," in_PREDICT_CAN_CONTINUE               ",Tcontrol_t         ,_param->_nb_inst_decod);
    100103
    101   ALLOC1_SC_SIGNAL( in_DEPTH_TAIL                         ," in_DEPTH_TAIL                         ",Tdepth_t           ,_param->_nb_context);
    102   ALLOC1_SC_SIGNAL( in_DEPTH_NB_BRANCH                    ," in_DEPTH_NB_BRANCH                    ",Tdepth_t           ,_param->_nb_context);
     104  ALLOC1_SC_SIGNAL( in_DEPTH_MIN                          ," in_DEPTH_MIN                          ",Tdepth_t           ,_param->_nb_context);
     105  ALLOC1_SC_SIGNAL( in_DEPTH_MAX                          ," in_DEPTH_MAX                          ",Tdepth_t           ,_param->_nb_context);
    103106
    104107  ALLOC1_SC_SIGNAL(out_NB_INST_DECOD_ALL                  ,"out_NB_INST_DECOD_ALL                  ",Tcounter_t         ,_param->_nb_context);
     
    110113  ALLOC_SC_SIGNAL(  in_CONTEXT_EVENT_ACK                  ," in_CONTEXT_EVENT_ACK                  ",Tcontrol_t         );
    111114  ALLOC_SC_SIGNAL( out_CONTEXT_EVENT_CONTEXT_ID           ,"out_CONTEXT_EVENT_CONTEXT_ID           ",Tcontext_t         );
     115  ALLOC_SC_SIGNAL( out_CONTEXT_EVENT_DEPTH                ,"out_CONTEXT_EVENT_DEPTH                ",Tdepth_t           );
    112116  ALLOC_SC_SIGNAL( out_CONTEXT_EVENT_TYPE                 ,"out_CONTEXT_EVENT_TYPE                 ",Tevent_type_t      );
    113117  ALLOC_SC_SIGNAL( out_CONTEXT_EVENT_IS_DELAY_SLOT        ,"out_CONTEXT_EVENT_IS_DELAY_SLOT        ",Tcontrol_t         );
     
    124128  (*(_Decod_unit->in_NRESET))       (*(in_NRESET));
    125129
    126   INSTANCE2_SC_SIGNAL(_Decod_unit, in_IFETCH_VAL                         ,_param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1]);
    127   INSTANCE2_SC_SIGNAL(_Decod_unit,out_IFETCH_ACK                         ,_param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1]);
    128   INSTANCE2_SC_SIGNAL(_Decod_unit, in_IFETCH_INSTRUCTION                 ,_param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1]);
     130  INSTANCE2_SC_SIGNAL(_Decod_unit, in_IFETCH_VAL                         ,_param->_nb_context, _param->_nb_inst_fetch[it1]);
     131  INSTANCE2_SC_SIGNAL(_Decod_unit,out_IFETCH_ACK                         ,_param->_nb_context, _param->_nb_inst_fetch[it1]);
     132  INSTANCE2_SC_SIGNAL(_Decod_unit, in_IFETCH_INSTRUCTION                 ,_param->_nb_context, _param->_nb_inst_fetch[it1]);
    129133  if (_param->_have_port_context_id)
    130134  INSTANCE1_SC_SIGNAL(_Decod_unit,in_IFETCH_CONTEXT_ID                   ,_param->_nb_context);
    131135  INSTANCE1_SC_SIGNAL(_Decod_unit,in_IFETCH_ADDRESS                      ,_param->_nb_context);
    132136//INSTANCE1_SC_SIGNAL(_Decod_unit,in_IFETCH_ADDRESS_NEXT                 ,_param->_nb_context);
    133   if (_param->_have_port_inst_ifetch_ptr)
    134   INSTANCE1_SC_SIGNAL(_Decod_unit,in_IFETCH_INST_IFETCH_PTR              ,_param->_nb_context);
     137
     138  for (uint32_t i=0; i<_param->_nb_context; ++i)
     139    {
     140      if (_param->_have_port_inst_ifetch_ptr)
     141        INSTANCE_SC_SIGNAL(_Decod_unit,in_IFETCH_INST_IFETCH_PTR[i]);
     142      if (_param->_have_port_depth)
     143        INSTANCE_SC_SIGNAL(_Decod_unit,in_IFETCH_BRANCH_UPDATE_PREDICTION_ID [i]);
     144    }
     145
    135146  INSTANCE1_SC_SIGNAL(_Decod_unit,in_IFETCH_BRANCH_STATE                 ,_param->_nb_context);
    136   if (_param->_have_port_branch_update_prediction_id)
    137   INSTANCE1_SC_SIGNAL(_Decod_unit,in_IFETCH_BRANCH_UPDATE_PREDICTION_ID  ,_param->_nb_context);
     147  INSTANCE1_SC_SIGNAL(_Decod_unit,in_IFETCH_EXCEPTION                    ,_param->_nb_context);
    138148
    139149  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_VAL                          ,_param->_nb_inst_decod);
     
    145155  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_TYPE                         ,_param->_nb_inst_decod);
    146156  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_OPERATION                    ,_param->_nb_inst_decod);
     157  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod);
    147158  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod);
    148159  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_ADDRESS                      ,_param->_nb_inst_decod);
     
    160171  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_NUM_REG_RE                   ,_param->_nb_inst_decod);
    161172  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_EXCEPTION_USE                ,_param->_nb_inst_decod);
     173  INSTANCE1_SC_SIGNAL(_Decod_unit,out_DECOD_EXCEPTION                    ,_param->_nb_inst_decod);
    162174
    163175  INSTANCE1_SC_SIGNAL(_Decod_unit,out_PREDICT_VAL                        ,_param->_nb_inst_decod);
     
    167179  INSTANCE1_SC_SIGNAL(_Decod_unit,out_PREDICT_MATCH_INST_IFETCH_PTR      ,_param->_nb_inst_decod);
    168180  INSTANCE1_SC_SIGNAL(_Decod_unit,out_PREDICT_BRANCH_STATE               ,_param->_nb_inst_decod);
    169   if (_param->_have_port_branch_update_prediction_id)
     181  if (_param->_have_port_depth)
    170182  INSTANCE1_SC_SIGNAL(_Decod_unit,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_inst_decod);
    171183  INSTANCE1_SC_SIGNAL(_Decod_unit,out_PREDICT_BRANCH_CONDITION           ,_param->_nb_inst_decod);
     
    176188//INSTANCE1_SC_SIGNAL(_Decod_unit, in_PREDICT_CAN_CONTINUE               ,_param->_nb_inst_decod);
    177189
    178   if (_param->_have_port_depth)
    179     {
    180   INSTANCE1_SC_SIGNAL(_Decod_unit, in_DEPTH_TAIL                         ,_param->_nb_context);
    181   INSTANCE1_SC_SIGNAL(_Decod_unit, in_DEPTH_NB_BRANCH                    ,_param->_nb_context);
    182     }
     190  INSTANCE1_SC_SIGNAL(_Decod_unit, in_DEPTH_MAX                          ,_param->_nb_context);
    183191
    184192  INSTANCE1_SC_SIGNAL(_Decod_unit,out_NB_INST_DECOD_ALL                  ,_param->_nb_context);
    185193
    186194  INSTANCE1_SC_SIGNAL(_Decod_unit, in_CONTEXT_DECOD_ENABLE               ,_param->_nb_context);
    187   if (_param->_have_port_depth)
    188   INSTANCE1_SC_SIGNAL(_Decod_unit, in_CONTEXT_DEPTH                      ,_param->_nb_context);
     195
     196  for (uint32_t i=0; i<_param->_nb_context; ++i)
     197    if (_param->_have_port_depth)
     198      {
     199        INSTANCE_SC_SIGNAL(_Decod_unit, in_DEPTH_MIN     [i]);
     200        INSTANCE_SC_SIGNAL(_Decod_unit, in_CONTEXT_DEPTH [i]);
     201      }
    189202
    190203  INSTANCE_SC_SIGNAL( _Decod_unit,out_CONTEXT_EVENT_VAL                  );
     
    192205  if (_param->_have_port_context_id)
    193206  INSTANCE_SC_SIGNAL( _Decod_unit,out_CONTEXT_EVENT_CONTEXT_ID           );
     207  if (_param->_have_port_depth)
     208  INSTANCE_SC_SIGNAL( _Decod_unit,out_CONTEXT_EVENT_DEPTH                );
    194209  INSTANCE_SC_SIGNAL( _Decod_unit,out_CONTEXT_EVENT_TYPE                 );
    195210  INSTANCE_SC_SIGNAL( _Decod_unit,out_CONTEXT_EVENT_IS_DELAY_SLOT        );
    196211  INSTANCE_SC_SIGNAL( _Decod_unit,out_CONTEXT_EVENT_ADDRESS              );
    197212  INSTANCE_SC_SIGNAL( _Decod_unit,out_CONTEXT_EVENT_ADDRESS_EPCR         );
    198 
    199213
    200214  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    247261          delay_slot_next     [i] = false;
    248262
    249           in_DEPTH_TAIL      [i]->write(0);
    250           in_DEPTH_NB_BRANCH [i]->write(0);
     263          in_DEPTH_MIN       [i]->write(0);
     264          in_DEPTH_MAX      [i]->write(0);
    251265          in_CONTEXT_DEPTH   [i]->write(0);
    252266        }
     
    285299                          in_IFETCH_BRANCH_STATE                [i]->write(it->_branch_state);
    286300                          in_IFETCH_BRANCH_UPDATE_PREDICTION_ID [i]->write(it->_branch_update_prediction_id);
     301                          in_IFETCH_EXCEPTION                   [i]->write(it->_exception_ifetch);
    287302                         
    288303                          if ((it->_is_delay_slot) or
     
    350365                      TEST(Tcontrol_t         , out_PREDICT_MATCH_INST_IFETCH_PTR       [x]->read(),((entry._address)%_param->_nb_inst_fetch[i]) == 0);
    351366                      TEST(Tbranch_state_t    , out_PREDICT_BRANCH_STATE                [x]->read(), entry._branch_state               );
    352                       if (_param->_have_port_branch_update_prediction_id)
     367                      if (_param->_have_port_depth)
    353368                      TEST(Tprediction_ptr_t  , out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x]->read(), entry._branch_update_prediction_id);
    354369                      TEST(Tbranch_condition_t, out_PREDICT_BRANCH_CONDITION            [x]->read(), entry._branch_condition           );
     
    367382                     
    368383                      if (_param->_have_port_context_id)
    369                         TEST(Tcontext_t     ,out_CONTEXT_EVENT_CONTEXT_ID   ->read(), i);
     384                      TEST(Tcontext_t     ,out_CONTEXT_EVENT_CONTEXT_ID   ->read(), i);
     385                      if (_param->_have_port_depth)
     386                      TEST(Tcontext_t     ,out_CONTEXT_EVENT_DEPTH        ->read(), entry._depth);
    370387                      TEST(Tevent_type_t  ,out_CONTEXT_EVENT_TYPE         ->read(), entry._context_event_type);
    371388                      TEST(Tcontrol_t     ,out_CONTEXT_EVENT_IS_DELAY_SLOT->read(), entry._is_delay_slot);
     
    396413                TEST(Ttype_t           ,  out_DECOD_TYPE          [i]->read(), respons [context].front()._type         );
    397414                TEST(Toperation_t      ,  out_DECOD_OPERATION     [i]->read(), respons [context].front()._operation    );
     415//              TEST(Tcontrol_t        ,  out_DECOD_NO_EXECUTE    [i]->read(), respons [context].front()._no_execute   );
    398416                TEST(Tcontrol_t        ,  out_DECOD_IS_DELAY_SLOT [i]->read(), respons [context].front()._is_delay_slot);
    399417                TEST(Tgeneral_data_t   ,  out_DECOD_ADDRESS       [i]->read(), respons [context].front()._address      );
     
    417435                TEST(Tspecial_address_t,  out_DECOD_NUM_REG_RE    [i]->read(), respons [context].front()._num_reg_re   );
    418436                TEST(Texception_t      ,  out_DECOD_EXCEPTION_USE [i]->read(), respons [context].front()._exception_use);
     437//              TEST(Texception_t      ,  out_DECOD_EXCEPTION     [i]->read(), respons [context].front()._exception    );
    419438
    420439                respons [context].pop_front();
     
    446465  delete in_NRESET;
    447466
    448   DELETE2_SC_SIGNAL( in_IFETCH_VAL                         ,_param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1]);
    449   DELETE2_SC_SIGNAL(out_IFETCH_ACK                         ,_param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1]);
    450   DELETE2_SC_SIGNAL( in_IFETCH_INSTRUCTION                 ,_param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1]);
     467  DELETE2_SC_SIGNAL( in_IFETCH_VAL                         ,_param->_nb_context, _param->_nb_inst_fetch[it1]);
     468  DELETE2_SC_SIGNAL(out_IFETCH_ACK                         ,_param->_nb_context, _param->_nb_inst_fetch[it1]);
     469  DELETE2_SC_SIGNAL( in_IFETCH_INSTRUCTION                 ,_param->_nb_context, _param->_nb_inst_fetch[it1]);
    451470  DELETE1_SC_SIGNAL(in_IFETCH_CONTEXT_ID                   ,_param->_nb_context);
    452471  DELETE1_SC_SIGNAL(in_IFETCH_ADDRESS                      ,_param->_nb_context);
     
    455474  DELETE1_SC_SIGNAL(in_IFETCH_BRANCH_STATE                 ,_param->_nb_context);
    456475  DELETE1_SC_SIGNAL(in_IFETCH_BRANCH_UPDATE_PREDICTION_ID  ,_param->_nb_context);
     476  DELETE1_SC_SIGNAL(in_IFETCH_EXCEPTION                    ,_param->_nb_context);
    457477
    458478  DELETE1_SC_SIGNAL(out_DECOD_VAL                          ,_param->_nb_inst_decod);
     
    462482  DELETE1_SC_SIGNAL(out_DECOD_TYPE                         ,_param->_nb_inst_decod);
    463483  DELETE1_SC_SIGNAL(out_DECOD_OPERATION                    ,_param->_nb_inst_decod);
     484  DELETE1_SC_SIGNAL(out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod);
    464485  DELETE1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod);
    465486  DELETE1_SC_SIGNAL(out_DECOD_ADDRESS                      ,_param->_nb_inst_decod);
     
    477498  DELETE1_SC_SIGNAL(out_DECOD_NUM_REG_RE                   ,_param->_nb_inst_decod);
    478499  DELETE1_SC_SIGNAL(out_DECOD_EXCEPTION_USE                ,_param->_nb_inst_decod);
     500  DELETE1_SC_SIGNAL(out_DECOD_EXCEPTION                    ,_param->_nb_inst_decod);
    479501
    480502  DELETE1_SC_SIGNAL(out_PREDICT_VAL                        ,_param->_nb_inst_decod);
     
    491513//DELETE1_SC_SIGNAL( in_PREDICT_CAN_CONTINUE               ,_param->_nb_inst_decod);
    492514
    493   DELETE1_SC_SIGNAL( in_DEPTH_TAIL                         ,_param->_nb_context);
    494   DELETE1_SC_SIGNAL( in_DEPTH_NB_BRANCH                    ,_param->_nb_context);
     515  DELETE1_SC_SIGNAL( in_DEPTH_MIN                          ,_param->_nb_context);
     516  DELETE1_SC_SIGNAL( in_DEPTH_MAX                          ,_param->_nb_context);
    495517
    496518  DELETE1_SC_SIGNAL(out_NB_INST_DECOD_ALL                  ,_param->_nb_context);
     
    502524  DELETE_SC_SIGNAL(  in_CONTEXT_EVENT_ACK                  );
    503525  DELETE_SC_SIGNAL( out_CONTEXT_EVENT_CONTEXT_ID           );
     526  DELETE_SC_SIGNAL( out_CONTEXT_EVENT_DEPTH                );
    504527  DELETE_SC_SIGNAL( out_CONTEXT_EVENT_TYPE                 );
    505528  DELETE_SC_SIGNAL( out_CONTEXT_EVENT_IS_DELAY_SLOT        );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/include/Decod_unit.h

    r83 r88  
    7676  public    : SC_IN (Tbranch_state_t    )  **  in_IFETCH_BRANCH_STATE                ;//[nb_context]
    7777  public    : SC_IN (Tprediction_ptr_t  )  **  in_IFETCH_BRANCH_UPDATE_PREDICTION_ID ;//[nb_context]
     78  public    : SC_IN (Texception_t       )  **  in_IFETCH_EXCEPTION                   ;//[nb_context]
    7879                                                                                     
    7980    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     
    8485  public    : SC_OUT(Ttype_t            )  ** out_DECOD_TYPE                         ;//[nb_inst_decod]
    8586  public    : SC_OUT(Toperation_t       )  ** out_DECOD_OPERATION                    ;//[nb_inst_decod]
     87  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_NO_EXECUTE                   ;//[nb_inst_decod]
    8688  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_IS_DELAY_SLOT                ;//[nb_inst_decod]
    8789  public    : SC_OUT(Tgeneral_data_t    )  ** out_DECOD_ADDRESS                      ;//[nb_inst_decod]
     
    99101  public    : SC_OUT(Tspecial_address_t )  ** out_DECOD_NUM_REG_RE                   ;//[nb_inst_decod]
    100102  public    : SC_OUT(Texception_t       )  ** out_DECOD_EXCEPTION_USE                ;//[nb_inst_decod]
     103  public    : SC_OUT(Texception_t       )  ** out_DECOD_EXCEPTION                    ;//[nb_inst_decod]
    101104
    102105    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    115118
    116119    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    117   public    : SC_IN (Tdepth_t           )  **  in_DEPTH_TAIL              ;//[nb_context]
    118   public    : SC_IN (Tdepth_t           )  **  in_DEPTH_NB_BRANCH         ;//[nb_context]
     120  public    : SC_IN (Tdepth_t           )  **  in_DEPTH_MIN                          ;//[nb_context]
     121  public    : SC_IN (Tdepth_t           )  **  in_DEPTH_MAX                          ;//[nb_context]
    119122
    120123    // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    121   public    : SC_OUT(Tcounter_t         )  ** out_NB_INST_DECOD_ALL       ;//[nb_context]
     124  public    : SC_OUT(Tcounter_t         )  ** out_NB_INST_DECOD_ALL                  ;//[nb_context]
    122125
    123126    // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    129132  public    : SC_IN (Tcontrol_t         )   *  in_CONTEXT_EVENT_ACK                  ;
    130133  public    : SC_OUT(Tcontext_t         )   * out_CONTEXT_EVENT_CONTEXT_ID           ;
     134  public    : SC_OUT(Tcontext_t         )   * out_CONTEXT_EVENT_DEPTH                ;
    131135  public    : SC_OUT(Tevent_type_t      )   * out_CONTEXT_EVENT_TYPE                 ;
    132136  public    : SC_OUT(Tcontrol_t         )   * out_CONTEXT_EVENT_IS_DELAY_SLOT        ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/include/Parameters.h

    r87 r88  
    3030  public : uint32_t            _nb_inst_decod                ;
    3131  public : uint32_t            _size_queue                   ;
    32   public : uint32_t            _size_general_data            ;
     32//public : uint32_t            _size_general_data            ;
    3333  public : uint32_t          * _nb_branch_speculated         ; //[nb_context]
    34   public : uint32_t            _size_branch_update_prediction;
     34//public : uint32_t          * _size_branch_update_prediction; //[nb_context]
    3535  public : uint32_t            _nb_context_select            ;
    3636  public : Tpriority_t         _select_priority              ;
    3737  public : Tload_balancing_t   _select_load_balancing        ;
    3838  public : bool             ** _instruction_implemeted       ; //[nb_context][nb_instruction]
    39   public : morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (uint32_t);
     39  public : morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (void);
    4040
    41   public : uint32_t            _size_nb_inst_decod                   ;
    42   public : uint32_t            _max_nb_inst_fetch                    ;
    43 
    44   public : uint32_t            _size_address_inst                    ;
    45   public : uint32_t            _size_context_id                      ;
    46   public : uint32_t            _size_depth                           ;
    47   public : uint32_t            _size_inst_ifetch_ptr                 ;
    48 
    49   public : bool                _have_port_context_id                 ;
    50   public : bool                _have_port_depth                      ;
    51   public : bool                _have_port_branch_update_prediction_id;
    52   public : bool                _have_port_inst_ifetch_ptr            ;
     41//public : uint32_t            _size_address_inst;
     42  public : uint32_t            _max_nb_inst_fetch;
    5343
    5444  public : morpheo::behavioural::core::multi_front_end::front_end::decod_unit::decod      ::Parameters * _param_decod;
     
    6252                        uint32_t            size_general_data            ,
    6353                        uint32_t          * nb_branch_speculated         ,
    64                         uint32_t            size_branch_update_prediction,
     54//                      uint32_t          * size_branch_update_prediction,
    6555                        uint32_t            nb_context_select            ,
    6656                        Tpriority_t         select_priority              ,
    6757                        Tload_balancing_t   select_load_balancing        ,
    6858                        bool             ** instruction_implemeted       ,
    69                         morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t));
     59                        morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void),
     60                        bool                is_toplevel=false
     61                        );
    7062//   public : Parameters  (Parameters & param) ;
    7163  public : ~Parameters () ;
     64
     65  public :        void            copy       (void);
    7266
    7367  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit.cpp

    r83 r88  
    3838
    3939    usage_environment(_usage);
     40
     41#if DEBUG_Decod_unit == true
     42    log_printf(INFO,Decod_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     43
     44    std::cout << *param << std::endl;
     45#endif   
    4046
    4147    log_printf(INFO,Decod_unit,FUNCTION,_("Allocation"));
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_allocation.cpp

    r87 r88  
    5858    // ~~~~~[ Interface : "ifetch" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5959    {
    60       ALLOC2_INTERFACE("ifetch", IN, WEST, "Instruction's bundle", _param->_nb_context, _param->_nb_inst_fetch[alloc_interface_it1]);
    61 
    62      
    63       _ALLOC2_VALACK_IN ( in_IFETCH_VAL        ,VAL, _param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1]);
    64       _ALLOC2_VALACK_OUT(out_IFETCH_ACK        ,ACK, _param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1]);
    65       _ALLOC2_SIGNAL_IN ( in_IFETCH_INSTRUCTION,"instruction", Tinstruction_t, _param->_size_instruction,_param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1]);
     60      ALLOC2_INTERFACE("ifetch", IN, WEST, "Instruction's bundle", _param->_nb_context, _param->_nb_inst_fetch[it1]);
     61
     62     
     63      _ALLOC2_VALACK_IN ( in_IFETCH_VAL        ,VAL, _param->_nb_context, _param->_nb_inst_fetch[it1]);
     64      _ALLOC2_VALACK_OUT(out_IFETCH_ACK        ,ACK, _param->_nb_context, _param->_nb_inst_fetch[it1]);
     65      _ALLOC2_SIGNAL_IN ( in_IFETCH_INSTRUCTION,"instruction", Tinstruction_t, _param->_size_instruction,_param->_nb_context, _param->_nb_inst_fetch[it1]);
    6666    }
    6767    {
    6868      ALLOC1_INTERFACE("ifetch", IN, WEST, "Instruction's bundle", _param->_nb_context);
    6969     
    70       ALLOC1_SIGNAL_IN (in_IFETCH_CONTEXT_ID                 ,"context_id"                 ,Tcontext_t         ,_param->_size_context_id              );
    71       ALLOC1_SIGNAL_IN (in_IFETCH_ADDRESS                    ,"address"                    ,Tgeneral_address_t ,_param->_size_address_inst            );
    72 //    ALLOC1_SIGNAL_IN (in_IFETCH_ADDRESS_NEXT               ,"address_next"               ,Tgeneral_address_t ,_param->_size_address_inst            );
    73       ALLOC1_SIGNAL_IN (in_IFETCH_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t ,_param->_size_inst_ifetch_ptr         );
    74       ALLOC1_SIGNAL_IN (in_IFETCH_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state            );
    75       ALLOC1_SIGNAL_IN (in_IFETCH_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_branch_update_prediction);
     70      ALLOC1_SIGNAL_IN (in_IFETCH_CONTEXT_ID                 ,"context_id"                 ,Tcontext_t         ,_param->_size_context_id      );
     71      ALLOC1_SIGNAL_IN (in_IFETCH_ADDRESS                    ,"address"                    ,Tgeneral_address_t ,_param->_size_instruction_address    );
     72//    ALLOC1_SIGNAL_IN (in_IFETCH_ADDRESS_NEXT               ,"address_next"               ,Tgeneral_address_t ,_param->_size_instruction_address    );
     73      ALLOC1_SIGNAL_IN (in_IFETCH_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t ,_param->_size_inst_ifetch_ptr );
     74      ALLOC1_SIGNAL_IN (in_IFETCH_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state    );
     75      ALLOC1_SIGNAL_IN (in_IFETCH_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth           );
     76      ALLOC1_SIGNAL_IN (in_IFETCH_EXCEPTION                  ,"exception"                  ,Texception_t       ,_param->_size_exception_ifetch);
    7677    }
    7778
     
    8687      ALLOC1_SIGNAL_OUT(out_DECOD_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type                  );
    8788      ALLOC1_SIGNAL_OUT(out_DECOD_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation             );
     89      ALLOC1_SIGNAL_OUT(out_DECOD_NO_EXECUTE   ,"no_execute"   ,Tcontrol_t        ,1                                   );
    8890      ALLOC1_SIGNAL_OUT(out_DECOD_IS_DELAY_SLOT,"is_delay_slot",Tcontrol_t        ,1                                   );
    89       ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS      ,"address"      ,Tgeneral_data_t   ,_param->_size_address_inst          );
     91      ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS      ,"address"      ,Tgeneral_data_t   ,_param->_size_instruction_address          );
    9092      ALLOC1_SIGNAL_OUT(out_DECOD_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t        ,1                                   );
    9193      ALLOC1_SIGNAL_OUT(out_DECOD_IMMEDIAT     ,"immediat"     ,Tgeneral_data_t   ,_param->_size_general_data          );
     
    101103      ALLOC1_SIGNAL_OUT(out_DECOD_NUM_REG_RE   ,"num_reg_re"   ,Tspecial_address_t,_param->_size_special_register_logic);
    102104      ALLOC1_SIGNAL_OUT(out_DECOD_EXCEPTION_USE,"exception_use",Texception_t      ,_param->_size_exception_use         );
     105      ALLOC1_SIGNAL_OUT(out_DECOD_EXCEPTION    ,"exception"    ,Texception_t      ,_param->_size_exception_decod       );
    103106    }
    104107
     
    109112      ALLOC1_VALACK_OUT(out_PREDICT_VAL                        ,VAL);
    110113      ALLOC1_VALACK_IN ( in_PREDICT_ACK                        ,ACK);
    111       ALLOC1_SIGNAL_OUT(out_PREDICT_CONTEXT_ID                 ,"context_id"                 ,Tcontext_t         ,_param->_size_context_id              );
    112       ALLOC1_SIGNAL_OUT(out_PREDICT_MATCH_INST_IFETCH_PTR      ,"match_inst_ifetch_ptr"      ,Tcontrol_t         ,1                                     );
    113       ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state            );
    114       ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_branch_update_prediction);
    115       ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_CONDITION           ,"branch_condition"           ,Tbranch_condition_t,_param->_size_branch_condition        );
    116 //    ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_STACK_WRITE         ,"branch_stack_write"         ,Tcontrol_t         ,1                                     );
    117       ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_DIRECTION           ,"branch_direction"           ,Tcontrol_t         ,1                                     );
    118       ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_SRC                ,"address_src"                ,Tgeneral_data_t    ,_param->_size_address_inst            );
    119       ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_DEST               ,"address_dest"               ,Tgeneral_data_t    ,_param->_size_address_inst            );
    120 //    ALLOC1_SIGNAL_IN ( in_PREDICT_CAN_CONTINUE               ,"can_continue"               ,Tcontrol_t         ,1                                     );
     114      ALLOC1_SIGNAL_OUT(out_PREDICT_CONTEXT_ID                 ,"context_id"                 ,Tcontext_t         ,_param->_size_context_id      );
     115      ALLOC1_SIGNAL_OUT(out_PREDICT_MATCH_INST_IFETCH_PTR      ,"match_inst_ifetch_ptr"      ,Tcontrol_t         ,1                             );
     116      ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state    );
     117      ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth           );
     118      ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_CONDITION           ,"branch_condition"           ,Tbranch_condition_t,_param->_size_branch_condition);
     119//    ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_STACK_WRITE         ,"branch_stack_write"         ,Tcontrol_t         ,1                             );
     120      ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_DIRECTION           ,"branch_direction"           ,Tcontrol_t         ,1                             );
     121      ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_SRC                ,"address_src"                ,Tgeneral_data_t    ,_param->_size_instruction_address    );
     122      ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_DEST               ,"address_dest"               ,Tgeneral_data_t    ,_param->_size_instruction_address    );
     123//    ALLOC1_SIGNAL_IN ( in_PREDICT_CAN_CONTINUE               ,"can_continue"               ,Tcontrol_t         ,1                             );
    121124    }
    122125
     
    125128      ALLOC1_INTERFACE("depth",IN ,NORTH,"Depth", _param->_nb_context);
    126129
    127       ALLOC1_SIGNAL_IN ( in_DEPTH_TAIL     ,"tail"     ,Tdepth_t           ,_param->_size_depth  );
    128       if (_param->_have_port_depth)
    129       ALLOC1_SIGNAL_IN ( in_DEPTH_NB_BRANCH,"nb_branch",Tdepth_t           ,_param->_size_depth+1);
    130     }
    131 
    132     // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     130      ALLOC1_SIGNAL_IN ( in_DEPTH_MIN      ,"min"      ,Tdepth_t           ,_param->_size_depth  );
     131      ALLOC1_SIGNAL_IN ( in_DEPTH_MAX      ,"max"      ,Tdepth_t           ,_param->_size_depth+1);
     132    }
     133
     134    // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
    133135    {
    134136      ALLOC1_INTERFACE("nb_inst",OUT,NORTH,"Instruction's number", _param->_nb_context);
    135137
    136       ALLOC1_SIGNAL_OUT(out_NB_INST_DECOD_ALL  ,"decod_all"   ,Tcontext_t         ,_param->_size_nb_inst_decod+1);
     138      ALLOC1_SIGNAL_OUT(out_NB_INST_DECOD_ALL  ,"decod_all"   ,Tcontext_t         ,_param->_size_nb_inst_decod);
    137139    }
    138140   
     
    152154      ALLOC_VALACK_IN ( in_CONTEXT_EVENT_ACK          ,ACK);
    153155      ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_CONTEXT_ID   ,"context_id"   ,Tcontext_t     ,_param->_size_context_id  );
     156      ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_DEPTH        ,"depth"        ,Tdepth_t       ,_param->_size_depth       );
    154157      ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_TYPE         ,"type"         ,Tevent_type_t  ,_param->_size_event_type  );
    155158      ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_IS_DELAY_SLOT,"is_delay_slot",Tcontrol_t     ,1                         );
    156       ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_ADDRESS      ,"address"      ,Tgeneral_data_t,_param->_size_address_inst);
    157       ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_ADDRESS_EPCR ,"address_epcr" ,Tgeneral_data_t,_param->_size_address_inst);
     159      ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_ADDRESS      ,"address"      ,Tgeneral_data_t,_param->_size_instruction_address);
     160      ALLOC_SIGNAL_OUT(out_CONTEXT_EVENT_ADDRESS_EPCR ,"address_epcr" ,Tgeneral_data_t,_param->_size_instruction_address);
    158161    }
    159162   
     
    254257          PORT_MAP(_component,src , "in_IFETCH_"+toString(i)+"_BRANCH_STATE"               ,
    255258                              dest, "in_IFETCH_"+toString(i)+"_BRANCH_STATE"               );
    256           if (_param->_have_port_branch_update_prediction_id)
     259          if (_param->_have_port_depth)
    257260          PORT_MAP(_component,src , "in_IFETCH_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID",
    258261                              dest, "in_IFETCH_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID");
     262          PORT_MAP(_component,src , "in_IFETCH_"+toString(i)+"_EXCEPTION"                  ,
     263                              dest, "in_IFETCH_"+toString(i)+"_EXCEPTION"                  );
    259264        }
    260265       
     
    282287          COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_OPERATION"    ,
    283288                                   dest, "in_DECOD_IN_"+toString(i)+"_OPERATION"    );
     289          COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_NO_EXECUTE"   ,
     290                                   dest, "in_DECOD_IN_"+toString(i)+"_NO_EXECUTE"   );
    284291          COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_IS_DELAY_SLOT",
    285292                                   dest, "in_DECOD_IN_"+toString(i)+"_IS_DELAY_SLOT");
     
    312319          COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_EXCEPTION_USE",
    313320                                   dest, "in_DECOD_IN_"+toString(i)+"_EXCEPTION_USE");
     321          COMPONENT_MAP(_component,src ,"out_DECOD_"   +toString(i)+"_EXCEPTION"    ,
     322                                   dest, "in_DECOD_IN_"+toString(i)+"_EXCEPTION"    );
    314323        }
    315324
     
    334343          PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_BRANCH_STATE"               ,
    335344                              dest,"out_PREDICT_"+toString(i)+"_BRANCH_STATE"               );
    336           if (_param->_have_port_branch_update_prediction_id)
     345          if (_param->_have_port_depth)
    337346          PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID",
    338347                              dest,"out_PREDICT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID");
     
    382391        PORT_MAP(_component,src ,"out_CONTEXT_EVENT_CONTEXT_ID"   ,
    383392                            dest,"out_CONTEXT_EVENT_CONTEXT_ID"   );
     393        if (_param->_have_port_depth)
     394        PORT_MAP(_component,src ,"out_CONTEXT_EVENT_DEPTH"        ,
     395                            dest,"out_CONTEXT_EVENT_DEPTH"        );
    384396        PORT_MAP(_component,src ,"out_CONTEXT_EVENT_TYPE"         ,
    385397                            dest,"out_CONTEXT_EVENT_TYPE"         );
     
    417429      // in_DECOD_IN_TYPE           - component decod
    418430      // in_DECOD_IN_OPERATION      - component decod
     431      // in_DECOD_IN_NO_EXECUTE     - component decod
    419432      // in_DECOD_IN_IS_DELAY_SLOT  - component decod
    420433      // in_DECOD_IN_ADDRESS        - component decod
     
    432445      // in_DECOD_IN_NUM_REG_RE     - component decod
    433446      // in_DECOD_IN_EXCEPTION_USE  - component decod
     447      // in_DECOD_IN_EXCEPTION      - component decod
    434448
    435449      for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
     
    456470          PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_OPERATION"    ,
    457471                              dest,"out_DECOD_"    +toString(i)+"_OPERATION"    );
     472          PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_NO_EXECUTE"   ,
     473                              dest,"out_DECOD_"    +toString(i)+"_NO_EXECUTE"   );
    458474          PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_IS_DELAY_SLOT",
    459475                              dest,"out_DECOD_"    +toString(i)+"_IS_DELAY_SLOT");
     
    486502          PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_EXCEPTION_USE",
    487503                              dest,"out_DECOD_"    +toString(i)+"_EXCEPTION_USE");
    488         }
    489 
    490       if (_param->_have_port_depth)
     504          PORT_MAP(_component,src ,"out_DECOD_OUT_"+toString(i)+"_EXCEPTION"    ,
     505                              dest,"out_DECOD_"    +toString(i)+"_EXCEPTION"    );
     506        }
     507
    491508      for (uint32_t i=0; i<_param->_nb_context; i++)
    492509        {
     
    498515#endif
    499516
    500           PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_TAIL"     ,
    501                               dest, "in_DEPTH_"+toString(i)+"_TAIL"     );
    502           PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_NB_BRANCH",
    503                               dest, "in_DEPTH_"+toString(i)+"_NB_BRANCH");
     517          if (_param->_have_port_depth)
     518          PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_MIN",
     519                              dest, "in_DEPTH_"+toString(i)+"_MIN");
     520          PORT_MAP(_component,src , "in_DEPTH_"+toString(i)+"_MAX",
     521                              dest, "in_DEPTH_"+toString(i)+"_MAX");
    504522        }
    505523
     
    518536    }
    519537    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    520     if (DEBUG_Decod_unit == true)
     538#if DEBUG_Decod_unit == true
    521539      _component->test_map();
    522    
     540#endif
     541
    523542#ifdef POSITION
    524543    if (usage_is_set(_usage,USE_POSITION))
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_deallocation.cpp

    r83 r88  
    2828        delete    in_NRESET;
    2929
    30         DELETE2_SIGNAL( in_IFETCH_VAL                         ,_param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1],1);
    31         DELETE2_SIGNAL(out_IFETCH_ACK                         ,_param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1],1);
    32         DELETE2_SIGNAL( in_IFETCH_INSTRUCTION                 ,_param->_nb_context, _param->_nb_inst_fetch[alloc_signal_it1],_param->_size_instruction);
     30        DELETE2_SIGNAL( in_IFETCH_VAL                         ,_param->_nb_context, _param->_nb_inst_fetch[it1],1);
     31        DELETE2_SIGNAL(out_IFETCH_ACK                         ,_param->_nb_context, _param->_nb_inst_fetch[it1],1);
     32        DELETE2_SIGNAL( in_IFETCH_INSTRUCTION                 ,_param->_nb_context, _param->_nb_inst_fetch[it1],_param->_size_instruction);
    3333       
    34         DELETE1_SIGNAL(in_IFETCH_CONTEXT_ID                   ,_param->_nb_context,_param->_size_context_id              );
    35         DELETE1_SIGNAL(in_IFETCH_ADDRESS                      ,_param->_nb_context,_param->_size_general_data            );
    36 //      DELETE1_SIGNAL(in_IFETCH_ADDRESS_NEXT                 ,_param->_nb_context,_param->_size_general_data            );
    37         DELETE1_SIGNAL(in_IFETCH_INST_IFETCH_PTR              ,_param->_nb_context,_param->_size_inst_ifetch_ptr         );
    38         DELETE1_SIGNAL(in_IFETCH_BRANCH_STATE                 ,_param->_nb_context,_param->_size_branch_state            );
    39         DELETE1_SIGNAL(in_IFETCH_BRANCH_UPDATE_PREDICTION_ID  ,_param->_nb_context,_param->_size_branch_update_prediction);
     34        DELETE1_SIGNAL(in_IFETCH_CONTEXT_ID                   ,_param->_nb_context,_param->_size_context_id      );
     35        DELETE1_SIGNAL(in_IFETCH_ADDRESS                      ,_param->_nb_context,_param->_size_general_data    );
     36//      DELETE1_SIGNAL(in_IFETCH_ADDRESS_NEXT                 ,_param->_nb_context,_param->_size_general_data    );
     37        DELETE1_SIGNAL(in_IFETCH_INST_IFETCH_PTR              ,_param->_nb_context,_param->_size_inst_ifetch_ptr );
     38        DELETE1_SIGNAL(in_IFETCH_BRANCH_STATE                 ,_param->_nb_context,_param->_size_branch_state    );
     39        DELETE1_SIGNAL(in_IFETCH_BRANCH_UPDATE_PREDICTION_ID  ,_param->_nb_context,_param->_size_depth           );
     40        DELETE1_SIGNAL(in_IFETCH_EXCEPTION                    ,_param->_nb_context,_param->_size_exception_ifetch);
    4041       
    4142        DELETE1_SIGNAL(out_DECOD_VAL                          ,_param->_nb_inst_decod,1);
     
    4546        DELETE1_SIGNAL(out_DECOD_TYPE                         ,_param->_nb_inst_decod,_param->_size_type                  );
    4647        DELETE1_SIGNAL(out_DECOD_OPERATION                    ,_param->_nb_inst_decod,_param->_size_operation             );
     48        DELETE1_SIGNAL(out_DECOD_NO_EXECUTE                   ,_param->_nb_inst_decod,1                                   );
    4749        DELETE1_SIGNAL(out_DECOD_IS_DELAY_SLOT                ,_param->_nb_inst_decod,1                                   );
    4850        DELETE1_SIGNAL(out_DECOD_ADDRESS                      ,_param->_nb_inst_decod,_param->_size_general_data          );
     
    6062        DELETE1_SIGNAL(out_DECOD_NUM_REG_RE                   ,_param->_nb_inst_decod,_param->_size_special_register_logic);
    6163        DELETE1_SIGNAL(out_DECOD_EXCEPTION_USE                ,_param->_nb_inst_decod,_param->_size_exception_use         );
     64        DELETE1_SIGNAL(out_DECOD_EXCEPTION                    ,_param->_nb_inst_decod,_param->_size_exception_decod       );
    6265       
    6366        DELETE1_SIGNAL(out_PREDICT_VAL                        ,_param->_nb_inst_decod,1);
    6467        DELETE1_SIGNAL( in_PREDICT_ACK                        ,_param->_nb_inst_decod,1);
    65         DELETE1_SIGNAL(out_PREDICT_CONTEXT_ID                 ,_param->_nb_inst_decod,_param->_size_context_id              );
    66         DELETE1_SIGNAL(out_PREDICT_MATCH_INST_IFETCH_PTR      ,_param->_nb_inst_decod,1                                     );
    67         DELETE1_SIGNAL(out_PREDICT_BRANCH_STATE               ,_param->_nb_inst_decod,_param->_size_branch_state            );
    68         DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_inst_decod,_param->_size_branch_update_prediction);
    69         DELETE1_SIGNAL(out_PREDICT_BRANCH_CONDITION           ,_param->_nb_inst_decod,_param->_size_branch_condition        );
    70 //      DELETE1_SIGNAL(out_PREDICT_BRANCH_STACK_WRITE         ,_param->_nb_inst_decod,1                                     );
    71         DELETE1_SIGNAL(out_PREDICT_BRANCH_DIRECTION           ,_param->_nb_inst_decod,1                                     );
    72         DELETE1_SIGNAL(out_PREDICT_ADDRESS_SRC                ,_param->_nb_inst_decod,_param->_size_general_data            );
    73         DELETE1_SIGNAL(out_PREDICT_ADDRESS_DEST               ,_param->_nb_inst_decod,_param->_size_general_data            );
    74 //      DELETE1_SIGNAL( in_PREDICT_CAN_CONTINUE               ,_param->_nb_inst_decod,1                                     );
     68        DELETE1_SIGNAL(out_PREDICT_CONTEXT_ID                 ,_param->_nb_inst_decod,_param->_size_context_id      );
     69        DELETE1_SIGNAL(out_PREDICT_MATCH_INST_IFETCH_PTR      ,_param->_nb_inst_decod,1                             );
     70        DELETE1_SIGNAL(out_PREDICT_BRANCH_STATE               ,_param->_nb_inst_decod,_param->_size_branch_state    );
     71        DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_inst_decod,_param->_size_depth           );
     72        DELETE1_SIGNAL(out_PREDICT_BRANCH_CONDITION           ,_param->_nb_inst_decod,_param->_size_branch_condition);
     73//      DELETE1_SIGNAL(out_PREDICT_BRANCH_STACK_WRITE         ,_param->_nb_inst_decod,1                             );
     74        DELETE1_SIGNAL(out_PREDICT_BRANCH_DIRECTION           ,_param->_nb_inst_decod,1                             );
     75        DELETE1_SIGNAL(out_PREDICT_ADDRESS_SRC                ,_param->_nb_inst_decod,_param->_size_general_data    );
     76        DELETE1_SIGNAL(out_PREDICT_ADDRESS_DEST               ,_param->_nb_inst_decod,_param->_size_general_data    );
     77//      DELETE1_SIGNAL( in_PREDICT_CAN_CONTINUE               ,_param->_nb_inst_decod,1                             );
    7578       
    76         DELETE1_SIGNAL( in_DEPTH_TAIL                         ,_param->_nb_context,_param->_size_depth  );
    77         if (_param->_have_port_depth)                       
    78         DELETE1_SIGNAL( in_DEPTH_NB_BRANCH                    ,_param->_nb_context,_param->_size_depth+1);
     79        DELETE1_SIGNAL( in_DEPTH_MIN                          ,_param->_nb_context,_param->_size_depth  );
     80        DELETE1_SIGNAL( in_DEPTH_MAX                          ,_param->_nb_context,_param->_size_depth+1);
    7981       
    80         DELETE1_SIGNAL(out_NB_INST_DECOD_ALL                  ,_param->_nb_context,_param->_size_nb_inst_decod+1);
     82        DELETE1_SIGNAL(out_NB_INST_DECOD_ALL                  ,_param->_nb_context,_param->_size_nb_inst_decod);
    8183       
    8284        DELETE1_SIGNAL(in_CONTEXT_DECOD_ENABLE                ,_param->_nb_context,1);
     
    8688        DELETE_SIGNAL( in_CONTEXT_EVENT_ACK                   ,1);
    8789        DELETE_SIGNAL(out_CONTEXT_EVENT_CONTEXT_ID            ,_param->_size_context_id  );
     90        DELETE_SIGNAL(out_CONTEXT_EVENT_DEPTH                 ,_param->_size_depth       );
    8891        DELETE_SIGNAL(out_CONTEXT_EVENT_TYPE                  ,_param->_size_event_type  );
    8992        DELETE_SIGNAL(out_CONTEXT_EVENT_IS_DELAY_SLOT         ,1                         );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Parameters.cpp

    r87 r88  
    2525                          uint32_t            size_general_data            ,
    2626                          uint32_t          * nb_branch_speculated         ,
    27                           uint32_t            size_branch_update_prediction,
     27//                        uint32_t          * size_branch_update_prediction,
    2828                          uint32_t            nb_context_select            ,
    2929                          Tpriority_t         select_priority              ,
    3030                          Tload_balancing_t   select_load_balancing        ,
    3131                          bool             ** instruction_implemeted       ,
    32                           morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t))
     32                          morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void),
     33                          bool                is_toplevel                         
     34                          )
    3335  {
    3436    log_begin(Decod_unit,FUNCTION);
     
    3840    _nb_inst_decod                 = nb_inst_decod                ;
    3941    _size_queue                    = size_queue                   ;
    40     _size_general_data             = size_general_data            ;
     42//  _size_general_data             = size_general_data            ;
    4143    _nb_branch_speculated          = nb_branch_speculated         ;
    42     _size_branch_update_prediction = size_branch_update_prediction;
     44//  _size_branch_update_prediction = size_branch_update_prediction;
    4345    _nb_context_select             = nb_context_select            ;
    4446    _select_priority               = select_priority              ;
     
    4850
    4951    _max_nb_inst_fetch                     = max<uint32_t>(_nb_inst_fetch,_nb_context);
     52//  _size_address_inst                     = size_general_data-2;
    5053
    51     _size_address_inst                     = size_general_data-2;
    52     _size_context_id                       = log2(nb_context          );
    53     _size_depth                            = log2(max<uint32_t>(_nb_branch_speculated,_nb_context));
    54     _size_inst_ifetch_ptr                  = log2(_max_nb_inst_fetch  );
    55 
    56     _have_port_context_id                  = (_size_context_id > 0);
    57     _have_port_depth                       = (_size_depth      > 0);
    58     _have_port_branch_update_prediction_id = (_size_branch_update_prediction > 0);
    59     _have_port_inst_ifetch_ptr             = (_size_inst_ifetch_ptr > 0);
    60    
    6154    test();
    6255
     
    6558       _nb_inst_fetch                ,
    6659       _nb_inst_decod                ,
    67        max<uint32_t>(_nb_branch_speculated,_nb_context),
    68        _size_branch_update_prediction,
     60       _nb_branch_speculated,
     61//     _size_branch_update_prediction,
    6962       _nb_context_select            ,
    70        _size_general_data            ,
     63        size_general_data            ,
    7164       _select_priority              ,
    7265       _select_load_balancing        ,
     
    7871       _nb_inst_decod       ,
    7972       _size_queue          ,
    80        _size_general_data   ,
     73        size_general_data   ,
    8174       _nb_branch_speculated);
    8275
    83     _size_nb_inst_decod = _param_decod_queue->_size_nb_inst;
    84    
     76    if (is_toplevel)
     77      {
     78        _size_context_id                       = log2(_nb_context);
     79        _size_depth                            = max<uint32_t>(_nb_branch_speculated,_nb_context);
     80//      _size_branch_update_prediction_id      = max<uint32_t>(_size_branch_update_prediction,_nb_context);
     81        _size_inst_ifetch_ptr                  = log2(max<uint32_t>(_nb_inst_fetch,_nb_context));
     82        _size_nb_inst_decod                    = log2(_size_queue)+1;
     83
     84        _size_instruction_address              = size_general_data-2;
     85        _size_general_data                     = size_general_data;
     86
     87        _have_port_context_id                  = _size_context_id > 0;
     88        _have_port_depth                       = (_size_depth                       > 0);
     89//      _have_port_branch_update_prediction_id = (_size_branch_update_prediction_id > 0);
     90        _have_port_inst_ifetch_ptr             = (_size_inst_ifetch_ptr             > 0);
     91
     92        copy ();
     93      }
     94
    8595    log_end(Decod_unit,FUNCTION);
    8696  };
     
    101111    log_begin(Decod_unit,FUNCTION);
    102112
    103     delete _param_decod;
    104     delete _param_decod_queue;
     113    delete    _param_decod;
     114    delete    _param_decod_queue;
     115
     116    log_end(Decod_unit,FUNCTION);
     117  };
     118
     119
     120#undef  FUNCTION
     121#define FUNCTION "Decod_unit::copy"
     122  void Parameters::copy (void)
     123  {
     124    log_begin(Decod_unit,FUNCTION);
     125
     126    COPY(_param_decod      );
     127    COPY(_param_decod_queue);
    105128
    106129    log_end(Decod_unit,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Parameters_print.cpp

    r83 r88  
    3030    xml.singleton_begin("size_queue                   "); xml.attribut("value",toString(_size_queue                   )); xml.singleton_end();
    3131    xml.singleton_begin("size_general_data            "); xml.attribut("value",toString(_size_general_data            )); xml.singleton_end();
    32     xml.singleton_begin("size_branch_update_prediction"); xml.attribut("value",toString(_size_branch_update_prediction)); xml.singleton_end();
    3332    xml.singleton_begin("nb_context_select            "); xml.attribut("value",toString(_nb_context_select            )); xml.singleton_end();
    3433    xml.singleton_begin("select_priority              "); xml.attribut("value",toString(_select_priority              )); xml.singleton_end();
     
    4342        xml.  singleton_begin("nb_inst_fetch                "); xml.attribut("value",toString(_nb_inst_fetch                [i])); xml.singleton_end();
    4443        xml.  singleton_begin("nb_branch_speculated         "); xml.attribut("value",toString(_nb_branch_speculated         [i])); xml.singleton_end();
    45 
     44//      xml.  singleton_begin("size_branch_update_prediction"); xml.attribut("value",toString(_size_branch_update_prediction[i])); xml.singleton_end();
    4645        xml. balise_close();
    4746      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Address_management_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/src/main.cpp

    r81 r88  
    4444        (_nb_instruction               ,
    4545         _size_address                 ,
    46          _size_branch_update_prediction);
     46         _size_branch_update_prediction,
     47         true // is_toplevel
     48         );
    4749     
    4850      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/src/test.cpp

    r84 r88  
    2424#endif
    2525
     26  Tusage_t _usage = USE_ALL;
     27
     28//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     29//   _usage = usage_unset(_usage,USE_VHDL                 );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     31//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     32//   _usage = usage_unset(_usage,USE_POSITION             );
     33//   _usage = usage_unset(_usage,USE_STATISTICS           );
     34//   _usage = usage_unset(_usage,USE_INFORMATION          );
     35
    2636  Address_management * _Address_management = new Address_management
    2737    (name.c_str(),
     
    3040#endif
    3141     _param,
    32      USE_ALL);
     42     _usage);
    3343 
    3444#ifdef SYSTEMC
     
    6272  ALLOC_SC_SIGNAL (out_EVENT_ACK                          ,"out_EVENT_ACK                          ",Tcontrol_t        );
    6373  ALLOC_SC_SIGNAL ( in_EVENT_ADDRESS                      ," in_EVENT_ADDRESS                      ",Tgeneral_address_t);
     74  ALLOC_SC_SIGNAL ( in_EVENT_ADDRESS_NEXT                 ," in_EVENT_ADDRESS_NEXT                 ",Tgeneral_address_t);
     75  ALLOC_SC_SIGNAL ( in_EVENT_ADDRESS_NEXT_VAL             ," in_EVENT_ADDRESS_NEXT_VAL             ",Tcontrol_t        );
     76  ALLOC_SC_SIGNAL ( in_EVENT_IS_DS_TAKE                   ," in_EVENT_IS_DS_TAKE                   ",Tcontrol_t        );
    6477 
    6578  /********************************************************
     
    7689  INSTANCE_SC_SIGNAL (_Address_management,out_ADDRESS_INSTRUCTION_ADDRESS        );
    7790  INSTANCE1_SC_SIGNAL(_Address_management,out_ADDRESS_INSTRUCTION_ENABLE         ,_param->_nb_instruction);
    78   if (_param->_have_port_instruction_ptr)
     91  if (_param->_have_port_inst_ifetch_ptr)
    7992  INSTANCE_SC_SIGNAL (_Address_management,out_ADDRESS_INST_IFETCH_PTR            );
    8093  INSTANCE_SC_SIGNAL (_Address_management,out_ADDRESS_BRANCH_STATE               );
    81   if (_param->_have_port_branch_update_prediction_id)
     94  if (_param->_have_port_depth)
    8295  INSTANCE_SC_SIGNAL (_Address_management,out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID);
    8396  INSTANCE_SC_SIGNAL (_Address_management,out_PREDICT_VAL                        );
     
    89102  INSTANCE_SC_SIGNAL (_Address_management, in_PREDICT_PC_NEXT_IS_DS_TAKE         );
    90103  INSTANCE1_SC_SIGNAL(_Address_management, in_PREDICT_INSTRUCTION_ENABLE         ,_param->_nb_instruction);
    91   if (_param->_have_port_instruction_ptr)
     104  if (_param->_have_port_inst_ifetch_ptr)
    92105  INSTANCE_SC_SIGNAL (_Address_management, in_PREDICT_INST_IFETCH_PTR            );
    93106  INSTANCE_SC_SIGNAL (_Address_management, in_PREDICT_BRANCH_STATE               );
    94   if (_param->_have_port_branch_update_prediction_id)
     107  if (_param->_have_port_depth)
    95108  INSTANCE_SC_SIGNAL (_Address_management, in_PREDICT_BRANCH_UPDATE_PREDICTION_ID);
    96109  INSTANCE_SC_SIGNAL (_Address_management, in_EVENT_VAL                          );
    97110  INSTANCE_SC_SIGNAL (_Address_management,out_EVENT_ACK                          );
    98111  INSTANCE_SC_SIGNAL (_Address_management, in_EVENT_ADDRESS                      );
     112  INSTANCE_SC_SIGNAL (_Address_management, in_EVENT_ADDRESS_NEXT                 );
     113  INSTANCE_SC_SIGNAL (_Address_management, in_EVENT_ADDRESS_NEXT_VAL             );
     114  INSTANCE_SC_SIGNAL (_Address_management, in_EVENT_IS_DS_TAKE                   );
    99115
    100116  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    143159  Tcontrol_t      nn_val  = false;
    144160
    145   Tgeneral_data_t c_addr  = 0x100;
    146   Tgeneral_data_t n_addr  = 0x100;
    147   Tgeneral_data_t nn_addr = 0x100;
     161  Tgeneral_data_t c_addr  = 0x100>>2;
     162  Tgeneral_data_t n_addr  = 0x100>>2;
     163  Tgeneral_data_t nn_addr = 0x100>>2;
    148164
    149165  Tcontrol_t      c_enable [_param->_nb_instruction];
     
    159175
    160176  LABEL("Send Reset");
    161   do
    162     {
    163       in_EVENT_VAL    ->write(1);
    164       in_EVENT_ADDRESS->write(n_addr);
    165       SC_START(1); 
    166     } while (out_EVENT_ACK->read() == false);
    167   in_EVENT_VAL    ->write(0);
     177//   do
     178//     {
     179//       in_EVENT_VAL             ->write(1);
     180//       in_EVENT_ADDRESS         ->write(n_addr);
     181//       in_EVENT_ADDRESS_NEXT    ->write(nn_addr);
     182//       in_EVENT_ADDRESS_NEXT_VAL->write(0);
     183//       in_EVENT_IS_DS_TAKE      ->write(0);
     184//       SC_START(1); 
     185//     } while (out_EVENT_ACK->read() == false);
     186//   in_EVENT_VAL    ->write(0);
    168187
    169188  n_val = 1;
     
    206225      }
    207226
    208       in_EVENT_VAL    ->write((rand()%100)<percent_transaction_event  );
    209       in_EVENT_ADDRESS->write(0x100);
     227      in_EVENT_VAL             ->write((rand()%100)<percent_transaction_event  );
     228      in_EVENT_ADDRESS         ->write(0x77);
     229      in_EVENT_ADDRESS_NEXT    ->write(0x171);
     230      Tcontrol_t next_val = rand()%2;
     231      in_EVENT_ADDRESS_NEXT_VAL->write(next_val);
     232      in_EVENT_IS_DS_TAKE      ->write(next_val);
    210233
    211234      //-------------------------------------------------
     
    238261          for (uint32_t i=0; i<_param->_nb_instruction; i++)
    239262          TEST(Tcontrol_t        ,out_ADDRESS_INSTRUCTION_ENABLE     [i] ->read(),c_enable[i]);
    240           if (_param->_have_port_instruction_ptr)
     263          if (_param->_have_port_inst_ifetch_ptr)
    241264          TEST(Tinst_ifetch_ptr_t,out_ADDRESS_INST_IFETCH_PTR            ->read(),0);
    242265          TEST(Tbranch_state_t   ,out_ADDRESS_BRANCH_STATE               ->read(),0);
    243           if (_param->_have_port_branch_update_prediction_id)
     266          if (_param->_have_port_depth)
    244267          TEST(Tprediction_ptr_t ,out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID->read(),0);
    245268
     
    272295          LABEL("EVENT      : Transaction accepted");
    273296
    274           c_val           = false;
    275           n_val           = true;
    276           nn_val          = false;
    277 
    278           n_addr         = in_EVENT_ADDRESS->read();
    279           n_is_ds_take   = 0;
     297          c_val        = false;
     298          n_val        = true;
     299          n_addr       = in_EVENT_ADDRESS         ->read();
     300          n_is_ds_take = in_EVENT_IS_DS_TAKE      ->read();
     301          nn_val       = in_EVENT_ADDRESS_NEXT_VAL->read();
     302          nn_addr      = in_EVENT_ADDRESS_NEXT    ->read();
     303          nn_is_ds_take= false;
     304//           nn_val = false;
     305//           n_is_ds_take = 0;
    280306
    281307          n_enable [0] = 1;
    282           for (uint32_t i=1; i<_param->_nb_instruction; i++)
    283             n_enable [i] = 0;
     308          for (uint32_t i=1; i<_param->_nb_instruction; i++)
     309            n_enable [i] = 0;
    284310        }
    285311
     
    347373  delete    out_EVENT_ACK                          ;
    348374  delete     in_EVENT_ADDRESS                      ;
     375  delete     in_EVENT_ADDRESS_NEXT                 ;
     376  delete     in_EVENT_ADDRESS_NEXT_VAL             ;
     377  delete     in_EVENT_IS_DS_TAKE                   ;
    349378#endif
    350379
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/include/Address_management.h

    r84 r88  
    9191  public    : SC_OUT(Tcontrol_t        )    * out_EVENT_ACK                           ;
    9292  public    : SC_IN (Tgeneral_address_t)    *  in_EVENT_ADDRESS                       ;
     93  public    : SC_IN (Tgeneral_address_t)    *  in_EVENT_ADDRESS_NEXT                  ;
     94  public    : SC_IN (Tcontrol_t        )    *  in_EVENT_ADDRESS_NEXT_VAL              ;
     95  public    : SC_IN (Tcontrol_t        )    *  in_EVENT_IS_DS_TAKE                    ;
    9396
    9497    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/include/Parameters.h

    r81 r88  
    2424    //-----[ fields ]------------------------------------------------------------
    2525  public : uint32_t _nb_instruction               ;
    26   public : uint32_t _size_address                 ;
    27   public : uint32_t _size_branch_update_prediction;
     26//public : uint32_t _size_address                 ;
     27//public : uint32_t _size_branch_update_prediction;
    2828
    29   public : uint32_t _size_instruction_ptr                 ;
    30 
    31   public : bool     _have_port_instruction_ptr            ;
    32   public : bool     _have_port_branch_update_prediction_id;
     29//public : uint32_t _size_instruction_ptr                 ;
     30//
     31//public : bool     _have_port_instruction_ptr            ;
     32//public : bool     _have_port_branch_update_prediction_id;
    3333
    3434    //-----[ methods ]-----------------------------------------------------------
    3535  public : Parameters  (uint32_t nb_instruction,
    3636                        uint32_t size_address  ,
    37                         uint32_t size_branch_update_prediction);
     37                        uint32_t size_branch_update_prediction,
     38                        bool     is_toplevel=false);
    3839
    3940//   public : Parameters  (Parameters & param) ;
    4041  public : ~Parameters () ;
     42
     43  public :        void            copy       (void);
    4144
    4245  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management.cpp

    r81 r88  
    3838    log_printf(FUNC,Address_management,FUNCTION,"Begin");
    3939
     40#if DEBUG_Address_management == true
     41    log_printf(INFO,Address_management,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif   
     45
    4046    log_printf(INFO,Address_management,FUNCTION,"Allocation");
    4147
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    5157        log_printf(INFO,Address_management,FUNCTION,"Allocation of statistics");
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
     
    6672
    6773#ifdef SYSTEMC
    68     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    6975      {
    7076        // Affect output constant
     
    94100#endif
    95101      }
     102
    96103    log_printf(FUNC,Address_management,FUNCTION,"End");
    97104  };
     
    104111
    105112#ifdef STATISTICS
    106     if (_usage & USE_STATISTICS)
     113    if (usage_is_set(_usage,USE_STATISTICS))
    107114      {
    108115        statistics_deallocation();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_allocation.cpp

    r81 r88  
    6262      ALLOC_VALACK_OUT (out_ADDRESS_VAL                        ,VAL);
    6363      ALLOC_VALACK_IN  ( in_ADDRESS_ACK                        ,ACK);
    64       ALLOC_SIGNAL_OUT (out_ADDRESS_INSTRUCTION_ADDRESS        ,"instruction_address"        ,Tgeneral_address_t,_param->_size_address                 );
    65       ALLOC_SIGNAL_OUT (out_ADDRESS_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_instruction_ptr         );
     64      ALLOC_SIGNAL_OUT (out_ADDRESS_INSTRUCTION_ADDRESS        ,"instruction_address"        ,Tgeneral_address_t,_param->_size_instruction_address     );
     65      ALLOC_SIGNAL_OUT (out_ADDRESS_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_inst_ifetch_ptr         );
    6666      ALLOC_SIGNAL_OUT (out_ADDRESS_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t   ,_param->_size_branch_state            );
    67       ALLOC_SIGNAL_OUT (out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_branch_update_prediction);
     67      ALLOC_SIGNAL_OUT (out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_depth);
    6868    }
    6969
     
    8080      ALLOC_VALACK_OUT (out_PREDICT_VAL                        ,VAL);
    8181      ALLOC_VALACK_IN  ( in_PREDICT_ACK                        ,ACK);
    82       ALLOC_SIGNAL_OUT (out_PREDICT_PC_PREVIOUS                ,"pc_previous"                ,Tgeneral_address_t,_param->_size_address);
    83       ALLOC_SIGNAL_OUT (out_PREDICT_PC_CURRENT                 ,"pc_current"                 ,Tgeneral_address_t,_param->_size_address);
     82      ALLOC_SIGNAL_OUT (out_PREDICT_PC_PREVIOUS                ,"pc_previous"                ,Tgeneral_address_t,_param->_size_instruction_address);
     83      ALLOC_SIGNAL_OUT (out_PREDICT_PC_CURRENT                 ,"pc_current"                 ,Tgeneral_address_t,_param->_size_instruction_address);
    8484      ALLOC_SIGNAL_OUT (out_PREDICT_PC_CURRENT_IS_DS_TAKE      ,"pc_current_is_ds_take"      ,Tcontrol_t        ,1);
    85       ALLOC_SIGNAL_IN  ( in_PREDICT_PC_NEXT                    ,"pc_next"                    ,Tgeneral_address_t,_param->_size_address);
     85      ALLOC_SIGNAL_IN  ( in_PREDICT_PC_NEXT                    ,"pc_next"                    ,Tgeneral_address_t,_param->_size_instruction_address);
    8686      ALLOC_SIGNAL_IN  ( in_PREDICT_PC_NEXT_IS_DS_TAKE         ,"pc_next_is_ds_take"         ,Tcontrol_t        ,1);
    87       ALLOC_SIGNAL_IN  ( in_PREDICT_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_instruction_ptr);
     87      ALLOC_SIGNAL_IN  ( in_PREDICT_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_inst_ifetch_ptr);
    8888      ALLOC_SIGNAL_IN  ( in_PREDICT_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t   ,_param->_size_branch_state);
    89       ALLOC_SIGNAL_IN  ( in_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_branch_update_prediction);
     89      ALLOC_SIGNAL_IN  ( in_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_depth);
    9090    }
    9191    {
     
    9999      ALLOC_INTERFACE("event", IN, SOUTH, "Event (miss, exception ...)");
    100100
    101       ALLOC_VALACK_IN ( in_EVENT_VAL    ,VAL);
    102       ALLOC_VALACK_OUT(out_EVENT_ACK    ,ACK);
    103       ALLOC_SIGNAL_IN ( in_EVENT_ADDRESS,"address",Tgeneral_address_t,_param->_size_address);
     101      ALLOC_VALACK_IN ( in_EVENT_VAL          ,VAL);
     102      ALLOC_VALACK_OUT(out_EVENT_ACK          ,ACK);
     103      ALLOC_SIGNAL_IN ( in_EVENT_ADDRESS         ,"address"         ,Tgeneral_address_t,_param->_size_instruction_address);
     104      ALLOC_SIGNAL_IN ( in_EVENT_ADDRESS_NEXT    ,"address_next"    ,Tgeneral_address_t,_param->_size_instruction_address);
     105      ALLOC_SIGNAL_IN ( in_EVENT_ADDRESS_NEXT_VAL,"address_next_val",Tcontrol_t,1);
     106      ALLOC_SIGNAL_IN ( in_EVENT_IS_DS_TAKE      ,"is_ds_take"      ,Tcontrol_t,1);
    104107    }
    105108
     109    // ~~~~~[ Internal  ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     110    if (usage_is_set(_usage,USE_SYSTEMC))
     111      {
     112        reg_PC_CURRENT_INSTRUCTION_ENABLE = new Tcontrol_t [_param->_nb_instruction];
     113        reg_PC_NEXT_INSTRUCTION_ENABLE    = new Tcontrol_t [_param->_nb_instruction];
     114      }
     115
    106116    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    107     reg_PC_CURRENT_INSTRUCTION_ENABLE = new Tcontrol_t [_param->_nb_instruction];
    108     reg_PC_NEXT_INSTRUCTION_ENABLE    = new Tcontrol_t [_param->_nb_instruction];
    109 
    110117#ifdef POSITION
    111     _component->generate_file();
     118     if (usage_is_set(_usage,USE_POSITION))
     119       _component->generate_file();
    112120#endif
    113121
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_deallocation.cpp

    r81 r88  
    2323    log_printf(FUNC,Address_management,FUNCTION,"Begin");
    2424
    25     if (_usage & USE_SYSTEMC)
     25    if (usage_is_set(_usage,USE_SYSTEMC))
    2626      {
    2727        delete    in_CLOCK ;
     
    3232        delete    out_ADDRESS_INSTRUCTION_ADDRESS        ;
    3333        delete [] out_ADDRESS_INSTRUCTION_ENABLE         ;
    34         if (_param->_have_port_instruction_ptr)
     34        if (_param->_have_port_inst_ifetch_ptr)
    3535        delete    out_ADDRESS_INST_IFETCH_PTR            ;
    3636        delete    out_ADDRESS_BRANCH_STATE               ;
    37         if (_param->_have_port_branch_update_prediction_id)
     37        if (_param->_have_port_depth)
    3838        delete    out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID;
    3939        delete    out_PREDICT_VAL                        ;
     
    4545        delete     in_PREDICT_PC_NEXT_IS_DS_TAKE         ;
    4646        delete []  in_PREDICT_INSTRUCTION_ENABLE         ;
    47         if (_param->_have_port_instruction_ptr)
     47        if (_param->_have_port_inst_ifetch_ptr)
    4848        delete     in_PREDICT_INST_IFETCH_PTR            ;
    4949        delete     in_PREDICT_BRANCH_STATE               ;
    50         if (_param->_have_port_branch_update_prediction_id)
     50        if (_param->_have_port_depth)
    5151        delete     in_PREDICT_BRANCH_UPDATE_PREDICTION_ID;
    5252        delete     in_EVENT_VAL                          ;
    5353        delete    out_EVENT_ACK                          ;
    5454        delete     in_EVENT_ADDRESS                      ;
     55        delete     in_EVENT_ADDRESS_NEXT                 ;
     56        delete     in_EVENT_ADDRESS_NEXT_VAL             ;
     57        delete     in_EVENT_IS_DS_TAKE                   ;
     58     
     59        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     60        if (usage_is_set(_usage,USE_SYSTEMC))
     61          {
     62            delete reg_PC_CURRENT_INSTRUCTION_ENABLE;
     63            delete reg_PC_NEXT_INSTRUCTION_ENABLE   ;
     64          }
    5565      }
    5666
    57     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    58     delete reg_PC_CURRENT_INSTRUCTION_ENABLE;
    59     delete reg_PC_NEXT_INSTRUCTION_ENABLE   ;
    6067
    6168    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
    33     _interfaces->testbench();
     34    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     35      _interfaces->testbench();
    3436#endif
    3537
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_genMoore.cpp

    r84 r88  
    3232    PORT_WRITE(out_ADDRESS_VAL                        ,internal_ADDRESS_VAL                      );
    3333    PORT_WRITE(out_ADDRESS_INSTRUCTION_ADDRESS        ,reg_PC_CURRENT                            );
    34     if (_param->_have_port_instruction_ptr)
     34    if (_param->_have_port_inst_ifetch_ptr)
    3535    PORT_WRITE(out_ADDRESS_INST_IFETCH_PTR            ,reg_PC_CURRENT_INST_IFETCH_PTR            );
    3636    PORT_WRITE(out_ADDRESS_BRANCH_STATE               ,reg_PC_CURRENT_BRANCH_STATE               );
    37     if (_param->_have_port_branch_update_prediction_id)
     37    if (_param->_have_port_depth)
    3838    PORT_WRITE(out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID,reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID);
    3939
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_transition.cpp

    r84 r88  
    2222  void Address_management::transition (void)
    2323  {
    24     log_printf(FUNC,Address_management,FUNCTION,"Begin");
     24    log_begin(Address_management,FUNCTION);
     25    log_function(Address_management,FUNCTION,_name.c_str());
    2526
    2627    if (PORT_READ(in_NRESET) == 0)
     
    2829        // nothing is valid
    2930        reg_PC_CURRENT_VAL   = 0;
    30         reg_PC_NEXT_VAL      = 0;
     31
     32        reg_PC_NEXT_VAL      = 1;
     33        reg_PC_NEXT          = 0x100>>2;
     34
    3135        reg_PC_NEXT_NEXT_VAL = 0;
    3236      }
     
    4044            for (uint32_t i=0; i<_param->_nb_instruction; i++)
    4145            reg_PC_NEXT_INSTRUCTION_ENABLE [i] = PORT_READ(in_PREDICT_INSTRUCTION_ENABLE [i]);
    42             if (_param->_have_port_instruction_ptr)
     46            if (_param->_have_port_inst_ifetch_ptr)
    4347            reg_PC_NEXT_INST_IFETCH_PTR             = PORT_READ(in_PREDICT_INST_IFETCH_PTR            );
    4448            reg_PC_NEXT_BRANCH_STATE                = PORT_READ(in_PREDICT_BRANCH_STATE               );
    45             if (_param->_have_port_branch_update_prediction_id)
     49            if (_param->_have_port_depth)
    4650            reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID = PORT_READ(in_PREDICT_BRANCH_UPDATE_PREDICTION_ID);
    4751           
     
    5155
    5256#ifdef STATISTICS
    53             (*_stat_nb_transaction_predict) ++;
     57            if (usage_is_set(_usage,USE_STATISTICS))
     58              (*_stat_nb_transaction_predict) ++;
    5459#endif
    5560          }
     
    6267          {
    6368#ifdef STATISTICS
    64             if (reg_PC_CURRENT_VAL)
    65               {
    66                 (*_stat_nb_transaction_address) ++;
    67 
    68                 for (uint32_t i=0; i<_param->_nb_instruction; i++)
    69                   if (reg_PC_CURRENT_INSTRUCTION_ENABLE [i] == true)
    70                     (*_stat_sum_packet_size) ++;
    71               }
     69            if (usage_is_set(_usage,USE_STATISTICS))
     70              if (reg_PC_CURRENT_VAL)
     71                {
     72                  (*_stat_nb_transaction_address) ++;
     73                 
     74                  for (uint32_t i=0; i<_param->_nb_instruction; i++)
     75                    if (reg_PC_CURRENT_INSTRUCTION_ENABLE [i] == true)
     76                      (*_stat_sum_packet_size) ++;
     77                }
    7278#endif
    7379
     
    110116        if (PORT_READ(in_EVENT_VAL) and internal_EVENT_ACK)
    111117          {
    112             log_printf(TRACE,Address_management,FUNCTION,"EVENT : Transaction");
     118            log_printf(TRACE,Address_management,FUNCTION,"  * EVENT : Transaction");
     119            log_printf(TRACE,Address_management,FUNCTION,"    * IS_DS_TAKE       : %d"  ,PORT_READ(in_EVENT_IS_DS_TAKE      ));
     120            log_printf(TRACE,Address_management,FUNCTION,"    * ADDRESS          : %.8x (%.8x)",PORT_READ(in_EVENT_ADDRESS         ),PORT_READ(in_EVENT_ADDRESS         )<<2);
     121            log_printf(TRACE,Address_management,FUNCTION,"    * ADDRESS_NEXT     : %.8x (%.8x)",PORT_READ(in_EVENT_ADDRESS_NEXT    ),PORT_READ(in_EVENT_ADDRESS_NEXT    )<<2);
     122            log_printf(TRACE,Address_management,FUNCTION,"    * ADDRESS_NEXT_VAL : %d"  ,PORT_READ(in_EVENT_ADDRESS_NEXT_VAL));
    113123            reg_PC_CURRENT_VAL                      = 0;
    114124            reg_PC_NEXT_VAL                         = 1;
     
    118128            //  * load   miss speculation : the load is execute, the event_address is the next address (also the destination of branch)
    119129            //  * exception               : goto the first instruction of exception handler (also is not in delay slot).
    120             reg_PC_NEXT_IS_DS_TAKE                  = 0;
     130
     131            reg_PC_NEXT_IS_DS_TAKE                  = PORT_READ(in_EVENT_IS_DS_TAKE);
    121132//          reg_PC_NEXT_INST_IFETCH_PTR             = 0;
    122133//          reg_PC_NEXT_BRANCH_STATE                = BRANCH_STATE_NONE;
    123134//          reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID = 0;
    124135           
    125 //          reg_PC_NEXT_INSTRUCTION_ENABLE [0]      = 1; // only the instruction at the event address is valid, because we have no information on the branch presence in the instruction bundle.
    126 //          for (uint32_t i=1; i<_param->_nb_instruction; i++)
    127 //            reg_PC_NEXT_INSTRUCTION_ENABLE [i] = 0;
     136            reg_PC_NEXT_INSTRUCTION_ENABLE [0]      = 1; // only the instruction at the event address is valid, because we have no information on the branch presence in the instruction bundle.
     137            for (uint32_t i=1; i<_param->_nb_instruction; i++)
     138              reg_PC_NEXT_INSTRUCTION_ENABLE [i] = 0;
    128139
    129             reg_PC_NEXT_NEXT_VAL                    = 0; // cancel all prediction (event is send at the predict unit)
     140            reg_PC_NEXT_NEXT_VAL                    = PORT_READ(in_EVENT_ADDRESS_NEXT_VAL);
     141            reg_PC_NEXT_NEXT                        = PORT_READ(in_EVENT_ADDRESS_NEXT);
     142            reg_PC_NEXT_NEXT_IS_DS_TAKE             = 0;//??
     143
     144            // Note : is_ds_take = address_next_val
     145            // Because, is not ds take, can continue in sequence
     146
     147#ifdef DEBUG_TEST
     148            if (PORT_READ(in_EVENT_ADDRESS_NEXT_VAL) and not PORT_READ(in_EVENT_IS_DS_TAKE))
     149              throw ERRORMORPHEO(FUNCTION,_("Event : address_next_next_val but next is not a ds take"));
     150#endif
    130151
    131152#ifdef STATISTICS
    132             (*_stat_nb_transaction_event) ++;
     153            if (usage_is_set(_usage,USE_STATISTICS))
     154              (*_stat_nb_transaction_event) ++;
    133155#endif
    134156          }
    135157      }
    136158
    137 #if DEBUG >= DEBUG_TRACE
    138     log_printf(TRACE,Address_management,FUNCTION,"Address_Management : ");
    139     log_printf(TRACE,Address_management,FUNCTION,"Current   : %d %d 0x%x",reg_PC_CURRENT_VAL, reg_PC_CURRENT_IS_DS_TAKE, reg_PC_CURRENT);
    140     log_printf(TRACE,Address_management,FUNCTION,"Next      : %d %d 0x%x",reg_PC_NEXT_VAL, reg_PC_NEXT_IS_DS_TAKE, reg_PC_NEXT);   
    141     log_printf(TRACE,Address_management,FUNCTION,"Next_Next : %d %d 0x%x",reg_PC_NEXT_NEXT_VAL, reg_PC_NEXT_NEXT_IS_DS_TAKE, reg_PC_NEXT_NEXT);   
     159#if defined(DEBUG) and (DEBUG >= DEBUG_TRACE)
     160    log_printf(TRACE,Address_management,FUNCTION,"  * Dump PC");
     161    log_printf(TRACE,Address_management,FUNCTION,"    * Current   : %d %d 0x%.8x (%.8x)",reg_PC_CURRENT_VAL  , reg_PC_CURRENT_IS_DS_TAKE  , reg_PC_CURRENT  , reg_PC_CURRENT  <<2);
     162    log_printf(TRACE,Address_management,FUNCTION,"    * Next      : %d %d 0x%.8x (%.8x)",reg_PC_NEXT_VAL     , reg_PC_NEXT_IS_DS_TAKE     , reg_PC_NEXT     , reg_PC_NEXT     <<2);   
     163    log_printf(TRACE,Address_management,FUNCTION,"    * Next_Next : %d %d 0x%.8x (%.8x)",reg_PC_NEXT_NEXT_VAL, reg_PC_NEXT_NEXT_IS_DS_TAKE, reg_PC_NEXT_NEXT, reg_PC_NEXT_NEXT<<2);   
    142164#endif
    143165
     
    145167    end_cycle ();
    146168#endif
    147 
    148     log_printf(FUNC,Address_management,FUNCTION,"End");
     169   
     170    log_end(Address_management,FUNCTION);
    149171  };
    150172
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Parameters.cpp

    r81 r88  
    2121  Parameters::Parameters (uint32_t nb_instruction,
    2222                          uint32_t size_address  ,
    23                           uint32_t size_branch_update_prediction)
     23                          uint32_t size_branch_update_prediction,
     24                          bool     is_toplevel)
    2425  {
    2526    log_printf(FUNC,Address_management,FUNCTION,"Begin");
    2627
    27     _nb_instruction                        = nb_instruction               ;
    28     _size_address                          = size_address                 ;
    29     _size_branch_update_prediction         = size_branch_update_prediction;
    30 
    31     _size_instruction_ptr                  = log2(nb_instruction);
    32 
    33     _have_port_instruction_ptr             = _size_instruction_ptr > 0;
    34     _have_port_branch_update_prediction_id = size_branch_update_prediction > 0;
     28    _nb_instruction = nb_instruction               ;
    3529
    3630    test();
     31
     32    if (is_toplevel)
     33      {
     34        _size_instruction_address  = size_address                 ;
     35        _size_depth                = size_branch_update_prediction;
     36        _size_inst_ifetch_ptr      = log2(nb_instruction);
     37       
     38        _have_port_inst_ifetch_ptr = _size_inst_ifetch_ptr > 0;
     39        _have_port_depth           = _size_depth > 0;
     40
     41        copy();
     42      }
     43
    3744    log_printf(FUNC,Address_management,FUNCTION,"End");
    3845  };
     
    5562  };
    5663
     64#undef  FUNCTION
     65#define FUNCTION "Address_management::copy"
     66  void Parameters::copy (void)
     67  {
     68    log_printf(FUNC,Address_management,FUNCTION,"Begin");
     69    log_printf(FUNC,Address_management,FUNCTION,"End");
     70  };
     71
    5772}; // end namespace address_management
    5873}; // end namespace ifetch_unit
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Parameters_print.cpp

    r81 r88  
    2424    log_printf(FUNC,Address_management,FUNCTION,"Begin");
    2525
    26     XML xml ("address_management");
     26//     XML xml ("address_management");
    2727
    28     xml.balise_open("address_management");
    29     xml.singleton_begin("nb_instruction               "); xml.attribut("value",toString(_nb_instruction               )); xml.singleton_end();
    30     xml.singleton_begin("size_address                 "); xml.attribut("value",toString(_size_address                 )); xml.singleton_end();
    31     xml.singleton_begin("size_branch_update_prediction"); xml.attribut("value",toString(_size_branch_update_prediction)); xml.singleton_end();
    32     xml.balise_close();
     28//     xml.balise_open("address_management");
     29//     xml.singleton_begin("nb_instruction               "); xml.attribut("value",toString(_nb_instruction               )); xml.singleton_end();
     30// //  xml.singleton_begin("size_address                 "); xml.attribut("value",toString(_size_address                 )); xml.singleton_end();
     31// //  xml.singleton_begin("size_branch_update_prediction"); xml.attribut("value",toString(_size_branch_update_prediction)); xml.singleton_end();
     32//     xml.balise_close();
     33
     34//     return xml.get_body(depth);
     35
     36    std::string str = "";
    3337
    3438    log_printf(FUNC,Address_management,FUNCTION,"End");
    35    
    36     return xml.get_body(depth);
     39
     40    return str;
    3741  };
    3842
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Ifetch_queue_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/src/main.cpp

    r81 r88  
    4747         _nb_instruction                ,
    4848         _size_branch_update_prediction ,
    49          _size_general_data             );
     49         _size_general_data             ,
     50         true // is_toplevel
     51         );
    5052     
    5153      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/src/test.cpp

    r82 r88  
    4141#endif
    4242
     43  Tusage_t _usage = USE_ALL;
     44
     45//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     46//   _usage = usage_unset(_usage,USE_VHDL                 );
     47//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     48//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     49//   _usage = usage_unset(_usage,USE_POSITION             );
     50//   _usage = usage_unset(_usage,USE_STATISTICS           );
     51//   _usage = usage_unset(_usage,USE_INFORMATION          );
     52
    4353  Ifetch_queue * _Ifetch_queue = new Ifetch_queue
    4454    (name.c_str(),
     
    4757#endif
    4858     _param,
    49      USE_ALL);
     59     _usage);
    5060 
    5161#ifdef SYSTEMC
     
    93103  INSTANCE_SC_SIGNAL (_Ifetch_queue, in_ADDRESS_VAL                        );
    94104  INSTANCE_SC_SIGNAL (_Ifetch_queue,out_ADDRESS_ACK                        );
    95   if (_param->_have_port_queue_ptr)
     105  if (_param->_have_port_ifetch_queue_ptr)
    96106  INSTANCE_SC_SIGNAL (_Ifetch_queue,out_ADDRESS_IFETCH_QUEUE_ID            );
    97107  INSTANCE1_SC_SIGNAL(_Ifetch_queue, in_ADDRESS_INSTRUCTION_ENABLE         ,_param->_nb_instruction);
    98108  INSTANCE_SC_SIGNAL (_Ifetch_queue, in_ADDRESS_INSTRUCTION_ADDRESS        );
    99   if (_param->_have_port_instruction_ptr)
     109  if (_param->_have_port_inst_ifetch_ptr)
    100110  INSTANCE_SC_SIGNAL (_Ifetch_queue, in_ADDRESS_INST_IFETCH_PTR            );
    101111  INSTANCE_SC_SIGNAL (_Ifetch_queue, in_ADDRESS_BRANCH_STATE               );
    102   if (_param->_have_port_branch_update_prediction_id)
     112  if (_param->_have_port_depth)
    103113  INSTANCE_SC_SIGNAL (_Ifetch_queue, in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID);
    104114  INSTANCE1_SC_SIGNAL(_Ifetch_queue,out_DECOD_VAL                          ,_param->_nb_instruction);
     
    106116  INSTANCE1_SC_SIGNAL(_Ifetch_queue,out_DECOD_INSTRUCTION                  ,_param->_nb_instruction);
    107117  INSTANCE_SC_SIGNAL (_Ifetch_queue,out_DECOD_ADDRESS                      );
    108   if (_param->_have_port_instruction_ptr)
     118  if (_param->_have_port_inst_ifetch_ptr)
    109119  INSTANCE_SC_SIGNAL (_Ifetch_queue,out_DECOD_INST_IFETCH_PTR              );
    110120  INSTANCE_SC_SIGNAL (_Ifetch_queue,out_DECOD_BRANCH_STATE                 );
    111   if (_param->_have_port_branch_update_prediction_id)
     121  if (_param->_have_port_depth)
    112122  INSTANCE_SC_SIGNAL (_Ifetch_queue,out_DECOD_BRANCH_UPDATE_PREDICTION_ID  );
    113123  INSTANCE_SC_SIGNAL (_Ifetch_queue,out_DECOD_EXCEPTION                    );
    114124  INSTANCE_SC_SIGNAL (_Ifetch_queue, in_ICACHE_RSP_VAL                     );
    115125  INSTANCE_SC_SIGNAL (_Ifetch_queue,out_ICACHE_RSP_ACK                     );
    116   if (_param->_have_port_queue_ptr)
     126  if (_param->_have_port_ifetch_queue_ptr)
    117127  INSTANCE_SC_SIGNAL (_Ifetch_queue, in_ICACHE_RSP_PACKET_ID               );
    118128  INSTANCE1_SC_SIGNAL(_Ifetch_queue, in_ICACHE_RSP_INSTRUCTION             ,_param->_nb_instruction);
     
    180190          for (uint32_t i=0; i<_param->_nb_instruction; i++)
    181191          in_ADDRESS_INSTRUCTION_ENABLE [i]      ->write(i<=nb_inst_enable);
    182           if (_param->_have_port_instruction_ptr)
     192          if (_param->_have_port_inst_ifetch_ptr)
    183193          in_ADDRESS_INST_IFETCH_PTR             ->write(address%_param->_nb_instruction);
    184194          in_ADDRESS_BRANCH_STATE                ->write(address%SIZE_BRANCH_STATE);
    185           if (_param->_have_port_branch_update_prediction_id)
    186           in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID ->write(address%_param->_size_branch_update_prediction);
     195          if (_param->_have_port_depth)
     196          in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID ->write(address%_param->_size_depth);
    187197
    188198          // =====
     
    241251             
    242252              list_wait_decod.push_back(address);
    243 //            list_req_icache.insert(, entry_t((_param->_have_port_queue_ptr)?out_ADDRESS_IFETCH_QUEUE_ID->read():0,address));
     253//            list_req_icache.insert(, entry_t((_param->_have_port_ifetch_queue_ptr)?out_ADDRESS_IFETCH_QUEUE_ID->read():0,address));
    244254
    245255              uint32_t cycle = ((rand()%100)<percent_icache_hit)?1:icache_miss_penality;
     
    252262
    253263              LABEL("  * list_req_icache : %d",list_req_icache.size());
    254               list_req_icache.insert(it,entry_t(cycle,(_param->_have_port_queue_ptr)?out_ADDRESS_IFETCH_QUEUE_ID->read():0,address));
     264              list_req_icache.insert(it,entry_t(cycle,(_param->_have_port_ifetch_queue_ptr)?out_ADDRESS_IFETCH_QUEUE_ID->read():0,address));
    255265              LABEL("  * list_req_icache : %d",list_req_icache.size());       
    256266              address += 4*_param->_nb_instruction;
     
    292302              TEST(Tgeneral_data_t   ,out_DECOD_ADDRESS                    ->read(), addr);
    293303              TEST(Tbranch_state_t   ,out_DECOD_BRANCH_STATE               ->read(),addr%SIZE_BRANCH_STATE);
    294               if (_param->_have_port_instruction_ptr)
     304              if (_param->_have_port_inst_ifetch_ptr)
    295305              TEST(Tinst_ifetch_ptr_t,out_DECOD_INST_IFETCH_PTR            ->read(),addr%_param->_nb_instruction);
    296               if (_param->_have_port_branch_update_prediction_id)
    297               TEST(Tprediction_ptr_t ,out_DECOD_BRANCH_UPDATE_PREDICTION_ID->read(),addr%_param->_size_branch_update_prediction);
     306              if (_param->_have_port_depth)
     307              TEST(Tprediction_ptr_t ,out_DECOD_BRANCH_UPDATE_PREDICTION_ID->read(),addr%_param->_size_depth);
    298308              if ((addr % modulo_iberr) == 0)
    299309              TEST(Texception_t      ,out_DECOD_EXCEPTION                  ->read(),EXCEPTION_IFETCH_BUS_ERROR);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/include/Parameters.h

    r81 r88  
    2626  public : uint32_t _size_queue                           ;
    2727  public : uint32_t _nb_instruction                       ;
    28   public : uint32_t _size_branch_update_prediction        ;
    29   public : uint32_t _size_general_data                    ;
     28//public : uint32_t _size_branch_update_prediction        ;
     29//public : uint32_t _size_general_data                    ;
    3030
    31   public : uint32_t _size_queue_ptr                       ;
    32   public : uint32_t _size_instruction_ptr                 ;
     31//public : uint32_t _size_queue_ptr                       ;
     32//public : uint32_t _size_instruction_ptr                 ;
    3333
    34   public : bool     _have_port_queue_ptr                  ;
    35   public : bool     _have_port_instruction_ptr            ;
    36   public : bool     _have_port_branch_update_prediction_id;
     34//public : bool     _have_port_queue_ptr                  ;
     35//public : bool     _have_port_instruction_ptr            ;
     36//public : bool     _have_port_branch_update_prediction_id;
    3737
    3838    //-----[ methods ]-----------------------------------------------------------
    39   public : Parameters  (uint32_t _size_queue                   ,
    40                         uint32_t _nb_instruction               ,
    41                         uint32_t _size_branch_update_prediction,
    42                         uint32_t _size_general_data            );
     39  public : Parameters  (uint32_t size_queue                   ,
     40                        uint32_t nb_instruction               ,
     41                        uint32_t size_branch_update_prediction,
     42                        uint32_t size_general_data            ,
     43                        bool     is_toplevel=false);
    4344//   public : Parameters  (Parameters & param) ;
    4445  public : ~Parameters () ;
     46
     47  public :        void            copy       (void);
    4548
    4649  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue.cpp

    r81 r88  
    3838    log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
    3939
    40     log_printf(INFO,Ifetch_queue,FUNCTION,"Allocation");
     40#if DEBUG_Ifetch_queue == true
     41    log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif   
     45
     46    log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Allocation"),_name.c_str());
    4147
    4248    allocation (
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    51         log_printf(INFO,Ifetch_queue,FUNCTION,"Allocation of statistics");
     57        log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str());
    5258
    5359        statistics_allocation(param_statistics);
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
    61         log_printf(INFO,Ifetch_queue,FUNCTION,"Generate the vhdl");
     67        log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
    6268       
    6369        vhdl();
     
    6672
    6773#ifdef SYSTEMC
    68     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    6975      {
    7076        // constant output
     
    7581        PORT_WRITE(out_EVENT_RESET_ACK, internal_EVENT_RESET_ACK);
    7682
    77         log_printf(INFO,Ifetch_queue,FUNCTION,"Method - transition");
     83        log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Method - transition"),_name.c_str());
    7884
    7985        SC_METHOD (transition);
     
    8591# endif   
    8692
    87         log_printf(INFO,Ifetch_queue,FUNCTION,"Method - genMoore");
     93        log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Method - genMoore"),_name.c_str());
    8894
    8995        SC_METHOD (genMoore);
     
    107113
    108114#ifdef STATISTICS
    109     if (_usage & USE_STATISTICS)
     115    if (usage_is_set(_usage,USE_STATISTICS))
    110116      {
    111117        statistics_deallocation();
     
    113119#endif
    114120
    115     log_printf(INFO,Ifetch_queue,FUNCTION,"Deallocation");
     121    log_printf(INFO,Ifetch_queue,FUNCTION,_("<%s> Deallocation"),_name.c_str());
    116122    deallocation ();
    117123
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_allocation.cpp

    r81 r88  
    6262      ALLOC_VALACK_IN ( in_ADDRESS_VAL                        ,VAL);
    6363      ALLOC_VALACK_OUT(out_ADDRESS_ACK                        ,ACK);
    64       ALLOC_SIGNAL_IN ( in_ADDRESS_INSTRUCTION_ADDRESS        ,"instruction_address"        ,Tgeneral_address_t ,_param->_size_general_data            );
    65       ALLOC_SIGNAL_IN ( in_ADDRESS_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t ,_param->_size_instruction_ptr         );
    66       ALLOC_SIGNAL_IN ( in_ADDRESS_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state            );
    67       ALLOC_SIGNAL_IN ( in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_branch_update_prediction);
    68       ALLOC_SIGNAL_OUT(out_ADDRESS_IFETCH_QUEUE_ID            ,"ifetch_queue_id"            ,Tifetch_queue_ptr_t,_param->_size_queue_ptr               );
     64      ALLOC_SIGNAL_IN ( in_ADDRESS_INSTRUCTION_ADDRESS        ,"instruction_address"        ,Tgeneral_address_t ,_param->_size_instruction_address        );
     65      ALLOC_SIGNAL_IN ( in_ADDRESS_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t ,_param->_size_inst_ifetch_ptr);
     66      ALLOC_SIGNAL_IN ( in_ADDRESS_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state   );
     67      ALLOC_SIGNAL_IN ( in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth          );
     68      ALLOC_SIGNAL_OUT(out_ADDRESS_IFETCH_QUEUE_ID            ,"ifetch_queue_id"            ,Tifetch_queue_ptr_t,_param->_size_ifetch_queue_ptr);
    6969
    7070    }
     
    8686      ALLOC_INTERFACE("decod",OUT, EAST, "Send instruction bundle to the decod's stage.");
    8787     
    88       ALLOC_SIGNAL_OUT(out_DECOD_ADDRESS                    ,"address"                    ,Tgeneral_address_t,_param->_size_general_data            );
    89       ALLOC_SIGNAL_OUT(out_DECOD_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_instruction_ptr        );
    90       ALLOC_SIGNAL_OUT(out_DECOD_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t   ,_param->_size_branch_state            );
    91       ALLOC_SIGNAL_OUT(out_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_branch_update_prediction);
    92       ALLOC_SIGNAL_OUT(out_DECOD_EXCEPTION                  ,"exception"                  ,Texception_t      ,_param->_size_exception_ifetch        );
     88      ALLOC_SIGNAL_OUT(out_DECOD_ADDRESS                    ,"address"                    ,Tgeneral_address_t,_param->_size_instruction_address         );
     89      ALLOC_SIGNAL_OUT(out_DECOD_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_inst_ifetch_ptr );
     90      ALLOC_SIGNAL_OUT(out_DECOD_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t   ,_param->_size_branch_state    );
     91      ALLOC_SIGNAL_OUT(out_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_depth           );
     92      ALLOC_SIGNAL_OUT(out_DECOD_EXCEPTION                  ,"exception"                  ,Texception_t      ,_param->_size_exception_ifetch);
    9393    }
    9494
     
    9999      ALLOC_VALACK_IN ( in_ICACHE_RSP_VAL      ,VAL);
    100100      ALLOC_VALACK_OUT(out_ICACHE_RSP_ACK      ,ACK);
    101       ALLOC_SIGNAL_IN ( in_ICACHE_RSP_PACKET_ID,"packet_id",Tpacket_t      ,_param->_size_queue_ptr   );
     101      ALLOC_SIGNAL_IN ( in_ICACHE_RSP_PACKET_ID,"packet_id",Tpacket_t      ,_param->_size_ifetch_queue_ptr);
    102102      ALLOC_SIGNAL_IN ( in_ICACHE_RSP_ERROR    ,"error"    ,Ticache_error_t,_param->_size_icache_error);
    103103    }
     
    117117
    118118    // ~~~~~[ Internal ] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    119     internal_DECOD_VAL = new Tcontrol_t [_param->_nb_instruction];
    120 
    121     _queue = new ifetch_queue_entry_t * [_param->_size_queue];
    122     for (uint32_t i=0;i<_param->_size_queue; i++)
    123       _queue [i] = new ifetch_queue_entry_t (_param->_nb_instruction);
     119    if (usage_is_set(_usage,USE_SYSTEMC))
     120      {
     121        internal_DECOD_VAL = new Tcontrol_t [_param->_nb_instruction];
     122       
     123        _queue = new ifetch_queue_entry_t * [_param->_size_queue];
     124        for (uint32_t i=0;i<_param->_size_queue; i++)
     125          _queue [i] = new ifetch_queue_entry_t (_param->_nb_instruction);
     126      }
    124127
    125128    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    126129
    127130#ifdef POSITION
    128     _component->generate_file();
     131     if (usage_is_set(_usage,USE_POSITION))
     132       _component->generate_file();
    129133#endif
    130134
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_deallocation.cpp

    r81 r88  
    2323    log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
    2424
    25     if (_usage & USE_SYSTEMC)
     25    if (usage_is_set(_usage,USE_SYSTEMC))
    2626      {
    2727        delete    in_CLOCK ;
     
    3030        delete     in_ADDRESS_VAL                        ;
    3131        delete    out_ADDRESS_ACK                        ;
    32         if (_param->_have_port_queue_ptr)
     32        if (_param->_have_port_ifetch_queue_ptr)
    3333        delete    out_ADDRESS_IFETCH_QUEUE_ID            ;
    3434        delete []  in_ADDRESS_INSTRUCTION_ENABLE         ;
    3535        delete     in_ADDRESS_INSTRUCTION_ADDRESS        ;
    36         if (_param->_have_port_instruction_ptr)
     36        if (_param->_have_port_inst_ifetch_ptr)
    3737        delete     in_ADDRESS_INST_IFETCH_PTR            ;
    3838        delete     in_ADDRESS_BRANCH_STATE               ;
    39         if (_param->_have_port_branch_update_prediction_id)
     39        if (_param->_have_port_depth)
    4040        delete     in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID;
    4141        delete [] out_DECOD_VAL                          ;
     
    4343        delete [] out_DECOD_INSTRUCTION                  ;
    4444        delete    out_DECOD_ADDRESS                      ;
    45         if (_param->_have_port_instruction_ptr)
     45        if (_param->_have_port_inst_ifetch_ptr)
    4646        delete    out_DECOD_INST_IFETCH_PTR              ;
    4747        delete    out_DECOD_BRANCH_STATE                 ;
    48         if (_param->_have_port_branch_update_prediction_id)
     48        if (_param->_have_port_depth)
    4949        delete    out_DECOD_BRANCH_UPDATE_PREDICTION_ID  ;
    5050        delete    out_DECOD_EXCEPTION                    ;
    5151        delete     in_ICACHE_RSP_VAL                     ;
    5252        delete    out_ICACHE_RSP_ACK                     ;
    53         if (_param->_have_port_queue_ptr)
     53        if (_param->_have_port_ifetch_queue_ptr)
    5454        delete     in_ICACHE_RSP_PACKET_ID               ;
    5555        delete []  in_ICACHE_RSP_INSTRUCTION             ;
     
    5858        delete    out_EVENT_RESET_ACK                    ;
    5959      }
     60
     61    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     62    if (usage_is_set(_usage,USE_SYSTEMC))
     63      {
     64        delete    internal_DECOD_VAL;
     65        delete [] _queue;
     66      }
     67
    6068    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    61 
    62     delete    internal_DECOD_VAL;
    63     delete [] _queue;
    6469    delete    _component;
    6570
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
    33     _interfaces->testbench();
     34    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     35      _interfaces->testbench();
    3436#endif
    3537
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_genMoore.cpp

    r81 r88  
    2929
    3030    PORT_WRITE(out_ADDRESS_ACK            , internal_ADDRESS_ACK);
    31     if (_param->_have_port_queue_ptr)
     31    if (_param->_have_port_ifetch_queue_ptr)
    3232    PORT_WRITE(out_ADDRESS_IFETCH_QUEUE_ID, reg_PTR_WRITE);
    3333
     
    4545
    4646    PORT_WRITE(out_DECOD_ADDRESS                    , _queue[reg_PTR_READ]->_address                    );
    47     if (_param->_have_port_instruction_ptr)
     47    if (_param->_have_port_inst_ifetch_ptr)
    4848    PORT_WRITE(out_DECOD_INST_IFETCH_PTR            , _queue[reg_PTR_READ]->_inst_ifetch_ptr            );
    4949    PORT_WRITE(out_DECOD_BRANCH_STATE               , _queue[reg_PTR_READ]->_branch_state               );
    50     if (_param->_have_port_branch_update_prediction_id)
     50    if (_param->_have_port_depth)
    5151    PORT_WRITE(out_DECOD_BRANCH_UPDATE_PREDICTION_ID, _queue[reg_PTR_READ]->_branch_update_prediction_id);
    5252    PORT_WRITE(out_DECOD_EXCEPTION                  , _queue[reg_PTR_READ]->_exception                  );
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_transition.cpp

    r85 r88  
    2222  void Ifetch_queue::transition (void)
    2323  {
    24     log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
     24    log_begin(Ifetch_queue,FUNCTION);
    2525
    2626    if (PORT_READ(in_NRESET) == 0)
     
    3434    else
    3535      {
    36         log_printf(NONE,Ifetch_queue,FUNCTION," * KANE address : 0x%x",PORT_READ(in_ADDRESS_INSTRUCTION_ADDRESS));
    37    
    38 
    3936        // ==========================================================
    4037        // =====[ ADDRESS ]==========================================
     
    4744             
    4845#ifdef STATISTICS
    49             (*_sum_transaction_address) ++;
     46            if (usage_is_set(_usage,USE_STATISTICS))
     47              (*_sum_transaction_address) ++;
    5048#endif
    5149
     
    5452                Tcontrol_t enable = PORT_READ(in_ADDRESS_INSTRUCTION_ENABLE [i]);
    5553#ifdef STATISTICS
    56                 (*_sum_inst_enable) += enable;
     54                if (usage_is_set(_usage,USE_STATISTICS))
     55                  (*_sum_inst_enable) += enable;
    5756#endif
    5857                _queue[reg_PTR_WRITE]->_instruction_enable [i]      = enable;
     
    6059
    6160            _queue[reg_PTR_WRITE]->_address                     = PORT_READ(in_ADDRESS_INSTRUCTION_ADDRESS        );
    62             _queue[reg_PTR_WRITE]->_inst_ifetch_ptr             = (_param->_have_port_instruction_ptr)?PORT_READ(in_ADDRESS_INST_IFETCH_PTR            ):0;
     61            _queue[reg_PTR_WRITE]->_inst_ifetch_ptr             = (_param->_have_port_inst_ifetch_ptr)?PORT_READ(in_ADDRESS_INST_IFETCH_PTR            ):0;
    6362            _queue[reg_PTR_WRITE]->_branch_state                = PORT_READ(in_ADDRESS_BRANCH_STATE               );
    64             _queue[reg_PTR_WRITE]->_branch_update_prediction_id = (_param->_have_port_branch_update_prediction_id)?PORT_READ(in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID):0;
     63            _queue[reg_PTR_WRITE]->_branch_update_prediction_id = (_param->_have_port_depth)?PORT_READ(in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID):0;
    6564           
    6665            reg_PTR_WRITE = (reg_PTR_WRITE+1)%_param->_size_queue;
     
    9594        if (PORT_READ(in_ICACHE_RSP_VAL) and internal_ICACHE_RSP_ACK)
    9695          {
    97             Tpacket_t ptr = (_param->_have_port_queue_ptr)?PORT_READ(in_ICACHE_RSP_PACKET_ID):0;
     96            Tpacket_t ptr = (_param->_have_port_ifetch_queue_ptr)?PORT_READ(in_ICACHE_RSP_PACKET_ID):0;
    9897           
    9998            for (uint32_t i=0; i<_param->_nb_instruction; i++)
     
    137136          }
    138137
    139 #if DEBUG >= DEBUG_TRACE
    140         log_printf(TRACE,Ifetch_queue,FUNCTION,"Dump ifetch_queue");
    141         log_printf(TRACE,Ifetch_queue,FUNCTION," * reg_PTR_WRITE : %d",reg_PTR_WRITE);
    142         log_printf(TRACE,Ifetch_queue,FUNCTION," * reg_PTR_READ  : %d",reg_PTR_READ );
     138#if defined(DEBUG) and (DEBUG >= DEBUG_TRACE)
     139        log_printf(TRACE,Ifetch_queue,FUNCTION,"  * Dump ifetch_queue");
     140        log_printf(TRACE,Ifetch_queue,FUNCTION,"    * reg_PTR_WRITE : %d",reg_PTR_WRITE);
     141        log_printf(TRACE,Ifetch_queue,FUNCTION,"    * reg_PTR_READ  : %d",reg_PTR_READ );
    143142        for (uint32_t i=0; i<_param->_size_queue; i++)
    144143          {
    145             log_printf(TRACE,Ifetch_queue,FUNCTION," * [%d] %s %.8x %d - %d %d %d", i, toString(_queue [i]->_state).c_str(), _queue [i]->_address,_queue [i]->_inst_ifetch_ptr,_queue [i]->_branch_state,_queue [i]->_branch_update_prediction_id,_queue [i]->_exception);
     144            log_printf(TRACE,Ifetch_queue,FUNCTION,"    * [%d] %s %.8x %d - %d %d %d", i, toString(_queue [i]->_state).c_str(), _queue [i]->_address,_queue [i]->_inst_ifetch_ptr,_queue [i]->_branch_state,_queue [i]->_branch_update_prediction_id,_queue [i]->_exception);
    146145           
    147146            for (uint32_t j=0; j<_param->_nb_instruction; j++)
    148               log_printf(TRACE,Ifetch_queue,FUNCTION,"    * %d %.8x", _queue [i]->_instruction_enable[j], _queue [i]->_instruction[j]);
     147              log_printf(TRACE,Ifetch_queue,FUNCTION,"      * %d %.8x", _queue [i]->_instruction_enable[j], _queue [i]->_instruction[j]);
    149148          }
    150149#endif
    151150
    152151#ifdef STATISTICS
    153         for (uint32_t i=0; i<_param->_size_queue; i++)
    154           switch (_queue[i]->_state)
    155             {
    156             case IFETCH_QUEUE_STATE_EMPTY          : break;
    157             case IFETCH_QUEUE_STATE_WAIT_RSP       : (*_sum_use_queue_wait_rsp      ) ++; break;
    158             case IFETCH_QUEUE_STATE_HAVE_RSP       : (*_sum_use_queue_have_rsp      ) ++; break;
    159             case IFETCH_QUEUE_STATE_ERROR_WAIT_RSP : (*_sum_use_queue_error_wait_rsp) ++; break;
    160             default : break;
    161             }
     152        if (usage_is_set(_usage,USE_STATISTICS))
     153          for (uint32_t i=0; i<_param->_size_queue; i++)
     154            switch (_queue[i]->_state)
     155              {
     156              case IFETCH_QUEUE_STATE_EMPTY          : break;
     157              case IFETCH_QUEUE_STATE_WAIT_RSP       : (*_sum_use_queue_wait_rsp      ) ++; break;
     158              case IFETCH_QUEUE_STATE_HAVE_RSP       : (*_sum_use_queue_have_rsp      ) ++; break;
     159              case IFETCH_QUEUE_STATE_ERROR_WAIT_RSP : (*_sum_use_queue_error_wait_rsp) ++; break;
     160              default : break;
     161              }
    162162#endif
    163163      }
    164 
     164   
    165165#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    166166    end_cycle ();
    167167#endif
    168168
    169     log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
     169    log_end(Ifetch_queue,FUNCTION);
    170170  };
    171171
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Parameters.cpp

    r81 r88  
    2222                          uint32_t nb_instruction               ,
    2323                          uint32_t size_branch_update_prediction,
    24                           uint32_t size_general_data            )
     24                          uint32_t size_general_data            ,
     25                          bool     is_toplevel)
    2526  {
    2627    log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
     
    2829    _size_queue                            = size_queue                   ;
    2930    _nb_instruction                        = nb_instruction               ;
    30     _size_branch_update_prediction         = size_branch_update_prediction;
    31     _size_general_data                     = size_general_data            ;
     31//  _size_branch_update_prediction         = size_branch_update_prediction;
     32//  _size_general_data                     = size_general_data            ;
    3233
    33     _size_queue_ptr                        = log2(size_queue);
    34     _size_instruction_ptr                  = log2(nb_instruction);
     34    test();
    3535
    36     _have_port_queue_ptr                   = _size_queue_ptr > 0;
    37     _have_port_instruction_ptr             = _size_instruction_ptr > 0;
    38     _have_port_branch_update_prediction_id = size_branch_update_prediction > 0;
    39    
    40     test();
     36    if (is_toplevel)
     37      {
     38        _size_instruction_address   = size_general_data;
     39        _size_ifetch_queue_ptr      = log2(size_queue);
     40        _size_inst_ifetch_ptr       = log2(nb_instruction);
     41        _size_depth                 = size_branch_update_prediction;
     42
     43        _have_port_ifetch_queue_ptr = _size_ifetch_queue_ptr > 0;
     44        _have_port_inst_ifetch_ptr  = _size_inst_ifetch_ptr > 0;
     45        _have_port_depth            = _size_depth > 0;
     46
     47        copy ();
     48      }
     49
    4150    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
    4251  };
     
    5968  };
    6069
     70#undef  FUNCTION
     71#define FUNCTION "Ifetch_queue::copy"
     72  void Parameters::copy (void)
     73  {
     74    log_printf(FUNC,Ifetch_queue,FUNCTION,"Begin");
     75    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
     76  };
     77
    6178}; // end namespace ifetch_queue
    6279}; // end namespace ifetch_unit
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Parameters_msg_error.cpp

    r81 r88  
    2828
    2929    if (_size_queue == 1)
    30       test.warning("To best perfomance, size_queue must be > 1.");
     30      test.warning("To best perfomance, size_queue must be > 1.\n");
    3131   
    32 //     if (not _have_port_queue_ptr)
    33 //       test.information("They have not port '..._QUEUE_PTR'.");
    34 
    35 //     if (not _have_port_instruction_ptr)
    36 //       test.information("They have not port '..._INST_IFETCH_PTR'.");
    37 
    38 //     if (not _have_port_branch_update_prediction_id)
    39 //       test.information("They have not port '..._BRANCH_UPDATE_PREDICTION_ID'.");
    40 
    4132    log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
    4233
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Parameters_print.cpp

    r81 r88  
    2929    xml.singleton_begin("size_queue                   "); xml.attribut("value",toString(_size_queue                   )); xml.singleton_end();
    3030    xml.singleton_begin("nb_instruction               "); xml.attribut("value",toString(_nb_instruction               )); xml.singleton_end();
    31     xml.singleton_begin("size_branch_update_prediction"); xml.attribut("value",toString(_size_branch_update_prediction)); xml.singleton_end();
    32     xml.singleton_begin("size_general_data            "); xml.attribut("value",toString(_size_general_data            )); xml.singleton_end();
     31//  xml.singleton_begin("size_branch_update_prediction"); xml.attribut("value",toString(_size_branch_update_prediction)); xml.singleton_end();
     32//  xml.singleton_begin("size_general_data            "); xml.attribut("value",toString(_size_general_data            )); xml.singleton_end();
    3333    xml.balise_close();
    3434
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Ifetch_unit_Glue_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/SelfTest/src/main.cpp

    r85 r88  
    3737    {
    3838      morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_unit_glue::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_unit_glue::Parameters
    39         (_size_address);
     39        (_size_address,
     40         true //is_toplevel
     41         );
    4042     
    4143      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/SelfTest/src/test.cpp

    r85 r88  
    2323#endif
    2424
     25  Tusage_t _usage = USE_ALL;
     26
     27//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     28//   _usage = usage_unset(_usage,USE_VHDL                 );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     31//   _usage = usage_unset(_usage,USE_POSITION             );
     32//   _usage = usage_unset(_usage,USE_STATISTICS           );
     33//   _usage = usage_unset(_usage,USE_INFORMATION          );
     34
    2535  Ifetch_unit_Glue * _Ifetch_unit_Glue = new Ifetch_unit_Glue
    2636    (name.c_str(),
     
    2939#endif
    3040     _param,
    31      USE_ALL);
     41     _usage);
    3242 
    3343#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/include/Parameters.h

    r85 r88  
    2424  {
    2525    //-----[ fields ]------------------------------------------------------------
    26   public : uint32_t _size_address;
     26//public : uint32_t _size_address;
    2727
    2828    //-----[ methods ]-----------------------------------------------------------
    29   public : Parameters  (uint32_t size_address);
     29  public : Parameters  (uint32_t size_address,
     30                        bool     is_toplevel=false);
    3031//   public : Parameters  (Parameters & param) ;
    3132  public : ~Parameters () ;
     33
     34  public :        void            copy       (void);
    3235
    3336  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue.cpp

    r85 r88  
    3838    log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"Begin");
    3939
     40#if DEBUG_Ifetch_unit_Glue == true
     41    log_printf(INFO,Ifetch_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif   
     45
    4046    log_printf(INFO,Ifetch_unit_Glue,FUNCTION,"Allocation");
    4147
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    5157        log_printf(INFO,Ifetch_unit_Glue,FUNCTION,"Allocation of statistics");
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
     
    6672
    6773#ifdef SYSTEMC
    68     PORT_WRITE(out_ICACHE_REQ_TYPE,ICACHE_TYPE_LOAD);
     74    if (usage_is_set(_usage,USE_SYSTEMC))
     75      {
     76        // Write constant
     77        PORT_WRITE(out_ICACHE_REQ_TYPE,ICACHE_TYPE_LOAD);
    6978
    70     if (_usage & USE_SYSTEMC)
    71       {
    7279# if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    7380        log_printf(INFO,Ifetch_unit_Glue,FUNCTION,"Method - transition");
     
    140147
    141148#ifdef STATISTICS
    142     if (_usage & USE_STATISTICS)
     149    if (usage_is_set(_usage,USE_STATISTICS)) 
    143150      {
    144151        statistics_deallocation();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue_allocation.cpp

    r85 r88  
    6767      ALLOC_SIGNAL_IN ( in_ICACHE_REQ_QUEUE_ACK      ,"queue_ack"      ,Tcontrol_t,1);
    6868      ALLOC_SIGNAL_OUT(out_ICACHE_REQ_TYPE           ,"type"           ,Ticache_type_t,_param->_size_icache_type);
    69       ALLOC_SIGNAL_OUT(out_ICACHE_REQ_ADDRESS        ,"address"        ,Taddress_t,_param->_size_address);
    70       ALLOC_SIGNAL_IN ( in_ICACHE_REQ_ADDRESS_ADDRESS,"address_address",Taddress_t,_param->_size_address);
    71       ALLOC_SIGNAL_OUT(out_ICACHE_REQ_QUEUE_ADDRESS  ,"queue_address"  ,Taddress_t,_param->_size_address);
     69      ALLOC_SIGNAL_OUT(out_ICACHE_REQ_ADDRESS        ,"address"        ,Taddress_t,_param->_size_instruction_address);
     70      ALLOC_SIGNAL_IN ( in_ICACHE_REQ_ADDRESS_ADDRESS,"address_address",Taddress_t,_param->_size_instruction_address);
     71      ALLOC_SIGNAL_OUT(out_ICACHE_REQ_QUEUE_ADDRESS  ,"queue_address"  ,Taddress_t,_param->_size_instruction_address);
    7272    }
    7373
     
    8787
    8888#ifdef POSITION
    89     _component->generate_file();
     89     if (usage_is_set(_usage,USE_POSITION))
     90       _component->generate_file();
    9091#endif
    9192
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue_deallocation.cpp

    r85 r88  
    2323    log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"Begin");
    2424
    25     if (_usage & USE_SYSTEMC)
     25    if (usage_is_set(_usage,USE_SYSTEMC))
    2626      {
    2727        delete     in_CLOCK ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Ifetch_unit_Glue_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
    33     _interfaces->testbench();
     34    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     35      _interfaces->testbench();
    3436#endif
    3537
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Parameters.cpp

    r85 r88  
    1919#undef  FUNCTION
    2020#define FUNCTION "Ifetch_unit_Glue::Parameters"
    21   Parameters::Parameters (uint32_t size_address)
     21  Parameters::Parameters (uint32_t size_address,
     22                          bool     is_toplevel)
    2223  {
    2324    log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"Begin");
    2425
    25     _size_address = size_address;
     26    test();
    2627
    27     test();
     28    if (is_toplevel)
     29      {
     30        _size_instruction_address = size_address;
     31
     32        copy ();
     33      }
     34
    2835    log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"End");
    2936  };
     
    4653  };
    4754
     55#undef  FUNCTION
     56#define FUNCTION "Ifetch_unit_Glue::copy"
     57  void Parameters::copy (void)
     58  {
     59    log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"Begin");
     60    log_printf(FUNC,Ifetch_unit_Glue,FUNCTION,"End");
     61  };
     62
    4863}; // end namespace ifetch_unit_glue
    4964}; // end namespace ifetch_unit
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/src/Parameters_print.cpp

    r85 r88  
    2727
    2828    xml.balise_open("ifetch_unit_glue");
    29     xml.singleton_begin("size_address"); xml.attribut("value",toString(_size_address)); xml.singleton_end();
     29//  xml.singleton_begin("size_address"); xml.attribut("value",toString(_size_address)); xml.singleton_end();
    3030    xml.balise_close();
    3131
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Ifetch_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/SelfTest/src/main.cpp

    r81 r88  
    4747         _nb_instruction                ,
    4848         _size_branch_update_prediction ,
    49          _size_general_data             );
     49         _size_general_data             ,
     50         true // is_toplevel
     51         );
    5052     
    5153      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/SelfTest/src/test.cpp

    r85 r88  
    77 */
    88
    9 #define NB_ITERATION  128
     9#define NB_ITERATION  1024
    1010#define CYCLE_MAX     (128*NB_ITERATION)
    1111
     
    4040#endif
    4141
     42  Tusage_t _usage = USE_ALL;
     43//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     44//   _usage = usage_unset(_usage,USE_VHDL                 );
     45//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     46//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     47//   _usage = usage_unset(_usage,USE_POSITION             );
     48  _usage = usage_unset(_usage,USE_STATISTICS           );
     49//   _usage = usage_unset(_usage,USE_INFORMATION          );
     50
    4251  Ifetch_unit * _Ifetch_unit = new Ifetch_unit
    4352    (name.c_str(),
     
    4655#endif
    4756     _param,
    48      USE_ALL);
     57     _usage);
    4958 
    5059#ifdef SYSTEMC
     
    92101  ALLOC_SC_SIGNAL (out_EVENT_ACK                          ,"out_EVENT_ACK                          ",Tcontrol_t           );
    93102  ALLOC_SC_SIGNAL ( in_EVENT_ADDRESS                      ," in_EVENT_ADDRESS                      ",Tgeneral_address_t   );
     103  ALLOC_SC_SIGNAL ( in_EVENT_ADDRESS_NEXT                 ," in_EVENT_ADDRESS_NEXT                 ",Tgeneral_address_t   );
     104  ALLOC_SC_SIGNAL ( in_EVENT_ADDRESS_NEXT_VAL             ," in_EVENT_ADDRESS_NEXT_VAL             ",Tcontrol_t           );
     105  ALLOC_SC_SIGNAL ( in_EVENT_IS_DS_TAKE                   ," in_EVENT_IS_DS_TAKE                   ",Tcontrol_t           );
    94106 
    95107  /********************************************************
     
    105117  INSTANCE_SC_SIGNAL (_Ifetch_unit, in_ICACHE_REQ_ACK                     );
    106118//INSTANCE_SC_SIGNAL (_Ifetch_unit,out_ICACHE_REQ_THREAD_ID               );
    107   if (_param->_have_port_queue_ptr)
     119  if (_param->_have_port_ifetch_queue_ptr)
    108120  INSTANCE_SC_SIGNAL (_Ifetch_unit,out_ICACHE_REQ_PACKET_ID               );
    109121  INSTANCE_SC_SIGNAL (_Ifetch_unit,out_ICACHE_REQ_ADDRESS                 );
     
    112124  INSTANCE_SC_SIGNAL (_Ifetch_unit,out_ICACHE_RSP_ACK                     );
    113125//INSTANCE_SC_SIGNAL (_Ifetch_unit, in_ICACHE_RSP_THREAD_ID               );
    114   if (_param->_have_port_queue_ptr)
     126  if (_param->_have_port_ifetch_queue_ptr)
    115127  INSTANCE_SC_SIGNAL (_Ifetch_unit, in_ICACHE_RSP_PACKET_ID               );
    116128  INSTANCE1_SC_SIGNAL(_Ifetch_unit, in_ICACHE_RSP_INSTRUCTION             ,_param->_nb_instruction);
     
    124136  INSTANCE_SC_SIGNAL (_Ifetch_unit, in_PREDICT_PC_NEXT_IS_DS_TAKE         );
    125137  INSTANCE1_SC_SIGNAL(_Ifetch_unit, in_PREDICT_INSTRUCTION_ENABLE         ,_param->_nb_instruction);
    126   if (_param->_have_port_instruction_ptr)
     138  if (_param->_have_port_inst_ifetch_ptr)
    127139  INSTANCE_SC_SIGNAL (_Ifetch_unit, in_PREDICT_INST_IFETCH_PTR            );
    128140  INSTANCE_SC_SIGNAL (_Ifetch_unit, in_PREDICT_BRANCH_STATE               );
    129   if (_param->_have_port_branch_update_prediction_id)
     141  if (_param->_have_port_depth)
    130142  INSTANCE_SC_SIGNAL (_Ifetch_unit, in_PREDICT_BRANCH_UPDATE_PREDICTION_ID);
    131143  INSTANCE1_SC_SIGNAL(_Ifetch_unit,out_DECOD_VAL                          ,_param->_nb_instruction);
     
    134146//INSTANCE_SC_SIGNAL (_Ifetch_unit,out_DECOD_CONTEXT_ID                   );
    135147  INSTANCE_SC_SIGNAL (_Ifetch_unit,out_DECOD_ADDRESS                      );
    136   if (_param->_have_port_instruction_ptr)
     148  if (_param->_have_port_inst_ifetch_ptr)
    137149  INSTANCE_SC_SIGNAL (_Ifetch_unit,out_DECOD_INST_IFETCH_PTR              );
    138150  INSTANCE_SC_SIGNAL (_Ifetch_unit,out_DECOD_BRANCH_STATE                 );
    139   if (_param->_have_port_branch_update_prediction_id)
     151  if (_param->_have_port_depth)
    140152  INSTANCE_SC_SIGNAL (_Ifetch_unit,out_DECOD_BRANCH_UPDATE_PREDICTION_ID  );
    141153  INSTANCE_SC_SIGNAL (_Ifetch_unit,out_DECOD_EXCEPTION                    );
     
    143155  INSTANCE_SC_SIGNAL (_Ifetch_unit,out_EVENT_ACK                          );
    144156  INSTANCE_SC_SIGNAL (_Ifetch_unit, in_EVENT_ADDRESS                      );
     157  INSTANCE_SC_SIGNAL (_Ifetch_unit, in_EVENT_ADDRESS_NEXT                 );
     158  INSTANCE_SC_SIGNAL (_Ifetch_unit, in_EVENT_ADDRESS_NEXT_VAL             );
     159  INSTANCE_SC_SIGNAL (_Ifetch_unit, in_EVENT_IS_DS_TAKE                   );
    145160
    146161  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    178193  Tcontrol_t      nn_val  = false;
    179194
    180   Tgeneral_data_t c_addr  = 0x100;
    181   Tgeneral_data_t n_addr  = 0x100;
    182   Tgeneral_data_t nn_addr = 0x100;
     195  Tgeneral_data_t c_addr  = 0x100>>2;
     196  Tgeneral_data_t n_addr  = 0x100>>2;
     197  Tgeneral_data_t nn_addr = 0x100>>2;
    183198
    184199  Tcontrol_t      c_enable [_param->_nb_instruction];
     
    218233    TEST(Tcontrol_t,out_DECOD_VAL [i]->read(), 0);
    219234
    220   LABEL("Send Reset");
    221   do
    222     {
    223       in_EVENT_VAL    ->write(1);
    224       in_EVENT_ADDRESS->write(n_addr);
    225       SC_START(1); 
    226     } while (out_EVENT_ACK->read() == false);
    227   in_EVENT_VAL    ->write(0);
     235//   LABEL("Send Reset");
     236//   do
     237//     {
     238//       in_EVENT_VAL    ->write(1);
     239//       in_EVENT_ADDRESS->write(n_addr);
     240//       SC_START(1); 
     241//     } while (out_EVENT_ACK->read() == false);
     242//   in_EVENT_VAL    ->write(0);
    228243
    229244  n_val = 1;
     
    270285
    271286      // EVENT
    272       in_EVENT_VAL    ->write((rand()%100)<percent_transaction_event  );
    273       in_EVENT_ADDRESS->write(0x100);
     287      in_EVENT_VAL             ->write((rand()%100)<percent_transaction_event  );
     288      in_EVENT_ADDRESS         ->write(0x77);
     289      in_EVENT_ADDRESS_NEXT    ->write(0x171);
     290      Tcontrol_t is_ds_take = rand();
     291      in_EVENT_ADDRESS_NEXT_VAL->write(is_ds_take);
     292      in_EVENT_IS_DS_TAKE      ->write(is_ds_take);
    274293
    275294      // ICACHE_REQ
     
    305324          LABEL("ICACHE_REQ : Transaction accepted");
    306325
    307           Tpacket_t  packet  = (_param->_have_port_queue_ptr)?out_ICACHE_REQ_PACKET_ID->read():0;
     326          Tpacket_t  packet  = (_param->_have_port_ifetch_queue_ptr)?out_ICACHE_REQ_PACKET_ID->read():0;
    308327          Taddress_t address = out_ICACHE_REQ_ADDRESS->read();
    309328
     
    344363        if (find)
    345364          {
    346             if (_param->_have_port_instruction_ptr)
     365            if (_param->_have_port_inst_ifetch_ptr)
    347366            TEST(Tinst_ifetch_ptr_t, out_DECOD_INST_IFETCH_PTR            ->read(), 0);
    348367            TEST(Tbranch_state_t   , out_DECOD_BRANCH_STATE               ->read(), 0);
    349             if (_param->_have_port_branch_update_prediction_id)
     368            if (_param->_have_port_depth)
    350369            TEST(Tprediction_ptr_t , out_DECOD_BRANCH_UPDATE_PREDICTION_ID->read(), 0);
    351370            TEST(Texception_t      , out_DECOD_EXCEPTION                  ->read(), 0);
     
    404423          c_val           = false;
    405424          n_val           = true;
    406           nn_val          = false;
    407 
    408           n_addr         = in_EVENT_ADDRESS->read();
    409           n_is_ds_take   = 0;
     425
     426          n_addr          = in_EVENT_ADDRESS->read();
     427          n_is_ds_take    = in_EVENT_IS_DS_TAKE->read();
     428          nn_val          = in_EVENT_ADDRESS_NEXT_VAL->read();
     429          nn_addr         = in_EVENT_ADDRESS_NEXT    ->read();
     430          nn_is_ds_take   = 0;
    410431
    411432          n_enable [0] = 1;
     
    496517  delete    out_EVENT_ACK                           ;
    497518  delete     in_EVENT_ADDRESS                       ;
     519  delete     in_EVENT_ADDRESS_NEXT                  ;
     520  delete     in_EVENT_ADDRESS_NEXT_VAL              ;
     521  delete     in_EVENT_IS_DS_TAKE                    ;
    498522
    499523  delete    param_cache;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/include/Ifetch_unit.h

    r82 r88  
    109109  public    : SC_OUT(Tcontrol_t        )    * out_EVENT_ACK                           ;
    110110  public    : SC_IN (Tgeneral_address_t)    *  in_EVENT_ADDRESS                       ;
     111  public    : SC_IN (Tgeneral_address_t)    *  in_EVENT_ADDRESS_NEXT                  ;
     112  public    : SC_IN (Tcontrol_t        )    *  in_EVENT_ADDRESS_NEXT_VAL              ;
     113  public    : SC_IN (Tcontrol_t        )    *  in_EVENT_IS_DS_TAKE                    ;
    111114   
    112115    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/include/Parameters.h

    r81 r88  
    2828  public : uint32_t _size_queue                   ;
    2929  public : uint32_t _nb_instruction               ;
    30   public : uint32_t _size_address                 ;
    31   public : uint32_t _size_branch_update_prediction;
    32 
    33   public : uint32_t _size_queue_ptr                       ;
    34   public : uint32_t _size_instruction_ptr                 ;
    35 
    36   public : bool     _have_port_queue_ptr                  ;
    37   public : bool     _have_port_instruction_ptr            ;
    38   public : bool     _have_port_branch_update_prediction_id;
     30//public : uint32_t _size_address                 ;
     31//public : uint32_t _size_branch_update_prediction;
     32//
     33//public : uint32_t _size_queue_ptr                       ;
     34//public : uint32_t _size_instruction_ptr                 ;
     35//
     36//public : bool     _have_port_queue_ptr                  ;
     37//public : bool     _have_port_instruction_ptr            ;
     38//public : bool     _have_port_branch_update_prediction_id;
    3939
    4040  public :morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::address_management::Parameters * _param_address_management;
     
    4646                        uint32_t nb_instruction               ,
    4747                        uint32_t size_branch_update_prediction,
    48                         uint32_t size_address                 );
     48                        uint32_t size_address                 ,
     49                        bool     is_toplevel=false
     50                        );
    4951//   public : Parameters  (Parameters & param) ;
    5052  public : ~Parameters () ;
     53
     54  public :        void            copy       (void);
    5155
    5256  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit.cpp

    r81 r88  
    3737    log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin");
    3838
     39#if DEBUG_Ifetch_unit == true
     40    log_printf(INFO,Ifetch_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     41
     42    std::cout << *param << std::endl;
     43#endif   
     44
    3945    log_printf(INFO,Ifetch_unit,FUNCTION,"Allocation");
    4046
     
    4652
    4753#ifdef STATISTICS
    48     if (_usage & USE_STATISTICS)
     54    if (usage_is_set(_usage,USE_STATISTICS))
    4955      {
    5056        log_printf(INFO,Ifetch_unit,FUNCTION,"Allocation of statistics");
     
    5561
    5662#ifdef VHDL
    57     if (_usage & USE_VHDL)
     63    if (usage_is_set(_usage,USE_VHDL))
    5864      {
    5965        // generate the vhdl
     
    6571
    6672#ifdef SYSTEMC
    67     if (_usage & USE_SYSTEMC)
     73    if (usage_is_set(_usage,USE_SYSTEMC))
    6874      {
    6975        log_printf(INFO,Ifetch_unit,FUNCTION,"Method - transition");
     
    8995
    9096#ifdef STATISTICS
    91     if (_usage & USE_STATISTICS)
     97    if (usage_is_set(_usage,USE_STATISTICS))
    9298      {
    9399        statistics_deallocation();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit_allocation.cpp

    r85 r88  
    5757    // ~~~~~[ Interface "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5858    {
    59       ALLOC_INTERFACE("icache_req",OUT, WEST, "Instruction cache request.");
     59      ALLOC_INTERFACE("icache_req",OUT, WEST, _("Instruction cache request."));
    6060
    6161      ALLOC_VALACK_OUT(out_ICACHE_REQ_VAL      ,VAL);
    6262      ALLOC_VALACK_IN ( in_ICACHE_REQ_ACK      ,ACK);
    6363    //ALLOC_SIGNAL_OUT(out_ICACHE_REQ_THREAD_ID,"thread_id",Tcontext_t           ,_param->_size_context_id );
    64       ALLOC_SIGNAL_OUT(out_ICACHE_REQ_PACKET_ID,"packet_id",Tpacket_t            ,_param->_size_queue_ptr  );
    65       ALLOC_SIGNAL_OUT(out_ICACHE_REQ_ADDRESS  ,"address"  ,Ticache_instruction_t,_param->_size_address    );
     64      ALLOC_SIGNAL_OUT(out_ICACHE_REQ_PACKET_ID,"packet_id",Tpacket_t            ,_param->_size_ifetch_queue_ptr  );
     65      ALLOC_SIGNAL_OUT(out_ICACHE_REQ_ADDRESS  ,"address"  ,Ticache_instruction_t,_param->_size_instruction_address    );
    6666      ALLOC_SIGNAL_OUT(out_ICACHE_REQ_TYPE     ,"type"     ,Ticache_type_t       ,_param->_size_icache_type);
    6767    }
     
    6969    // ~~~~~[ Interface "icache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    7070    {
    71       ALLOC_INTERFACE("icache_rsp",IN , WEST, "Instruction cache respons.");
     71      ALLOC_INTERFACE("icache_rsp",IN , WEST, _("Instruction cache respons."));
    7272
    7373      ALLOC_VALACK_IN  ( in_ICACHE_RSP_VAL        ,VAL);
    7474      ALLOC_VALACK_OUT (out_ICACHE_RSP_ACK        ,ACK);
    7575    //ALLOC_SIGNAL_IN  ( in_ICACHE_RSP_THREAD_ID  ,"thread_id"  ,Tcontext_t           ,_param->_size_context_id  );
    76       ALLOC_SIGNAL_IN  ( in_ICACHE_RSP_PACKET_ID  ,"packet_id"  ,Tpacket_t            ,_param->_size_queue_ptr   );
     76      ALLOC_SIGNAL_IN  ( in_ICACHE_RSP_PACKET_ID  ,"packet_id"  ,Tpacket_t            ,_param->_size_ifetch_queue_ptr   );
    7777      ALLOC_SIGNAL_IN  ( in_ICACHE_RSP_ERROR      ,"error"      ,Ticache_error_t      ,_param->_size_icache_error);
    7878    }
    7979    {
    80       ALLOC1_INTERFACE("icache_rsp",IN , WEST, "Instruction cache respons.",_param->_nb_instruction);
     80      ALLOC1_INTERFACE("icache_rsp",IN , WEST, _("Instruction cache respons."),_param->_nb_instruction);
    8181
    8282      ALLOC1_SIGNAL_IN ( in_ICACHE_RSP_INSTRUCTION,"instruction",Ticache_instruction_t,_param->_size_instruction );
     
    8585    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    8686    {
    87       ALLOC_INTERFACE("predict",OUT, NORTH, "Acces Instruction cache respons.");
     87      ALLOC_INTERFACE("predict",OUT, NORTH, _("Predict the next pc."));
    8888
    8989      ALLOC_VALACK_OUT (out_PREDICT_VAL                        ,VAL);
    9090      ALLOC_VALACK_IN  ( in_PREDICT_ACK                        ,ACK);
    91       ALLOC_SIGNAL_OUT (out_PREDICT_PC_PREVIOUS                ,"pc_previous"                ,Tgeneral_address_t,_param->_size_address);
    92       ALLOC_SIGNAL_OUT (out_PREDICT_PC_CURRENT                 ,"pc_current"                 ,Tgeneral_address_t,_param->_size_address);
     91      ALLOC_SIGNAL_OUT (out_PREDICT_PC_PREVIOUS                ,"pc_previous"                ,Tgeneral_address_t,_param->_size_instruction_address);
     92      ALLOC_SIGNAL_OUT (out_PREDICT_PC_CURRENT                 ,"pc_current"                 ,Tgeneral_address_t,_param->_size_instruction_address);
    9393      ALLOC_SIGNAL_OUT (out_PREDICT_PC_CURRENT_IS_DS_TAKE      ,"pc_current_is_ds_take"      ,Tcontrol_t        ,1);
    94       ALLOC_SIGNAL_IN  ( in_PREDICT_PC_NEXT                    ,"pc_next"                    ,Tgeneral_address_t,_param->_size_address);
     94      ALLOC_SIGNAL_IN  ( in_PREDICT_PC_NEXT                    ,"pc_next"                    ,Tgeneral_address_t,_param->_size_instruction_address);
    9595      ALLOC_SIGNAL_IN  ( in_PREDICT_PC_NEXT_IS_DS_TAKE         ,"pc_next_is_ds_take"         ,Tcontrol_t        ,1);
    96       ALLOC_SIGNAL_IN  ( in_PREDICT_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_instruction_ptr);
     96      ALLOC_SIGNAL_IN  ( in_PREDICT_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_inst_ifetch_ptr);
    9797      ALLOC_SIGNAL_IN  ( in_PREDICT_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t   ,_param->_size_branch_state);
    98       ALLOC_SIGNAL_IN  ( in_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_branch_update_prediction);
    99     }
    100     {
    101       ALLOC1_INTERFACE("predict",IN , NORTH, "Acces Instruction cache respons.",_param->_nb_instruction);
     98      ALLOC_SIGNAL_IN  ( in_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_depth);
     99    }
     100    {
     101      ALLOC1_INTERFACE("predict",IN , NORTH, _("Predict the next pc."),_param->_nb_instruction);
    102102
    103103      ALLOC1_SIGNAL_IN ( in_PREDICT_INSTRUCTION_ENABLE         ,"instruction_enable"         ,Tcontrol_t        ,1);
     
    106106    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    107107    {
    108       ALLOC_INTERFACE("decod",OUT , EAST, "Send bundle to the decod unit.");
     108      ALLOC_INTERFACE("decod",OUT , EAST, _("Send bundle to the decod unit."));
    109109
    110110    //ALLOC_SIGNAL_OUT (out_DECOD_CONTEXT_ID                 ,"context_id"                 ,Tcontext_t        ,_param->_size_context_id);
    111       ALLOC_SIGNAL_OUT (out_DECOD_ADDRESS                    ,"address"                    ,Tgeneral_address_t,_param->_size_address);
    112       ALLOC_SIGNAL_OUT (out_DECOD_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_instruction_ptr);
     111      ALLOC_SIGNAL_OUT (out_DECOD_ADDRESS                    ,"address"                    ,Tgeneral_address_t,_param->_size_instruction_address);
     112      ALLOC_SIGNAL_OUT (out_DECOD_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t,_param->_size_inst_ifetch_ptr);
    113113      ALLOC_SIGNAL_OUT (out_DECOD_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t   ,_param->_size_branch_state);
    114       ALLOC_SIGNAL_OUT (out_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_branch_update_prediction);
     114      ALLOC_SIGNAL_OUT (out_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t ,_param->_size_depth);
    115115      ALLOC_SIGNAL_OUT (out_DECOD_EXCEPTION                  ,"exception"                  ,Texception_t      ,_param->_size_exception_ifetch);
    116116    }
    117117    {
    118       ALLOC1_INTERFACE("decod",OUT , EAST, "Send bundle to the decod unit.",_param->_nb_instruction);
     118      ALLOC1_INTERFACE("decod",OUT , EAST, _("Send bundle to the decod unit."),_param->_nb_instruction);
    119119
    120120      ALLOC1_VALACK_OUT(out_DECOD_VAL                        ,VAL);
     
    125125    // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    126126    {
    127       ALLOC_INTERFACE("event",IN , NORTH, "Event interface.");
    128 
    129       ALLOC_VALACK_IN ( in_EVENT_VAL    ,VAL);
    130       ALLOC_VALACK_OUT(out_EVENT_ACK    ,ACK);
    131       ALLOC_SIGNAL_IN ( in_EVENT_ADDRESS,"address",Tgeneral_address_t,_param->_size_address);
     127      ALLOC_INTERFACE("event",IN , NORTH, _("Event interface."));
     128
     129      ALLOC_VALACK_IN ( in_EVENT_VAL              ,VAL);
     130      ALLOC_VALACK_OUT(out_EVENT_ACK              ,ACK);
     131      ALLOC_SIGNAL_IN ( in_EVENT_ADDRESS          ,"address"         ,Tgeneral_address_t,_param->_size_instruction_address);
     132      ALLOC_SIGNAL_IN ( in_EVENT_ADDRESS_NEXT     ,"address_next"    ,Tgeneral_address_t,_param->_size_instruction_address);
     133      ALLOC_SIGNAL_IN ( in_EVENT_ADDRESS_NEXT_VAL ,"address_next_val",Tcontrol_t,1);
     134      ALLOC_SIGNAL_IN ( in_EVENT_IS_DS_TAKE       ,"is_ds_take"      ,Tcontrol_t,1);
    132135    }
    133136   
     
    137140    {
    138141      name = _name+"_address_management";
    139       std::cout << "Create   : " << name << std::endl;
     142      log_printf(Ifetch_unit,Core,FUNCTION,_("Create   : %s"),name.c_str());
    140143     
    141144      _component_address_management = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::address_management::Address_management
     
    156159    {
    157160      name = _name+"_ifetch_queue";
    158       std::cout << "Create   : " << name << std::endl;
     161      log_printf(Ifetch_unit,Core,FUNCTION,_("Create   : %s"),name.c_str());
    159162     
    160163      _component_ifetch_queue = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_queue::Ifetch_queue
     
    175178    {
    176179      name = _name+"_ifetch_unit_glue";
    177       std::cout << "Create   : " << name << std::endl;
     180      log_printf(Ifetch_unit,Core,FUNCTION,_("Create   : %s"),name.c_str());
    178181     
    179182      _component_ifetch_unit_glue = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_unit_glue::Ifetch_unit_Glue
     
    200203    {
    201204      src = _name+"_address_management";
    202       std::cout << "Instance : " << src << std::endl;
     205      log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    203206           
    204207      {
     
    225228          }
    226229
    227         if (_param->_have_port_instruction_ptr)
     230        if (_param->_have_port_inst_ifetch_ptr)
    228231        COMPONENT_MAP(_component,src ,"out_ADDRESS_INST_IFETCH_PTR"            ,
    229232                                 dest, "in_ADDRESS_INST_IFETCH_PTR"            );
    230233        COMPONENT_MAP(_component,src ,"out_ADDRESS_BRANCH_STATE"               ,
    231234                                 dest, "in_ADDRESS_BRANCH_STATE"               );
    232         if (_param->_have_port_branch_update_prediction_id)
     235        if (_param->_have_port_depth)
    233236        COMPONENT_MAP(_component,src ,"out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID",
    234237                                 dest, "in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID");
     
    281284        PORT_MAP(_component,src , "in_PREDICT_PC_NEXT_IS_DS_TAKE"         
    282285                           ,dest, "in_PREDICT_PC_NEXT_IS_DS_TAKE"         );
    283         if (_param->_have_port_instruction_ptr)
     286        if (_param->_have_port_inst_ifetch_ptr)
    284287        PORT_MAP(_component,src , "in_PREDICT_INST_IFETCH_PTR"           
    285288                           ,dest, "in_PREDICT_INST_IFETCH_PTR"            );
    286289        PORT_MAP(_component,src , "in_PREDICT_BRANCH_STATE"               
    287290                           ,dest, "in_PREDICT_BRANCH_STATE"               );
    288         if (_param->_have_port_branch_update_prediction_id)
     291        if (_param->_have_port_depth)
    289292        PORT_MAP(_component,src , "in_PREDICT_BRANCH_UPDATE_PREDICTION_ID"
    290293                           ,dest, "in_PREDICT_BRANCH_UPDATE_PREDICTION_ID");
     
    306309
    307310        dest = _name;
    308         PORT_MAP(_component,src , "in_EVENT_ADDRESS",dest, "in_EVENT_ADDRESS");
     311        PORT_MAP(_component,src , "in_EVENT_ADDRESS"         ,dest , "in_EVENT_ADDRESS"          );
     312        PORT_MAP(_component,src , "in_EVENT_ADDRESS_NEXT"    ,dest , "in_EVENT_ADDRESS_NEXT"     );
     313        PORT_MAP(_component,src , "in_EVENT_ADDRESS_NEXT_VAL",dest , "in_EVENT_ADDRESS_NEXT_VAL" );
     314        PORT_MAP(_component,src , "in_EVENT_IS_DS_TAKE"      ,dest , "in_EVENT_IS_DS_TAKE"       );
    309315      }
    310316    }
     
    315321    {
    316322      src = _name+"_ifetch_queue";
    317       std::cout << "Instance : " << src << std::endl;
     323      log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    318324           
    319325      {
     
    335341#endif
    336342
    337         if (_param->_have_port_queue_ptr)
     343        if (_param->_have_port_ifetch_queue_ptr)
    338344        PORT_MAP(_component,src ,"out_ADDRESS_IFETCH_QUEUE_ID"            ,
    339345                            dest,"out_ICACHE_REQ_PACKET_ID"               );
     
    386392
    387393        PORT_MAP(_component,src ,"out_DECOD_ADDRESS"                    ,dest,"out_DECOD_ADDRESS"                    );
    388         if (_param->_have_port_instruction_ptr)
     394        if (_param->_have_port_inst_ifetch_ptr)
    389395        PORT_MAP(_component,src ,"out_DECOD_INST_IFETCH_PTR"            ,dest,"out_DECOD_INST_IFETCH_PTR"            );
    390396        PORT_MAP(_component,src ,"out_DECOD_BRANCH_STATE"               ,dest,"out_DECOD_BRANCH_STATE"               );
    391         if (_param->_have_port_branch_update_prediction_id)
     397        if (_param->_have_port_depth)
    392398        PORT_MAP(_component,src ,"out_DECOD_BRANCH_UPDATE_PREDICTION_ID",dest,"out_DECOD_BRANCH_UPDATE_PREDICTION_ID");
    393399        PORT_MAP(_component,src ,"out_DECOD_EXCEPTION"                  ,dest,"out_DECOD_EXCEPTION"                  );
     
    404410        PORT_MAP(_component,src , "in_ICACHE_RSP_VAL"      ,dest, "in_ICACHE_RSP_VAL"      );
    405411        PORT_MAP(_component,src ,"out_ICACHE_RSP_ACK"      ,dest,"out_ICACHE_RSP_ACK"      );
    406         if (_param->_have_port_queue_ptr)
     412        if (_param->_have_port_ifetch_queue_ptr)
    407413        PORT_MAP(_component,src , "in_ICACHE_RSP_PACKET_ID",dest, "in_ICACHE_RSP_PACKET_ID");
    408414        PORT_MAP(_component,src , "in_ICACHE_RSP_ERROR"    ,dest, "in_ICACHE_RSP_ERROR"    );
     
    437443    {
    438444      src = _name+"_ifetch_unit_glue";
    439       std::cout << "Instance : " << src << std::endl;
     445      log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    440446           
    441447      {
     
    490496
    491497    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    492     if (DEBUG_Ifetch_unit == true)
    493       _component->test_map();
    494 
    495 #ifdef POSITION
    496     _component->generate_file();
     498#if DEBUG_Ifetch_unit == true
     499    _component->test_map();
     500#endif
     501   
     502#ifdef POSITION
     503    if (usage_is_set(_usage,USE_POSITION))
     504      _component->generate_file();
    497505#endif
    498506
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit_deallocation.cpp

    r81 r88  
    2222    log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin");
    2323
    24     if (_usage & USE_SYSTEMC)
     24    if (usage_is_set(_usage,USE_SYSTEMC))
    2525      {
    2626        delete     in_CLOCK ;
     
    3030        delete     in_ICACHE_REQ_ACK                      ;
    3131      //delete    out_ICACHE_REQ_THREAD_ID                ;
    32         if (_param->_have_port_queue_ptr)
     32        if (_param->_have_port_ifetch_queue_ptr)
    3333        delete    out_ICACHE_REQ_PACKET_ID                ;
    3434        delete    out_ICACHE_REQ_ADDRESS                  ;
     
    3838        delete    out_ICACHE_RSP_ACK                      ;
    3939      //delete     in_ICACHE_RSP_THREAD_ID                ;
    40         if (_param->_have_port_queue_ptr)
     40        if (_param->_have_port_ifetch_queue_ptr)
    4141        delete     in_ICACHE_RSP_PACKET_ID                ;
    4242        delete []  in_ICACHE_RSP_INSTRUCTION              ;
     
    5151        delete     in_PREDICT_PC_NEXT_IS_DS_TAKE          ;
    5252        delete []  in_PREDICT_INSTRUCTION_ENABLE          ;
    53         if (_param->_have_port_instruction_ptr)
     53        if (_param->_have_port_inst_ifetch_ptr)
    5454        delete     in_PREDICT_INST_IFETCH_PTR             ;
    5555        delete     in_PREDICT_BRANCH_STATE                ;
    56         if (_param->_have_port_branch_update_prediction_id)
     56        if (_param->_have_port_depth)
    5757        delete     in_PREDICT_BRANCH_UPDATE_PREDICTION_ID ;
    5858
     
    6262      //delete    out_DECOD_CONTEXT_ID                    ;
    6363        delete    out_DECOD_ADDRESS                       ;
    64         if (_param->_have_port_instruction_ptr)
     64        if (_param->_have_port_inst_ifetch_ptr)
    6565        delete    out_DECOD_INST_IFETCH_PTR               ;
    6666        delete    out_DECOD_BRANCH_STATE                  ;
    67         if (_param->_have_port_branch_update_prediction_id)
     67        if (_param->_have_port_depth)
    6868        delete    out_DECOD_BRANCH_UPDATE_PREDICTION_ID   ;
    6969        delete    out_DECOD_EXCEPTION                     ;
     
    7272        delete    out_EVENT_ACK                           ;
    7373        delete     in_EVENT_ADDRESS                       ;
     74        delete     in_EVENT_ADDRESS_NEXT                  ;
     75        delete     in_EVENT_ADDRESS_NEXT_VAL              ;
     76        delete     in_EVENT_IS_DS_TAKE                    ;
    7477      }
    7578    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit_end_cycle.cpp

    r81 r88  
    2424
    2525#ifdef STATISTICS
    26     _stat->end_cycle();
     26    if (usage_is_set(_usage,USE_STATISTICS))
     27      _stat->end_cycle();
    2728#endif   
    2829
     
    3031    // Evaluation before read the ouput signal
    3132//  sc_start(0);
    32     _interfaces->testbench();
     33    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     34      _interfaces->testbench();
    3335#endif
    3436
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Parameters.cpp

    r85 r88  
    2121                          uint32_t nb_instruction               ,
    2222                          uint32_t size_branch_update_prediction,
    23                           uint32_t size_address                 )
     23                          uint32_t size_address                 ,
     24                          bool     is_toplevel
     25                          )
    2426  {
    2527    log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin");
     
    2729    _size_queue                            = size_queue                   ;
    2830    _nb_instruction                        = nb_instruction               ;
    29     _size_branch_update_prediction         = size_branch_update_prediction;
    30     _size_address                          = size_address                 ;
    31 
    32     _size_queue_ptr                        = log2(size_queue);
    33     _size_instruction_ptr                  = log2(nb_instruction);
    34 
    35     _have_port_queue_ptr                   = _size_queue_ptr > 0;
    36     _have_port_instruction_ptr             = _size_instruction_ptr > 0;
    37     _have_port_branch_update_prediction_id = size_branch_update_prediction > 0;
     31//  _size_branch_update_prediction         = size_branch_update_prediction;
     32//  _size_address                          = size_address                 ;
    3833
    3934    test();
     
    5045    _param_ifetch_unit_glue   = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::ifetch_unit_glue::  Parameters
    5146      (size_address);
    52    
     47
     48    if (is_toplevel)
     49      {
     50        _size_instruction_address   = size_address;
     51        _size_ifetch_queue_ptr      = log2(size_queue);
     52        _size_inst_ifetch_ptr       = log2(nb_instruction);
     53        _size_depth                 = size_branch_update_prediction;
     54
     55        _have_port_ifetch_queue_ptr = _size_ifetch_queue_ptr > 0;
     56        _have_port_inst_ifetch_ptr  = _size_inst_ifetch_ptr > 0;
     57        _have_port_depth            = _size_depth > 0;
     58
     59        copy ();
     60      }
     61
    5362    log_printf(FUNC,Ifetch_unit,FUNCTION,"End");
    5463  };
     
    7483  };
    7584
     85#undef  FUNCTION
     86#define FUNCTION "Ifetch_unit::copy"
     87  void Parameters::copy (void)
     88  {
     89    log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin");
     90   
     91    COPY(_param_address_management);
     92    COPY(_param_ifetch_queue      );
     93    COPY(_param_ifetch_unit_glue  );
     94
     95    log_printf(FUNC,Ifetch_unit,FUNCTION,"End");
     96  };
     97
    7698}; // end namespace ifetch_unit
    7799}; // end namespace front_end
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Parameters_print.cpp

    r81 r88  
    2323    log_printf(FUNC,Ifetch_unit,FUNCTION,"Begin");
    2424
    25     XML xml ("ifetch_unit");
     25//     XML xml ("ifetch_unit");
    2626
    27     xml.balise_open("ifetch_unit");
    28     xml.singleton_begin("size_queue                   "); xml.attribut("value",toString(_size_queue                   )); xml.singleton_end();
    29     xml.singleton_begin("nb_instruction               "); xml.attribut("value",toString(_nb_instruction               )); xml.singleton_end();
    30     xml.singleton_begin("size_branch_update_prediction"); xml.attribut("value",toString(_size_branch_update_prediction)); xml.singleton_end();
    31     xml.singleton_begin("size_address                 "); xml.attribut("value",toString(_size_address                 )); xml.singleton_end();
    32     xml.balise_close();
     27//     xml.balise_open("ifetch_unit");
     28//     xml.singleton_begin("size_queue                   "); xml.attribut("value",toString(_size_queue                   )); xml.singleton_end();
     29//     xml.singleton_begin("nb_instruction               "); xml.attribut("value",toString(_nb_instruction               )); xml.singleton_end();
     30// //  xml.singleton_begin("size_branch_update_prediction"); xml.attribut("value",toString(_size_branch_update_prediction)); xml.singleton_end();
     31// //  xml.singleton_begin("size_address                 "); xml.attribut("value",toString(_size_address                 )); xml.singleton_end();
     32//     xml.balise_close();
     33
     34//     return xml.get_body(depth);
     35
     36    std::string str = "";
    3337
    3438    log_printf(FUNC,Ifetch_unit,FUNCTION,"End");
     39
     40    return str;
    3541   
    36     return xml.get_body(depth);
    3742  };
    3843
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Branch_Target_Buffer_Glue_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/src/main.cpp

    r81 r88  
    5555         _nb_inst_predict    ,
    5656         _nb_inst_decod      ,
    57          _nb_inst_update     );
     57         _nb_inst_update     ,
     58         true // is_toplevel
     59         );
    5860     
    5961      msg(_("%s"),param->print(1).c_str());
  • 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

    r82 r88  
    2323#endif
    2424
     25  Tusage_t _usage = USE_ALL;
     26
     27//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     28//   _usage = usage_unset(_usage,USE_VHDL                 );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     31//   _usage = usage_unset(_usage,USE_POSITION             );
     32//   _usage = usage_unset(_usage,USE_STATISTICS           );
     33//   _usage = usage_unset(_usage,USE_INFORMATION          );
     34
    2535  Branch_Target_Buffer_Glue * _Branch_Target_Buffer_Glue = new Branch_Target_Buffer_Glue
    2636    (name.c_str(),
     
    2939#endif
    3040     _param,
    31      USE_ALL);
     41     _usage);
    3242 
    3343#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/include/Parameters.h

    r81 r88  
    2929  public : uint32_t   _size_buffer       ;
    3030  public : uint32_t   _associativity     ;
    31   public : uint32_t   _size_address      ;
     31//public : uint32_t   _size_address      ;
    3232  public : uint32_t   _nb_inst_predict   ;
    3333  public : uint32_t   _nb_inst_decod     ;
     
    5151                        uint32_t   nb_inst_predict   ,
    5252                        uint32_t   nb_inst_decod     ,
    53                         uint32_t   nb_inst_update    );
     53                        uint32_t   nb_inst_update    ,
     54                        bool       is_toplevel=false
     55                        );
    5456//   public : Parameters  (Parameters & param) ;
    5557  public : ~Parameters () ;
     58
     59  public :        void            copy       (void);
    5660
    5761  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue.cpp

    r81 r88  
    3939    log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"Begin");
    4040
     41#if DEBUG_Branch_Target_Buffer_Glue == true
     42    log_printf(INFO,Branch_Target_Buffer_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
     43
     44    std::cout << *param << std::endl;
     45#endif   
     46
    4147    log_printf(INFO,Branch_Target_Buffer_Glue,FUNCTION,"Allocation");
    4248
     
    4854
    4955#ifdef STATISTICS
    50     if (_usage & USE_STATISTICS)
     56    if (usage_is_set(_usage,USE_STATISTICS))
    5157      {
    5258        log_printf(INFO,Branch_Target_Buffer_Glue,FUNCTION,"Allocation of statistics");
     
    5763
    5864#ifdef VHDL
    59     if (_usage & USE_VHDL)
     65    if (usage_is_set(_usage,USE_VHDL))
    6066      {
    6167        // generate the vhdl
     
    6773
    6874#ifdef SYSTEMC
    69     if (_usage & USE_SYSTEMC)
     75    if (usage_is_set(_usage,USE_SYSTEMC))
    7076      {
    7177# if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     
    104110          }
    105111       
    106 # ifdef SYSTEMCASS_SPECIFIC
    107         // List dependency information
    108 
    109         for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
    110           {
    111             for (uint32_t j=0; j<_param->_associativity; j++)
    112             (*(out_PREDICT_HIT            [i])) (*(in_PREDICT_REGISTER_HIT          [i][j]));
    113             if (_param->_have_port_victim)
    114             (*(out_PREDICT_HIT            [i])) (*(in_PREDICT_SORT_INDEX            [i]));
    115 
    116             for (uint32_t j=0; j<_param->_associativity; j++)
    117             (*(out_PREDICT_ADDRESS_SRC    [i])) (*(in_PREDICT_REGISTER_ADDRESS_SRC  [i][j]));
    118             if (_param->_have_port_victim)
    119             (*(out_PREDICT_ADDRESS_SRC    [i])) (*(in_PREDICT_SORT_INDEX            [i]));
    120 
    121             for (uint32_t j=0; j<_param->_associativity; j++)
    122             (*(out_PREDICT_ADDRESS_DEST   [i])) (*(in_PREDICT_REGISTER_ADDRESS_DEST [i][j]));
    123             if (_param->_have_port_victim)
    124             (*(out_PREDICT_ADDRESS_DEST   [i])) (*(in_PREDICT_SORT_INDEX            [i]));
    125 
    126             for (uint32_t j=0; j<_param->_associativity; j++)
    127             (*(out_PREDICT_CONDITION      [i])) (*(in_PREDICT_REGISTER_CONDITION    [i][j]));
    128             if (_param->_have_port_victim)
    129             (*(out_PREDICT_CONDITION      [i])) (*(in_PREDICT_SORT_INDEX            [i]));
    130 
    131             for (uint32_t j=0; j<_param->_associativity; j++)
    132             (*(out_PREDICT_LAST_TAKE      [i])) (*(in_PREDICT_REGISTER_LAST_TAKE    [i][j]));
    133             if (_param->_have_port_victim)
    134             (*(out_PREDICT_LAST_TAKE      [i])) (*(in_PREDICT_SORT_INDEX            [i]));
    135 
    136             for (uint32_t j=0; j<_param->_associativity; j++)
    137             (*(out_PREDICT_IS_ACCURATE    [i])) (*(in_PREDICT_REGISTER_IS_ACCURATE  [i][j]));
    138             if (_param->_have_port_victim)
    139             (*(out_PREDICT_IS_ACCURATE    [i])) (*(in_PREDICT_SORT_INDEX            [i]));
    140 
    141 
    142             (*(out_PREDICT_ACK            [i])) (*(in_PREDICT_REGISTER_ACK          [i]));
    143             if (_param->_have_port_victim)
    144               {
    145             (*(out_PREDICT_ACK            [i])) (*(in_PREDICT_SORT_VAL              [i]));
    146             (*(out_PREDICT_ACK            [i])) (*(in_PREDICT_VICTIM_ACK            [i]));
    147               }
    148 
    149             (*(out_PREDICT_REGISTER_VAL   [i])) (*(in_PREDICT_VAL                   [i]));
    150             if (_param->_have_port_victim)
    151               {
    152             (*(out_PREDICT_REGISTER_VAL   [i])) (*(in_PREDICT_SORT_VAL              [i]));
    153             (*(out_PREDICT_REGISTER_VAL   [i])) (*(in_PREDICT_VICTIM_ACK            [i]));
    154               }
    155 
    156             if (_param->_have_port_victim)
    157               {
    158             (*(out_PREDICT_VICTIM_VAL     [i])) (*(in_PREDICT_VAL                   [i]));
    159             (*(out_PREDICT_VICTIM_VAL     [i])) (*(in_PREDICT_REGISTER_ACK          [i]));
    160             (*(out_PREDICT_VICTIM_VAL     [i])) (*(in_PREDICT_SORT_VAL              [i]));
    161 
    162             for (uint32_t j=0; j<_param->_associativity; j++)
    163             (*(out_PREDICT_VICTIM_HIT     [i])) (*(in_PREDICT_REGISTER_HIT          [i][j]));
    164             (*(out_PREDICT_VICTIM_HIT     [i])) (*(in_PREDICT_SORT_INDEX            [i]));
    165 
    166             if (not _param->_is_full_associative)
    167               {
    168             for (uint32_t j=0; j<_param->_associativity; j++)
    169             (*(out_PREDICT_VICTIM_ADDRESS [i])) (*(in_PREDICT_REGISTER_ADDRESS_SRC  [i][j]));
    170             (*(out_PREDICT_VICTIM_ADDRESS [i])) (*(in_PREDICT_SORT_INDEX            [i]));
    171               }
    172             (*(out_PREDICT_VICTIM_INDEX   [i])) (*(in_PREDICT_SORT_INDEX            [i]));
    173               }
    174           }
    175 # endif
     112// # ifdef SYSTEMCASS_SPECIFIC
     113//      // List dependency information
     114
     115//      for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     116//        {
     117//          for (uint32_t j=0; j<_param->_associativity; j++)
     118//          (*(out_PREDICT_HIT            [i])) (*(in_PREDICT_REGISTER_HIT          [i][j]));
     119//          if (_param->_have_port_victim)
     120//          (*(out_PREDICT_HIT            [i])) (*(in_PREDICT_SORT_INDEX            [i]));
     121
     122//          for (uint32_t j=0; j<_param->_associativity; j++)
     123//          (*(out_PREDICT_ADDRESS_SRC    [i])) (*(in_PREDICT_REGISTER_ADDRESS_SRC  [i][j]));
     124//          if (_param->_have_port_victim)
     125//          (*(out_PREDICT_ADDRESS_SRC    [i])) (*(in_PREDICT_SORT_INDEX            [i]));
     126
     127//          for (uint32_t j=0; j<_param->_associativity; j++)
     128//          (*(out_PREDICT_ADDRESS_DEST   [i])) (*(in_PREDICT_REGISTER_ADDRESS_DEST [i][j]));
     129//          if (_param->_have_port_victim)
     130//          (*(out_PREDICT_ADDRESS_DEST   [i])) (*(in_PREDICT_SORT_INDEX            [i]));
     131
     132//          for (uint32_t j=0; j<_param->_associativity; j++)
     133//          (*(out_PREDICT_CONDITION      [i])) (*(in_PREDICT_REGISTER_CONDITION    [i][j]));
     134//          if (_param->_have_port_victim)
     135//          (*(out_PREDICT_CONDITION      [i])) (*(in_PREDICT_SORT_INDEX            [i]));
     136
     137//          for (uint32_t j=0; j<_param->_associativity; j++)
     138//          (*(out_PREDICT_LAST_TAKE      [i])) (*(in_PREDICT_REGISTER_LAST_TAKE    [i][j]));
     139//          if (_param->_have_port_victim)
     140//          (*(out_PREDICT_LAST_TAKE      [i])) (*(in_PREDICT_SORT_INDEX            [i]));
     141
     142//          for (uint32_t j=0; j<_param->_associativity; j++)
     143//          (*(out_PREDICT_IS_ACCURATE    [i])) (*(in_PREDICT_REGISTER_IS_ACCURATE  [i][j]));
     144//          if (_param->_have_port_victim)
     145//          (*(out_PREDICT_IS_ACCURATE    [i])) (*(in_PREDICT_SORT_INDEX            [i]));
     146
     147
     148//          (*(out_PREDICT_ACK            [i])) (*(in_PREDICT_REGISTER_ACK          [i]));
     149//          if (_param->_have_port_victim)
     150//            {
     151//          (*(out_PREDICT_ACK            [i])) (*(in_PREDICT_SORT_VAL              [i]));
     152//          (*(out_PREDICT_ACK            [i])) (*(in_PREDICT_VICTIM_ACK            [i]));
     153//            }
     154
     155//          (*(out_PREDICT_REGISTER_VAL   [i])) (*(in_PREDICT_VAL                   [i]));
     156//          if (_param->_have_port_victim)
     157//            {
     158//          (*(out_PREDICT_REGISTER_VAL   [i])) (*(in_PREDICT_SORT_VAL              [i]));
     159//          (*(out_PREDICT_REGISTER_VAL   [i])) (*(in_PREDICT_VICTIM_ACK            [i]));
     160//            }
     161
     162//          if (_param->_have_port_victim)
     163//            {
     164//          (*(out_PREDICT_VICTIM_VAL     [i])) (*(in_PREDICT_VAL                   [i]));
     165//          (*(out_PREDICT_VICTIM_VAL     [i])) (*(in_PREDICT_REGISTER_ACK          [i]));
     166//          (*(out_PREDICT_VICTIM_VAL     [i])) (*(in_PREDICT_SORT_VAL              [i]));
     167
     168//          for (uint32_t j=0; j<_param->_associativity; j++)
     169//          (*(out_PREDICT_VICTIM_HIT     [i])) (*(in_PREDICT_REGISTER_HIT          [i][j]));
     170//          (*(out_PREDICT_VICTIM_HIT     [i])) (*(in_PREDICT_SORT_INDEX            [i]));
     171
     172//          if (not _param->_is_full_associative)
     173//            {
     174//          for (uint32_t j=0; j<_param->_associativity; j++)
     175//          (*(out_PREDICT_VICTIM_ADDRESS [i])) (*(in_PREDICT_REGISTER_ADDRESS_SRC  [i][j]));
     176//          (*(out_PREDICT_VICTIM_ADDRESS [i])) (*(in_PREDICT_SORT_INDEX            [i]));
     177//            }
     178//          (*(out_PREDICT_VICTIM_INDEX   [i])) (*(in_PREDICT_SORT_INDEX            [i]));
     179//            }
     180//        }
     181// # endif
    176182
    177183        log_printf(INFO,Branch_Target_Buffer_Glue,FUNCTION,"Method - genMealy_decod");
     
    271277
    272278#ifdef STATISTICS
    273     if (_usage & USE_STATISTICS)
     279    if (usage_is_set(_usage,USE_STATISTICS))
    274280      {
    275281        statistics_deallocation();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_allocation.cpp

    r81 r88  
    6565        ALLOC1_SIGNAL_OUT(out_PREDICT_ACK           , "ack"           ,Tcontrol_t         , 1);
    6666        ALLOC1_SIGNAL_OUT(out_PREDICT_HIT           , "hit"           ,Tcontrol_t         , 1);
    67         ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_SRC   , "address_src"   ,Tgeneral_data_t    , _param->_size_address);
    68         ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_DEST  , "address_dest"  ,Tgeneral_data_t    , _param->_size_address);
     67        ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_SRC   , "address_src"   ,Tgeneral_data_t    , _param->_size_instruction_address);
     68        ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_DEST  , "address_dest"  ,Tgeneral_data_t    , _param->_size_instruction_address);
    6969        ALLOC1_SIGNAL_OUT(out_PREDICT_CONDITION     , "condition"     ,Tbranch_condition_t, _param->_size_branch_condition);
    7070        ALLOC1_SIGNAL_OUT(out_PREDICT_LAST_TAKE     , "last_take"     ,Tcontrol_t         , 1);
     
    8989
    9090        ALLOC2_SIGNAL_IN ( in_PREDICT_REGISTER_HIT         ,"register_hit"         ,Tcontrol_t         ,1);
    91         ALLOC2_SIGNAL_IN ( in_PREDICT_REGISTER_ADDRESS_SRC ,"register_address_src" ,Tgeneral_data_t    ,_param->_size_address);
    92         ALLOC2_SIGNAL_IN ( in_PREDICT_REGISTER_ADDRESS_DEST,"register_address_dest",Tgeneral_data_t    ,_param->_size_address);
     91        ALLOC2_SIGNAL_IN ( in_PREDICT_REGISTER_ADDRESS_SRC ,"register_address_src" ,Tgeneral_data_t    ,_param->_size_instruction_address);
     92        ALLOC2_SIGNAL_IN ( in_PREDICT_REGISTER_ADDRESS_DEST,"register_address_dest",Tgeneral_data_t    ,_param->_size_instruction_address);
    9393        ALLOC2_SIGNAL_IN ( in_PREDICT_REGISTER_CONDITION   ,"register_condition"   ,Tbranch_condition_t,_param->_size_branch_condition);
    9494        ALLOC2_SIGNAL_IN ( in_PREDICT_REGISTER_LAST_TAKE   ,"register_last_take"   ,Tcontrol_t         ,1);
     
    104104      ALLOC1_SIGNAL_OUT(out_DECOD_ACK           ,"ack"           ,Tcontrol_t     ,1);
    105105      if (not _param->_is_full_associative)
    106       ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_SRC   ,"address_src"   ,Tgeneral_data_t,_param->_size_address);
     106      ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_SRC   ,"address_src"   ,Tgeneral_data_t,_param->_size_instruction_address);
    107107
    108108      ALLOC1_SIGNAL_OUT(out_DECOD_REGISTER_VAL  ,"register_val"  ,Tcontrol_t     ,1);
     
    124124      ALLOC1_SIGNAL_OUT(out_UPDATE_ACK           ,"ack"           ,Tcontrol_t     ,1);
    125125      if (not _param->_is_full_associative)
    126       ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS_SRC   ,"address_src"   ,Tgeneral_data_t,_param->_size_address);
     126      ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS_SRC   ,"address_src"   ,Tgeneral_data_t,_param->_size_instruction_address);
    127127
    128128      ALLOC1_SIGNAL_OUT(out_UPDATE_REGISTER_VAL  ,"register_val"  ,Tcontrol_t     ,1);
     
    140140
    141141#ifdef POSITION
    142     _component->generate_file();
     142    if (usage_is_set(_usage,USE_POSITION))
     143      _component->generate_file();
    143144#endif
    144145
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_deallocation.cpp

    r81 r88  
    2424    log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"Begin");
    2525
    26     if (_usage & USE_SYSTEMC)
     26    if (usage_is_set(_usage,USE_SYSTEMC))
    2727      {
    2828        delete     in_CLOCK ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_end_cycle.cpp

    r81 r88  
    2626
    2727#ifdef STATISTICS
    28     _stat->end_cycle();
     28    if (usage_is_set(_usage,USE_STATISTICS))
     29      _stat->end_cycle();
    2930#endif   
    3031
     
    3233    // Evaluation before read the ouput signal
    3334//  sc_start(0);
    34     _interfaces->testbench();
     35    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     36      _interfaces->testbench();
    3537#endif
    3638
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Parameters.cpp

    r81 r88  
    2727                          uint32_t   nb_inst_predict   ,
    2828                          uint32_t   nb_inst_decod     ,
    29                           uint32_t   nb_inst_update    )
     29                          uint32_t   nb_inst_update    ,
     30                          bool       is_toplevel)
    3031  {
    3132    log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"Begin");
     
    3435    _size_buffer            = size_buffer       ;
    3536    _associativity          = associativity     ;
    36     _size_address           = size_address      ;
     37//  _size_address           = size_address      ;
    3738    _nb_inst_predict        = nb_inst_predict   ;
    3839    _nb_inst_decod          = nb_inst_decod     ;
     
    5051
    5152    test();
     53
     54    if (is_toplevel)
     55      {
     56        _size_instruction_address = size_address;
     57
     58        copy();
     59      }
     60
    5261    log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"End");
    5362  };
     
    7079  };
    7180
     81#undef  FUNCTION
     82#define FUNCTION "Branch_Target_Buffer_Glue::copy"
     83  void Parameters::copy (void)
     84  {
     85    log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"Begin");
     86    log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"End");
     87  };
     88
    7289}; // end namespace branch_target_buffer_glue
    7390}; // end namespace branch_target_buffer
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Parameters_print.cpp

    r81 r88  
    3131    xml.singleton_begin("size_buffer       "); xml.attribut("value",toString(_size_buffer       )); xml.singleton_end();
    3232    xml.singleton_begin("associativity     "); xml.attribut("value",toString(_associativity     )); xml.singleton_end();
    33     xml.singleton_begin("size_address      "); xml.attribut("value",toString(_size_address      )); xml.singleton_end();
     33//  xml.singleton_begin("size_address      "); xml.attribut("value",toString(_size_address      )); xml.singleton_end();
    3434    xml.singleton_begin("nb_inst_predict   "); xml.attribut("value",toString(_nb_inst_predict   )); xml.singleton_end();
    3535    xml.singleton_begin("nb_inst_decod     "); xml.attribut("value",toString(_nb_inst_decod     )); xml.singleton_end();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/Makefile.deps

    r81 r88  
    1616#-----[ Directory ]----------------------------------------
    1717
    18 Branch_Target_Buffer_Register_DIR                       =       $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register
     18Branch_Target_Buffer_Register_DIR               =       $(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register
    1919
    2020#-----[ Library ]------------------------------------------
    2121
    2222Branch_Target_Buffer_Register_LIBRARY           =       -lBranch_Target_Buffer_Register \
    23                                         $(Behavioural_LIBRARY) 
     23                                                        $(Behavioural_LIBRARY) 
    2424
    25 Branch_Target_Buffer_Register_DIR_LIBRARY               =       -L$(Branch_Target_Buffer_Register_DIR)/lib      \
    26                                         $(Behavioural_DIR_LIBRARY)
     25Branch_Target_Buffer_Register_DIR_LIBRARY       =       -L$(Branch_Target_Buffer_Register_DIR)/lib      \
     26                                                        $(Behavioural_DIR_LIBRARY)
    2727
    2828#-----[ Rules ]--------------------------------------------
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Branch_Target_Buffer_Register_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/config_min.cfg

    r82 r88  
    441       1       *4      # size_buffer   
    551       1       *4      # associativity 
    6 32      32      *2      # size_address   
     630      30      *2      # size_address   
    772       2       +1      # size_counter   
    881       1       *4      # nb_inst_predict
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/config_mono_context.cfg

    r81 r88  
    4416      16      *4      # size_buffer   
    552       16      *4      # associativity 
    6 32      32      *2      # size_address   
     630      30      *2      # size_address   
    772       2       +1      # size_counter   
    881       4       *4      # nb_inst_predict
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/config_multi_context.cfg

    r81 r88  
    778       64      *4      # size_buffer   
    884       8       *2      # associativity 
    9 32      32      *2      # size_address   
     930      30      *2      # size_address   
    10102       2       +1      # size_counter   
    11111       4       *4      # nb_inst_predict
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/src/main.cpp

    r81 r88  
    6767         _nb_inst_predict,
    6868         _nb_inst_decod  ,
    69          _nb_inst_commit );
     69         _nb_inst_commit ,
     70         true // is_toplevel
     71         );
    7072     
    7173      msg(_("%s"),param->print(1).c_str());
  • 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

    r82 r88  
    1414#include "Common/include/BitManipulation.h"
    1515#include "Behavioural/include/Allocation.h"
    16 
    17   class entry_t
    18   {
    19   public : Tcontrol_t          _val             ;
    20   public : Tcontext_t          _context         ;
    21   public : Tcontrol_t          _address_dest_val;
    22   public : Tgeneral_data_t     _address_src     ;
    23   public : Tgeneral_data_t     _address_dest    ;
    24   public : Tbranch_condition_t _condition       ;
    25   public : Tcontrol_t          _last_take       ;
    26   public : Tcounter_t          _accurate        ;
    27 
    28   public : bool hit (morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer::branch_target_buffer_register::Parameters * _param,
    29                      Tgeneral_data_t addr_test,
    30                      Tcontext_t      context)
    31     {
    32       Tgeneral_data_t addr_src_offset  = (_address_src  >> _param->_shift_offset)&_param->_mask_offset;
    33       Tgeneral_data_t addr_src_index   = (_address_src  >> _param->_shift_bank  )&_param->_mask_bank  ;
    34       Tgeneral_data_t addr_src_tag     = (_address_src  >> _param->_shift_tag   );
    35      
    36       Tgeneral_data_t addr_test_offset = (addr_test >> _param->_shift_offset)&_param->_mask_offset;
    37       Tgeneral_data_t addr_test_index  = (addr_test >> _param->_shift_bank  )&_param->_mask_bank  ;
    38       Tgeneral_data_t addr_test_tag    = (addr_test >> _param->_shift_tag   );
    39 
    40       bool is_hit = ( (_val             == 1               ) and
    41                       (_context         == context         ) and
    42                       (addr_test_tag    == addr_src_tag    ) and
    43                       (addr_test_index  == addr_src_index  ) and
    44                       (addr_test_offset <= addr_src_offset ));
    45 
    46       LABEL("address_src  (tag, index, offset) : %.8x %.8x %.8x",addr_src_tag, addr_src_index, addr_src_offset);
    47       LABEL("address_test (tag, index, offset) : %.8x %.8x %.8x - hit : %d",addr_test_tag, addr_test_index, addr_test_offset, is_hit);
    48       return is_hit;
    49     }
    50    
    51   public : void print (void)
    52     {
    53       LABEL("%d - %.2d %.8x %.1d %.8x %.3d %.1d %.4d",
    54             _val             ,
    55             _context         ,
    56             _address_src     ,
    57             _address_dest_val,
    58             _address_dest    ,
    59             _condition       ,
    60             _last_take       ,
    61             _accurate        );
    62 
    63     }
    64    
    65   };
    66 
    67 
    68 
    69 Tgeneral_data_t gen_addr (morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer::branch_target_buffer_register::Parameters * _param,
    70                           Tgeneral_data_t index)
    71 {
    72   Tgeneral_data_t addr_tag     = (rand()%(2*_param->_associativity)) << _param->_shift_tag   ;
    73   Tgeneral_data_t addr_index   = (index &_param->_mask_bank        ) << _param->_shift_bank  ;
    74   Tgeneral_data_t addr_offset  = (rand()&_param->_mask_offset      ) << _param->_shift_offset;
    75 
    76   LABEL("gen_addr     (tag, index, offset) : %.8x %.8x %.8x",addr_tag, addr_index, addr_offset);
    77 
    78   return (addr_tag    |
    79           addr_index  |
    80           addr_offset );
    81 }
    82 
     16#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/include/test_BTB.h"
    8317
    8418void test (string name,
     
    9024  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50);
    9125#endif
     26
     27  Tusage_t _usage = USE_ALL;
     28
     29//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     30//   _usage = usage_unset(_usage,USE_VHDL                 );
     31//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     32//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     33//   _usage = usage_unset(_usage,USE_POSITION             );
     34//   _usage = usage_unset(_usage,USE_STATISTICS           );
     35//   _usage = usage_unset(_usage,USE_INFORMATION          );
    9236
    9337  Branch_Target_Buffer_Register * _Branch_Target_Buffer_Register = new Branch_Target_Buffer_Register
     
    9741#endif
    9842     _param,
    99      USE_ALL);
     43     _usage);
    10044 
    10145#ifdef SYSTEMC
     
    269213          in_DECOD_VICTIM          [i]->write(rand()%_param->_associativity);
    270214          in_DECOD_CONTEXT_ID      [i]->write(rand()%_param->_nb_context);
    271           in_DECOD_ADDRESS_SRC     [i]->write(addr);
     215          in_DECOD_ADDRESS_SRC     [i]->write( addr);
    272216          in_DECOD_ADDRESS_DEST    [i]->write(~addr);
    273217          in_DECOD_CONDITION       [i]->write((addr&1)?BRANCH_CONDITION_FLAG_SET:BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK);
     
    284228          in_UPDATE_VICTIM          [i]->write(rand()%_param->_associativity);
    285229          in_UPDATE_CONTEXT_ID      [i]->write(rand()%_param->_nb_context);
    286           in_UPDATE_ADDRESS_SRC     [i]->write(addr);
     230          in_UPDATE_ADDRESS_SRC     [i]->write( addr);
    287231          in_UPDATE_ADDRESS_DEST    [i]->write(~addr);
    288232          in_UPDATE_CONDITION       [i]->write((addr&1)?BRANCH_CONDITION_FLAG_SET:BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK);
     
    334278
    335279            bool hit = false;
    336            
    337             for (uint32_t j=0; j<_param->_associativity; j++)
    338               hit |= ((tab_old[j]._val         == 1) and
    339                       (tab_old[j]._context     == in_DECOD_CONTEXT_ID  [i]->read()) and
    340                       (tab_old[j]._address_src == in_DECOD_ADDRESS_SRC [i]->read()));
     280
     281            Tptr_t k;
     282            for (k=0; k<_param->_associativity; k++)
     283              {
     284                hit |= ((tab_old[k]._val         == 1) and
     285                        (tab_old[k]._context     == in_DECOD_CONTEXT_ID  [i]->read()) and
     286                        (tab_old[k]._address_src == in_DECOD_ADDRESS_SRC [i]->read()));
     287
     288                if (hit)
     289                  break;
     290              }
    341291
    342292            if (not hit)
    343293              {
    344                 Tptr_t k = in_DECOD_VICTIM [i]->read();
    345 
     294                k = in_DECOD_VICTIM [i]->read();
    346295                LABEL("  * miss");
    347296                LABEL("  * victim      : %d",k);
     
    354303                tab[k]._condition        = in_DECOD_CONDITION   [i]->read();
    355304                tab[k]._last_take        = in_DECOD_LAST_TAKE   [i]->read();
    356                 //tab[k]._accurate         = _param->_first_accurate_if_hit;
     305                tab[k]._accurate         =(in_DECOD_IS_ACCURATE [i]->read())?_param->_first_accurate_if_hit:_param->_first_accurate_if_miss;
    357306              }
    358307            else
    359308              {
    360                 LABEL("  * miss");
    361               }
    362            
    363             TEST(Tcontrol_t, out_DECOD_HIT [i]->read(), hit);
     309                LABEL("  * hit");
     310              }
     311         
     312            if (_param->_have_port_victim)
     313              {
     314            TEST(Tcontrol_t, out_DECOD_HIT       [i]->read(), hit);
     315            if (hit)
     316            TEST(Tptr_t    , out_DECOD_HIT_INDEX [i]->read(), k);
     317              }
    364318          }
    365319
     
    373327            bool hit = false;
    374328           
    375             Tptr_t k = 0;
    376             for (uint32_t j=0; j<_param->_associativity; j++)
    377               {
    378                 hit |= ((tab_old[j]._val         == 1) and
    379                         (tab_old[j]._context     == in_UPDATE_CONTEXT_ID  [i]->read()) and
    380                         (tab_old[j]._address_src == in_UPDATE_ADDRESS_SRC [i]->read()));
     329            Tptr_t k;
     330            for (k=0; k<_param->_associativity; k++)
     331              {
     332                hit |= ((tab_old[k]._val         == 1) and
     333                        (tab_old[k]._context     == in_UPDATE_CONTEXT_ID  [i]->read()) and
     334                        (tab_old[k]._address_src == in_UPDATE_ADDRESS_SRC [i]->read()));
    381335                if (hit)
    382                   {
    383                     k = j;
    384                     break;
    385                   }
     336                  break;
    386337              }
    387338
     
    400351                tab[k]._condition        = in_UPDATE_CONDITION   [i]->read();
    401352                tab[k]._last_take        = in_UPDATE_LAST_TAKE   [i]->read();
    402                 //tab[k]._accurate         = (in_UPDATE_MISS_PREDICTION [i]->read())?_param->_first_accurate_if_miss:_param->_first_accurate_if_hit;
     353                tab[k]._accurate         = (in_UPDATE_MISS_PREDICTION [i]->read())?_param->_first_accurate_if_miss:_param->_first_accurate_if_hit;
    403354              }
    404355            else
     
    414365                tab[k]._condition        = in_UPDATE_CONDITION   [i]->read();
    415366                tab[k]._last_take        = in_UPDATE_LAST_TAKE   [i]->read();
    416                 //tab[k]._accurate         = (in_UPDATE_MISS_PREDICTION [i]->read())?_param->_first_accurate_if_miss:_param->_first_accurate_if_hit;
    417               }
    418 
    419             TEST(Tcontrol_t, out_UPDATE_HIT [i]->read(), hit);
     367
     368
     369                Tcounter_t accurate_old = tab[k]._accurate;
     370                // hit  : increase accurate
     371                // miss : decrease accurate
     372                Tcounter_t accurate_new = (in_UPDATE_MISS_PREDICTION [i]->read())?((accurate_old>0)?(accurate_old-1):accurate_old):((accurate_old<_param->_accurate_max)?(accurate_old+1):accurate_old);
     373               
     374                // test if accurate go to the threshold
     375                if ((accurate_old >= _param->_accurate_limit) and
     376                    (accurate_new <  _param->_accurate_limit))
     377                  accurate_new = 0;
     378               
     379
     380                tab[k]._accurate         = accurate_new;
     381              }
     382
     383            if (_param->_have_port_victim)
     384              {
     385            TEST(Tcontrol_t, out_UPDATE_HIT       [i]->read(), hit);
     386            if (hit)
     387            TEST(Tptr_t    , out_UPDATE_HIT_INDEX [i]->read(), k);
     388              }
    420389          }
    421390
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Parameters.h

    r81 r88  
    3131  public : uint32_t   _size_buffer    ;
    3232  public : uint32_t   _associativity  ;
    33   public : uint32_t   _size_address   ;
     33//public : uint32_t   _size_address   ;
    3434  public : uint32_t   _size_counter   ;
    3535  public : uint32_t   _nb_inst_predict;
     
    3838
    3939  public : uint32_t   _size_bank      ;
    40   public : uint32_t   _size_context_id;
     40//public : uint32_t   _size_context_id;
    4141  public : uint32_t   _size_victim    ;
    4242
    43   public : bool       _have_port_context_id;
     43//public : bool       _have_port_context_id;
    4444  public : bool       _have_port_victim    ;
    4545
     
    6565                        uint32_t   nb_inst_predict,
    6666                        uint32_t   nb_inst_decod  ,
    67                         uint32_t   nb_inst_update );
     67                        uint32_t   nb_inst_update ,
     68                        bool       is_toplevel=false
     69                        );
    6870//   public : Parameters  (Parameters & param) ;
    6971  public : ~Parameters () ;
     72
     73  public :        void            copy       (void);
    7074
    7175  public :        Parameters_test msg_error  (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

    r82 r88  
    3939    log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"Begin");
    4040
     41#if DEBUG_Branch_Target_Buffer_Register == true
     42    log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,_("<%s> Parameters"),_name.c_str());
     43
     44    std::cout << *param << std::endl;
     45#endif   
     46
    4147    log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,"Allocation");
    4248
     
    4854
    4955#ifdef STATISTICS
    50     if (_usage & USE_STATISTICS)
     56    if (usage_is_set(_usage,USE_STATISTICS))
    5157      {
    5258        log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,"Allocation of statistics");
     
    5763
    5864#ifdef VHDL
    59     if (_usage & USE_VHDL)
     65    if (usage_is_set(_usage,USE_VHDL))
    6066      {
    6167        // generate the vhdl
     
    6773
    6874#ifdef SYSTEMC
    69     if (_usage & USE_SYSTEMC)
     75    if (usage_is_set(_usage,USE_SYSTEMC))
    7076      {
    7177        // Constant
     
    108114          }
    109115
    110 # ifdef SYSTEMCASS_SPECIFIC
    111         // List dependency information
    112         for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
    113           for (uint32_t j=0; j<_param->_associativity; j++)
    114             {
    115               (*(out_PREDICT_HIT          [i][j])) (*(in_PREDICT_ADDRESS    [i]));
    116               if (_param->_have_port_context_id)
    117               (*(out_PREDICT_HIT          [i][j])) (*(in_PREDICT_CONTEXT_ID [i]));
    118 
    119               (*(out_PREDICT_ADDRESS_SRC  [i][j])) (*(in_PREDICT_ADDRESS    [i]));
    120               if (_param->_have_port_context_id)
    121               (*(out_PREDICT_ADDRESS_SRC  [i][j])) (*(in_PREDICT_CONTEXT_ID [i]));
    122 
    123               (*(out_PREDICT_ADDRESS_DEST [i][j])) (*(in_PREDICT_ADDRESS    [i]));
    124               if (_param->_have_port_context_id)
    125               (*(out_PREDICT_ADDRESS_DEST [i][j])) (*(in_PREDICT_CONTEXT_ID [i]));
    126 
    127               (*(out_PREDICT_CONDITION    [i][j])) (*(in_PREDICT_ADDRESS    [i]));
    128               if (_param->_have_port_context_id)
    129               (*(out_PREDICT_CONDITION    [i][j])) (*(in_PREDICT_CONTEXT_ID [i]));
    130 
    131               (*(out_PREDICT_LAST_TAKE    [i][j])) (*(in_PREDICT_ADDRESS    [i]));
    132               if (_param->_have_port_context_id)
    133               (*(out_PREDICT_LAST_TAKE    [i][j])) (*(in_PREDICT_CONTEXT_ID [i]));
    134 
    135               (*(out_PREDICT_IS_ACCURATE  [i][j])) (*(in_PREDICT_ADDRESS    [i]));
    136               if (_param->_have_port_context_id)
    137               (*(out_PREDICT_IS_ACCURATE  [i][j])) (*(in_PREDICT_CONTEXT_ID [i]));
    138           }
    139 # endif
     116// # ifdef SYSTEMCASS_SPECIFIC
     117//      // List dependency information
     118//      for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     119//        for (uint32_t j=0; j<_param->_associativity; j++)
     120//          {
     121//            (*(out_PREDICT_HIT          [i][j])) (*(in_PREDICT_ADDRESS    [i]));
     122//            if (_param->_have_port_context_id)
     123//            (*(out_PREDICT_HIT          [i][j])) (*(in_PREDICT_CONTEXT_ID [i]));
     124
     125//            (*(out_PREDICT_ADDRESS_SRC  [i][j])) (*(in_PREDICT_ADDRESS    [i]));
     126//            if (_param->_have_port_context_id)
     127//            (*(out_PREDICT_ADDRESS_SRC  [i][j])) (*(in_PREDICT_CONTEXT_ID [i]));
     128
     129//            (*(out_PREDICT_ADDRESS_DEST [i][j])) (*(in_PREDICT_ADDRESS    [i]));
     130//            if (_param->_have_port_context_id)
     131//            (*(out_PREDICT_ADDRESS_DEST [i][j])) (*(in_PREDICT_CONTEXT_ID [i]));
     132
     133//            (*(out_PREDICT_CONDITION    [i][j])) (*(in_PREDICT_ADDRESS    [i]));
     134//            if (_param->_have_port_context_id)
     135//            (*(out_PREDICT_CONDITION    [i][j])) (*(in_PREDICT_CONTEXT_ID [i]));
     136
     137//            (*(out_PREDICT_LAST_TAKE    [i][j])) (*(in_PREDICT_ADDRESS    [i]));
     138//            if (_param->_have_port_context_id)
     139//            (*(out_PREDICT_LAST_TAKE    [i][j])) (*(in_PREDICT_CONTEXT_ID [i]));
     140
     141//            (*(out_PREDICT_IS_ACCURATE  [i][j])) (*(in_PREDICT_ADDRESS    [i]));
     142//            if (_param->_have_port_context_id)
     143//            (*(out_PREDICT_IS_ACCURATE  [i][j])) (*(in_PREDICT_CONTEXT_ID [i]));
     144//        }
     145// # endif
    140146
    141147        if (_param->_have_port_victim)
     
    215221
    216222#ifdef STATISTICS
    217     if (_usage & USE_STATISTICS)
     223    if (usage_is_set(_usage,USE_STATISTICS))
    218224      {
    219225        statistics_deallocation();
  • 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

    r82 r88  
    6464      ALLOC1_VALACK_OUT(out_PREDICT_ACK         ,ACK);
    6565      ALLOC1_SIGNAL_IN ( in_PREDICT_CONTEXT_ID  ,"context_id"  ,Tcontext_t         ,_param->_size_context_id);
    66       ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS     ,"address"     ,Tgeneral_data_t    ,_param->_size_address);
     66      ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS     ,"address"     ,Tgeneral_data_t    ,_param->_size_instruction_address);
    6767
    6868      {
     
    7070 
    7171        ALLOC2_SIGNAL_OUT(out_PREDICT_HIT         ,"hit"         ,Tcontrol_t         ,1);
    72         ALLOC2_SIGNAL_OUT(out_PREDICT_ADDRESS_SRC ,"address_src" ,Tgeneral_data_t    ,_param->_size_address);
    73         ALLOC2_SIGNAL_OUT(out_PREDICT_ADDRESS_DEST,"address_dest",Tgeneral_data_t    ,_param->_size_address);
     72        ALLOC2_SIGNAL_OUT(out_PREDICT_ADDRESS_SRC ,"address_src" ,Tgeneral_data_t    ,_param->_size_instruction_address);
     73        ALLOC2_SIGNAL_OUT(out_PREDICT_ADDRESS_DEST,"address_dest",Tgeneral_data_t    ,_param->_size_instruction_address);
    7474        ALLOC2_SIGNAL_OUT(out_PREDICT_CONDITION   ,"condition"   ,Tbranch_condition_t,_param->_size_branch_state);
    7575        ALLOC2_SIGNAL_OUT(out_PREDICT_LAST_TAKE   ,"last_take"   ,Tcontrol_t         ,1);
     
    9191        }
    9292      ALLOC1_SIGNAL_IN ( in_DECOD_CONTEXT_ID     ,"context_id"     ,Tcontext_t         ,_param->_size_context_id);
    93       ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_SRC    ,"address_src"    ,Tgeneral_data_t    ,_param->_size_address);
    94       ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_DEST   ,"address_dest"   ,Tgeneral_data_t    ,_param->_size_address);
     93      ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_SRC    ,"address_src"    ,Tgeneral_data_t    ,_param->_size_instruction_address);
     94      ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_DEST   ,"address_dest"   ,Tgeneral_data_t    ,_param->_size_instruction_address);
    9595      ALLOC1_SIGNAL_IN ( in_DECOD_CONDITION      ,"condition"      ,Tbranch_condition_t,_param->_size_branch_state);
    9696      ALLOC1_SIGNAL_IN ( in_DECOD_LAST_TAKE      ,"last_take"      ,Tcontrol_t         ,1);
     
    112112        }
    113113      ALLOC1_SIGNAL_IN ( in_UPDATE_CONTEXT_ID     ,"context_id"     ,Tcontext_t         ,_param->_size_context_id);
    114       ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS_SRC    ,"address_src"    ,Tgeneral_data_t    ,_param->_size_address);
    115       ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS_DEST   ,"address_dest"   ,Tgeneral_data_t    ,_param->_size_address);
     114      ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS_SRC    ,"address_src"    ,Tgeneral_data_t    ,_param->_size_instruction_address);
     115      ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS_DEST   ,"address_dest"   ,Tgeneral_data_t    ,_param->_size_instruction_address);
    116116      ALLOC1_SIGNAL_IN ( in_UPDATE_CONDITION      ,"condition"      ,Tbranch_condition_t,_param->_size_branch_state);
    117117      ALLOC1_SIGNAL_IN ( in_UPDATE_LAST_TAKE      ,"last_take"      ,Tcontrol_t         ,1);
     
    119119    }
    120120
     121    if (usage_is_set(_usage,USE_SYSTEMC))
     122      {
    121123    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    122124    reg_BTB = new btb_entry_t * [_param->_size_bank];
     
    133135    internal_UPDATE_NUM_BANK  = new uint32_t   [_param->_nb_inst_update];
    134136    internal_UPDATE_NUM_ENTRY = new uint32_t   [_param->_nb_inst_update];
     137      }
    135138
    136139    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    137140
    138141#ifdef POSITION
    139     _component->generate_file();
     142    if (usage_is_set(_usage,USE_POSITION))
     143      _component->generate_file();
    140144#endif
    141145
  • 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

    r82 r88  
    2424    log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"Begin");
    2525
    26     if (_usage & USE_SYSTEMC)
     26    if (usage_is_set(_usage,USE_SYSTEMC))
    2727      {
    2828        delete    in_CLOCK ;
     
    4242        delete []  in_DECOD_VAL             ;
    4343        delete [] out_DECOD_ACK             ;
     44        if (_param->_have_port_victim)
     45          {
    4446        delete [] out_DECOD_HIT             ;
    45         if (_param->_have_port_victim)
    4647        delete [] out_DECOD_HIT_INDEX       ;
    47         if (_param->_have_port_victim)
    4848        delete []  in_DECOD_VICTIM          ;
     49          }
    4950        if (_param->_have_port_context_id)
    5051        delete []  in_DECOD_CONTEXT_ID      ;
     
    5758        delete []  in_UPDATE_VAL            ;
    5859        delete [] out_UPDATE_ACK            ;
     60        if (_param->_have_port_victim)
     61          {
    5962        delete [] out_UPDATE_HIT            ;
    60         if (_param->_have_port_victim)
    6163        delete [] out_UPDATE_HIT_INDEX      ;
    62         if (_param->_have_port_victim)
    6364        delete []  in_UPDATE_VICTIM         ;
     65          }
    6466        if (_param->_have_port_context_id)
    6567        delete []  in_UPDATE_CONTEXT_ID     ;
  • 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_end_cycle.cpp

    r81 r88  
    2626
    2727#ifdef STATISTICS
    28     _stat->end_cycle();
     28    if (usage_is_set(_usage,USE_STATISTICS))
     29      _stat->end_cycle();
    2930#endif   
    3031
     
    3233    // Evaluation before read the ouput signal
    3334//  sc_start(0);
    34     _interfaces->testbench();
     35    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     36      _interfaces->testbench();
    3537#endif
    3638
  • 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

    r82 r88  
    2222  void Branch_Target_Buffer_Register::genMealy_decod (void)
    2323  {
    24     log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"Begin");
     24    log_begin(Branch_Target_Buffer_Register,FUNCTION);
     25    log_function(Branch_Target_Buffer_Register,FUNCTION,_name.c_str());
    2526
    2627    for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
     
    5556      }
    5657
    57     log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"End");
     58    log_end(Branch_Target_Buffer_Register,FUNCTION);
    5859  };
    5960
  • 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_predict.cpp

    r81 r88  
    2222  void Branch_Target_Buffer_Register::genMealy_predict (void)
    2323  {
    24     log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"Begin");
    25 
     24    log_begin(Branch_Target_Buffer_Register,FUNCTION);
     25    log_function(Branch_Target_Buffer_Register,FUNCTION,_name.c_str());
     26   
    2627    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
    2728      {
     29        log_printf(TRACE,Branch_Target_Buffer_Register,FUNCTION,"  * PREDICT [%d]",i);
    2830        Tcontext_t      context   = (_param->_have_port_context_id)?PORT_READ(in_PREDICT_CONTEXT_ID  [i]):0;
    2931        Tgeneral_data_t address   = PORT_READ(in_PREDICT_ADDRESS [i]);
     
    3335        Tgeneral_data_t address_offset = (address >> _param->_shift_offset)&_param->_mask_offset;
    3436
    35 //      log_printf(TRACE,Branch_Target_Buffer_Register,FUNCTION,"address_    (tag, bank, offset) : %.8x %.8x %.8x",address_tag,num_bank, address_offset);
     37        log_printf(TRACE,Branch_Target_Buffer_Register,FUNCTION,"    * address_    (tag, bank, offset) : %.8x %.8x %.8x",address_tag,num_bank, address_offset);
    3638
    3739        for (uint32_t j=0; j<_param->_associativity; j++)
     
    4648                              (address_src_offset                >= address_offset));
    4749
    48 //          log_printf(TRACE,Branch_Target_Buffer_Register,FUNCTION,"address_src (tag, bank, offset) : %.8x %.8x %.8x - hit : %d",address_src_tag,num_bank,address_src_offset, hit);
     50            log_printf(TRACE,Branch_Target_Buffer_Register,FUNCTION,"    * address_src (tag, bank, offset) : %.8x %.8x %.8x - hit : %d",address_src_tag,num_bank,address_src_offset, hit);
    4951
    5052            // Hit :
     
    6264      }
    6365
    64     log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"End");
     66    log_end(Branch_Target_Buffer_Register,FUNCTION);
    6567  };
    6668
  • 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

    r82 r88  
    2222  void Branch_Target_Buffer_Register::genMealy_update (void)
    2323  {
    24     log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"Begin");
     24    log_begin(Branch_Target_Buffer_Register,FUNCTION);
     25    log_function(Branch_Target_Buffer_Register,FUNCTION,_name.c_str());
    2526
    2627    for (uint32_t i=0; i<_param->_nb_inst_update; i++)
     
    5556      }
    5657
    57     log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"End");
     58    log_end(Branch_Target_Buffer_Register,FUNCTION);
    5859  };
    5960
  • 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

    r82 r88  
    2222  void Branch_Target_Buffer_Register::transition (void)
    2323  {
    24     log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"Begin");
     24    log_begin(Branch_Target_Buffer_Register,FUNCTION);
     25    log_function(Branch_Target_Buffer_Register,FUNCTION,_name.c_str());
    2526
    2627    if (PORT_READ(in_NRESET) == 0)
     
    8384          if (PORT_READ(in_UPDATE_VAL [i]) and internal_UPDATE_ACK [i])
    8485            {
     86              log_printf(TRACE,Branch_Target_Buffer_Register,FUNCTION,"  * UPDATE [%d]",i);
     87 
    8588              bool     hit       = internal_UPDATE_HIT      [i];
    8689              uint32_t num_bank  = internal_UPDATE_NUM_BANK [i];
     
    8992
    9093              // detect new branch !!! insert in branch target buffer
     94              log_printf(TRACE,Branch_Target_Buffer_Register,FUNCTION,"    * hit       : %d",hit);
     95              log_printf(TRACE,Branch_Target_Buffer_Register,FUNCTION,"    * num_bank  : %d",num_bank );
     96              log_printf(TRACE,Branch_Target_Buffer_Register,FUNCTION,"    * num_entry : %d",num_entry);
     97
    9198              Tcounter_t accurate_new = 0;
    9299
     
    123130                  accurate_new =  (miss_pred)?_param->_first_accurate_if_miss:_param->_first_accurate_if_hit;
    124131
    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]);
    130                 }
     132//                reg_BTB[num_bank][num_entry]._val              = 1;
     133//                reg_BTB[num_bank][num_entry]._context          = (_param->_have_port_context_id)?PORT_READ(in_UPDATE_CONTEXT_ID [i]):0;
     134//                reg_BTB[num_bank][num_entry]._address_src      = PORT_READ(in_UPDATE_ADDRESS_SRC  [i]);
     135//                reg_BTB[num_bank][num_entry]._condition        = PORT_READ(in_UPDATE_CONDITION    [i]);
     136//                reg_BTB[num_bank][num_entry]._last_take        = PORT_READ(in_UPDATE_LAST_TAKE    [i]);
     137                  reg_BTB[num_bank][num_entry]._address_dest_val = 0;
     138                }
    131139
    132140              // =====[ All Case ]
    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                 }
     141//            if (reg_BTB[num_bank][num_entry]._address_dest_val == 0)
     142//              {
     143//                reg_BTB[num_bank][num_entry]._address_dest_val = 1;
     144//                reg_BTB[num_bank][num_entry]._address_dest     = PORT_READ(in_UPDATE_ADDRESS_DEST [i]);
     145//              }
     146              reg_BTB[num_bank][num_entry]._val              = 1;
     147              reg_BTB[num_bank][num_entry]._context          = (_param->_have_port_context_id)?PORT_READ(in_UPDATE_CONTEXT_ID [i]):0;
     148              reg_BTB[num_bank][num_entry]._address_src      = PORT_READ(in_UPDATE_ADDRESS_SRC  [i]);
     149              reg_BTB[num_bank][num_entry]._condition        = PORT_READ(in_UPDATE_CONDITION    [i]);
     150              reg_BTB[num_bank][num_entry]._last_take        = PORT_READ(in_UPDATE_LAST_TAKE    [i]);
     151              reg_BTB[num_bank][num_entry]._address_dest_val = 1;
     152              reg_BTB[num_bank][num_entry]._address_dest     = PORT_READ(in_UPDATE_ADDRESS_DEST [i]);
    138153              reg_BTB[num_bank][num_entry]._accurate         = accurate_new;
    139154            }
    140155
     156#if (DEBUG >= DEBUG_TRACE) and DEBUG_Branch_Target_Buffer_Register
     157        log_printf(TRACE,Branch_Target_Buffer_Register,FUNCTION,"  * Dump BTB");
    141158        for (uint32_t i=0; i<_param->_size_bank; i++)
    142159          for (uint32_t j=0; j<_param->_associativity; j++)
    143             log_printf(TRACE,Branch_Target_Buffer_Register,FUNCTION,"[%.4d][%.4d] %d - %.2d %.8x %.1d %.8x %.3d %.1d %.4d",
     160            log_printf(TRACE,Branch_Target_Buffer_Register,FUNCTION,"    [%.4d][%.4d] %d - %.4d %.8x (%.8x) %.1d %.8x (%.8x) %.3d %.1d %.4d",
    144161                       i,j,
    145162                       reg_BTB [i][j]._val             ,
    146163                       reg_BTB [i][j]._context         ,
    147164                       reg_BTB [i][j]._address_src     ,
     165                       reg_BTB [i][j]._address_src <<2,
    148166                       reg_BTB [i][j]._address_dest_val,
    149167                       reg_BTB [i][j]._address_dest    ,
     168                       reg_BTB [i][j]._address_dest<<2 ,
    150169                       reg_BTB [i][j]._condition       ,
    151170                       reg_BTB [i][j]._last_take       ,
    152171                       reg_BTB [i][j]._accurate        );
     172#endif
    153173      }
    154    
     174
    155175#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    156176    end_cycle ();
    157177#endif
    158178
    159     log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"End");
     179    log_end(Branch_Target_Buffer_Register,FUNCTION);
    160180  };
    161181
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Parameters.cpp

    r81 r88  
    3030                          uint32_t   nb_inst_predict,
    3131                          uint32_t   nb_inst_decod  ,
    32                           uint32_t   nb_inst_update )
     32                          uint32_t   nb_inst_update ,
     33                          bool       is_toplevel)
    3334  {
    3435    log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"Begin");
     
    3839    _size_buffer     = size_buffer    ;
    3940    _associativity   = associativity  ;
    40     _size_address    = size_address   ;
    4141    _size_counter    = size_counter   ;
    4242    _nb_inst_predict = nb_inst_predict;
     
    4545
    4646    _size_bank       = size_buffer/associativity;
    47     _size_context_id = log2(nb_context);
    4847    _size_victim     = log2(associativity);
    4948
    50     _have_port_context_id   = (_size_context_id > 0);
    5149    _have_port_victim       = (_size_victim     > 0);
    5250
     
    8179    test();
    8280
     81    if (is_toplevel)
     82      {
     83        _size_instruction_address = size_address   ;
     84        _size_context_id          = log2(nb_context);
     85        _have_port_context_id     = (_size_context_id > 0);
     86
     87        copy ();
     88      }
     89
    8390    log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"End");
    8491  };
     
    101108  };
    102109
     110#undef  FUNCTION
     111#define FUNCTION "Branch_Target_Buffer_Register::copy"
     112  void Parameters::copy ()
     113  {
     114    log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"Begin");
     115    log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"End");
     116  };
     117
    103118}; // end namespace branch_target_buffer_register
    104119}; // end namespace branch_target_buffer
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Parameters_msg_error.cpp

    r81 r88  
    2929
    3030    if (_size_counter < 2 )
    31       test.error("size_counter must be >= 2.");
     31      test.error(_("size_counter must be >= 2.\n"));
    3232
    3333    if ((_associativity == 0) or
    3434        (_associativity > _size_buffer))
    35       test.error("associativity must be > 0 and <= size_buffer.");
     35      test.error(_("associativity must be > 0 and <= size_buffer.\n"));
    3636
    3737    if (_associativity == 1) // special case : full assoc and direct map ... also we print direct map
    38       test.information("Branch Target Buffer is Direct Map");
     38      test.information(_("Branch Target Buffer is Direct Map.\n"));
    3939    else
    4040      if (_associativity == _size_buffer)
    41         test.information("Branch Target Buffer is Full associative");
     41        test.information(_("Branch Target Buffer is Full associative.\n"));
    4242      else
    43         test.information("Branch Target Buffer is Semi associative");
     43        test.information(_("Branch Target Buffer is Semi associative.\n"));
    4444
    4545    for (uint32_t i=0; i<_nb_context; i++)
    4646      if (_associativity < (_nb_instruction[i]/2))
    47         test.error("associativity must be >= nb_instruction["+toString(i)+"]/2.");
     47        test.error(toString(_("associativity must be >= nb_instruction[%d]/2.\n"),i));
    4848
    4949    log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Parameters_print.cpp

    r81 r88  
    3131    xml.singleton_begin("size_buffer    "); xml.attribut("value",toString(_size_buffer    )); xml.singleton_end();
    3232    xml.singleton_begin("associativity  "); xml.attribut("value",toString(_associativity  )); xml.singleton_end();
    33     xml.singleton_begin("size_address   "); xml.attribut("value",toString(_size_address   )); xml.singleton_end();
     33//  xml.singleton_begin("size_address   "); xml.attribut("value",toString(_size_address   )); xml.singleton_end();
    3434    xml.singleton_begin("size_counter   "); xml.attribut("value",toString(_size_counter   )); xml.singleton_end();
    3535    xml.singleton_begin("nb_inst_predict"); xml.attribut("value",toString(_nb_inst_predict)); xml.singleton_end();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Branch_Target_Buffer_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/config_min.cfg

    r82 r88  
    441       1       *4      # size_buffer   
    551       1       *4      # associativity 
    6 32      32      *2      # size_address   
     630      30      *2      # size_address   
    772       2       +1      # size_counter   
    881       1       *4      # nb_inst_predict
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/config_mono_context.cfg

    r81 r88  
    4416      16      *4      # size_buffer   
    552       16      *4      # associativity 
    6 32      32      *2      # size_address   
     630      30      *2      # size_address   
    772       2       +1      # size_counter   
    881       4       *4      # nb_inst_predict
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/config_multi_context.cfg

    r81 r88  
    778       64      *4      # size_buffer   
    884       8       *2      # associativity 
    9 32      32      *2      # size_address   
     930      30      *2      # size_address   
    10102       2       +1      # size_counter   
    11111       4       *4      # nb_inst_predict
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/src/main.cpp

    r81 r88  
    7070         _nb_inst_decod  ,
    7171         _nb_inst_commit ,
    72          _victim_scheme  );
     72         _victim_scheme  ,
     73         true // is_toplevel
     74         );
    7375     
    7476      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/src/test.cpp

    r82 r88  
    77 */
    88
    9 #define NB_ITERATION  1024
    10 #define CYCLE_MAX     (128*NB_ITERATION)
     9#define NB_ITERATION  1
     10#define CYCLE_MAX     (10000*NB_ITERATION)
    1111
    1212#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/include/test.h"
    1313#include "Common/include/Test.h"
    1414#include "Behavioural/include/Allocation.h"
     15#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/include/test_BTB.h"
    1516
    1617void test (string name,
     
    2021
    2122#ifdef STATISTICS
    22   morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50);
     23  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
    2324#endif
     25
     26  Tusage_t _usage = USE_ALL;
     27
     28//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     29//   _usage = usage_unset(_usage,USE_VHDL                 );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     31//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     32//   _usage = usage_unset(_usage,USE_POSITION             );
     33//   _usage = usage_unset(_usage,USE_STATISTICS           );
     34//   _usage = usage_unset(_usage,USE_INFORMATION          );
    2435
    2536  Branch_Target_Buffer * _Branch_Target_Buffer = new Branch_Target_Buffer
     
    2940#endif
    3041     _param,
    31      USE_ALL);
    32  
     42     _usage);
     43
    3344#ifdef SYSTEMC
    3445  /*********************************************************************
     
    110121  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
    111122   
     123  // Initialisation
     124  const uint32_t seed = 0;
     125//const uint32_t seed = static_cast<uint32_t>(time(NULL));
     126
     127  srand(seed);
     128
     129  const  int32_t percent_transaction_decod   = 75;
     130  const  int32_t percent_transaction_predict = 75;
     131
     132  SC_START(0);
     133
    112134  Time * _time = new Time();
    113135
     
    116138   ********************************************************/
    117139
    118   // Initialisation
    119 
    120   const uint32_t seed = 0;
    121 //const uint32_t seed = static_cast<uint32_t>(time(NULL));
    122 
    123   srand(seed);
    124 
    125   SC_START(0);
    126   LABEL("Initialisation");
    127 
    128   LABEL("Reset");
    129   in_NRESET->write(0);
    130   SC_START(5);
    131   in_NRESET->write(1); 
    132 
    133   LABEL("Loop of Test");
    134 
    135   for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    136     {
    137       LABEL("Iteration %d",iteration);
    138 
    139       SC_START(1);
    140     }
     140  {
     141    LABEL("Reset");
     142    in_NRESET->write(0);
     143    SC_START(5);
     144    in_NRESET->write(1); 
     145   
     146    LABEL("Loop of Test");
     147   
     148    Taddress_t btb_address [_param->_associativity];
     149    Tcontext_t btb_context [_param->_associativity];
     150
     151    for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
     152      {
     153        LABEL("Iteration %d",iteration);
     154
     155        // FIRST STEP - Test (without sort, with concurent access, same context)
     156
     157        // fill a btb line
     158#define NB_REQUEST (8*_param->_associativity)
     159        uint32_t   nb_request;
     160        uint32_t   index      = rand()&_param->_param_branch_target_buffer_register->_mask_bank;
     161        Tcontext_t context    = rand()&_param->_nb_context;
     162
     163        for (uint32_t j=0; j<_param->_associativity; j++)
     164//        btb_val     [j] = false;
     165          btb_address [j] = static_cast<Taddress_t>(-1);
     166
     167        {
     168          uint32_t associativity = 0;
     169         
     170          while (associativity < _param->_associativity)
     171            {
     172              for (uint32_t j=0; j<_param->_nb_inst_decod; j++)
     173                {
     174                  Taddress_t address = ((associativity << _param->_param_branch_target_buffer_register->_shift_tag) |
     175                                        (index         << _param->_param_branch_target_buffer_register->_shift_bank)|
     176                                        (0));
     177                 
     178                  in_DECOD_VAL             [j]->write(((rand()%100)<percent_transaction_decod) and ((associativity+j) < _param->_associativity));
     179                  in_DECOD_CONTEXT_ID      [j]->write(context);
     180                  in_DECOD_ADDRESS_SRC     [j]->write( address );
     181                  in_DECOD_ADDRESS_DEST    [j]->write(~address );
     182                  in_DECOD_CONDITION       [j]->write(BRANCH_CONDITION_FLAG_SET);
     183                  in_DECOD_LAST_TAKE       [j]->write(address&1);
     184                  in_DECOD_MISS_PREDICTION [j]->write(1);
     185                  in_DECOD_IS_ACCURATE     [j]->write(1);
     186                }
     187             
     188              SC_START(0);
     189             
     190              for (uint32_t j=0; j<_param->_nb_inst_decod; j++)
     191                if (in_DECOD_VAL [j]->read() and out_DECOD_ACK [j]->read())
     192                  {
     193                    LABEL("DECOD     [%d] Transaction Accepted",j);
     194                   
     195                    Taddress_t address = in_DECOD_ADDRESS_SRC [j]->read();
     196                   
     197                    btb_address[associativity] = address;
     198                    btb_context[associativity] = context;
     199                    associativity ++;
     200                  }
     201             
     202              SC_START(1);
     203            }
     204        }
     205       
     206        nb_request = 0;
     207
     208        while (nb_request < NB_REQUEST)
     209          {
     210            for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     211              {
     212                in_PREDICT_VAL        [i]->write(((rand()%100)<percent_transaction_predict));
     213                in_PREDICT_CONTEXT_ID [i]->write(rand()&_param->_nb_context);
     214                in_PREDICT_ADDRESS    [i]->write(gen_addr(_param->_param_branch_target_buffer_register,index));
     215              }
     216
     217            SC_START(0);
     218
     219            for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     220              if (in_PREDICT_VAL [i]->read() and out_PREDICT_ACK [i]->read())
     221                {
     222                  LABEL("PREDICT   [%d] Transaction Accepted",i);
     223                 
     224                  Tcontrol_t hit          = out_PREDICT_HIT          [i]->read();
     225                  Taddress_t address      =  in_PREDICT_ADDRESS      [i]->read();
     226                  Taddress_t address_src  = out_PREDICT_ADDRESS_SRC  [i]->read();
     227                  Taddress_t address_dest = out_PREDICT_ADDRESS_DEST [i]->read();
     228
     229                  Taddress_t tag          = address >> _param->_param_branch_target_buffer_register->_shift_tag;
     230                 
     231                  Tcontrol_t my_hit = false;
     232                  Tcontrol_t my_addr;
     233
     234                  for (uint32_t i=0; i<_param->_associativity; i++)
     235                    {
     236                      Taddress_t btb_address [_param->_associativity];
     237                      Tcontext_t btb_context [_param->_associativity];
     238                    }
     239                 
     240                  if (hit)
     241                    {
     242                      TEST(Tbranch_condition_t,out_PREDICT_CONDITION   [i]->read(),BRANCH_CONDITION_FLAG_SET);
     243                      TEST(Tcontrol_t         ,out_PREDICT_LAST_TAKE   [i]->read(),address_src&1);
     244//                    TEST(Tcontrol_t         ,out_PREDICT_IS_ACCURATE [i]->read(), );
     245                    }
     246
     247                  nb_request ++;
     248                }
     249           
     250            SC_START(1);
     251          }
     252      }
     253  }
    141254
    142255  /********************************************************
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/include/Parameters.h

    r81 r88  
    3333  public : uint32_t   _size_buffer    ;
    3434  public : uint32_t   _associativity  ;
    35   public : uint32_t   _size_address   ;
     35//public : uint32_t   _size_address   ;
    3636  public : uint32_t   _size_counter   ;
    3737  public : uint32_t   _nb_inst_predict;
     
    4141
    4242  public : uint32_t   _size_bank      ;
    43   public : uint32_t   _size_context_id;
     43//public : uint32_t   _size_context_id;
    4444  public : uint32_t   _size_victim    ;
    4545
    46   public : bool       _have_port_context_id;
     46//public : bool       _have_port_context_id;
    4747  public : bool       _have_component_victim;
    4848  public : bool       _is_full_associative;
     
    6363                        uint32_t   nb_inst_decod  ,
    6464                        uint32_t   nb_inst_update ,
    65                         Tvictim_t  victim_scheme  );
     65                        Tvictim_t  victim_scheme  ,
     66                        bool       is_toplevel=false
     67                        );
    6668//   public : Parameters  (Parameters & param) ;
    6769  public : ~Parameters () ;
     70
     71  public :        void            copy       (void);
    6872
    6973  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer.cpp

    r81 r88  
    4040    log_printf(INFO,Branch_Target_Buffer,FUNCTION,"Allocation");
    4141
     42#if DEBUG_Branch_Target_Buffer == true
     43    log_printf(INFO,Branch_Target_Buffer,FUNCTION,_("<%s> Parameters"),_name.c_str());
     44
     45    std::cout << *param << std::endl;
     46#endif   
     47
    4248    allocation (
    4349#ifdef STATISTICS
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    5157        log_printf(INFO,Branch_Target_Buffer,FUNCTION,"Allocation of statistics");
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
     
    6672
    6773#ifdef SYSTEMC
    68     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    6975      {
    70         log_printf(INFO,Branch_Target_Buffer,FUNCTION,"Method - transition");
     76        log_printf(INFO,Branch_Target_Buffer,FUNCTION,_("Method - transition"));
    7177
    7278        SC_METHOD (transition);
     
    9096
    9197#ifdef STATISTICS
    92     if (_usage & USE_STATISTICS)
     98    if (usage_is_set(_usage,USE_STATISTICS))
    9399      {
    94100        statistics_deallocation();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_allocation.cpp

    r82 r88  
    6464      ALLOC1_VALACK_OUT(out_PREDICT_ACK         ,ACK);
    6565      ALLOC1_SIGNAL_IN ( in_PREDICT_CONTEXT_ID  ,"context_id"  ,Tcontext_t         ,_param->_size_context_id);
    66       ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS     ,"address"     ,Tgeneral_data_t    ,_param->_size_address);
     66      ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS     ,"address"     ,Tgeneral_data_t    ,_param->_size_instruction_address);
    6767      ALLOC1_SIGNAL_OUT(out_PREDICT_HIT         ,"hit"         ,Tcontrol_t         ,1);
    68       ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_SRC ,"address_src" ,Tgeneral_data_t    ,_param->_size_address);
    69       ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_DEST,"address_dest",Tgeneral_data_t    ,_param->_size_address);
     68      ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_SRC ,"address_src" ,Tgeneral_data_t    ,_param->_size_instruction_address);
     69      ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_DEST,"address_dest",Tgeneral_data_t    ,_param->_size_instruction_address);
    7070      ALLOC1_SIGNAL_OUT(out_PREDICT_CONDITION   ,"condition"   ,Tbranch_condition_t,_param->_size_branch_condition);
    7171      ALLOC1_SIGNAL_OUT(out_PREDICT_LAST_TAKE   ,"last_take"   ,Tcontrol_t         ,1);
     
    8080      ALLOC1_VALACK_OUT(out_DECOD_ACK            ,ACK);
    8181      ALLOC1_SIGNAL_IN ( in_DECOD_CONTEXT_ID     ,"context_id"     ,Tcontext_t         ,_param->_size_context_id);
    82       ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_SRC    ,"address_src"    ,Tgeneral_data_t    ,_param->_size_address);
    83       ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_DEST   ,"address_dest"   ,Tgeneral_data_t    ,_param->_size_address);
     82      ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_SRC    ,"address_src"    ,Tgeneral_data_t    ,_param->_size_instruction_address);
     83      ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_DEST   ,"address_dest"   ,Tgeneral_data_t    ,_param->_size_instruction_address);
    8484      ALLOC1_SIGNAL_IN ( in_DECOD_CONDITION      ,"condition"      ,Tbranch_condition_t,_param->_size_branch_condition);
    8585      ALLOC1_SIGNAL_IN ( in_DECOD_LAST_TAKE      ,"last_take"      ,Tcontrol_t         ,1);
     
    9595      ALLOC1_VALACK_OUT(out_UPDATE_ACK            ,ACK);
    9696      ALLOC1_SIGNAL_IN ( in_UPDATE_CONTEXT_ID     ,"context_id"     ,Tcontext_t         ,_param->_size_context_id);
    97       ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS_SRC    ,"address_src"    ,Tgeneral_data_t    ,_param->_size_address);
    98       ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS_DEST   ,"address_dest"   ,Tgeneral_data_t    ,_param->_size_address);
     97      ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS_SRC    ,"address_src"    ,Tgeneral_data_t    ,_param->_size_instruction_address);
     98      ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS_DEST   ,"address_dest"   ,Tgeneral_data_t    ,_param->_size_instruction_address);
    9999      ALLOC1_SIGNAL_IN ( in_UPDATE_CONDITION      ,"condition"      ,Tbranch_condition_t,_param->_size_branch_condition);
    100100      ALLOC1_SIGNAL_IN ( in_UPDATE_LAST_TAKE      ,"last_take"      ,Tcontrol_t         ,1);
     
    590590    }
    591591    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    592 //      _component->test_map();
    593 
    594 #ifdef POSITION
    595     _component->generate_file();
     592
     593#if DEBUG_Branch_Target_Buffer == true
     594    _component->test_map();
     595#endif
     596
     597#ifdef POSITION
     598    if (usage_is_set(_usage,USE_POSITION))
     599      _component->generate_file();
    596600#endif
    597601
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_deallocation.cpp

    r82 r88  
    2323    log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"Begin");
    2424
    25     if (_usage & USE_SYSTEMC)
     25    if (usage_is_set(_usage,USE_SYSTEMC))
    2626      {
    2727        delete    in_CLOCK ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
    33     _interfaces->testbench();
     34    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     35      _interfaces->testbench();
    3436#endif
    3537
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_statistics_allocation.cpp

    r81 r88  
    3434        _stat->add_stat(_component_victim ->_stat);
    3535      }
    36     _stat->add_stat(_component_branch_target_buffer_glue    ->_stat);
     36
     37//     _stat->add_stat(_component_branch_target_buffer_glue    ->_stat);
    3738    _stat->add_stat(_component_branch_target_buffer_register->_stat);
    3839
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_statistics_deallocation.cpp

    r81 r88  
     1
    12#ifdef STATISTICS
    23/*
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Parameters.cpp

    r81 r88  
    2929                          uint32_t   nb_inst_decod  ,
    3030                          uint32_t   nb_inst_update ,
    31                           Tvictim_t  victim_scheme  )
     31                          Tvictim_t  victim_scheme  ,
     32                          bool       is_toplevel)
    3233  {
    3334    log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"Begin");
     
    3738    _size_buffer     = size_buffer    ;
    3839    _associativity   = associativity  ;
    39     _size_address    = size_address   ;
    4040    _size_counter    = size_counter   ;
    4141    _nb_inst_predict = nb_inst_predict;
     
    4545
    4646    _size_bank       = size_buffer/associativity;
    47     _size_context_id = log2(nb_context);
    4847    _size_victim     = log2(associativity);
    4948
    50     _have_port_context_id   = (_size_context_id > 0);
    5149    _have_component_victim  = (_size_victim     > 0);
    5250    _is_full_associative    = _size_bank == 1;
    5351    uint32_t nb_access = nb_inst_predict + nb_inst_decod + nb_inst_update;
     52
     53    test();
    5454
    5555    if (_have_component_victim)
     
    7878       _size_buffer       ,
    7979       _associativity     ,
    80        _size_address      ,
     80        size_address      ,
    8181       _nb_inst_predict   ,
    8282       _nb_inst_decod     ,
    8383       _nb_inst_update    );
    84    
     84
    8585    _param_branch_target_buffer_register = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer::branch_target_buffer_register::Parameters
    8686      (_nb_context     ,
     
    8888       _size_buffer    ,
    8989       _associativity  ,
    90        _size_address   ,
     90        size_address   ,
    9191       _size_counter   ,
    9292       _nb_inst_predict,
     
    9494       _nb_inst_update );
    9595
    96     test();
     96    if (is_toplevel)
     97      {
     98        _size_instruction_address = size_address   ;
     99        _size_context_id          = log2(nb_context);
     100        _have_port_context_id     = (_size_context_id > 0);
     101
     102        copy ();
     103      }
     104
    97105    log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"End");
    98106  };
     
    125133  };
    126134
     135
     136#undef  FUNCTION
     137#define FUNCTION "Branch_Target_Buffer::copy"
     138  void Parameters::copy (void)
     139  {
     140    log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"Begin");
     141
     142    if (_have_component_victim)
     143      {
     144        COPY(_param_sort);
     145        COPY(_param_victim);
     146      }
     147    COPY(_param_branch_target_buffer_glue);
     148    COPY(_param_branch_target_buffer_register);
     149
     150    log_printf(FUNC,Branch_Target_Buffer,FUNCTION,"End");
     151  };
     152
     153
    127154}; // end namespace branch_target_buffer
    128155}; // end namespace prediction_unit
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Parameters_print.cpp

    r81 r88  
    3030    xml.singleton_begin("size_buffer    "); xml.attribut("value",toString(_size_buffer    )); xml.singleton_end();
    3131    xml.singleton_begin("associativity  "); xml.attribut("value",toString(_associativity  )); xml.singleton_end();
    32     xml.singleton_begin("size_address   "); xml.attribut("value",toString(_size_address   )); xml.singleton_end();
     32//  xml.singleton_begin("size_address   "); xml.attribut("value",toString(_size_address   )); xml.singleton_end();
    3333    xml.singleton_begin("size_counter   "); xml.attribut("value",toString(_size_counter   )); xml.singleton_end();
    3434    xml.singleton_begin("nb_inst_predict"); xml.attribut("value",toString(_nb_inst_predict)); xml.singleton_end();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Direction_Glue_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/src/main.cpp

    r81 r88  
    4949         _nb_inst_update  ,
    5050         _size_address    ,
    51          _size_history    );
     51         _size_history    ,
     52         true // is_toplevel
     53         );
    5254     
    5355      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/src/test.cpp

    r82 r88  
    2424#endif
    2525
     26  Tusage_t _usage = USE_ALL;
     27
     28//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     29//   _usage = usage_unset(_usage,USE_VHDL                 );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     31//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     32//   _usage = usage_unset(_usage,USE_POSITION             );
     33//   _usage = usage_unset(_usage,USE_STATISTICS           );
     34//   _usage = usage_unset(_usage,USE_INFORMATION          );
     35
    2636  Direction_Glue * _Direction_Glue = new Direction_Glue
    2737    (name.c_str(),
     
    3040#endif
    3141     _param,
    32      USE_ALL);
     42     _usage);
    3343 
    3444#ifdef SYSTEMC
     
    139149        {
    140150          in_PREDICT_VAL                 [i]->write(rand()%2);
    141           in_PREDICT_ADDRESS_SRC         [i]->write(range<Taddress_t>(rand(),_param->_size_address));
     151          in_PREDICT_ADDRESS_SRC         [i]->write(range<Taddress_t>(rand(),_param->_size_instruction_address));
    142152          in_PREDICT_STATIC              [i]->write(rand()%2);
    143153          in_PREDICT_LAST_TAKE           [i]->write(rand()%2);
     
    150160        {
    151161          in_UPDATE_VAL                  [i]->write(rand()%2);
    152           in_UPDATE_ADDRESS              [i]->write(range<Taddress_t>(rand(),_param->_size_address));
     162          in_UPDATE_ADDRESS              [i]->write(range<Taddress_t>(rand(),_param->_size_instruction_address));
    153163          in_UPDATE_HISTORY              [i]->write(range<Thistory_t>(rand(),_param->_size_history));
    154164          in_UPDATE_DIRECTION            [i]->write(rand()%2);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Parameters.h

    r81 r88  
    2929  public : uint32_t     _nb_inst_predict ;
    3030  public : uint32_t     _nb_inst_update  ;
    31   public : uint32_t     _size_address    ;
     31//public : uint32_t     _size_address    ;
    3232  public : uint32_t     _size_history    ;
    3333
     
    4040                        uint32_t     nb_inst_update  ,
    4141                        uint32_t     size_address    ,
    42                         uint32_t     size_history    );
     42                        uint32_t     size_history    ,
     43                        bool         is_toplevel=false
     44                        );
    4345    //   public : Parameters  (Parameters & param) ;
    4446  public : ~Parameters () ;
     47
     48  public :        void            copy       (void);
    4549
    4650  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue.cpp

    r81 r88  
    3939    log_printf(FUNC,Direction_Glue,FUNCTION,"Begin");
    4040
     41
     42#if DEBUG_Direction_Glue == true
     43    log_printf(INFO,Direction_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
     44
     45    std::cout << *param << std::endl;
     46#endif   
     47
    4148    log_printf(INFO,Direction_Glue,FUNCTION,"Allocation");
    4249
     
    4855
    4956#ifdef STATISTICS
    50     if (_usage & USE_STATISTICS)
     57    if (usage_is_set(_usage,USE_STATISTICS))
    5158      {
    5259        log_printf(INFO,Direction_Glue,FUNCTION,"Allocation of statistics");
     
    5764
    5865#ifdef VHDL
    59     if (_usage & USE_VHDL)
     66    if (usage_is_set(_usage,USE_VHDL))
    6067      {
    6168        // generate the vhdl
     
    6774
    6875#ifdef SYSTEMC
    69     if (_usage & USE_SYSTEMC)
     76    if (usage_is_set(_usage,USE_SYSTEMC))
    7077      {
    7178        bool need_genmealy_predict = true;
     
    238245
    239246#ifdef STATISTICS
    240     if (_usage & USE_STATISTICS)
     247    if (usage_is_set(_usage,USE_STATISTICS))
    241248      {
    242249        statistics_deallocation();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_allocation.cpp

    r81 r88  
    6363      ALLOC1_SIGNAL_IN ( in_PREDICT_VAL                  ,"val"                  ,Tcontrol_t,1);
    6464      ALLOC1_SIGNAL_OUT(out_PREDICT_ACK                  ,"ack"                  ,Tcontrol_t,1);
    65       ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS_SRC          ,"address_src"          ,Taddress_t,_param->_size_address);
     65      ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS_SRC          ,"address_src"          ,Taddress_t,_param->_size_instruction_address);
    6666      ALLOC1_SIGNAL_IN ( in_PREDICT_STATIC               ,"static"               ,Tcontrol_t,1);
    6767      ALLOC1_SIGNAL_IN ( in_PREDICT_LAST_TAKE            ,"last_take"            ,Tcontrol_t,1);
     
    7272      ALLOC1_SIGNAL_OUT(out_PREDICT_PREDICTOR_VAL        ,"predictor_val"        ,Tcontrol_t,1);
    7373      ALLOC1_SIGNAL_IN ( in_PREDICT_PREDICTOR_ACK        ,"predictor_ack"        ,Tcontrol_t,1);
    74       ALLOC1_SIGNAL_OUT(out_PREDICT_PREDICTOR_ADDRESS_SRC,"predictor_address_src",Taddress_t,_param->_size_address);
     74      ALLOC1_SIGNAL_OUT(out_PREDICT_PREDICTOR_ADDRESS_SRC,"predictor_address_src",Taddress_t,_param->_size_instruction_address);
    7575      ALLOC1_SIGNAL_IN ( in_PREDICT_PREDICTOR_HISTORY    ,"predictor_history"    ,Thistory_t,_param->_size_history);
    7676      ALLOC1_SIGNAL_IN ( in_PREDICT_PREDICTOR_DIRECTION  ,"predictor_direction"  ,Tcontrol_t,1);
     
    8484      ALLOC1_SIGNAL_IN ( in_UPDATE_VAL                ,"val"                ,Tcontrol_t,1);
    8585      ALLOC1_SIGNAL_OUT(out_UPDATE_ACK                ,"ack"                ,Tcontrol_t,1);
    86       ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS            ,"address"            ,Taddress_t,_param->_size_address);
     86      ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS            ,"address"            ,Taddress_t,_param->_size_instruction_address);
    8787      ALLOC1_SIGNAL_IN ( in_UPDATE_HISTORY            ,"history"            ,Thistory_t,_param->_size_history);
    8888      ALLOC1_SIGNAL_IN ( in_UPDATE_DIRECTION          ,"direction"          ,Tcontrol_t,1);
     
    9191      ALLOC1_SIGNAL_OUT(out_UPDATE_PREDICTOR_VAL      ,"predictor_val"      ,Tcontrol_t,1);
    9292      ALLOC1_SIGNAL_IN ( in_UPDATE_PREDICTOR_ACK      ,"predictor_ack"      ,Tcontrol_t,1);
    93       ALLOC1_SIGNAL_OUT(out_UPDATE_PREDICTOR_ADDRESS  ,"predictor_address"  ,Taddress_t,_param->_size_address);
     93      ALLOC1_SIGNAL_OUT(out_UPDATE_PREDICTOR_ADDRESS  ,"predictor_address"  ,Taddress_t,_param->_size_instruction_address);
    9494      ALLOC1_SIGNAL_OUT(out_UPDATE_PREDICTOR_HISTORY  ,"predictor_history"  ,Thistory_t,_param->_size_history);
    9595      ALLOC1_SIGNAL_OUT(out_UPDATE_PREDICTOR_DIRECTION,"predictor_direction",Tcontrol_t,1);
    9696        }
    9797    }
    98 
     98   
    9999    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    100100
    101101#ifdef POSITION
    102     _component->generate_file();
     102    if (usage_is_set(_usage,USE_POSITION))
     103      _component->generate_file();
    103104#endif
    104105
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_deallocation.cpp

    r81 r88  
    2424    log_printf(FUNC,Direction_Glue,FUNCTION,"Begin");
    2525
    26     if (_usage & USE_SYSTEMC)
     26    if (usage_is_set(_usage,USE_SYSTEMC))
    2727      {
    2828        delete    in_CLOCK ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Direction_Glue_end_cycle.cpp

    r81 r88  
    2626
    2727#ifdef STATISTICS
    28     _stat->end_cycle();
     28    if (usage_is_set(_usage,USE_STATISTICS))
     29      _stat->end_cycle();
    2930#endif   
    3031
     
    3233    // Evaluation before read the ouput signal
    3334//  sc_start(0);
    34     _interfaces->testbench();
     35    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     36      _interfaces->testbench();
    3537#endif
    3638
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Parameters.cpp

    r81 r88  
    2323                          uint32_t     nb_inst_update  ,
    2424                          uint32_t     size_address    ,
    25                           uint32_t     size_history    )
     25                          uint32_t     size_history    ,
     26                          bool         is_toplevel     )
    2627  {
    2728    log_printf(FUNC,Direction_Glue,FUNCTION,"Begin");
     
    3031    _nb_inst_predict  = nb_inst_predict ;
    3132    _nb_inst_update   = nb_inst_update  ;
    32     _size_address     = size_address    ;
    3333
    3434    switch (predictor_scheme)
     
    5858
    5959    test();
     60
     61    if (is_toplevel)
     62      {
     63        _size_instruction_address = size_address;
     64
     65        copy();
     66      }
     67
    6068    log_printf(FUNC,Direction_Glue,FUNCTION,"End");
    6169  };
     
    7886  };
    7987
     88#undef  FUNCTION
     89#define FUNCTION "Direction_Glue::copy"
     90  void Parameters::copy (void)
     91  {
     92    log_printf(FUNC,Direction_Glue,FUNCTION,"Begin");
     93    log_printf(FUNC,Direction_Glue,FUNCTION,"End");
     94  };
     95
     96
     97
    8098}; // end namespace direction_glue
    8199}; // end namespace direction
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/src/Parameters_print.cpp

    r81 r88  
    3131    xml.singleton_begin("nb_inst_predict "); xml.attribut("value",toString(_nb_inst_predict )); xml.singleton_end();
    3232    xml.singleton_begin("nb_inst_update  "); xml.attribut("value",toString(_nb_inst_update  )); xml.singleton_end();
    33     xml.singleton_begin("size_address    "); xml.attribut("value",toString(_size_address    )); xml.singleton_end();
     33//  xml.singleton_begin("size_address    "); xml.attribut("value",toString(_size_address    )); xml.singleton_end();
    3434    xml.singleton_begin("size_history    "); xml.attribut("value",toString(_size_history    )); xml.singleton_end();
    3535    xml.balise_close();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Direction_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/SelfTest/src/main.cpp

    r81 r88  
    7979         _pht_size_counter      ,
    8080         _pht_nb_counter        ,
    81          _pht_size_address_share);
     81         _pht_size_address_share,
     82         true // is_toplevel
     83         );
    8284     
    8385      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/SelfTest/src/test.cpp

    r82 r88  
    2424#endif
    2525
     26  Tusage_t _usage = USE_ALL;
     27
     28//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     29//   _usage = usage_unset(_usage,USE_VHDL                 );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     31//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     32//   _usage = usage_unset(_usage,USE_POSITION             );
     33//   _usage = usage_unset(_usage,USE_STATISTICS           );
     34//   _usage = usage_unset(_usage,USE_INFORMATION          );
     35
    2636  Direction * _Direction = new Direction
    2737    (name.c_str(),
     
    3040#endif
    3141     _param,
    32      USE_ALL);
     42     _usage);
    3343 
    3444#ifdef SYSTEMC
     
    110120        {
    111121          in_PREDICT_VAL                 [i]->write(rand()%2);
    112           in_PREDICT_ADDRESS_SRC         [i]->write(range<Taddress_t>(rand(),_param->_size_address));
     122          in_PREDICT_ADDRESS_SRC         [i]->write(range<Taddress_t>(rand(),_param->_size_instruction_address));
    113123          in_PREDICT_STATIC              [i]->write(rand()%2);
    114124          in_PREDICT_LAST_TAKE           [i]->write(rand()%2);
     
    118128        {
    119129          in_UPDATE_VAL                  [i]->write(rand()%2);
    120           in_UPDATE_ADDRESS              [i]->write(range<Taddress_t>(rand(),_param->_size_address));
     130          in_UPDATE_ADDRESS              [i]->write(range<Taddress_t>(rand(),_param->_size_instruction_address));
    121131          in_UPDATE_HISTORY              [i]->write(range<Thistory_t>(rand(),_param->_size_history));
    122132          in_UPDATE_DIRECTION            [i]->write(rand()%2);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Parameters.h

    r81 r88  
    3030  public : uint32_t     _nb_inst_predict           ;
    3131  public : uint32_t     _nb_inst_update            ;
    32   public : uint32_t     _size_address              ;
     32//public : uint32_t     _size_address              ;
    3333  public : bool         _have_bht               [3];
    3434  public : uint32_t     _bht_size_shifter       [3];
     
    5757                        uint32_t     pht_size_counter       [3],
    5858                        uint32_t     pht_nb_counter         [3],
    59                         uint32_t     pht_size_address_share [3]);
     59                        uint32_t     pht_size_address_share [3],
     60                        bool         is_toplevel=false
     61                        );
    6062
    6163//   public : Parameters  (Parameters & param) ;
    6264  public : ~Parameters () ;
     65
     66  public :        void            copy       (void);
    6367
    6468  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction.cpp

    r81 r88  
    3838    log_printf(FUNC,Direction,FUNCTION,"Begin");
    3939
     40#if DEBUG_Direction == true
     41    log_printf(INFO,Direction,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif
     45
    4046    log_printf(INFO,Direction,FUNCTION,"Allocation");
    4147
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    5157        log_printf(INFO,Direction,FUNCTION,"Allocation of statistics");
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
     
    6672
    6773#ifdef SYSTEMC
    68     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    6975      {
    7076        log_printf(INFO,Direction,FUNCTION,"Method - transition");
     
    9096
    9197#ifdef STATISTICS
    92     if (_usage & USE_STATISTICS)
     98    if (usage_is_set(_usage,USE_STATISTICS))
    9399      {
    94100        statistics_deallocation();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_allocation.cpp

    r82 r88  
    6363      ALLOC1_VALACK_IN ( in_PREDICT_VAL        ,VAL);
    6464      ALLOC1_VALACK_OUT(out_PREDICT_ACK        ,ACK);
    65       ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS_SRC,"address_src",Taddress_t,_param->_size_address);
     65      ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS_SRC,"address_src",Taddress_t,_param->_size_instruction_address);
    6666      ALLOC1_SIGNAL_IN ( in_PREDICT_STATIC     ,"static"     ,Tcontrol_t,1);
    6767      ALLOC1_SIGNAL_IN ( in_PREDICT_LAST_TAKE  ,"last_take"  ,Tcontrol_t,1);
     
    7676      ALLOC1_VALACK_IN ( in_UPDATE_VAL      ,VAL);
    7777      ALLOC1_VALACK_OUT(out_UPDATE_ACK      ,ACK);
    78       ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS  ,"address"  ,Taddress_t,_param->_size_address);
     78      ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS  ,"address"  ,Taddress_t,_param->_size_instruction_address);
    7979      ALLOC1_SIGNAL_IN ( in_UPDATE_HISTORY  ,"history"  ,Thistory_t,_param->_size_history);
    8080      ALLOC1_SIGNAL_IN ( in_UPDATE_DIRECTION,"direction",Tcontrol_t,1);
     
    182182
    183183#ifdef POSITION
    184     _component->generate_file();
     184    if (usage_is_set(_usage,USE_POSITION))
     185      _component->generate_file();
    185186#endif
    186187
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_deallocation.cpp

    r81 r88  
    2323    log_printf(FUNC,Direction,FUNCTION,"Begin");
    2424
    25     if (_usage & USE_SYSTEMC)
     25    if (usage_is_set(_usage,USE_SYSTEMC))
    2626      {
    2727        delete    in_CLOCK ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
    33     _interfaces->testbench();
     34    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     35      _interfaces->testbench();
    3436#endif
    3537
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Parameters.cpp

    r81 r88  
    2929                          uint32_t     pht_size_counter       [3],
    3030                          uint32_t     pht_nb_counter         [3],
    31                           uint32_t     pht_size_address_share [3])
     31                          uint32_t     pht_size_address_share [3],
     32                          bool         is_toplevel)
    3233  {
    3334    log_printf(FUNC,Direction,FUNCTION,"Begin");
     
    3637    _nb_inst_predict        = nb_inst_predict       ;
    3738    _nb_inst_update         = nb_inst_update        ;
    38     _size_address           = size_address          ;
     39//  _size_address           = size_address          ;
    3940   
    4041    for (uint32_t i=0; i<3; i++)
     
    141142    _have_port_history = (_size_history > 0);
    142143
     144    test();
     145
    143146    _param_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Parameters
    144147      (_predictor_scheme,
    145148       _nb_inst_predict ,
    146149       _nb_inst_update  ,
    147        _size_address    ,
     150        size_address    ,
    148151       _size_history    );
    149152
    150     test();
    151 
     153    if (is_toplevel)
     154      {
     155        _size_instruction_address = size_address;
     156
     157        copy ();
     158      }
     159   
    152160    log_printf(FUNC,Direction,FUNCTION,"End");
    153161  };
     
    172180  };
    173181
     182#undef  FUNCTION
     183#define FUNCTION "Direction::copy"
     184  void Parameters::copy (void)
     185  {
     186    log_printf(FUNC,Direction,FUNCTION,"Begin");
     187
     188    COPY(_param_glue);
     189
     190    log_printf(FUNC,Direction,FUNCTION,"End");
     191  };
     192
    174193}; // end namespace direction
    175194}; // end namespace prediction_unit
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Parameters_print.cpp

    r81 r88  
    3030    xml.singleton_begin("nb_inst_predict                   "); xml.attribut("value",toString(_nb_inst_predict )); xml.singleton_end();
    3131    xml.singleton_begin("nb_inst_update                    "); xml.attribut("value",toString(_nb_inst_update  )); xml.singleton_end();
    32     xml.singleton_begin("size_address                      "); xml.attribut("value",toString(_size_address    )); xml.singleton_end();
     32//  xml.singleton_begin("size_address                      "); xml.attribut("value",toString(_size_address    )); xml.singleton_end();
    3333
    3434    xml.comment("predictor_scheme : ");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Prediction_unit_Glue_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/src/main.cpp

    r82 r88  
    8181         _nb_inst_branch_predict,
    8282         _nb_inst_branch_decod  ,
    83          _nb_inst_branch_update );
     83         _nb_inst_branch_update ,
     84         true // is_toplevel
     85         );
    8486     
    8587      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/src/test.cpp

    r82 r88  
    5959  ALLOC1_SC_SIGNAL(out_PREDICT_PC_NEXT                     ,"out_PREDICT_PC_NEXT                    ",Taddress_t         ,_param->_nb_context);
    6060  ALLOC1_SC_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE          ,"out_PREDICT_PC_NEXT_IS_DS_TAKE         ",Tcontrol_t         ,_param->_nb_context);
    61   ALLOC2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE          ,"out_PREDICT_INSTRUCTION_ENABLE         ",Tcontrol_t         ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
     61  ALLOC2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE          ,"out_PREDICT_INSTRUCTION_ENABLE         ",Tcontrol_t         ,_param->_nb_context,_param->_nb_instruction[it1]);
    6262  ALLOC1_SC_SIGNAL(out_PREDICT_INST_IFETCH_PTR             ,"out_PREDICT_INST_IFETCH_PTR            ",Tinst_ifetch_ptr_t ,_param->_nb_context);
    6363  ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_STATE                ,"out_PREDICT_BRANCH_STATE               ",Tbranch_state_t    ,_param->_nb_context);
     
    9191  ALLOC1_SC_SIGNAL( in_PREDICT_UPT_ACK                     ," in_PREDICT_UPT_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
    9292  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_CONTEXT_ID              ,"out_PREDICT_UPT_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_branch_predict);
     93  ALLOC1_SC_SIGNAL( in_PREDICT_UPT_BRANCH_UPDATE_PREDICTION_ID ,"out_PREDICT_UPT_BRANCH_UPDATE_PREDICTION_ID",Tprediction_ptr_t  ,_param->_nb_context);
    9394  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC         ,"out_PREDICT_UPT_BTB_ADDRESS_SRC        ",Taddress_t         ,_param->_nb_inst_branch_predict);
    9495  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST        ,"out_PREDICT_UPT_BTB_ADDRESS_DEST       ",Taddress_t         ,_param->_nb_inst_branch_predict);
     
    99100  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS             ,"out_PREDICT_UPT_RAS_ADDRESS            ",Taddress_t         ,_param->_nb_inst_branch_predict);
    100101//ALLOC1_SC_SIGNAL(out_PREDICT_UPT_RAS_INDEX               ,"out_PREDICT_UPT_RAS_INDEX              ",Tptr_t             ,_param->_nb_inst_branch_predict);
    101   ALLOC1_SC_SIGNAL( in_DEPTH_UPT_NB_BRANCH                 ," in_DEPTH_UPT_NB_BRANCH                ",Tdepth_t           ,_param->_nb_context);
    102   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]);
     102//   ALLOC1_SC_SIGNAL( in_DEPTH_UPT_NB_BRANCH                 ," in_DEPTH_UPT_NB_BRANCH                ",Tdepth_t           ,_param->_nb_context);
     103//   ALLOC1_SC_SIGNAL( in_DEPTH_UPT_TAIL                      ," in_DEPTH_UPT_TAIL                     ",Tdepth_t           ,_param->_nb_context);
     104//   ALLOC1_SC_SIGNAL(out_DEPTH_NB_BRANCH                     ,"out_DEPTH_NB_BRANCH                    ",Tdepth_t           ,_param->_nb_context);
     105//   ALLOC1_SC_SIGNAL(out_DEPTH_TAIL                          ,"out_DEPTH_TAIL                         ",Tdepth_t           ,_param->_nb_context);
     106
     107  ALLOC2_SC_SIGNAL( in_DECOD_VAL                        ," in_DECOD_VAL                        ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     108  ALLOC2_SC_SIGNAL(out_DECOD_ACK                        ,"out_DECOD_ACK                        ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     109  ALLOC2_SC_SIGNAL( in_DECOD_CONTEXT_ID                 ," in_DECOD_CONTEXT_ID                 ",Tcontext_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     110  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[it1]);
     111  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_STATE               ," in_DECOD_BRANCH_STATE               ",Tbranch_state_t    ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     112  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[it1]);
     113  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION           ," in_DECOD_BRANCH_CONDITION           ",Tbranch_condition_t,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     114  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION           ," in_DECOD_BRANCH_DIRECTION           ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     115  ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_SRC                ," in_DECOD_ADDRESS_SRC                ",Taddress_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     116  ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_DEST               ," in_DECOD_ADDRESS_DEST               ",Taddress_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
    116117  ALLOC1_SC_SIGNAL(out_DECOD_BTB_VAL                    ,"out_DECOD_BTB_VAL                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
    117118  ALLOC1_SC_SIGNAL( in_DECOD_BTB_ACK                    ," in_DECOD_BTB_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
     
    144145  ALLOC1_SC_SIGNAL(out_DECOD_UPT_MISS_DECOD             ,"out_DECOD_UPT_MISS_DECOD             ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
    145146  ALLOC1_SC_SIGNAL(out_DECOD_UPT_UPDATE_PREDICTION_ID   ,"out_DECOD_UPT_UPDATE_PREDICTION_ID   ",Tprediction_ptr_t  ,_param->_nb_inst_branch_decod);
     147  ALLOC1_SC_SIGNAL(out_DECOD_UPT_IS_ACCURATE            ,"out_DECOD_UPT_IS_ACCURATE            ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
    146148 
    147149  ALLOC1_SC_SIGNAL(out_UPDATE_BTB_VAL                  ,"out_UPDATE_BTB_VAL                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
     
    199201  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_PC_NEXT                     ,_param->_nb_context);
    200202  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_PC_NEXT_IS_DS_TAKE          ,_param->_nb_context);
    201   INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_INSTRUCTION_ENABLE          ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
     203  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_INSTRUCTION_ENABLE          ,_param->_nb_context,_param->_nb_instruction[it1]);
    202204  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BRANCH_STATE                ,_param->_nb_context);
    203205  for (uint32_t i=0; i<_param->_nb_context; i++)
    204206    {
    205       if (_param->_have_port_inst_ifetch_ptr [i])
    206         INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_INST_IFETCH_PTR [i]);
    207       if (_param->_have_port_depth [i])
     207      if (_param->_have_port_inst_ifetch_ptr)
     208        INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_INST_IFETCH_PTR [i]);
     209      if (_param->_have_port_depth)
    208210        INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i]);
    209211    }
     
    243245  if (_param->_have_port_context_id)
    244246  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_CONTEXT_ID              ,_param->_nb_inst_branch_predict);
     247  if (_param->_have_port_depth)
     248  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_UPT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_inst_branch_predict);
    245249  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_ADDRESS_SRC         ,_param->_nb_inst_branch_predict);
    246250  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_ADDRESS_DEST        ,_param->_nb_inst_branch_predict);
     
    252256//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_RAS_INDEX               ,_param->_nb_inst_branch_predict);
    253257
    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]);
     258  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     259  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
    256260  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]);
     261  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     262  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     263  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     264  if (_param->_have_port_depth)
     265  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     266  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     267  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     268  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     269  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
    266270  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_VAL                    ,_param->_nb_inst_branch_decod);
    267271  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BTB_ACK                    ,_param->_nb_inst_branch_decod);
     
    296300  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_MISS_IFETCH            ,_param->_nb_inst_branch_decod);
    297301  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_MISS_DECOD             ,_param->_nb_inst_branch_decod);
    298   if (_param->_have_port_max_depth)
     302  if (_param->_have_port_depth)
    299303  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_UPDATE_PREDICTION_ID   ,_param->_nb_inst_branch_decod);
     304  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_IS_ACCURATE            ,_param->_nb_inst_branch_decod);
    300305
    301306  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_VAL                  ,_param->_nb_inst_branch_update);
     
    337342//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_PREDICTION_IFETCH,_param->_nb_inst_branch_update);
    338343
    339   for (uint32_t i=0; i<_param->_nb_context; i++)
    340     {
    341       if (_param->_have_port_depth [i])
    342         {
    343           INSTANCE_SC_SIGNAL(_Prediction_unit_Glue, in_DEPTH_UPT_TAIL      [i]);
    344           INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_DEPTH_TAIL          [i]);
    345         }
    346           INSTANCE_SC_SIGNAL(_Prediction_unit_Glue, in_DEPTH_UPT_NB_BRANCH [i]);
    347           INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_DEPTH_NB_BRANCH     [i]);
    348     }
     344//   for (uint32_t i=0; i<_param->_nb_context; i++)
     345//     {
     346//       if (_param->_have_port_depth)
     347//      {
     348//        INSTANCE_SC_SIGNAL(_Prediction_unit_Glue, in_DEPTH_UPT_TAIL      [i]);
     349//        INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_DEPTH_TAIL          [i]);
     350//      }
     351//        INSTANCE_SC_SIGNAL(_Prediction_unit_Glue, in_DEPTH_UPT_NB_BRANCH [i]);
     352//        INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_DEPTH_NB_BRANCH     [i]);
     353//     }
    349354
    350355  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    583588              {
    584589                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]);
     590                in_DECOD_BRANCH_UPDATE_PREDICTION_ID [decod_unit][i]->write(rand()%_param->_array_size_depth[context]);
    586591               
    587592                in_DECOD_BTB_ACK[0]->write((rand()%100)<percent_transaction_decod);
     
    624629            in_DECOD_MATCH_INST_IFETCH_PTR       [decod_unit][i]->write(0);
    625630            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);
     631            in_DECOD_BRANCH_UPDATE_PREDICTION_ID [decod_unit][i]->write(i%_param->_size_depth);
    627632            in_DECOD_BRANCH_CONDITION            [decod_unit][i]->write(BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK);
    628633            in_DECOD_BRANCH_DIRECTION            [decod_unit][i]->write(1);
     
    664669                    TEST(Tcontext_t         ,out_DECOD_RAS_CONTEXT_ID           [0]->read(),context);
    665670                    TEST(Tcontrol_t         ,out_DECOD_RAS_PUSH                 [0]->read(),1);
    666                     TEST(Taddress_t         ,out_DECOD_RAS_ADDRESS_PUSH         [0]->read(),0x11061979+i);
     671                    TEST(Taddress_t         ,out_DECOD_RAS_ADDRESS_PUSH         [0]->read(),0xdeadbeef+i+2);
    667672                    TEST(Tcontrol_t         ,out_DECOD_RAS_MISS_PREDICTION      [0]->read(),1);
    668673                    TEST(Tcontext_t         ,out_DECOD_UPT_CONTEXT_ID           [0]->read(),context);
     
    674679                    TEST(Tcontrol_t         ,out_DECOD_UPT_MISS_IFETCH          [0]->read(),1);
    675680                    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);
     681                    TEST(Tprediction_ptr_t  ,out_DECOD_UPT_UPDATE_PREDICTION_ID [0]->read(),i%_param->_size_depth);
     682                    TEST(Tcontrol_t         ,out_DECOD_UPT_IS_ACCURATE          [0]->read(),0);
    677683
    678684                    find = true;
     
    712718  DELETE1_SC_SIGNAL(out_PREDICT_PC_NEXT                     ,_param->_nb_context);
    713719  DELETE1_SC_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE          ,_param->_nb_context);
    714   DELETE2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE          ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
     720  DELETE2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE          ,_param->_nb_context,_param->_nb_instruction[it1]);
    715721  DELETE1_SC_SIGNAL(out_PREDICT_INST_IFETCH_PTR             ,_param->_nb_context);
    716722  DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_STATE                ,_param->_nb_context);
     
    743749  DELETE1_SC_SIGNAL(out_PREDICT_UPT_VAL                     ,_param->_nb_inst_branch_predict);
    744750  DELETE1_SC_SIGNAL( in_PREDICT_UPT_ACK                     ,_param->_nb_inst_branch_predict);
     751  DELETE1_SC_SIGNAL( in_PREDICT_UPT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_inst_branch_predict);
    745752  DELETE1_SC_SIGNAL(out_PREDICT_UPT_CONTEXT_ID              ,_param->_nb_inst_branch_predict);
    746753  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC         ,_param->_nb_inst_branch_predict);
     
    752759  DELETE1_SC_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS             ,_param->_nb_inst_branch_predict);
    753760//DELETE1_SC_SIGNAL(out_PREDICT_UPT_RAS_INDEX               ,_param->_nb_inst_branch_predict);
    754   DELETE1_SC_SIGNAL( in_DEPTH_UPT_NB_BRANCH                 ,_param->_nb_context);
    755   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]);
     761//   DELETE1_SC_SIGNAL( in_DEPTH_UPT_NB_BRANCH                 ,_param->_nb_context);
     762//   DELETE1_SC_SIGNAL( in_DEPTH_UPT_TAIL                      ,_param->_nb_context);
     763//   DELETE1_SC_SIGNAL(out_DEPTH_NB_BRANCH                     ,_param->_nb_context);
     764//   DELETE1_SC_SIGNAL(out_DEPTH_TAIL                          ,_param->_nb_context);
     765
     766  DELETE2_SC_SIGNAL( in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     767  DELETE2_SC_SIGNAL(out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     768  DELETE2_SC_SIGNAL( in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     769  DELETE2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     770  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     771  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     772  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     773  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     774  DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     775  DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
    769776  DELETE1_SC_SIGNAL(out_DECOD_BTB_VAL                    ,_param->_nb_inst_branch_decod);
    770777  DELETE1_SC_SIGNAL( in_DECOD_BTB_ACK                    ,_param->_nb_inst_branch_decod);
     
    797804  DELETE1_SC_SIGNAL(out_DECOD_UPT_MISS_DECOD             ,_param->_nb_inst_branch_decod);
    798805  DELETE1_SC_SIGNAL(out_DECOD_UPT_UPDATE_PREDICTION_ID   ,_param->_nb_inst_branch_decod);
     806  DELETE1_SC_SIGNAL(out_DECOD_UPT_IS_ACCURATE            ,_param->_nb_inst_branch_decod);
    799807
    800808  DELETE1_SC_SIGNAL(out_UPDATE_BTB_VAL                  ,_param->_nb_inst_branch_update);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Parameters.h

    r82 r88  
    2727  public : uint32_t   _nb_decod_unit            ;
    2828//public : uint32_t   _nb_ooo_engine            ;
    29   public : uint32_t   _size_address             ;
     29//public : uint32_t   _size_address             ;
    3030  public : uint32_t * _nb_instruction           ;//[nb_context]
    31   public : uint32_t * _size_depth               ;//[nb_context]
     31//public : uint32_t * _size_depth               ;//[nb_context]
     32  public : uint32_t * _array_size_depth         ;//[nb_context]
    3233  public : uint32_t * _nb_inst_decod            ;//[nb_decod_unit]
    3334//public : uint32_t * _nb_inst_update           ;//[nb_ooo_engine]
     
    3738//public : uint32_t   _nb_inst_branch_complete  ;
    3839
    39   public : uint32_t   _size_context_id          ;
    40   public : uint32_t * _size_inst_ifetch_ptr     ;//[nb_context]
    41   public : uint32_t   _max_size_depth           ;
     40//public : uint32_t   _size_context_id          ;
     41//public : uint32_t * _size_inst_ifetch_ptr     ;//[nb_context]
     42//public : uint32_t   _max_size_depth           ;
    4243
    43   public : bool       _have_port_context_id     ;
    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]
     44//public : bool       _have_port_context_id     ;
     45//public : bool       _have_port_max_depth      ;
     46//public : bool     * _have_port_depth          ;//[nb_context]
     47//public : bool     * _have_port_inst_ifetch_ptr;//[nb_context]
    4748
    4849    //-----[ methods ]-----------------------------------------------------------
     
    5051                        uint32_t   nb_decod_unit         ,
    5152//                      uint32_t   nb_ooo_engine         ,
    52                         uint32_t   size_address          ,
     53                        uint32_t   size_address          ,
    5354                        uint32_t * nb_instruction        ,
    5455                        uint32_t * size_depth            ,
     
    5758                        uint32_t   nb_inst_branch_predict,
    5859                        uint32_t   nb_inst_branch_decod  ,
    59                         uint32_t   nb_inst_branch_update );
     60                        uint32_t   nb_inst_branch_update ,
     61                        bool       is_toplevel=false
     62                        );
    6063//   public : Parameters  (Parameters & param) ;
    6164  public : ~Parameters () ;
     65
     66  public :        void            copy       (void);
    6267
    6368  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Prediction_unit_Glue.h

    r82 r88  
    106106  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_UPT_ACK                     ; //[nb_inst_branch_predict]
    107107  public    : SC_OUT(Tcontext_t         )  ** out_PREDICT_UPT_CONTEXT_ID              ; //[nb_inst_branch_predict]
     108  public    : SC_IN (Tprediction_ptr_t  )  **  in_PREDICT_UPT_BRANCH_UPDATE_PREDICTION_ID; //[nb_inst_branch_predict]
     109
    108110  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_UPT_BTB_ADDRESS_SRC         ; //[nb_inst_branch_predict]* BTB.ADDRESS_SRC
    109111  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_UPT_BTB_ADDRESS_DEST        ; //[nb_inst_branch_predict]
     
    159161  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_MISS_DECOD                ; //[nb_inst_branch_decod]
    160162  public    : SC_OUT(Tprediction_ptr_t  )  ** out_DECOD_UPT_UPDATE_PREDICTION_ID      ; //[nb_inst_branch_decod]
     163  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_IS_ACCURATE               ; //[nb_inst_branch_decod]
    161164                                                                                     
    162165    // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     
    202205//public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_RAS_PREDICTION_IFETCH    ; //[nb_inst_branch_update] RAS.PREDICTION_IFETCH
    203206                                                                                     
    204     // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
    205   public    : SC_IN (Tdepth_t           )  **  in_DEPTH_UPT_NB_BRANCH                 ; //[nb_context]
    206   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]
     207//  // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     208//public    : SC_IN (Tdepth_t           )  **  in_DEPTH_UPT_NB_BRANCH                 ; //[nb_context]
     209//public    : SC_IN (Tdepth_t           )  **  in_DEPTH_UPT_TAIL                      ; //[nb_context]
     210//public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_NB_BRANCH                     ; //[nb_context]
     211//public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_TAIL                          ; //[nb_context]
    209212
    210213    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters.cpp

    r82 r88  
    3030                          uint32_t   nb_inst_branch_predict,
    3131                          uint32_t   nb_inst_branch_decod  ,
    32                           uint32_t   nb_inst_branch_update )
     32                          uint32_t   nb_inst_branch_update ,
     33                          bool       is_toplevel
     34                          )
    3335  {
    3436    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin");
    3537
    3638    _nb_context                = nb_context     ;
    37     _size_address              = size_address   ;
    3839    _nb_instruction            = nb_instruction ;
    39     _size_depth                = size_depth     ;
     40//  _size_depth                = size_depth     ;
     41    _array_size_depth          = size_depth     ;
    4042    _nb_decod_unit             = nb_decod_unit  ;
    4143    _nb_inst_decod             = nb_inst_decod  ;
    42 //     _nb_ooo_engine             = nb_ooo_engine  ;
    43 //     _nb_inst_update            = nb_inst_update ;
     44//  _nb_ooo_engine             = nb_ooo_engine  ;
     45//  _nb_inst_update            = nb_inst_update ;
    4446    _nb_inst_branch_predict    = nb_inst_branch_predict;
    4547    _nb_inst_branch_decod      = nb_inst_branch_decod  ;
    4648    _nb_inst_branch_update     = nb_inst_branch_update ;
    4749     
    48     _size_context_id           = log2(_nb_context);
    49     _size_inst_ifetch_ptr      = new uint32_t [_nb_context];
    50     _max_size_depth            = max<uint32_t>(_size_depth,_nb_context);
     50    test();
    5151
    52     _have_port_context_id      = (_size_context_id>0);
    53     _have_port_max_depth       = (_max_size_depth>0);
    54     _have_port_depth           = new bool [_nb_context];
    55     _have_port_inst_ifetch_ptr = new bool [_nb_context];
     52    if (is_toplevel)
     53      {
     54        _size_instruction_address  = size_address;
     55        _size_context_id           = log2(_nb_context);
     56        _size_depth                = max<uint32_t>(size_depth,_nb_context);
     57        _size_inst_ifetch_ptr      = log2(max<uint32_t>(_nb_instruction,_nb_context));
    5658
    57     for (uint32_t i=0; i<_nb_context; i++)
    58       {
    59         _size_inst_ifetch_ptr      [i] = log2(_nb_instruction [i]);
    60         _have_port_depth           [i] = (_size_depth [i] > 0);
    61         _have_port_inst_ifetch_ptr [i] = (_size_inst_ifetch_ptr [i] > 0);
     59        _have_port_context_id      = (_size_context_id > 0);
     60        _have_port_depth           = (_size_depth > 0);
     61        _have_port_inst_ifetch_ptr = (_size_inst_ifetch_ptr > 0);
     62
     63        copy ();
    6264      }
    6365
    64     test();
    6566    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End");
    6667  };
     
    8081  {
    8182    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin");
    82     delete  [] _size_inst_ifetch_ptr     ;
    83     delete  [] _have_port_depth          ;
    84     delete  [] _have_port_inst_ifetch_ptr;
     83    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End");
     84  };
     85
     86#undef  FUNCTION
     87#define FUNCTION "Prediction_unit_Glue::copy"
     88  void Parameters::copy (void)
     89  {
     90    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin");
    8591    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End");
    8692  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters_print.cpp

    r82 r88  
    3030    xml.singleton_begin("nb_decod_unit         "); xml.attribut("value",toString(_nb_decod_unit         )); xml.singleton_end();
    3131//     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();
     32//  xml.singleton_begin("size_address          "); xml.attribut("value",toString(_size_address          )); xml.singleton_end();
    3333    xml.singleton_begin("nb_inst_branch_predict"); xml.attribut("value",toString(_nb_inst_branch_predict)); xml.singleton_end();
    3434    xml.singleton_begin("nb_inst_branch_decod  "); xml.attribut("value",toString(_nb_inst_branch_decod  )); xml.singleton_end();
     
    4343        xml.  attribut("id"  ,toString(i));
    4444        xml. balise_open_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();
     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();
    4747        xml. balise_close();
    4848      }
     
    5353        xml.  attribut("id"  ,toString(i));
    5454        xml. balise_open_end();
    55         xml.  singleton_begin("nb_inst_decod         "); xml.attribut("value",toString(_nb_inst_decod         [i])); xml.singleton_end();
     55        xml.  singleton_begin("nb_inst_decod         "); xml.attribut("value",toString(_nb_inst_decod         [i])); xml.singleton_end();
    5656        xml. balise_close();
    5757      }
     
    6262//         xml.  attribut("id"  ,toString(i));
    6363//         xml. balise_open_end();
    64 //      xml.  singleton_begin("nb_inst_update        "); xml.attribut("value",toString(_nb_inst_update        [i])); xml.singleton_end();
     64//      xml.  singleton_begin("nb_inst_update        "); xml.attribut("value",toString(_nb_inst_update        [i])); xml.singleton_end();
    6565//         xml. balise_close();
    6666//       }
     
    7676#define FUNCTION "Prediction_unit_Glue::operator<<"
    7777  std::ostream& operator<< (std::ostream& output_stream ,
    78                             morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue::Parameters & x)
     78                            morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue::Parameters & x)
    7979  {
    8080    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue.cpp

    r82 r88  
    4040    usage_environment(_usage);
    4141
     42#if DEBUG_Prediction_unit_Glue == true
     43    log_printf(INFO,Prediction_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
     44
     45    std::cout << *param << std::endl;
     46#endif   
     47
    4248    log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Allocation");
    4349
    4450    allocation (
    4551#ifdef STATISTICS
    46                 param_statistics
     52                param_statistics
    4753#endif
    48                 );
     54                );
    4955
    5056#ifdef STATISTICS
    5157    if (usage_is_set(_usage,USE_STATISTICS))
    52       { 
    53         log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Allocation of statistics");
    54 
    55         statistics_allocation(param_statistics);
     58      { 
     59        log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Allocation of statistics");
     60
     61        statistics_allocation(param_statistics);
    5662      }
    5763#endif
     
    6066    if (usage_is_set(_usage,USE_VHDL))
    6167      {
    62         // generate the vhdl
    63         log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Generate the vhdl");
    64        
    65         vhdl();
     68        // generate the vhdl
     69        log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Generate the vhdl");
     70       
     71        vhdl();
    6672      }
    6773#endif
     
    7076    if (usage_is_set(_usage,USE_SYSTEMC))
    7177      {
    72         log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Method - transition");
    73 
    74         SC_METHOD (transition);
    75         dont_initialize ();
    76         sensitive << (*(in_CLOCK)).pos();
    77        
     78        log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Method - transition");
     79
     80        SC_METHOD (transition);
     81        dont_initialize ();
     82        sensitive << (*(in_CLOCK)).pos();
     83       
    7884# ifdef SYSTEMCASS_SPECIFIC
    79         // List dependency information
     85        // List dependency information
    8086# endif   
    8187
    82         log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Method - genMealy_predict");
    83 
    84         SC_METHOD (genMealy_predict);
    85         dont_initialize ();
    86         sensitive << (*(in_CLOCK)).neg(); // use internal register
    87         for (uint32_t i=0; i<_param->_nb_context; i++)
    88           {
    89             sensitive << (*( in_PREDICT_VAL                         [i]))
    90                       << (*( in_PREDICT_PC_PREVIOUS                 [i]))
    91                       << (*( in_PREDICT_PC_CURRENT                  [i]))
    92                       << (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
    93           }
    94         for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    95           {
    96             sensitive << (*( in_PREDICT_BTB_ACK              [i]))
    97                       << (*( in_PREDICT_BTB_HIT              [i]))
    98                       << (*( in_PREDICT_BTB_ADDRESS_SRC      [i]))
    99                       << (*( in_PREDICT_BTB_ADDRESS_DEST     [i]))
    100                       << (*( in_PREDICT_BTB_CONDITION        [i]))
    101 //                    << (*( in_PREDICT_BTB_LAST_TAKE        [i]))
    102                       << (*( in_PREDICT_BTB_IS_ACCURATE      [i]))
    103                       << (*( in_PREDICT_DIR_ACK              [i]))
    104 //                    << (*( in_PREDICT_DIR_HISTORY          [i]))
    105                       << (*( in_PREDICT_DIR_DIRECTION        [i]))
    106                       << (*( in_PREDICT_RAS_ACK              [i]))
    107                       << (*( in_PREDICT_RAS_HIT              [i]))
    108                       << (*( in_PREDICT_RAS_ADDRESS_POP      [i]))
    109 //                    << (*( in_PREDICT_RAS_INDEX            [i]))
    110                       << (*( in_PREDICT_UPT_ACK              [i]));
    111           }
    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           }
     88        log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Method - genMealy_predict");
     89       
     90        SC_METHOD (genMealy_predict);
     91       
     92        dont_initialize ();
     93        sensitive << (*(in_CLOCK)).neg(); // use internal register
     94       
     95        for (uint32_t i=0; i<_param->_nb_context; i++)
     96          {
     97            sensitive << (*( in_PREDICT_VAL                         [i]))
     98                      << (*( in_PREDICT_PC_PREVIOUS                 [i]))
     99                      << (*( in_PREDICT_PC_CURRENT                  [i]))
     100                      << (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     101          }
     102       
     103        for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     104          {
     105            sensitive << (*( in_PREDICT_BTB_ACK              [i]))
     106                      << (*( in_PREDICT_BTB_HIT              [i]))
     107                      << (*( in_PREDICT_BTB_ADDRESS_SRC      [i]))
     108                      << (*( in_PREDICT_BTB_ADDRESS_DEST     [i]))
     109                      << (*( in_PREDICT_BTB_CONDITION        [i]))
     110//                    << (*( in_PREDICT_BTB_LAST_TAKE        [i]))
     111                      << (*( in_PREDICT_BTB_IS_ACCURATE      [i]))
     112                      << (*( in_PREDICT_DIR_ACK              [i]))
     113//                    << (*( in_PREDICT_DIR_HISTORY          [i]))
     114                      << (*( in_PREDICT_DIR_DIRECTION        [i]))
     115                      << (*( in_PREDICT_RAS_ACK              [i]))
     116                      << (*( in_PREDICT_RAS_HIT              [i]))
     117                      << (*( in_PREDICT_RAS_ADDRESS_POP      [i]))
     118//                    << (*( in_PREDICT_RAS_INDEX            [i]))
     119                      << (*( in_PREDICT_UPT_ACK              [i]));
     120            if (_param->_have_port_depth)
     121            sensitive << (*( in_PREDICT_UPT_BRANCH_UPDATE_PREDICTION_ID [i]));
     122          }
     123
     124//      for (uint32_t i=0; i<_param->_nb_context; i++)
     125//        {
     126//          sensitive << (*(in_DEPTH_UPT_NB_BRANCH [i]));
     127//          if (_param->_have_port_depth)
     128//            sensitive << (*(in_DEPTH_UPT_TAIL      [i]));
     129//        }
    118130
    119131# ifdef SYSTEMCASS_SPECIFIC
    120         // List dependency information
    121         for (uint32_t x=0; x<_param->_nb_context; x++)
    122           {
    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 
    129             for (uint32_t i=0; i<_param->_nb_context; i++)
    130               {
    131                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_VAL                         [i]));
    132                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    133                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    134                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    142               {
    143                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_ACK              [i]));
    144                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_HIT              [i]));
    145                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    146                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    147                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    148 //              (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    149                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    150                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_DIR_ACK              [i]));
    151 //              (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    152                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    153                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_RAS_ACK              [i]));
    154                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_RAS_HIT              [i]));
    155                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    156 //              (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    157                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_UPT_ACK              [i]));
    158               }
    159 
    160             for (uint32_t i=0; i<_param->_nb_context; i++)
    161               {
    162                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_VAL                         [i]));
    163                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    164                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    165                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    173               {
    174                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_ACK              [i]));
    175                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_HIT              [i]));
    176                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    177                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    178                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    179 //              (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    180                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    181                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_DIR_ACK              [i]));
    182 //              (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    183                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    184                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_RAS_ACK              [i]));
    185                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_RAS_HIT              [i]));
    186                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    187 //              (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    188                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_UPT_ACK              [i]));
    189               }
    190 
    191             for (uint32_t i=0; i<_param->_nb_context; i++)
    192               {
    193                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_VAL                         [i]));
    194                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    195                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    196                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    204               {
    205                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_ACK              [i]));
    206                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_HIT              [i]));
    207                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    208                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    209                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    210 //              (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    211                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    212                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_DIR_ACK              [i]));
    213 //              (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    214                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    215                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_RAS_ACK              [i]));
    216                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_RAS_HIT              [i]));
    217                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    218 //              (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    219                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_UPT_ACK              [i]));
    220               }
    221 
    222             if (_param->_have_port_inst_ifetch_ptr [x])
    223               {
    224             for (uint32_t i=0; i<_param->_nb_context; i++)
    225               {
    226                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_VAL                         [i]));
    227                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    228                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    229                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    237               {
    238                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_ACK              [i]));
    239                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_HIT              [i]));
    240                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    241                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    242                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    243 //              (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    244                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    245                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_DIR_ACK              [i]));
    246 //              (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    247                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    248                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_RAS_ACK              [i]));
    249                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_RAS_HIT              [i]));
    250                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    251 //              (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    252                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_UPT_ACK              [i]));
    253               }
    254               }
    255 
    256             for (uint32_t i=0; i<_param->_nb_context; i++)
    257               {
    258                 (*(out_PREDICT_BRANCH_STATE                [x]))(*( in_PREDICT_VAL                         [i]));
    259                 (*(out_PREDICT_BRANCH_STATE                [x]))(*( in_PREDICT_PC_PREVIOUS                 [i]));
    260                 (*(out_PREDICT_BRANCH_STATE                [x]))(*( in_PREDICT_PC_CURRENT                  [i]));
    261                 (*(out_PREDICT_BRANCH_STATE                [x]))(*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    269               {
    270                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_ACK              [i]));
    271                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_HIT              [i]));
    272                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    273                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    274                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    275 //              (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    276                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    277                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_DIR_ACK              [i]));
    278 //              (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    279                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    280                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_RAS_ACK              [i]));
    281                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_RAS_HIT              [i]));
    282                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    283 //              (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    284                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_UPT_ACK              [i]));
    285               }
    286 
    287             if (_param->_have_port_depth [x])
    288               {
    289             for (uint32_t i=0; i<_param->_nb_context; i++)
    290               {
    291                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_VAL                         [i]));
    292                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    293                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    294                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    302               {
    303                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_ACK              [i]));
    304                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_HIT              [i]));
    305                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    306                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    307                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    308 //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    309                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    310                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_DIR_ACK              [i]));
    311 //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    312                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    313                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_RAS_ACK              [i]));
    314                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_RAS_HIT              [i]));
    315                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    316 //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    317                 (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_UPT_ACK              [i]));
    318               }
    319               }
    320 
    321             for (uint32_t y=0; y<_param->_nb_instruction[x]; y++)
    322               {
    323                 for (uint32_t i=0; i<_param->_nb_context; i++)
    324                   {
    325                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_VAL                         [i]));
    326                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    327                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_PC_CURRENT                  [i]));
    328                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    336                   {
    337                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_ACK              [i]));
    338                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_HIT              [i]));
    339                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    340                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    341                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_CONDITION        [i]));
    342 //                  (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    343                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    344                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_DIR_ACK              [i]));
    345 //                  (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_DIR_HISTORY          [i]));
    346                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    347                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_RAS_ACK              [i]));
    348                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_RAS_HIT              [i]));
    349                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    350 //                  (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_RAS_INDEX            [i]));
    351                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_UPT_ACK              [i]));
    352                   }
    353               }
    354           }
    355 
    356         for (uint32_t x=0; x<_param->_nb_inst_branch_predict; x++)
    357           {
    358             for (uint32_t i=0; i<_param->_nb_context; i++)
    359               {
    360                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_VAL                         [i]));
    361                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    362                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    363                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    371               {
    372                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
    373                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_HIT              [i]));
    374                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    375                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    376                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    377 //              (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    378                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    379                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_DIR_ACK              [i]));
    380 //              (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    381                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    382                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_RAS_ACK              [i]));
    383                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_RAS_HIT              [i]));
    384                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    385 //              (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    386                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_UPT_ACK              [i]));
    387               }
    388 
    389             if (_param->_have_port_context_id)
    390               {
    391             for (uint32_t i=0; i<_param->_nb_context; i++)
    392               {
    393                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_VAL                         [i]));
    394                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    395                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    396                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    404               {
    405                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ACK              [i]));
    406                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_HIT              [i]));
    407                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    408                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    409                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    410 //              (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    411                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    412                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_ACK              [i]));
    413 //              (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    414                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    415                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_ACK              [i]));
    416                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_HIT              [i]));
    417                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    418 //              (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    419                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_UPT_ACK              [i]));
    420               }
    421               }
    422 
    423             for (uint32_t i=0; i<_param->_nb_context; i++)
    424               {
    425                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_VAL                         [i]));
    426                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    427                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    428                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    436               {
    437                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_ACK              [i]));
    438                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_HIT              [i]));
    439                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    440                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    441                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    442 //              (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    443                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    444                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_DIR_ACK              [i]));
    445 //              (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    446                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    447                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_RAS_ACK              [i]));
    448                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_RAS_HIT              [i]));
    449                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    450 //              (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    451                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_UPT_ACK              [i]));
    452               }
    453 
    454             for (uint32_t i=0; i<_param->_nb_context; i++)
    455               {
    456                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_VAL                         [i]));
    457                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    458                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    459                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    467               {
    468                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
    469                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_HIT              [i]));
    470                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    471                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    472                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    473 //              (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    474                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    475                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_DIR_ACK              [i]));
    476 //              (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    477                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    478                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_RAS_ACK              [i]));
    479                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_RAS_HIT              [i]));
    480                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    481 //              (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    482                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_UPT_ACK              [i]));
    483               }
    484 
    485             for (uint32_t i=0; i<_param->_nb_context; i++)
    486               {
    487                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_VAL                         [i]));
    488                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    489                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    490                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    498               {
    499                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_ACK              [i]));
    500                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_HIT              [i]));
    501                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    502                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    503                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    504 //              (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    505                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    506                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_DIR_ACK              [i]));
    507 //              (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    508                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    509                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_RAS_ACK              [i]));
    510                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_RAS_HIT              [i]));
    511                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    512 //              (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    513                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_UPT_ACK              [i]));
    514               }
    515 
    516             for (uint32_t i=0; i<_param->_nb_context; i++)
    517               {
    518                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_VAL                         [i]));
    519                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    520                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    521                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    529               {
    530                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_ACK              [i]));
    531                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_HIT              [i]));
    532                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    533                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    534                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    535 //              (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    536                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    537                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_DIR_ACK              [i]));
    538 //              (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    539                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    540                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_RAS_ACK              [i]));
    541                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_RAS_HIT              [i]));
    542                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    543 //              (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    544                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_UPT_ACK              [i]));
    545               }
    546 
    547 //          for (uint32_t i=0; i<_param->_nb_context; i++)
    548 //            {
    549 //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_VAL                         [i]));
    550 //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    551 //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    552 //              (*(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]));
    558 //            }
    559 //          for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    560 //            {
    561 //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_ACK              [i]));
    562 //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_HIT              [i]));
    563 //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    564 //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    565 //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    566 // //           (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    567 //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    568 //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_DIR_ACK              [i]));
    569 // //           (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    570 //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    571 //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_RAS_ACK              [i]));
    572 //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_RAS_HIT              [i]));
    573 //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    574 // //           (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    575 //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_UPT_ACK              [i]));
    576 //            }
    577 
    578             for (uint32_t i=0; i<_param->_nb_context; i++)
    579               {
    580                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_VAL                         [i]));
    581                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    582                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    583                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    591               {
    592                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
    593                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_HIT              [i]));
    594                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    595                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    596                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    597 //              (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    598                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    599                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_DIR_ACK              [i]));
    600 //              (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    601                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    602                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_RAS_ACK              [i]));
    603                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_RAS_HIT              [i]));
    604                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    605 //              (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    606                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_UPT_ACK              [i]));
    607               }
    608 
    609             if (_param->_have_port_context_id)
    610               {
    611             for (uint32_t i=0; i<_param->_nb_context; i++)
    612               {
    613                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_VAL                         [i]));
    614                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    615                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    616                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    624               {
    625                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ACK              [i]));
    626                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_HIT              [i]));
    627                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    628                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    629                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    630 //              (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    631                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    632                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_ACK              [i]));
    633 //              (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    634                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    635                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_ACK              [i]));
    636                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_HIT              [i]));
    637                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    638 //              (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    639                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_UPT_ACK              [i]));
    640               }
    641               }
    642 
    643             for (uint32_t i=0; i<_param->_nb_context; i++)
    644               {
    645                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_VAL                         [i]));
    646                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    647                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    648                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    656               {
    657                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_ACK              [i]));
    658                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_HIT              [i]));
    659                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    660                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    661                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    662 //              (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    663                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    664                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_DIR_ACK              [i]));
    665 //              (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    666                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    667                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_RAS_ACK              [i]));
    668                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_RAS_HIT              [i]));
    669                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    670 //              (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    671                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_UPT_ACK              [i]));
    672               }
    673 
    674             for (uint32_t i=0; i<_param->_nb_context; i++)
    675               {
    676                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_VAL                         [i]));
    677                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    678                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    679                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    687               {
    688                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_ACK              [i]));
    689                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_HIT              [i]));
    690                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    691                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    692                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    693 //              (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    694                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    695                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_DIR_ACK              [i]));
    696 //              (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    697                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    698                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_RAS_ACK              [i]));
    699                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_RAS_HIT              [i]));
    700                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    701 //              (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    702                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_UPT_ACK              [i]));
    703               }
    704 
    705             for (uint32_t i=0; i<_param->_nb_context; i++)
    706               {
    707                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_VAL                         [i]));
    708                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    709                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    710                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    718               {
    719                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
    720                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_HIT              [i]));
    721                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    722                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    723                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    724 //              (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    725                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    726                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_DIR_ACK              [i]));
    727 //              (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    728                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    729                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_RAS_ACK              [i]));
    730                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_RAS_HIT              [i]));
    731                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    732 //              (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    733                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_UPT_ACK              [i]));
    734               }
    735 
    736             if (_param->_have_port_context_id)
    737               {
    738             for (uint32_t i=0; i<_param->_nb_context; i++)
    739               {
    740                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_VAL                         [i]));
    741                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    742                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    743                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    751               {
    752                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ACK              [i]));
    753                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_HIT              [i]));
    754                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    755                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    756                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    757 //              (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    758                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    759                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_ACK              [i]));
    760 //              (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    761                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    762                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_ACK              [i]));
    763                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_HIT              [i]));
    764                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    765 //              (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    766                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_UPT_ACK              [i]));
    767               }
    768               }
    769 
    770             for (uint32_t i=0; i<_param->_nb_context; i++)
    771               {
    772                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_VAL                         [i]));
    773                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    774                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    775                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    783               {
    784                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_ACK              [i]));
    785                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_HIT              [i]));
    786                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    787                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    788                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    789 //              (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    790                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    791                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_DIR_ACK              [i]));
    792 //              (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    793                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    794                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_RAS_ACK              [i]));
    795                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_RAS_HIT              [i]));
    796                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    797 //              (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    798                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_UPT_ACK              [i]));
    799               }
    800 
    801             for (uint32_t i=0; i<_param->_nb_context; i++)
    802               {
    803                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_VAL                         [i]));
    804                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    805                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    806                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    814               {
    815                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_ACK              [i]));
    816                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_HIT              [i]));
    817                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    818                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    819                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    820 //              (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    821                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    822                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_DIR_ACK              [i]));
    823 //              (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    824                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    825                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_RAS_ACK              [i]));
    826                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_RAS_HIT              [i]));
    827                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    828 //              (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    829                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_UPT_ACK              [i]));
    830               }
    831 
    832             for (uint32_t i=0; i<_param->_nb_context; i++)
    833               {
    834                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_VAL                         [i]));
    835                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    836                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    837                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    845               {
    846                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_ACK              [i]));
    847                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_HIT              [i]));
    848                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    849                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    850                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    851 //              (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    852                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    853                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_DIR_ACK              [i]));
    854 //              (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    855                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    856                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_RAS_ACK              [i]));
    857                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_RAS_HIT              [i]));
    858                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    859 //              (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    860                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_UPT_ACK              [i]));
    861               }
    862 
    863             for (uint32_t i=0; i<_param->_nb_context; i++)
    864               {
    865                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_VAL                         [i]));
    866                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    867                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    868                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    876               {
    877                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_ACK              [i]));
    878                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_HIT              [i]));
    879                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    880                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    881                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    882 //              (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    883                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    884                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_DIR_ACK              [i]));
    885 //              (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    886                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    887                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_RAS_ACK              [i]));
    888                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_RAS_HIT              [i]));
    889                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    890 //              (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    891                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_UPT_ACK              [i]));
    892               }
    893 
    894             for (uint32_t i=0; i<_param->_nb_context; i++)
    895               {
    896                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_VAL                         [i]));
    897                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    898                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    899                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    907               {
    908                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_ACK              [i]));
    909                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_HIT              [i]));
    910                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    911                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    912                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    913 //              (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    914                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    915                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_DIR_ACK              [i]));
    916 //              (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    917                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    918                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_RAS_ACK              [i]));
    919                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_RAS_HIT              [i]));
    920                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    921 //              (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    922                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_UPT_ACK              [i]));
    923               }
    924 
    925 //          for (uint32_t i=0; i<_param->_nb_context; i++)
    926 //            {
    927 //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_VAL                         [i]));
    928 //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    929 //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    930 //              (*(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]));
    936 //            }
    937 //          for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    938 //            {
    939 //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_ACK              [i]));
    940 //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_HIT              [i]));
    941 //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    942 //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    943 //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    944 // //           (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    945 //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    946 //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_DIR_ACK              [i]));
    947 // //           (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    948 //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    949 //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_RAS_ACK              [i]));
    950 //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_RAS_HIT              [i]));
    951 //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    952 // //           (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    953 //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_UPT_ACK              [i]));
    954 //            }
    955 
    956             for (uint32_t i=0; i<_param->_nb_context; i++)
    957               {
    958                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_VAL                         [i]));
    959                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    960                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    961                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [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++)
    969               {
    970                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_ACK              [i]));
    971                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_HIT              [i]));
    972                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    973                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    974                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    975 //              (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    976                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    977                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_DIR_ACK              [i]));
    978 //              (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    979                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    980                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_RAS_ACK              [i]));
    981                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_RAS_HIT              [i]));
    982                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    983 //              (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    984                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_UPT_ACK              [i]));
    985               }
    986 
    987 //          for (uint32_t i=0; i<_param->_nb_context; i++)
    988 //            {
    989 //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_VAL                         [i]));
    990 //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
    991 //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
    992 //              (*(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]));
    998 //            }
    999 //          for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    1000 //            {
    1001 //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_ACK              [i]));
    1002 //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_HIT              [i]));
    1003 //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
    1004 //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
    1005 //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
    1006 // //           (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
    1007 //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
    1008 //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_DIR_ACK              [i]));
    1009 // //           (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
    1010 //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
    1011 //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_RAS_ACK              [i]));
    1012 //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_RAS_HIT              [i]));
    1013 //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
    1014 // //           (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_RAS_INDEX            [i]));
    1015 //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_UPT_ACK              [i]));
    1016 //            }
    1017           }
     132        // List dependency information
     133//         for (uint32_t x=0; x<_param->_nb_context; x++)
     134//           {
     135// //          if (_param->_have_port_depth)
     136// //            {
     137// //              (*(out_DEPTH_TAIL                          [x])) (*( in_DEPTH_UPT_TAIL                      [x]));
     138// //            }
     139// //              (*(out_DEPTH_NB_BRANCH                     [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [x]));
     140
     141//             for (uint32_t i=0; i<_param->_nb_context; i++)
     142//               {
     143//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_VAL                         [i]));
     144//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     145//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     146//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     147// //                 if (_param->_have_port_depth and _param->_have_port_depth)
     148// //                   {
     149// //                 (*(out_PREDICT_ACK                         [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     150// //                   }
     151// //                 (*(out_PREDICT_ACK                         [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     152//               }
     153//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     154//               {
     155//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_ACK              [i]));
     156//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_HIT              [i]));
     157//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     158//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     159//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     160// //              (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     161//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     162//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_DIR_ACK              [i]));
     163// //              (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     164//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     165//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_RAS_ACK              [i]));
     166//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_RAS_HIT              [i]));
     167//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     168// //              (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     169//                 (*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_UPT_ACK              [i]));
     170//               }
     171
     172//             for (uint32_t i=0; i<_param->_nb_context; i++)
     173//               {
     174//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_VAL                         [i]));
     175//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     176//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     177//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     178// //                 if (_param->_have_port_depth and _param->_have_port_depth)
     179// //                   {
     180// //                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     181// //                   }
     182// //                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     183//               }
     184//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     185//               {
     186//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_ACK              [i]));
     187//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_HIT              [i]));
     188//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     189//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     190//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     191// //              (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     192//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     193//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_DIR_ACK              [i]));
     194// //              (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     195//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     196//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_RAS_ACK              [i]));
     197//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_RAS_HIT              [i]));
     198//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     199// //              (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     200//                 (*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_UPT_ACK              [i]));
     201//               }
     202
     203//             for (uint32_t i=0; i<_param->_nb_context; i++)
     204//               {
     205//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_VAL                         [i]));
     206//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     207//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     208//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     209// //                 if (_param->_have_port_depth and _param->_have_port_depth)
     210// //                   {
     211// //                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     212// //                   }
     213// //                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     214//               }
     215//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     216//               {
     217//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_ACK              [i]));
     218//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_HIT              [i]));
     219//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     220//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     221//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     222// //              (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     223//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     224//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_DIR_ACK              [i]));
     225// //              (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     226//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     227//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_RAS_ACK              [i]));
     228//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_RAS_HIT              [i]));
     229//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     230// //              (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     231//                 (*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_UPT_ACK              [i]));
     232//               }
     233
     234//             if (_param->_have_port_inst_ifetch_ptr)
     235//               {
     236//             for (uint32_t i=0; i<_param->_nb_context; i++)
     237//               {
     238//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_VAL                         [i]));
     239//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     240//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     241//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     242// //                 if (_param->_have_port_depth and _param->_have_port_depth)
     243// //                   {
     244// //                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     245// //                   }
     246// //                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     247//               }
     248//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     249//               {
     250//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_ACK              [i]));
     251//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_HIT              [i]));
     252//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     253//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     254//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     255// //              (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     256//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     257//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_DIR_ACK              [i]));
     258// //              (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     259//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     260//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_RAS_ACK              [i]));
     261//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_RAS_HIT              [i]));
     262//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     263// //              (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     264//                 (*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_UPT_ACK              [i]));
     265//               }
     266//               }
     267
     268//             for (uint32_t i=0; i<_param->_nb_context; i++)
     269//               {
     270//                 (*(out_PREDICT_BRANCH_STATE                [x]))(*( in_PREDICT_VAL                         [i]));
     271//                 (*(out_PREDICT_BRANCH_STATE                [x]))(*( in_PREDICT_PC_PREVIOUS                 [i]));
     272//                 (*(out_PREDICT_BRANCH_STATE                [x]))(*( in_PREDICT_PC_CURRENT                  [i]));
     273//                 (*(out_PREDICT_BRANCH_STATE                [x]))(*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     274// //                 if (_param->_have_port_depth and _param->_have_port_depth)
     275// //                   {
     276// //                 (*(out_PREDICT_BRANCH_STATE                [x]))(*( in_DEPTH_UPT_TAIL                      [i]));
     277// //                   }
     278// //                 (*(out_PREDICT_BRANCH_STATE                [x]))(*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     279//               }
     280//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     281//               {
     282//                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_ACK              [i]));
     283//                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_HIT              [i]));
     284//                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     285//                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     286//                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     287// //              (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     288//                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     289//                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_DIR_ACK              [i]));
     290// //              (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     291//                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     292//                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_RAS_ACK              [i]));
     293//                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_RAS_HIT              [i]));
     294//                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     295// //              (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     296//                 (*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_UPT_ACK              [i]));
     297//               }
     298
     299// //          if (_param->_have_port_depth)
     300// //            {
     301// //          for (uint32_t i=0; i<_param->_nb_context; i++)
     302// //            {
     303// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_VAL                         [i]));
     304// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     305// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     306// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     307// //              if (_param->_have_port_depth)
     308// //                {
     309// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     310// //                }
     311// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     312// //            }
     313// //          for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     314// //            {
     315// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_ACK              [i]));
     316// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_HIT              [i]));
     317// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     318// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     319// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     320// ////            (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     321// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     322// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_DIR_ACK              [i]));
     323// ////            (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     324// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     325// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_RAS_ACK              [i]));
     326// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_RAS_HIT              [i]));
     327// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     328// ////            (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     329// //              (*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_UPT_ACK              [i]));
     330// //            }
     331// //            }
     332
     333//             for (uint32_t y=0; y<_param->_nb_instruction[x]; y++)
     334//               {
     335//                 for (uint32_t i=0; i<_param->_nb_context; i++)
     336//                   {
     337//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_VAL                         [i]));
     338//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     339//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_PC_CURRENT                  [i]));
     340//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     341// //                     if (_param->_have_port_depth and _param->_have_port_depth)
     342// //                       {
     343// //                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_DEPTH_UPT_TAIL                      [i]));
     344// //                       }
     345// //                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     346//                   }
     347//                 for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     348//                   {
     349//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_ACK              [i]));
     350//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_HIT              [i]));
     351//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     352//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     353//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_CONDITION        [i]));
     354// //                  (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     355//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     356//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_DIR_ACK              [i]));
     357// //                  (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_DIR_HISTORY          [i]));
     358//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     359//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_RAS_ACK              [i]));
     360//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_RAS_HIT              [i]));
     361//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     362// //                  (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_RAS_INDEX            [i]));
     363//                     (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_UPT_ACK              [i]));
     364//                   }
     365//               }
     366//           }
     367
     368//         for (uint32_t x=0; x<_param->_nb_inst_branch_predict; x++)
     369//           {
     370//             for (uint32_t i=0; i<_param->_nb_context; i++)
     371//               {
     372//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_VAL                         [i]));
     373//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     374//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     375//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     376// //                 if (_param->_have_port_depth and _param->_have_port_depth)
     377// //                   {
     378// //                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     379// //                   }
     380// //                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     381//               }
     382//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     383//               {
     384//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
     385//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_HIT              [i]));
     386//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     387//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     388//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     389// //              (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     390//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     391//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_DIR_ACK              [i]));
     392// //              (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     393//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     394//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_RAS_ACK              [i]));
     395//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_RAS_HIT              [i]));
     396//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     397// //              (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     398//                 (*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_UPT_ACK              [i]));
     399//               }
     400
     401//             if (_param->_have_port_context_id)
     402//               {
     403//             for (uint32_t i=0; i<_param->_nb_context; i++)
     404//               {
     405//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_VAL                         [i]));
     406//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     407//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     408//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     409// //                 if (_param->_have_port_depth and _param->_have_port_depth)
     410// //                   {
     411// //                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     412// //                   }
     413// //                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     414//               }
     415//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     416//               {
     417//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ACK              [i]));
     418//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_HIT              [i]));
     419//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     420//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     421//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     422// //              (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     423//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     424//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_ACK              [i]));
     425// //              (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     426//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     427//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_ACK              [i]));
     428//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_HIT              [i]));
     429//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     430// //              (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     431//                 (*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_UPT_ACK              [i]));
     432//               }
     433//               }
     434
     435//             for (uint32_t i=0; i<_param->_nb_context; i++)
     436//               {
     437//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_VAL                         [i]));
     438//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     439//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     440//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     441// //                 if (_param->_have_port_depth and _param->_have_port_depth)
     442// //                   {
     443// //                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     444// //                   }
     445// //                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     446//               }
     447//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     448//               {
     449//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_ACK              [i]));
     450//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_HIT              [i]));
     451//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     452//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     453//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     454// //              (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     455//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     456//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_DIR_ACK              [i]));
     457// //              (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     458//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     459//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_RAS_ACK              [i]));
     460//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_RAS_HIT              [i]));
     461//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     462// //              (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     463//                 (*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_UPT_ACK              [i]));
     464//               }
     465
     466//             for (uint32_t i=0; i<_param->_nb_context; i++)
     467//               {
     468//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_VAL                         [i]));
     469//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     470//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     471//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     472// //                 if (_param->_have_port_depth and _param->_have_port_depth)
     473// //                   {
     474// //                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     475// //                   }
     476// //                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     477//               }
     478//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     479//               {
     480//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
     481//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_HIT              [i]));
     482//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     483//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     484//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     485// //              (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     486//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     487//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_DIR_ACK              [i]));
     488// //              (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     489//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     490//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_RAS_ACK              [i]));
     491//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_RAS_HIT              [i]));
     492//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     493// //              (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     494//                 (*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_UPT_ACK              [i]));
     495//               }
     496
     497//             for (uint32_t i=0; i<_param->_nb_context; i++)
     498//               {
     499//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_VAL                         [i]));
     500//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     501//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     502//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     503// //                 if (_param->_have_port_depth and _param->_have_port_depth)
     504// //                   {
     505// //                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     506// //                   }
     507// //                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     508//               }
     509//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     510//               {
     511//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_ACK              [i]));
     512//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_HIT              [i]));
     513//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     514//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     515//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     516// //              (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     517//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     518//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_DIR_ACK              [i]));
     519// //              (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     520//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     521//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_RAS_ACK              [i]));
     522//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_RAS_HIT              [i]));
     523//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     524// //              (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     525//                 (*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_UPT_ACK              [i]));
     526//               }
     527
     528//             for (uint32_t i=0; i<_param->_nb_context; i++)
     529//               {
     530//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_VAL                         [i]));
     531//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     532//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     533//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     534// //                 if (_param->_have_port_depth and _param->_have_port_depth)
     535// //                   {
     536// //                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     537// //                   }
     538// //                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     539//               }
     540//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     541//               {
     542//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_ACK              [i]));
     543//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_HIT              [i]));
     544//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     545//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     546//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     547// //              (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     548//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     549//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_DIR_ACK              [i]));
     550// //              (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     551//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     552//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_RAS_ACK              [i]));
     553//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_RAS_HIT              [i]));
     554//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     555// //              (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     556//                 (*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_UPT_ACK              [i]));
     557//               }
     558
     559// //          for (uint32_t i=0; i<_param->_nb_context; i++)
     560// //            {
     561// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_VAL                         [i]));
     562// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     563// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     564// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     565// //              if (_param->_have_port_depth and _param->_have_port_depth)
     566// //                {
     567// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     568// //                }
     569// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     570// //            }
     571// //          for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     572// //            {
     573// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_ACK              [i]));
     574// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_HIT              [i]));
     575// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     576// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     577// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     578// // //           (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     579// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     580// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_DIR_ACK              [i]));
     581// // //           (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     582// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     583// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_RAS_ACK              [i]));
     584// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_RAS_HIT              [i]));
     585// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     586// // //           (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     587// //              (*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_UPT_ACK              [i]));
     588// //            }
     589
     590//             for (uint32_t i=0; i<_param->_nb_context; i++)
     591//               {
     592//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_VAL                         [i]));
     593//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     594//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     595//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     596// //                 if (_param->_have_port_depth and _param->_have_port_depth)
     597// //                   {
     598// //                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     599// //                   }
     600// //                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     601//               }
     602//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     603//               {
     604//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
     605//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_HIT              [i]));
     606//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     607//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     608//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     609// //              (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     610//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     611//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_DIR_ACK              [i]));
     612// //              (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     613//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     614//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_RAS_ACK              [i]));
     615//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_RAS_HIT              [i]));
     616//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     617// //              (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     618//                 (*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_UPT_ACK              [i]));
     619//               }
     620
     621//             if (_param->_have_port_context_id)
     622//               {
     623//             for (uint32_t i=0; i<_param->_nb_context; i++)
     624//               {
     625//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_VAL                         [i]));
     626//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     627//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     628//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     629//                 if (_param->_have_port_depth and _param->_have_port_depth)
     630//                   {
     631//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     632//                   }
     633//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     634//               }
     635//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     636//               {
     637//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ACK              [i]));
     638//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_HIT              [i]));
     639//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     640//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     641//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     642// //              (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     643//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     644//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_ACK              [i]));
     645// //              (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     646//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     647//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_ACK              [i]));
     648//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_HIT              [i]));
     649//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     650// //              (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     651//                 (*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_UPT_ACK              [i]));
     652//               }
     653//               }
     654
     655//             for (uint32_t i=0; i<_param->_nb_context; i++)
     656//               {
     657//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_VAL                         [i]));
     658//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     659//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     660//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     661//                 if (_param->_have_port_depth and _param->_have_port_depth)
     662//                   {
     663//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     664//                   }
     665//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     666//               }
     667//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     668//               {
     669//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_ACK              [i]));
     670//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_HIT              [i]));
     671//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     672//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     673//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     674// //              (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     675//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     676//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_DIR_ACK              [i]));
     677// //              (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     678//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     679//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_RAS_ACK              [i]));
     680//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_RAS_HIT              [i]));
     681//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     682// //              (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     683//                 (*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_UPT_ACK              [i]));
     684//               }
     685
     686//             for (uint32_t i=0; i<_param->_nb_context; i++)
     687//               {
     688//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_VAL                         [i]));
     689//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     690//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     691//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     692//                 if (_param->_have_port_depth and _param->_have_port_depth)
     693//                   {
     694//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     695//                   }
     696//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     697//               }
     698//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     699//               {
     700//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_ACK              [i]));
     701//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_HIT              [i]));
     702//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     703//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     704//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     705// //              (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     706//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     707//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_DIR_ACK              [i]));
     708// //              (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     709//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     710//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_RAS_ACK              [i]));
     711//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_RAS_HIT              [i]));
     712//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     713// //              (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     714//                 (*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_UPT_ACK              [i]));
     715//               }
     716
     717//             for (uint32_t i=0; i<_param->_nb_context; i++)
     718//               {
     719//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_VAL                         [i]));
     720//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     721//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     722//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     723//                 if (_param->_have_port_depth and _param->_have_port_depth)
     724//                   {
     725//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     726//                   }
     727//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     728//               }
     729//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     730//               {
     731//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
     732//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_HIT              [i]));
     733//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     734//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     735//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     736// //              (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     737//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     738//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_DIR_ACK              [i]));
     739// //              (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     740//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     741//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_RAS_ACK              [i]));
     742//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_RAS_HIT              [i]));
     743//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     744// //              (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     745//                 (*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_UPT_ACK              [i]));
     746//               }
     747
     748//             if (_param->_have_port_context_id)
     749//               {
     750//             for (uint32_t i=0; i<_param->_nb_context; i++)
     751//               {
     752//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_VAL                         [i]));
     753//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     754//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     755//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     756//                 if (_param->_have_port_depth and _param->_have_port_depth)
     757//                   {
     758//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     759//                   }
     760//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     761//               }
     762//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     763//               {
     764//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ACK              [i]));
     765//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_HIT              [i]));
     766//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     767//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     768//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     769// //              (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     770//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     771//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_ACK              [i]));
     772// //              (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     773//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     774//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_ACK              [i]));
     775//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_HIT              [i]));
     776//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     777// //              (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     778//                 (*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_UPT_ACK              [i]));
     779//               }
     780//               }
     781
     782//             for (uint32_t i=0; i<_param->_nb_context; i++)
     783//               {
     784//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_VAL                         [i]));
     785//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     786//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     787//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     788//                 if (_param->_have_port_depth and _param->_have_port_depth)
     789//                   {
     790//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     791//                   }
     792//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     793//               }
     794//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     795//               {
     796//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_ACK              [i]));
     797//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_HIT              [i]));
     798//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     799//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     800//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     801// //              (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     802//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     803//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_DIR_ACK              [i]));
     804// //              (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     805//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     806//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_RAS_ACK              [i]));
     807//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_RAS_HIT              [i]));
     808//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     809// //              (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     810//                 (*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_UPT_ACK              [i]));
     811//               }
     812
     813//             for (uint32_t i=0; i<_param->_nb_context; i++)
     814//               {
     815//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_VAL                         [i]));
     816//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     817//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     818//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     819//                 if (_param->_have_port_depth and _param->_have_port_depth)
     820//                   {
     821//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     822//                   }
     823//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     824//               }
     825//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     826//               {
     827//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_ACK              [i]));
     828//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_HIT              [i]));
     829//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     830//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     831//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     832// //              (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     833//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     834//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_DIR_ACK              [i]));
     835// //              (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     836//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     837//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_RAS_ACK              [i]));
     838//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_RAS_HIT              [i]));
     839//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     840// //              (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     841//                 (*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_UPT_ACK              [i]));
     842//               }
     843
     844//             for (uint32_t i=0; i<_param->_nb_context; i++)
     845//               {
     846//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_VAL                         [i]));
     847//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     848//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     849//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     850//                 if (_param->_have_port_depth and _param->_have_port_depth)
     851//                   {
     852//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     853//                   }
     854//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     855//               }
     856//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     857//               {
     858//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_ACK              [i]));
     859//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_HIT              [i]));
     860//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     861//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     862//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     863// //              (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     864//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     865//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_DIR_ACK              [i]));
     866// //              (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     867//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     868//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_RAS_ACK              [i]));
     869//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_RAS_HIT              [i]));
     870//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     871// //              (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     872//                 (*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_UPT_ACK              [i]));
     873//               }
     874
     875//             for (uint32_t i=0; i<_param->_nb_context; i++)
     876//               {
     877//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_VAL                         [i]));
     878//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     879//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     880//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     881//                 if (_param->_have_port_depth and _param->_have_port_depth)
     882//                   {
     883//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     884//                   }
     885//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     886//               }
     887//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     888//               {
     889//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_ACK              [i]));
     890//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_HIT              [i]));
     891//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     892//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     893//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     894// //              (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     895//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     896//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_DIR_ACK              [i]));
     897// //              (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     898//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     899//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_RAS_ACK              [i]));
     900//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_RAS_HIT              [i]));
     901//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     902// //              (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     903//                 (*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_UPT_ACK              [i]));
     904//               }
     905
     906//             for (uint32_t i=0; i<_param->_nb_context; i++)
     907//               {
     908//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_VAL                         [i]));
     909//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     910//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     911//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     912//                 if (_param->_have_port_depth and _param->_have_port_depth)
     913//                   {
     914//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     915//                   }
     916//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     917//               }
     918//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     919//               {
     920//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_ACK              [i]));
     921//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_HIT              [i]));
     922//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     923//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     924//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     925// //              (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     926//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     927//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_DIR_ACK              [i]));
     928// //              (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     929//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     930//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_RAS_ACK              [i]));
     931//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_RAS_HIT              [i]));
     932//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     933// //              (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     934//                 (*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_UPT_ACK              [i]));
     935//               }
     936
     937// //          for (uint32_t i=0; i<_param->_nb_context; i++)
     938// //            {
     939// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_VAL                         [i]));
     940// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     941// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     942// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     943// //              if (_param->_have_port_depth and _param->_have_port_depth)
     944// //                {
     945// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     946// //                }
     947// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     948// //            }
     949// //          for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     950// //            {
     951// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_ACK              [i]));
     952// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_HIT              [i]));
     953// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     954// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     955// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     956// // //           (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     957// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     958// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_DIR_ACK              [i]));
     959// // //           (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     960// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     961// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_RAS_ACK              [i]));
     962// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_RAS_HIT              [i]));
     963// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     964// // //           (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     965// //              (*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_UPT_ACK              [i]));
     966// //            }
     967
     968//             for (uint32_t i=0; i<_param->_nb_context; i++)
     969//               {
     970//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_VAL                         [i]));
     971//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     972//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     973//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     974//                 if (_param->_have_port_depth and _param->_have_port_depth)
     975//                   {
     976//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     977//                   }
     978//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     979//               }
     980//             for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     981//               {
     982//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_ACK              [i]));
     983//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_HIT              [i]));
     984//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     985//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     986//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     987// //              (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     988//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     989//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_DIR_ACK              [i]));
     990// //              (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     991//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     992//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_RAS_ACK              [i]));
     993//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_RAS_HIT              [i]));
     994//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     995// //              (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     996//                 (*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_UPT_ACK              [i]));
     997//               }
     998
     999// //          for (uint32_t i=0; i<_param->_nb_context; i++)
     1000// //            {
     1001// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_VAL                         [i]));
     1002// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_PC_PREVIOUS                 [i]));
     1003// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
     1004// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
     1005// //              if (_param->_have_port_depth and _param->_have_port_depth)
     1006// //                {
     1007// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
     1008// //                }
     1009// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
     1010// //            }
     1011// //          for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     1012// //            {
     1013// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_ACK              [i]));
     1014// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_HIT              [i]));
     1015// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_ADDRESS_SRC      [i]));
     1016// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_ADDRESS_DEST     [i]));
     1017// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_CONDITION        [i]));
     1018// // //           (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_LAST_TAKE        [i]));
     1019// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_IS_ACCURATE      [i]));
     1020// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_DIR_ACK              [i]));
     1021// // //           (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_DIR_HISTORY          [i]));
     1022// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_DIR_DIRECTION        [i]));
     1023// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_RAS_ACK              [i]));
     1024// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_RAS_HIT              [i]));
     1025// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_RAS_ADDRESS_POP      [i]));
     1026// // //           (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_RAS_INDEX            [i]));
     1027// //              (*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_UPT_ACK              [i]));
     1028// //            }
     1029//           }
    10181030# endif   
    10191031
    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           }
     1032        log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Method - genMealy_decod");
     1033
     1034        SC_METHOD (genMealy_decod);
     1035        dont_initialize ();
     1036        sensitive << (*(in_CLOCK)).neg(); // use internal register
     1037        for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1038          for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1039            {
     1040              sensitive << (*(in_DECOD_VAL                         [i][j]))
     1041                        << (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]))
     1042                        << (*(in_DECOD_BRANCH_STATE                [i][j]))
     1043                        << (*(in_DECOD_BRANCH_CONDITION            [i][j]))
     1044                        << (*(in_DECOD_BRANCH_DIRECTION            [i][j]))
     1045                        << (*(in_DECOD_ADDRESS_SRC                 [i][j]))
     1046                        << (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1047
     1048              if (_param->_have_port_context_id)
     1049                sensitive << (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1050              if (_param->_have_port_depth)
     1051                sensitive << (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1052            }
     1053        for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1054          {
     1055            sensitive << (*(in_DECOD_BTB_ACK                     [i]   ))
     1056                      << (*(in_DECOD_RAS_ACK                     [i]   ))
     1057                      << (*(in_DECOD_RAS_HIT                     [i]   )) 
     1058                      << (*(in_DECOD_RAS_ADDRESS_POP             [i]   ))
     1059//                    << (*(in_DECOD_RAS_INDEX                   [i]   ))
     1060                      << (*(in_DECOD_UPT_ACK                     [i]   )) ;
     1061          }
    10501062
    10511063# ifdef SYSTEMCASS_SPECIFIC
    1052         // List dependency information
    1053        
    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           }
     1064//         // List dependency information
     1065       
     1066//         for (uint32_t x=0; x<_param->_nb_decod_unit; x++)
     1067//           for (uint32_t y=0; y<_param->_nb_inst_decod[x]; y++)
     1068//             {
     1069//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1070//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1071//                   {
     1072//                     (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_VAL                         [i][j]));
     1073//                     if (_param->_have_port_context_id)
     1074//                     (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1075//                     (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1076//                     (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1077//                     if (_param->_have_port_depth)
     1078//                     (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1079//                     (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1080//                     (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1081//                     (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1082//                     (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1083//                   }
     1084//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1085//                 {
     1086//                     (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1087//                     (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1088//                     (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1089//                     (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1090// //                  (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1091//                     (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1092//                 }
     1093//             }
     1094
     1095//         for (uint32_t x=0; x<_param->_nb_inst_branch_decod; x++)
     1096//           {
     1097//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1098//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1099//                   {
     1100//                     (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_VAL                         [i][j]));
     1101//                     if (_param->_have_port_context_id)
     1102//                     (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1103//                     (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1104//                     (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1105//                     if (_param->_have_port_depth)
     1106//                     (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1107//                     (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1108//                     (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1109//                     (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1110//                     (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1111//                   }
     1112//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1113//                 {
     1114//                     (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1115//                     (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1116//                     (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1117//                     (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1118// //                  (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1119//                     (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1120//                   }
     1121
     1122//               if (_param->_have_port_context_id)
     1123//                 {
     1124//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1125//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1126//                   {
     1127//                     (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_VAL                         [i][j]));
     1128//                     (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1129//                     (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1130//                     (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1131//                     if (_param->_have_port_depth)
     1132//                     (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1133//                     (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1134//                     (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1135//                     (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1136//                     (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1137//                   }
     1138//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1139//                 {
     1140//                     (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1141//                     (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1142//                     (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1143//                     (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1144// //                  (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1145//                     (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1146//                 }
     1147//                 }
     1148
     1149//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1150//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1151//                   {
     1152//                     (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_VAL                         [i][j]));
     1153//                     if (_param->_have_port_context_id)
     1154//                     (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1155//                     (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1156//                     (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1157//                     if (_param->_have_port_depth)
     1158//                     (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1159//                     (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1160//                     (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1161//                     (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1162//                     (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1163//                   }
     1164//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1165//                 {
     1166//                     (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1167//                     (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1168//                     (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1169//                     (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1170// //                  (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1171//                     (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1172//                   }
     1173
     1174//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1175//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1176//                   {
     1177//                     (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_VAL                         [i][j]));
     1178//                     if (_param->_have_port_context_id)
     1179//                     (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1180//                     (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1181//                     (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1182//                     if (_param->_have_port_depth)
     1183//                     (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1184//                     (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1185//                     (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1186//                     (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1187//                     (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1188//                   }
     1189//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1190//                 {
     1191//                     (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1192//                     (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1193//                     (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1194//                     (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1195// //                  (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1196//                     (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1197//                   }
     1198
     1199//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1200//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1201//                   {
     1202//                     (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_VAL                         [i][j]));
     1203//                     if (_param->_have_port_context_id)
     1204//                     (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1205//                     (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1206//                     (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1207//                     if (_param->_have_port_depth)
     1208//                     (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1209//                     (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1210//                     (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1211//                     (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1212//                     (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1213//                   }
     1214//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1215//                 {
     1216//                     (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1217//                     (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1218//                     (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1219//                     (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1220// //                  (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1221//                     (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1222//                   }
     1223
     1224//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1225//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1226//                   {
     1227//                     (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_VAL                         [i][j]));
     1228//                     if (_param->_have_port_context_id)
     1229//                     (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1230//                     (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1231//                     (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1232//                     if (_param->_have_port_depth)
     1233//                     (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1234//                     (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1235//                     (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1236//                     (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1237//                     (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1238//                   }
     1239//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1240//                 {
     1241//                     (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1242//                     (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1243//                     (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1244//                     (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1245// //                  (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1246//                     (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1247//                   }
     1248
     1249//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1250//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1251//                   {
     1252//                     (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_VAL                         [i][j]));
     1253//                     if (_param->_have_port_context_id)
     1254//                     (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1255//                     (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1256//                     (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1257//                     if (_param->_have_port_depth)
     1258//                     (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1259//                     (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1260//                     (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1261//                     (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1262//                     (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1263//                   }
     1264//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1265//                 {
     1266//                     (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1267//                     (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1268//                     (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1269//                     (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1270// //                  (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1271//                     (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1272//                   }
     1273
     1274//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1275//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1276//                   {
     1277//                     (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_VAL                         [i][j]));
     1278//                     if (_param->_have_port_context_id)
     1279//                     (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1280//                     (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1281//                     (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1282//                     if (_param->_have_port_depth)
     1283//                     (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1284//                     (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1285//                     (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1286//                     (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1287//                     (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1288//                   }
     1289//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1290//                 {
     1291//                     (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1292//                     (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1293//                     (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1294//                     (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1295// //                  (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1296//                     (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1297//                   }
     1298
     1299//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1300//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1301//                   {
     1302//                     (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_VAL                         [i][j]));
     1303//                     if (_param->_have_port_context_id)
     1304//                     (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1305//                     (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1306//                     (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1307//                     if (_param->_have_port_depth)
     1308//                     (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1309//                     (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1310//                     (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1311//                     (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1312//                     (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1313//                   }
     1314//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1315//                 {
     1316//                     (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1317//                     (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1318//                     (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1319//                     (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1320// //                  (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1321//                     (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1322//                   }
     1323
     1324//               if (_param->_have_port_context_id)
     1325//                 {   
     1326//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1327//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1328//                   {
     1329//                     (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_VAL                         [i][j]));
     1330//                     (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1331//                     (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1332//                     (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1333//                     if (_param->_have_port_depth)
     1334//                     (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1335//                     (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1336//                     (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1337//                     (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1338//                     (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1339//                   }
     1340//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1341//                 {
     1342//                     (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1343//                     (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1344//                     (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1345//                     (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1346// //                  (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1347//                     (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1348//                   }
     1349//                 }
     1350
     1351//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1352//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1353//                   {
     1354//                     (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_VAL                         [i][j]));
     1355//                     if (_param->_have_port_context_id)
     1356//                     (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1357//                     (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1358//                     (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1359//                     if (_param->_have_port_depth)
     1360//                     (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1361//                     (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1362//                     (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1363//                     (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1364//                     (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1365//                   }
     1366//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1367//                 {
     1368//                     (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1369//                     (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1370//                     (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1371//                     (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1372// //                  (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1373//                     (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1374//                   }
     1375
     1376//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1377//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1378//                   {
     1379//                     (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_VAL                         [i][j]));
     1380//                     if (_param->_have_port_context_id)
     1381//                     (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1382//                     (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1383//                     (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1384//                     if (_param->_have_port_depth)
     1385//                     (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1386//                     (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1387//                     (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1388//                     (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1389//                     (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1390//                   }
     1391//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1392//                 {
     1393//                     (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1394//                     (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1395//                     (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1396//                     (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1397// //                  (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1398//                     (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1399//                   }
     1400
     1401//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1402//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1403//                   {
     1404//                     (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_VAL                         [i][j]));
     1405//                     if (_param->_have_port_context_id)
     1406//                     (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1407//                     (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1408//                     (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1409//                     if (_param->_have_port_depth)
     1410//                     (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1411//                     (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1412//                     (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1413//                     (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1414//                     (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1415//                   }
     1416//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1417//                 {
     1418//                     (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1419//                     (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1420//                     (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1421//                     (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1422// //                  (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1423//                     (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1424//                   }
     1425
     1426//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1427//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1428//                   {
     1429//                     (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_VAL                         [i][j]));
     1430//                     if (_param->_have_port_context_id)
     1431//                     (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1432//                     (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1433//                     (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1434//                     if (_param->_have_port_depth)
     1435//                     (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1436//                     (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1437//                     (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1438//                     (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1439//                     (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1440//                   }
     1441//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1442//                 {
     1443//                     (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1444//                     (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1445//                     (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1446//                     (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1447// //                  (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1448//                     (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1449//                   }
     1450
     1451//               if (_param->_have_port_context_id)
     1452//                 {
     1453//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1454//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1455//                   {
     1456//                     (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_VAL                         [i][j]));
     1457//                     (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1458//                     (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1459//                     (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1460//                     if (_param->_have_port_depth)
     1461//                     (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1462//                     (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1463//                     (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1464//                     (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1465//                     (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1466//                   }
     1467//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1468//                 {
     1469//                     (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1470//                     (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1471//                     (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1472//                     (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1473// //                  (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1474//                     (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1475//                   }
     1476//                 }
     1477
     1478//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1479//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1480//                   {
     1481//                     (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_VAL                         [i][j]));
     1482//                     if (_param->_have_port_context_id)
     1483//                     (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1484//                     (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1485//                     (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1486//                     if (_param->_have_port_depth)
     1487//                     (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1488//                     (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1489//                     (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1490//                     (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1491//                     (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1492//                   }
     1493//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1494//                 {
     1495//                     (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1496//                     (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1497//                     (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1498//                     (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1499// //                  (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1500//                     (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1501//                   }
     1502
     1503//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1504//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1505//                   {
     1506//                     (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_VAL                         [i][j]));
     1507//                     if (_param->_have_port_context_id)
     1508//                     (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1509//                     (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1510//                     (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1511//                     if (_param->_have_port_depth)
     1512//                     (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1513//                     (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1514//                     (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1515//                     (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1516//                     (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1517//                   }
     1518//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1519//                 {
     1520//                     (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1521//                     (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1522//                     (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1523//                     (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1524// //                  (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1525//                     (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1526//                   }
     1527
     1528//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1529//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1530//                   {
     1531//                     (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_VAL                         [i][j]));
     1532//                     if (_param->_have_port_context_id)
     1533//                     (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1534//                     (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1535//                     (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1536//                     if (_param->_have_port_depth)
     1537//                     (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1538//                     (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1539//                     (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1540//                     (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1541//                     (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1542//                   }
     1543//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1544//                 {
     1545//                     (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1546//                     (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1547//                     (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1548//                     (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1549// //                  (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1550//                     (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1551//                   }
     1552
     1553//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1554//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1555//                   {
     1556//                     (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_VAL                         [i][j]));
     1557//                     if (_param->_have_port_context_id)
     1558//                     (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1559//                     (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1560//                     (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1561//                     if (_param->_have_port_depth)
     1562//                     (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1563//                     (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1564//                     (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1565//                     (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1566//                     (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1567//                   }
     1568//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1569//                 {
     1570//                     (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1571//                     (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1572//                     (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1573//                     (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1574// //                  (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1575//                     (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1576//                   }
     1577
     1578//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1579//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1580//                   {
     1581//                     (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_VAL                         [i][j]));
     1582//                     if (_param->_have_port_context_id)
     1583//                     (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1584//                     (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1585//                     (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1586//                     if (_param->_have_port_depth)
     1587//                     (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1588//                     (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1589//                     (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1590//                     (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1591//                     (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1592//                   }
     1593//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1594//                 {
     1595//                     (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1596//                     (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1597//                     (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1598//                     (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1599// //                  (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1600//                     (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1601//                   }
     1602
     1603// //            for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1604// //              for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1605// //                {
     1606// //                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_VAL                         [i][j]));
     1607// //                  if (_param->_have_port_context_id)
     1608// //                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1609// //                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1610// //                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1611// //                  if (_param->_have_port_depth)
     1612// //                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1613// //                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1614// //                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1615// //                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1616// //                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1617// //                }
     1618// //            for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1619// //              {
     1620// //                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1621// //                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1622// //                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1623// //                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1624// //                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1625// //                  (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1626// //                }
     1627
     1628//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1629//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1630//                   {
     1631//                     (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_VAL                         [i][j]));
     1632//                     if (_param->_have_port_context_id)
     1633//                     (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1634//                     (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1635//                     (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1636//                     if (_param->_have_port_depth)
     1637//                     (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1638//                     (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1639//                     (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1640//                     (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1641//                     (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1642//                   }
     1643//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1644//                 {
     1645//                     (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1646//                     (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1647//                     (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1648//                     (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1649// //                  (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1650//                     (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1651//                   }
     1652
     1653//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1654//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1655//                   {
     1656//                     (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_VAL                         [i][j]));
     1657//                     if (_param->_have_port_context_id)
     1658//                     (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1659//                     (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1660//                     (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1661//                     if (_param->_have_port_depth)
     1662//                     (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1663//                     (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1664//                     (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1665//                     (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1666//                     (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1667//                   }
     1668//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1669//                 {
     1670//                     (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1671//                     (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1672//                     (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1673//                     (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1674// //                  (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1675//                     (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1676//                   }
     1677
     1678//               if (_param->_have_port_depth)
     1679//                 {
     1680//               for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
     1681//                 for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     1682//                   {
     1683//                     (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_VAL                         [i][j]));
     1684//                     if (_param->_have_port_context_id)
     1685//                     (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
     1686//                     (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
     1687//                     (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
     1688//                     (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
     1689//                     (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
     1690//                     (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
     1691//                     (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
     1692//                     (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
     1693//                   }
     1694//               for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
     1695//                 {
     1696//                     (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
     1697//                     (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
     1698//                     (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
     1699//                     (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
     1700// //                  (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
     1701//                     (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
     1702//                 }
     1703//                 }
     1704//           }
    16931705# endif
    16941706
    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]));
     1707        log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Method - genMealy_update");
     1708
     1709        SC_METHOD (genMealy_update);
     1710        dont_initialize ();
     1711//      sensitive << (*(in_CLOCK)).neg(); // don't use internal register
     1712        for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
     1713          sensitive << (*(in_UPDATE_BTB_ACK           [i]))
     1714                    << (*(in_UPDATE_DIR_ACK           [i]))
     1715                    << (*(in_UPDATE_RAS_ACK           [i]))
     1716                    << (*(in_UPDATE_UPT_VAL           [i]))
     1717                    << (*(in_UPDATE_UPT_BTB_VAL       [i]))
     1718                    << (*(in_UPDATE_UPT_DIR_VAL       [i]))
     1719                    << (*(in_UPDATE_UPT_RAS_VAL       [i]));
    17081720
    17091721# 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             }
     1722//         // List dependency information
     1723//         for (uint32_t x=0; x<_param->_nb_inst_branch_update; x++)
     1724// //        for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
     1725//             {
     1726//               uint32_t i=x;
     1727
     1728//               (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_BTB_ACK           [i]));
     1729//               (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_DIR_ACK           [i]));
     1730//               (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_RAS_ACK           [i]));
     1731//               (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_UPT_VAL           [i]));
     1732//               (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_UPT_BTB_VAL       [i]));
     1733//               (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_UPT_DIR_VAL       [i]));
     1734//               (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_UPT_RAS_VAL       [i]));
     1735
     1736//               (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_BTB_ACK           [i]));
     1737//               (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_DIR_ACK           [i]));
     1738//               (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_RAS_ACK           [i]));
     1739//               (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_UPT_VAL           [i]));
     1740//               (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_UPT_BTB_VAL       [i]));
     1741//               (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_UPT_DIR_VAL       [i]));
     1742//               (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_UPT_RAS_VAL       [i]));
     1743
     1744//               (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_BTB_ACK           [i]));
     1745//               (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_DIR_ACK           [i]));
     1746//               (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_RAS_ACK           [i]));
     1747//               (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_UPT_VAL           [i]));
     1748//               (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_UPT_BTB_VAL       [i]));
     1749//               (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_UPT_DIR_VAL       [i]));
     1750//               (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_UPT_RAS_VAL       [i]));
     1751
     1752//               (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_BTB_ACK           [i]));
     1753//               (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_DIR_ACK           [i]));
     1754//               (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_RAS_ACK           [i]));
     1755//               (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_UPT_VAL           [i]));
     1756//               (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_UPT_BTB_VAL       [i]));
     1757//               (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_UPT_DIR_VAL       [i]));
     1758//               (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_UPT_RAS_VAL       [i]));
     1759//             }
    17481760# endif
    17491761#endif
     
    17611773    if (usage_is_set(_usage,USE_STATISTICS))
    17621774      {
    1763         statistics_deallocation();
     1775        statistics_deallocation();
    17641776      }
    17651777#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_allocation.cpp

    r82 r88  
    3333
    3434    Entity * entity = _component->set_entity (_name       
    35                                               ,"Prediction_unit_Glue"
     35                                              ,"Prediction_unit_Glue"
    3636#ifdef POSITION
    37                                               ,COMBINATORY
    38 #endif
    39                                               );
     37                                              ,COMBINATORY
     38#endif
     39                                              );
    4040
    4141    _interfaces = entity->set_interfaces();
     
    4545      Interface * interface = _interfaces->set_interface(""
    4646#ifdef POSITION
    47                                                         ,IN
    48                                                         ,SOUTH,
    49                                                         "Generalist interface"
    50 #endif
    51                                                         );
     47                                                        ,IN
     48                                                        ,SOUTH,
     49                                                        "Generalist interface"
     50#endif
     51                                                        );
    5252     
    5353      in_CLOCK        = interface->set_signal_clk              ("clock" ,1, CLOCK_VHDL_YES);
     
    5858    {
    5959      {
    60         ALLOC1_INTERFACE("predict",IN,SOUTH,"Interface with ifetch unit",_param->_nb_context);
    61        
    62         ALLOC1_VALACK_IN ( in_PREDICT_VAL                        ,VAL);
    63         ALLOC1_VALACK_OUT(out_PREDICT_ACK                        ,ACK);
    64         ALLOC1_SIGNAL_IN ( in_PREDICT_PC_PREVIOUS                ,"pc_previous"                ,Taddress_t         ,_param->_size_address);
    65         ALLOC1_SIGNAL_IN ( in_PREDICT_PC_CURRENT                 ,"pc_current"                 ,Taddress_t         ,_param->_size_address);
    66         ALLOC1_SIGNAL_IN ( in_PREDICT_PC_CURRENT_IS_DS_TAKE      ,"pc_current_is_ds_take"      ,Tcontrol_t         ,1);
    67         ALLOC1_SIGNAL_OUT(out_PREDICT_PC_NEXT                    ,"pc_next"                    ,Taddress_t         ,_param->_size_address);
    68         ALLOC1_SIGNAL_OUT(out_PREDICT_PC_NEXT_IS_DS_TAKE         ,"pc_next_is_ds_take"         ,Tcontrol_t         ,1);
    69         ALLOC1_SIGNAL_OUT(out_PREDICT_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t ,_param->_size_inst_ifetch_ptr [alloc_signal_it1]);
    70         ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state);
    71         ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth [alloc_signal_it1]);
    72       }
    73       {
    74         ALLOC2_INTERFACE("predict",IN,SOUTH,"Interface with ifetch unit",_param->_nb_context,_param->_nb_instruction[alloc_interface_it1]);
    75         _ALLOC2_SIGNAL_OUT(out_PREDICT_INSTRUCTION_ENABLE         ,"instruction_enable"         ,Tcontrol_t         ,1,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
    76       }
    77      
    78       {
    79         ALLOC1_INTERFACE("predict_btb",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
    80        
    81         ALLOC1_VALACK_OUT(out_PREDICT_BTB_VAL         ,VAL);
    82         ALLOC1_VALACK_IN ( in_PREDICT_BTB_ACK         ,ACK);
    83         ALLOC1_SIGNAL_OUT(out_PREDICT_BTB_CONTEXT_ID  ,"context_id"  ,Tcontext_t         ,_param->_size_context_id);
    84         ALLOC1_SIGNAL_OUT(out_PREDICT_BTB_ADDRESS     ,"address"     ,Taddress_t         ,_param->_size_address);
    85         ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_HIT         ,"hit"         ,Tcontrol_t         ,1);
    86         ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_ADDRESS_SRC ,"address_src" ,Taddress_t         ,_param->_size_address);
    87         ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_ADDRESS_DEST,"address_dest",Taddress_t         ,_param->_size_address);
    88         ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_CONDITION   ,"condition"   ,Tbranch_condition_t,_param->_size_branch_condition);
     60        ALLOC1_INTERFACE("predict",IN,SOUTH,"Interface with ifetch unit",_param->_nb_context);
     61       
     62        ALLOC1_VALACK_IN ( in_PREDICT_VAL                        ,VAL);
     63        ALLOC1_VALACK_OUT(out_PREDICT_ACK                        ,ACK);
     64        ALLOC1_SIGNAL_IN ( in_PREDICT_PC_PREVIOUS                ,"pc_previous"                ,Taddress_t         ,_param->_size_instruction_address);
     65        ALLOC1_SIGNAL_IN ( in_PREDICT_PC_CURRENT                 ,"pc_current"                 ,Taddress_t         ,_param->_size_instruction_address);
     66        ALLOC1_SIGNAL_IN ( in_PREDICT_PC_CURRENT_IS_DS_TAKE      ,"pc_current_is_ds_take"      ,Tcontrol_t         ,1);
     67        ALLOC1_SIGNAL_OUT(out_PREDICT_PC_NEXT                    ,"pc_next"                    ,Taddress_t         ,_param->_size_instruction_address);
     68        ALLOC1_SIGNAL_OUT(out_PREDICT_PC_NEXT_IS_DS_TAKE         ,"pc_next_is_ds_take"         ,Tcontrol_t         ,1);
     69        ALLOC1_SIGNAL_OUT(out_PREDICT_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t ,_param->_size_inst_ifetch_ptr);
     70        ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state);
     71        ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth);
     72      }
     73      {
     74        ALLOC2_INTERFACE("predict",IN,SOUTH,"Interface with ifetch unit",_param->_nb_context,_param->_nb_instruction[it1]);
     75        _ALLOC2_SIGNAL_OUT(out_PREDICT_INSTRUCTION_ENABLE         ,"instruction_enable"         ,Tcontrol_t         ,1,_param->_nb_context,_param->_nb_instruction[it1]);
     76      }
     77     
     78      {
     79        ALLOC1_INTERFACE("predict_btb",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
     80       
     81        ALLOC1_VALACK_OUT(out_PREDICT_BTB_VAL         ,VAL);
     82        ALLOC1_VALACK_IN ( in_PREDICT_BTB_ACK         ,ACK);
     83        ALLOC1_SIGNAL_OUT(out_PREDICT_BTB_CONTEXT_ID  ,"context_id"  ,Tcontext_t         ,_param->_size_context_id);
     84        ALLOC1_SIGNAL_OUT(out_PREDICT_BTB_ADDRESS     ,"address"     ,Taddress_t         ,_param->_size_instruction_address);
     85        ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_HIT         ,"hit"         ,Tcontrol_t         ,1);
     86        ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_ADDRESS_SRC ,"address_src" ,Taddress_t         ,_param->_size_instruction_address);
     87        ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_ADDRESS_DEST,"address_dest",Taddress_t         ,_param->_size_instruction_address);
     88        ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_CONDITION   ,"condition"   ,Tbranch_condition_t,_param->_size_branch_condition);
    8989//      ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_LAST_TAKE   ,"last_take"   ,Tcontrol_t         ,1);
    90         ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_IS_ACCURATE ,"is_accurate" ,Tcontrol_t         ,1);
    91       }
    92      
    93       {
    94         ALLOC1_INTERFACE("predict_dir",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
    95        
    96         ALLOC1_VALACK_OUT(out_PREDICT_DIR_VAL        ,VAL);
    97         ALLOC1_VALACK_IN ( in_PREDICT_DIR_ACK        ,ACK);
    98         ALLOC1_SIGNAL_OUT(out_PREDICT_DIR_ADDRESS_SRC,"address_src",Taddress_t         ,_param->_size_address);
    99         ALLOC1_SIGNAL_OUT(out_PREDICT_DIR_STATIC     ,"static"     ,Tcontrol_t         ,1);
     90        ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_IS_ACCURATE ,"is_accurate" ,Tcontrol_t         ,1);
     91      }
     92     
     93      {
     94        ALLOC1_INTERFACE("predict_dir",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
     95       
     96        ALLOC1_VALACK_OUT(out_PREDICT_DIR_VAL        ,VAL);
     97        ALLOC1_VALACK_IN ( in_PREDICT_DIR_ACK        ,ACK);
     98        ALLOC1_SIGNAL_OUT(out_PREDICT_DIR_ADDRESS_SRC,"address_src",Taddress_t         ,_param->_size_instruction_address);
     99        ALLOC1_SIGNAL_OUT(out_PREDICT_DIR_STATIC     ,"static"     ,Tcontrol_t         ,1);
    100100//      ALLOC1_SIGNAL_OUT(out_PREDICT_DIR_LAST_TAKE  ,"last_take"  ,Tcontrol_t         ,1);
    101101//      ALLOC1_SIGNAL_IN ( in_PREDICT_DIR_HISTORY    ,"history"    ,Thistory_t         ,_param->_size_history);
    102         ALLOC1_SIGNAL_IN ( in_PREDICT_DIR_DIRECTION  ,"direction"  ,Tcontrol_t         ,1);
    103       }
    104      
    105       {
    106         ALLOC1_INTERFACE("predict_ras",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
    107        
    108         ALLOC1_VALACK_OUT(out_PREDICT_RAS_VAL         ,VAL);
    109         ALLOC1_VALACK_IN ( in_PREDICT_RAS_ACK         ,ACK);
    110         ALLOC1_SIGNAL_OUT(out_PREDICT_RAS_CONTEXT_ID  ,"context_id"  ,Tcontext_t         ,_param->_size_context_id);
    111         ALLOC1_SIGNAL_IN ( in_PREDICT_RAS_HIT         ,"hit"         ,Tcontrol_t         ,1);
    112         ALLOC1_SIGNAL_OUT(out_PREDICT_RAS_PUSH        ,"push"        ,Tcontrol_t         ,1);
    113         ALLOC1_SIGNAL_OUT(out_PREDICT_RAS_ADDRESS_PUSH,"address_push",Taddress_t         ,_param->_size_address);
    114         ALLOC1_SIGNAL_IN ( in_PREDICT_RAS_ADDRESS_POP ,"address_pop" ,Taddress_t         ,_param->_size_address);
     102        ALLOC1_SIGNAL_IN ( in_PREDICT_DIR_DIRECTION  ,"direction"  ,Tcontrol_t         ,1);
     103      }
     104     
     105      {
     106        ALLOC1_INTERFACE("predict_ras",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
     107       
     108        ALLOC1_VALACK_OUT(out_PREDICT_RAS_VAL         ,VAL);
     109        ALLOC1_VALACK_IN ( in_PREDICT_RAS_ACK         ,ACK);
     110        ALLOC1_SIGNAL_OUT(out_PREDICT_RAS_CONTEXT_ID  ,"context_id"  ,Tcontext_t         ,_param->_size_context_id);
     111        ALLOC1_SIGNAL_IN ( in_PREDICT_RAS_HIT         ,"hit"         ,Tcontrol_t         ,1);
     112        ALLOC1_SIGNAL_OUT(out_PREDICT_RAS_PUSH        ,"push"        ,Tcontrol_t         ,1);
     113        ALLOC1_SIGNAL_OUT(out_PREDICT_RAS_ADDRESS_PUSH,"address_push",Taddress_t         ,_param->_size_instruction_address);
     114        ALLOC1_SIGNAL_IN ( in_PREDICT_RAS_ADDRESS_POP ,"address_pop" ,Taddress_t         ,_param->_size_instruction_address);
    115115//      ALLOC1_SIGNAL_IN ( in_PREDICT_RAS_INDEX       ,"index"       ,Tptr_t             ,_param->_size_ras_index);
    116116      }
    117117     
    118118      {
    119         ALLOC1_INTERFACE("predict_upt",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
    120        
    121         ALLOC1_VALACK_OUT(out_PREDICT_UPT_VAL             ,VAL);
    122         ALLOC1_VALACK_IN ( in_PREDICT_UPT_ACK             ,ACK);
    123         ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_CONTEXT_ID      ,"context_id"      ,Tcontext_t         ,_param->_size_context_id);
    124         ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_BTB_ADDRESS_SRC ,"btb_address_src" ,Taddress_t         ,_param->_size_address);
    125         ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_BTB_ADDRESS_DEST,"btb_address_dest",Taddress_t         ,_param->_size_address);
    126         ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_BTB_CONDITION   ,"btb_condition"   ,Tbranch_condition_t,_param->_size_branch_condition);
    127         ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_BTB_LAST_TAKE   ,"btb_last_take"   ,Tcontrol_t         ,1);
    128         ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_BTB_IS_ACCURATE ,"btb_is_accurate" ,Tcontrol_t         ,1);
     119        ALLOC1_INTERFACE("predict_upt",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
     120       
     121        ALLOC1_VALACK_OUT(out_PREDICT_UPT_VAL             ,VAL);
     122        ALLOC1_VALACK_IN ( in_PREDICT_UPT_ACK             ,ACK);
     123        ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_CONTEXT_ID      ,"context_id"      ,Tcontext_t         ,_param->_size_context_id);
     124        ALLOC1_SIGNAL_IN ( in_PREDICT_UPT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth);
     125        ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_BTB_ADDRESS_SRC ,"btb_address_src" ,Taddress_t         ,_param->_size_instruction_address);
     126        ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_BTB_ADDRESS_DEST,"btb_address_dest",Taddress_t         ,_param->_size_instruction_address);
     127        ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_BTB_CONDITION   ,"btb_condition"   ,Tbranch_condition_t,_param->_size_branch_condition);
     128        ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_BTB_LAST_TAKE   ,"btb_last_take"   ,Tcontrol_t         ,1);
     129        ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_BTB_IS_ACCURATE ,"btb_is_accurate" ,Tcontrol_t         ,1);
    129130//      ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_DIR_HISTORY     ,"dir_history"     ,Thistory_t         ,_param->_size_history);
    130         ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_RAS_ADDRESS     ,"ras_address"     ,Taddress_t         ,_param->_size_address);
     131        ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_RAS_ADDRESS     ,"ras_address"     ,Taddress_t         ,_param->_size_instruction_address);
    131132//      ALLOC1_SIGNAL_OUT(out_PREDICT_UPT_RAS_INDEX       ,"ras_index"       ,Tptr_t             ,_param->_size_ras_index);
    132133      }
    133134    }
    134135   
    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);
     136    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     137    {
     138      {
     139        ALLOC2_INTERFACE("decod",IN,SOUTH,"Interface with decod unit",_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     140       
     141        _ALLOC2_VALACK_IN ( in_DECOD_VAL                        ,VAL,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     142        _ALLOC2_VALACK_OUT(out_DECOD_ACK                        ,ACK,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     143        _ALLOC2_SIGNAL_IN ( in_DECOD_CONTEXT_ID                 ,"context_id"                 ,Tcontext_t         ,_param->_size_context_id      ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     144        _ALLOC2_SIGNAL_IN ( in_DECOD_MATCH_INST_IFETCH_PTR      ,"match_inst_ifetch_ptr"      ,Tcontrol_t         ,1                             ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     145        _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state    ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     146        _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth           ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     147        _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_CONDITION           ,"branch_condition"           ,Tbranch_condition_t,_param->_size_branch_condition,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     148        _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_DIRECTION           ,"branch_direction"           ,Tcontrol_t         ,1                             ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     149        _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_SRC                ,"address_src"                ,Taddress_t         ,_param->_size_instruction_address         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     150        _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_DEST               ,"address_dest"               ,Taddress_t         ,_param->_size_instruction_address         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     151      }
     152
     153      {
     154        ALLOC1_INTERFACE("decod_btb",OUT,NORTH,"Interface with decod unit",_param->_nb_inst_branch_decod);
     155
     156        ALLOC1_VALACK_OUT(out_DECOD_BTB_VAL            ,VAL);
     157        ALLOC1_VALACK_IN ( in_DECOD_BTB_ACK            ,ACK);
     158        ALLOC1_SIGNAL_OUT(out_DECOD_BTB_CONTEXT_ID     ,"context_id"     ,Tcontext_t         ,_param->_size_context_id);
     159        ALLOC1_SIGNAL_OUT(out_DECOD_BTB_ADDRESS_SRC    ,"address_src"    ,Taddress_t         ,_param->_size_instruction_address);
     160        ALLOC1_SIGNAL_OUT(out_DECOD_BTB_ADDRESS_DEST   ,"address_dest"   ,Taddress_t         ,_param->_size_instruction_address);
     161        ALLOC1_SIGNAL_OUT(out_DECOD_BTB_CONDITION      ,"condition"      ,Tbranch_condition_t,_param->_size_branch_condition);
     162        ALLOC1_SIGNAL_OUT(out_DECOD_BTB_LAST_TAKE      ,"last_take"      ,Tcontrol_t         ,1);
     163        ALLOC1_SIGNAL_OUT(out_DECOD_BTB_MISS_PREDICTION,"miss_prediction",Tcontrol_t         ,1);
     164        ALLOC1_SIGNAL_OUT(out_DECOD_BTB_IS_ACCURATE    ,"is_accurate"    ,Tcontrol_t         ,1);
     165      }
     166
     167      {
     168        ALLOC1_INTERFACE("decod_ras",OUT,NORTH,"Interface with decod unit",_param->_nb_inst_branch_decod);
     169                                                                                     
     170        ALLOC1_VALACK_OUT(out_DECOD_RAS_VAL            ,VAL);
     171        ALLOC1_VALACK_IN ( in_DECOD_RAS_ACK            ,ACK);
     172        ALLOC1_SIGNAL_OUT(out_DECOD_RAS_CONTEXT_ID     ,"context_id"     ,Tcontext_t,_param->_size_context_id);
     173        ALLOC1_SIGNAL_IN ( in_DECOD_RAS_HIT            ,"hit"            ,Tcontrol_t,1);
     174        ALLOC1_SIGNAL_OUT(out_DECOD_RAS_PUSH           ,"push"           ,Tcontrol_t,1);
     175        ALLOC1_SIGNAL_OUT(out_DECOD_RAS_ADDRESS_PUSH   ,"address_push"   ,Taddress_t,_param->_size_instruction_address);
     176        ALLOC1_SIGNAL_IN ( in_DECOD_RAS_ADDRESS_POP    ,"address_pop"    ,Taddress_t,_param->_size_instruction_address);
     177//      ALLOC1_SIGNAL_IN ( in_DECOD_RAS_INDEX          ,"index"          ,Tptr_t    ,_param->_size_ras_index);
     178        ALLOC1_SIGNAL_OUT(out_DECOD_RAS_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
     179      }
     180
     181      {
     182        ALLOC1_INTERFACE("decod_upt",OUT,NORTH,"Interface with decod unit",_param->_nb_inst_branch_decod);
     183                                                                                     
     184        ALLOC1_VALACK_OUT(out_DECOD_UPT_VAL                 ,VAL);
     185        ALLOC1_VALACK_IN ( in_DECOD_UPT_ACK                 ,ACK);
     186        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_CONTEXT_ID          ,"context_id"          ,Tcontext_t         ,_param->_size_context_id);
     187        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_ADDRESS_SRC     ,"btb_address_src"     ,Taddress_t         ,_param->_size_instruction_address);
     188        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_ADDRESS_DEST    ,"btb_address_dest"    ,Taddress_t         ,_param->_size_instruction_address);
     189        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_CONDITION       ,"btb_condition"       ,Tbranch_condition_t,_param->_size_branch_condition);
     190        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_LAST_TAKE       ,"btb_last_take"       ,Tcontrol_t         ,1);
     191        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_RAS_ADDRESS         ,"ras_address"         ,Taddress_t         ,_param->_size_instruction_address);
     192//      ALLOC1_SIGNAL_OUT(out_DECOD_UPT_RAS_INDEX           ,"ras_index"           ,Tptr_t             ,_param->_size_ras_index);
     193        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_MISS_IFETCH         ,"miss_ifetch"         ,Tcontrol_t         ,1);
     194        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_MISS_DECOD          ,"miss_decod"          ,Tcontrol_t         ,1);
     195        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_UPDATE_PREDICTION_ID,"update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth    );
     196        ALLOC1_SIGNAL_OUT(out_DECOD_UPT_IS_ACCURATE         ,"is_accurate"         ,Tcontrol_t         ,1);
     197      }
     198    }
     199
     200    // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     201    {
     202      {
     203        ALLOC1_INTERFACE("update_btb",OUT,SOUTH,"Interface with update unit",_param->_nb_inst_branch_update);
    202204
    203205        ALLOC1_VALACK_OUT(out_UPDATE_BTB_VAL                  ,VAL);
    204206        ALLOC1_VALACK_IN ( in_UPDATE_BTB_ACK                  ,ACK);
    205207//      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_ADDRESS_SRC          ,"address_src"          ,Taddress_t         ,_param->_size_instruction_address);
     209//      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_ADDRESS_DEST         ,"address_dest"         ,Taddress_t         ,_param->_size_instruction_address);
    208210//      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_CONDITION            ,"condition"            ,Tbranch_condition_t,_param->_size_branch_condition);
    209211//      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_LAST_TAKE            ,"last_take"            ,Tcontrol_t         ,1);
     
    212214
    213215      {
    214         ALLOC1_INTERFACE("update_dir",OUT,NORTH,"Interface with update unit",_param->_nb_inst_branch_update);
     216        ALLOC1_INTERFACE("update_dir",OUT,NORTH,"Interface with update unit",_param->_nb_inst_branch_update);
    215217
    216218        ALLOC1_VALACK_OUT(out_UPDATE_DIR_VAL                  ,VAL);
    217219        ALLOC1_VALACK_IN ( in_UPDATE_DIR_ACK                  ,ACK);
    218 //      ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_ADDRESS              ,"address"              ,Taddress_t         ,_param->_size_address);
     220//      ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_ADDRESS              ,"address"              ,Taddress_t         ,_param->_size_instruction_address);
    219221//      ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_HISTORY              ,"history"              ,Thistory_t         ,_param->_size_history);
    220222//      ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_DIRECTION            ,"direction"            ,Tcontrol_t         ,1);
     
    222224
    223225      {
    224         ALLOC1_INTERFACE("update_ras",OUT,NORTH,"Interface with update unit",_param->_nb_inst_branch_update);
     226        ALLOC1_INTERFACE("update_ras",OUT,NORTH,"Interface with update unit",_param->_nb_inst_branch_update);
    225227
    226228        ALLOC1_VALACK_OUT(out_UPDATE_RAS_VAL                  ,VAL);
     
    228230//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_CONTEXT_ID           ,"context_id"           ,Tcontext_t         ,_param->_size_context_id);
    229231//      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);
     232//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_ADDRESS              ,"address"              ,Taddress_t         ,_param->_size_instruction_address);
    231233//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_INDEX                ,"index"                ,Tptr_t             ,_param->_size_ras_index);
    232234//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_MISS_PREDICTION      ,"miss_prediction"      ,Tcontrol_t         ,1);
     
    235237
    236238      {
    237         ALLOC1_INTERFACE("update_upt",IN ,NORTH,"Interface with update unit",_param->_nb_inst_branch_update);
     239        ALLOC1_INTERFACE("update_upt",IN ,NORTH,"Interface with update unit",_param->_nb_inst_branch_update);
    238240
    239241        ALLOC1_VALACK_IN ( in_UPDATE_UPT_VAL                  ,VAL);
     
    242244//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_MISS_PREDICTION      ,"miss_prediction"      ,Tcontrol_t         ,1);
    243245//      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);
     246        ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_VAL              ,"btb_val"              ,Tcontrol_t         ,1);
     247//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_ADDRESS_SRC      ,"btb_address_src"      ,Taddress_t         ,_param->_size_instruction_address);
     248//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_ADDRESS_DEST     ,"btb_address_dest"     ,Taddress_t         ,_param->_size_instruction_address);
    247249//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_CONDITION        ,"btb_condition"        ,Tbranch_condition_t,_param->_size_branch_condition);
    248250        ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_DIR_VAL              ,"dir_val"              ,Tcontrol_t         ,1);
     
    250252        ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_VAL              ,"ras_val"              ,Tcontrol_t         ,1);
    251253//      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);
     254//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_ADDRESS          ,"ras_address"          ,Taddress_t         ,_param->_size_instruction_address);
    253255//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_INDEX            ,"ras_index"            ,Tptr_t             ,_param->_size_ras_index);
    254256//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_PREDICTION_IFETCH,"ras_prediction_ifetch",Tcontrol_t         ,1);
     
    256258    }
    257259
    258     // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
    259     {
    260       ALLOC1_INTERFACE("depth",IN,NORTH,"Interface with depth",_param->_nb_context);
    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     }
     260//  // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
     261//  {
     262//    ALLOC1_INTERFACE("depth",IN,NORTH,"Interface with depth",_param->_nb_context);
     263//
     264//    ALLOC1_SIGNAL_IN ( in_DEPTH_UPT_NB_BRANCH,"upt_nb_branch",Tdepth_t,_param->_size_depth+1);
     265//    ALLOC1_SIGNAL_IN ( in_DEPTH_UPT_TAIL     ,"upt_tail"     ,Tdepth_t,_param->_size_depth);
     266//    ALLOC1_SIGNAL_OUT(out_DEPTH_NB_BRANCH    ,"nb_branch"    ,Tdepth_t,_param->_size_depth+1);
     267//    ALLOC1_SIGNAL_OUT(out_DEPTH_TAIL         ,"tail"         ,Tdepth_t,_param->_size_depth);
     268//  }
    267269
    268270    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    269271
    270 #ifndef NO_INIT
    271     reg_PREDICT_PRIORITY = 0;
    272     reg_DECOD_PRIORITY   = 0;
     272#ifndef REGISTER_INIT
     273    if (usage_is_set(_usage,USE_SYSTEMC))
     274      {
     275        reg_PREDICT_PRIORITY = 0;
     276        reg_DECOD_PRIORITY   = 0;
     277      }
    273278#endif
    274279
     
    277282#ifdef POSITION
    278283    if (usage_is_set(_usage,USE_POSITION))
    279         _component->generate_file();
     284        _component->generate_file();
    280285#endif
    281286
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_deallocation.cpp

    r82 r88  
    3333        DELETE1_SIGNAL( in_PREDICT_VAL                        ,_param->_nb_context     ,1);
    3434        DELETE1_SIGNAL(out_PREDICT_ACK                        ,_param->_nb_context     ,1);
    35         DELETE1_SIGNAL( in_PREDICT_PC_PREVIOUS                ,_param->_nb_context     ,_param->_size_address);
    36         DELETE1_SIGNAL( in_PREDICT_PC_CURRENT                 ,_param->_nb_context     ,_param->_size_address);
     35        DELETE1_SIGNAL( in_PREDICT_PC_PREVIOUS                ,_param->_nb_context     ,_param->_size_instruction_address);
     36        DELETE1_SIGNAL( in_PREDICT_PC_CURRENT                 ,_param->_nb_context     ,_param->_size_instruction_address);
    3737        DELETE1_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE      ,_param->_nb_context     ,1);
    38         DELETE1_SIGNAL(out_PREDICT_PC_NEXT                    ,_param->_nb_context     ,_param->_size_address);
     38        DELETE1_SIGNAL(out_PREDICT_PC_NEXT                    ,_param->_nb_context     ,_param->_size_instruction_address);
    3939        DELETE1_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE         ,_param->_nb_context     ,1);
    40         DELETE1_SIGNAL(out_PREDICT_INST_IFETCH_PTR            ,_param->_nb_context     ,_param->_size_inst_ifetch_ptr [alloc_signal_it1]);
     40        DELETE1_SIGNAL(out_PREDICT_INST_IFETCH_PTR            ,_param->_nb_context     ,_param->_size_inst_ifetch_ptr);
    4141        DELETE1_SIGNAL(out_PREDICT_BRANCH_STATE               ,_param->_nb_context     ,_param->_size_branch_state);
    42         DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context     ,_param->_size_depth [alloc_signal_it1]);
    43         DELETE2_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE         ,_param->_nb_context     ,_param->_nb_instruction[alloc_signal_it1],1);
     42        DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context     ,_param->_size_depth);
     43        DELETE2_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE         ,_param->_nb_context     ,_param->_nb_instruction[it1],1);
    4444        DELETE1_SIGNAL(out_PREDICT_BTB_VAL                    ,_param->_nb_inst_branch_predict,1);
    4545        DELETE1_SIGNAL( in_PREDICT_BTB_ACK                    ,_param->_nb_inst_branch_predict,1);
    4646        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);
     47        DELETE1_SIGNAL(out_PREDICT_BTB_ADDRESS                ,_param->_nb_inst_branch_predict,_param->_size_instruction_address);
    4848        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);
     49        DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC            ,_param->_nb_inst_branch_predict,_param->_size_instruction_address);
     50        DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST           ,_param->_nb_inst_branch_predict,_param->_size_instruction_address);
    5151        DELETE1_SIGNAL( in_PREDICT_BTB_CONDITION              ,_param->_nb_inst_branch_predict,_param->_size_branch_condition);
    5252//      DELETE1_SIGNAL( in_PREDICT_BTB_LAST_TAKE              ,_param->_nb_inst_branch_predict,1);
     
    5454        DELETE1_SIGNAL(out_PREDICT_DIR_VAL                    ,_param->_nb_inst_branch_predict,1);
    5555        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);
     56        DELETE1_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC            ,_param->_nb_inst_branch_predict,_param->_size_instruction_address);
    5757        DELETE1_SIGNAL(out_PREDICT_DIR_STATIC                 ,_param->_nb_inst_branch_predict,1);
    5858//      DELETE1_SIGNAL(out_PREDICT_DIR_LAST_TAKE              ,_param->_nb_inst_branch_predict,1);
     
    6464        DELETE1_SIGNAL( in_PREDICT_RAS_HIT                    ,_param->_nb_inst_branch_predict,1);
    6565        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);
     66        DELETE1_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH           ,_param->_nb_inst_branch_predict,_param->_size_instruction_address);
     67        DELETE1_SIGNAL( in_PREDICT_RAS_ADDRESS_POP            ,_param->_nb_inst_branch_predict,_param->_size_instruction_address);
    6868//      DELETE1_SIGNAL( in_PREDICT_RAS_INDEX                  ,_param->_nb_inst_branch_predict,_param->_size_ras_index);
    6969        DELETE1_SIGNAL(out_PREDICT_UPT_VAL                    ,_param->_nb_inst_branch_predict,1);
    7070        DELETE1_SIGNAL( in_PREDICT_UPT_ACK                    ,_param->_nb_inst_branch_predict,1);
    7171        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);
     72        DELETE1_SIGNAL( in_PREDICT_UPT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_inst_branch_predict,_param->_size_depth);
     73        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC        ,_param->_nb_inst_branch_predict,_param->_size_instruction_address);
     74        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST       ,_param->_nb_inst_branch_predict,_param->_size_instruction_address);
    7475        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_CONDITION          ,_param->_nb_inst_branch_predict,_param->_size_branch_condition);
    7576        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE          ,_param->_nb_inst_branch_predict,1);
    7677        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE        ,_param->_nb_inst_branch_predict,1);
    7778//      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_ADDRESS            ,_param->_nb_inst_branch_predict,_param->_size_instruction_address);
    7980//      DELETE1_SIGNAL(out_PREDICT_UPT_RAS_INDEX              ,_param->_nb_inst_branch_predict,_param->_size_ras_index);
    8081
    8182        // ~~~~~[ 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         );
     83        DELETE2_SIGNAL( in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1);
     84        DELETE2_SIGNAL(out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1);
     85        DELETE2_SIGNAL( in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_context_id      );
     86        DELETE2_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1                             );
     87        DELETE2_SIGNAL( in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_branch_state    );
     88        DELETE2_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_depth           );
     89        DELETE2_SIGNAL( in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_branch_condition);
     90        DELETE2_SIGNAL( in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1                             );
     91        DELETE2_SIGNAL( in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_instruction_address         );
     92        DELETE2_SIGNAL( in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_instruction_address         );
    9293        DELETE1_SIGNAL(out_DECOD_BTB_VAL            ,_param->_nb_inst_branch_decod,1);
    9394        DELETE1_SIGNAL( in_DECOD_BTB_ACK            ,_param->_nb_inst_branch_decod,1);
    9495        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);
     96        DELETE1_SIGNAL(out_DECOD_BTB_ADDRESS_SRC    ,_param->_nb_inst_branch_decod,_param->_size_instruction_address);
     97        DELETE1_SIGNAL(out_DECOD_BTB_ADDRESS_DEST   ,_param->_nb_inst_branch_decod,_param->_size_instruction_address);
    9798        DELETE1_SIGNAL(out_DECOD_BTB_CONDITION      ,_param->_nb_inst_branch_decod,_param->_size_branch_condition);
    9899        DELETE1_SIGNAL(out_DECOD_BTB_LAST_TAKE      ,_param->_nb_inst_branch_decod,1);
     
    105106        DELETE1_SIGNAL( in_DECOD_RAS_HIT            ,_param->_nb_inst_branch_decod,1);
    106107        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);
     108        DELETE1_SIGNAL(out_DECOD_RAS_ADDRESS_PUSH   ,_param->_nb_inst_branch_decod,_param->_size_instruction_address);
     109        DELETE1_SIGNAL( in_DECOD_RAS_ADDRESS_POP    ,_param->_nb_inst_branch_decod,_param->_size_instruction_address);
    109110//      DELETE1_SIGNAL( in_DECOD_RAS_INDEX          ,_param->_nb_inst_branch_decod,_param->_size_ras_index);
    110111        DELETE1_SIGNAL(out_DECOD_RAS_MISS_PREDICTION,_param->_nb_inst_branch_decod,1);
     
    113114        DELETE1_SIGNAL( in_DECOD_UPT_ACK                 ,_param->_nb_inst_branch_decod,1);
    114115        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);
     116        DELETE1_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_SRC     ,_param->_nb_inst_branch_decod,_param->_size_instruction_address);
     117        DELETE1_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_DEST    ,_param->_nb_inst_branch_decod,_param->_size_instruction_address);
    117118        DELETE1_SIGNAL(out_DECOD_UPT_BTB_CONDITION       ,_param->_nb_inst_branch_decod,_param->_size_branch_condition);
    118119        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_ADDRESS         ,_param->_nb_inst_branch_decod,_param->_size_instruction_address);
    120121//      DELETE1_SIGNAL(out_DECOD_UPT_RAS_INDEX           ,_param->_nb_inst_branch_decod,_param->_size_ras_index);
    121122        DELETE1_SIGNAL(out_DECOD_UPT_MISS_IFETCH         ,_param->_nb_inst_branch_decod,1);
    122123        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        DELETE1_SIGNAL(out_DECOD_UPT_UPDATE_PREDICTION_ID,_param->_nb_inst_branch_decod,_param->_size_depth);
     125        DELETE1_SIGNAL(out_DECOD_UPT_IS_ACCURATE         ,_param->_nb_inst_branch_decod,1);
    124126
    125127        // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
     
    127129        DELETE1_SIGNAL( in_UPDATE_BTB_ACK                  ,_param->_nb_inst_branch_update,1);
    128130//      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_ADDRESS_SRC          ,_param->_nb_inst_branch_update,_param->_size_instruction_address);
     132//      DELETE1_SIGNAL(out_UPDATE_BTB_ADDRESS_DEST         ,_param->_nb_inst_branch_update,_param->_size_instruction_address);
    131133//      DELETE1_SIGNAL(out_UPDATE_BTB_CONDITION            ,_param->_nb_inst_branch_update,_param->_size_branch_condition);
    132134//      DELETE1_SIGNAL(out_UPDATE_BTB_LAST_TAKE            ,_param->_nb_inst_branch_update,1);
     
    135137        DELETE1_SIGNAL(out_UPDATE_DIR_VAL                  ,_param->_nb_inst_branch_update,1);
    136138        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);
     139//      DELETE1_SIGNAL(out_UPDATE_DIR_ADDRESS              ,_param->_nb_inst_branch_update,_param->_size_instruction_address);
    138140//      DELETE1_SIGNAL(out_UPDATE_DIR_HISTORY              ,_param->_nb_inst_branch_update,_param->_size_history);
    139141//      DELETE1_SIGNAL(out_UPDATE_DIR_DIRECTION            ,_param->_nb_inst_branch_update,1);
     
    143145//      DELETE1_SIGNAL(out_UPDATE_RAS_CONTEXT_ID           ,_param->_nb_inst_branch_update,_param->_size_context_id);
    144146//      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);
     147//      DELETE1_SIGNAL(out_UPDATE_RAS_ADDRESS              ,_param->_nb_inst_branch_update,_param->_size_instruction_address);
    146148//      DELETE1_SIGNAL(out_UPDATE_RAS_INDEX                ,_param->_nb_inst_branch_update,_param->_size_ras_index);
    147149//      DELETE1_SIGNAL(out_UPDATE_RAS_MISS_PREDICTION      ,_param->_nb_inst_branch_update,1);
     
    154156//      DELETE1_SIGNAL( in_UPDATE_UPT_DIRECTION_GOOD       ,_param->_nb_inst_branch_update,1);
    155157        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_ADDRESS_SRC      ,_param->_nb_inst_branch_update,_param->_size_instruction_address);
     159//      DELETE1_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_DEST     ,_param->_nb_inst_branch_update,_param->_size_instruction_address);
    158160//      DELETE1_SIGNAL( in_UPDATE_UPT_BTB_CONDITION        ,_param->_nb_inst_branch_update,_param->_size_branch_condition);
    159161        DELETE1_SIGNAL( in_UPDATE_UPT_DIR_VAL              ,_param->_nb_inst_branch_update,1);
     
    161163        DELETE1_SIGNAL( in_UPDATE_UPT_RAS_VAL              ,_param->_nb_inst_branch_update,1);
    162164//      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);
     165//      DELETE1_SIGNAL( in_UPDATE_UPT_RAS_ADDRESS          ,_param->_nb_inst_branch_update,_param->_size_instruction_address);
    164166//      DELETE1_SIGNAL( in_UPDATE_UPT_RAS_INDEX            ,_param->_nb_inst_branch_update,_param->_size_ras_index);
    165167//      DELETE1_SIGNAL( in_UPDATE_UPT_RAS_PREDICTION_IFETCH,_param->_nb_inst_branch_update,1);
    166168
    167         // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
    168         DELETE1_SIGNAL( in_DEPTH_UPT_NB_BRANCH,_param->_nb_context,_param->_size_depth[alloc_signal_it1]+1);
    169         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]);
     169//      // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       
     170//      DELETE1_SIGNAL( in_DEPTH_UPT_NB_BRANCH,_param->_nb_context,_param->_size_depth+1);
     171//      DELETE1_SIGNAL( in_DEPTH_UPT_TAIL     ,_param->_nb_context,_param->_size_depth);
     172//      DELETE1_SIGNAL(out_DEPTH_NB_BRANCH    ,_param->_nb_context,_param->_size_depth+1);
     173//      DELETE1_SIGNAL(out_DEPTH_TAIL         ,_param->_nb_context,_param->_size_depth);
    172174      }
    173175    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_decod.cpp

    r82 r88  
    2222  void Prediction_unit_Glue::genMealy_decod (void)
    2323  {
    24     log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin");
    25 
     24    log_begin(Prediction_unit_Glue,FUNCTION);
     25    log_function(Prediction_unit_Glue,FUNCTION,_name.c_str());
     26
     27    // Init
    2628    uint32_t   decod_unit = reg_DECOD_PRIORITY;
    27 
     29   
    2830    log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"  * decod_unit : %d",decod_unit);
    2931
     
    4951      if ((port>=_param->_nb_inst_branch_decod) or
    5052          (PORT_READ(in_DECOD_VAL [decod_unit][i]) == 0))
    51         {
     53        {
    5254          log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"  * DECOD[%d][%d] : not valid",decod_unit,i);
    5355          ack [i] = false;
     
    5557      else
    5658        {
    57           Tcontext_t          context               = (_param->_have_port_context_id)?PORT_READ(in_DECOD_CONTEXT_ID [decod_unit][i]):0;
    58           Tbranch_state_t     branch_state          = PORT_READ(in_DECOD_BRANCH_STATE          [decod_unit][i]);
    59           Tcontrol_t          match_inst_ifetch_ptr = PORT_READ(in_DECOD_MATCH_INST_IFETCH_PTR [decod_unit][i]);
    60           Tprediction_ptr_t   depth   = (_param->_have_port_max_depth)?PORT_READ(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [decod_unit][i]):0;
    61           Tcontrol_t          use_btb = false;
    62           Tcontrol_t          use_ras = false;
    63           Tcontrol_t          use_upt = true ;
    64           Tcontrol_t          miss_ifetch    = ( (branch_state == BRANCH_STATE_NONE) or // branch not detected
    65                                                  ((branch_state != BRANCH_STATE_NONE) and (match_inst_ifetch_ptr == 0))); // branch detected, but it's not the good
    66           Tcontrol_t          miss_decod;
     59          Tcontext_t        context               = (_param->_have_port_context_id)?PORT_READ(in_DECOD_CONTEXT_ID [decod_unit][i]):0;
     60          Tbranch_state_t   branch_state          = PORT_READ(in_DECOD_BRANCH_STATE          [decod_unit][i]);
     61          Tcontrol_t        match_inst_ifetch_ptr = PORT_READ(in_DECOD_MATCH_INST_IFETCH_PTR [decod_unit][i]);
     62          Tprediction_ptr_t depth                 = (_param->_have_port_depth)?PORT_READ(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [decod_unit][i]):0;
     63          Tcontrol_t        use_btb               = false;
     64          Tcontrol_t        use_ras               = false;
     65          Tcontrol_t        use_upt               = true ; // always update upt.
     66
     67          // Ifetch stage made an miss if :
     68          //   * branch is previously predict, but it's not the good
     69          Tcontrol_t        miss_ifetch           = ((branch_state != BRANCH_STATE_NONE) and (match_inst_ifetch_ptr == 0));
     70          // Decod stage made an miss if :
     71          //   * branch was not detected
     72          Tcontrol_t        miss_decod            = (branch_state == BRANCH_STATE_NONE);
    6773
    6874          log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"  * DECOD[%d][%d] :     valid",decod_unit,i);
    69           log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * depth   [%d] : %d",i   ,depth);
     75          log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * branch_state          : %d",branch_state);
     76          log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * match_inst_ifetch_ptr : %d",match_inst_ifetch_ptr);
     77          log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * depth                 : [%d] %d",i,depth);
     78          log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * miss_ifetch           : %d",miss_ifetch);
     79          log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * miss_decod            : %d",miss_decod);
    7080
    7181          // Test if ifetch have detecte a branch is the packet
    72           if (miss_ifetch)
     82          if (miss_ifetch or miss_decod)
    7383            {
    74               log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * miss_ifetch");
    75               log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * state : %d",branch_state);
    76               log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * match : %d",match_inst_ifetch_ptr);
    77               Tbranch_condition_t condition             = PORT_READ(in_DECOD_BRANCH_CONDITION            [decod_unit][i]);
    78               Tcontrol_t          direction             = PORT_READ(in_DECOD_BRANCH_DIRECTION            [decod_unit][i]);
    79               Taddress_t          address_src           = PORT_READ(in_DECOD_ADDRESS_SRC                 [decod_unit][i]);
    80               Taddress_t          address_dest          = PORT_READ(in_DECOD_ADDRESS_DEST                [decod_unit][i]);
     84              Tbranch_condition_t condition    = PORT_READ(in_DECOD_BRANCH_CONDITION            [decod_unit][i]);
     85              Tcontrol_t          direction    = PORT_READ(in_DECOD_BRANCH_DIRECTION            [decod_unit][i]);
     86              Taddress_t          address_src  = PORT_READ(in_DECOD_ADDRESS_SRC                 [decod_unit][i]);
     87              Taddress_t          address_dest = PORT_READ(in_DECOD_ADDRESS_DEST                [decod_unit][i]);
    8188              Tcontrol_t          is_accurate;
    8289
     
    8895                case BRANCH_CONDITION_NONE_WITH_WRITE_STACK             :
    8996                  {
    90                     // Write stack
     97                    // l.jal
     98                    log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * BRANCH_CONDITION_NONE_WITH_WRITE_STACK");
     99
     100                    is_accurate = true ;//PORT_READ(in_DECOD_RAS_HIT [port]);
     101                    use_ras     = true ;
     102
     103                    PORT_WRITE(out_DECOD_RAS_PUSH         [port],1);
     104                    PORT_WRITE(out_DECOD_RAS_ADDRESS_PUSH [port],address_src+2);
     105                   
     106                    break;
     107                  }
     108
     109                case BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK    :
     110                  {
     111                    // l.jalr
     112                    log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK");
     113
     114                    is_accurate = false; // address unknow : in a register
     115                    use_ras     = true;
     116
     117                    PORT_WRITE(out_DECOD_RAS_PUSH         [port],1);
     118                    PORT_WRITE(out_DECOD_RAS_ADDRESS_PUSH [port],address_src+2);
     119                   
     120                    break;
     121                  }
     122                case BRANCH_CONDITION_READ_STACK                        :
     123                  {
     124                    // l.jr with rb=r9
     125                    log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * BRANCH_CONDITION_READ_STACK");
     126
    91127                    is_accurate = PORT_READ(in_DECOD_RAS_HIT [port]);
    92                     miss_decod  = false;
    93128                    use_ras     = true;
    94129
    95                     PORT_WRITE(out_DECOD_RAS_PUSH         [port],1);
    96                     PORT_WRITE(out_DECOD_RAS_ADDRESS_PUSH [port],address_dest);
    97                    
    98                     break;
    99                   }
    100 
    101                 case BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK    :
    102                   {
    103                     // Write stack
    104                     is_accurate = false;
    105                     miss_decod  = false;
    106                     use_ras     = true;
    107 
    108                     PORT_WRITE(out_DECOD_RAS_PUSH         [port],1);
    109                     PORT_WRITE(out_DECOD_RAS_ADDRESS_PUSH [port],address_dest);
    110                    
    111                     break;
    112                   }
    113                 case BRANCH_CONDITION_READ_STACK                        :
    114                   {
    115                     // Read stack
    116                     is_accurate = PORT_READ(in_DECOD_RAS_HIT [port]);
    117                     miss_decod  = false;
    118                     use_ras     = true;
    119 
    120                     PORT_WRITE(out_DECOD_RAS_PUSH         [port],0);
     130                    PORT_WRITE(out_DECOD_RAS_PUSH         [port],0); // POP
    121131                    address_dest = PORT_READ(in_DECOD_RAS_ADDRESS_POP [port]);
    122132                   
     
    125135                case BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK :
    126136                  {
     137                    // l.jr with rb!=r9
     138                    log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK");
     139
    127140                    //   * READ_REGISTER_WITHOUT_WRITE_STACK : Take but destination is unknow - don't continue
    128                     is_accurate = PORT_READ(in_DECOD_RAS_HIT [port]);
    129                     miss_decod  = true;
     141                    is_accurate = false; // address unknow : in a register
    130142
    131143                    break;
     
    135147                case BRANCH_CONDITION_FLAG_SET                          :
    136148                  {
    137                     // No access at the flag
     149                    // l.bf, l.bnf
    138150                    //   * FLAG                              : static direction and destination is know
    139                     is_accurate = PORT_READ(in_DECOD_RAS_HIT [port]);
    140                     miss_decod  = false;
     151                    log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * BRANCH_CONDITION_FLAG");
     152
     153                    is_accurate = true; // address dest is know
    141154
    142155                    break;
     
    145158                case BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK          :
    146159                  {
    147                     // No access at the flag
    148                     //   * NONE_WITHOUT_WRITE_STACK          : take and destination is know
    149                     is_accurate = false;
    150                     miss_decod  = false;
    151                     use_ras     = true;
    152 
    153                     PORT_WRITE(out_DECOD_RAS_PUSH         [port],1);
    154                     PORT_WRITE(out_DECOD_RAS_ADDRESS_PUSH [port],address_dest);
    155 
    156                     break;
    157                   }
    158 
     160                    // l.j
     161                    log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK");
     162
     163                    is_accurate = true;
     164
     165                    break;
     166                  }
    159167                }
    160168
     
    180188              if (use_upt)
    181189                {
    182                   PORT_WRITE(out_DECOD_UPT_BTB_ADDRESS_SRC      [port],address_src);
    183                   PORT_WRITE(out_DECOD_UPT_BTB_ADDRESS_DEST     [port],address_dest);
    184                   PORT_WRITE(out_DECOD_UPT_BTB_CONDITION        [port],condition);
    185                   PORT_WRITE(out_DECOD_UPT_BTB_LAST_TAKE        [port],direction);
    186                   PORT_WRITE(out_DECOD_UPT_RAS_ADDRESS          [port],PORT_READ(in_DECOD_RAS_ADDRESS_POP [port]));
     190                  PORT_WRITE(out_DECOD_UPT_BTB_ADDRESS_SRC [port],address_src);
     191                  PORT_WRITE(out_DECOD_UPT_BTB_ADDRESS_DEST[port],address_dest);
     192                  PORT_WRITE(out_DECOD_UPT_BTB_CONDITION   [port],condition);
     193                  PORT_WRITE(out_DECOD_UPT_BTB_LAST_TAKE   [port],direction);
     194                  PORT_WRITE(out_DECOD_UPT_RAS_ADDRESS     [port],PORT_READ(in_DECOD_RAS_ADDRESS_POP [port]));
     195                  PORT_WRITE(out_DECOD_UPT_IS_ACCURATE     [port],is_accurate);
    187196                }
    188197            }
    189           else
    190             {
    191               log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * hit");
    192 
    193               miss_decod = false;
    194               // Hit speculation
    195             }
    196          
     198//        else
     199//          {
     200//               log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * hit");
     201
     202//            miss_decod = false;
     203//            // Hit speculation
     204//          }
     205         
     206
    197207          // in all case
    198208          log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * use_btb : %d",use_btb);
     
    231241          PORT_WRITE(out_DECOD_UPT_MISS_IFETCH          [port],miss_ifetch);
    232242          PORT_WRITE(out_DECOD_UPT_MISS_DECOD           [port],miss_decod );
    233           if (_param->_have_port_max_depth)
     243          if (_param->_have_port_depth)
    234244          PORT_WRITE(out_DECOD_UPT_UPDATE_PREDICTION_ID [port],depth);
    235245         
     
    237247        }
    238248   
     249    // Write output
     250
    239251    for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
    240252      {
     
    251263          PORT_WRITE(out_DECOD_ACK [i][j], ack[j]);
    252264
    253     log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End");
     265    log_end(Prediction_unit_Glue,FUNCTION);
    254266  };
    255267
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp

    r82 r88  
    2222  void Prediction_unit_Glue::genMealy_predict (void)
    2323  {
    24     log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin");
     24    log_begin(Prediction_unit_Glue,FUNCTION);
     25    log_function(Prediction_unit_Glue,FUNCTION,_name.c_str());
    2526   
    2627    Tcontrol_t ack [_param->_nb_context];
    2728    for (uint32_t i=0; i<_param->_nb_context; i++)
    2829      {
    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]));
     30        ack [i] = 0;
     31
     32//      if (_param->_have_port_depth)
     33//        {
     34//      PORT_WRITE(out_DEPTH_TAIL      [i],PORT_READ(in_DEPTH_UPT_TAIL      [i]));
     35//        }
     36//      PORT_WRITE(out_DEPTH_NB_BRANCH [i],PORT_READ(in_DEPTH_UPT_NB_BRANCH [i]));
    3637      }
    3738
    3839    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
    3940      {
    40         log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"PREDICT [%d]",i);
    41 
    42         Tcontrol_t btb_val;
    43         Tcontrol_t dir_val;
    44         Tcontrol_t ras_val;
    45         Tcontrol_t upt_val;
    46 
    47         Tcontext_t context = (reg_PREDICT_PRIORITY+i)%_param->_nb_context;
    48         log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"  * context    : %d",context);
    49 
    50         ack [context] = 1;
    51            
    52         if (PORT_READ(in_PREDICT_VAL[context]) == 0)
    53           {
    54             log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"  * not valid ...");
    55 
    56             btb_val = false;
    57             dir_val = false;
    58             ras_val = false;
    59             upt_val = false;
    60           }
    61         else
    62           {
    63             log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"  * valid ...");
    64 
    65             Taddress_t          pc_previous           = PORT_READ(in_PREDICT_PC_PREVIOUS           [context]);
    66             Taddress_t          pc_current            = PORT_READ(in_PREDICT_PC_CURRENT            [context]);
    67             Tcontrol_t          pc_current_is_ds_take = PORT_READ(in_PREDICT_PC_CURRENT_IS_DS_TAKE [context]);
    68 
    69             Taddress_t          pc_next                     ;
    70             Tcontrol_t          pc_next_is_ds_take          ;
    71             Tbranch_state_t     branch_state                ;
    72             Tprediction_ptr_t   branch_update_prediction_id ;
    73             Tinst_ifetch_ptr_t  inst_ifetch_ptr             ;
    74            
    75             // STEP (1) - Compute the address source
    76             Taddress_t          address     = (pc_current_is_ds_take)?pc_previous:pc_current;
    77             Taddress_t          address_lsb = pc_current%_param->_nb_instruction [context]; //if pc_current_is_ds_take, then pc_current%_param->_nb_instruction [context] == 0
    78             Taddress_t          address_msb;
    79 
    80             log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"  * address    : 0x%x",address);
    81 
    82             // STEP (2) - Test if branch (access at branch_target_buffer)
    83             btb_val = true;
    84             ack [context] &= PORT_READ(in_PREDICT_BTB_ACK [i]);
    85 
    86             if (_param->_have_port_context_id)
    87             PORT_WRITE(out_PREDICT_BTB_CONTEXT_ID [i],context);
    88             PORT_WRITE(out_PREDICT_BTB_ADDRESS    [i],address);
    89 
    90             // special case :
    91             //  if pc_current_is_ds, then pc_previous have branch, also hit must be set.
    92             //  else : a another branch have eject this branch : can't accurate
    93             Tcontrol_t          hit         = PORT_READ(in_PREDICT_BTB_HIT[i]);
    94             Tcontrol_t          is_accurate = PORT_READ(in_PREDICT_BTB_IS_ACCURATE  [i]) and not (pc_current_is_ds_take and not hit);
    95 
    96             // STEP (3) : Test if have branch in the packet
    97             if (hit == 1)
    98               {
    99                 // STEP (3a) : branch - test condition
    100 
    101                 bool                use_dir      = false;
    102                 bool                use_ras      = false;
    103                 bool                use_upt      = false;
    104                
    105                 Tbranch_condition_t cond         = PORT_READ(in_PREDICT_BTB_CONDITION    [i]);
    106                 Taddress_t          address_src  = PORT_READ(in_PREDICT_BTB_ADDRESS_SRC  [i]);
    107                 Taddress_t          address_dest = PORT_READ(in_PREDICT_BTB_ADDRESS_DEST [i]);
    108                 Tcontrol_t          push;
    109                 Tcontrol_t          direction;
    110 
    111                 switch (cond)
    112                   {
    113                   case BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK          : // l.j
    114                     {
    115                       // use none unit (dir, upt and ras)
    116                       direction    = true;
    117                       pc_next      = address_dest;
    118                       branch_state = BRANCH_STATE_NSPEC_TAKE;
    119                       break;
    120                     }
    121                   case BRANCH_CONDITION_NONE_WITH_WRITE_STACK             : // l.jal
    122                     {
    123                       use_upt      = true;
    124                       use_ras      = true;
    125                       push         = true;
    126                       direction    = true;
    127                       pc_next      = address_dest;
    128                       branch_state = BRANCH_STATE_NSPEC_TAKE;
    129                       break;
    130                     }
    131                   case BRANCH_CONDITION_FLAG_UNSET                        : // l.bnf
    132                   case BRANCH_CONDITION_FLAG_SET                          : // l.bf
    133                     {
    134                       use_upt      = true;
    135                       use_dir      = true;
    136                       // Test direction
    137                       direction = PORT_READ(in_PREDICT_DIR_DIRECTION [i]); // Direction is not the "flag predict" ... also flag_unset and flag_set is the same
    138                       if (direction = 1)
    139                         {
    140                           branch_state = BRANCH_STATE_SPEC_TAKE;
    141                           pc_next      = address_dest;
    142                         }
    143                       else
    144                         {
    145                           branch_state = BRANCH_STATE_SPEC_NTAKE;
    146                           pc_next      = address_src+2; // +1 = delay slot
    147                         }
    148                       break;
    149                     }
    150                   case BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK : // l.jr (rb!=9)
    151                     {
    152                       use_upt      = true;
    153                       use_ras      = true;
    154                       push         = true;
    155                       direction    = true;
    156                       pc_next      = address_dest;
    157                       branch_state = BRANCH_STATE_SPEC_TAKE;
    158                       break;
    159                     }
    160                   case BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK    : // l.jalr
    161                     {
    162                       use_upt      = true;
    163                       use_ras      = true;
    164                       push         = true;
    165                       direction    = true;
    166                       pc_next      = address_dest;
    167                       branch_state = BRANCH_STATE_NSPEC_TAKE;
    168                       break;
    169                     }
    170                   case BRANCH_CONDITION_READ_STACK                        : // l.jr (rb==9)
    171                     {
    172                       use_upt      = true;
    173                       use_ras      = true;
    174                       push         = false;
    175                       direction    = true;
    176                       pc_next      = PORT_READ(in_PREDICT_RAS_ADDRESS_POP  [i]);
    177                       branch_state = BRANCH_STATE_SPEC_TAKE;
    178                       break;
    179                     }
    180                   default :
    181                     {
    182                       ERRORMORPHEO(FUNCTION,"Unknow Condition");
    183                       break;
    184                     }
    185                   }
    186 
    187                 if (use_dir)
    188                   {
    189                     ack[context] &= PORT_READ(in_PREDICT_DIR_ACK [i]);
    190                     PORT_WRITE(out_PREDICT_DIR_ADDRESS_SRC [i], address_src);
    191                     PORT_WRITE(out_PREDICT_DIR_STATIC      [i], address_dest<address_src); // if destination is previous : the static direction is take
    192 //                  PORT_WRITE(out_PREDICT_DIR_LAST_TAKE   [i], PORT_READ(in_PREDICT_BTB_LAST_TAKE [i]));
    193                   }
    194 
    195                 if (use_ras)
    196                   {
    197                     ack[context] &= PORT_READ(in_PREDICT_RAS_ACK [i]);
    198                     if (_param->_have_port_context_id)
    199                     PORT_WRITE(out_PREDICT_RAS_CONTEXT_ID   [i], context);
    200                     PORT_WRITE(out_PREDICT_RAS_PUSH         [i], push);
    201                     PORT_WRITE(out_PREDICT_RAS_ADDRESS_PUSH [i], address_src+2);
    202 
    203                     is_accurate &= PORT_READ(in_PREDICT_RAS_HIT [i]); // if miss - prediction is not accurate
    204                   }
    205 
    206                 if (use_upt)
    207                   {
    208                     ack[context] &= PORT_READ(in_PREDICT_UPT_ACK [i]);
    209                    
    210                     PORT_WRITE(out_PREDICT_UPT_CONTEXT_ID       [i],context);
    211                     PORT_WRITE(out_PREDICT_UPT_BTB_ADDRESS_SRC  [i],address_src);
    212                     PORT_WRITE(out_PREDICT_UPT_BTB_ADDRESS_DEST [i],address_dest);
    213                     PORT_WRITE(out_PREDICT_UPT_BTB_CONDITION    [i],cond);
    214                     PORT_WRITE(out_PREDICT_UPT_BTB_LAST_TAKE    [i],direction);
    215                     PORT_WRITE(out_PREDICT_UPT_BTB_IS_ACCURATE  [i],is_accurate);
    216 //                  PORT_WRITE(out_PREDICT_UPT_DIR_HISTORY      [i],PORT_READ(in_PREDICT_DIR_HISTORY      [i]));
    217                     PORT_WRITE(out_PREDICT_UPT_RAS_ADDRESS      [i],PORT_READ(in_PREDICT_RAS_ADDRESS_POP  [i]));
    218 //                  PORT_WRITE(out_PREDICT_UPT_RAS_INDEX        [i],PORT_READ(in_PREDICT_RAS_INDEX        [i]));
    219                   }
    220 
    221                 // ack = 1 if :
    222                 //   *             btb_ack
    223                 //   * use_dir and dir_ack
    224                 //   * use_ras and ras_ack
    225                 //   * use_upt and upt_ack
    226 //              ack [context] = (PORT_READ(in_PREDICT_BTB_ACK [i]) and
    227 //                               (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i])) and
    228 //                               (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i])) and
    229 //                               (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i])));
    230 
    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]))));
    245 
    246 //              pc_next      - is previously computed
    247 //              branch_state - is previously computed
    248 
    249                 Taddress_t address_src_lsb  = address_src%_param->_nb_instruction [context];
    250 
    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);
    253                 if (address_src_lsb == (_param->_nb_instruction [context]-1))
    254                   {
    255                     // 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                
    258                     address_msb        = _param->_nb_instruction [context]; // == (address_src_lsb+1)
    259                     pc_next_is_ds_take = 1;
    260                   }
    261                 else
    262                   {
    263                     // branch is in the last slot of the packet
    264                     address_msb        = (address_src_lsb+2); // +1 == delayed slot
    265                     pc_next_is_ds_take = 0;
    266                   }
    267                 log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * address_msb     : %d",address_msb);
    268 
    269                 inst_ifetch_ptr             = address_src_lsb;
    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;
    271               }
    272             else
    273               {
    274                 // STEP (3b) : Sequential order : compute next paquet
    275                 log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"  * BTB miss : sequential order");
    276 
    277                 pc_next                     = address-address_lsb+_param->_nb_instruction [context]; // sequencial
    278                 pc_next_is_ds_take          = 0; // no branch, also no delay slot
    279                 inst_ifetch_ptr             = 0;
    280                 branch_state                = BRANCH_STATE_NONE;
    281                 branch_update_prediction_id = 0;
    282 
    283                 address_msb = _param->_nb_instruction [context];
    284               }
    285              
    286               PORT_WRITE(out_PREDICT_PC_NEXT                     [context]   , pc_next                    );
    287               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 
    295               for (uint32_t j=0; j<address_lsb; j++)
    296               PORT_WRITE(out_PREDICT_INSTRUCTION_ENABLE          [context][j], 0); // Before the address : not valid
    297               for (uint32_t j=address_lsb; j<((pc_current_is_ds_take)?1:address_msb); j++)
    298               PORT_WRITE(out_PREDICT_INSTRUCTION_ENABLE          [context][j], 1); // Vald packet
    299               for (uint32_t j=((pc_current_is_ds_take)?1:address_msb); j<_param->_nb_instruction [context]; j++)
    300               PORT_WRITE(out_PREDICT_INSTRUCTION_ENABLE          [context][j], 0); // After last address (branch) : not valid
    301               if (_param->_have_port_inst_ifetch_ptr[context])
    302               PORT_WRITE(out_PREDICT_INST_IFETCH_PTR             [context]   , inst_ifetch_ptr            );
    303               PORT_WRITE(out_PREDICT_BRANCH_STATE                [context]   , branch_state               );
    304               if (_param->_have_port_depth[context])
    305               PORT_WRITE(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [context]   , branch_update_prediction_id);
    306           }
    307 
    308         // Write output
    309         PORT_WRITE(out_PREDICT_BTB_VAL [i], btb_val);
    310         PORT_WRITE(out_PREDICT_DIR_VAL [i], dir_val);
    311         PORT_WRITE(out_PREDICT_RAS_VAL [i], ras_val);
    312         PORT_WRITE(out_PREDICT_UPT_VAL [i], upt_val);
     41        log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"  * PREDICT [%d]",i);
     42
     43        Tcontrol_t btb_val;
     44        Tcontrol_t dir_val;
     45        Tcontrol_t ras_val;
     46        Tcontrol_t upt_val;
     47
     48        Tcontext_t context = (reg_PREDICT_PRIORITY+i)%_param->_nb_context;
     49        log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * context    : %d",context);
     50
     51        ack [context] = 1;
     52           
     53        if (PORT_READ(in_PREDICT_VAL[context]) == 0)
     54          {
     55            log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * not valid ...");
     56
     57            btb_val = false;
     58            dir_val = false;
     59            ras_val = false;
     60            upt_val = false;
     61          }
     62        else
     63          {
     64            log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * valid ...");
     65
     66            Taddress_t          pc_previous           = PORT_READ(in_PREDICT_PC_PREVIOUS           [context]);
     67            Taddress_t          pc_current            = PORT_READ(in_PREDICT_PC_CURRENT            [context]);
     68            Tcontrol_t          pc_current_is_ds_take = PORT_READ(in_PREDICT_PC_CURRENT_IS_DS_TAKE [context]);
     69
     70            Taddress_t          pc_next                     ;
     71            Tcontrol_t          pc_next_is_ds_take          ;
     72            Tbranch_state_t     branch_state                ;
     73//          Tprediction_ptr_t   branch_update_prediction_id ;
     74            Tinst_ifetch_ptr_t  inst_ifetch_ptr             ;
     75           
     76            // STEP (1) - Compute the address source
     77            Taddress_t          address     = (pc_current_is_ds_take)?pc_previous:pc_current;
     78            Taddress_t          address_lsb = pc_current%_param->_nb_instruction [context]; //if pc_current_is_ds_take, then pc_current%_param->_nb_instruction [context] == 0
     79            Taddress_t          address_msb;
     80
     81            log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * address    : 0x%x",address);
     82
     83            // STEP (2) - Test if branch (access at branch_target_buffer)
     84            btb_val = true;
     85            ack [context] &= PORT_READ(in_PREDICT_BTB_ACK [i]);
     86
     87            if (_param->_have_port_context_id)
     88            PORT_WRITE(out_PREDICT_BTB_CONTEXT_ID [i],context);
     89            PORT_WRITE(out_PREDICT_BTB_ADDRESS    [i],address);
     90
     91            // special case :
     92            //  if pc_current_is_ds, then pc_previous have branch, also hit must be set.
     93            //  else : a another branch have eject this branch : can't accurate
     94            Tcontrol_t          hit         = PORT_READ(in_PREDICT_BTB_HIT[i]);
     95            Tcontrol_t          is_accurate = PORT_READ(in_PREDICT_BTB_IS_ACCURATE  [i]) and not (pc_current_is_ds_take and not hit);
     96
     97            // STEP (3) : Test if have branch in the packet
     98            if (hit == 1)
     99              {
     100                // STEP (3a) : branch - test condition
     101
     102                bool                use_dir      = false;
     103                bool                use_ras      = false;
     104                bool                use_upt      = false;
     105               
     106                Tbranch_condition_t cond         = PORT_READ(in_PREDICT_BTB_CONDITION    [i]);
     107                Taddress_t          address_src  = PORT_READ(in_PREDICT_BTB_ADDRESS_SRC  [i]);
     108                Taddress_t          address_dest = PORT_READ(in_PREDICT_BTB_ADDRESS_DEST [i]);
     109                Tcontrol_t          push;
     110                Tcontrol_t          direction;
     111
     112                switch (cond)
     113                  {
     114                  case BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK          : // l.j
     115                    {
     116                      // use none unit (dir, upt and ras)
     117                      direction    = true;
     118                      pc_next      = address_dest;
     119                      branch_state = BRANCH_STATE_NSPEC_TAKE;
     120                      break;
     121                    }
     122                  case BRANCH_CONDITION_NONE_WITH_WRITE_STACK             : // l.jal
     123                    {
     124                      use_upt      = true;
     125                      use_ras      = true;
     126                      push         = true;
     127                      direction    = true;
     128                      pc_next      = address_dest;
     129                      branch_state = BRANCH_STATE_NSPEC_TAKE;
     130                      break;
     131                    }
     132                  case BRANCH_CONDITION_FLAG_UNSET                        : // l.bnf
     133                  case BRANCH_CONDITION_FLAG_SET                          : // l.bf
     134                    {
     135                      use_upt      = true;
     136                      use_dir      = true;
     137                      // Test direction
     138                      direction = PORT_READ(in_PREDICT_DIR_DIRECTION [i]); // Direction is not the "flag predict" ... also flag_unset and flag_set is the same
     139                      if (direction = 1)
     140                        {
     141                          branch_state = BRANCH_STATE_SPEC_TAKE;
     142                          pc_next      = address_dest;
     143                        }
     144                      else
     145                        {
     146                          branch_state = BRANCH_STATE_SPEC_NTAKE;
     147                          pc_next      = address_src+2; // +1 = delay slot
     148                        }
     149                      break;
     150                    }
     151                  case BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK : // l.jr (rb!=9)
     152                    {
     153                      use_upt      = true;
     154                      use_ras      = true;
     155                      push         = true;
     156                      direction    = true;
     157                      pc_next      = address_dest;
     158                      branch_state = BRANCH_STATE_SPEC_TAKE;
     159                      break;
     160                    }
     161                  case BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK    : // l.jalr
     162                    {
     163                      use_upt      = true;
     164                      use_ras      = true;
     165                      push         = true;
     166                      direction    = true;
     167                      pc_next      = address_dest;
     168                      branch_state = BRANCH_STATE_NSPEC_TAKE;
     169                      break;
     170                    }
     171                  case BRANCH_CONDITION_READ_STACK                        : // l.jr (rb==9)
     172                    {
     173                      use_upt      = true;
     174                      use_ras      = true;
     175                      push         = false;
     176                      direction    = true;
     177                      pc_next      = PORT_READ(in_PREDICT_RAS_ADDRESS_POP  [i]);
     178                      branch_state = BRANCH_STATE_SPEC_TAKE;
     179                      break;
     180                    }
     181                  default :
     182                    {
     183                      ERRORMORPHEO(FUNCTION,"Unknow Condition");
     184                      break;
     185                    }
     186                  }
     187
     188                if (use_dir)
     189                  {
     190                    ack[context] &= PORT_READ(in_PREDICT_DIR_ACK [i]);
     191                    PORT_WRITE(out_PREDICT_DIR_ADDRESS_SRC [i], address_src);
     192                    PORT_WRITE(out_PREDICT_DIR_STATIC      [i], address_dest<address_src); // if destination is previous : the static direction is take
     193//                  PORT_WRITE(out_PREDICT_DIR_LAST_TAKE   [i], PORT_READ(in_PREDICT_BTB_LAST_TAKE [i]));
     194                  }
     195
     196                if (use_ras)
     197                  {
     198                    ack[context] &= PORT_READ(in_PREDICT_RAS_ACK [i]);
     199                    if (_param->_have_port_context_id)
     200                    PORT_WRITE(out_PREDICT_RAS_CONTEXT_ID   [i], context);
     201                    PORT_WRITE(out_PREDICT_RAS_PUSH         [i], push);
     202                    PORT_WRITE(out_PREDICT_RAS_ADDRESS_PUSH [i], address_src+2);
     203
     204                    is_accurate &= PORT_READ(in_PREDICT_RAS_HIT [i]); // if miss - prediction is not accurate
     205                  }
     206
     207                if (use_upt)
     208                  {
     209                    ack[context] &= PORT_READ(in_PREDICT_UPT_ACK [i]);
     210                   
     211                    PORT_WRITE(out_PREDICT_UPT_CONTEXT_ID       [i],context);
     212                    PORT_WRITE(out_PREDICT_UPT_BTB_ADDRESS_SRC  [i],address_src);
     213                    PORT_WRITE(out_PREDICT_UPT_BTB_ADDRESS_DEST [i],address_dest);
     214                    PORT_WRITE(out_PREDICT_UPT_BTB_CONDITION    [i],cond);
     215                    PORT_WRITE(out_PREDICT_UPT_BTB_LAST_TAKE    [i],direction);
     216                    PORT_WRITE(out_PREDICT_UPT_BTB_IS_ACCURATE  [i],is_accurate);
     217//                  PORT_WRITE(out_PREDICT_UPT_DIR_HISTORY      [i],PORT_READ(in_PREDICT_DIR_HISTORY      [i]));
     218                    PORT_WRITE(out_PREDICT_UPT_RAS_ADDRESS      [i],PORT_READ(in_PREDICT_RAS_ADDRESS_POP  [i]));
     219//                  PORT_WRITE(out_PREDICT_UPT_RAS_INDEX        [i],PORT_READ(in_PREDICT_RAS_INDEX        [i]));
     220                  }
     221
     222                // ack = 1 if :
     223                //   *             btb_ack
     224                //   * use_dir and dir_ack
     225                //   * use_ras and ras_ack
     226                //   * use_upt and upt_ack
     227//              ack [context] = (PORT_READ(in_PREDICT_BTB_ACK [i]) and
     228//                               (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i])) and
     229//                               (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i])) and
     230//                               (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i])));
     231
     232                dir_val = (use_dir and
     233                           PORT_READ(in_PREDICT_BTB_ACK [i]) and
     234                           (not use_ras or (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i]))) and
     235                           (not use_upt or (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i]))));
     236
     237                ras_val = (use_ras and
     238                           PORT_READ(in_PREDICT_BTB_ACK [i]) and
     239                           (not use_dir or (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i]))) and
     240                           (not use_upt or (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i]))));
     241
     242                upt_val = (use_upt and
     243                           PORT_READ(in_PREDICT_BTB_ACK [i]) and
     244                           (not use_dir or (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i]))) and
     245                           (not use_ras or (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i]))));
     246
     247//              pc_next      - is previously computed
     248//              branch_state - is previously computed
     249
     250                Taddress_t address_src_lsb  = address_src%_param->_nb_instruction [context];
     251
     252                log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * address_src     : 0x%x",address_src);
     253                log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * address_src_lsb : %d",address_src_lsb);
     254                if (address_src_lsb == (_param->_nb_instruction [context]-1))
     255                  {
     256                    // branch is in the last slot of the packet
     257                    log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * branch is in the last slot of the packet");
     258               
     259                    address_msb        = _param->_nb_instruction [context]; // == (address_src_lsb+1)
     260                    pc_next_is_ds_take = 1;
     261                  }
     262                else
     263                  {
     264                    // branch is in the last slot of the packet
     265                    address_msb        = (address_src_lsb+2); // +1 == delayed slot
     266                    pc_next_is_ds_take = 0;
     267                  }
     268                log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * address_msb     : %d",address_msb);
     269
     270                inst_ifetch_ptr             = address_src_lsb;
     271//              branch_update_prediction_id = (_param->_have_port_depth)?((PORT_READ(in_DEPTH_UPT_TAIL[context])+PORT_READ(in_DEPTH_UPT_NB_BRANCH [context]))%_param->_array_size_depth[context]):0;
     272              }
     273            else
     274              {
     275                // STEP (3b) : Sequential order : compute next paquet
     276                log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * BTB miss : sequential order");
     277
     278                pc_next                     = address-address_lsb+_param->_nb_instruction [context]; // sequencial
     279                pc_next_is_ds_take          = 0; // no branch, also no delay slot
     280                inst_ifetch_ptr             = 0;
     281                branch_state                = BRANCH_STATE_NONE;
     282//              branch_update_prediction_id = 0;
     283
     284                address_msb = _param->_nb_instruction [context];
     285              }
     286             
     287              PORT_WRITE(out_PREDICT_PC_NEXT                     [context]   , pc_next                    );
     288              PORT_WRITE(out_PREDICT_PC_NEXT_IS_DS_TAKE          [context]   , pc_next_is_ds_take         );
     289
     290              log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * instruction enable :");
     291              log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * nb_inst : %d",_param->_nb_instruction [context]);
     292              log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * [0:%d[ = 0",address_lsb);
     293              log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * [%d:%d[ = 1",address_lsb,((pc_current_is_ds_take)?1:address_msb));
     294              log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * [%d:%d[ = 0",((pc_current_is_ds_take)?1:address_msb),_param->_nb_instruction [context]);
     295
     296              for (uint32_t j=0; j<address_lsb; j++)
     297              PORT_WRITE(out_PREDICT_INSTRUCTION_ENABLE          [context][j], 0); // Before the address : not valid
     298              for (uint32_t j=address_lsb; j<((pc_current_is_ds_take)?1:address_msb); j++)
     299              PORT_WRITE(out_PREDICT_INSTRUCTION_ENABLE          [context][j], 1); // Vald packet
     300              for (uint32_t j=((pc_current_is_ds_take)?1:address_msb); j<_param->_nb_instruction [context]; j++)
     301              PORT_WRITE(out_PREDICT_INSTRUCTION_ENABLE          [context][j], 0); // After last address (branch) : not valid
     302              if (_param->_have_port_inst_ifetch_ptr)
     303              PORT_WRITE(out_PREDICT_INST_IFETCH_PTR             [context]   , inst_ifetch_ptr            );
     304              PORT_WRITE(out_PREDICT_BRANCH_STATE                [context]   , branch_state               );
     305              if (_param->_have_port_depth)
     306              PORT_WRITE(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [context]   , PORT_READ(in_PREDICT_UPT_BRANCH_UPDATE_PREDICTION_ID [i]));
     307          }
     308
     309        // Write output
     310        PORT_WRITE(out_PREDICT_BTB_VAL [i], btb_val);
     311        PORT_WRITE(out_PREDICT_DIR_VAL [i], dir_val);
     312        PORT_WRITE(out_PREDICT_RAS_VAL [i], ras_val);
     313        PORT_WRITE(out_PREDICT_UPT_VAL [i], upt_val);
    313314      }
    314315
     
    316317      PORT_WRITE(out_PREDICT_ACK[i],ack[i]);
    317318
    318     log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End");
     319    log_end(Prediction_unit_Glue,FUNCTION);
    319320  };
    320321
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_update.cpp

    r82 r88  
    2222  void Prediction_unit_Glue::genMealy_update (void)
    2323  {
    24     log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin");
     24    log_begin(Prediction_unit_Glue,FUNCTION);
    2525
    2626//     for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
     
    5252//       }
    5353
    54     log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End");
     54    log_end(Prediction_unit_Glue,FUNCTION);
    5555  };
    5656
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_transition.cpp

    r82 r88  
    2222  void Prediction_unit_Glue::transition (void)
    2323  {
    24     log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin");
     24    log_begin(Prediction_unit_Glue,FUNCTION);
    2525
    2626    if (PORT_READ(in_NRESET) == 0)
     
    3939#endif
    4040
    41     log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End");
     41    log_end(Prediction_unit_Glue,FUNCTION);
    4242  };
    4343
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Return_Address_Stack_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/config_mono_context.cfg

    r81 r88  
    332       4       *2      # size_queue     [0]
    4432      32      *2      # size_address   
    5 1       1       +1      # nb_inst_predict
    6 1       1       +1      # nb_inst_decod 
    7 1       1       +1      # nb_inst_update
     51       4       *4      # nb_inst_predict
     61       4       *4      # nb_inst_decod 
     71       4       *4      # nb_inst_update
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/config_multi_context.cfg

    r81 r88  
    444       4       *2      # size_queue     [1]
    558       8       *2      # size_queue     [2]
    6 16      16      *2      # size_queue     [3]
     68       8       *2      # size_queue     [3]
    7732      32      *2      # size_address   
    8 1       1       +1      # nb_inst_predict
    9 1       1       +1      # nb_inst_decod 
    10 1       1       +1      # nb_inst_update
     81       4       *4      # nb_inst_predict
     91       4       *4      # nb_inst_decod 
     101       4       *4      # nb_inst_update
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/src/main.cpp

    r81 r88  
    6060         _nb_inst_predict ,
    6161         _nb_inst_decod   ,
    62          _nb_inst_update  );
     62         _nb_inst_update  ,
     63         true // is_toplevel
     64         );
    6365     
    6466      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/src/test.cpp

    r82 r88  
    2323#endif
    2424
     25  Tusage_t _usage = USE_ALL;
     26
     27//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     28//   _usage = usage_unset(_usage,USE_VHDL                 );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     31//   _usage = usage_unset(_usage,USE_POSITION             );
     32//   _usage = usage_unset(_usage,USE_STATISTICS           );
     33//   _usage = usage_unset(_usage,USE_INFORMATION          );
     34
    2535  Return_Address_Stack * _Return_Address_Stack = new Return_Address_Stack
    2636    (name.c_str(),
     
    2939#endif
    3040     _param,
    31      USE_ALL);
     41     _usage);
    3242 
    3343#ifdef SYSTEMC
     
    403413
    404414        in_DECOD_VAL [port1]->write(0);
    405 
    406       }
     415        }
    407416    }
    408417
     
    419428  delete in_NRESET;
    420429
    421   delete []  in_PREDICT_VAL          ;
    422   delete [] out_PREDICT_ACK          ;
    423   delete []  in_PREDICT_CONTEXT_ID   ;
    424   delete [] out_PREDICT_HIT          ;
    425   delete []  in_PREDICT_PUSH         ;
    426   delete []  in_PREDICT_ADDRESS_PUSH ;
    427   delete [] out_PREDICT_ADDRESS_POP  ;
    428   delete [] out_PREDICT_INDEX        ;
    429   delete []  in_DECOD_VAL            ;
    430   delete [] out_DECOD_ACK            ;
    431   delete []  in_DECOD_PUSH           ;
    432   delete []  in_DECOD_CONTEXT_ID     ;
    433   delete [] out_DECOD_HIT            ;
    434   delete []  in_DECOD_ADDRESS_PUSH   ;
    435   delete [] out_DECOD_ADDRESS_POP    ;
    436   delete [] out_DECOD_INDEX          ;
    437   delete []  in_DECOD_MISS_PREDICTION;
    438   delete []  in_UPDATE_VAL           ;
    439   delete [] out_UPDATE_ACK           ;
    440   delete []  in_UPDATE_CONTEXT_ID    ;
    441   delete []  in_UPDATE_PUSH          ;
    442   delete []  in_UPDATE_INDEX         ;
    443   delete []  in_UPDATE_ADDRESS       ;
    444   delete []  in_UPDATE_MISS_PREDICTION;
    445   delete []  in_UPDATE_PREDICTION_IFETCH;
     430  DELETE1_SC_SIGNAL( in_PREDICT_VAL             ,_param->_nb_inst_predict);
     431  DELETE1_SC_SIGNAL(out_PREDICT_ACK             ,_param->_nb_inst_predict);
     432  DELETE1_SC_SIGNAL( in_PREDICT_CONTEXT_ID      ,_param->_nb_inst_predict);
     433  DELETE1_SC_SIGNAL(out_PREDICT_HIT             ,_param->_nb_inst_predict);
     434  DELETE1_SC_SIGNAL( in_PREDICT_PUSH            ,_param->_nb_inst_predict);
     435  DELETE1_SC_SIGNAL( in_PREDICT_ADDRESS_PUSH    ,_param->_nb_inst_predict);
     436  DELETE1_SC_SIGNAL(out_PREDICT_ADDRESS_POP     ,_param->_nb_inst_predict);
     437  DELETE1_SC_SIGNAL(out_PREDICT_INDEX           ,_param->_nb_inst_predict);
     438
     439  DELETE1_SC_SIGNAL( in_DECOD_VAL               ,_param->_nb_inst_decod);
     440  DELETE1_SC_SIGNAL(out_DECOD_ACK               ,_param->_nb_inst_decod);
     441  DELETE1_SC_SIGNAL( in_DECOD_CONTEXT_ID        ,_param->_nb_inst_decod);
     442  DELETE1_SC_SIGNAL(out_DECOD_HIT               ,_param->_nb_inst_decod);
     443  DELETE1_SC_SIGNAL( in_DECOD_PUSH              ,_param->_nb_inst_decod);
     444  DELETE1_SC_SIGNAL( in_DECOD_ADDRESS_PUSH      ,_param->_nb_inst_decod);
     445  DELETE1_SC_SIGNAL(out_DECOD_ADDRESS_POP       ,_param->_nb_inst_decod);
     446  DELETE1_SC_SIGNAL(out_DECOD_INDEX             ,_param->_nb_inst_decod);
     447  DELETE1_SC_SIGNAL( in_DECOD_MISS_PREDICTION   ,_param->_nb_inst_decod);
     448
     449  DELETE1_SC_SIGNAL( in_UPDATE_VAL              ,_param->_nb_inst_update);
     450  DELETE1_SC_SIGNAL(out_UPDATE_ACK              ,_param->_nb_inst_update);
     451  DELETE1_SC_SIGNAL( in_UPDATE_CONTEXT_ID       ,_param->_nb_inst_update);
     452  DELETE1_SC_SIGNAL( in_UPDATE_PUSH             ,_param->_nb_inst_update);
     453  DELETE1_SC_SIGNAL( in_UPDATE_ADDRESS          ,_param->_nb_inst_update);
     454  DELETE1_SC_SIGNAL( in_UPDATE_INDEX            ,_param->_nb_inst_update);
     455  DELETE1_SC_SIGNAL( in_UPDATE_MISS_PREDICTION  ,_param->_nb_inst_update);
     456  DELETE1_SC_SIGNAL( in_UPDATE_PREDICTION_IFETCH,_param->_nb_inst_update);
    446457
    447458#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Parameters.h

    r81 r88  
    2626  public : uint32_t   _nb_context     ;
    2727  public : uint32_t * _size_queue     ;//[nb_context]
    28   public : uint32_t   _size_address   ;
     28//public : uint32_t   _size_address   ;
    2929  public : uint32_t   _nb_inst_predict;
    3030  public : uint32_t   _nb_inst_decod  ;
    3131  public : uint32_t   _nb_inst_update ;
    3232   
    33   public : uint32_t   _size_context_id;
     33//public : uint32_t   _size_context_id;
    3434  public : uint32_t   _size_index     ;
    3535
    36   public : uint32_t   _have_port_context_id;
     36//public : uint32_t   _have_port_context_id;
    3737
    3838    //-----[ methods ]-----------------------------------------------------------
     
    4242                        uint32_t   nb_inst_predict,
    4343                        uint32_t   nb_inst_decod  ,
    44                         uint32_t   nb_inst_update );
     44                        uint32_t   nb_inst_update ,
     45                        bool       is_toplevel=false
     46                        );
    4547//   public : Parameters  (Parameters & param) ;
    4648  public : ~Parameters () ;
     49
     50  public :        void            copy       (void);
    4751
    4852  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Parameters.cpp

    r81 r88  
    2525                          uint32_t   nb_inst_predict,
    2626                          uint32_t   nb_inst_decod  ,
    27                           uint32_t   nb_inst_update )
     27                          uint32_t   nb_inst_update ,
     28                          bool       is_toplevel
     29                          )
    2830  {
    2931    log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin");
     
    3133    _nb_context      = nb_context     ;
    3234    _size_queue      = size_queue     ;
    33     _size_address    = size_address   ;
    3435    _nb_inst_predict = nb_inst_predict;
    3536    _nb_inst_decod   = nb_inst_decod  ;
    3637    _nb_inst_update  = nb_inst_update ;
    3738
    38     _size_context_id = log2(nb_context);
    3939    _size_index      = max<uint32_t>(size_queue,nb_context);
    4040
    41     _have_port_context_id = _size_context_id > 0;
     41    test();
    4242
    43     test();
     43    if (is_toplevel)
     44      {
     45        _size_instruction_address = size_address   ;
     46        _size_context_id          = log2(nb_context);
     47        _have_port_context_id     = _size_context_id > 0;
     48
     49        copy ();
     50      }
     51
    4452    log_printf(FUNC,Return_Address_Stack,FUNCTION,"End");
    4553  };
     
    6270  };
    6371
     72#undef  FUNCTION
     73#define FUNCTION "Return_Address_Stack::copy"
     74  void Parameters::copy (void)
     75  {
     76    log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin");
     77    log_printf(FUNC,Return_Address_Stack,FUNCTION,"End");
     78  };
     79
    6480}; // end namespace return_address_stack
    6581}; // end namespace prediction_unit
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Parameters_msg_error.cpp

    r81 r88  
    2929    for (uint32_t i=0; i<_nb_context; i++)
    3030      if (_size_queue [i] < 2)
    31         test.error("context \""+toString(i)+"\" :  size_queue must be > 2");
     31        test.error(toString(_("context \"%d\" : size_queue must be >= 2\n"),i));
    3232   
    3333    log_printf(FUNC,Return_Address_Stack,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Parameters_print.cpp

    r81 r88  
    2828    xml.balise_open("return_address_stack");
    2929    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();
     30//  xml.singleton_begin("size_address   "); xml.attribut("value",toString(_size_address   )); xml.singleton_end();
    3131    xml.singleton_begin("nb_inst_predict"); xml.attribut("value",toString(_nb_inst_predict)); xml.singleton_end();
    3232    xml.singleton_begin("nb_inst_decod  "); xml.attribut("value",toString(_nb_inst_decod  )); xml.singleton_end();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack.cpp

    r81 r88  
    3838    log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin");
    3939
     40#if DEBUG_Return_Address_Stac == true
     41    log_printf(INFO,Return_Address_Stac,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif   
     45
    4046    log_printf(INFO,Return_Address_Stack,FUNCTION,"Allocation");
    4147
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    5157        log_printf(INFO,Return_Address_Stack,FUNCTION,"Allocation of statistics");
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
     
    6672
    6773#ifdef SYSTEMC
    68     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    6975      {
    7076        for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
     
    165171
    166172#ifdef STATISTICS
    167     if (_usage & USE_STATISTICS)
     173    if (usage_is_set(_usage,USE_STATISTICS))
    168174      {
    169175        statistics_deallocation();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_allocation.cpp

    r81 r88  
    1717namespace return_address_stack {
    1818
    19 
    20 
    2119#undef  FUNCTION
    2220#define FUNCTION "Return_Address_Stack::allocation"
    2321  void Return_Address_Stack::allocation (
    2422#ifdef STATISTICS
    25                                morpheo::behavioural::Parameters_Statistics * param_statistics
     23                                         morpheo::behavioural::Parameters_Statistics * param_statistics
    2624#else
    27                                void
     25                                         void
    2826#endif
    29                                )
     27                                         )
    3028  {
    3129    log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin");
     
    6563      ALLOC1_SIGNAL_OUT(out_PREDICT_HIT         ,"hit"         ,Tcontrol_t,1);
    6664      ALLOC1_SIGNAL_IN ( in_PREDICT_PUSH        ,"push"        ,Tcontrol_t,1);
    67       ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS_PUSH,"address_push",Taddress_t,_param->_size_address);
    68       ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_POP ,"address_pop" ,Taddress_t,_param->_size_address);
     65      ALLOC1_SIGNAL_IN ( in_PREDICT_ADDRESS_PUSH,"address_push",Taddress_t,_param->_size_instruction_address);
     66      ALLOC1_SIGNAL_OUT(out_PREDICT_ADDRESS_POP ,"address_pop" ,Taddress_t,_param->_size_instruction_address);
    6967      ALLOC1_SIGNAL_OUT(out_PREDICT_INDEX       ,"index"       ,Tptr_t    ,_param->_size_index);
    7068    }
     
    7977      ALLOC1_SIGNAL_OUT(out_DECOD_HIT            ,"hit"            ,Tcontrol_t,1);
    8078      ALLOC1_SIGNAL_IN ( in_DECOD_PUSH           ,"push"           ,Tcontrol_t,1);
    81       ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_PUSH   ,"address_push"   ,Taddress_t,_param->_size_address);
    82       ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS_POP    ,"address_pop"    ,Taddress_t,_param->_size_address);
     79      ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_PUSH   ,"address_push"   ,Taddress_t,_param->_size_instruction_address);
     80      ALLOC1_SIGNAL_OUT(out_DECOD_ADDRESS_POP    ,"address_pop"    ,Taddress_t,_param->_size_instruction_address);
    8381      ALLOC1_SIGNAL_OUT(out_DECOD_INDEX          ,"index"          ,Tptr_t    ,_param->_size_index);
    8482      ALLOC1_SIGNAL_IN ( in_DECOD_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
     
    8987      ALLOC1_INTERFACE("update", IN, SOUTH, "update's interface", _param->_nb_inst_update);
    9088
    91       ALLOC1_VALACK_IN ( in_UPDATE_VAL            ,VAL);
    92       ALLOC1_VALACK_OUT(out_UPDATE_ACK            ,ACK);
    93       ALLOC1_SIGNAL_IN ( in_UPDATE_CONTEXT_ID     ,"context_id"     ,Tcontext_t,_param->_size_context_id);
    94       ALLOC1_SIGNAL_IN ( in_UPDATE_PUSH           ,"push"           ,Tcontrol_t,1);
    95       ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS        ,"address"        ,Taddress_t,_param->_size_address);
    96       ALLOC1_SIGNAL_IN ( in_UPDATE_INDEX          ,"index"          ,Tptr_t    ,_param->_size_index);
    97       ALLOC1_SIGNAL_IN ( in_UPDATE_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
     89      ALLOC1_VALACK_IN ( in_UPDATE_VAL              ,VAL);
     90      ALLOC1_VALACK_OUT(out_UPDATE_ACK              ,ACK);
     91      ALLOC1_SIGNAL_IN ( in_UPDATE_CONTEXT_ID       ,"context_id"       ,Tcontext_t,_param->_size_context_id);
     92      ALLOC1_SIGNAL_IN ( in_UPDATE_PUSH             ,"push"             ,Tcontrol_t,1);
     93      ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS          ,"address"          ,Taddress_t,_param->_size_instruction_address);
     94      ALLOC1_SIGNAL_IN ( in_UPDATE_INDEX            ,"index"            ,Tptr_t    ,_param->_size_index);
     95      ALLOC1_SIGNAL_IN ( in_UPDATE_MISS_PREDICTION  ,"miss_prediction"  ,Tcontrol_t,1);
    9896      ALLOC1_SIGNAL_IN ( in_UPDATE_PREDICTION_IFETCH,"prediction_ifetch",Tcontrol_t,1);
    9997    }
    10098
     99    if (usage_is_set(_usage,USE_SYSTEMC))
     100      {
    101101    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    102102
     
    118118    internal_DECOD_HIT   = new Tcontrol_t [_param->_nb_inst_decod  ];
    119119    internal_UPDATE_ACK  = new Tcontrol_t [_param->_nb_inst_update ];
     120      }
    120121
    121122    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    122123
    123124#ifdef POSITION
    124     _component->generate_file();
     125    if (usage_is_set(_usage,USE_POSITION))
     126      _component->generate_file();
    125127#endif
    126128
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_deallocation.cpp

    r81 r88  
    77
    88#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Return_Address_Stack.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    2324    log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin");
    2425
    25     if (_usage & USE_SYSTEMC)
     26    if (usage_is_set(_usage,USE_SYSTEMC))
    2627      {
    2728        delete    in_CLOCK ;
    2829        delete    in_NRESET;
    2930
    30         delete []  in_PREDICT_VAL          ;
    31         delete [] out_PREDICT_ACK          ;
    32         if (_param->_have_port_context_id)
    33         delete []  in_PREDICT_CONTEXT_ID   ;
    34         delete [] out_PREDICT_HIT          ;
    35         delete []  in_PREDICT_PUSH         ;
    36         delete []  in_PREDICT_ADDRESS_PUSH ;
    37         delete [] out_PREDICT_ADDRESS_POP  ;
    38         delete [] out_PREDICT_INDEX        ;
    39         delete []  in_DECOD_VAL            ;
    40         delete [] out_DECOD_ACK            ;
    41         delete []  in_DECOD_PUSH           ;
    42         if (_param->_have_port_context_id)
    43         delete []  in_DECOD_CONTEXT_ID     ;
    44         delete [] out_DECOD_HIT            ;
    45         delete []  in_DECOD_ADDRESS_PUSH   ;
    46         delete [] out_DECOD_ADDRESS_POP    ;
    47         delete [] out_DECOD_INDEX          ;
    48         delete []  in_DECOD_MISS_PREDICTION;
    49         delete []  in_UPDATE_VAL           ;
    50         delete [] out_UPDATE_ACK           ;
    51         if (_param->_have_port_context_id)
    52         delete []  in_UPDATE_CONTEXT_ID    ;
    53         delete []  in_UPDATE_PUSH          ;
    54         delete []  in_UPDATE_INDEX         ;
    55         delete []  in_UPDATE_ADDRESS       ;
    56         delete []  in_UPDATE_MISS_PREDICTION;
    57         delete []  in_UPDATE_PREDICTION_IFETCH;
     31        DELETE1_SIGNAL( in_PREDICT_VAL             ,_param->_nb_inst_predict,1);
     32        DELETE1_SIGNAL(out_PREDICT_ACK             ,_param->_nb_inst_predict,1);
     33        DELETE1_SIGNAL( in_PREDICT_CONTEXT_ID      ,_param->_nb_inst_predict,_param->_size_context_id);
     34        DELETE1_SIGNAL(out_PREDICT_HIT             ,_param->_nb_inst_predict,1);
     35        DELETE1_SIGNAL( in_PREDICT_PUSH            ,_param->_nb_inst_predict,1);
     36        DELETE1_SIGNAL( in_PREDICT_ADDRESS_PUSH    ,_param->_nb_inst_predict,_param->_size_instruction_address);
     37        DELETE1_SIGNAL(out_PREDICT_ADDRESS_POP     ,_param->_nb_inst_predict,_param->_size_instruction_address);
     38        DELETE1_SIGNAL(out_PREDICT_INDEX           ,_param->_nb_inst_predict,_param->_size_index);
     39
     40        DELETE1_SIGNAL( in_DECOD_VAL               ,_param->_nb_inst_decod,1);
     41        DELETE1_SIGNAL(out_DECOD_ACK               ,_param->_nb_inst_decod,1);
     42        DELETE1_SIGNAL( in_DECOD_CONTEXT_ID        ,_param->_nb_inst_decod,_param->_size_context_id);
     43        DELETE1_SIGNAL(out_DECOD_HIT               ,_param->_nb_inst_decod,1);
     44        DELETE1_SIGNAL( in_DECOD_PUSH              ,_param->_nb_inst_decod,1);
     45        DELETE1_SIGNAL( in_DECOD_ADDRESS_PUSH      ,_param->_nb_inst_decod,_param->_size_instruction_address);
     46        DELETE1_SIGNAL(out_DECOD_ADDRESS_POP       ,_param->_nb_inst_decod,_param->_size_instruction_address);
     47        DELETE1_SIGNAL(out_DECOD_INDEX             ,_param->_nb_inst_decod,_param->_size_index);
     48        DELETE1_SIGNAL( in_DECOD_MISS_PREDICTION   ,_param->_nb_inst_decod,1);
     49
     50        DELETE1_SIGNAL( in_UPDATE_VAL              ,_param->_nb_inst_update,1);
     51        DELETE1_SIGNAL(out_UPDATE_ACK              ,_param->_nb_inst_update,1);
     52        DELETE1_SIGNAL( in_UPDATE_CONTEXT_ID       ,_param->_nb_inst_update,_param->_size_context_id);
     53        DELETE1_SIGNAL( in_UPDATE_PUSH             ,_param->_nb_inst_update,1);
     54        DELETE1_SIGNAL( in_UPDATE_ADDRESS          ,_param->_nb_inst_update,_param->_size_instruction_address);
     55        DELETE1_SIGNAL( in_UPDATE_INDEX            ,_param->_nb_inst_update,_param->_size_index);
     56        DELETE1_SIGNAL( in_UPDATE_MISS_PREDICTION  ,_param->_nb_inst_update,1);
     57        DELETE1_SIGNAL( in_UPDATE_PREDICTION_IFETCH,_param->_nb_inst_update,1);
     58       
     59        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     60       
     61        for (uint32_t i=0; i<_param->_nb_context; i++)
     62          delete [] reg_stack [i];
     63        delete [] reg_stack;
     64        delete [] reg_TOP;
     65        delete [] reg_BOTTOM;
     66        delete [] reg_NB_ELT;
     67        delete [] reg_PREDICT_TOP;
     68        delete [] reg_PREDICT_BOTTOM;
     69        delete [] reg_PREDICT_NB_ELT;
     70       
     71        delete [] internal_PREDICT_ACK;
     72        delete [] internal_PREDICT_HIT;
     73        delete [] internal_DECOD_ACK;
     74        delete [] internal_DECOD_HIT;
     75        delete [] internal_UPDATE_ACK;
    5876      }
    59 
    60     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    61 
    62     delete [] reg_stack;
    63     delete [] reg_TOP;
    64     delete [] reg_BOTTOM;
    65     delete [] reg_NB_ELT;
    66     delete [] reg_PREDICT_TOP;
    67     delete [] reg_PREDICT_BOTTOM;
    68     delete [] reg_PREDICT_NB_ELT;
    69    
    70     delete [] internal_PREDICT_ACK;
    71     delete [] internal_PREDICT_HIT;
    72     delete [] internal_DECOD_ACK;
    73     delete [] internal_DECOD_HIT;
    74     delete [] internal_UPDATE_ACK;
    7577
    7678    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
    33     _interfaces->testbench();
     34    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     35      _interfaces->testbench();
    3436#endif
    3537
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_transition.cpp

    r81 r88  
    191191                 
    192192                  // Scan full assoc !!!
    193                   for (uint32_t j=0; j<_param->_size_queue [i]; j++)
     193                  for (uint32_t j=0; j<_param->_size_queue [context]; j++)
    194194                    // Test if this slot is tagged with "predict" : if true, tagged as miss
    195195                    if (reg_stack [context][j]._predict)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Prediction_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_min.cfg

    r82 r88  
    36361       1       +1 # dir_pht_size_address_share [2] [3]
    37372       2       +1 # ras_size_queue             [0] [nb_context]
    38 1       1       +1 # upt_size_queue             [0] [nb_context]
     382       2       +1 # upt_size_queue             [0] [nb_context]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_mono_context.cfg

    r82 r88  
    4430      30      +1 # size_address               
    551       4       *4 # nb_instruction             [0] [nb_context]
    6 1       1       +1 # nb_inst_decod              [0] [nb_decod_unit]
     61       4       *4 # nb_inst_decod              [0] [nb_decod_unit]
    771       1       +1 # nb_inst_branch_predict     
    8 1       1       +1 # nb_inst_branch_decod       
    9 1       1       +1 # nb_inst_branch_update     
    10 1       1       +1 # nb_inst_branch_complete   
     81       2       +1 # nb_inst_branch_decod       
     91       2       +1 # nb_inst_branch_update     
     101       2       +1 # nb_inst_branch_complete   
    11112       8       *4 # btb_size_queue             
    12122       2       +1 # btb_associativity         
     
    36361       1       +1 # dir_pht_size_address_share [2] [3]
    37372       4       *2 # ras_size_queue             [0] [nb_context]
    38 1       4       *4 # upt_size_queue             [0] [nb_context]
     382       4       *2 # upt_size_queue             [0] [nb_context]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_multi_context.cfg

    r82 r88  
    45454       4       *4 # upt_size_queue             [1] [nb_context]
    46464       4       *4 # upt_size_queue             [2] [nb_context]
    47 1       1       *4 # upt_size_queue             [3] [nb_context]
     478       8       *4 # upt_size_queue             [3] [nb_context]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/main.cpp

    r82 r88  
    129129         _dir_pht_size_address_share,
    130130         _ras_size_queue            ,
    131          _upt_size_queue           
     131         _upt_size_queue            ,
     132         true // is_toplevel
    132133         );
    133134     
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/test.cpp

    r82 r88  
    88
    99#define NB_ITERATION  1
    10 #define CYCLE_MAX     (128*NB_ITERATION)
     10#define CYCLE_MAX     1000000
    1111
    1212#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/include/test.h"
     
    2323#endif
    2424
     25  Tusage_t _usage = USE_ALL;
     26
     27//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     28//   _usage = usage_unset(_usage,USE_VHDL                 );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     31//   _usage = usage_unset(_usage,USE_POSITION             );
     32//   _usage = usage_unset(_usage,USE_STATISTICS           );
     33//   _usage = usage_unset(_usage,USE_INFORMATION          );
     34 
    2535  Prediction_unit * _Prediction_unit = new Prediction_unit
    2636    (name.c_str(),
     
    2939#endif
    3040     _param,
    31      USE_ALL);
     41     _usage);
    3242 
    3343#ifdef SYSTEMC
     
    4858  ALLOC1_SC_SIGNAL(out_PREDICT_PC_NEXT                    ,"out_PREDICT_PC_NEXT                    ",Taddress_t         ,_param->_nb_context);
    4959  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]);
     60  ALLOC2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE         ,"out_PREDICT_INSTRUCTION_ENABLE         ",Tcontrol_t         ,_param->_nb_context,_param->_nb_instruction[it1]);
    5161  ALLOC1_SC_SIGNAL(out_PREDICT_INST_IFETCH_PTR            ,"out_PREDICT_INST_IFETCH_PTR            ",Tinst_ifetch_ptr_t ,_param->_nb_context);
    5262  ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_STATE               ,"out_PREDICT_BRANCH_STATE               ",Tbranch_state_t    ,_param->_nb_context);
    5363  ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"out_PREDICT_BRANCH_UPDATE_PREDICTION_ID",Tprediction_ptr_t  ,_param->_nb_context);
    5464                                                                                                                         
    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  ALLOC2_SC_SIGNAL( in_DECOD_VAL                          ," in_DECOD_VAL                          ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     66  ALLOC2_SC_SIGNAL(out_DECOD_ACK                          ,"out_DECOD_ACK                          ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     67  ALLOC2_SC_SIGNAL( in_DECOD_CONTEXT_ID                   ," in_DECOD_CONTEXT_ID                   ",Tcontext_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     68  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[it1]);
     69  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_STATE                 ," in_DECOD_BRANCH_STATE                 ",Tbranch_state_t    ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     70  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[it1]);
     71  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION             ," in_DECOD_BRANCH_CONDITION             ",Tbranch_condition_t,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     72  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION             ," in_DECOD_BRANCH_DIRECTION             ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     73  ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_SRC                  ," in_DECOD_ADDRESS_SRC                  ",Taddress_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     74  ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_DEST                 ," in_DECOD_ADDRESS_DEST                 ",Taddress_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
    6575                                                                                                                         
    6676  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL                ," in_BRANCH_COMPLETE_VAL                ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
     
    8393  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST          ,"out_BRANCH_EVENT_ADDRESS_DEST          ",Taddress_t         ,_param->_nb_context);
    8494                                                                                                                         
    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);
     95  ALLOC1_SC_SIGNAL(out_DEPTH_CURRENT                      ,"out_DEPTH_CURRENT                      ",Tdepth_t           ,_param->_nb_context);
     96  ALLOC1_SC_SIGNAL(out_DEPTH_MIN                          ,"out_DEPTH_MIN                          ",Tdepth_t           ,_param->_nb_context);
     97  ALLOC1_SC_SIGNAL(out_DEPTH_MAX                          ,"out_DEPTH_MAX                          ",Tdepth_t           ,_param->_nb_context);
    8798 
    8899  /********************************************************
     
    102113  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_PC_NEXT                    ,_param->_nb_context);
    103114  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]);
     115  INSTANCE2_SC_SIGNAL(_Prediction_unit,out_PREDICT_INSTRUCTION_ENABLE         ,_param->_nb_context,_param->_nb_instruction[it1]);
    105116  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_inst_ifetch_ptr)
     118  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_INST_IFETCH_PTR            ,_param->_nb_context);
     119  if (_param->_have_port_depth)
     120  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context);
     121  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_VAL                          ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     122  INSTANCE2_SC_SIGNAL(_Prediction_unit,out_DECOD_ACK                          ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
    117123  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]);
     124  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_CONTEXT_ID                   ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     125  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_MATCH_INST_IFETCH_PTR        ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     126  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_STATE                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     127  if (_param->_have_port_depth)
     128  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_UPDATE_PREDICTION_ID  ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     129  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_CONDITION             ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     130  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_DIRECTION             ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     131  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_ADDRESS_SRC                  ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     132  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_ADDRESS_DEST                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
    127133
    128134  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_VAL                ,_param->_nb_inst_branch_complete);
     
    130136  if (_param->_have_port_context_id)
    131137  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_CONTEXT_ID         ,_param->_nb_inst_branch_complete);
    132   if (_param->_have_port_max_depth)
     138  if (_param->_have_port_depth)
    133139  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_DEPTH              ,_param->_nb_inst_branch_complete);
    134140  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_ADDRESS            ,_param->_nb_inst_branch_complete);
     
    148154  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_ADDRESS_DEST          ,_param->_nb_context);
    149155
    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]);
     156  if (_param->_have_port_depth)
     157    {
     158  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_CURRENT                      ,_param->_nb_context);
     159  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_MIN                          ,_param->_nb_context);
     160    }
     161  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_MAX                          ,_param->_nb_context);
    154162
    155163  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    166174//const uint32_t seed = static_cast<uint32_t>(time(NULL));
    167175
     176  const  int32_t percent_transaction_predict         = 80;
     177  const  int32_t percent_transaction_decod           = 80;
     178  const  int32_t percent_transaction_branch_complete = 80;
     179  const  int32_t percent_transaction_branch_event    = 80;
     180
    168181  srand(seed);
     182 
     183  uint32_t test1 = 1024; // TEST 1 : instruction without branch
     184  uint32_t test2 = 1024; // TEST 2 : sequence : 1 branch, 1 delayed slot
    169185
    170186  SC_START(0);
    171187  LABEL("Initialisation");
     188
     189  for (uint32_t i=0; i<_param->_nb_context; ++i)
     190    {
     191      in_PREDICT_VAL      [i]->write(0);
     192      in_BRANCH_EVENT_ACK [i]->write(0);
     193    }
     194
     195  for (uint32_t i=0; i<_param->_nb_decod_unit;++i)
     196    for (uint32_t j=0; j<_param->_nb_inst_decod[i]; ++j)
     197      {
     198        in_DECOD_VAL [i][j]->write(0);
     199      }
     200
     201  for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i)
     202    {
     203      in_BRANCH_COMPLETE_VAL [i]->write(0);
     204    }
    172205
    173206  LABEL("Reset");
     
    176209  in_NRESET->write(1); 
    177210
     211  for (uint32_t i=0; i<_param->_nb_context; ++i)
     212    {
     213      TEST(Tcontrol_t,out_PREDICT_ACK      [i]->read(),1); // Accept new request
     214      TEST(Tcontrol_t,out_BRANCH_EVENT_VAL [i]->read(),0);
     215      TEST(Tdepth_t  ,out_DEPTH_CURRENT    [i]->read(),0);
     216      TEST(Tdepth_t  ,out_DEPTH_MIN        [i]->read(),0);
     217      TEST(Tdepth_t  ,out_DEPTH_MAX        [i]->read(),0);
     218    }
     219
     220  for (uint32_t i=0; i<_param->_nb_decod_unit;++i)
     221    for (uint32_t j=0; j<_param->_nb_inst_decod[i]; ++j)
     222      {
     223        TEST(Tcontrol_t,out_DECOD_ACK [i][j]->read(),0); // No decod instruction
     224      }
     225
     226  for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i)
     227    {
     228      TEST(Tcontrol_t,out_BRANCH_COMPLETE_ACK [i]->read(),1); // Accept new branch_complete
     229    }
     230
    178231  LABEL("Loop of Test");
    179232
     233  Taddress_t PC_PREVIOUS           [_param->_nb_context];
     234  Taddress_t PC_CURRENT            [_param->_nb_context];
     235  Tcontrol_t PC_CURRENT_IS_DS_TAKE [_param->_nb_context];
     236
    180237  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    181238    {
    182239      LABEL("Iteration %d",iteration);
     240
     241      // TEST 1 : instruction without branch
     242      for (uint32_t test=0; test<test1; ++test)
     243        {
     244          for (uint32_t i=0; i<_param->_nb_context; ++i)
     245            {
     246              PC_CURRENT            [i] = (0x100000>>2);
     247              PC_CURRENT_IS_DS_TAKE [i] = 0;
     248              PC_PREVIOUS           [i] = PC_CURRENT[i]-1;
     249            }
     250         
     251          for (uint32_t i=0; i<_param->_nb_context; ++i)
     252            {
     253              in_PREDICT_VAL                   [i]->write((rand()%100)<percent_transaction_predict);
     254              in_PREDICT_PC_PREVIOUS           [i]->write(PC_PREVIOUS          [i]);
     255              in_PREDICT_PC_CURRENT            [i]->write(PC_CURRENT           [i]);
     256              in_PREDICT_PC_CURRENT_IS_DS_TAKE [i]->write(PC_CURRENT_IS_DS_TAKE[i]);
     257            }
     258
     259          SC_START(1);
     260
     261          for (uint32_t i=0; i<_param->_nb_context; ++i)
     262            // Test if transaction
     263            if (in_PREDICT_VAL [i]->read() and out_PREDICT_ACK [i]->read())
     264              {
     265                TEST(Taddress_t        ,out_PREDICT_PC_NEXT                     [i]->read(),PC_CURRENT[i]+_param->_nb_instruction[i]);
     266                TEST(Tcontrol_t        ,out_PREDICT_PC_NEXT_IS_DS_TAKE          [i]->read(),0);
     267                for (uint32_t j=0; j<_param->_nb_instruction[i]; ++j)
     268                TEST(Tcontrol_t        ,out_PREDICT_INSTRUCTION_ENABLE          [i][j]->read(),1);
     269                TEST(Tinst_ifetch_ptr_t,out_PREDICT_INST_IFETCH_PTR             [i]->read(),0);
     270                TEST(Tbranch_state_t   ,out_PREDICT_BRANCH_STATE                [i]->read(),BRANCH_STATE_NONE);
     271                TEST(Tprediction_ptr_t ,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i]->read(),0);
     272
     273                PC_PREVIOUS           [i] = PC_CURRENT [i];
     274                PC_CURRENT            [i] = out_PREDICT_PC_NEXT            [i]->read();
     275                PC_CURRENT_IS_DS_TAKE [i] = out_PREDICT_PC_NEXT_IS_DS_TAKE [i]->read();
     276              }
     277
     278          // Test another output
     279          for (uint32_t i=0; i<_param->_nb_context; ++i)
     280            {
     281              TEST(Tcontrol_t,out_BRANCH_EVENT_VAL [i]->read(),0);
     282              TEST(Tdepth_t  ,out_DEPTH_CURRENT    [i]->read(),0);
     283              TEST(Tdepth_t  ,out_DEPTH_MIN        [i]->read(),0);
     284              TEST(Tdepth_t  ,out_DEPTH_MAX        [i]->read(),0);
     285            }
     286         
     287          for (uint32_t i=0; i<_param->_nb_decod_unit;++i)
     288            for (uint32_t j=0; j<_param->_nb_inst_decod[i]; ++j)
     289              {
     290                TEST(Tcontrol_t,out_DECOD_ACK [i][j]->read(),0); // No decod instruction
     291              }
     292         
     293          for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i)
     294            {
     295              TEST(Tcontrol_t,out_BRANCH_COMPLETE_ACK [i]->read(),1); // Accept new branch_complete
     296            }
     297        }
    183298
    184299      SC_START(1);
     
    208323  DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context);
    209324
    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]);
     325  DELETE2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE       ,_param->_nb_context,_param->_nb_instruction[it1]);
     326  DELETE2_SC_SIGNAL( in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     327  DELETE2_SC_SIGNAL(out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     328  DELETE2_SC_SIGNAL( in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     329  DELETE2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     330  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     331  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     332  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     333  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     334  DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     335  DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
    221336
    222337  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL            ,_param->_nb_inst_branch_complete);
     
    239354  DELETE1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST   ,_param->_nb_context);
    240355
    241   DELETE1_SC_SIGNAL(out_DEPTH_NB_BRANCH    ,_param->_nb_context);
    242   DELETE1_SC_SIGNAL(out_DEPTH_TAIL         ,_param->_nb_context);
     356  DELETE1_SC_SIGNAL(out_DEPTH_CURRENT      ,_param->_nb_context);
     357  DELETE1_SC_SIGNAL(out_DEPTH_MIN          ,_param->_nb_context);
     358  DELETE1_SC_SIGNAL(out_DEPTH_MAX          ,_param->_nb_context);
    243359#endif
    244360
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Update_Prediction_Table_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/config_min.cfg

    r82 r88  
    11Update_Prediction_Table
    221       1       +1      # nb_context             
    3 1       4       *4      # size_queue             [0] [nb_context]
     31       1       *4      # size_upt_queue         [0] [nb_context]
     41       1       *4      # size_ufpt_queue        [0] [nb_context]
    4532      32      *2      # size_address           
    561       1       *4      # nb_inst_predict       
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/config_mono_context.cfg

    r81 r88  
    11Update_Prediction_Table
    221       1       +1      # nb_context             
    3 1       4       *4      # size_queue             [0] [nb_context]
     34       8       *2      # size_upt_queue         [0] [nb_context]
     41       4       *2      # size_ufpt_queue        [0] [nb_context]
    4532      32      *2      # size_address           
    564       4       *4      # nb_inst_predict       
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/config_multi_context.cfg

    r81 r88  
    11Update_Prediction_Table
    224       4       +1      # nb_context             
    3 4       4       *4      # size_queue             [0] [nb_context]
    4 1       1       *4      # size_queue             [1] [nb_context]
    5 8       8       *4      # size_queue             [2] [nb_context]
    6 2       2       *4      # size_queue             [3] [nb_context]
     34       4       *4      # size_upt_queue         [0] [nb_context]
     42       2       *4      # size_upt_queue         [1] [nb_context]
     58       8       *4      # size_upt_queue         [2] [nb_context]
     61       1       *4      # size_upt_queue         [3] [nb_context]
     74       4       *4      # size_ufpt_queue        [0] [nb_context]
     81       1       *4      # size_ufpt_queue        [1] [nb_context]
     92       2       *4      # size_ufpt_queue        [2] [nb_context]
     101       1       *4      # size_ufpt_queue        [3] [nb_context]
    71132      32      *2      # size_address           
    8124       4       *4      # nb_inst_predict       
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/main.cpp

    r81 r88  
    1515  err (_("list_params is :\n"));
    1616  err (_(" * nb_context                           (uint32_t)\n"));
    17   err (_(" * size_queue              [nb_context] (uint32_t)\n"));
     17  err (_(" * size_upt_queue          [nb_context] (uint32_t)\n"));
     18  err (_(" * size_ufpt_queue         [nb_context] (uint32_t)\n"));
    1819  err (_(" * size_address                         (uint32_t)\n"));
    1920  err (_(" * nb_inst_predict                      (uint32_t)\n"));
     
    4243  uint32_t   _nb_context              = fromString<uint32_t>(argv[x++]);
    4344
    44   if (argc != static_cast<int>(2+NB_PARAMS+2*_nb_context))
     45  if (argc != static_cast<int>(2+NB_PARAMS+3*_nb_context))
    4546    usage (argc, argv);
    4647
    47   uint32_t * _size_queue              = new uint32_t [_nb_context];
     48  uint32_t * _size_upt_queue              = new uint32_t [_nb_context];
    4849  for (uint32_t i=0; i<_nb_context; i++)
    49     _size_queue [i] = fromString<uint32_t>(argv[x++]);
     50    _size_upt_queue  [i] = fromString<uint32_t>(argv[x++]);
     51  uint32_t * _size_ufpt_queue             = new uint32_t [_nb_context];
     52  for (uint32_t i=0; i<_nb_context; i++)
     53    _size_ufpt_queue [i] = fromString<uint32_t>(argv[x++]);
    5054  uint32_t   _size_address            = fromString<uint32_t>(argv[x++]);
    5155  uint32_t   _nb_inst_predict         = fromString<uint32_t>(argv[x++]);
     
    6367      morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::Parameters
    6468        (_nb_context             ,
    65          _size_queue             ,
     69         _size_upt_queue         ,
     70         _size_ufpt_queue        ,
    6671         _size_address           ,
    6772         _nb_inst_predict        ,
     
    7075         _nb_inst_update         ,
    7176         _size_history           ,
    72          _size_ras_index         );
     77         _size_ras_index         ,
     78         true //is_toplevel
     79         );
    7380     
    7481      msg(_("%s"),param->print(1).c_str());
     
    8996
    9097  delete [] _size_ras_index;
    91   delete [] _size_queue;
     98  delete [] _size_ufpt_queue;
     99  delete [] _size_upt_queue;
    92100
    93101  return (_return);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp

    r82 r88  
    11/*
    2  * $Id$
     2 * $id: test.cpp 82 2008-05-01 16:48:45Z rosiere $
    33 *
    44 * [ Description ]
     
    1313#include "Common/include/Test.h"
    1414#include "Behavioural/include/Allocation.h"
     15
     16typedef struct
     17{
     18  uint32_t            ufpt_ptr    ;
     19  uint32_t            upt_ptr     ;
     20
     21  Tcontext_t          context     ;
     22  Taddress_t          address_src ;
     23  Taddress_t          address_dest;
     24  Taddress_t          address_good;
     25  Tbranch_condition_t condition   ;
     26  Tcontrol_t          take        ;
     27  Tcontrol_t          take_good   ;
     28  Tcontrol_t          flag        ;
     29  Tcontrol_t          is_accurate ;
     30  Thistory_t          history     ;
     31  Taddress_t          ras_address ;
     32  Tptr_t              ras_index   ;
     33  Tcontrol_t          miss_ifetch ;
     34  Tcontrol_t          miss_decod  ;
     35  Tcontrol_t          miss_commit ;
     36} request_t;
    1537
    1638void test (string name,
     
    6183  ALLOC1_SC_SIGNAL( in_PREDICT_RAS_ADDRESS            ," in_PREDICT_RAS_ADDRESS            ",Taddress_t         ,_param->_nb_inst_predict);
    6284  ALLOC1_SC_SIGNAL( in_PREDICT_RAS_INDEX              ," in_PREDICT_RAS_INDEX              ",Tptr_t             ,_param->_nb_inst_predict);
    63 //ALLOC1_SC_SIGNAL(out_PREDICT_UPDATE_PREDICTION_ID   ,"out_PREDICT_UPDATE_PREDICTION_ID   ",Tprediction_ptr_t  ,_param->_nb_inst_predict);
     85  ALLOC1_SC_SIGNAL(out_PREDICT_UPDATE_PREDICTION_ID   ,"out_PREDICT_UPDATE_PREDICTION_ID   ",Tprediction_ptr_t  ,_param->_nb_inst_predict);
    6486  ALLOC1_SC_SIGNAL( in_DECOD_VAL                      ," in_DECOD_VAL                      ",Tcontrol_t         ,_param->_nb_inst_decod);
    6587  ALLOC1_SC_SIGNAL(out_DECOD_ACK                      ,"out_DECOD_ACK                      ",Tcontrol_t         ,_param->_nb_inst_decod);
     
    7597  ALLOC1_SC_SIGNAL( in_DECOD_UPDATE_PREDICTION_ID     ," in_DECOD_UPDATE_PREDICTION_ID     ",Tprediction_ptr_t  ,_param->_nb_inst_decod);
    7698//ALLOC1_SC_SIGNAL(out_DECOD_DEPTH                    ,"out_DECOD_DEPTH                    ",Tdepth_t           ,_param->_nb_inst_decod);
     99  ALLOC1_SC_SIGNAL( in_DECOD_IS_ACCURATE              ," in_DECOD_IS_ACCURATE              ",Tcontrol_t         ,_param->_nb_inst_decod);
    77100
    78101  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL            ," in_BRANCH_COMPLETE_VAL            ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
     
    111134  ALLOC1_SC_SIGNAL(out_UPDATE_RAS_INDEX               ,"out_UPDATE_RAS_INDEX               ",Tptr_t             ,_param->_nb_inst_update);
    112135  ALLOC1_SC_SIGNAL(out_UPDATE_RAS_PREDICTION_IFETCH   ,"out_UPDATE_RAS_PREDICTION_IFETCH   ",Tcontrol_t         ,_param->_nb_inst_update);
    113   ALLOC1_SC_SIGNAL(out_DEPTH_NB_BRANCH                ,"out_DEPTH_NB_BRANCH                ",Tdepth_t           ,_param->_nb_context);
    114   ALLOC1_SC_SIGNAL(out_DEPTH_TAIL                     ,"out_DEPTH_TAIL                     ",Tdepth_t           ,_param->_nb_context);
     136  ALLOC1_SC_SIGNAL(out_DEPTH_CURRENT                  ,"out_DEPTH_CURRENT                  ",Tdepth_t           ,_param->_nb_context);
     137  ALLOC1_SC_SIGNAL(out_DEPTH_MIN                      ,"out_DEPTH_MIN                      ",Tdepth_t           ,_param->_nb_context);
     138  ALLOC1_SC_SIGNAL(out_DEPTH_MAX                      ,"out_DEPTH_MAX                      ",Tdepth_t           ,_param->_nb_context);
    115139 
    116140  /********************************************************
     
    136160  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_PREDICT_RAS_ADDRESS            ,_param->_nb_inst_predict);
    137161  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_PREDICT_RAS_INDEX              ,_param->_nb_inst_predict);
    138 //if (_param->_have_port_depth)
    139 //INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_PREDICT_UPDATE_PREDICTION_ID   ,_param->_nb_inst_predict);
     162  if (_param->_have_port_depth)
     163  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_PREDICT_UPDATE_PREDICTION_ID   ,_param->_nb_inst_predict);
    140164  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_VAL                      ,_param->_nb_inst_decod);
    141165  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DECOD_ACK                      ,_param->_nb_inst_decod);
     
    150174  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_MISS_IFETCH              ,_param->_nb_inst_decod);
    151175  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_MISS_DECOD               ,_param->_nb_inst_decod);
    152   if (_param->_have_port_max_depth)
     176  if (_param->_have_port_depth)
    153177  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_UPDATE_PREDICTION_ID     ,_param->_nb_inst_decod);
    154178//if (_param->_have_port_depth)
    155179//INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DECOD_DEPTH                    ,_param->_nb_inst_decod);
     180  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_IS_ACCURATE              ,_param->_nb_inst_decod);
    156181  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_VAL            ,_param->_nb_inst_branch_complete);
    157182  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_ACK            ,_param->_nb_inst_branch_complete);
    158183  if (_param->_have_port_context_id)
    159184  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_CONTEXT_ID     ,_param->_nb_inst_branch_complete);
    160   if (_param->_have_port_max_depth)
     185  if (_param->_have_port_depth)
    161186  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_DEPTH          ,_param->_nb_inst_branch_complete);
    162187  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_ADDRESS        ,_param->_nb_inst_branch_complete);
     
    171196//   if (_param->_have_port_context_id)
    172197//   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_CONTEXT_ID     ,_param->_nb_context);
    173 //   if (_param->_have_port_max_depth)
     198//   if (_param->_have_port_depth)
    174199//   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_DEPTH          ,_param->_nb_context);
    175200//   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_ADDRESS        ,_param->_nb_context);
     
    196221  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_INDEX               ,_param->_nb_inst_update);
    197222  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_PREDICTION_IFETCH   ,_param->_nb_inst_update);
    198   for (uint32_t i=0; i<_param->_nb_context; i++)
     223  if (_param->_have_port_depth)
    199224    {
    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]);
     225  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_CURRENT                  ,_param->_nb_context);
     226  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_MIN                      ,_param->_nb_context);
    205227    }
     228  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_MAX                      ,_param->_nb_context);
    206229
    207230  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    225248  const  int32_t percent_transaction_update          = 75;
    226249
     250
     251
     252  std::list<request_t> ufpt;
     253  std::list<request_t> upt;
     254
    227255  SC_START(0);
    228256  LABEL("Initialisation");
     
    233261  in_NRESET->write(1); 
    234262
    235   for (uint32_t i=0; i<_param->_nb_context; i++)
     263  Tdepth_t ufpt_bottom [_param->_nb_context];
     264  Tdepth_t ufpt_top    [_param->_nb_context];
     265
     266  Tdepth_t upt_bottom  [_param->_nb_context];
     267  Tdepth_t upt_top     [_param->_nb_context];
     268
     269  for (uint32_t i=0; i<_param->_nb_context; ++i)
    236270    {
    237       PORT_WRITE(in_BRANCH_EVENT_ACK [i],1);
     271      ufpt_bottom [i] = 0;
     272      ufpt_top    [i] = 0;
     273      upt_bottom  [i] = 0;
     274      upt_top     [i] = 0;
    238275    }
    239276
    240   LABEL("Loop of Test");
     277  for (uint32_t i=0; i<_param->_nb_context; ++i)
     278    {
     279      TEST(Tdepth_t,out_DEPTH_CURRENT [i]->read(),upt_top    [i]);
     280      TEST(Tdepth_t,out_DEPTH_MIN     [i]->read(),upt_bottom [i]);
     281      TEST(Tdepth_t,out_DEPTH_MAX     [i]->read(),upt_top    [i]);
     282    }
    241283
    242284  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
    243285    {
    244286      LABEL("Iteration %d",iteration);
    245      
     287
     288      for (uint32_t i=0; i<_param->_nb_inst_predict; ++i)
     289        in_PREDICT_VAL         [i]->write(0);
     290      for (uint32_t i=0; i<_param->_nb_inst_decod; ++i)
     291        in_DECOD_VAL           [i]->write(0);
     292      for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i)
     293        in_BRANCH_COMPLETE_VAL [i]->write(0);
     294      for (uint32_t i=0; i<_param->_nb_context; ++i)
     295        in_BRANCH_EVENT_ACK    [i]->write(0);
     296      for (uint32_t i=0; i<_param->_nb_inst_update; ++i)
     297        in_UPDATE_ACK          [i]->write(0);
     298
     299      //---------------------------------------------------------------------
     300      //---------------------------------------------------------------------
     301      // COMMON CASE
     302      //---------------------------------------------------------------------
     303      //---------------------------------------------------------------------
     304      if (1)
    246305      {
    247306        uint32_t context = rand() % _param->_nb_context;
    248        
    249 //      LABEL("KANE : %d",context);
    250 
    251         LABEL("PREDICT - fill the queue");
    252        
     307
    253308        {
     309          LABEL("PREDICT - fill the queue");
    254310          uint32_t port = rand() % _param->_nb_inst_predict;
     311
     312          LABEL("  * context : %d",context);
     313          LABEL("  * port    : %d",port);
    255314         
    256           for (uint32_t i=0; i<_param->_size_queue[context]; i++)
     315          for (uint32_t i=0; i<_param->_size_ufpt_queue[context]; i++)
    257316            {
    258              
    259               bool find = false;
     317              request_t request;
     318              request.context          = context;
     319              request.address_src      = 0xdeadbeef+i;
     320              request.address_dest     = 0x21071981+i;                                   
     321              request.address_good     = request.address_dest;
     322              request.condition        = BRANCH_CONDITION_FLAG_SET;                     
     323              request.take             = 1;                                             
     324              request.take_good        = 1;                                             
     325              request.flag             = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good);
     326              request.is_accurate      = true;
     327              request.miss_ifetch      = false;
     328              request.miss_decod       = false;
     329              request.miss_commit      = false;
     330              request.history          = i;                                             
     331              request.ras_address      = 0xdeaddead+i;                                   
     332              request.ras_index        = (0x12345678+i)%_param->_size_ras_index[context];
     333              request.ufpt_ptr         = ufpt_top [context];
     334//            request.upt_ptr;
     335
     336              bool have_transaction = false;
    260337              do
    261338                {
    262339                  in_PREDICT_VAL              [port]->write((rand()%100)<percent_transaction_predict);
    263                   in_PREDICT_CONTEXT_ID       [port]->write(context);
    264                   in_PREDICT_BTB_ADDRESS_SRC  [port]->write(0xdeadbeef+i);
    265                   in_PREDICT_BTB_ADDRESS_DEST [port]->write(0x21071981+i);
    266                   in_PREDICT_BTB_CONDITION    [port]->write(BRANCH_CONDITION_FLAG_SET);
    267                   in_PREDICT_BTB_LAST_TAKE    [port]->write(1);
    268                   in_PREDICT_BTB_IS_ACCURATE  [port]->write((rand()%100)<percent_transaction_predict);
    269                   in_PREDICT_DIR_HISTORY      [port]->write(i);
    270                   in_PREDICT_RAS_ADDRESS      [port]->write(0xdeaddead+i);
    271                   in_PREDICT_RAS_INDEX        [port]->write((0x12345678+i)%_param->_size_ras_index[context]);
    272                  
    273                   if (_param->_have_port_depth[context])
    274                     {
    275                       TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
    276                     }
    277                       TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i);
     340                  in_PREDICT_CONTEXT_ID       [port]->write(request.context     );
     341                  in_PREDICT_BTB_ADDRESS_SRC  [port]->write(request.address_src );
     342                  in_PREDICT_BTB_ADDRESS_DEST [port]->write(request.address_dest);
     343                  in_PREDICT_BTB_CONDITION    [port]->write(request.condition   );
     344                  in_PREDICT_BTB_LAST_TAKE    [port]->write(request.take        );
     345                  in_PREDICT_BTB_IS_ACCURATE  [port]->write(request.is_accurate );
     346                  in_PREDICT_DIR_HISTORY      [port]->write(request.history     );
     347                  in_PREDICT_RAS_ADDRESS      [port]->write(request.ras_address );
     348                  in_PREDICT_RAS_INDEX        [port]->write(request.ras_index   );
     349                 
     350                  if (_param->_have_port_depth)
     351                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     352                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    278353                     
    279                   SC_START(0);
    280                  
    281                   LABEL("PREDICT         [%d] %d - %d (accurate : %d).",port,in_PREDICT_VAL [port]->read(),out_PREDICT_ACK [port]->read(), in_PREDICT_BTB_IS_ACCURATE [port]->read());
     354                  SC_START(0); // fct melay
     355                 
     356                  LABEL("PREDICT         [%d] %d - %d (accurate : %d).",
     357                        port,
     358                         in_PREDICT_VAL [port]->read(),
     359                        out_PREDICT_ACK [port]->read(),
     360                         in_PREDICT_BTB_IS_ACCURATE [port]->read());
    282361                 
    283362                  if (in_PREDICT_VAL [port]->read() and out_PREDICT_ACK [port]->read())
    284363                    {
    285364                      LABEL("PREDICT         [%d] - Transaction accepted",port);
    286                       find = true;
     365                      have_transaction = true;
     366
     367                      if (_param->_have_port_depth)
     368                      TEST(Tprediction_ptr_t,out_PREDICT_UPDATE_PREDICTION_ID [port]->read(),ufpt_top [context]);
     369                     
     370                      ufpt_top [context] = (ufpt_top [context]+1)%_param->_size_ufpt_queue[context];
    287371                    }
    288372                 
    289                   SC_START(1);
    290                  
    291                 } while (not find);
    292               in_PREDICT_VAL              [port]->write(0);
    293              
    294               if (_param->_have_port_depth[context])
    295                 {
    296                   TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
    297                 }
    298                   TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i+1);
    299 
     373                  SC_START(1); // transition
     374                 
     375                } while (not have_transaction);
     376
     377              ufpt.push_back(request);
     378
     379              in_PREDICT_VAL [port]->write(0);
     380           
     381              if (_param->_have_port_depth)
     382              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     383              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    300384            }
    301385        }
    302386       
    303         LABEL("DECOD - hit ifetch");
    304        
    305         {
     387        {
     388          LABEL("DECOD");
    306389          uint32_t port = rand() % _param->_nb_inst_decod;
    307          
    308           for (uint32_t i=0; i<_param->_size_queue[context]; i++)
     390
     391          LABEL("  * context : %d",context);
     392          LABEL("  * port    : %d",port);
     393         
     394          for (uint32_t i=0; i<_param->_size_ufpt_queue[context]; i++)
    309395            {
    310              
    311               bool find = false;
     396              request_t request = ufpt.front();
     397
     398              bool have_transaction = false;
    312399              do
    313400                {
    314401                  in_DECOD_VAL                  [port]->write((rand()%100)<percent_transaction_decod);
    315                   in_DECOD_CONTEXT_ID           [port]->write(context);
    316                   in_DECOD_BTB_ADDRESS_SRC      [port]->write(0xdeadbeef+i);
    317                   in_DECOD_BTB_ADDRESS_DEST     [port]->write(0x21071981+i);
    318                   in_DECOD_BTB_CONDITION        [port]->write(BRANCH_CONDITION_FLAG_SET);
    319                   in_DECOD_BTB_LAST_TAKE        [port]->write(1);
    320                   in_DECOD_RAS_ADDRESS          [port]->write(0xdeaddead+i);
    321                   in_DECOD_RAS_INDEX            [port]->write((0x12345678+i)%_param->_size_ras_index[context]);
    322                   in_DECOD_MISS_IFETCH          [port]->write(false);
    323                   in_DECOD_MISS_DECOD           [port]->write(false);
    324                   in_DECOD_UPDATE_PREDICTION_ID [port]->write(i);
    325                  
    326                   if (_param->_have_port_depth[context])
    327                     {
    328                       TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
    329                     }
    330                       TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
    331                  
    332                   SC_START(0);
    333                  
    334                   LABEL("DECOD           [%d] %d - %d.",port,in_DECOD_VAL [port]->read(),out_DECOD_ACK [port]->read());
     402                  in_DECOD_CONTEXT_ID           [port]->write(request.context     );
     403                  in_DECOD_BTB_ADDRESS_SRC      [port]->write(request.address_src );
     404                  in_DECOD_BTB_ADDRESS_DEST     [port]->write(request.address_dest);
     405                  in_DECOD_BTB_CONDITION        [port]->write(request.condition   );
     406                  in_DECOD_BTB_LAST_TAKE        [port]->write(request.take        );
     407                  in_DECOD_RAS_ADDRESS          [port]->write(request.ras_address );
     408                  in_DECOD_RAS_INDEX            [port]->write(request.ras_index   );
     409                  in_DECOD_UPDATE_PREDICTION_ID [port]->write(request.ufpt_ptr    );
     410                  in_DECOD_MISS_IFETCH          [port]->write(request.miss_ifetch );
     411                  in_DECOD_MISS_DECOD           [port]->write(request.miss_decod  );
     412                  in_DECOD_IS_ACCURATE          [port]->write(request.is_accurate );
     413
     414                  SC_START(0); // fct melay
     415                 
     416                  LABEL("DECOD           [%d] %d - %d",
     417                        port,
     418                         in_PREDICT_VAL [port]->read(),
     419                        out_PREDICT_ACK [port]->read());
    335420                 
    336421                  if (in_DECOD_VAL [port]->read() and out_DECOD_ACK [port]->read())
    337422                    {
    338                       LABEL("DECOD           [%d] - Transaction accepted",port);
    339                       find = true;
     423                      LABEL("DECOD          [%d] - Transaction accepted",port);
     424                      have_transaction = true;
     425
     426                      request.upt_ptr = upt_top [context];
     427                      upt.push_back(request);
     428                      ufpt.pop_front();
     429
     430                      upt_top [context] = (upt_top [context]+1)%_param->_size_upt_queue[context];
    340431                    }
    341                  
    342                   SC_START(1);
    343                  
    344                 } while (not find);
     432
     433                  SC_START(1); // transition
     434
     435                } while (not have_transaction);
     436
    345437              in_DECOD_VAL              [port]->write(0);
    346438             
    347               if (_param->_have_port_depth[context])
    348                 {
    349                   TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
    350                 }
    351                   TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
    352             }
    353         }
     439              if (_param->_have_port_depth)
     440              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     441              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     442            }
     443        }
     444
     445        {
     446          LABEL("BRANCH_COMPLETE - hit ifetch");
    354447       
    355         LABEL("BRANCH_COMPLETE - hit ifetch");
     448          uint32_t port = rand() % _param->_nb_inst_branch_complete;
    356449       
    357         {
    358           uint32_t port = rand() % _param->_nb_inst_branch_complete;
    359          
    360           for (uint32_t i=0; i<_param->_size_queue[context]; i++)
     450          LABEL("  * port    : %d",port);
     451 
     452          std::list<request_t>::iterator it_upt = upt.begin();
     453
     454//        for (uint32_t i=0; i<_param->_size_ufpt_queue[context]; i++)
     455          for (uint32_t i=0; i<upt.size(); i++)
    361456            {
    362               bool find = false;
     457              bool have_transaction = false;
     458
    363459              do
    364460                {
    365                   in_BRANCH_COMPLETE_VAL                  [port]->write((rand()%100)<percent_transaction_branch_complete);
    366                   in_BRANCH_COMPLETE_CONTEXT_ID           [port]->write(context);
    367                   in_BRANCH_COMPLETE_DEPTH                [port]->write(i);
    368                   in_BRANCH_COMPLETE_ADDRESS              [port]->write(0xcacacaca+i);
    369                   in_BRANCH_COMPLETE_FLAG                 [port]->write(1);
    370                  
    371                   if (_param->_have_port_depth[context])
    372                     {
    373                       TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
    374                     }
    375                       TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
     461                  in_BRANCH_COMPLETE_VAL        [port]->write((rand()%100)<percent_transaction_branch_complete);
     462                  in_BRANCH_COMPLETE_CONTEXT_ID [port]->write(it_upt->context     );
     463                  in_BRANCH_COMPLETE_DEPTH      [port]->write(it_upt->upt_ptr     );
     464                  in_BRANCH_COMPLETE_ADDRESS    [port]->write(it_upt->address_good);
     465                  in_BRANCH_COMPLETE_FLAG       [port]->write(it_upt->flag        );
     466
     467                  if (_param->_have_port_depth)
     468                  TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     469                  TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    376470                 
    377471                  SC_START(0);
     
    382476                    {
    383477                      LABEL("BRANCH_COMPLETE [%d] - Transaction accepted",port);
    384                       find = true;
     478                      have_transaction = true;
    385479                     
    386                       TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),0);
    387                       TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE           [port]->read(),1);
    388                       TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC    [port]->read(),0xdeadbeef+i);
    389                       TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST   [port]->read(),0x21071981+i);
     480                      TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),it_upt->miss_commit );
     481                      TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE           [port]->read(),it_upt->take_good   );
     482                      TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC    [port]->read(),it_upt->address_src );
     483                      TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST   [port]->read(),it_upt->address_good);
     484
     485                      it_upt ++;
    390486                    }
    391487                 
    392488                  SC_START(1);
    393 
    394                 } while (not find);
    395               in_BRANCH_COMPLETE_VAL              [port]->write(0);
     489                } while (not have_transaction);
     490
     491              in_BRANCH_COMPLETE_VAL [port]->write(0);
    396492             
    397               if (_param->_have_port_depth[context])
    398                 {
    399                   TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
    400                 }
    401                   TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
     493              if (_param->_have_port_depth)
     494              TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     495              TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    402496            }
    403497        }
     498
     499        {
     500          LABEL("UPDATE - hit ifetch");
    404501       
    405         LABEL("UPDATE - hit ifetch");
     502          uint32_t port = 0;
    406503       
    407         {
    408           uint32_t port = 0; //rand() % _param->_nb_inst_update;
    409          
    410           for (uint32_t i=0; i<_param->_size_queue[context]; i++)
     504          LABEL("  * port    : %d",port);
     505          std::list<request_t>::iterator it_upt = upt.begin();
     506 
     507//        for (uint32_t i=0; i<_param->_size_ufpt_queue[context]; i++)
     508          for (uint32_t i=0; i<upt.size(); i++)
    411509            {
    412               bool find = false;
     510              LABEL("Address_src (-1): %.8x (%d)",out_UPDATE_BTB_ADDRESS_SRC [i]->read(),upt.size());
     511
     512              bool have_transaction = false;
     513
    413514              do
    414515                {
     516                  LABEL("Address_src (0) : %.8x",out_UPDATE_BTB_ADDRESS_SRC [i]->read());
     517
    415518                  in_UPDATE_ACK [port]->write((rand()%100)<percent_transaction_update);
    416                  
     519
     520//                   if (_param->_have_port_depth)
     521//                   TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     522//                   TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
     523                 
     524                  LABEL("Address_src (1) : %.8x",out_UPDATE_BTB_ADDRESS_SRC [i]->read());
    417525                  SC_START(0);
     526                  LABEL("Address_src (2) : %.8x",out_UPDATE_BTB_ADDRESS_SRC [i]->read());
     527                 
     528                  LABEL("UPDATE [%d] %d - %d.",port,out_UPDATE_VAL [port]->read(),in_UPDATE_ACK [port]->read());
    418529                 
    419530                  if (out_UPDATE_VAL [port]->read() and in_UPDATE_ACK [port]->read())
    420531                    {
    421532                      LABEL("UPDATE [%d] - Transaction accepted",port);
    422                      
    423                       find = true;
    424                      
    425                       TEST(Tcontext_t         ,out_UPDATE_CONTEXT_ID            [port]->read(), context);
    426                       TEST(Tcontrol_t         ,out_UPDATE_MISS_PREDICTION       [port]->read(), 0);
    427                       TEST(Tcontrol_t         ,out_UPDATE_DIRECTION_GOOD        [port]->read(), 1);
    428                       TEST(Tcontrol_t         ,out_UPDATE_BTB_VAL               [port]->read(), 1);
    429                       TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_SRC       [port]->read(), 0xdeadbeef+i);
    430                       TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_DEST      [port]->read(), 0x21071981+i);       
    431                       TEST(Tbranch_condition_t,out_UPDATE_BTB_CONDITION         [port]->read(), BRANCH_CONDITION_FLAG_SET);
    432                       TEST(Tcontrol_t         ,out_UPDATE_DIR_VAL               [port]->read(), 1);
    433                       if (_param->_have_port_history)
    434                         TEST(Thistory_t         ,out_UPDATE_DIR_HISTORY           [port]->read(), i);
    435                       TEST(Tcontrol_t         ,out_UPDATE_RAS_VAL               [port]->read(), 0);
    436                       TEST(Tcontrol_t         ,out_UPDATE_RAS_PUSH              [port]->read(), 0);
    437                       TEST(Taddress_t         ,out_UPDATE_RAS_ADDRESS           [port]->read(), 0xdeaddead+i);
    438                       TEST(Tptr_t             ,out_UPDATE_RAS_INDEX             [port]->read(), (0x12345678+i)%_param->_size_ras_index[context]);
    439                       TEST(Tcontrol_t         ,out_UPDATE_RAS_PREDICTION_IFETCH [port]->read(), 1);
     533                      have_transaction = true;
     534                 
     535                      if (_param->_have_port_context_id)
     536                      TEST(Tcontext_t         ,out_UPDATE_CONTEXT_ID            [i]->read(),it_upt->context);
     537                      TEST(Tcontrol_t         ,out_UPDATE_MISS_PREDICTION       [i]->read(),it_upt->miss_commit);
     538                      TEST(Tcontrol_t         ,out_UPDATE_DIRECTION_GOOD        [i]->read(),it_upt->flag);
     539                      TEST(Tcontrol_t         ,out_UPDATE_BTB_VAL               [i]->read(),update_btb(it_upt->condition));
     540                      if (update_btb(it_upt->condition))
     541                        {
     542                      TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_SRC       [i]->read(),it_upt->address_src);
     543                      TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_DEST      [i]->read(),it_upt->address_dest);
     544                      TEST(Tbranch_condition_t,out_UPDATE_BTB_CONDITION         [i]->read(),it_upt->condition);
     545                        }
     546                      TEST(Tcontrol_t         ,out_UPDATE_DIR_VAL               [i]->read(),update_dir(it_upt->condition));
     547                      if (update_dir(it_upt->condition))
     548                      if (_param->_have_port_history)
     549                      TEST(Thistory_t         ,out_UPDATE_DIR_HISTORY           [i]->read(),it_upt->history);
     550                      TEST(Tcontrol_t         ,out_UPDATE_RAS_VAL               [i]->read(),update_ras(it_upt->condition));
     551                      if (update_ras(it_upt->condition))
     552                        {
     553                      TEST(Tcontrol_t         ,out_UPDATE_RAS_PUSH              [i]->read(),push_ras  (it_upt->condition));
     554                      TEST(Taddress_t         ,out_UPDATE_RAS_ADDRESS           [i]->read(),it_upt->ras_address);
     555                      TEST(Tptr_t             ,out_UPDATE_RAS_INDEX             [i]->read(),it_upt->ras_index);
     556                      TEST(Tcontrol_t         ,out_UPDATE_RAS_PREDICTION_IFETCH [i]->read(),not it_upt->miss_ifetch);
     557                        }
     558                      ++ it_upt;
    440559                    }
    441                  
     560
    442561                  SC_START(1);
    443                  
    444                 } while (not find);
    445               in_UPDATE_ACK              [port]->write(0);
     562                  LABEL("Address_src (3) : %.8x",out_UPDATE_BTB_ADDRESS_SRC [i]->read());
     563                 
     564                } while (not have_transaction);
     565
     566              LABEL("Address_src (4) : %.8x",out_UPDATE_BTB_ADDRESS_SRC [i]->read());
     567              in_UPDATE_ACK [port]->write(0);
     568              LABEL("Address_src (5) : %.8x",out_UPDATE_BTB_ADDRESS_SRC [i]->read());
     569//               if (_param->_have_port_depth)
     570//               TEST(Tdepth_t,out_DEPTH_MIN [context]->read(), upt_bottom [context]);
     571//               TEST(Tdepth_t,out_DEPTH_MAX [context]->read(), upt_top [context]);
    446572            }
    447          
    448           LABEL("Wait a moment");
    449           SC_START(2*_param->_size_queue[context]);
    450  
    451           // wait the garbage collector
    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             }
     573          upt.clear();
    458574        }
     575
     576        // Wait Garbage Collector
     577        {
     578          upt_bottom [context] = (upt_bottom [context]+_param->_size_ufpt_queue[context])%_param->_size_upt_queue[context];
     579//        upt_top    [context] = (upt_top    [context]);
     580
     581          while ((upt_bottom [context] != out_DEPTH_MIN [context]->read()) or
     582                 (upt_top    [context] != out_DEPTH_MAX [context]->read()))
     583            SC_START(1);
     584
     585        }
    459586      }
    460587
    461       {
    462         uint32_t context = rand() % _param->_nb_context;
    463        
    464 //      LABEL("KANE : %d",context);
    465 
    466         LABEL("PREDICT - fill the queue");
    467        
    468         {
    469           uint32_t port = rand() % _param->_nb_inst_predict;
    470          
    471           for (uint32_t i=0; i<_param->_size_queue[context]; i++)
    472             {
    473              
    474               bool find = false;
    475               do
    476                 {
    477                   in_PREDICT_VAL              [port]->write((rand()%100)<percent_transaction_predict);
    478                   in_PREDICT_CONTEXT_ID       [port]->write(context);
    479                   in_PREDICT_BTB_ADDRESS_SRC  [port]->write(0xdeadbeef+i);
    480                   in_PREDICT_BTB_ADDRESS_DEST [port]->write(0x21071981+i);
    481                   in_PREDICT_BTB_CONDITION    [port]->write(BRANCH_CONDITION_FLAG_SET);
    482                   in_PREDICT_BTB_LAST_TAKE    [port]->write(1);
    483                   in_PREDICT_BTB_IS_ACCURATE  [port]->write((rand()%100)<percent_transaction_predict);
    484                   in_PREDICT_DIR_HISTORY      [port]->write(i);
    485                   in_PREDICT_RAS_ADDRESS      [port]->write(0xdeaddead+i);
    486                   in_PREDICT_RAS_INDEX        [port]->write((0x12345678+i)%_param->_size_ras_index[context]);
    487                  
    488                   if (_param->_have_port_depth[context])
    489                     {
    490                       TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
    491                     }
    492                       TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i);
    493 
    494                   SC_START(0);
    495                  
    496                   LABEL("PREDICT         [%d] %d - %d (accurate : %d).",port,in_PREDICT_VAL [port]->read(),out_PREDICT_ACK [port]->read(), in_PREDICT_BTB_IS_ACCURATE [port]->read());
    497                  
    498                   if (in_PREDICT_VAL [port]->read() and out_PREDICT_ACK [port]->read())
    499                     {
    500                       LABEL("PREDICT         [%d] - Transaction accepted",port);
    501                       find = true;
    502                     }
    503                  
    504                   SC_START(1);
    505                  
    506                 } while (not find);
    507               in_PREDICT_VAL              [port]->write(0);
    508              
    509               if (_param->_have_port_depth[context])
    510                 {
    511                   TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
    512                 }
    513                   TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i+1);
    514             }
    515         }
    516        
    517         LABEL("DECOD - hit ifetch");
    518        
    519         {
    520           uint32_t port = rand() % _param->_nb_inst_decod;
    521          
    522           for (uint32_t i=0; i<_param->_size_queue[context]; i++)
    523             {
    524              
    525               bool find = false;
    526               do
    527                 {
    528                   in_DECOD_VAL                  [port]->write((rand()%100)<percent_transaction_decod);
    529                   in_DECOD_CONTEXT_ID           [port]->write(context);
    530                   in_DECOD_BTB_ADDRESS_SRC      [port]->write(0xdeadbeef+i);
    531                   in_DECOD_BTB_ADDRESS_DEST     [port]->write(0x21071981+i);
    532                   in_DECOD_BTB_CONDITION        [port]->write(BRANCH_CONDITION_FLAG_SET);
    533                   in_DECOD_BTB_LAST_TAKE        [port]->write(1);
    534                   in_DECOD_RAS_ADDRESS          [port]->write(0xdeaddead+i);
    535                   in_DECOD_RAS_INDEX            [port]->write((0x12345678+i)%_param->_size_ras_index[context]);
    536                   in_DECOD_MISS_IFETCH          [port]->write(false);
    537                   in_DECOD_MISS_DECOD           [port]->write(false);
    538                   in_DECOD_UPDATE_PREDICTION_ID [port]->write(i);
    539                  
    540                   if (_param->_have_port_depth[context])
    541                     {
    542                       TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
    543                     }
    544                       TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
    545                  
    546                   SC_START(0);
    547                  
    548                   LABEL("DECOD           [%d] %d - %d.",port,in_DECOD_VAL [port]->read(),out_DECOD_ACK [port]->read());
    549                  
    550                   if (in_DECOD_VAL [port]->read() and out_DECOD_ACK [port]->read())
    551                     {
    552                       LABEL("DECOD           [%d] - Transaction accepted",port);
    553                       find = true;
    554                     }
    555                  
    556                   SC_START(1);
    557                  
    558                 } while (not find);
    559               in_DECOD_VAL              [port]->write(0);
    560              
    561               if (_param->_have_port_depth[context])
    562                 {
    563                   TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
    564                 }
    565                   TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
    566             }
    567         }
    568        
    569         LABEL("BRANCH_COMPLETE - hit ifetch");
    570        
    571         {
    572           uint32_t port = rand() % _param->_nb_inst_branch_complete;
    573          
    574             {
    575               uint32_t i=0;
    576               bool find = false;
    577               do
    578                 {
    579                   in_BRANCH_COMPLETE_VAL                  [port]->write((rand()%100)<percent_transaction_branch_complete);
    580                   in_BRANCH_COMPLETE_CONTEXT_ID           [port]->write(context);
    581                   in_BRANCH_COMPLETE_DEPTH                [port]->write(i);
    582                   in_BRANCH_COMPLETE_ADDRESS              [port]->write(0xcacacaca+i);
    583                   in_BRANCH_COMPLETE_FLAG                 [port]->write(0);
    584                  
    585                   if (_param->_have_port_depth[context])
    586                     {
    587                       TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
    588                     }
    589                       TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
    590                  
    591                   SC_START(0);
    592                  
    593                   LABEL("BRANCH_COMPLETE [%d] %d - %d.",port,in_BRANCH_COMPLETE_VAL [port]->read(),out_BRANCH_COMPLETE_ACK [port]->read());
    594                  
    595                   if (in_BRANCH_COMPLETE_VAL [port]->read() and out_BRANCH_COMPLETE_ACK [port]->read())
    596                     {
    597                       LABEL("BRANCH_COMPLETE [%d] - Transaction accepted",port);
    598                       find = true;
    599                      
    600                       TEST(Tcontrol_t,out_BRANCH_COMPLETE_MISS_PREDICTION[port]->read(),1);
    601                       TEST(Tcontrol_t,out_BRANCH_COMPLETE_TAKE           [port]->read(),0);
    602                       TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_SRC    [port]->read(),0xdeadbeef+i);
    603                       TEST(Taddress_t,out_BRANCH_COMPLETE_ADDRESS_DEST   [port]->read(),0x21071981+i);
    604                     }
    605                  
    606                   SC_START(1);
    607 
    608                 } while (not find);
    609               in_BRANCH_COMPLETE_VAL              [port]->write(0);
    610             }
    611         }
    612        
    613         LABEL("UPDATE - miss ifetch");
    614        
    615         {
    616           uint32_t port = 0; //rand() % _param->_nb_inst_update;
    617          
    618 //        for (uint32_t i=0; i<_param->_size_queue[context]; i++)
    619             {
    620               uint32_t i=0;
    621 
    622               bool find = false;
    623               do
    624                 {
    625                   in_UPDATE_ACK [port]->write((rand()%100)<percent_transaction_update);
    626                  
    627                   SC_START(0);
    628                  
    629                   if (out_UPDATE_VAL [port]->read() and in_UPDATE_ACK [port]->read())
    630                     {
    631                       LABEL("UPDATE [%d] - Transaction accepted",port);
    632                      
    633                       find = true;
    634                      
    635                       TEST(Tcontext_t         ,out_UPDATE_CONTEXT_ID            [port]->read(), context);
    636                       TEST(Tcontrol_t         ,out_UPDATE_MISS_PREDICTION       [port]->read(), 1);
    637                       TEST(Tcontrol_t         ,out_UPDATE_DIRECTION_GOOD        [port]->read(), 0);
    638                       TEST(Tcontrol_t         ,out_UPDATE_BTB_VAL               [port]->read(), 1);
    639                       TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_SRC       [port]->read(), 0xdeadbeef+i);
    640                       TEST(Taddress_t         ,out_UPDATE_BTB_ADDRESS_DEST      [port]->read(), 0x21071981+i);       
    641                       TEST(Tbranch_condition_t,out_UPDATE_BTB_CONDITION         [port]->read(), BRANCH_CONDITION_FLAG_SET);
    642                       TEST(Tcontrol_t         ,out_UPDATE_DIR_VAL               [port]->read(), 1);
    643                       if (_param->_have_port_history)
    644                         TEST(Thistory_t         ,out_UPDATE_DIR_HISTORY           [port]->read(), i);
    645                       TEST(Tcontrol_t         ,out_UPDATE_RAS_VAL               [port]->read(), 0);
    646                       TEST(Tcontrol_t         ,out_UPDATE_RAS_PUSH              [port]->read(), 0);
    647                       TEST(Taddress_t         ,out_UPDATE_RAS_ADDRESS           [port]->read(), 0xdeaddead+i);
    648                       TEST(Tptr_t             ,out_UPDATE_RAS_INDEX             [port]->read(), (0x12345678+i)%_param->_size_ras_index[context]);
    649                       TEST(Tcontrol_t         ,out_UPDATE_RAS_PREDICTION_IFETCH [port]->read(), 1);
    650                     }
    651                  
    652                   SC_START(1);
    653                  
    654                 } while (not find);
    655               in_UPDATE_ACK              [port]->write(0);
    656             }
    657            
    658             LABEL("Wait a moment");
    659             SC_START(_param->_size_queue[context]);
    660            
    661             // wait the garbage collector
    662             while (((not (_param->_have_port_depth[context])) or (out_DEPTH_TAIL     [context]->read() != 0)) and
    663                    (out_DEPTH_NB_BRANCH[context]->read() != 0))
    664                 {
    665                   LABEL("DEPTH [%d] nb_branch : %d - tail : %d",context,out_DEPTH_NB_BRANCH[context]->read(), out_DEPTH_TAIL [context]->read());
    666                   SC_START(1);
    667                 }
    668         }
    669       }
    670 
    671       LABEL ("Yo1");
    672       SC_START(1);
    673       LABEL ("Yo2");
    674 
    675     }
     588    }// ITERATION
    676589
    677590  /********************************************************
     
    699612  delete []  in_PREDICT_RAS_ADDRESS         ;
    700613  delete []  in_PREDICT_RAS_INDEX           ;
    701 //delete [] out_PREDICT_UPDATE_PREDICTION_ID;
     614  delete [] out_PREDICT_UPDATE_PREDICTION_ID;
    702615 
    703616  // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    715628  delete []  in_DECOD_UPDATE_PREDICTION_ID  ;
    716629//delete [] out_DECOD_DEPTH                 ;
     630  delete []  in_DECOD_IS_ACCURATE           ;
    717631 
    718632  // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    756670
    757671  // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    758   delete [] out_DEPTH_NB_BRANCH;
    759   delete [] out_DEPTH_TAIL;
     672  delete [] out_DEPTH_CURRENT;
     673  delete [] out_DEPTH_MIN;
     674  delete [] out_DEPTH_MAX;
    760675
    761676#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Parameters.h

    r82 r88  
    2424  {
    2525    //-----[ fields ]------------------------------------------------------------
    26   public : uint32_t   _nb_context             ;
    27   public : uint32_t * _size_queue             ; // [nb_context]
    28   public : uint32_t   _size_address           ;
    29   public : uint32_t   _nb_inst_predict        ;
    30   public : uint32_t   _nb_inst_decod          ;
    31   public : uint32_t   _nb_inst_branch_complete;
    32   public : uint32_t   _nb_inst_update         ;
    33   public : uint32_t   _size_history           ;
    34   public : uint32_t * _size_ras_index         ; // [nb_context]
     26  public : uint32_t   _nb_context                ;
     27  public : uint32_t * _size_upt_queue            ; // [nb_context]
     28  public : uint32_t * _size_ufpt_queue           ; // [nb_context]
     29//public : uint32_t   _size_address              ;
     30  public : uint32_t   _nb_inst_predict           ;
     31  public : uint32_t   _nb_inst_decod             ;
     32  public : uint32_t   _nb_inst_branch_complete   ;
     33  public : uint32_t   _nb_inst_update            ;
     34  public : uint32_t   _size_history              ;
     35  public : uint32_t * _size_ras_index            ; // [nb_context]
     36  public : const bool _not_accurate_block_predict;
    3537
    36   public : uint32_t   _size_context_id        ;
    37   public : uint32_t * _size_depth             ; // [nb_context]
    38   public : uint32_t   _max_size_depth         ;
    39   public : uint32_t   _max_size_ras_index     ;
    40                      
    41   public : bool       _have_port_context_id   ;
    42   public : bool     * _have_port_depth        ; // [nb_context]
    43   public : bool       _have_port_max_depth    ;
    44   public : bool       _have_port_history      ;
     38//public : uint32_t   _size_context_id           ;
     39//public : uint32_t * _size_depth                ; // [nb_context]
     40//public : uint32_t   _max_size_depth            ;
     41  public : uint32_t   _max_size_ras_index        ;
     42                                                 
     43//public : bool       _have_port_context_id      ;
     44//public : bool     * _have_port_depth           ; // [nb_context]
     45//public : bool       _have_port_max_depth       ;
     46  public : bool       _have_port_history         ;
    4547   
    4648    //-----[ methods ]-----------------------------------------------------------
    4749  public : Parameters  (uint32_t   nb_context             ,
    48                         uint32_t * size_queue             ,
     50                        uint32_t * size_upt_queue         ,
     51                        uint32_t * size_ufpt_queue        ,
    4952                        uint32_t   size_address           ,
    5053                        uint32_t   nb_inst_predict        ,
     
    5356                        uint32_t   nb_inst_update         ,
    5457                        uint32_t   size_history           ,
    55                         uint32_t * size_ras_index         );
     58                        uint32_t * size_ras_index         ,
     59                        bool       is_toplevel=false);
    5660//public : Parameters  (Parameters & param) ;
    5761  public : ~Parameters () ;
     62
     63  public :        void            copy       (void);
    5864
    5965  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h

    r82 r88  
    2121  typedef enum
    2222    {
    23       UPDATE_PREDICTION_STATE_EMPTY      , // Slot is empty
    24       UPDATE_PREDICTION_STATE_WAIT_DECOD , // Fetch have access at the predictor
    25       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
    27       UPDATE_PREDICTION_STATE_OK         , // branch is complete and can update predictor
    28       UPDATE_PREDICTION_STATE_KO         , // have a event - must update predictor unit
    29       UPDATE_PREDICTION_STATE_END          // branch is updated
    30     } state_t;
     23      EVENT_STATE_OK                 , // Can predict
     24      EVENT_STATE_FLUSH_UFPT         , // in decod  stage, detect a miss, continue to execute but flush ufpt
     25      EVENT_STATE_FLUSH_UFPT_AND_UPT , // in commit stage, detect a miss, stop context and flush ufpt and upt
     26      EVENT_STATE_FLUSH_UPT_RAS      , // in commit stage, detect a miss, context is stop and ufpt is flush, update RAS
     27      EVENT_STATE_FLUSH_UPT          , // in commit stage, detect a miss, context is stop and ufpt is flush
     28      EVENT_STATE_UPDATE_CONTEXT       // prediction unit is update, send signal to context manager
     29    } event_state_t;
    3130
    32   class entry_t
     31  typedef enum
     32    {
     33      UPDATE_FETCH_PREDICTION_STATE_EMPTY       , // Slot is empty
     34      UPDATE_FETCH_PREDICTION_STATE_WAIT_DECOD  , // Have make a prediction, wait decod
     35      UPDATE_FETCH_PREDICTION_STATE_EVENT       , // previous branch is a miss prediction
     36      UPDATE_FETCH_PREDICTION_STATE_END           // branch is updated
     37    } ufpt_state_t;
     38
     39  typedef enum
     40    {
     41      UPDATE_PREDICTION_STATE_EMPTY             , // Slot is empty
     42      UPDATE_PREDICTION_STATE_WAIT_END          , // Have make a prediction, wait branch_complete
     43      UPDATE_PREDICTION_STATE_OK                , // this branch is a hit prediction
     44      UPDATE_PREDICTION_STATE_KO                , // this branch is a miss prediction
     45      UPDATE_PREDICTION_STATE_EVENT             , // previous branch is a miss prediction
     46      UPDATE_PREDICTION_STATE_END                 // branch is updated
     47    } upt_state_t;
     48
     49  class ufpt_entry_t
    3350  {
    34   public : state_t             _state;
    35   public : Tcontrol_t          _ifetch_prediction;
    36   public : Tbranch_condition_t _condition;
    37   public : Taddress_t          _address_src;
    38   public : Taddress_t          _address_dest;
    39   public : Tcontrol_t          _last_take;
    40   public : Tcontrol_t          _good_take;
    41   public : Thistory_t          _history;
    42   public : Taddress_t          _address_ras;
    43   public : Tptr_t              _index_ras;
     51  public : ufpt_state_t        _state            ;
     52  public : Tbranch_condition_t _condition        ;
     53  public : Taddress_t          _address_src      ;
     54  public : Taddress_t          _address_dest     ;
     55  public : Tcontrol_t          _last_take        ;
     56//public : Tcontrol_t          _good_take        ;
     57  public : Tcontrol_t          _is_accurate      ;
     58  public : Thistory_t          _history          ;
     59  public : Taddress_t          _address_ras      ;
     60  public : Tptr_t              _index_ras        ;
     61//public : Tcontrol_t          _ifetch_prediction;
    4462  };
     63
     64  class upt_entry_t
     65  {
     66  public : upt_state_t         _state            ;
     67  public : Tbranch_condition_t _condition        ;
     68  public : Taddress_t          _address_src      ;
     69  public : Taddress_t          _address_dest     ;
     70  public : Tcontrol_t          _last_take        ;
     71  public : Tcontrol_t          _good_take        ; // not in ufpt
     72  public : Tcontrol_t          _is_accurate      ;
     73  public : Thistory_t          _history          ;
     74  public : Taddress_t          _address_ras      ;
     75  public : Tptr_t              _index_ras        ;
     76  public : Tcontrol_t          _ifetch_prediction; // not in ufpt
     77  };
     78
     79
     80// BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK         
     81// BRANCH_CONDITION_NONE_WITH_WRITE_STACK             
     82// BRANCH_CONDITION_FLAG_UNSET                       
     83// BRANCH_CONDITION_FLAG_SET                         
     84// BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK
     85// BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK   
     86// BRANCH_CONDITION_READ_STACK                       
     87
     88
     89#define update_btb(cond)  true
     90
     91#define update_dir(cond)  ((cond == BRANCH_CONDITION_FLAG_UNSET) or \
     92                           (cond == BRANCH_CONDITION_FLAG_SET))
     93
     94#define update_ras(cond)  ((cond == BRANCH_CONDITION_NONE_WITH_WRITE_STACK         ) or \
     95                           (cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK) or \
     96                           (cond == BRANCH_CONDITION_READ_STACK                    ))
     97
     98#define push_ras(cond)    ((cond == BRANCH_CONDITION_NONE_WITH_WRITE_STACK         ) or \
     99                           (cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK))
     100
     101#define pop_ras(cond)     ((cond == BRANCH_CONDITION_READ_STACK                    ))
     102
     103#define need_update(cond) update_ras(cond)
    45104
    46105}; // end namespace update_prediction_table
     
    51110}; // end namespace behavioural
    52111 
     112  template<> inline std::string toString<morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::event_state_t>(const morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::event_state_t& x)
     113  {
     114    switch (x)
     115      {
     116      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_OK                   : return "ok"                  ; break;
     117      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_FLUSH_UFPT           : return "flush_ufpt"          ; break;
     118      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_FLUSH_UFPT_AND_UPT   : return "flush_ufpt_and_upt"  ; break;
     119      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_FLUSH_UPT_RAS        : return "flush_upt_ras"       ; break;
     120      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_FLUSH_UPT            : return "flush_upt"           ; break;
     121      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::EVENT_STATE_UPDATE_CONTEXT       : return "update_context"      ; break;
     122      default    : return ""      ; break;
     123      }
     124  };
    53125
    54   template<> inline std::string toString<morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::state_t>(const morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::state_t& x)
     126  template<> inline std::string toString<morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::ufpt_state_t>(const morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::ufpt_state_t& x)
     127  {
     128    switch (x)
     129      {
     130      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_FETCH_PREDICTION_STATE_EMPTY      : return "empty"     ; break;
     131      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_FETCH_PREDICTION_STATE_WAIT_DECOD : return "wait_decod"; break;
     132      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_FETCH_PREDICTION_STATE_EVENT      : return "event"     ; break;
     133      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_FETCH_PREDICTION_STATE_END        : return "end"       ; break;
     134      default    : return ""      ; break;
     135      }
     136  };
     137
     138  template<> inline std::string toString<morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::upt_state_t>(const morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::upt_state_t& x)
    55139  {
    56140    switch (x)
    57141      {
    58142      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_EMPTY      : return "empty"     ; break;
    59       case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_WAIT_DECOD : return "wait_decod"; break;
    60       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;
     143      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_WAIT_END   : return "wait_end"  ; break;
    62144      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_OK         : return "ok"        ; break;
    63145      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_KO         : return "ko"        ; break;
     146      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_EVENT      : return "event"     ; break;
    64147      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_END        : return "end"       ; break;
    65148      default    : return ""      ; break;
     
    67150  };
    68151
    69 
    70152}; // end namespace morpheo             
    71153
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h

    r82 r88  
    5151#ifdef STATISTICS
    5252  public    : Stat                           * _stat;
     53
     54  private   : counter_t                     ** _stat_nb_branch_hit       ; //[nb_context]
     55  private   : counter_t                     ** _stat_nb_branch_miss      ; //[nb_context]
     56  private   : counter_t                     ** _stat_nb_branch_unused    ; //[nb_context]
     57  private   : counter_t                     ** _stat_queue_nb_cycle_empty; //[nb_context]
     58  private   : counter_t                     ** _stat_queue_nb_cycle_full ; //[nb_context]
     59  private   : counter_t                     ** _stat_queue_nb_elt        ; //[nb_context]
     60
    5361#endif
    5462
     
    5967    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    6068    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    61   public    : SC_CLOCK                      *  in_CLOCK        ;
    62   public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
     69  public    : SC_CLOCK                      *  in_CLOCK                          ;
     70  public    : SC_IN (Tcontrol_t)            *  in_NRESET                         ;
    6371
    6472    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    65   public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_VAL                 ; //[nb_inst_predict]
    66   public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_ACK                 ; //[nb_inst_predict]
    67   public    : SC_IN (Tcontext_t         )  **  in_PREDICT_CONTEXT_ID          ; //[nb_inst_predict]
    68   public    : SC_IN (Taddress_t         )  **  in_PREDICT_BTB_ADDRESS_SRC     ; //[nb_inst_predict]
    69   public    : SC_IN (Taddress_t         )  **  in_PREDICT_BTB_ADDRESS_DEST    ; //[nb_inst_predict]
    70   public    : SC_IN (Tbranch_condition_t)  **  in_PREDICT_BTB_CONDITION       ; //[nb_inst_predict]
    71   public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_LAST_TAKE       ; //[nb_inst_predict]
    72   public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_IS_ACCURATE     ; //[nb_inst_predict]
    73   public    : SC_IN (Thistory_t         )  **  in_PREDICT_DIR_HISTORY         ; //[nb_inst_predict]
    74   public    : SC_IN (Taddress_t         )  **  in_PREDICT_RAS_ADDRESS         ; //[nb_inst_predict]
    75   public    : SC_IN (Tptr_t             )  **  in_PREDICT_RAS_INDEX           ; //[nb_inst_predict]
    76 //public    : SC_OUT(Tprediction_ptr_t  )  ** out_PREDICT_UPDATE_PREDICTION_ID; //[nb_inst_predict]
     73  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_VAL                    ; //[nb_inst_predict]
     74  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_ACK                    ; //[nb_inst_predict]
     75  public    : SC_IN (Tcontext_t         )  **  in_PREDICT_CONTEXT_ID             ; //[nb_inst_predict]
     76  public    : SC_IN (Taddress_t         )  **  in_PREDICT_BTB_ADDRESS_SRC        ; //[nb_inst_predict]
     77  public    : SC_IN (Taddress_t         )  **  in_PREDICT_BTB_ADDRESS_DEST       ; //[nb_inst_predict]
     78  public    : SC_IN (Tbranch_condition_t)  **  in_PREDICT_BTB_CONDITION          ; //[nb_inst_predict]
     79  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_LAST_TAKE          ; //[nb_inst_predict]
     80  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_IS_ACCURATE        ; //[nb_inst_predict]
     81  public    : SC_IN (Thistory_t         )  **  in_PREDICT_DIR_HISTORY            ; //[nb_inst_predict]
     82  public    : SC_IN (Taddress_t         )  **  in_PREDICT_RAS_ADDRESS            ; //[nb_inst_predict]
     83  public    : SC_IN (Tptr_t             )  **  in_PREDICT_RAS_INDEX              ; //[nb_inst_predict]
     84  public    : SC_OUT(Tprediction_ptr_t  )  ** out_PREDICT_UPDATE_PREDICTION_ID   ; //[nb_inst_predict]
    7785
    7886    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    79   public    : SC_IN (Tcontrol_t         )  **  in_DECOD_VAL                   ; //[nb_inst_decod]
    80   public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_ACK                   ; //[nb_inst_decod]
    81   public    : SC_IN (Tcontext_t         )  **  in_DECOD_CONTEXT_ID            ; //[nb_inst_decod]
    82   public    : SC_IN (Taddress_t         )  **  in_DECOD_BTB_ADDRESS_SRC       ; //[nb_inst_decod]
    83   public    : SC_IN (Taddress_t         )  **  in_DECOD_BTB_ADDRESS_DEST      ; //[nb_inst_decod]
    84   public    : SC_IN (Tbranch_condition_t)  **  in_DECOD_BTB_CONDITION         ; //[nb_inst_decod]
    85   public    : SC_IN (Tcontrol_t         )  **  in_DECOD_BTB_LAST_TAKE         ; //[nb_inst_decod]
    86 //public    : SC_IN (Tcontrol_t         )  **  in_DECOD_BTB_IS_ACCURATE       ; //[nb_inst_decod]
    87 //public    : SC_IN (Thistory_t         )  **  in_DECOD_DIR_HISTORY           ; //[nb_inst_decod] // if ifetch prediction is miss -> miss btb -> make a static state
    88   public    : SC_IN (Taddress_t         )  **  in_DECOD_RAS_ADDRESS           ; //[nb_inst_decod]
    89   public    : SC_IN (Tptr_t             )  **  in_DECOD_RAS_INDEX             ; //[nb_inst_decod]
    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]
    92   public    : SC_IN (Tprediction_ptr_t  )  **  in_DECOD_UPDATE_PREDICTION_ID  ; //[nb_inst_decod]
    93 //public    : SC_OUT(Tdepth_t           )  ** out_DECOD_DEPTH                 ; //[nb_inst_decod]
     87  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_VAL                      ; //[nb_inst_decod]
     88  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_ACK                      ; //[nb_inst_decod]
     89  public    : SC_IN (Tcontext_t         )  **  in_DECOD_CONTEXT_ID               ; //[nb_inst_decod]
     90  public    : SC_IN (Taddress_t         )  **  in_DECOD_BTB_ADDRESS_SRC          ; //[nb_inst_decod]
     91  public    : SC_IN (Taddress_t         )  **  in_DECOD_BTB_ADDRESS_DEST         ; //[nb_inst_decod]
     92  public    : SC_IN (Tbranch_condition_t)  **  in_DECOD_BTB_CONDITION            ; //[nb_inst_decod]
     93  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_BTB_LAST_TAKE            ; //[nb_inst_decod]
     94//public    : SC_IN (Thistory_t         )  **  in_DECOD_DIR_HISTORY              ; //[nb_inst_decod] // if ifetch prediction is miss -> miss btb -> make a static state
     95  public    : SC_IN (Taddress_t         )  **  in_DECOD_RAS_ADDRESS              ; //[nb_inst_decod]
     96  public    : SC_IN (Tptr_t             )  **  in_DECOD_RAS_INDEX                ; //[nb_inst_decod]
     97  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_MISS_IFETCH              ; //[nb_inst_decod]
     98  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_MISS_DECOD               ; //[nb_inst_decod]
     99  public    : SC_IN (Tprediction_ptr_t  )  **  in_DECOD_UPDATE_PREDICTION_ID     ; //[nb_inst_decod]
     100//public    : SC_OUT(Tdepth_t           )  ** out_DECOD_DEPTH                    ; //[nb_inst_decod]
     101  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_IS_ACCURATE              ; //[nb_inst_decod]
    94102
    95103    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    106114
    107115    // ~~~~~[ 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]
     116  public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_EVENT_VAL               ; //[nb_context]
     117  public    : SC_IN (Tcontrol_t         )  **  in_BRANCH_EVENT_ACK               ; //[nb_context]
     118//public    : SC_OUT(Tcontext_t         )  ** out_BRANCH_EVENT_CONTEXT_ID        ; //[nb_context]
     119//public    : SC_OUT(Tdepth_t           )  ** out_BRANCH_EVENT_DEPTH             ; //[nb_context]
     120//public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_EVENT_MISS_PREDICTION   ; //[nb_context] is always miss prediction
     121  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_EVENT_ADDRESS_SRC       ; //[nb_context]
     122  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_EVENT_ADDRESS_DEST      ; //[nb_context]
    115123
    116124    // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    117   public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_VAL                  ; //[nb_inst_update]
    118   public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_ACK                  ; //[nb_inst_update]
    119   public    : SC_OUT(Tcontext_t         )  ** out_UPDATE_CONTEXT_ID           ; //[nb_inst_update]
    120   public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_MISS_PREDICTION      ; //[nb_inst_update]
    121   public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_DIRECTION_GOOD       ; //[nb_inst_update]
    122   public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_BTB_VAL              ; //[nb_inst_update]
    123   public    : SC_OUT(Taddress_t         )  ** out_UPDATE_BTB_ADDRESS_SRC      ; //[nb_inst_update]
    124   public    : SC_OUT(Taddress_t         )  ** out_UPDATE_BTB_ADDRESS_DEST     ; //[nb_inst_update]
    125   public    : SC_OUT(Tbranch_condition_t)  ** out_UPDATE_BTB_CONDITION        ; //[nb_inst_update]
    126   public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_DIR_VAL              ; //[nb_inst_update]
    127   public    : SC_OUT(Thistory_t         )  ** out_UPDATE_DIR_HISTORY          ; //[nb_inst_update]
    128   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]
    130   public    : SC_OUT(Taddress_t         )  ** out_UPDATE_RAS_ADDRESS          ; //[nb_inst_update]
    131   public    : SC_OUT(Tptr_t             )  ** out_UPDATE_RAS_INDEX            ; //[nb_inst_update]
    132   public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_PREDICTION_IFETCH; //[nb_inst_update]
     125  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_VAL                     ; //[nb_inst_update]
     126  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_ACK                     ; //[nb_inst_update]
     127  public    : SC_OUT(Tcontext_t         )  ** out_UPDATE_CONTEXT_ID              ; //[nb_inst_update]
     128  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_MISS_PREDICTION         ; //[nb_inst_update]
     129  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_DIRECTION_GOOD          ; //[nb_inst_update]
     130  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_BTB_VAL                 ; //[nb_inst_update]
     131  public    : SC_OUT(Taddress_t         )  ** out_UPDATE_BTB_ADDRESS_SRC         ; //[nb_inst_update]
     132  public    : SC_OUT(Taddress_t         )  ** out_UPDATE_BTB_ADDRESS_DEST        ; //[nb_inst_update]
     133  public    : SC_OUT(Tbranch_condition_t)  ** out_UPDATE_BTB_CONDITION           ; //[nb_inst_update]
     134  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_DIR_VAL                 ; //[nb_inst_update]
     135  public    : SC_OUT(Thistory_t         )  ** out_UPDATE_DIR_HISTORY             ; //[nb_inst_update]
     136  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_VAL                 ; //[nb_inst_update]
     137  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_PUSH                ; //[nb_inst_update]
     138  public    : SC_OUT(Taddress_t         )  ** out_UPDATE_RAS_ADDRESS             ; //[nb_inst_update]
     139  public    : SC_OUT(Tptr_t             )  ** out_UPDATE_RAS_INDEX               ; //[nb_inst_update]
     140  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_PREDICTION_IFETCH   ; //[nb_inst_update]
    133141
    134142    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    135   public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_NB_BRANCH; //[nb_context]
    136   public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_TAIL; //[nb_context]
     143  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_CURRENT                  ; //[nb_context]
     144  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_MIN                      ; //[nb_context]
     145  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_MAX                      ; //[nb_context]
     146    // If DEPTH_CURRENT :
     147    // equal at     DEPTH_MIN            -> not speculative
     148    // not include ]DEPTH_MIN:DEPTH_MAX[ -> previous branch miss
     149    //     include ]DEPTH_MIN:DEPTH_MAX[ -> speculative
    137150
    138151    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    139152
    140153    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    141   private   : uint32_t                      * reg_TOP                    ; //[nb_context]
    142   private   : uint32_t                      * reg_BOTTOM                 ; //[nb_context]
    143   private   : uint32_t                      * reg_NB_ELT                 ; //[nb_context]
    144   private   : uint32_t                      * reg_NB_ELT_UPDATE          ; //[nb_context]
    145   private   : uint32_t                      * reg_NB_ELT_NEED_UPDATE     ; //[nb_context]
    146   private   : entry_t                      ** reg_UPDATE_PREDICTION_TABLE; //[nb_context][size_queue]
    147   private   : uint32_t                        reg_UPDATE_PRIORITY        ;
     154  private   : uint32_t                        reg_UPDATE_PRIORITY                ;
     155                                                                                 
     156  private   : ufpt_entry_t                 ** reg_UPDATE_FETCH_PREDICTION_TABLE  ; //[nb_context][size_ufpt_queue]
     157  private   : uint32_t                      * reg_UFPT_BOTTOM                    ; //[nb_context]
     158  private   : uint32_t                      * reg_UFPT_TOP                       ; //[nb_context]
     159  private   : uint32_t                      * reg_UFPT_UPDATE                    ; //[nb_context]
     160  private   : uint32_t                      * reg_UFPT_NB_NEED_UPDATE            ; //[nb_context]
     161                                                                                             
     162  private   : upt_entry_t                  ** reg_UPDATE_PREDICTION_TABLE        ; //[nb_context][size_upt_queue]
     163  private   : uint32_t                      * reg_UPT_BOTTOM                     ; //[nb_context]
     164  private   : uint32_t                      * reg_UPT_TOP                        ; //[nb_context]
     165  private   : uint32_t                      * reg_UPT_UPDATE                     ; //[nb_context]
     166  private   : uint32_t                      * reg_UPT_NB_NEED_UPDATE             ; //[nb_context]
     167                                                                                             
     168  private   : bool                          * reg_IS_ACCURATE                    ; //[nb_context]
     169
     170  private   : event_state_t                 * reg_EVENT_STATE                    ; //[nb_context]
     171  private   : Tcontrol_t                    * reg_EVENT_RAS_CORRUPTED            ; //[nb_context] // RAS must be flush
     172  private   : Taddress_t                    * reg_EVENT_ADDRESS_SRC              ; //[nb_context] // Address branch
     173  private   : Tcontrol_t                    * reg_EVENT_ADDRESS_SRC_VAL          ; //[nb_context] // if miss ifetch, decod issue branch, dest must be reload
     174  private   : Taddress_t                    * reg_EVENT_ADDRESS_DEST             ; //[nb_context] // Address dest
    148175
    149176    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    150177  private   : Tcontrol_t                    * internal_PREDICT_ACK                    ; //[nb_inst_predict]
     178  private   : Tdepth_t                      * internal_PREDICT_UPDATE_PREDICTION_ID   ; //[nb_inst_predict]
    151179  private   : Tcontrol_t                    * internal_DECOD_ACK                      ; //[nb_inst_decod]
     180  private   : uint32_t                      * internal_DECOD_UPT_PTR_WRITE            ; //[nb_inst_decod]
    152181  private   : Tcontrol_t                    * internal_BRANCH_COMPLETE_ACK            ; //[nb_inst_branch_complete]
    153182  private   : Tcontrol_t                    * internal_BRANCH_COMPLETE_MISS_PREDICTION; //[nb_inst_branch_complete]
     
    157186  private   : Tdepth_t                      * internal_BRANCH_EVENT_DEPTH             ; //[nb_context]
    158187  private   : Tcontrol_t                    * internal_UPDATE_VAL                     ; //[nb_inst_update]
     188  private   : Tcontrol_t                    * internal_UPDATE_VAL_WITHOUT_ACK         ; //[nb_inst_update]
    159189  private   : Tcontext_t                    * internal_UPDATE_CONTEXT_ID              ; //[nb_inst_update]
     190  private   : bool                          * internal_UPDATE_FROM_UFPT               ; //[nb_inst_update]
    160191  private   : Tdepth_t                      * internal_UPDATE_DEPTH                   ; //[nb_inst_update]
     192  private   : bool                          * internal_UPDATE_RAS                     ; //[nb_inst_update]
     193
    161194#endif
    162195
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters.cpp

    r82 r88  
    2121#define FUNCTION "Update_Prediction_Table::Parameters"
    2222  Parameters::Parameters (uint32_t   nb_context             ,
    23                           uint32_t * size_queue             ,
     23                          uint32_t * size_upt_queue         ,
     24                          uint32_t * size_ufpt_queue        ,
    2425                          uint32_t   size_address           ,
    2526                          uint32_t   nb_inst_predict        ,
     
    2829                          uint32_t   nb_inst_update         ,
    2930                          uint32_t   size_history           ,
    30                           uint32_t * size_ras_index         )
     31                          uint32_t * size_ras_index         ,
     32                          bool       is_toplevel):
     33    _not_accurate_block_predict (false)
    3134  {
    3235    log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin");
    3336
    3437    _nb_context              = nb_context             ;
    35     _size_queue              = size_queue             ;
    36     _size_address            = size_address           ;
     38    _size_upt_queue          = size_upt_queue         ;
     39    _size_ufpt_queue         = size_ufpt_queue        ;
     40//  _size_address            = size_address           ;
    3741    _nb_inst_predict         = nb_inst_predict        ;
    3842    _nb_inst_decod           = nb_inst_decod          ;
     
    4246    _size_ras_index          = size_ras_index         ;
    4347   
    44     _size_context_id         = log2(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);
    5348    _max_size_ras_index      = max<uint32_t>(_size_ras_index,nb_context);
    5449
    55     _have_port_context_id    = _size_context_id> 0;
    56     _have_port_max_depth     = _max_size_depth > 0;
    5750    _have_port_history       = _size_history   > 0;
     51
     52    test();
     53
     54    if (is_toplevel)
     55      {
     56        _size_instruction_address = size_address;
     57        _size_context_id          = log2(nb_context);
     58        _size_depth               = log2(max<uint32_t>(_size_upt_queue,_nb_context));
     59
     60        _have_port_context_id    = _size_context_id> 0;
     61        _have_port_depth          = _size_depth > 0;
     62
     63        copy ();
     64      }
    5865   
    59     test();
    6066    log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
    6167  };
     
    7581  {
    7682    log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin");
    77     delete [] _size_depth     ;
    78     delete [] _have_port_depth;
     83//     delete [] _size_depth     ;
     84//     delete [] _have_port_depth;
     85    log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
     86  };
     87
     88#undef  FUNCTION
     89#define FUNCTION "Update_Prediction_Table::copy"
     90  void Parameters::copy (void)
     91  {
     92    log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin");
    7993    log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
    8094  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters_msg_error.cpp

    r82 r88  
    88#include "Behavioural/include/Types.h"
    99#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Parameters.h"
     10#include "Common/include/Max.h"
    1011#include <sstream>
    1112
     
    2728    Parameters_test test ("Update_Prediction_Table");
    2829
    29     if (morpheo::behavioural::test<Tdepth_t>(_max_size_depth) == false)
    30       test.error("type \"Tdepth_t\" is too small.");
    31 
     30    for (uint32_t i=0; i<_nb_context; i++)
     31      if (_size_ufpt_queue [i] > _size_upt_queue [i])
     32        test.error(toString(_("context \"%d\" : size_upt_queue must be >= at size_ufpt_queue\n"),i));
     33   
    3234    log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
    3335
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters_print.cpp

    r81 r88  
    2828    xml.balise_open("update_prediction_table");
    2929    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();
     30//  xml.singleton_begin("size_address           "); xml.attribut("value",toString(_size_address           )); xml.singleton_end();
    3131    xml.singleton_begin("nb_inst_predict        "); xml.attribut("value",toString(_nb_inst_predict        )); xml.singleton_end();
    3232    xml.singleton_begin("nb_inst_decod          "); xml.attribut("value",toString(_nb_inst_decod          )); xml.singleton_end();
     
    4040        xml.  attribut("id"  ,toString(i));
    4141        xml. balise_open_end();
    42         xml.  singleton_begin("size_queue             "); xml.attribut("value",toString(_size_queue             [i])); xml.singleton_end();
     42        xml.  singleton_begin("size_upt_queue         "); xml.attribut("value",toString(_size_upt_queue         [i])); xml.singleton_end();
     43        xml.  singleton_begin("size_ufpt_queue        "); xml.attribut("value",toString(_size_ufpt_queue        [i])); xml.singleton_end();
    4344        xml.  singleton_begin("size_ras_index         "); xml.attribut("value",toString(_size_ras_index         [i])); xml.singleton_end();
    4445        xml. balise_close();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp

    r82 r88  
    4040    usage_environment(_usage);
    4141
     42#if DEBUG_Update_Prediction_Table == true
     43    log_printf(INFO,Update_Prediction_Table,FUNCTION,_("<%s> Parameters"),_name.c_str());
     44
     45    std::cout << *param << std::endl;
     46#endif   
     47
    4248    log_printf(INFO,Update_Prediction_Table,FUNCTION,"Allocation");
    4349
     
    4955
    5056#ifdef STATISTICS
    51     if (_usage & USE_STATISTICS)
     57    if (usage_is_set(_usage,USE_STATISTICS))
    5258      {
    5359        log_printf(INFO,Update_Prediction_Table,FUNCTION,"Allocation of statistics");
     
    5864
    5965#ifdef VHDL
    60     if (_usage & USE_VHDL)
     66    if (usage_is_set(_usage,USE_VHDL))
    6167      {
    6268        // generate the vhdl
     
    6874
    6975#ifdef SYSTEMC
    70     if (_usage & USE_SYSTEMC)
     76    if (usage_is_set(_usage,USE_SYSTEMC))
    7177      {
    7278
     
    9197        SC_METHOD (genMoore);
    9298        dont_initialize ();
    93         sensitive << (*(in_CLOCK)).neg();
     99        sensitive << (*(in_CLOCK)).neg(); // use internal register
    94100       
    95101# ifdef SYSTEMCASS_SPECIFIC
     
    106112            if (_param->_have_port_context_id)
    107113              sensitive << (*(in_PREDICT_CONTEXT_ID [i]));
    108             sensitive << (*(in_PREDICT_BTB_IS_ACCURATE [i]));
     114//          sensitive << (*(in_PREDICT_BTB_IS_ACCURATE [i]));
    109115          }
    110116       
     
    128134            if (_param->_have_port_context_id)
    129135              sensitive << (*(in_DECOD_CONTEXT_ID [i]));
    130             sensitive << (*(in_DECOD_MISS_IFETCH [i]))
    131                       << (*(in_DECOD_MISS_DECOD  [i]));
    132136          }
    133137       
     
    136140        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    137141          {
    138             (*(out_DECOD_ACK                  [i])) (*(in_DECOD_MISS_IFETCH [i]));
    139             (*(out_DECOD_ACK                  [i])) (*(in_DECOD_MISS_DECOD  [i]));
    140142            if (_param->_have_port_context_id)
    141143            (*(out_DECOD_ACK                  [i])) (*(in_DECOD_CONTEXT_ID  [i]));
     
    152154            if (_param->_have_port_context_id)
    153155            sensitive << (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));
    154             if (_param->_have_port_max_depth)
     156            if (_param->_have_port_depth)
    155157            sensitive << (*(in_BRANCH_COMPLETE_DEPTH [i]));
    156158            sensitive << (*(in_BRANCH_COMPLETE_FLAG    [i]))
     
    164166            if (_param->_have_port_context_id)
    165167            (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));
    166             if (_param->_have_port_max_depth)
     168            if (_param->_have_port_depth)
    167169            (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_DEPTH      [i]));
    168170            (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_FLAG       [i]));
     
    171173            if (_param->_have_port_context_id)
    172174            (*(out_BRANCH_COMPLETE_TAKE            [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));
    173             if (_param->_have_port_max_depth)
     175            if (_param->_have_port_depth)
    174176            (*(out_BRANCH_COMPLETE_TAKE            [i])) (*(in_BRANCH_COMPLETE_DEPTH      [i]));
    175177            (*(out_BRANCH_COMPLETE_TAKE            [i])) (*(in_BRANCH_COMPLETE_FLAG       [i]));
     
    177179            if (_param->_have_port_context_id)
    178180            (*(out_BRANCH_COMPLETE_ADDRESS_SRC     [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));
    179             if (_param->_have_port_max_depth)
     181            if (_param->_have_port_depth)
    180182            (*(out_BRANCH_COMPLETE_ADDRESS_SRC     [i])) (*(in_BRANCH_COMPLETE_DEPTH      [i]));
    181183
    182184            if (_param->_have_port_context_id)
    183185            (*(out_BRANCH_COMPLETE_ADDRESS_DEST    [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));
    184             if (_param->_have_port_max_depth)
     186            if (_param->_have_port_depth)
    185187            (*(out_BRANCH_COMPLETE_ADDRESS_DEST    [i])) (*(in_BRANCH_COMPLETE_DEPTH      [i]));
    186188            (*(out_BRANCH_COMPLETE_ADDRESS_DEST    [i])) (*(in_BRANCH_COMPLETE_ADDRESS    [i]));
     
    200202
    201203#ifdef STATISTICS
    202     if (_usage & USE_STATISTICS)
     204    if (usage_is_set(_usage,USE_STATISTICS))
    203205      {
    204206        statistics_deallocation();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp

    r82 r88  
    6363      ALLOC1_VALACK_OUT(out_PREDICT_ACK                 ,ACK);
    6464      ALLOC1_SIGNAL_IN ( in_PREDICT_CONTEXT_ID          ,"context_id"          ,Tcontext_t         ,_param->_size_context_id);
    65       ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_ADDRESS_SRC     ,"btb_address_src"     ,Taddress_t         ,_param->_size_address);
    66       ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_ADDRESS_DEST    ,"btb_address_dest"    ,Taddress_t         ,_param->_size_address);
     65      ALLOC1_SIGNAL_OUT(out_PREDICT_UPDATE_PREDICTION_ID,"update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth);
     66      ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_ADDRESS_SRC     ,"btb_address_src"     ,Taddress_t         ,_param->_size_instruction_address);
     67      ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_ADDRESS_DEST    ,"btb_address_dest"    ,Taddress_t         ,_param->_size_instruction_address);
    6768      ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_CONDITION       ,"btb_condition"       ,Tbranch_condition_t,_param->_size_branch_condition);
    6869      ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_LAST_TAKE       ,"btb_last_take"       ,Tcontrol_t         ,1);
    6970      ALLOC1_SIGNAL_IN ( in_PREDICT_BTB_IS_ACCURATE     ,"btb_is_accurate"     ,Tcontrol_t         ,1);
    7071      ALLOC1_SIGNAL_IN ( in_PREDICT_DIR_HISTORY         ,"dir_history"         ,Thistory_t         ,_param->_size_history);
    71       ALLOC1_SIGNAL_IN ( in_PREDICT_RAS_ADDRESS         ,"ras_address"         ,Taddress_t         ,_param->_size_address);
     72      ALLOC1_SIGNAL_IN ( in_PREDICT_RAS_ADDRESS         ,"ras_address"         ,Taddress_t         ,_param->_size_instruction_address);
    7273      ALLOC1_SIGNAL_IN ( in_PREDICT_RAS_INDEX           ,"ras_index"           ,Tptr_t             ,_param->_max_size_ras_index);
    73 //       ALLOC1_SIGNAL_OUT(out_PREDICT_UPDATE_PREDICTION_ID,"update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth);
    7474    }
    7575
    7676    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    7777    {
    78       ALLOC1_INTERFACE("decod", IN,SOUTH, "decod", _param->_nb_inst_predict);
     78      ALLOC1_INTERFACE("decod", IN,SOUTH, "decod", _param->_nb_inst_decod);
    7979
    8080      ALLOC1_VALACK_IN ( in_DECOD_VAL                 ,VAL);
    8181      ALLOC1_VALACK_OUT(out_DECOD_ACK                 ,ACK);
    8282      ALLOC1_SIGNAL_IN ( in_DECOD_CONTEXT_ID          ,"context_id"          ,Tcontext_t         ,_param->_size_context_id);
    83       ALLOC1_SIGNAL_IN ( in_DECOD_BTB_ADDRESS_SRC     ,"btb_address_src"     ,Taddress_t         ,_param->_size_address);
    84       ALLOC1_SIGNAL_IN ( in_DECOD_BTB_ADDRESS_DEST    ,"btb_address_dest"    ,Taddress_t         ,_param->_size_address);
     83      ALLOC1_SIGNAL_IN ( in_DECOD_BTB_ADDRESS_SRC     ,"btb_address_src"     ,Taddress_t         ,_param->_size_instruction_address);
     84      ALLOC1_SIGNAL_IN ( in_DECOD_BTB_ADDRESS_DEST    ,"btb_address_dest"    ,Taddress_t         ,_param->_size_instruction_address);
    8585      ALLOC1_SIGNAL_IN ( in_DECOD_BTB_CONDITION       ,"btb_condition"       ,Tbranch_condition_t,_param->_size_branch_condition);
    8686      ALLOC1_SIGNAL_IN ( in_DECOD_BTB_LAST_TAKE       ,"btb_last_take"       ,Tcontrol_t         ,1);
    87       ALLOC1_SIGNAL_IN ( in_DECOD_RAS_ADDRESS         ,"ras_address"         ,Taddress_t         ,_param->_size_address);
     87      ALLOC1_SIGNAL_IN ( in_DECOD_RAS_ADDRESS         ,"ras_address"         ,Taddress_t         ,_param->_size_instruction_address);
    8888      ALLOC1_SIGNAL_IN ( in_DECOD_RAS_INDEX           ,"ras_index"           ,Tptr_t             ,_param->_max_size_ras_index);
    8989      ALLOC1_SIGNAL_IN ( in_DECOD_MISS_IFETCH         ,"miss_ifetch"         ,Tcontrol_t         ,1);
    9090      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);
     91      ALLOC1_SIGNAL_IN ( in_DECOD_UPDATE_PREDICTION_ID,"update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth);
    9292//    ALLOC1_SIGNAL_OUT(out_DECOD_DEPTH               ,"depth"               ,Tdepth_t           ,_param->_size_depth);
     93      ALLOC1_SIGNAL_IN ( in_DECOD_IS_ACCURATE         ,"is_accurate"         ,Tcontrol_t         ,1);
    9394    }
    9495
     
    100101      ALLOC1_VALACK_OUT(out_BRANCH_COMPLETE_ACK            ,ACK);
    101102      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);
     103      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH          ,"depth"          ,Tdepth_t  ,_param->_size_depth);
     104      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS        ,"address"        ,Taddress_t,_param->_size_instruction_address);
    104105      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_FLAG           ,"flag"           ,Tcontrol_t,1);
    105106      ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
    106107      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);
     108      ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_SRC    ,"address_src"    ,Taddress_t,_param->_size_instruction_address);
     109      ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_DEST   ,"address_dest"   ,Taddress_t,_param->_size_instruction_address);
    109110    }
    110111
     
    116117      ALLOC1_VALACK_IN ( in_BRANCH_EVENT_ACK            ,ACK);
    117118//    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_DEPTH          ,"depth"          ,Tdepth_t  ,_param->_size_depth);
    119120//    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);
     121      ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_SRC    ,"address_src"    ,Taddress_t,_param->_size_instruction_address);
     122      ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_DEST   ,"address_dest"   ,Taddress_t,_param->_size_instruction_address);
    122123    }
    123124
     
    132133      ALLOC1_SIGNAL_OUT(out_UPDATE_DIRECTION_GOOD       ,"direction_good"       ,Tcontrol_t         ,1);
    133134      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_VAL              ,"btb_val"              ,Tcontrol_t         ,1);
    134       ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_ADDRESS_SRC      ,"btb_address_src"      ,Taddress_t         ,_param->_size_address);
    135       ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_ADDRESS_DEST     ,"btb_address_dest"     ,Taddress_t         ,_param->_size_address);
     135      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_ADDRESS_SRC      ,"btb_address_src"      ,Taddress_t         ,_param->_size_instruction_address);
     136      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_ADDRESS_DEST     ,"btb_address_dest"     ,Taddress_t         ,_param->_size_instruction_address);
    136137      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_CONDITION        ,"btb_condition"        ,Tbranch_condition_t,_param->_size_branch_condition);
    137138      ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_VAL              ,"dir_val"              ,Tcontrol_t         ,1);
     
    139140      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_VAL              ,"ras_val"              ,Tcontrol_t         ,1);
    140141      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_PUSH             ,"ras_push"             ,Tcontrol_t         ,1);
    141       ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_ADDRESS          ,"ras_address"          ,Taddress_t         ,_param->_size_address);
     142      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_ADDRESS          ,"ras_address"          ,Taddress_t         ,_param->_size_instruction_address);
    142143      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_INDEX            ,"ras_index"            ,Tptr_t             ,_param->_max_size_ras_index);
    143144      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_PREDICTION_IFETCH,"ras_prediction_ifetch",Tcontrol_t         ,1);
     
    147148    {
    148149      ALLOC1_INTERFACE("depth",OUT,SOUTH, "depth", _param->_nb_context);
    149 
    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);
    152     }
    153 
     150      ALLOC1_SIGNAL_OUT(out_DEPTH_CURRENT,"CURRENT",Tdepth_t,_param->_size_depth);
     151      ALLOC1_SIGNAL_OUT(out_DEPTH_MIN    ,"MIN"    ,Tdepth_t,_param->_size_depth);
     152      ALLOC1_SIGNAL_OUT(out_DEPTH_MAX    ,"MAX"    ,Tdepth_t,_param->_size_depth+1);
     153    }
     154
     155    if (usage_is_set(_usage,USE_SYSTEMC))
     156      {
    154157    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    155     internal_PREDICT_ACK                     = new Tcontrol_t [_param->_nb_inst_predict];
    156     internal_DECOD_ACK                       = new Tcontrol_t [_param->_nb_inst_decod];
    157     internal_BRANCH_COMPLETE_ACK             = new Tcontrol_t [_param->_nb_inst_branch_complete];
    158     internal_BRANCH_COMPLETE_MISS_PREDICTION = new Tcontrol_t [_param->_nb_inst_branch_complete];
    159     internal_BRANCH_COMPLETE_TAKE            = new Tcontrol_t [_param->_nb_inst_branch_complete];
    160     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];
    163     internal_UPDATE_VAL                      = new Tcontrol_t [_param->_nb_inst_update];
    164     internal_UPDATE_CONTEXT_ID               = new Tcontext_t [_param->_nb_inst_update];
    165     internal_UPDATE_DEPTH                    = new Tdepth_t   [_param->_nb_inst_update];
     158    ALLOC1(internal_PREDICT_ACK                     ,Tcontrol_t,_param->_nb_inst_predict);
     159    ALLOC1(internal_PREDICT_UPDATE_PREDICTION_ID    ,Tdepth_t  ,_param->_nb_inst_predict);
     160    ALLOC1(internal_DECOD_ACK                       ,Tcontrol_t,_param->_nb_inst_decod);
     161    ALLOC1(internal_DECOD_UPT_PTR_WRITE             ,uint32_t  ,_param->_nb_inst_decod);
     162    ALLOC1(internal_BRANCH_COMPLETE_ACK             ,Tcontrol_t,_param->_nb_inst_branch_complete);
     163    ALLOC1(internal_BRANCH_COMPLETE_MISS_PREDICTION ,Tcontrol_t,_param->_nb_inst_branch_complete);
     164    ALLOC1(internal_BRANCH_COMPLETE_TAKE            ,Tcontrol_t,_param->_nb_inst_branch_complete);
     165    ALLOC1(internal_BRANCH_COMPLETE_ADDRESS_DEST    ,Taddress_t,_param->_nb_inst_branch_complete);
     166    ALLOC1(internal_BRANCH_EVENT_VAL                ,Tcontrol_t,_param->_nb_context);
     167    ALLOC1(internal_BRANCH_EVENT_DEPTH              ,Tdepth_t  ,_param->_nb_context);
     168    ALLOC1(internal_UPDATE_VAL                      ,Tcontrol_t,_param->_nb_inst_update);
     169    ALLOC1(internal_UPDATE_VAL_WITHOUT_ACK          ,Tcontrol_t,_param->_nb_inst_update);
     170    ALLOC1(internal_UPDATE_CONTEXT_ID               ,Tcontext_t,_param->_nb_inst_update);
     171    ALLOC1(internal_UPDATE_FROM_UFPT                ,bool      ,_param->_nb_inst_update);
     172    ALLOC1(internal_UPDATE_DEPTH                    ,Tdepth_t  ,_param->_nb_inst_update);
     173    ALLOC1(internal_UPDATE_RAS                      ,bool      ,_param->_nb_inst_update);
    166174
    167175    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    168     reg_TOP                     = new uint32_t  [_param->_nb_context];
    169     reg_BOTTOM                  = new uint32_t  [_param->_nb_context];
    170     reg_NB_ELT                  = new uint32_t  [_param->_nb_context];
    171     reg_NB_ELT_UPDATE           = new uint32_t  [_param->_nb_context];
    172     reg_NB_ELT_NEED_UPDATE      = new uint32_t  [_param->_nb_context];
    173     reg_UPDATE_PREDICTION_TABLE = new entry_t * [_param->_nb_context];
    174     for (uint32_t i=0; i<_param->_nb_context; i++)
    175       {
    176 #ifndef NO_INIT
    177         reg_TOP [i] = 0;
    178 #endif
    179         reg_UPDATE_PREDICTION_TABLE [i] = new entry_t [_param->_size_queue[i]];
     176
     177    ALLOC1(reg_IS_ACCURATE                  ,bool         ,_param->_nb_context);
     178                                                         
     179    ALLOC2(reg_UPDATE_FETCH_PREDICTION_TABLE,ufpt_entry_t ,_param->_nb_context,_param->_size_ufpt_queue[it1]);
     180    ALLOC1(reg_UFPT_BOTTOM                  ,uint32_t     ,_param->_nb_context);
     181    ALLOC1(reg_UFPT_TOP                     ,uint32_t     ,_param->_nb_context);
     182    ALLOC1(reg_UFPT_UPDATE                  ,uint32_t     ,_param->_nb_context);
     183    ALLOC1(reg_UFPT_NB_NEED_UPDATE          ,uint32_t     ,_param->_nb_context);
     184                                                         
     185    ALLOC2(reg_UPDATE_PREDICTION_TABLE      ,upt_entry_t  ,_param->_nb_context,_param->_size_upt_queue[it1]);
     186    ALLOC1(reg_UPT_BOTTOM                   ,uint32_t     ,_param->_nb_context);
     187    ALLOC1(reg_UPT_TOP                      ,uint32_t     ,_param->_nb_context);
     188    ALLOC1(reg_UPT_UPDATE                   ,uint32_t     ,_param->_nb_context);
     189    ALLOC1(reg_UPT_NB_NEED_UPDATE           ,uint32_t     ,_param->_nb_context);
     190
     191    ALLOC1(reg_EVENT_STATE                  ,event_state_t,_param->_nb_context);
     192    ALLOC1(reg_EVENT_RAS_CORRUPTED          ,Tcontrol_t   ,_param->_nb_context);
     193    ALLOC1(reg_EVENT_ADDRESS_SRC            ,Taddress_t   ,_param->_nb_context);
     194    ALLOC1(reg_EVENT_ADDRESS_SRC_VAL        ,Tcontrol_t   ,_param->_nb_context);
     195    ALLOC1(reg_EVENT_ADDRESS_DEST           ,Taddress_t   ,_param->_nb_context);
    180196      }
     197
    181198    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    182199
    183200#ifdef POSITION
    184     _component->generate_file();
     201    if (usage_is_set(_usage,USE_POSITION))
     202      _component->generate_file();
    185203#endif
    186204
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp

    r82 r88  
    77
    88#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    4243        delete []  in_PREDICT_RAS_ADDRESS         ;
    4344        delete []  in_PREDICT_RAS_INDEX           ;
    44 //      if (_param->_have_port_depth)
    45 //      delete [] out_PREDICT_UPDATE_PREDICTION_ID;
     45        if (_param->_have_port_depth)
     46        delete [] out_PREDICT_UPDATE_PREDICTION_ID;
    4647       
    4748        // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    5859        delete []  in_DECOD_MISS_IFETCH           ;
    5960        delete []  in_DECOD_MISS_DECOD            ;
    60         if (_param->_have_port_max_depth)
     61        if (_param->_have_port_depth)
    6162        delete []  in_DECOD_UPDATE_PREDICTION_ID  ;
    6263//      if (_param->_have_port_depth)
    6364//      delete [] out_DECOD_DEPTH                 ;
     65        delete []  in_DECOD_IS_ACCURATE           ;
    6466       
    6567        // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    6870        if (_param->_have_port_context_id)
    6971        delete []  in_BRANCH_COMPLETE_CONTEXT_ID     ;
    70         if (_param->_have_port_max_depth)
     72        if (_param->_have_port_depth)
    7173        delete []  in_BRANCH_COMPLETE_DEPTH          ;
    7274        delete []  in_BRANCH_COMPLETE_ADDRESS        ;
     
    8284//      if (_param->_have_port_context_id)
    8385//      delete []  in_BRANCH_EVENT_CONTEXT_ID     ;
    84 //      if (_param->_have_port_max_depth)
     86//      if (_param->_have_port_depth)
    8587//      delete []  in_BRANCH_EVENT_DEPTH          ;
    8688//      delete [] out_BRANCH_EVENT_MISS_PREDICTION;
     
    109111
    110112        // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    111         if (_param->_have_port_max_depth)
     113        if (_param->_have_port_depth)
    112114          {
    113         delete [] out_DEPTH_NB_BRANCH;
    114         delete [] out_DEPTH_TAIL;
     115        delete [] out_DEPTH_CURRENT;
     116        delete [] out_DEPTH_MIN;
    115117          }
    116       }
    117 
    118     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    119     delete [] internal_PREDICT_ACK                     ;
    120     delete [] internal_DECOD_ACK                       ;
    121     delete [] internal_BRANCH_COMPLETE_ACK             ;
    122     delete [] internal_BRANCH_COMPLETE_MISS_PREDICTION ;
    123     delete [] internal_BRANCH_COMPLETE_TAKE            ;
    124     delete [] internal_BRANCH_COMPLETE_ADDRESS_DEST    ;
    125     delete [] internal_BRANCH_EVENT_VAL                ;
    126     delete [] internal_BRANCH_EVENT_DEPTH              ;
    127     delete [] internal_UPDATE_VAL                      ;
    128     delete [] internal_UPDATE_CONTEXT_ID               ;
    129     delete [] internal_UPDATE_DEPTH                    ;
    130 
    131     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    132     delete [] reg_TOP;
    133     delete [] reg_BOTTOM;
    134     delete [] reg_NB_ELT;
    135     delete [] reg_NB_ELT_UPDATE;
    136     delete [] reg_NB_ELT_NEED_UPDATE;
    137     for (uint32_t i=0; i<_param->_nb_context; i++)
    138       delete [] reg_UPDATE_PREDICTION_TABLE [i];
    139     delete [] reg_UPDATE_PREDICTION_TABLE;
     118        delete [] out_DEPTH_MAX;
     119       
     120        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     121        DELETE1(internal_PREDICT_ACK                     ,_param->_nb_inst_predict);
     122        DELETE1(internal_PREDICT_UPDATE_PREDICTION_ID    ,_param->_nb_inst_predict);
     123        DELETE1(internal_DECOD_ACK                       ,_param->_nb_inst_decod);
     124        DELETE1(internal_DECOD_UPT_PTR_WRITE             ,_param->_nb_inst_decod);
     125        DELETE1(internal_BRANCH_COMPLETE_ACK             ,_param->_nb_inst_branch_complete);
     126        DELETE1(internal_BRANCH_COMPLETE_MISS_PREDICTION ,_param->_nb_inst_branch_complete);
     127        DELETE1(internal_BRANCH_COMPLETE_TAKE            ,_param->_nb_inst_branch_complete);
     128        DELETE1(internal_BRANCH_COMPLETE_ADDRESS_DEST    ,_param->_nb_inst_branch_complete);
     129        DELETE1(internal_BRANCH_EVENT_VAL                ,_param->_nb_context);
     130        DELETE1(internal_BRANCH_EVENT_DEPTH              ,_param->_nb_context);
     131        DELETE1(internal_UPDATE_VAL                      ,_param->_nb_inst_update);
     132        DELETE1(internal_UPDATE_VAL_WITHOUT_ACK          ,_param->_nb_inst_update);
     133        DELETE1(internal_UPDATE_CONTEXT_ID               ,_param->_nb_inst_update);
     134        DELETE1(internal_UPDATE_FROM_UFPT                ,_param->_nb_inst_update);
     135        DELETE1(internal_UPDATE_DEPTH                    ,_param->_nb_inst_update);
     136        DELETE1(internal_UPDATE_RAS                      ,_param->_nb_inst_update);
     137       
     138        // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     139        DELETE1(reg_IS_ACCURATE                  ,_param->_nb_context);
     140       
     141        DELETE2(reg_UPDATE_FETCH_PREDICTION_TABLE,_param->_nb_context,_param->_size_ufpt_queue[it1]);
     142        DELETE1(reg_UFPT_BOTTOM                  ,_param->_nb_context);
     143        DELETE1(reg_UFPT_TOP                     ,_param->_nb_context);
     144        DELETE1(reg_UFPT_UPDATE                  ,_param->_nb_context);
     145        DELETE1(reg_UFPT_NB_NEED_UPDATE          ,_param->_nb_context);
     146       
     147        DELETE2(reg_UPDATE_PREDICTION_TABLE      ,_param->_nb_context,_param->_size_upt_queue[it1]);
     148        DELETE1(reg_UPT_BOTTOM                   ,_param->_nb_context);
     149        DELETE1(reg_UPT_TOP                      ,_param->_nb_context);
     150        DELETE1(reg_UPT_UPDATE                   ,_param->_nb_context);
     151        DELETE1(reg_UPT_NB_NEED_UPDATE           ,_param->_nb_context);
     152       
     153        DELETE1(reg_EVENT_STATE                  ,_param->_nb_context);
     154        DELETE1(reg_EVENT_RAS_CORRUPTED          ,_param->_nb_context);
     155        DELETE1(reg_EVENT_ADDRESS_SRC            ,_param->_nb_context);
     156        DELETE1(reg_EVENT_ADDRESS_SRC_VAL        ,_param->_nb_context);
     157        DELETE1(reg_EVENT_ADDRESS_DEST           ,_param->_nb_context);
     158       }
    140159
    141160    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
     34    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
    3335    _interfaces->testbench();
    3436#endif
  • 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

    r82 r88  
    2222  void Update_Prediction_Table::genMealy_branch_complete (void)
    2323  {
    24     log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin");
     24    log_begin(Update_Prediction_Table,FUNCTION);
     25    log_function(Update_Prediction_Table,FUNCTION,_name.c_str());
    2526   
    2627    for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
     28#ifdef DEBUG_TEST
     29      // just to don't have exception in not transaction
     30      if (PORT_READ(in_BRANCH_COMPLETE_VAL [i]))
     31#endif
    2732      {
     33        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * BRANCH_COMPLETE [%d]",i);
     34
    2835        Tcontext_t          context   = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0;
    29         Tdepth_t            depth     = (_param->_have_port_max_depth )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
     36        Tdepth_t            depth     = (_param->_have_port_depth    )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
    3037        Tcontrol_t          miss      = false;
    3138        Tcontrol_t          take      = reg_UPDATE_PREDICTION_TABLE [context][depth]._last_take   ;
    3239        Taddress_t          addr_dest = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_dest;
    3340        Tbranch_condition_t condition = reg_UPDATE_PREDICTION_TABLE [context][depth]._condition   ;
     41
     42        Tcontrol_t          flag      = PORT_READ(in_BRANCH_COMPLETE_FLAG [i]);
     43        Taddress_t          addr_good = PORT_READ(in_BRANCH_COMPLETE_ADDRESS [i]);
     44
     45        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * context        : %d",context);
     46        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * depth          : %d",depth  );
     47        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * condition      : %s",toString(condition).c_str());
     48        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * flag           : %d",flag);
     49        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * address_good   : %.8x",addr_good);
     50
     51        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * (before)");
     52        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * miss         : %d",miss);
     53        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * take         : %d",take);
     54        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * address_dest : %.8x",addr_dest);
    3455
    3556        switch (condition)
     
    3960            {
    4061              //miss      : always hit
    41               //addr_dest : know in decod stage
     62              //addr_dest : compute in decod stage
     63
     64#ifdef DEBUG_TEST
     65              if (take != 1)
     66                throw ERRORMORPHEO(FUNCTION,toString("Branch_complete[%d] (condition %s) : bad direction.",i,toString(condition).c_str()));
     67              if (addr_dest != addr_good)
     68                throw ERRORMORPHEO(FUNCTION,toString("Branch_complete[%d] (condition %s) : bad destination address.",i,toString(condition).c_str()));
     69#endif
     70
    4271              break;
    4372            }
    4473          case BRANCH_CONDITION_FLAG_UNSET                        : // l.bnf
    4574            {
    46               Tcontrol_t take_good = PORT_READ(in_BRANCH_COMPLETE_FLAG [i]) == 0;
     75              //addr_dest : compute in decod stage
     76              //miss if the direction is bad
     77              Tcontrol_t take_good = not flag; // flag set = not take
     78
    4779              miss = (take != take_good);
    4880              take = take_good;
    49               //addr_dest : know in decod stage
     81
     82#ifdef DEBUG_TEST
     83              if (addr_dest != addr_good)
     84                throw ERRORMORPHEO(FUNCTION,toString("Branch_complete[%d] (condition %s) : bad destination address.",i,toString(condition).c_str()));
     85#endif
     86
    5087              break;
    5188            }
    5289          case BRANCH_CONDITION_FLAG_SET                          : // l.bf
    5390            {
    54 //            log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * BRANCH_CONDITION_FLAG_SET");
    55              
    56               Tcontrol_t take_good = PORT_READ(in_BRANCH_COMPLETE_FLAG [i]) == 1;
     91              //addr_dest : compute in decod stage
     92              //miss if the direction is bad
     93              Tcontrol_t take_good = flag; // flag set = take
     94
    5795              miss = (take != take_good);
    5896              take = take_good;
    5997
    60 //            log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * flag      : %d",PORT_READ(in_BRANCH_COMPLETE_FLAG [i]));
    61 //            log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * take_good : %d",take_good);
    62 //            log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * miss      : %d",miss);
    63              
    64               //addr_dest : know in decod stage
     98#ifdef DEBUG_TEST
     99              if (addr_dest != addr_good)
     100                throw ERRORMORPHEO(FUNCTION,toString("Branch_complete[%d] (condition %s) : bad destination address.",i,toString(condition).c_str()));
     101#endif
     102
    65103              break;
    66104            }
     
    69107          case BRANCH_CONDITION_READ_STACK                        : // l.jr (rb==r9)
    70108            {
    71               Taddress_t addr_good = PORT_READ(in_BRANCH_COMPLETE_ADDRESS [i]);
    72               miss = ((take == 1) and
    73                       (addr_dest = addr_good));
    74               take = 1;
     109              // miss if destination address is bad
     110              miss      = (addr_dest != addr_good);
    75111              addr_dest = addr_good;
     112
     113#ifdef DEBUG_TEST
     114              if (take != 1)
     115                throw ERRORMORPHEO(FUNCTION,toString("Branch_complete[%d] (condition %s) : bad direction.",i,toString(condition).c_str()));
     116#endif
     117             
    76118              break;
    77119            }
    78120          }
    79121
    80 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * miss      : %d",miss);
    81 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * take      : %d",take);
    82 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * address   : %x",addr_dest);
    83 
     122        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * (after)");
     123        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * miss         : %d",miss);
     124        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * take         : %d",take);
     125        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * address_dest : %.8x",addr_dest);
     126       
    84127        internal_BRANCH_COMPLETE_MISS_PREDICTION [i] = miss     ;
    85128        internal_BRANCH_COMPLETE_TAKE            [i] = take     ;
    86129        internal_BRANCH_COMPLETE_ADDRESS_DEST    [i] = addr_dest;
    87 
     130       
    88131        PORT_WRITE(out_BRANCH_COMPLETE_MISS_PREDICTION [i], internal_BRANCH_COMPLETE_MISS_PREDICTION [i]);
    89132        PORT_WRITE(out_BRANCH_COMPLETE_TAKE            [i], internal_BRANCH_COMPLETE_TAKE            [i]);
     
    92135      }
    93136
    94     log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
     137    log_end(Update_Prediction_Table,FUNCTION);
    95138  };
    96139
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_decod.cpp

    r82 r88  
    2222  void Update_Prediction_Table::genMealy_decod (void)
    2323  {
    24     log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin");
     24    log_begin(Update_Prediction_Table,FUNCTION);
     25    log_function(Update_Prediction_Table,FUNCTION,_name.c_str());
    2526   
     27    // WARNING : One branch per context per cycle
    2628    for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    2729      {
    28         Tcontrol_t miss = PORT_READ(in_DECOD_MISS_DECOD [i]);
     30        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * DECOD [%d]",i);
    2931
    30         if (miss)
    31           {
    32             // miss : need a empty slot.
    33             Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_DECOD_CONTEXT_ID [i]):0;
    34             uint32_t   top     = reg_TOP[context];
    35             internal_DECOD_ACK [i] = (reg_UPDATE_PREDICTION_TABLE [context][top]._state == UPDATE_PREDICTION_STATE_EMPTY);
    36           }
    37         else
    38           {
    39             internal_DECOD_ACK [i] = true;
    40           }
     32        Tcontext_t    context     = (_param->_have_port_context_id)?PORT_READ(in_DECOD_CONTEXT_ID [i]):0;
     33        bool          is_accurate = reg_IS_ACCURATE [context];
     34        event_state_t event_state = reg_EVENT_STATE [context];
     35        uint32_t      ptr_write   = reg_UPT_TOP     [context];
     36
     37        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * context     : %d",context    );
     38        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * is_accurate : %d",is_accurate);
     39        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * event_state : %s",toString(event_state).c_str());
     40        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * ptr_write   : %d",ptr_write  );
     41        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * upt_state   : %s",toString(reg_UPDATE_PREDICTION_TABLE [context][ptr_write]._state).c_str());
     42
     43        // ack :
     44        //   * in all case (miss or hit), need empty slot
     45        //   * is_accurate
     46        //   * event_state : don't update upt
     47        internal_DECOD_ACK           [i] = ((reg_UPDATE_PREDICTION_TABLE [context][ptr_write]._state == UPDATE_PREDICTION_STATE_EMPTY) and
     48                                            is_accurate and
     49//                                             (
     50                                             (event_state == EVENT_STATE_OK            )//  or
     51//                                              (event_state == EVENT_STATE_FLUSH_UFPT    ) or
     52//                                              (event_state == EVENT_STATE_UPDATE_CONTEXT))
     53                                            );
     54        internal_DECOD_UPT_PTR_WRITE [i] = ptr_write;
     55
     56        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * ack         : %d",internal_DECOD_ACK [i]);
    4157
    4258        PORT_WRITE(out_DECOD_ACK [i], internal_DECOD_ACK [i]);
    4359      }
    4460
    45     log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
     61    log_end(Update_Prediction_Table,FUNCTION);
    4662  };
    4763
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_predict.cpp

    r81 r88  
    2222  void Update_Prediction_Table::genMealy_predict (void)
    2323  {
    24     log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin");
    25    
     24    log_begin(Update_Prediction_Table,FUNCTION);
     25    log_function(Update_Prediction_Table,FUNCTION,_name.c_str());
     26
     27    if (PORT_READ(in_NRESET) != 0)
     28      {
     29
    2630    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
    2731      {
    2832        Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_PREDICT_CONTEXT_ID [i]):0;
    29         uint32_t   top     = reg_TOP[context];
     33        uint32_t   top     = reg_UFPT_TOP[context];
    3034
    31 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"PREDICT [%d] (genMealy)",i);
    32 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * context     : %d",context);
    33 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * top         : %d",top);
    34 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * state       : %s",toString(reg_UPDATE_PREDICTION_TABLE [context][top]._state).c_str());
    35 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * is accurate : %d",PORT_READ(in_PREDICT_BTB_IS_ACCURATE [i]));
     35        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"PREDICT [%d] (genMealy)",i);
     36        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * context     : %d",context);
     37        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * top         : %d",top);
     38        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * state       : %s",toString(reg_UPDATE_FETCH_PREDICTION_TABLE [context][top]._state).c_str());
     39        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * is accurate : %d",PORT_READ(in_PREDICT_BTB_IS_ACCURATE [i]));
    3640//      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * need update : %d",reg_NB_ELT_NEED_UPDATE [context]);
    3741
    38         // Not Full, accurate and no previous miss
    39         // Optimisation to restart faster :
    40         //   don't counter nb_elt_ko, but just nb_elt that need a update (change branch structure)
    41         internal_PREDICT_ACK [i] = ((reg_UPDATE_PREDICTION_TABLE [context][top]._state == UPDATE_PREDICTION_STATE_EMPTY) and
    42                                     PORT_READ(in_PREDICT_BTB_IS_ACCURATE [i]) and
    43                                     (reg_NB_ELT_NEED_UPDATE [context] == 0));
     42        internal_PREDICT_UPDATE_PREDICTION_ID [i] = top;
    4443
    45 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * ACK         : %d",internal_PREDICT_ACK [i]);
     44        if (_param->_have_port_depth)
     45        PORT_WRITE(out_PREDICT_UPDATE_PREDICTION_ID [i], internal_PREDICT_UPDATE_PREDICTION_ID [i]);
    4646
     47        bool is_accurate = not _param->_not_accurate_block_predict or reg_IS_ACCURATE[context];
     48
     49        // Ack if :
     50        //  * slot is empty
     51        //  * no previous miss
     52        //  * is_accurate
     53        internal_PREDICT_ACK [i] = ((reg_UPDATE_FETCH_PREDICTION_TABLE [context][top]._state == UPDATE_FETCH_PREDICTION_STATE_EMPTY) and
     54//                                  PORT_READ(in_PREDICT_BTB_IS_ACCURATE [i]) and
     55                                    (reg_EVENT_STATE [context] == EVENT_STATE_OK) and
     56                                    is_accurate);
     57
     58
     59        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * ACK         : %d",internal_PREDICT_ACK [i]);
    4760        PORT_WRITE(out_PREDICT_ACK [i], internal_PREDICT_ACK [i]);
    4861      }
    4962
    50     log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
     63      }//don't reset
     64
     65    log_end(Update_Prediction_Table,FUNCTION);
    5166  };
    5267
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp

    r82 r88  
    2222  void Update_Prediction_Table::genMoore (void)
    2323  {
    24     log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin");
     24    log_begin(Update_Prediction_Table,FUNCTION);
     25    log_function(Update_Prediction_Table,FUNCTION,_name.c_str());
     26    log_printf(NONE,Update_Prediction_Table,FUNCTION,FUNCTION);
     27
     28    if (PORT_READ(in_NRESET) == 1)
     29      {
    2530
    2631    // ===================================================================
     
    3035    for (uint32_t i=0; i<_param->_nb_context; i++)
    3136      {
    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       }
     37        if (_param->_have_port_depth)
     38          {
     39        PORT_WRITE(out_DEPTH_CURRENT [i], reg_UPT_TOP    [i]);
     40        PORT_WRITE(out_DEPTH_MIN     [i], reg_UPT_BOTTOM [i]);
     41          }
     42        PORT_WRITE(out_DEPTH_MAX     [i], reg_UPT_TOP    [i]);
     43      }
     44
    3845    // ===================================================================
    3946    // =====[ UPDATE ]====================================================
    4047    // ===================================================================
    4148
    42     Tdepth_t tab_depth [_param->_nb_context];
     49    bool     retire_ras_from_ufpt [_param->_nb_context]; // event ufpt -> restore RAS, else update upt
     50    bool     retire_ras_from_upt  [_param->_nb_context]; // event upt  -> restore RAS, else restore others structure
     51    bool     ufpt_update          [_param->_nb_context];
     52    bool     upt_update           [_param->_nb_context];
     53    Tdepth_t tab_ufpt_depth       [_param->_nb_context];
     54    Tdepth_t tab_upt_depth        [_param->_nb_context];
     55
    4356    for (uint32_t i=0; i<_param->_nb_context; i++)
    44       tab_depth [i] = reg_BOTTOM [i];
     57      {
     58        event_state_t event_state = reg_EVENT_STATE [i];
     59
     60        retire_ras_from_ufpt [i] = ((event_state == EVENT_STATE_FLUSH_UFPT        ) or
     61                                    (event_state == EVENT_STATE_FLUSH_UFPT_AND_UPT));
     62        retire_ras_from_upt  [i] = (event_state == EVENT_STATE_FLUSH_UPT_RAS);
     63
     64        ufpt_update          [i] = true;
     65        upt_update           [i] = true;
     66        tab_ufpt_depth       [i] = reg_UFPT_UPDATE [i];
     67        tab_upt_depth        [i] = reg_UPT_UPDATE  [i];
     68      }
    4569
    4670    for (uint32_t i=0; i<_param->_nb_inst_update; i++)
    4771      {
    48         uint32_t   context = (reg_UPDATE_PRIORITY+i)%_param->_nb_context;
    49         Tdepth_t   depth   = tab_depth[context];
    50         state_t    state   = reg_UPDATE_PREDICTION_TABLE [context][depth]._state;
     72        Tcontext_t          context     = (reg_UPDATE_PRIORITY+i)%_param->_nb_context;
     73
     74        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * UPDATE [%d] (genMoore)",i);
     75        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * context         : %d",context);
     76        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * event_state     : %s",toString(reg_EVENT_STATE [context]).c_str());
     77
     78        Tcontrol_t          val                  = false;
     79        Tcontrol_t          val_without_ack      = false;
     80        Tcontrol_t          miss_prediction      ;
     81        Tcontrol_t          direction_good       ;
     82        Tcontrol_t          btb_val              ;
     83        Taddress_t          btb_address_src      ;
     84        Taddress_t          btb_address_dest     ;
     85        Tbranch_condition_t btb_condition        ;
     86        Tcontrol_t          dir_val              ;
     87        Thistory_t          dir_history          ;
     88        Tcontrol_t          ras_val              ;
     89        Tcontrol_t          ras_push             ;
     90        Taddress_t          ras_address          ;
     91        Tptr_t              ras_index            ;
     92        Tcontrol_t          ras_prediction_ifetch;
     93
     94        // Test if update fetch prediction table need update port
     95        if (retire_ras_from_ufpt [context])
     96          {
     97            if (ufpt_update [context])
     98              {
     99                // Update Fetch Prediction Table
     100                // An update of ufpt is to previous miss. Just restore Return Address Stack
     101               
     102                Tdepth_t            depth     = tab_ufpt_depth[context];
     103                ufpt_state_t        state     = reg_UPDATE_FETCH_PREDICTION_TABLE [context][depth]._state;
     104                Tbranch_condition_t condition = reg_UPDATE_FETCH_PREDICTION_TABLE [context][depth]._condition;
     105               
     106                log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * Update Fetch Prediction Table");
     107                log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * depth           : %d",depth    );
     108                log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * state           : %s",toString(state    ).c_str());
     109                log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * condition       : %s",toString(condition).c_str());
     110               
     111                val                   = (state == UPDATE_FETCH_PREDICTION_STATE_EVENT);
     112                miss_prediction       = 1;
     113//              direction_good        = ;
     114                btb_val               = 0; // don't update btb (is update by the event branch)
     115//              btb_address_src       = ;
     116//              btb_address_dest      = ;
     117//              btb_condition         = ;
     118                dir_val               = 0; // don't update btb (is update by the event branch (if conditionnal branch))
     119//              dir_history           = ;
     120                ras_val               = update_ras(condition); // repop/ repush data -> don't corrupt ras
     121                ras_push              = push_ras(condition);
     122                ras_address           = reg_UPDATE_FETCH_PREDICTION_TABLE [context][depth]._address_ras;
     123                ras_index             = reg_UPDATE_FETCH_PREDICTION_TABLE [context][depth]._index_ras;
     124                ras_prediction_ifetch = 1;
     125               
     126                internal_UPDATE_FROM_UFPT [i] = true;
     127                internal_UPDATE_DEPTH     [i] = depth;
     128                internal_UPDATE_RAS       [i] = false;
     129
     130                // Warning : don't update same entry
     131                if (depth == reg_UFPT_BOTTOM[context])
     132                  ufpt_update [context] = false;
     133               
     134                tab_ufpt_depth[context] = (depth==0)?(_param->_size_ufpt_queue[context]-1):(depth-1);
     135              }
     136          }
     137        else
     138          {
     139            if (upt_update [context])
     140              {
     141                // Update Prediction Table
     142               
     143                Tdepth_t            depth     = tab_upt_depth[context];
     144                upt_state_t         state     = reg_UPDATE_PREDICTION_TABLE [context][depth]._state;
     145                Tbranch_condition_t condition = reg_UPDATE_PREDICTION_TABLE [context][depth]._condition;
     146                Tcontrol_t          ifetch    = reg_UPDATE_PREDICTION_TABLE [context][depth]._ifetch_prediction;
     147               
     148                log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * Update Prediction Table");
     149                log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * depth           : %d",depth    );
     150                log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * state           : %s",toString(state    ).c_str());
     151                log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * condition       : %s",toString(condition).c_str());
     152             
     153                Tcontrol_t          state_is_ok_ko           = ((state == UPDATE_PREDICTION_STATE_OK) or
     154                                                                (state == UPDATE_PREDICTION_STATE_KO));
     155                Tcontrol_t          state_is_event           = (state == UPDATE_PREDICTION_STATE_EVENT);
     156                Tcontrol_t          state_is_event_update    = state_is_event and     need_update(condition);
     157                Tcontrol_t          state_is_event_no_update = state_is_event and not need_update(condition);
     158
     159                if (retire_ras_from_upt [context])
     160                  {
     161                val                   = state_is_event_update;
     162                val_without_ack       = state_is_event_no_update;
     163                  }
     164                else
     165                  {
     166                val                   = state_is_ok_ko;
     167                val_without_ack       = false;
     168                  }                 
     169
     170                miss_prediction       = (state != UPDATE_PREDICTION_STATE_OK);
     171                direction_good        = reg_UPDATE_PREDICTION_TABLE [context][depth]._good_take   ;
     172                btb_val               = update_btb(condition);
     173                btb_address_src       = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src ;
     174                btb_address_dest      = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_dest;
     175                btb_condition         = condition;
     176                dir_val               = update_dir(condition) and ifetch; // if not ifetch, then static prediction
     177                dir_history           = reg_UPDATE_PREDICTION_TABLE [context][depth]._history     ;
     178                ras_val               = update_ras(condition); // repop/ repush data -> don't corrupt ras
     179                ras_push              = push_ras(condition);
     180                ras_address           = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_ras;
     181                ras_index             = reg_UPDATE_PREDICTION_TABLE [context][depth]._index_ras;
     182                ras_prediction_ifetch = ifetch;
     183
     184                internal_UPDATE_FROM_UFPT [i] = false;
     185                internal_UPDATE_DEPTH     [i] = depth;
     186                internal_UPDATE_RAS       [i] = retire_ras_from_upt [context];
     187
     188                // Warning : don't update same entry
     189                if (retire_ras_from_upt [context])
     190                  {
     191                    // Restore RAS.
     192                    if ((depth == reg_UPT_BOTTOM[context]) or not (val or val_without_ack))
     193                      upt_update [context] = false;
     194                   
     195                    tab_upt_depth[context] = (depth==0)?(_param->_size_upt_queue[context]-1):(depth-1);
     196                  }
     197                else
     198                  {
     199                    if ((depth == reg_UPT_TOP [context]) or not (val or val_without_ack))
     200                      upt_update [context] = false;
     201                   
     202                    tab_upt_depth[context] = (depth+1)%_param->_size_upt_queue[context];
     203                  }
     204              }
     205          }
     206
     207        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * val             : %d",val    );
     208        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * val_without_ack : %d",val_without_ack);
     209        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * btb_val         : %d",btb_val);
     210        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * dir_val         : %d",dir_val);
     211        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * ras_val         : %d",ras_val);
     212
     213        internal_UPDATE_VAL             [i] = val;
     214        internal_UPDATE_VAL_WITHOUT_ACK [i] = val_without_ack;
     215        internal_UPDATE_CONTEXT_ID      [i] = context;
     216
     217        PORT_WRITE(out_UPDATE_VAL                   [i],internal_UPDATE_VAL [i]);
     218        if (val)
     219          {
     220        if (_param->_have_port_context_id)
     221        PORT_WRITE(out_UPDATE_CONTEXT_ID            [i],context              );
     222        PORT_WRITE(out_UPDATE_MISS_PREDICTION       [i],miss_prediction      );
     223        PORT_WRITE(out_UPDATE_DIRECTION_GOOD        [i],direction_good       );
     224        PORT_WRITE(out_UPDATE_BTB_VAL               [i],btb_val              );
     225        PORT_WRITE(out_UPDATE_BTB_ADDRESS_SRC       [i],btb_address_src      );
     226
     227        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * address_src     : %.8x",btb_address_src);
     228
     229        PORT_WRITE(out_UPDATE_BTB_ADDRESS_DEST      [i],btb_address_dest     );
     230        PORT_WRITE(out_UPDATE_BTB_CONDITION         [i],btb_condition        );
     231        PORT_WRITE(out_UPDATE_DIR_VAL               [i],dir_val              );
     232        if (_param->_have_port_history)
     233        PORT_WRITE(out_UPDATE_DIR_HISTORY           [i],dir_history          );
     234        PORT_WRITE(out_UPDATE_RAS_VAL               [i],ras_val              );
     235        PORT_WRITE(out_UPDATE_RAS_PUSH              [i],ras_push             );
     236        PORT_WRITE(out_UPDATE_RAS_ADDRESS           [i],ras_address          );
     237        PORT_WRITE(out_UPDATE_RAS_INDEX             [i],ras_index            );
     238        PORT_WRITE(out_UPDATE_RAS_PREDICTION_IFETCH [i],ras_prediction_ifetch);
     239          }
     240      }
     241
     242//     // ===================================================================
     243//     // =====[ BRANCH_EVENT ]==============================================
     244//     // ===================================================================
     245//     for (uint32_t i=0; i<_param->_nb_context; i++)
     246//       {
     247//      Tdepth_t   depth   = (reg_BOTTOM [i] + reg_NB_ELT_UPDATE [i])%_param->_size_queue [i];
     248//      state_t    state   = reg_UPDATE_PREDICTION_TABLE [i][depth]._state;
    51249       
    52         Tcontrol_t val     = ((state == UPDATE_PREDICTION_STATE_OK) or
    53                               (state == UPDATE_PREDICTION_STATE_KO));
    54 
    55 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"UPDATE [%d] (genMoore)",i);
    56 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * context     : %d",context);
    57 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * depth       : %d",depth);
    58 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * state       : %s",toString(state).c_str());
    59 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * val         : %d",val);
    60 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * addr_src    : %x",reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src );
    61 //      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * addr_dest   : %x",reg_UPDATE_PREDICTION_TABLE [context][depth]._address_dest);
    62 
    63         if (val)
    64           {
    65             Tbranch_condition_t cond    = reg_UPDATE_PREDICTION_TABLE [context][depth]._condition;
    66                      
    67             Tcontrol_t          ifetch  = reg_UPDATE_PREDICTION_TABLE [context][depth]._ifetch_prediction;
    68             Tcontrol_t          btb_val = true;
    69             Tcontrol_t          dir_val = (ifetch and // not ifetch == static prediction
    70                                            ((cond == BRANCH_CONDITION_FLAG_UNSET) or
    71                                             (cond == BRANCH_CONDITION_FLAG_SET)));
    72             Tcontrol_t          ras_val = ((cond == BRANCH_CONDITION_NONE_WITH_WRITE_STACK) or
    73                                            (cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK) or
    74                                            (cond == BRANCH_CONDITION_READ_STACK));
    75            
    76             Tcontrol_t          push = ((cond == BRANCH_CONDITION_NONE_WITH_WRITE_STACK) or
    77                                         (cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK));
    78 
    79             if (_param->_have_port_context_id)
    80             PORT_WRITE(out_UPDATE_CONTEXT_ID            [i],context);
    81             PORT_WRITE(out_UPDATE_MISS_PREDICTION       [i],(state == UPDATE_PREDICTION_STATE_KO));
    82             PORT_WRITE(out_UPDATE_DIRECTION_GOOD        [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._good_take   );
    83             PORT_WRITE(out_UPDATE_BTB_VAL               [i],btb_val);
    84             PORT_WRITE(out_UPDATE_BTB_ADDRESS_SRC       [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src );
    85             PORT_WRITE(out_UPDATE_BTB_ADDRESS_DEST      [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._address_dest);
    86             PORT_WRITE(out_UPDATE_BTB_CONDITION         [i],cond);
    87             PORT_WRITE(out_UPDATE_DIR_VAL               [i],dir_val);
    88             if (_param->_have_port_history)
    89             PORT_WRITE(out_UPDATE_DIR_HISTORY           [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._history     );
    90             PORT_WRITE(out_UPDATE_RAS_VAL               [i],ras_val);
    91             PORT_WRITE(out_UPDATE_RAS_PUSH              [i],push);
    92             PORT_WRITE(out_UPDATE_RAS_ADDRESS           [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._address_ras );
    93             PORT_WRITE(out_UPDATE_RAS_INDEX             [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._index_ras   );
    94             PORT_WRITE(out_UPDATE_RAS_PREDICTION_IFETCH [i],ifetch);
    95 
    96             internal_UPDATE_CONTEXT_ID [i] = context;
    97             internal_UPDATE_DEPTH      [i] = depth;
    98 
    99             tab_depth[context] = (depth+1)%_param->_size_queue[context];
    100           }
    101 
    102         internal_UPDATE_VAL [i] = val;
    103         PORT_WRITE(out_UPDATE_VAL [i], internal_UPDATE_VAL [i]);
    104       }
    105 
    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       }
    126     log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
     250//      Tcontrol_t val     = ((state == UPDATE_PREDICTION_STATE_EVENT) or
     251//                               (state == UPDATE_PREDICTION_STATE_WAITEND_AND_EVENT));
     252
     253//      if (val)
     254//        {
     255// //          breakpoint ("UPT : have an branch_event (depth %d)",depth);
     256//          PORT_WRITE(out_BRANCH_EVENT_ADDRESS_SRC  [i], reg_UPDATE_PREDICTION_TABLE [i][depth]._address_src );
     257//          PORT_WRITE(out_BRANCH_EVENT_ADDRESS_DEST [i], reg_UPDATE_PREDICTION_TABLE [i][depth]._address_dest);
     258//          internal_BRANCH_EVENT_DEPTH [i] = depth;
     259//        }
     260
     261//      internal_BRANCH_EVENT_VAL   [i] = val;
     262//      PORT_WRITE(out_BRANCH_EVENT_VAL [i], internal_BRANCH_EVENT_VAL [i]);
     263//       }
     264
     265      }
     266    log_end(Update_Prediction_Table,FUNCTION);
    127267  };
    128268
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_statistics_allocation.cpp

    r81 r88  
    2727                      "Update_Prediction_Table",
    2828                      param_statistics);
     29
     30//     _stat_nb_branch_hit        = new counter_t * [_param->_nb_context];
     31//     _stat_nb_branch_miss       = new counter_t * [_param->_nb_context];
     32//     _stat_nb_branch_unused     = new counter_t * [_param->_nb_context];
     33//     _stat_queue_nb_cycle_empty = new counter_t * [_param->_nb_context];
     34//     _stat_queue_nb_cycle_full  = new counter_t * [_param->_nb_context];
     35//     _stat_queue_nb_elt         = new counter_t * [_param->_nb_context];
     36 
     37//     for (uint32_t i=0; i<_param->_nb_context; ++i)
     38//       {
     39//         _stat_nb_branch_hit        [i] = _stat->create_counter("nb_branch_hit_"       +toString(i),"",toString(_("Branch hit speculation (context %d)"),i));
     40//         _stat_nb_branch_miss       [i] = _stat->create_counter("nb_branch_miss_"      +toString(i),"",toString(_("Branch miss speculation (context %d)"),i));
     41//         _stat_nb_branch_unused     [i] = _stat->create_counter("nb_branch_unused_"    +toString(i),"",toString(_("Branch unused, because an previous branch have miss speculation (context %d)"),i));
     42//         _stat_queue_nb_cycle_empty [i] = _stat->create_counter("queue_nb_cycle_empty_"+toString(i),"",toString(_("Cycle number where the Update Prediction Table is empty (context %d)"),i));
     43//         _stat_queue_nb_cycle_full  [i] = _stat->create_counter("queue_nb_cycle_full_" +toString(i),"",toString(_("Cycle number where the Update Prediction Table is full (%d elements) (context %d)"),_param->_size_queue[i],i));
     44//         _stat_queue_nb_elt         [i] = _stat->create_counter("queue_nb_elt_"        +toString(i),"",toString(_("Average branchement by cycle in Update Prediction Table (context %d)"),i));
     45//       }
    2946   
    3047    log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_statistics_deallocation.cpp

    r81 r88  
    2626    log_printf(INFO,Update_Prediction_Table,FUNCTION,"Generate Statistics file");
    2727   
    28     delete _stat;
     28    delete    _stat;
     29//     delete [] _stat_nb_branch_hit       ;
     30//     delete [] _stat_nb_branch_miss      ;
     31//     delete [] _stat_nb_branch_unused    ;
     32//     delete [] _stat_queue_nb_cycle_empty;
     33//     delete [] _stat_queue_nb_cycle_full ;
     34//     delete [] _stat_queue_nb_elt        ;
    2935   
    3036    log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp

    r82 r88  
    1717namespace update_prediction_table {
    1818
    19 
    2019#undef  FUNCTION
    2120#define FUNCTION "Update_Prediction_Table::transition"
    2221  void Update_Prediction_Table::transition (void)
    2322  {
    24     log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin");
     23    log_begin(Update_Prediction_Table,FUNCTION);
     24    log_function(Update_Prediction_Table,FUNCTION,_name.c_str());
    2525
    2626    if (PORT_READ(in_NRESET) == 0)
    2727      {
     28        // Initialisation
     29
     30        reg_UPDATE_PRIORITY = 0;
     31
     32        // All pointer is set at 0
    2833        for (uint32_t i=0; i<_param->_nb_context; i++)
    2934          {
    30             reg_TOP                [i] = 0;
    31             reg_BOTTOM             [i] = 0;
    32             reg_NB_ELT             [i] = 0;
    33             reg_NB_ELT_UPDATE      [i] = 0;
    34             reg_NB_ELT_NEED_UPDATE [i] = 0;
    35             for (uint32_t j=0; j<_param->_size_queue[i]; j++)
    36               reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EMPTY;
    37           }
    38         reg_UPDATE_PRIORITY = 0;
     35            for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; ++j)
     36              reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state = UPDATE_FETCH_PREDICTION_STATE_EMPTY;
     37            reg_UFPT_BOTTOM          [i] = 0;
     38            reg_UFPT_TOP             [i] = 0;
     39            reg_UFPT_UPDATE          [i] = 0;
     40            reg_UFPT_NB_NEED_UPDATE  [i] = 0;
     41                                                               
     42            for (uint32_t j=0; j<_param->_size_upt_queue[i]; ++j)
     43              reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EMPTY;
     44            reg_UPT_BOTTOM           [i] = 0;
     45            reg_UPT_TOP              [i] = 0;
     46            reg_UPT_UPDATE           [i] = 0;
     47            reg_UPT_NB_NEED_UPDATE   [i] = 0;
     48                                                                                   
     49            reg_IS_ACCURATE          [i] = true;
     50
     51            reg_EVENT_STATE          [i] = EVENT_STATE_OK;
     52          }
    3953      }
    4054    else
    4155      {
    4256        // ===================================================================
     57        // =====[ GARBAGE COLLECTOR ]=========================================
     58        // ===================================================================
     59
     60        // Each cycle, if the most lastest branch have update all prediction struction (state = end), free this slot
     61        //   * Update state -> new status is "empty"
     62        //   * Update pointer (bottom and accurate)
     63        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * GARBAGE COLLECTOR");
     64        for (uint32_t i=0; i<_param->_nb_context; i++)
     65          {
     66            // UPDATE_FETCH_PREDICTION_TABLE
     67            {
     68              uint32_t bottom = reg_UFPT_BOTTOM [i];
     69             
     70              // Test if state is end
     71              if (reg_UPDATE_FETCH_PREDICTION_TABLE [i][bottom]._state == UPDATE_FETCH_PREDICTION_STATE_END)
     72                {
     73                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UFPT [%d][%d]",i,bottom);
     74                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UFPT [%d][%d].state =  UPDATE_FETCH_PREDICTION_STATE_EMPTY",i,bottom);
     75
     76                  // Free slot
     77                  reg_UPDATE_FETCH_PREDICTION_TABLE [i][bottom]._state = UPDATE_FETCH_PREDICTION_STATE_EMPTY;
     78                  // Update pointer
     79                  reg_UFPT_BOTTOM [i] = (bottom+1)%_param->_size_ufpt_queue[i];
     80                }
     81            }
     82
     83            // UPDATE_PREDICTION_TABLE
     84            {
     85              uint32_t bottom = reg_UPT_BOTTOM [i];
     86             
     87              // Test if state is end
     88              if (reg_UPDATE_PREDICTION_TABLE [i][bottom]._state == UPDATE_PREDICTION_STATE_END)
     89                {
     90                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT [%d][%d]",i,bottom);
     91                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT [%d][%d]._state =  UPDATE_PREDICTION_STATE_EMPTY",i,bottom);
     92
     93                  // Free slot
     94                  reg_UPDATE_PREDICTION_TABLE [i][bottom]._state = UPDATE_PREDICTION_STATE_EMPTY;
     95                  // Update pointer
     96                  reg_UPT_BOTTOM [i] = (bottom+1)%_param->_size_upt_queue[i];
     97                }
     98            }
     99          }
     100
     101        // ===================================================================
    43102        // =====[ PREDICT ]===================================================
    44103        // ===================================================================
     104       
     105        // An ifetch_unit compute next cycle and have an branch : predict_val is set
     106        //   * Alloc new entry -> new status is "wait decod"
     107        //   * Save input (to restore in miss or error)
     108        //   * Update pointer
     109
    45110        for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
    46111          if (PORT_READ(in_PREDICT_VAL[i]) and internal_PREDICT_ACK [i])
    47112            {
    48113              Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_PREDICT_CONTEXT_ID [i]):0;
    49               uint32_t   top     = reg_TOP [context];
    50 
    51               log_printf(TRACE,Update_Prediction_Table,FUNCTION,"PREDICT[%d] - Accepted",i);
    52               log_printf(TRACE,Update_Prediction_Table,FUNCTION," * context : %d",context);
    53               log_printf(TRACE,Update_Prediction_Table,FUNCTION," * top     : %d",top);
    54               log_printf(TRACE,Update_Prediction_Table,FUNCTION," * nb_elt  : %d",reg_NB_ELT[context]);
    55 
    56               reg_UPDATE_PREDICTION_TABLE [context][top]._state        = UPDATE_PREDICTION_STATE_WAIT_DECOD;
    57               reg_UPDATE_PREDICTION_TABLE [context][top]._ifetch_prediction = true;
    58               reg_UPDATE_PREDICTION_TABLE [context][top]._condition    = PORT_READ(in_PREDICT_BTB_CONDITION    [i]);
    59               reg_UPDATE_PREDICTION_TABLE [context][top]._address_src  = PORT_READ(in_PREDICT_BTB_ADDRESS_SRC  [i]);
    60               reg_UPDATE_PREDICTION_TABLE [context][top]._address_dest = PORT_READ(in_PREDICT_BTB_ADDRESS_DEST [i]);
    61               reg_UPDATE_PREDICTION_TABLE [context][top]._last_take    = PORT_READ(in_PREDICT_BTB_LAST_TAKE    [i]);
    62             //reg_UPDATE_PREDICTION_TABLE [context][top]._good_take   
    63               reg_UPDATE_PREDICTION_TABLE [context][top]._history      = (_param->_have_port_history)?PORT_READ(in_PREDICT_DIR_HISTORY [i]):0;
    64               reg_UPDATE_PREDICTION_TABLE [context][top]._address_ras  = PORT_READ(in_PREDICT_RAS_ADDRESS      [i]);
    65               reg_UPDATE_PREDICTION_TABLE [context][top]._index_ras    = PORT_READ(in_PREDICT_RAS_INDEX        [i]);
    66 
    67               reg_TOP    [context] = (top+1)%_param->_size_queue [context];
    68               reg_NB_ELT [context] ++;
     114              uint32_t   top     = internal_PREDICT_UPDATE_PREDICTION_ID [i];
     115
     116              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * PREDICT[%d] - Accepted",i);
     117              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * context : %d",context);
     118              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * top     : %d",top);
     119
     120#ifdef DEBUG_TEST
     121              if (reg_UPDATE_FETCH_PREDICTION_TABLE [context][top]._state != UPDATE_FETCH_PREDICTION_STATE_EMPTY)
     122                throw ERRORMORPHEO(FUNCTION,_("Predict : invalid state."));
     123#endif
     124
     125              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UFPT [%d][%d].state <- UPDATE_FETCH_PREDICTION_STATE_WAIT_DECOD (predict)",context,top);
     126              reg_UPDATE_FETCH_PREDICTION_TABLE [context][top]._state        = UPDATE_FETCH_PREDICTION_STATE_WAIT_DECOD;
     127
     128              Tbranch_condition_t condition = PORT_READ(in_PREDICT_BTB_CONDITION [i]);
     129
     130              reg_UPDATE_FETCH_PREDICTION_TABLE [context][top]._condition    = condition;
     131              reg_UPDATE_FETCH_PREDICTION_TABLE [context][top]._address_src  = PORT_READ(in_PREDICT_BTB_ADDRESS_SRC  [i]);
     132              reg_UPDATE_FETCH_PREDICTION_TABLE [context][top]._address_dest = PORT_READ(in_PREDICT_BTB_ADDRESS_DEST [i]);
     133              reg_UPDATE_FETCH_PREDICTION_TABLE [context][top]._last_take    = PORT_READ(in_PREDICT_BTB_LAST_TAKE    [i]);
     134              reg_UPDATE_FETCH_PREDICTION_TABLE [context][top]._is_accurate  = PORT_READ(in_PREDICT_BTB_IS_ACCURATE  [i]);
     135              reg_UPDATE_FETCH_PREDICTION_TABLE [context][top]._history      = (_param->_have_port_history)?PORT_READ(in_PREDICT_DIR_HISTORY [i]):0;
     136              reg_UPDATE_FETCH_PREDICTION_TABLE [context][top]._address_ras  = PORT_READ(in_PREDICT_RAS_ADDRESS      [i]);
     137              reg_UPDATE_FETCH_PREDICTION_TABLE [context][top]._index_ras    = PORT_READ(in_PREDICT_RAS_INDEX        [i]);
     138
     139              reg_UFPT_TOP     [context] = (top+1)%_param->_size_ufpt_queue [context];
     140//            reg_UFPT_UPDATE  [context] = reg_UFPT_TOP [context];
     141              if (need_update(condition))
     142                reg_UFPT_NB_NEED_UPDATE [context] ++;
    69143            }
    70144
     
    72146        // =====[ DECOD ]=====================================================
    73147        // ===================================================================
     148
     149
     150        // An decod is detected by decod stage
     151        //   1) Hit prediction : The instruction bundle have a branch predicted in ifetch stage and it is this branch
     152        //      * Update state, wait_decod -> wait_end
     153        //      * Pop ufpt -> push upt
     154        //      * Update accurate register : if the predict stage have tagged this branch as not accurate, stop decod
     155        //   2) Miss           : The instruction bundle have a branch but it is not predicted
     156        //      * Flush ufpt
     157        //      * decod information is write in upt
     158
    74159        for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
    75160          if (PORT_READ(in_DECOD_VAL[i]) and internal_DECOD_ACK [i])
    76161            {
    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]);
    80 
    81               log_printf(TRACE,Update_Prediction_Table,FUNCTION,"DECOD[%d] - Accepted",i);
    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]);
     162              Tcontext_t          context       = (_param->_have_port_context_id)?PORT_READ(in_DECOD_CONTEXT_ID [i]):0;
     163              Tcontrol_t          miss_ifetch   = PORT_READ(in_DECOD_MISS_IFETCH [i]);
     164              Tcontrol_t          miss_decod    = PORT_READ(in_DECOD_MISS_DECOD  [i]);
     165              uint32_t            upt_ptr_write = internal_DECOD_UPT_PTR_WRITE [i];
     166              Tbranch_condition_t condition  ;
     167              Tcontrol_t          is_accurate;
     168
     169              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * DECOD[%d] - Accepted",i);
     170              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * context       : %d",context);
     171              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * miss_ifetch   : %d",miss_ifetch);
     172              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * miss_decod    : %d",miss_decod);
     173              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * upt_ptr_write : %d",upt_ptr_write);
    86174             
    87               // Test if miss ifetch
    88               //   miss ifetch = decod a branch and the predict unit have not predict this branch ... gloup :P
    89               if (miss_ifetch or miss_decod)
     175              if (miss_ifetch or miss_decod)
    90176                {
    91                   Tdepth_t depth = (_param->_have_port_max_depth)?PORT_READ(in_DECOD_UPDATE_PREDICTION_ID [i]):0;
    92                   Tdepth_t top   = reg_TOP [context];
    93 
    94                   reg_UPDATE_PREDICTION_TABLE [context][top]._state        = UPDATE_PREDICTION_STATE_WAITEND;
    95                   reg_UPDATE_PREDICTION_TABLE [context][top]._ifetch_prediction = false; // static prediction
    96                   reg_UPDATE_PREDICTION_TABLE [context][top]._condition    = PORT_READ(in_DECOD_BTB_CONDITION    [i]);
    97                   reg_UPDATE_PREDICTION_TABLE [context][top]._address_src  = PORT_READ(in_DECOD_BTB_ADDRESS_SRC  [i]);
    98                   reg_UPDATE_PREDICTION_TABLE [context][top]._address_dest = PORT_READ(in_DECOD_BTB_ADDRESS_DEST [i]);
    99                   reg_UPDATE_PREDICTION_TABLE [context][top]._last_take    = PORT_READ(in_DECOD_BTB_LAST_TAKE    [i]);
    100                 //reg_UPDATE_PREDICTION_TABLE [context][top]._good_take
    101                 //reg_UPDATE_PREDICTION_TABLE [context][top]._history
    102                   reg_UPDATE_PREDICTION_TABLE [context][top]._address_ras  = PORT_READ(in_DECOD_RAS_ADDRESS      [i]);
    103                   reg_UPDATE_PREDICTION_TABLE [context][top]._index_ras    = PORT_READ(in_DECOD_RAS_INDEX        [i]);
    104 
    105                   // Invalid all previous "ifetch" prediction
    106                   // (ifetch prediction = prediction make in fetch stage and not again comming in decod stage)
    107                   uint32_t nb_elt_miss        = ((top> depth)?top:(top+_param->_size_queue[context]))-depth;
    108                   uint32_t nb_elt_need_update = 0;
    109                   for (uint32_t j=0; j<nb_elt_miss; j++)
    110                     {
    111                       uint32_t k=(depth+j)%_param->_size_queue[context];
    112                      
    113                       // Ifetch have make a prediction and it's a miss
    114                       // When ifetch predict :
    115                       //   * btb is not change       -> needn't update
    116                       //   * direction is not change -> needn't update
    117                       //   * ras have change         -> need    update
    118 
    119                       Tbranch_condition_t cond = reg_UPDATE_PREDICTION_TABLE [context][k]._condition;
    120                       if ((cond == BRANCH_CONDITION_NONE_WITH_WRITE_STACK) or
    121                           (cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK) or
    122                           (cond == BRANCH_CONDITION_READ_STACK))
    123                         {
    124                           nb_elt_need_update ++;
    125                           reg_UPDATE_PREDICTION_TABLE [context][k]._state = UPDATE_PREDICTION_STATE_KO;
    126                         }
    127                       else
    128                         {
    129                           reg_UPDATE_PREDICTION_TABLE [context][k]._state = UPDATE_PREDICTION_STATE_END;
    130                         }
    131                     }
    132                   reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_EVENT; // rewrite
    133 
    134                   reg_TOP                [context] = (depth+1)%_param->_size_queue [context];
    135                   reg_NB_ELT_NEED_UPDATE [context] += nb_elt_need_update;
    136                   reg_NB_ELT             [context] ++;
     177                  // Have a miss !!!
     178
     179                  // Flush UPFT
     180
     181                  // It's to accelerate miss speculation
     182                  if (reg_UFPT_NB_NEED_UPDATE [context] == 0)
     183                    {
     184                      // No entry need prediction, flush all entry -> Reset
     185                      for (uint32_t j=0; j<_param->_size_ufpt_queue[context]; ++j)
     186                        reg_UPDATE_FETCH_PREDICTION_TABLE [context][j]._state = UPDATE_FETCH_PREDICTION_STATE_EMPTY;
     187                      reg_UFPT_BOTTOM [context] = 0;
     188                      reg_UFPT_TOP    [context] = 0;
     189//                    reg_UFPT_UPDATE [context] = 0;
     190                    }
     191                  else
     192                    {
     193                      reg_UFPT_UPDATE [context] = reg_UFPT_TOP [context];
     194
     195#ifdef DEBUG_TEST
     196                      if (reg_EVENT_STATE [context] == EVENT_STATE_OK)
     197                        throw ERRORMORPHEO(FUNCTION,_("Decod : invalid event state."));
     198#endif
     199                     
     200                      // Change state
     201                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_FLUSH_UFPT (decod - miss)",context);
     202                     
     203                      reg_EVENT_STATE [context] = EVENT_STATE_FLUSH_UFPT;
     204                    }
     205
     206                  // Push upt (from decod interface)
     207                  condition   = PORT_READ(in_DECOD_BTB_CONDITION [i]);
     208                  is_accurate = PORT_READ(in_DECOD_IS_ACCURATE   [i]);
     209
     210                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._condition         = condition;
     211                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._address_src       = PORT_READ(in_DECOD_BTB_ADDRESS_SRC  [i]);
     212                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._address_dest      = PORT_READ(in_DECOD_BTB_ADDRESS_DEST [i]);
     213                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._last_take         = PORT_READ(in_DECOD_BTB_LAST_TAKE    [i]);
     214//                reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._good_take;
     215                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._is_accurate       = is_accurate;
     216//                reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._history           = ; // static prediction
     217                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._address_ras       = PORT_READ(in_DECOD_RAS_ADDRESS [i]);
     218                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._index_ras         = PORT_READ(in_DECOD_RAS_INDEX   [i]);
     219                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._ifetch_prediction = false; // static prediction
    137220                }
    138221              else
    139222                {
    140223                  // Normal case : branch is previous predicated, change state of branch
    141                   Tdepth_t depth = (_param->_have_port_max_depth)?PORT_READ(in_DECOD_UPDATE_PREDICTION_ID [i]):0;
    142 
    143                   reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_WAITEND;
     224                  uint32_t ufpt_ptr_read = (_param->_have_port_depth)?PORT_READ(in_DECOD_UPDATE_PREDICTION_ID [i]):0;
     225
     226                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * ufpt_ptr_read : %d",ufpt_ptr_read);
     227
     228#ifdef DEBUG_TEST
     229                  if (reg_UPDATE_FETCH_PREDICTION_TABLE [context][ufpt_ptr_read]._state != UPDATE_FETCH_PREDICTION_STATE_WAIT_DECOD)
     230                    throw ERRORMORPHEO(FUNCTION,_("Decod : invalid ufpt state."));
     231#endif
     232                  // Change state
     233                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UFPT [%d][%d].state <- UPDATE_FETCH_PREDICTION_STATE_END (decod - hit)",context,ufpt_ptr_read);
     234                  reg_UPDATE_FETCH_PREDICTION_TABLE [context][ufpt_ptr_read]._state = UPDATE_FETCH_PREDICTION_STATE_END;
     235
     236                  // Push upt (from Pop ufpt)
     237                  condition   = reg_UPDATE_FETCH_PREDICTION_TABLE [context][ufpt_ptr_read]._condition;
     238                  is_accurate = reg_UPDATE_FETCH_PREDICTION_TABLE [context][ufpt_ptr_read]._is_accurate;
     239
     240                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._condition         = condition;
     241                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._address_src       = reg_UPDATE_FETCH_PREDICTION_TABLE [context][ufpt_ptr_read]._address_src ;
     242                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._address_dest      = reg_UPDATE_FETCH_PREDICTION_TABLE [context][ufpt_ptr_read]._address_dest;
     243                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._last_take         = reg_UPDATE_FETCH_PREDICTION_TABLE [context][ufpt_ptr_read]._last_take   ;
     244//                reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._good_take;
     245                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._is_accurate       = is_accurate;
     246                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._history           = reg_UPDATE_FETCH_PREDICTION_TABLE [context][ufpt_ptr_read]._history     ;
     247                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._address_ras       = reg_UPDATE_FETCH_PREDICTION_TABLE [context][ufpt_ptr_read]._address_ras ;
     248                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._index_ras         = reg_UPDATE_FETCH_PREDICTION_TABLE [context][ufpt_ptr_read]._index_ras   ;
     249                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._ifetch_prediction = true; // prediction from ifetch
     250
     251                  // Update pointer
     252                  if (need_update(condition))
     253                    {
     254                      reg_UFPT_NB_NEED_UPDATE [context] --;
     255                    }
    144256                }
     257
     258              // All case !!!
     259
     260#ifdef DEBUG_TEST
     261              if (reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._state != UPDATE_PREDICTION_STATE_EMPTY)
     262                throw ERRORMORPHEO(FUNCTION,_("Decod : invalid upt state."));
     263#endif
     264             
     265              // Change state
     266              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_WAIT_END (decod - hit)",context,upt_ptr_write);
     267              reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._state = UPDATE_PREDICTION_STATE_WAIT_END;
     268             
     269              // Write new accurate
     270#ifdef DEBUG_TEST
     271              if (not reg_IS_ACCURATE [context]  and not is_accurate)
     272                throw ERRORMORPHEO(FUNCTION,_("Decod : invalid accurate flag."));
     273#endif
     274              reg_IS_ACCURATE [context] = is_accurate;
     275             
     276              // Update pointer
     277              reg_UPT_TOP     [context] = (upt_ptr_write+1)%_param->_size_upt_queue [context];
     278//            reg_UPT_UPDATE  [context] = reg_UPT_TOP [context];
     279              if (need_update(condition))
     280                {
     281                  reg_UPT_NB_NEED_UPDATE  [context] ++;
     282                }
    145283            }
    146284
     
    148286        // =====[ BRANCH_COMPLETE ]===========================================
    149287        // ===================================================================
     288       
     289        // The branch is complete
     290        //   * Hit  prediction :
     291        //     * update status
     292        //   * Miss prediction :
    150293        for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
    151294          if (PORT_READ(in_BRANCH_COMPLETE_VAL[i]) and internal_BRANCH_COMPLETE_ACK [i])
    152295            {
    153296              Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0;
    154               Tdepth_t   depth   = (_param->_have_port_max_depth     )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
    155 
    156               log_printf(TRACE,Update_Prediction_Table,FUNCTION,"BRANCH_COMPLETE[%d] - Accepted",i);
    157               log_printf(TRACE,Update_Prediction_Table,FUNCTION," * context : %d",context);
    158               log_printf(TRACE,Update_Prediction_Table,FUNCTION," * depth   : %d",depth);
    159               log_printf(TRACE,Update_Prediction_Table,FUNCTION," * nb_elt  : %d",reg_NB_ELT[context]);
     297              Tdepth_t   depth   = (_param->_have_port_depth     )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
     298
     299              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * BRANCH_COMPLETE[%d] - Accepted",i);
     300              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * context : %d",context);
     301              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * depth   : %d",depth);
     302              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * miss    : %d",internal_BRANCH_COMPLETE_MISS_PREDICTION [i]);
    160303             
    161304              if (internal_BRANCH_COMPLETE_MISS_PREDICTION [i])
    162305                {
    163306                  // Miss case
    164                   reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_EVENT;
    165 
    166                   // Another prediction (prediction with depth higer)
    167                   Tdepth_t top                = reg_TOP [context];
    168                   uint32_t nb_elt_miss        = ((top> depth)?top:(top+_param->_size_queue[context]))-depth;
    169                   uint32_t nb_elt_need_update = 1;
    170                   for (uint32_t j=1; j<nb_elt_miss; j++)
    171                     {
    172                       uint32_t k=(depth+j)%_param->_size_queue[context];
     307// //                breakpoint("Branch_complete and miss ...");
     308
     309//                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * state [%d][%d] <- UPDATE_PREDICTION_STATE_EVENT (branch_complete)",context,depth);
     310//                reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_EVENT;
     311
     312//                // Another prediction (prediction with depth higer)
     313//                Tdepth_t top                = reg_TOP [context];
     314//                uint32_t nb_elt_miss        = ((top> depth)?top:(top+_param->_size_queue[context]))-depth;
     315//                uint32_t nb_elt_need_update = 1;
     316//                for (uint32_t j=1; j<nb_elt_miss; j++)
     317//                  {
     318//                    uint32_t k=(depth+j)%_param->_size_queue[context];
    173319                     
    174                       // Ifetch have make a prediction and it's a miss
    175                       // When ifetch predict :
    176                       //   * btb is not change       -> needn't update
    177                       //   * direction is not change -> needn't update
    178                       //   * ras have change         -> need    update
    179 
    180                       Tbranch_condition_t cond = reg_UPDATE_PREDICTION_TABLE [context][k]._condition;
    181                       if ((cond == BRANCH_CONDITION_NONE_WITH_WRITE_STACK) or
    182                           (cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK) or
    183                           (cond == BRANCH_CONDITION_READ_STACK))
    184                         {
    185                           nb_elt_need_update ++;
    186                           reg_UPDATE_PREDICTION_TABLE [context][k]._state = UPDATE_PREDICTION_STATE_KO;
    187                         }
    188                       else
    189                         {
    190                           reg_UPDATE_PREDICTION_TABLE [context][k]._state = UPDATE_PREDICTION_STATE_END;
    191                         }
    192                     }
    193                   reg_NB_ELT_NEED_UPDATE [context] += nb_elt_need_update;
    194 
    195                   // Update pointer :
    196                   reg_TOP                [context]  = depth;
    197                   reg_NB_ELT             [context] -= nb_elt_miss;
     320//                    // Ifetch have make a prediction and it's a miss
     321//                    // When ifetch predict :
     322//                    //   * btb is not change       -> needn't update
     323//                    //   * direction is not change -> needn't update
     324//                    //   * ras have change         -> need    update
     325
     326//                    Tbranch_condition_t cond = reg_UPDATE_PREDICTION_TABLE [context][k]._condition;
     327//                    if ((cond == BRANCH_CONDITION_NONE_WITH_WRITE_STACK) or
     328//                        (cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK) or
     329//                        (cond == BRANCH_CONDITION_READ_STACK))
     330//                      {
     331//                           log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * state [%d][%d] <- UPDATE_PREDICTION_STATE_KO (branch_complete, ifetch miss, update ras)",context,k);
     332
     333//                        nb_elt_need_update ++;
     334//                        reg_UPDATE_PREDICTION_TABLE [context][k]._state = UPDATE_PREDICTION_STATE_KO;
     335//                      }
     336//                    else
     337//                      {
     338//                           log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * state [%d][%d] <- UPDATE_PREDICTION_STATE_END (branch_complete, ifetch miss, don't update ras)",context,k);
     339
     340//                        reg_UPDATE_PREDICTION_TABLE [context][k]._state = UPDATE_PREDICTION_STATE_END;
     341//                      }
     342//                  }
     343//                reg_NB_ELT_NEED_UPDATE [context] += nb_elt_need_update;
     344
     345//                // Update pointer :
     346//                reg_TOP                [context]  = depth;
     347//                reg_NB_ELT             [context] -= nb_elt_miss;
     348//            reg_UPDATE_PREDICTION_TABLE [context][depth]._address_dest = internal_BRANCH_COMPLETE_ADDRESS_DEST [i];
     349
    198350                }
    199351              else
    200352                {
    201                   // Hit case
    202 #ifdef DEBUG_TEST
    203                   if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_WAITEND)
    204                     ERRORMORPHEO(FUNCTION,"Branche complete : invalid state");
    205 #endif
    206                   reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_OK;
     353                  // Hit case
     354
     355#ifdef DEBUG_TEST
     356                  if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END)
     357                    throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state."));
     358#endif
     359                   
     360                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_OK (branch_complete, ifetch hit)",context,depth);
     361                  reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_OK;
    207362                }
    208363
    209               // In all case : update good_take and address_destination
    210               reg_UPDATE_PREDICTION_TABLE [context][depth]._good_take    = internal_BRANCH_COMPLETE_TAKE         [i];
    211               reg_UPDATE_PREDICTION_TABLE [context][depth]._address_dest = internal_BRANCH_COMPLETE_ADDRESS_DEST [i];
    212             }
     364              // In all case : update good_take
     365              reg_UPDATE_PREDICTION_TABLE [context][depth]._good_take = internal_BRANCH_COMPLETE_TAKE [i];
     366            }
    213367
    214368        // ===================================================================
     
    216370        // ===================================================================
    217371        for (uint32_t i=0; i<_param->_nb_inst_update; i++)
    218           if (internal_UPDATE_VAL[i] and PORT_READ(in_UPDATE_ACK [i]))
     372          if ((internal_UPDATE_VAL[i] and PORT_READ(in_UPDATE_ACK [i])) or
     373              (internal_UPDATE_VAL_WITHOUT_ACK [i]))
    219374            {
    220375              Tcontext_t context = internal_UPDATE_CONTEXT_ID [i];
    221376              Tdepth_t   depth   = internal_UPDATE_DEPTH      [i];
    222 
    223               log_printf(TRACE,Update_Prediction_Table,FUNCTION,"UPDATE[%d] - Accepted",i);
    224               log_printf(TRACE,Update_Prediction_Table,FUNCTION," * context : %d",context);
    225               log_printf(TRACE,Update_Prediction_Table,FUNCTION," * depth   : %d",depth);
    226 
    227               if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state == UPDATE_PREDICTION_STATE_KO)
    228                 reg_NB_ELT_NEED_UPDATE [context] --;
    229 
    230               reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_END;
     377              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * UPDATE[%d] - Accepted",i);
     378              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * context : %d",context);
     379              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * depth   : %d",depth);
     380
     381              if (internal_UPDATE_FROM_UFPT [i])
     382                {
     383                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * Update Fetch Prediction Table");
     384                 
     385                  // Change state
     386#ifdef DEBUG_TEST
     387                  if (reg_UPDATE_FETCH_PREDICTION_TABLE [context][depth]._state != UPDATE_FETCH_PREDICTION_STATE_EVENT)
     388                    throw ERRORMORPHEO(FUNCTION,_("Update : invalid ufpt state."));
     389#endif
     390
     391                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UFPT [%d][%d].state <- UPDATE_FETCH_PREDICTION_STATE_END (update)",context,depth);
     392
     393                  reg_UPDATE_FETCH_PREDICTION_TABLE [context][depth]._state = UPDATE_FETCH_PREDICTION_STATE_END;
     394
     395                  // Update pointer
     396                  reg_UFPT_UPDATE [context] = (depth==0)?(_param->_size_ufpt_queue[context]-1):(depth-1);
     397
     398                  // Free a register that need update ?
     399                  if (need_update(reg_UPDATE_FETCH_PREDICTION_TABLE [context][depth]._condition))
     400                    reg_UFPT_NB_NEED_UPDATE [context] --;
     401                }
     402              else
     403                {
     404                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * Update Prediction Table");
     405                 
     406                  // Change state
     407#ifdef DEBUG_TEST
     408                  if ((reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_OK   ) and
     409                      (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_KO   ) and
     410                      (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_EVENT))
     411                    throw ERRORMORPHEO(FUNCTION,_("Update : invalid upt state."));
     412#endif
     413
     414                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_END (update)",context,depth);
     415
     416                  reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_END;
     417
     418                  // Update pointer
     419                  if (internal_UPDATE_RAS [i])
     420                    reg_UPT_UPDATE [context] = (depth==0)?(_param->_size_upt_queue[context]-1):(depth-1);
     421                  else
     422                    reg_UPT_UPDATE [context] = (depth+1)%_param->_size_upt_queue[context];
     423
     424                  // Free a register that need update ?
     425                  if (need_update(reg_UPDATE_PREDICTION_TABLE [context][depth]._condition))
     426                    reg_UPT_NB_NEED_UPDATE [context] --;
     427                  // Free the branch with no accurate ?
     428                  if (reg_UPDATE_PREDICTION_TABLE [context][depth]._is_accurate == false)
     429                    reg_IS_ACCURATE [i] = true;
     430                }
    231431            }
    232432       
     
    234434        reg_UPDATE_PRIORITY = (reg_UPDATE_PRIORITY+1)%_param->_nb_context;
    235435
    236         // ===================================================================
    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         // ===================================================================
    248         // =====[ GARBAGE COLLECTOR ]=========================================
    249         // ===================================================================
    250 
    251         for (uint32_t i=0; i<_param->_nb_context; i++)
    252           {
    253             uint32_t bottom = reg_BOTTOM [i];
    254            
    255             // Test if the tail of queue is finish (ok or ko and update)
    256             if (reg_UPDATE_PREDICTION_TABLE [i][bottom]._state == UPDATE_PREDICTION_STATE_END)
    257               {
    258                 log_printf(TRACE,Update_Prediction_Table,FUNCTION,"GARBAGE_COLLECTOR");
    259                 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * context : %d",i);
    260                 log_printf(TRACE,Update_Prediction_Table,FUNCTION," * bottom  : %d",bottom);
    261 
    262                 reg_UPDATE_PREDICTION_TABLE [i][bottom]._state = UPDATE_PREDICTION_STATE_EMPTY;
    263                 reg_BOTTOM [i] = (bottom+1)%_param->_size_queue [i];
    264                 if (reg_NB_ELT [i]>0)
    265                   reg_NB_ELT [i] --;
    266               }
    267           }
    268       }
     436//      // ===================================================================
     437//      // =====[ BRANCH_EVENT ]==============================================
     438//      // ===================================================================
     439//      for (uint32_t i=0; i<_param->_nb_context; i++)
     440//        if (internal_BRANCH_EVENT_VAL [i] and PORT_READ(in_BRANCH_EVENT_ACK [i]))
     441//             {
     442//               Tdepth_t depth = internal_BRANCH_EVENT_DEPTH [i];
     443
     444//               if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state == UPDATE_PREDICTION_STATE_EVENT)
     445//                 {
     446//                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * state [%d][%d] <- UPDATE_PREDICTION_STATE_KO (branch_event)",i,depth);
     447                 
     448//                   reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_KO;
     449//                 }
     450//               else
     451//                 {
     452// #ifdef DEBUG_TEST
     453//                   if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state == UPDATE_PREDICTION_STATE_WAITEND_AND_EVENT)
     454//                     throw ERRORMORPHEO(FUNCTION,_("Branche event : invalid state"));
     455// #endif
     456             
     457//                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * state [%d][%d] <- UPDATE_PREDICTION_STATE_WAITEND (branch_event)",i,depth);
     458                 
     459//                   reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_WAITEND;
     460//                 }
     461//             }
    269462
    270463#if (DEBUG >= DEBUG_TRACE)
    271     log_printf(TRACE,Update_Prediction_Table,FUNCTION,"Dump Update_Prediction_Table");
    272     log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * reg_UPDATE_PRIORITY      : %d",reg_UPDATE_PRIORITY);
     464    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * Dump Update_Prediction_Table");
     465    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_UPDATE_PRIORITY       : %d",reg_UPDATE_PRIORITY);
    273466    for (uint32_t i=0; i<_param->_nb_context; i++)
    274467      {
    275         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * Update_Prediction_Table   [%d]",i);
    276         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_TOP                : %d",reg_TOP                [i]);
    277         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_BOTTOM             : %d",reg_BOTTOM             [i]);
    278         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_NB_ELT             : %d",reg_NB_ELT             [i]);
    279         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_NB_ELT_NEED_UPDATE : %d",reg_NB_ELT_NEED_UPDATE [i]);
    280         for (uint32_t j=0; j<_param->_size_queue[i]; j++)
    281           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);
     468        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_IS_ACCURATE           : %d",reg_IS_ACCURATE        [i]);
     469        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_STATE           : %s"  ,toString(reg_EVENT_STATE [i]).c_str());
     470        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_RAS_CORRUPTED   : %d"  ,reg_EVENT_RAS_CORRUPTED   [i]);
     471        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_ADDRESS_SRC     : %.8x",reg_EVENT_ADDRESS_SRC     [i]);
     472        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_ADDRESS_SRC_VAL : %d"  ,reg_EVENT_ADDRESS_SRC_VAL [i]);
     473        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_ADDRESS_DEST    : %.8x",reg_EVENT_ADDRESS_DEST    [i]);
     474
     475        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * Update_Fetch_Prediction_Table   [%d]",i);
     476        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UFPT_BOTTOM         : %d",reg_UFPT_BOTTOM         [i]);
     477        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UFPT_TOP            : %d",reg_UFPT_TOP            [i]);
     478        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UFPT_NB_NEED_UPDATE : %d",reg_UFPT_NB_NEED_UPDATE [i]);
     479        for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; j++)
     480          log_printf(TRACE,Update_Prediction_Table,FUNCTION,"        [%d] %.4d, %.8x %.8x, %.1d   %.1d, %.8d %.8x %.4d - %s",
     481                     j,
     482                     reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._condition,
     483                     reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._address_src,
     484                     reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._address_dest,
     485                     reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._last_take,
     486                     reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._is_accurate,
     487                     reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._history,
     488                     reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._address_ras,
     489                     reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._index_ras,
     490                     toString(reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state).c_str()
     491                     );
     492
     493        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * Update_Prediction_Table   [%d]",i);
     494        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_BOTTOM          : %d",reg_UPT_BOTTOM         [i]);
     495        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_TOP             : %d",reg_UPT_TOP            [i]);
     496        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_UPDATE          : %d",reg_UPT_UPDATE         [i]);
     497        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_NB_NEED_UPDATE  : %d",reg_UPT_NB_NEED_UPDATE [i]);
     498        for (uint32_t j=0; j<_param->_size_upt_queue[i]; j++)
     499          log_printf(TRACE,Update_Prediction_Table,FUNCTION,"        [%d] %.4d, %.8x %.8x, %.1d %.1d %.1d, %.8d %.8x %.4d - %s",
     500                     j,
     501                     reg_UPDATE_PREDICTION_TABLE [i][j]._condition,
     502                     reg_UPDATE_PREDICTION_TABLE [i][j]._address_src,
     503                     reg_UPDATE_PREDICTION_TABLE [i][j]._address_dest,
     504                     reg_UPDATE_PREDICTION_TABLE [i][j]._last_take,
     505                     reg_UPDATE_PREDICTION_TABLE [i][j]._good_take,
     506                     reg_UPDATE_PREDICTION_TABLE [i][j]._is_accurate,
     507                     reg_UPDATE_PREDICTION_TABLE [i][j]._history,
     508                     reg_UPDATE_PREDICTION_TABLE [i][j]._address_ras,
     509                     reg_UPDATE_PREDICTION_TABLE [i][j]._index_ras,
     510                     toString(reg_UPDATE_PREDICTION_TABLE [i][j]._state).c_str()
     511                     );
    282512      }
    283513#endif
     514      }
    284515
    285516
     
    287518    end_cycle ();
    288519#endif
    289 
    290     log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
     520   
     521    log_end(Update_Prediction_Table,FUNCTION);
    291522  };
    292523
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Parameters.h

    r82 r88  
    5252  public : uint32_t *   _upt_size_queue                ;//[nb_context]
    5353
    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]
     54//public : uint32_t     _size_context_id               ;
     55//public : uint32_t     _max_size_depth                ;
     56//public : uint32_t *   _size_inst_ifetch_ptr          ;//[nb_context]
     57  public : uint32_t *   _array_size_depth              ;//[nb_context]
    5858  public : uint32_t     _size_history                  ;
    5959  public : uint32_t *   _size_ras_index                ;//[nb_context]
    6060                                                       
    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]
     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]
    6565  public : bool         _have_port_history             ;
    6666  public : bool     *   _have_port_ras_index           ;//[nb_context]
     
    9595                        uint32_t     dir_pht_size_address_share [3],
    9696                        uint32_t *   ras_size_queue                ,//[nb_context]
    97                         uint32_t *   upt_size_queue                 //[nb_context]
     97                        uint32_t *   upt_size_queue                ,//[nb_context]
     98                        bool         is_toplevel=false
    9899                        );
    99100//   public : Parameters  (Parameters & param) ;
    100101  public : ~Parameters () ;
     102
     103  public :        void            copy       (void);
    101104
    102105  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Prediction_unit.h

    r82 r88  
    114114
    115115    // ~~~~~[ 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]
     116  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_CURRENT                       ; //[nb_context]
     117  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_MIN                           ; //[nb_context]
     118  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_MAX                           ; //[nb_context]
    118119
    119120    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters.cpp

    r82 r88  
    4141                          uint32_t     dir_pht_size_address_share [3],
    4242                          uint32_t *   ras_size_queue                ,//[nb_context]
    43                           uint32_t *   upt_size_queue                 //[nb_context]
     43                          uint32_t *   upt_size_queue                ,//[nb_context]
     44                          bool         is_toplevel
    4445                          )
    4546  {
     
    7273    _ras_size_queue             = ras_size_queue            ;
    7374    _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];
     75   
     76    _array_size_depth           = new uint32_t [_nb_context];
    7977    _size_ras_index             = new uint32_t [_nb_context];
     78
    8079    for (uint32_t i=0; i<_nb_context; i++)
    8180      {
    82         _size_depth    [i] = log2(_upt_size_queue [i]);
    83         _size_ras_index [i] = log2(_ras_size_queue [i]);
     81        _array_size_depth [i] = log2(_upt_size_queue [i]);
     82        _size_ras_index   [i] = log2(_ras_size_queue [i]);
    8483      }
    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]
    9084
    9185    _param_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue   ::Parameters
     
    9488       _size_address          ,
    9589       _nb_instruction        ,
    96        _size_depth            ,
     90       _array_size_depth      ,
    9791       _nb_inst_decod         ,
    9892       _nb_inst_branch_predict,
     
    10094       _nb_inst_branch_update );
    10195
    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    
    10796    _param_btb  = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer   ::Parameters
    10897      (_nb_context            ,
     
    116105       _nb_inst_branch_update ,
    117106       _btb_victim_scheme     );
    118 
     107   
    119108    _param_dir  = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction              ::Parameters
    120109      (_dir_predictor_scheme      ,
     
    130119       _dir_pht_size_address_share);
    131120
    132     _size_history = _param_dir->_size_history;
     121    _size_history      = _param_dir->_size_history;
     122    _have_port_history = (_size_history > 0);
    133123
    134124    _param_ras  = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::return_address_stack   ::Parameters
     
    150140       _size_history           ,
    151141       _size_ras_index         );
     142
     143
     144    if (is_toplevel)
     145      {
     146        _size_context_id           = log2(_nb_context);
     147        _size_depth                = max<uint32_t>(_array_size_depth,_nb_context);
     148        _size_inst_ifetch_ptr      = log2(max<uint32_t>(_nb_instruction,_nb_context));
     149        _size_instruction_address  = size_address;
     150//      _size_nb_inst_decod        = ;
     151//      _size_nb_inst_commit       = ;
     152//      _size_ifetch_queue_ptr     = ;
     153   
     154        _have_port_context_id      = (_size_context_id > 0);
     155        _have_port_depth           = (_size_depth  > 0);
     156        _have_port_inst_ifetch_ptr = _size_inst_ifetch_ptr > 0;
     157//      _have_port_ifetch_queue_ptr= _size_ifetch_queue_ptr > 0;
     158
     159        copy ();
     160      }
    152161
    153162    test();
     
    176185    delete _param_glue;
    177186
    178     delete [] _size_depth    ;
     187    delete [] _array_size_depth;
    179188    delete [] _size_ras_index;
     189
     190    log_printf(FUNC,Prediction_unit,FUNCTION,"End");
     191  };
     192
     193#undef  FUNCTION
     194#define FUNCTION "Prediction_unit::copy"
     195  void Parameters::copy (void)
     196  {
     197    log_printf(FUNC,Prediction_unit,FUNCTION,"Begin");
     198 
     199    COPY(_param_btb );
     200    COPY(_param_dir );
     201    COPY(_param_ras );
     202    COPY(_param_upt );
     203    COPY(_param_glue);
    180204
    181205    log_printf(FUNC,Prediction_unit,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit.cpp

    r81 r88  
    3737    log_printf(FUNC,Prediction_unit,FUNCTION,"Begin");
    3838
     39#if DEBUG_Prediction_unit == true
     40    log_printf(INFO,Prediction_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     41
     42    std::cout << *param << std::endl;
     43#endif   
     44
    3945    log_printf(INFO,Prediction_unit,FUNCTION,"Allocation");
    4046
     
    4652
    4753#ifdef STATISTICS
    48     if (_usage & USE_STATISTICS)
     54    if (usage_is_set(_usage,USE_STATISTICS))
    4955      {
    5056        log_printf(INFO,Prediction_unit,FUNCTION,"Allocation of statistics");
     
    5561
    5662#ifdef VHDL
    57     if (_usage & USE_VHDL)
     63    if (usage_is_set(_usage,USE_VHDL))
    5864      {
    5965        // generate the vhdl
     
    6571
    6672#ifdef SYSTEMC
    67     if (_usage & USE_SYSTEMC)
     73    if (usage_is_set(_usage,USE_SYSTEMC))
    6874      {
    6975        log_printf(INFO,Prediction_unit,FUNCTION,"Method - transition");
     
    8995
    9096#ifdef STATISTICS
    91     if (_usage & USE_STATISTICS)
     97    if (usage_is_set(_usage,USE_STATISTICS))
    9298      {
    9399        statistics_deallocation();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_allocation.cpp

    r82 r88  
    6565        ALLOC1_SIGNAL_OUT(out_PREDICT_PC_NEXT                    ,"pc_next"                    ,Taddress_t         ,_param->_size_address);
    6666        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]);
     67        ALLOC1_SIGNAL_OUT(out_PREDICT_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t ,_param->_size_inst_ifetch_ptr);
    6868        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]);
     69        ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth);
    7070      }
    7171      {
    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]);
     72        ALLOC2_INTERFACE("predict",IN,SOUTH,"Interface with ifetch unit",_param->_nb_context,_param->_nb_instruction[it1]);
     73        _ALLOC2_SIGNAL_OUT(out_PREDICT_INSTRUCTION_ENABLE         ,"instruction_enable"         ,Tcontrol_t         ,1,_param->_nb_context,_param->_nb_instruction[it1]);
    7474      }
    7575    }
     
    7878    {
    7979      {
    80         ALLOC2_INTERFACE("decod",IN,SOUTH,"Interface with decod unit",_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_interface_it1]);
     80        ALLOC2_INTERFACE("decod",IN,SOUTH,"Interface with decod unit",_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
    8181       
    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]);
     82        _ALLOC2_VALACK_IN ( in_DECOD_VAL                        ,VAL,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     83        _ALLOC2_VALACK_OUT(out_DECOD_ACK                        ,ACK,_param->_nb_decod_unit,_param->_nb_inst_decod[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[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[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[it1]);
     87        _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth           ,_param->_nb_decod_unit,_param->_nb_inst_decod[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[it1]);
     89        _ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_DIRECTION           ,"branch_direction"           ,Tcontrol_t         ,1                             ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     90        _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_SRC                ,"address_src"                ,Taddress_t         ,_param->_size_address         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
     91        _ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_DEST               ,"address_dest"               ,Taddress_t         ,_param->_size_address         ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1]);
    9292      }
    9393    }
     
    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->_max_size_depth);
     102      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH          ,"depth"          ,Tdepth_t  ,_param->_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);
     
    116116      ALLOC1_VALACK_IN ( in_BRANCH_EVENT_ACK            ,ACK);
    117117//    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);
     118//    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_DEPTH          ,"depth"          ,Tdepth_t  ,_param->_size_depth);
    119119//    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
    120120      ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_SRC    ,"address_src"    ,Taddress_t,_param->_size_address);
     
    126126      ALLOC1_INTERFACE("depth",OUT,SOUTH,"Interface with depth",_param->_nb_context);
    127127
    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]);
     128      ALLOC1_SIGNAL_OUT(out_DEPTH_CURRENT      ,"current"      ,Tdepth_t,_param->_size_depth);
     129      ALLOC1_SIGNAL_OUT(out_DEPTH_MIN          ,"min"          ,Tdepth_t,_param->_size_depth);
     130      ALLOC1_SIGNAL_OUT(out_DEPTH_MAX          ,"max"          ,Tdepth_t,_param->_size_depth+1);
    130131    }
    131132
     
    551552          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_CONTEXT_ID"      ,
    552553                                   dest,"out_PREDICT_UPT_"+toString(i)+"_CONTEXT_ID"      );
     554          if (_param->_have_port_depth)
     555          COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+       "_UPDATE_PREDICTION_ID",
     556                                   dest, "in_PREDICT_UPT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID");
    553557          COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_BTB_ADDRESS_SRC" ,
    554558                                   dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_ADDRESS_SRC" );
     
    593597          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_MISS_DECOD"          ,
    594598                                   dest,"out_DECOD_UPT_"+toString(i)+"_MISS_DECOD"          );
    595           if (_param->_have_port_max_depth)
     599          if (_param->_have_port_depth)
    596600          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_UPDATE_PREDICTION_ID",
    597601                                   dest,"out_DECOD_UPT_"+toString(i)+"_UPDATE_PREDICTION_ID");
     602          COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_IS_ACCURATE"         ,
     603                                   dest,"out_DECOD_UPT_"+toString(i)+"_IS_ACCURATE"         );
    598604         
    599605          //out_DECOD_UPT_RAS_INDEX - component_map return_address_stack
     
    650656          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID"     ,
    651657                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID"     );
    652           if (_param->_have_port_max_depth)
     658          if (_param->_have_port_depth)
    653659          PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"          ,
    654660                              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"          );
     
    684690      for (uint32_t i=0; i<_param->_nb_context; i++)
    685691        {
    686           dest = _name+"_prediction_unit_glue";
    687          
     692          dest = _name;
    688693#ifdef POSITION
    689694          _component->interface_map (src ,"depth_"+toString(i),
     
    691696#endif
    692697         
    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 
     698          if (_param->_have_port_depth)
     699            {
     700          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_CURRENT",
     701                              dest,"out_DEPTH_"+toString(i)+"_CURRENT");
     702          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MIN",
     703                              dest,"out_DEPTH_"+toString(i)+"_MIN");
     704            }
     705          PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MAX",
     706                              dest,"out_DEPTH_"+toString(i)+"_MAX");
     707        }
     708
     709//       for (uint32_t i=0; i<_param->_nb_context; i++)
     710//      {
     711//        dest = _name+"_prediction_unit_glue";
     712         
     713// #ifdef POSITION
     714//        _component->interface_map (src ,"depth_"+toString(i),
     715//                                   dest,"depth_"+toString(i));
     716// #endif
     717         
     718//        COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+    "_NB_BRANCH",
     719//                                 dest, "in_DEPTH_"+toString(i)+"_UPT_NB_BRANCH");
     720
     721//        if (_param->_have_port_depth)
     722//        COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+    "_TAIL"     ,
     723//                                 dest, "in_DEPTH_"+toString(i)+"_UPT_TAIL"     );
     724//      }
    701725    }
    702726
     
    741765          PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_PC_NEXT_IS_DS_TAKE"         ,
    742766                              dest,"out_PREDICT_"+toString(i)+"_PC_NEXT_IS_DS_TAKE"         );
    743           if (_param->_have_port_inst_ifetch_ptr [i])
     767          if (_param->_have_port_inst_ifetch_ptr)
    744768          PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_INST_IFETCH_PTR"            ,
    745769                              dest,"out_PREDICT_"+toString(i)+"_INST_IFETCH_PTR"            );
    746770          PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_BRANCH_STATE"               ,
    747771                              dest,"out_PREDICT_"+toString(i)+"_BRANCH_STATE"               );
    748           if (_param->_have_port_depth [i])
     772          if (_param->_have_port_depth)
    749773          PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID",
    750774                              dest,"out_PREDICT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID");
     
    783807            PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_STATE"               ,
    784808                                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_STATE"               );
    785             if (_param->_have_port_max_depth)
     809            if (_param->_have_port_depth)
    786810            PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_UPDATE_PREDICTION_ID",
    787811                                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_UPDATE_PREDICTION_ID");
     
    796820          }
    797821
    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         }
     822//       for (uint32_t i=0; i<_param->_nb_context; i++)
     823//      {
     824//        dest = _name;
     825// #ifdef POSITION
     826//        _component->interface_map (src ,"depth_"+toString(i),
     827//                                   dest,"depth_"+toString(i));
     828// #endif
     829         
     830//        PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_NB_BRANCH",dest,"out_DEPTH_"+toString(i)+"_NB_BRANCH");
     831//        if (_param->_have_port_depth)
     832//        PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_TAIL"     ,dest,"out_DEPTH_"+toString(i)+"_TAIL"     );
     833//      }
    810834    }
    811835
    812836    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    813     _component->test_map(false);
    814 
    815 #ifdef POSITION
    816     _component->generate_file();
     837#if DEBUG_Prediction_unit == true
     838    _component->test_map();
     839#endif
     840
     841#ifdef POSITION
     842    if (usage_is_set(_usage,USE_POSITION))
     843      _component->generate_file();
    817844#endif
    818845
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp

    r82 r88  
    2323    log_printf(FUNC,Prediction_unit,FUNCTION,"Begin");
    2424
    25     if (_usage & USE_SYSTEMC)
     25    if (usage_is_set(_usage,USE_SYSTEMC))
    2626      {
    2727        delete    in_CLOCK ;
     
    3030        DELETE1_SIGNAL( in_PREDICT_VAL                        ,_param->_nb_context,1);
    3131        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);
     32        DELETE1_SIGNAL( in_PREDICT_PC_PREVIOUS                ,_param->_nb_context,_param->_size_instruction_address);
     33        DELETE1_SIGNAL( in_PREDICT_PC_CURRENT                 ,_param->_nb_context,_param->_size_instruction_address);
    3434        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);
     35        DELETE1_SIGNAL(out_PREDICT_PC_NEXT                    ,_param->_nb_context,_param->_size_instruction_address);
    3636        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]);
     37        DELETE1_SIGNAL(out_PREDICT_INST_IFETCH_PTR            ,_param->_nb_context,_param->_size_inst_ifetch_ptr);
    3838        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]);
     39        DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context,_param->_size_depth );
    4040
    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         );
     41        DELETE2_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE       ,_param->_nb_context,_param->_nb_instruction[it1],1);
     42        DELETE2_SIGNAL( in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1);
     43        DELETE2_SIGNAL(out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1);
     44        DELETE2_SIGNAL( in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_context_id      );
     45        DELETE2_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1                             );
     46        DELETE2_SIGNAL( in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_branch_state    );
     47        DELETE2_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_depth           );
     48        DELETE2_SIGNAL( in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_branch_condition);
     49        DELETE2_SIGNAL( in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1                             );
     50        DELETE2_SIGNAL( in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_instruction_address         );
     51        DELETE2_SIGNAL( in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_instruction_address         );
    5252     
    5353        DELETE1_SIGNAL( in_BRANCH_COMPLETE_VAL            ,_param->_nb_inst_branch_complete,1);
    5454        DELETE1_SIGNAL(out_BRANCH_COMPLETE_ACK            ,_param->_nb_inst_branch_complete,1);
    5555        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);
     56        DELETE1_SIGNAL( in_BRANCH_COMPLETE_DEPTH          ,_param->_nb_inst_branch_complete,_param->_size_depth);
     57        DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS        ,_param->_nb_inst_branch_complete,_param->_size_instruction_address);
    5858        DELETE1_SIGNAL( in_BRANCH_COMPLETE_FLAG           ,_param->_nb_inst_branch_complete,1);
    5959        DELETE1_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete,1);
    6060        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);
     61        DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC    ,_param->_nb_inst_branch_complete,_param->_size_instruction_address);
     62        DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST   ,_param->_nb_inst_branch_complete,_param->_size_instruction_address);
    6363
    6464        DELETE1_SIGNAL(out_BRANCH_EVENT_VAL            ,_param->_nb_context,1);
    6565        DELETE1_SIGNAL( in_BRANCH_EVENT_ACK            ,_param->_nb_context,1);
    6666//      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);
     67//      DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH          ,_param->_nb_context,_param->_size_depth);
    6868//      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);
     69        DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC    ,_param->_nb_context,_param->_size_instruction_address);
     70        DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST   ,_param->_nb_context,_param->_size_instruction_address);
    7171
    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]);
     72        DELETE1_SIGNAL(out_DEPTH_CURRENT      ,_param->_nb_context,_param->_size_depth);
     73        DELETE1_SIGNAL(out_DEPTH_MIN          ,_param->_nb_context,_param->_size_depth);
     74        DELETE1_SIGNAL(out_DEPTH_MAX          ,_param->_nb_context,_param->_size_depth+1);
    7475      }
    7576    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_end_cycle.cpp

    r81 r88  
    2424
    2525#ifdef STATISTICS
    26     _stat->end_cycle();
     26    if (usage_is_set(_usage,USE_STATISTICS))
     27      _stat->end_cycle();
    2728#endif   
    2829
     
    3031    // Evaluation before read the ouput signal
    3132//  sc_start(0);
    32     _interfaces->testbench();
     33    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     34      _interfaces->testbench();
    3335#endif
    3436
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_statistics_allocation.cpp

    r81 r88  
    2626                      "Prediction_unit",
    2727                      param_statistics);
    28    
     28
     29    _stat->add_stat(_component_btb ->_stat);
     30    _stat->add_stat(_component_dir ->_stat);
     31    _stat->add_stat(_component_ras ->_stat);
     32    _stat->add_stat(_component_upt ->_stat);
     33    _stat->add_stat(_component_glue->_stat);
     34       
    2935    log_printf(FUNC,Prediction_unit,FUNCTION,"End");
    3036  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Load_Store_pointer_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/SelfTest/src/main.cpp

    r81 r88  
    5151    }
    5252
    53   uint32_t    _nb_load_store_queue              = atoi(argv[x++]);
     53  uint32_t    _nb_load_store_queue              = fromString<uint32_t>(argv[x++]);
    5454 
    5555  if (argc != static_cast<int>(2+NB_PARAMS+_nb_front_end+2*_nb_load_store_queue+nb_thread))
     
    8686         _link_load_store_unit_with_thread,
    8787         _nb_inst_insert                  ,
    88          _nb_inst_retire                  );
     88         _nb_inst_retire                  ,
     89         true //is_toplevel
     90         );
    8991     
    9092      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/SelfTest/src/test.cpp

    r82 r88  
    5050#endif
    5151
     52  Tusage_t _usage = USE_ALL;
     53
     54//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     55//   _usage = usage_unset(_usage,USE_VHDL                 );
     56//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     57//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     58//   _usage = usage_unset(_usage,USE_POSITION             );
     59   _usage = usage_unset(_usage,USE_STATISTICS           );
     60//   _usage = usage_unset(_usage,USE_INFORMATION          );
     61
    5262  Load_Store_pointer_unit * _Load_Store_pointer_unit = new Load_Store_pointer_unit
    5363    (name.c_str(),
     
    5666#endif
    5767     _param,
    58      USE_ALL);
     68     _usage);
    5969 
    6070#ifdef SYSTEMC
     
    7989  ALLOC1_SC_SIGNAL( in_RETIRE_FRONT_END_ID         ," in_RETIRE_FRONT_END_ID         ",Tcontext_t  ,_param->_nb_inst_retire);
    8090  ALLOC1_SC_SIGNAL( in_RETIRE_CONTEXT_ID           ," in_RETIRE_CONTEXT_ID           ",Tcontext_t  ,_param->_nb_inst_retire);
    81   ALLOC1_SC_SIGNAL( in_RETIRE_TYPE                 ," in_RETIRE_TYPE                 ",Ttype_t     ,_param->_nb_inst_retire);
    82   ALLOC1_SC_SIGNAL( in_RETIRE_OPERATION            ," in_RETIRE_OPERATION            ",Toperation_t,_param->_nb_inst_retire);
     91//   ALLOC1_SC_SIGNAL( in_RETIRE_TYPE                 ," in_RETIRE_TYPE                 ",Ttype_t     ,_param->_nb_inst_retire);
     92//   ALLOC1_SC_SIGNAL( in_RETIRE_OPERATION            ," in_RETIRE_OPERATION            ",Toperation_t,_param->_nb_inst_retire);
     93  ALLOC1_SC_SIGNAL( in_RETIRE_USE_STORE_QUEUE      ," in_RETIRE_USE_STORE_QUEUE      ",Tcontrol_t  ,_param->_nb_inst_retire);
     94  ALLOC1_SC_SIGNAL( in_RETIRE_USE_LOAD_QUEUE       ," in_RETIRE_USE_LOAD_QUEUE       ",Tcontrol_t  ,_param->_nb_inst_retire);
    8395  ALLOC1_SC_SIGNAL( in_RETIRE_STORE_QUEUE_PTR_WRITE," in_RETIRE_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t  ,_param->_nb_inst_retire);
    8496  ALLOC1_SC_SIGNAL( in_RETIRE_LOAD_QUEUE_PTR_WRITE ," in_RETIRE_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t  ,_param->_nb_inst_retire);
     
    111123  if (_param->_have_port_context_id)
    112124  INSTANCE1_SC_SIGNAL(_Load_Store_pointer_unit, in_RETIRE_CONTEXT_ID           ,_param->_nb_inst_retire);
    113   INSTANCE1_SC_SIGNAL(_Load_Store_pointer_unit, in_RETIRE_TYPE                 ,_param->_nb_inst_retire);
    114   INSTANCE1_SC_SIGNAL(_Load_Store_pointer_unit, in_RETIRE_OPERATION            ,_param->_nb_inst_retire);
     125//   INSTANCE1_SC_SIGNAL(_Load_Store_pointer_unit, in_RETIRE_TYPE                 ,_param->_nb_inst_retire);
     126//   INSTANCE1_SC_SIGNAL(_Load_Store_pointer_unit, in_RETIRE_OPERATION            ,_param->_nb_inst_retire);
     127  INSTANCE1_SC_SIGNAL(_Load_Store_pointer_unit, in_RETIRE_USE_STORE_QUEUE      ,_param->_nb_inst_retire);
     128  INSTANCE1_SC_SIGNAL(_Load_Store_pointer_unit, in_RETIRE_USE_LOAD_QUEUE       ,_param->_nb_inst_retire);
    115129  INSTANCE1_SC_SIGNAL(_Load_Store_pointer_unit, in_RETIRE_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_retire);
    116130  if (_param->_have_port_load_queue_ptr)
     
    197211              in_RETIRE_FRONT_END_ID          [i]->write(it->_front_end_id         );
    198212              in_RETIRE_CONTEXT_ID            [i]->write(it->_context_id           );
    199               in_RETIRE_TYPE                  [i]->write(it->_type                 );
    200               in_RETIRE_OPERATION             [i]->write(it->_operation            );
     213//            in_RETIRE_TYPE                  [i]->write(it->_type                 );
     214//            in_RETIRE_OPERATION             [i]->write(it->_operation            );
     215              in_RETIRE_USE_STORE_QUEUE       [i]->write((it->_type == TYPE_MEMORY) and     is_operation_memory_store(it->_operation));
     216              in_RETIRE_USE_LOAD_QUEUE        [i]->write((it->_type == TYPE_MEMORY) and not is_operation_memory_store(it->_operation));
    201217              in_RETIRE_STORE_QUEUE_PTR_WRITE [i]->write(it->_store_queue_ptr_write);
    202218              in_RETIRE_LOAD_QUEUE_PTR_WRITE  [i]->write(it->_load_queue_ptr_write );
     
    214230          if (in_RETIRE_VAL[i]->read())
    215231            {
    216               if (in_RETIRE_TYPE [i]->read() != TYPE_MEMORY)
     232              if (not (in_RETIRE_USE_STORE_QUEUE [i]->read() or
     233                       in_RETIRE_USE_LOAD_QUEUE  [i]->read()))
    217234                TEST(Tcontrol_t, out_RETIRE_ACK[i]->read(),true);
    218235             
     
    366383  delete []  in_RETIRE_FRONT_END_ID         ;
    367384  delete []  in_RETIRE_CONTEXT_ID           ;
    368   delete []  in_RETIRE_TYPE                 ;
    369   delete []  in_RETIRE_OPERATION            ;
     385//   delete []  in_RETIRE_TYPE                 ;
     386//   delete []  in_RETIRE_OPERATION            ;
     387  delete []  in_RETIRE_USE_STORE_QUEUE      ;
     388  delete []  in_RETIRE_USE_LOAD_QUEUE       ;
    370389  delete []  in_RETIRE_STORE_QUEUE_PTR_WRITE;
    371390  delete []  in_RETIRE_LOAD_QUEUE_PTR_WRITE ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Load_Store_pointer_unit.h

    r82 r88  
    7777  public    : SC_IN (Tcontext_t     )      **  in_RETIRE_FRONT_END_ID         ; // [nb_inst_retire]
    7878  public    : SC_IN (Tcontext_t     )      **  in_RETIRE_CONTEXT_ID           ; // [nb_inst_retire]
    79   public    : SC_IN (Ttype_t        )      **  in_RETIRE_TYPE                 ; // [nb_inst_retire]
    80   public    : SC_IN (Toperation_t   )      **  in_RETIRE_OPERATION            ; // [nb_inst_retire]
     79//public    : SC_IN (Ttype_t        )      **  in_RETIRE_TYPE                 ; // [nb_inst_retire]
     80//public    : SC_IN (Toperation_t   )      **  in_RETIRE_OPERATION            ; // [nb_inst_retire]
     81  public    : SC_IN (Tcontrol_t     )      **  in_RETIRE_USE_STORE_QUEUE      ; // [nb_inst_retire]
     82  public    : SC_IN (Tcontrol_t     )      **  in_RETIRE_USE_LOAD_QUEUE       ; // [nb_inst_retire]
    8183  public    : SC_IN (Tlsq_ptr_t     )      **  in_RETIRE_STORE_QUEUE_PTR_WRITE; // [nb_inst_retire]
    8284  public    : SC_IN (Tlsq_ptr_t     )      **  in_RETIRE_LOAD_QUEUE_PTR_WRITE ; // [nb_inst_retire]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Parameters.h

    r82 r88  
    3333  public : uint32_t    _nb_inst_retire                  ;
    3434
    35   public : uint32_t    _size_front_end_id               ;
    36   public : uint32_t    _size_context_id                 ;   
    37   public : uint32_t    _size_store_queue_ptr            ;
    38   public : uint32_t    _size_load_queue_ptr             ;
     35//public : uint32_t    _size_front_end_id               ;
     36//public : uint32_t    _size_context_id                 ;   
     37//public : uint32_t    _size_store_queue_ptr            ;
     38//public : uint32_t    _size_load_queue_ptr             ;
    3939
    40   public : uint32_t    _have_port_front_end_id          ;
    41   public : uint32_t    _have_port_context_id            ;
    42   public : uint32_t    _have_port_load_queue_ptr        ;
     40//public : uint32_t    _have_port_front_end_id          ;
     41//public : uint32_t    _have_port_context_id            ;
     42//public : uint32_t    _have_port_load_queue_ptr        ;
    4343
    4444    //-----[ methods ]-----------------------------------------------------------
    4545  public : Parameters  (uint32_t    nb_front_end                    ,
    4646                        uint32_t  * nb_context                      ,
     47//                      uint32_t    size_front_end_id               ,
     48//                      uint32_t    size_context_id                 ,
    4749                        uint32_t    nb_load_store_queue             ,
    4850                        uint32_t  * size_store_queue                ,
     
    5052                        uint32_t ** link_load_store_unit_with_thread,
    5153                        uint32_t    nb_inst_insert                  ,
    52                         uint32_t    nb_inst_retire                  );
     54                        uint32_t    nb_inst_retire                  ,
     55                        bool        is_toplevel=false
     56                        );
    5357
    5458//   public : Parameters  (Parameters & param) ;
    5559  public : ~Parameters () ;
     60
     61  public :        void            copy       (void);
    5662
    5763  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit.cpp

    r81 r88  
    3838    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin");
    3939
     40#if DEBUG_Load_Store_pointer_unit == true
     41    log_printf(INFO,Load_Store_pointer_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif   
     45
    4046    log_printf(INFO,Load_Store_pointer_unit,FUNCTION,"Allocation");
    4147
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    5157        log_printf(INFO,Load_Store_pointer_unit,FUNCTION,"Allocation of statistics");
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
     
    6672
    6773#ifdef SYSTEMC
    68     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    6975      {
    7076        log_printf(INFO,Load_Store_pointer_unit,FUNCTION,"Method - transition");
     
    141147            sensitive << (*(in_RETIRE_LOAD_QUEUE_PTR_WRITE  [i]));
    142148            sensitive << (*(in_RETIRE_VAL                   [i]))
    143                       << (*(in_RETIRE_TYPE                  [i]))
    144                       << (*(in_RETIRE_OPERATION             [i]))
     149//                    << (*(in_RETIRE_TYPE                  [i]))
     150//                    << (*(in_RETIRE_OPERATION             [i]))
     151                      << (*(in_RETIRE_USE_STORE_QUEUE       [i]))
     152                      << (*(in_RETIRE_USE_LOAD_QUEUE        [i]))
    145153                      << (*(in_RETIRE_STORE_QUEUE_PTR_WRITE [i]));;
    146154          }
     
    155163            if (_param->_have_port_context_id)
    156164            (*(out_RETIRE_ACK                   [i])) (*( in_RETIRE_CONTEXT_ID            [i]));
    157             (*(out_RETIRE_ACK                   [i])) (*( in_RETIRE_TYPE                  [i]));
    158             (*(out_RETIRE_ACK                   [i])) (*( in_RETIRE_OPERATION             [i]));
     165//          (*(out_RETIRE_ACK                   [i])) (*( in_RETIRE_TYPE                  [i]));
     166//          (*(out_RETIRE_ACK                   [i])) (*( in_RETIRE_OPERATION             [i]));
     167            (*(out_RETIRE_ACK                   [i])) (*( in_RETIRE_USE_STORE_QUEUE       [i]));
     168            (*(out_RETIRE_ACK                   [i])) (*( in_RETIRE_USE_LOAD_QUEUE        [i]));
    159169            if (_param->_have_port_load_queue_ptr)
    160170            (*(out_RETIRE_ACK                   [i])) (*( in_RETIRE_LOAD_QUEUE_PTR_WRITE  [i]));
     
    175185
    176186#ifdef STATISTICS
    177     if (_usage & USE_STATISTICS)
     187    if (usage_is_set(_usage,USE_STATISTICS))
    178188      {
    179189        log_printf(INFO,Load_Store_pointer_unit,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_allocation.cpp

    r81 r88  
    7878      ALLOC1_SIGNAL_IN ( in_RETIRE_FRONT_END_ID         ,"front_end_id"         ,Tcontext_t  ,_param->_size_front_end_id   );
    7979      ALLOC1_SIGNAL_IN ( in_RETIRE_CONTEXT_ID           ,"context_id"           ,Tcontext_t  ,_param->_size_context_id     );
    80       ALLOC1_SIGNAL_IN ( in_RETIRE_TYPE                 ,"type"                 ,Ttype_t     ,_param->_size_type           );
    81       ALLOC1_SIGNAL_IN ( in_RETIRE_OPERATION            ,"operation"            ,Toperation_t,_param->_size_operation      );
     80//       ALLOC1_SIGNAL_IN ( in_RETIRE_TYPE                 ,"type"                 ,Ttype_t     ,_param->_size_type           );
     81//       ALLOC1_SIGNAL_IN ( in_RETIRE_OPERATION            ,"operation"            ,Toperation_t,_param->_size_operation      );
     82      ALLOC1_SIGNAL_IN ( in_RETIRE_USE_STORE_QUEUE      ,"use_store_queue"      ,Tcontrol_t  ,_param->_size_operation      );
     83      ALLOC1_SIGNAL_IN ( in_RETIRE_USE_LOAD_QUEUE       ,"use_load_queue"       ,Tcontrol_t  ,_param->_size_operation      );
    8284      ALLOC1_SIGNAL_IN ( in_RETIRE_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t  ,_param->_size_store_queue_ptr);
    8385      ALLOC1_SIGNAL_IN ( in_RETIRE_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t  ,_param->_size_load_queue_ptr );
    8486    }
    8587
    86     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     88    if (usage_is_set(_usage,USE_SYSTEMC))
     89      {
    8790    reg_STORE_QUEUE_PTR_WRITE     = new Tlsq_ptr_t      [_param->_nb_load_store_queue];
    8891    reg_STORE_QUEUE_USE           = new bool *          [_param->_nb_load_store_queue];
     
    106109    internal_RETIRE_LSQ           = new uint32_t        [_param->_nb_inst_retire];
    107110    internal_RETIRE_PTR           = new Tlsq_ptr_t      [_param->_nb_inst_retire];
     111      }
     112    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    108113
    109114#ifdef POSITION
    110     _component->generate_file();
     115    if (usage_is_set(_usage,USE_POSITION))
     116      _component->generate_file();
    111117#endif
    112118
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_deallocation.cpp

    r81 r88  
    2323    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin");
    2424
    25     if (_usage & USE_SYSTEMC)
     25    if (usage_is_set(_usage,USE_SYSTEMC))
    2626      {
    2727        delete    in_CLOCK ;
     
    4848        if (_param->_have_port_context_id)
    4949        delete []  in_RETIRE_CONTEXT_ID           ;
    50         delete []  in_RETIRE_TYPE                 ;
    51         delete []  in_RETIRE_OPERATION            ;
     50//      delete []  in_RETIRE_TYPE                 ;
     51//      delete []  in_RETIRE_OPERATION            ;
     52        delete []  in_RETIRE_USE_STORE_QUEUE      ;
     53        delete []  in_RETIRE_USE_LOAD_QUEUE       ;
    5254        delete []  in_RETIRE_STORE_QUEUE_PTR_WRITE;
    5355        if (_param->_have_port_load_queue_ptr)
    5456        delete []  in_RETIRE_LOAD_QUEUE_PTR_WRITE ;
    5557
     58        delete [] reg_STORE_QUEUE_PTR_WRITE    ;
     59        delete [] reg_STORE_QUEUE_USE          ;
     60        delete [] reg_STORE_QUEUE_NB_USE       ;
     61        delete [] reg_LOAD_QUEUE_PTR_WRITE     ;
     62        delete [] reg_LOAD_QUEUE_USE           ;
     63        delete [] internal_INSERT_ACK          ;
     64        delete [] internal_INSERT_OPERATION_USE;
     65        delete [] internal_INSERT_LSQ          ;
     66        delete [] internal_INSERT_PTR          ;
     67        delete [] internal_RETIRE_ACK          ;
     68        delete [] internal_RETIRE_OPERATION_USE;
     69        delete [] internal_RETIRE_LSQ          ;
     70        delete [] internal_RETIRE_PTR          ;
    5671      }
    57 
    58     delete [] reg_STORE_QUEUE_PTR_WRITE    ;
    59     delete [] reg_STORE_QUEUE_USE          ;
    60     delete [] reg_STORE_QUEUE_NB_USE       ;
    61     delete [] reg_LOAD_QUEUE_PTR_WRITE     ;
    62     delete [] reg_LOAD_QUEUE_USE           ;
    63     delete [] internal_INSERT_ACK          ;
    64     delete [] internal_INSERT_OPERATION_USE;
    65     delete [] internal_INSERT_LSQ          ;
    66     delete [] internal_INSERT_PTR          ;
    67     delete [] internal_RETIRE_ACK          ;
    68     delete [] internal_RETIRE_OPERATION_USE;
    69     delete [] internal_RETIRE_LSQ          ;
    70     delete [] internal_RETIRE_PTR          ;
    7172
    7273    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
    33     _interfaces->testbench();
     34    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     35      _interfaces->testbench();
    3436#endif
    3537
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_genMealy_retire.cpp

    r81 r88  
    3131      {
    3232        Tcontrol_t ack = false;
    33 
    34         if ( (PORT_READ(in_RETIRE_VAL  [i]) == true       ) and
    35              (PORT_READ(in_RETIRE_TYPE [i]) == TYPE_MEMORY))
     33        Tcontrol_t use_sq  = PORT_READ(in_RETIRE_USE_STORE_QUEUE [i]);
     34        Tcontrol_t use_lq  = PORT_READ(in_RETIRE_USE_LOAD_QUEUE  [i]);
     35        if ( (PORT_READ(in_RETIRE_VAL  [i]) == true) and (use_sq or use_lq))
     36//           (PORT_READ(in_RETIRE_TYPE [i]) == TYPE_MEMORY))
    3637          {
    3738            Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RETIRE_FRONT_END_ID [i]):0;
     
    4950               
    5051                // operation became of decod_stage. Also operation is != store_head_ok and store_head_ko
    51                 if (is_operation_memory_store(PORT_READ(in_RETIRE_OPERATION [i])))
     52//              if (is_operation_memory_store(PORT_READ(in_RETIRE_OPERATION [i])))
     53                if (use_sq)
    5254                  {
    5355                    internal_RETIRE_OPERATION_USE [i] = OPERATION_USE_STORE_QUEUE;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Parameters.cpp

    r81 r88  
    2222  Parameters::Parameters (uint32_t    nb_front_end                    ,
    2323                          uint32_t  * nb_context                      ,
     24//                           uint32_t    size_front_end_id               ,
     25//                           uint32_t    size_context_id                 ,
    2426                          uint32_t    nb_load_store_queue             ,
    2527                          uint32_t  * size_store_queue                ,
     
    2729                          uint32_t ** link_load_store_unit_with_thread,
    2830                          uint32_t    nb_inst_insert                  ,
    29                           uint32_t    nb_inst_retire                  )
     31                          uint32_t    nb_inst_retire                  ,
     32                          bool        is_toplevel
     33                          )
    3034  {
    3135    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin");
     
    4044    _nb_inst_retire                   = nb_inst_retire                  ;
    4145   
    42     uint32_t max_nb_context       = max<uint32_t>(nb_context,       nb_front_end);
    43     uint32_t max_size_store_queue = max<uint32_t>(size_store_queue, nb_load_store_queue);
    44     uint32_t max_size_load_queue  = max<uint32_t>(size_load_queue,  nb_load_store_queue);
     46    test();
    4547
    46     _size_front_end_id                = log2(nb_front_end        );
    47     _size_context_id                  = log2(max_nb_context      );
    48     _size_store_queue_ptr             = log2(max_size_store_queue);
    49     _size_load_queue_ptr              = log2(max_size_load_queue );
    50     _have_port_front_end_id           = (_size_front_end_id   > 0);
    51     _have_port_context_id             = (_size_context_id     > 0);
    52     _have_port_load_queue_ptr         = (_size_load_queue_ptr > 0);
     48    if (is_toplevel)
     49      {
     50        _size_front_end_id                = log2(_nb_front_end);
     51        _size_context_id                  = log2(max<uint32_t>(_nb_context,_nb_front_end));
     52        _size_store_queue_ptr             = log2(max<uint32_t>(size_store_queue, nb_load_store_queue));
     53        _size_load_queue_ptr              = log2(max<uint32_t>(size_load_queue,  nb_load_store_queue));
     54
     55        _have_port_front_end_id           = (_size_front_end_id   > 0);
     56        _have_port_context_id             = (_size_context_id     > 0);
     57        _have_port_load_queue_ptr         = (_size_load_queue_ptr > 0);
    5358   
    54     test();
     59        copy();
     60      }
     61
    5562    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End");
    5663  };
     
    6774#undef  FUNCTION
    6875#define FUNCTION "Load_Store_pointer_unit::~Parameters"
    69   Parameters::~Parameters ()
     76  Parameters::~Parameters (void)
     77  {
     78    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin");
     79    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End");
     80  };
     81
     82#undef  FUNCTION
     83#define FUNCTION "Load_Store_pointer_unit::copy"
     84  void Parameters::copy (void)
    7085  {
    7186    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Parameters_msg_error.cpp

    r82 r88  
    4949        test.error(toString(_("The load store unit [%d] is not linked with a thread.\n"),i));
    5050   
     51    log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End");
     52
    5153    return test;
    52 
    53     log_printf(FUNC,Load_Store_pointer_unit,FUNCTION,"End");
    5454  };
    5555
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Dependency_checking_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/SelfTest/src/main.cpp

    r81 r88  
    4848         _nb_general_register,
    4949         _nb_special_register,
    50          _nb_inst_insert     );
     50         _nb_inst_insert     ,
     51         true //is_toplevel
     52         );
    5153     
    5254      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/SelfTest/src/test.cpp

    r82 r88  
    2424#endif
    2525
     26  Tusage_t _usage = USE_ALL;
     27
     28//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     29//   _usage = usage_unset(_usage,USE_VHDL                 );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     31//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     32//   _usage = usage_unset(_usage,USE_POSITION             );
     33//   _usage = usage_unset(_usage,USE_STATISTICS           );
     34//   _usage = usage_unset(_usage,USE_INFORMATION          );
     35
    2636  Dependency_checking_unit * _Dependency_checking_unit = new Dependency_checking_unit
    2737    (name.c_str(),
     
    3040#endif
    3141     _param,
    32      USE_ALL);
     42     _usage);
    3343 
    3444#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/include/Parameters.h

    r82 r88  
    3131  public : uint32_t   _nb_inst_insert        ;
    3232
    33   public : uint32_t   _size_front_end_id     ;
    34   public : uint32_t   _size_context_id       ;
    35   public : uint32_t   _size_general_register ;
    36   public : uint32_t   _size_special_register ;
    37                      
    38   public : uint32_t   _have_port_context_id  ;
    39   public : uint32_t   _have_port_front_end_id;
     33//public : uint32_t   _size_front_end_id     ;
     34//public : uint32_t   _size_context_id       ;
     35//public : uint32_t   _size_general_register ;
     36//public : uint32_t   _size_special_register ;
     37
     38//public : uint32_t   _have_port_context_id  ;
     39//public : uint32_t   _have_port_front_end_id;
    4040
    4141    //-----[ methods ]-----------------------------------------------------------
     
    4444                        uint32_t nb_general_register   ,
    4545                        uint32_t nb_special_register   ,
    46                         uint32_t nb_inst_insert        );
     46                        uint32_t nb_inst_insert        ,
     47                        bool     is_toplevel=false
     48                        );
    4749//   public : Parameters  (Parameters & param) ;
    4850  public : ~Parameters () ;
    4951
    5052  public :        Parameters_test msg_error  (void);
     53
     54  public :        void            copy       (void);
    5155
    5256  public :        std::string     print      (uint32_t depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/src/Dependency_checking_unit.cpp

    r81 r88  
    3939    log_printf(FUNC,Dependency_checking_unit,FUNCTION,"Begin");
    4040
     41#if DEBUG_Dependency_checking_unit == true
     42    log_printf(INFO,Dependency_checking_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     43
     44    std::cout << *param << std::endl;
     45#endif   
     46
    4147    log_printf(INFO,Dependency_checking_unit,FUNCTION,"Allocation");
    4248
     
    4854
    4955#ifdef STATISTICS
    50     if (_usage & USE_STATISTICS)
     56    if (usage_is_set(_usage,USE_STATISTICS))
    5157      {
    5258        log_printf(INFO,Dependency_checking_unit,FUNCTION,"Allocation of statistics");
     
    5763
    5864#ifdef VHDL
    59     if (_usage & USE_VHDL)
     65    if (usage_is_set(_usage,USE_VHDL))
    6066      {
    6167        // generate the vhdl
     
    6773
    6874#ifdef SYSTEMC
    69     if (_usage & USE_SYSTEMC)
     75    if (usage_is_set(_usage,USE_SYSTEMC))
    7076      {
    7177# if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     
    8692        SC_METHOD (genMealy);
    8793        dont_initialize ();
    88         sensitive << (*(in_CLOCK)).neg();
     94//      sensitive << (*(in_CLOCK)).neg(); // don't need internal register
    8995        for (uint32_t i=0;i<_param->_nb_inst_insert; i++)
    9096          {
     
    221227
    222228#ifdef STATISTICS
    223     if (_usage & USE_STATISTICS)
     229    if (usage_is_set(_usage,USE_STATISTICS))
    224230      {
    225231        log_printf(INFO,Dependency_checking_unit,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/src/Dependency_checking_unit_allocation.cpp

    r81 r88  
    113113
    114114#ifdef POSITION
    115     _component->generate_file();
     115     if (usage_is_set(_usage,USE_POSITION))
     116       _component->generate_file();
    116117#endif
    117118
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/src/Dependency_checking_unit_deallocation.cpp

    r81 r88  
    2424    log_printf(FUNC,Dependency_checking_unit,FUNCTION,"Begin");
    2525
    26     if (_usage & USE_SYSTEMC)
     26    if (usage_is_set(_usage,USE_SYSTEMC))
    2727      {
    2828        delete     in_CLOCK ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/src/Dependency_checking_unit_end_cycle.cpp

    r81 r88  
    2626
    2727#ifdef STATISTICS
    28     _stat->end_cycle();
     28    if (usage_is_set(_usage,USE_STATISTICS))
     29      _stat->end_cycle();
    2930#endif   
    3031
     
    3233    // Evaluation before read the ouput signal
    3334//  sc_start(0);
    34     _interfaces->testbench();
     35    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     36      _interfaces->testbench();
    3537#endif
    3638
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/src/Dependency_checking_unit_genMealy.cpp

    r81 r88  
    2323  void Dependency_checking_unit::genMealy (void)
    2424  {
    25     log_printf(FUNC,Dependency_checking_unit,FUNCTION,"Begin");
     25    log_begin(Dependency_checking_unit,FUNCTION);
     26    log_function(Dependency_checking_unit,FUNCTION,_name.c_str());
    2627
    2728//     Tcontrol_t         val                [_param->_nb_inst_insert];
     
    7778        num_reg_re_phy_new [i] = PORT_READ(in_RENAME_IN_NUM_REG_RE_PHY_NEW [i]);
    7879       
     80        log_printf(TRACE,Dependency_checking_unit,FUNCTION,"  * (before) [%d] %.2d %.2d, %.1d %.2d %.5d, %.1d %.2d %.5d, %.1d %.2d %.5d, %.1d %.2d %.5d -> %.5d, %.1d %.2d %.5d -> %.5d",
     81                   i,
     82                   front_end_id       [i],
     83                   context_id         [i],
     84                   read_ra            [i],
     85                   num_reg_ra_log     [i],
     86                   num_reg_ra_phy     [i],
     87                   read_rb            [i],
     88                   num_reg_rb_log     [i],
     89                   num_reg_rb_phy     [i],
     90                   read_rc            [i],
     91                   num_reg_rc_log     [i],
     92                   num_reg_rc_phy     [i],
     93                   write_rd           [i],
     94                   num_reg_rd_log     [i],
     95                   num_reg_rd_phy_old [i],
     96                   num_reg_rd_phy_new [i],
     97                   write_re           [i],
     98                   num_reg_re_log     [i],
     99                   num_reg_re_phy_old [i],
     100                   num_reg_re_phy_new [i]);
     101
    79102        // ================================================================
    80103        // =====[ Write after Write ]======================================
     
    88111                (context_id     [j] == context_id     [i]) )
    89112              {
     113                log_printf(TRACE,Dependency_checking_unit,FUNCTION,"    * RD :  WAW dependency with inst[%d].RD",j);
    90114                num_reg_rd_phy_old [i] = num_reg_rd_phy_new [j];
    91115                break; // find the most recently dependency
     
    100124                (context_id     [j] == context_id     [i]) )
    101125              {
     126                log_printf(TRACE,Dependency_checking_unit,FUNCTION,"    * RE : WAW dependency with inst[%d].RE",j);
    102127                num_reg_re_phy_old [i] = num_reg_re_phy_new [j];
    103128                break; // find the most recently dependency
     
    114139                (context_id     [j] == context_id     [i]) )
    115140              {
     141                log_printf(TRACE,Dependency_checking_unit,FUNCTION,"    * RA :  RAW dependency with inst[%d].RD",j);
    116142                num_reg_ra_phy [i] = num_reg_rd_phy_new [j];
    117143                break; // find the most recently dependency
     
    126152                (context_id     [j] == context_id     [i]) )
    127153              {
     154                log_printf(TRACE,Dependency_checking_unit,FUNCTION,"    * RB :  RAW dependency with inst[%d].RD",j);
    128155                num_reg_rb_phy [i] = num_reg_rd_phy_new [j];
    129156                break; // find the most recently dependency
     
    138165                (context_id     [j] == context_id     [i]) )
    139166              {
     167                log_printf(TRACE,Dependency_checking_unit,FUNCTION,"    * RC :  RAW dependency with inst[%d].RE",j);
    140168                num_reg_rc_phy [i] = num_reg_re_phy_new [j];
    141169                break; // find the most recently dependency
    142170              }
     171
     172        log_printf(TRACE,Dependency_checking_unit,FUNCTION,"  * (after ) [%d] %.2d %.2d, %.1d %.2d %.5d, %.1d %.2d %.5d, %.1d %.2d %.5d, %.1d %.2d %.5d -> %.5d, %.1d %.2d %.5d -> %.5d",
     173                   i,
     174                   front_end_id       [i],
     175                   context_id         [i],
     176                   read_ra            [i],
     177                   num_reg_ra_log     [i],
     178                   num_reg_ra_phy     [i],
     179                   read_rb            [i],
     180                   num_reg_rb_log     [i],
     181                   num_reg_rb_phy     [i],
     182                   read_rc            [i],
     183                   num_reg_rc_log     [i],
     184                   num_reg_rc_phy     [i],
     185                   write_rd           [i],
     186                   num_reg_rd_log     [i],
     187                   num_reg_rd_phy_old [i],
     188                   num_reg_rd_phy_new [i],
     189                   write_re           [i],
     190                   num_reg_re_log     [i],
     191                   num_reg_re_phy_old [i],
     192                   num_reg_re_phy_new [i]);
    143193
    144194        // =====[ Output ]=================================================
     
    168218      }
    169219
    170     log_printf(FUNC,Dependency_checking_unit,FUNCTION,"End");
     220    log_end(Dependency_checking_unit,FUNCTION);
    171221  };
    172222
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/src/Parameters.cpp

    r81 r88  
    2424                          uint32_t nb_general_register   ,
    2525                          uint32_t nb_special_register   ,
    26                           uint32_t nb_inst_insert        )
     26                          uint32_t nb_inst_insert        ,
     27                          bool     is_toplevel           )
    2728  {
    2829    log_printf(FUNC,Dependency_checking_unit,FUNCTION,"Begin");
     
    3435    _nb_inst_insert      = nb_inst_insert     ;
    3536
    36     _size_front_end_id      = log2(nb_front_end       );
    37     _size_context_id        = log2(max_nb_context     );
    38     _size_general_register  = log2(nb_general_register);
    39     _size_special_register  = log2(nb_special_register);
    40    
    41     _have_port_front_end_id = _size_front_end_id>0;
    42     _have_port_context_id   = _size_context_id  >0;
     37    test();
    4338
    44     test();
     39    if (is_toplevel)
     40      {
     41        _size_front_end_id      = log2(nb_front_end       );
     42        _size_context_id        = log2(max_nb_context     );
     43        _size_general_register  = log2(nb_general_register);
     44        _size_special_register  = log2(nb_special_register);
     45       
     46        _have_port_front_end_id = _size_front_end_id>0;
     47        _have_port_context_id   = _size_context_id  >0;
     48
     49        copy();
     50      }
     51
    4552    log_printf(FUNC,Dependency_checking_unit,FUNCTION,"End");
    4653  };
     
    5764#undef  FUNCTION
    5865#define FUNCTION "Dependency_checking_unit::~Parameters"
    59   Parameters::~Parameters ()
     66  Parameters::~Parameters (void)
     67  {
     68    log_printf(FUNC,Dependency_checking_unit,FUNCTION,"Begin");
     69    log_printf(FUNC,Dependency_checking_unit,FUNCTION,"End");
     70  };
     71
     72#undef  FUNCTION
     73#define FUNCTION "Dependency_checking_unit::copy"
     74  void Parameters::copy (void)
    6075  {
    6176    log_printf(FUNC,Dependency_checking_unit,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Free_List_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/SelfTest/src/main.cpp

    r81 r88  
    5757         _nb_pop             ,
    5858         _nb_push            ,
    59          _priority           );
     59         _priority           ,
     60         true //is_toplevel
     61         );
    6062     
    6163      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/SelfTest/src/test.cpp

    r82 r88  
    2323#endif
    2424
     25  Tusage_t _usage = USE_ALL;
     26
     27//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     28//   _usage = usage_unset(_usage,USE_VHDL                 );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     31//   _usage = usage_unset(_usage,USE_POSITION             );
     32//   _usage = usage_unset(_usage,USE_STATISTICS           );
     33//   _usage = usage_unset(_usage,USE_INFORMATION          );
     34
    2535  Free_List_unit * _Free_List_unit = new Free_List_unit
    2636    (name.c_str(),
     
    2939#endif
    3040     _param,
    31      USE_ALL);
     41     _usage);
    3242 
    3343#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Parameters.h

    r82 r88  
    3434  public : Tpriority_t _priority             ;
    3535
    36   public : uint32_t    _size_general_register;
    37   public : uint32_t    _size_special_register;
     36//public : uint32_t    _size_general_register;
     37//public : uint32_t    _size_special_register;
    3838
    3939  public : uint32_t    _nb_bank_by_pop       ;
     
    5252                        uint32_t    nb_pop             ,
    5353                        uint32_t    nb_push            ,
    54                         Tpriority_t priority           );
     54                        Tpriority_t priority           ,
     55                        bool        is_toplevel=false);
    5556//   public : Parameters  (Parameters & param) ;
    5657  public : ~Parameters () ;
    5758
    5859  public :        Parameters_test msg_error  (void);
     60
     61  public :        void            copy       (void);
    5962
    6063  public :        std::string     print      (uint32_t depth);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit.cpp

    r81 r88  
    3939    log_printf(FUNC,Free_List_unit,FUNCTION,"Begin");
    4040
     41#if DEBUG_Free_List_unit == true
     42    log_printf(INFO,Free_List_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     43
     44    std::cout << *param << std::endl;
     45#endif   
     46
    4147    log_printf(INFO,Free_List_unit,FUNCTION,"Allocation");
    4248
     
    4854
    4955#ifdef STATISTICS
    50     if (_usage & USE_STATISTICS)
     56    if (usage_is_set(_usage,USE_STATISTICS))
    5157      {
    5258        log_printf(INFO,Free_List_unit,FUNCTION,"Allocation of statistics");
     
    5763
    5864#ifdef VHDL
    59     if (_usage & USE_VHDL)
     65    if (usage_is_set(_usage,USE_VHDL))
    6066      {
    6167        // generate the vhdl
     
    6773
    6874#ifdef SYSTEMC
    69     if (_usage & USE_SYSTEMC)
     75    if (usage_is_set(_usage,USE_SYSTEMC))
    7076      {
    7177        log_printf(INFO,Free_List_unit,FUNCTION,"Method - transition");
     
    8389        SC_METHOD (genMealy_pop);
    8490        dont_initialize ();
    85         sensitive << (*(in_CLOCK)).neg();
     91        sensitive << (*(in_CLOCK)).neg(); // need internal register
    8692        for (uint32_t i=0; i<_param->_nb_pop; i++)
    8793          sensitive << (*(in_POP_GPR_VAL[i]))
     
    104110        SC_METHOD (genMealy_push_gpr);
    105111        dont_initialize ();
    106         sensitive << (*(in_CLOCK)).neg();
     112        sensitive << (*(in_CLOCK)).neg(); // need internal register
    107113        for (uint32_t i=0; i<_param->_nb_push; i++)
    108114          sensitive << (*(in_PUSH_GPR_VAL    [i]))
     
    123129        SC_METHOD (genMealy_push_spr);
    124130        dont_initialize ();
    125         sensitive << (*(in_CLOCK)).neg();
     131        sensitive << (*(in_CLOCK)).neg(); // need internal register
    126132        for (uint32_t i=0; i<_param->_nb_push; i++)
    127133          sensitive << (*(in_PUSH_SPR_VAL    [i]))
     
    150156
    151157#ifdef STATISTICS
    152     if (_usage & USE_STATISTICS)
     158    if (usage_is_set(_usage,USE_STATISTICS))
    153159      {
    154160        log_printf(INFO,Free_List_unit,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_allocation.cpp

    r81 r88  
    8686     }
    8787
    88     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     88     if (usage_is_set(_usage,USE_SYSTEMC))
     89       {
    8990     _gpr_list = new std::list<uint32_t> [_param->_nb_bank];
    9091     _spr_list = new std::list<uint32_t> [_param->_nb_bank];
     
    9899     internal_PUSH_GPR_BANK = new uint32_t   [_param->_nb_push];
    99100     internal_PUSH_SPR_BANK = new uint32_t   [_param->_nb_push];
     101       }
     102    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    100103
    101104#ifdef POSITION
    102     _component->generate_file();
     105     if (usage_is_set(_usage,USE_POSITION))
     106       _component->generate_file();
    103107#endif
    104108
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_deallocation.cpp

    r81 r88  
    2424    log_printf(FUNC,Free_List_unit,FUNCTION,"Begin");
    2525
    26     if (_usage & USE_SYSTEMC)
     26    if (usage_is_set(_usage,USE_SYSTEMC))
    2727      {
    2828        delete    in_CLOCK ;
     
    4343        delete [] out_PUSH_SPR_ACK    ;
    4444        delete []  in_PUSH_SPR_NUM_REG;
     45
     46        delete [] _gpr_list;
     47        delete [] _spr_list;
     48       
     49        delete [] internal_POP_ACK     ;
     50        delete [] internal_POP_GPR_BANK;
     51        delete [] internal_POP_SPR_BANK;
     52       
     53        delete [] internal_PUSH_GPR_ACK ;
     54        delete [] internal_PUSH_SPR_ACK ;
     55        delete [] internal_PUSH_GPR_BANK;
     56        delete [] internal_PUSH_SPR_BANK;
    4557      }
     58
    4659    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    47      delete [] _gpr_list;
    48      delete [] _spr_list;
    49 
    50      delete [] internal_POP_ACK     ;
    51      delete [] internal_POP_GPR_BANK;
    52      delete [] internal_POP_SPR_BANK;
    53 
    54      delete [] internal_PUSH_GPR_ACK ;
    55      delete [] internal_PUSH_SPR_ACK ;
    56      delete [] internal_PUSH_GPR_BANK;
    57      delete [] internal_PUSH_SPR_BANK;
    5860
    5961     delete _component;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_end_cycle.cpp

    r81 r88  
    2626
    2727#ifdef STATISTICS
    28     _stat->end_cycle();
     28    if (usage_is_set(_usage,USE_STATISTICS))
     29      _stat->end_cycle();
    2930#endif   
    3031
     
    3233    // Evaluation before read the ouput signal
    3334//  sc_start(0);
    34     _interfaces->testbench();
     35    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     36      _interfaces->testbench();
    3537#endif
    3638
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_genMealy_pop.cpp

    r81 r88  
    2323  void Free_List_unit::genMealy_pop (void)
    2424  {
    25     log_printf(FUNC,Free_List_unit,FUNCTION,"Begin");
     25    log_begin(Free_List_unit,FUNCTION);
     26    log_function(Free_List_unit,FUNCTION,_name.c_str());
    2627
    2728    for (uint32_t i=0; i<_param->_nb_pop; i++)
     
    7778   
    7879
    79     log_printf(FUNC,Free_List_unit,FUNCTION,"End");
     80    log_end(Free_List_unit,FUNCTION);
    8081  };
    8182
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_genMealy_push_gpr.cpp

    r81 r88  
    2323  void Free_List_unit::genMealy_push_gpr (void)
    2424  {
    25     log_printf(FUNC,Free_List_unit,FUNCTION,"Begin");
     25    log_begin(Free_List_unit,FUNCTION);
     26    log_function(Free_List_unit,FUNCTION,_name.c_str());
    2627
    2728    bool bank_use [_param->_nb_bank];
     
    5152      }
    5253   
    53     log_printf(FUNC,Free_List_unit,FUNCTION,"End");
     54    log_end(Free_List_unit,FUNCTION);
    5455  };
    5556
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_genMealy_push_spr.cpp

    r81 r88  
    2323  void Free_List_unit::genMealy_push_spr (void)
    2424  {
    25     log_printf(FUNC,Free_List_unit,FUNCTION,"Begin");
     25    log_begin(Free_List_unit,FUNCTION);
     26    log_function(Free_List_unit,FUNCTION,_name.c_str());
    2627
    2728    bool bank_use [_param->_nb_bank];
     
    5152      }
    5253   
    53     log_printf(FUNC,Free_List_unit,FUNCTION,"End");
     54    log_end(Free_List_unit,FUNCTION);
    5455  };
    5556
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_transition.cpp

    r81 r88  
    2323  void Free_List_unit::transition (void)
    2424  {
    25     log_printf(FUNC,Free_List_unit,FUNCTION,"Begin");
     25    log_begin(Free_List_unit,FUNCTION);
     26    log_function(Free_List_unit,FUNCTION,_name.c_str());
    2627
    2728    if (PORT_READ(in_NRESET) == 0)
     
    3940        // =====[ POP ]======================================
    4041        // ==================================================
    41 //      log_printf(TRACE,Free_List_unit,FUNCTION,"Test transaction POP");
    4242        for (uint32_t i=0; i<_param->_nb_pop; i++)
    4343          if (PORT_READ(in_POP_VAL[i]) and internal_POP_ACK [i])
    4444            {
     45              log_printf(TRACE,Free_List_unit,FUNCTION,"  * POP [%d]",i);
     46
    4547              if (PORT_READ(in_POP_GPR_VAL [i]))
    4648                _gpr_list [internal_POP_GPR_BANK[i]].pop_front();
     
    5355        // =====[ PUSH_GPR ]=================================
    5456        // ==================================================
    55 //      log_printf(TRACE,Free_List_unit,FUNCTION,"Test transaction PUSH_GPR");
    5657        for (uint32_t i=0; i<_param->_nb_push; i++)
    5758          if (PORT_READ(in_PUSH_GPR_VAL[i]) and internal_PUSH_GPR_ACK [i])
    58             _gpr_list [internal_PUSH_GPR_BANK[i]].push_back(//_param->_mask_gpr &
    59                                                             PORT_READ(in_PUSH_GPR_NUM_REG [i]));
     59            {
     60              log_printf(TRACE,Free_List_unit,FUNCTION,"  * PUSH_GPR[%d]",i);
    6061
     62              _gpr_list [internal_PUSH_GPR_BANK[i]].push_back(//_param->_mask_gpr &
     63                                                              PORT_READ(in_PUSH_GPR_NUM_REG [i]));
     64            }
    6165        // ==================================================
    6266        // =====[ PUSH_SPR ]=================================
    6367        // ==================================================
    64 //      log_printf(TRACE,Free_List_unit,FUNCTION,"Test transaction PUSH_SPR");
    6568        for (uint32_t i=0; i<_param->_nb_push; i++)
    6669          if (PORT_READ(in_PUSH_SPR_VAL[i]) and internal_PUSH_SPR_ACK [i])
    67             _spr_list [internal_PUSH_SPR_BANK[i]].push_back(//_param->_mask_spr &
    68                                                             PORT_READ(in_PUSH_SPR_NUM_REG [i]));
     70            {
     71              log_printf(TRACE,Free_List_unit,FUNCTION,"  * PUSH_SPR[%d]",i);
     72
     73              _spr_list [internal_PUSH_SPR_BANK[i]].push_back(//_param->_mask_spr &
     74                                                              PORT_READ(in_PUSH_SPR_NUM_REG [i]));
     75            }
    6976
    7077        if (_param->_priority == PRIORITY_ROUND_ROBIN)
    7178          internal_BANK_PRIORITY = (internal_BANK_PRIORITY+1)%_param->_nb_bank_by_pop;
     79
     80#if (DEBUG >= DEBUG_TRACE) and (DEBUG_Free_List_unit == true)
     81        log_printf(TRACE,Free_List_unit,FUNCTION,"  * Dump Free List");
     82
     83        for (uint32_t i=0; i<_param->_nb_bank; ++i)
     84          {
     85            uint32_t j=0;
     86            for (std::list<Tgeneral_address_t>::iterator it=_gpr_list->begin();
     87                 it!=_gpr_list->end();
     88                 ++it)
     89              {
     90                log_printf(TRACE,Free_List_unit,FUNCTION,"    * GPR_LIST[%.5d][%.5d] : %.5d",i,j,*it);
     91                ++j;
     92              }
     93          }
     94        for (uint32_t i=0; i<_param->_nb_bank; ++i)
     95          {
     96            uint32_t j=0;
     97            for (std::list<Tspecial_address_t>::iterator it=_spr_list->begin();
     98                 it!=_spr_list->end();
     99                 ++it)
     100              {
     101                log_printf(TRACE,Free_List_unit,FUNCTION,"    * SPR_LIST[%.5d][%.5d] : %.5d",i,j,*it);
     102                ++j;
     103              }
     104          }
     105
     106#endif
    72107      }
    73108
     
    76111#endif
    77112
    78     log_printf(FUNC,Free_List_unit,FUNCTION,"End");
     113    log_end(Free_List_unit,FUNCTION);
    79114  };
    80115
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Parameters.cpp

    r81 r88  
    2727                          uint32_t    nb_pop             ,
    2828                          uint32_t    nb_push            ,
    29                           Tpriority_t priority           )
     29                          Tpriority_t priority           ,
     30                          bool        is_toplevel        )
    3031  {
    3132    log_printf(FUNC,Free_List_unit,FUNCTION,"Begin");
     
    4142    test();
    4243
    43     _size_general_register = log2(nb_general_register);
    44     _size_special_register = log2(nb_special_register);
     44    uint32_t size_general_register = log2(nb_general_register);
     45    uint32_t size_special_register = log2(nb_special_register);
    4546
    4647    _nb_bank_by_pop        = _nb_bank / _nb_pop;
     
    4950
    5051    _bank_gpr_nb_slot      = gpr_nb_slot/nb_bank;
    51     _bank_gpr_size_slot    = _size_general_register-log2(nb_bank);
     52    _bank_gpr_size_slot    = size_general_register-log2(nb_bank);
    5253
    5354    _mask_gpr              = gen_mask<Tgeneral_address_t> (_bank_gpr_size_slot);
     
    5657
    5758    _bank_spr_nb_slot      = spr_nb_slot/nb_bank;
    58     _bank_spr_size_slot    = _size_special_register-log2(nb_bank);
     59    _bank_spr_size_slot    = size_special_register-log2(nb_bank);
    5960
    6061    _mask_spr              = gen_mask<Tspecial_address_t> (_bank_spr_size_slot);
     62
     63    if (is_toplevel)
     64      {
     65        _size_general_register = size_general_register;
     66        _size_special_register = size_special_register;
     67
     68        copy();
     69      }
    6170
    6271    log_printf(FUNC,Free_List_unit,FUNCTION,"End");
     
    7483#undef  FUNCTION
    7584#define FUNCTION "Free_List_unit::~Parameters"
    76   Parameters::~Parameters ()
     85  Parameters::~Parameters (void)
     86  {
     87    log_printf(FUNC,Free_List_unit,FUNCTION,"Begin");
     88    log_printf(FUNC,Free_List_unit,FUNCTION,"End");
     89  };
     90
     91#undef  FUNCTION
     92#define FUNCTION "Free_List_unit::copy"
     93  void Parameters::copy (void)
    7794  {
    7895    log_printf(FUNC,Free_List_unit,FUNCTION,"Begin");
  • 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

    r82 r88  
    2929
    3030    if (_nb_general_register <= _nb_thread*_nb_general_register_logic)
    31       test.error(_("The number of physical general register is insufficient.\n"));
     31      test.error(toString(_("The number of physical general register is insufficient. (Minimum : %d)\n"),_nb_thread*_nb_general_register_logic+1));
    3232    if (_nb_special_register <= _nb_thread*_nb_special_register_logic)
    33       test.error(_("The number of physical special register is insufficient.\n"));
     33      test.error(toString(_("The number of physical special register is insufficient. (Minimum : %d)\n"),_nb_thread*_nb_special_register_logic+1));
    3434    if (not is_multiple (_nb_bank, _nb_pop))
    3535      test.error(_("Number of pop must be a multiple of number of bank.\n"));
    3636    if (not is_power2 (_nb_bank))
    3737      test.error(_("Number of bank must be a power of 2.\n"));
     38    if (_nb_general_register < _nb_bank)
     39      test.error(_("The number of physical general register must be >= nb_bank.\n"));
     40    if (_nb_special_register < _nb_bank)
     41      test.error(_("The number of physical special register must be >= nb_bank.\n"));
    3842
    3943    if ((_priority != PRIORITY_STATIC) and
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Register_Address_Translation_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/src/main.cpp

    r81 r88  
    6060         _nb_special_register ,
    6161         _nb_inst_insert      ,
    62          _nb_inst_retire      );
     62         _nb_inst_retire      ,
     63         true //is_toplevel
     64         );
    6365     
    6466      msg(_("%s"),param->print(1).c_str());
  • 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

    r82 r88  
    2424#endif
    2525
     26  Tusage_t _usage = USE_ALL;
     27
     28//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     29//   _usage = usage_unset(_usage,USE_VHDL                 );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     31//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     32//   _usage = usage_unset(_usage,USE_POSITION             );
     33//   _usage = usage_unset(_usage,USE_STATISTICS           );
     34//   _usage = usage_unset(_usage,USE_INFORMATION          );
     35
    2636  Register_Address_Translation_unit * _Register_Address_Translation_unit = new Register_Address_Translation_unit
    2737    (name.c_str(),
     
    3040#endif
    3141     _param,
    32      USE_ALL);
     42     _usage);
    3343 
    3444#ifdef SYSTEMC
     
    7888  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_OLD," in_RETIRE_NUM_REG_RD_PHY_OLD",Tgeneral_address_t,_param->_nb_inst_retire);
    7989  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_OLD," in_RETIRE_NUM_REG_RE_PHY_OLD",Tspecial_address_t,_param->_nb_inst_retire);
     90  ALLOC1_SC_SIGNAL(out_RETIRE_RESTORE_RD_PHY_OLD,"out_RETIRE_RESTORE_RD_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
     91  ALLOC1_SC_SIGNAL(out_RETIRE_RESTORE_RE_PHY_OLD,"out_RETIRE_RESTORE_RE_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
    8092 
    8193  /********************************************************
     
    131143  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RD_PHY_OLD,_param->_nb_inst_retire);
    132144  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RE_PHY_OLD,_param->_nb_inst_retire);
     145  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_inst_retire);
     146  INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_inst_retire);
    133147
    134148  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    226240            }
    227241
     242          uint32_t retire_max = _param->_nb_inst_retire;
    228243          for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
    229244            {
    230               Tcontrol_t val = (rand()%100)<percent_transaction_retire;
     245              // in order ...........
     246
     247              Tcontrol_t val = (i<retire_max) and ((rand()%100)<percent_transaction_retire);
    231248             
     249              if (not val)
     250                retire_max = i;
     251
    232252              Tcontext_t front_end_id = rand() % _param->_nb_front_end;
    233253
     
    259279                }
    260280            }
     281
     282          for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
     283            {
     284              TEST(Tcontrol_t,out_RETIRE_RESTORE_RD_PHY_OLD[i]->read(), 0);
     285              TEST(Tcontrol_t,out_RETIRE_RESTORE_RE_PHY_OLD[i]->read(), 0);
     286            }
     287
    261288          for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
    262289            {
     
    320347      SC_START(1);
    321348
     349      // EVENT !!!!!!!!
     350
    322351      nb_request = 32;
    323352      while (nb_request > 1)
     
    347376            }
    348377
     378          uint32_t retire_max = _param->_nb_inst_retire;
    349379          for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
    350380            {
    351               Tcontrol_t val = (rand()%100)<percent_transaction_retire;
     381              // in order ...........
     382
     383              Tcontrol_t val = (i<retire_max) and ((rand()%100)<percent_transaction_retire);
     384             
     385              if (not val)
     386                retire_max = i;
     387
    352388              in_RETIRE_VAL                [i]->write(val);
    353389              in_RETIRE_FRONT_END_ID       [i]->write(retire_front_end_id [i]);
     
    362398            }
    363399
    364           SC_START(1);
     400          SC_START(0);
    365401         
    366402
     
    380416          for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
    381417            {
     418              LABEL("RETIRE[%d]",i);
     419
    382420              Tcontext_t front_end_id = in_RETIRE_FRONT_END_ID [i]->read();
    383421              Tcontext_t context_id   = in_RETIRE_CONTEXT_ID   [i]->read();
     422
     423              LABEL("  * front_end_id : %d",front_end_id);
     424              LABEL("  * context_id   : %d",context_id  );
     425
    384426              if (in_RETIRE_VAL [i]->read() and out_RETIRE_ACK [i]->read())
    385427                {
    386428                  if (in_RETIRE_WRITE_RD [i]->read() == 1)
    387429                    {
     430//                       LABEL("  * transaction and write rd");
     431//                       LABEL("    * rd_log       : %d",in_RETIRE_NUM_REG_RD_LOG[i]->read());
     432//                       LABEL("    * rat_gpr_updt : %d",rat_gpr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()]);
     433                      TEST(Tcontrol_t,out_RETIRE_RESTORE_RD_PHY_OLD[i]->read(), (rat_gpr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] == false));
     434
    388435                      if (rat_gpr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] == false)
    389436                        rat_gpr[front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] = in_RETIRE_NUM_REG_RD_PHY_OLD[i]->read();
     
    392439                  if (in_RETIRE_WRITE_RE [i]->read() == 1)
    393440                    {
     441                      TEST(Tcontrol_t,out_RETIRE_RESTORE_RE_PHY_OLD[i]->read(), (rat_spr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] == false));
     442
    394443                      if (rat_spr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] == false)
    395444                        rat_spr[front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] = in_RETIRE_NUM_REG_RE_PHY_OLD[i]->read();
     
    398447                }
    399448            }
     449
     450          SC_START(1);
     451
    400452          for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
    401453            {
     
    412464                  TEST(Tspecial_address_t,out_RENAME_NUM_REG_RE_PHY_OLD[i]->read(), rat_spr[front_end_id][context_id][in_RENAME_NUM_REG_RE_LOG[i]->read()]);
    413465                }
    414 
    415             }
     466            }
     467
    416468        }
    417469    }
     
    472524  delete []  in_RETIRE_NUM_REG_RD_PHY_OLD;
    473525  delete []  in_RETIRE_NUM_REG_RE_PHY_OLD;
     526  delete [] out_RETIRE_RESTORE_RD_PHY_OLD;
     527  delete [] out_RETIRE_RESTORE_RE_PHY_OLD;
    474528
    475529#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Parameters.h

    r82 r88  
    3232  public : uint32_t   _nb_inst_retire        ;   
    3333                     
    34   public : uint32_t   _size_front_end_id     ;
    35   public : uint32_t   _size_context_id       ;
    36   public : uint32_t   _size_general_register ;
    37   public : uint32_t   _size_special_register ;
    38                      
    39   public : uint32_t   _have_port_context_id  ;
    40   public : uint32_t   _have_port_front_end_id;
     34//public : uint32_t   _size_front_end_id     ;
     35//public : uint32_t   _size_context_id       ;
     36//public : uint32_t   _size_general_register ;
     37//public : uint32_t   _size_special_register ;
     38//                   
     39//public : uint32_t   _have_port_context_id  ;
     40//public : uint32_t   _have_port_front_end_id;
    4141
    4242    //-----[ methods ]-----------------------------------------------------------
     
    4646                        uint32_t   nb_special_register,
    4747                        uint32_t   nb_inst_insert     ,
    48                         uint32_t   nb_inst_retire     
     48                        uint32_t   nb_inst_retire     ,
     49                        bool       is_toplevel=false
    4950                        );
    5051//   public : Parameters  (Parameters & param) ;
    5152  public : ~Parameters () ;
     53
     54  public :        void            copy       (void);
    5255
    5356  public :        Parameters_test msg_error  (void);
  • 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

    r82 r88  
    103103  public    : SC_IN (Tgeneral_address_t)   **  in_RETIRE_NUM_REG_RD_PHY_OLD;//[nb_inst_retire]
    104104  public    : SC_IN (Tspecial_address_t)   **  in_RETIRE_NUM_REG_RE_PHY_OLD;//[nb_inst_retire]
     105  public    : SC_OUT(Tcontrol_t        )   ** out_RETIRE_RESTORE_RD_PHY_OLD;//[nb_inst_retire]
     106  public    : SC_OUT(Tcontrol_t        )   ** out_RETIRE_RESTORE_RE_PHY_OLD;//[nb_inst_retire]
    105107
    106108    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    107109
    108110    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     111  private   : Tgeneral_address_t          *** rat_gpr;                      //[nb_front_end][nb_context][nb_general_register_logic]
     112  private   : bool                        *** rat_gpr_update_table;         //[nb_front_end][nb_context][nb_general_register_logic]
     113  private   : Tspecial_address_t          *** rat_spr;                      //[nb_front_end][nb_context][nb_special_register_logic]
     114  private   : bool                        *** rat_spr_update_table;         //[nb_front_end][nb_context][nb_special_register_logic]
    109115
    110116    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    113119  private   : Tcontrol_t                    * internal_RETIRE_ACK;          //[nb_inst_retire]
    114120
    115   private   : Tgeneral_address_t          *** rat_gpr;                      //[nb_front_end][nb_context][nb_general_register_logic]
    116   private   : bool                        *** rat_gpr_update_table;         //[nb_front_end][nb_context][nb_general_register_logic]
    117   private   : Tspecial_address_t          *** rat_spr;                      //[nb_front_end][nb_context][nb_special_register_logic]
    118   private   : bool                        *** rat_spr_update_table;         //[nb_front_end][nb_context][nb_special_register_logic]
     121  private   : bool                        *** internal_rat_gpr_update_table;         //[nb_front_end][nb_context][nb_general_register_logic]
     122  private   : bool                        *** internal_rat_spr_update_table;         //[nb_front_end][nb_context][nb_special_register_logic]
    119123#endif
    120124
     
    150154#ifdef SYSTEMC                                 
    151155  public  : void        transition                (void);
    152   public  : void        genMoore                  (void);
     156  public  : void        genMealy_rename           (void);
     157  public  : void        genMealy_retire           (void);
    153158#endif                                         
    154159
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Parameters.cpp

    r81 r88  
    2525                          uint32_t   nb_special_register,
    2626                          uint32_t   nb_inst_insert     ,
    27                           uint32_t   nb_inst_retire     )
     27                          uint32_t   nb_inst_retire     ,
     28                          bool       is_toplevel)
    2829  {
    2930    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
     
    3637    _nb_inst_retire         = nb_inst_retire     ;
    3738
    38     _size_front_end_id      = log2(nb_front_end       );
    39     _size_context_id        = log2(max<uint32_t>(nb_context, nb_front_end));
    40     _size_general_register  = log2(nb_general_register);
    41     _size_special_register  = log2(nb_special_register);
     39    test();
     40
     41    if (is_toplevel)
     42      {
     43        _size_front_end_id      = log2(nb_front_end       );
     44        _size_context_id        = log2(max<uint32_t>(nb_context, nb_front_end));
     45        _size_general_register  = log2(nb_general_register);
     46        _size_special_register  = log2(nb_special_register);
    4247   
    43     _have_port_front_end_id = _size_front_end_id>0;
    44     _have_port_context_id   = _size_context_id  >0;
    45 
    46     test();
     48        _have_port_front_end_id = _size_front_end_id>0;
     49        _have_port_context_id   = _size_context_id  >0;
     50       
     51        copy();
     52      }
    4753
    4854    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
     
    6066#undef  FUNCTION
    6167#define FUNCTION "Register_Address_Translation_unit::~Parameters"
    62   Parameters::~Parameters ()
     68  Parameters::~Parameters (void)
     69  {
     70    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
     71    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
     72  };
     73
     74#undef  FUNCTION
     75#define FUNCTION "Register_Address_Translation_unit::copy"
     76  void Parameters::copy (void)
    6377  {
    6478    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit.cpp

    r81 r88  
    3939    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
    4040
     41#if DEBUG_Register_Address_Translation_unit == true
     42    log_printf(INFO,Register_Address_Translation_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     43
     44    std::cout << *param << std::endl;
     45#endif   
     46
    4147    log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Allocation");
    4248
     
    4854
    4955#ifdef STATISTICS
    50     if (_usage & USE_STATISTICS)
     56    if (usage_is_set(_usage,USE_STATISTICS))
    5157      {
    5258        log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Allocation of statistics");
     
    5763
    5864#ifdef VHDL
    59     if (_usage & USE_VHDL)
     65    if (usage_is_set(_usage,USE_VHDL))
    6066      {
    6167        // generate the vhdl
     
    6773
    6874#ifdef SYSTEMC
    69     if (_usage & USE_SYSTEMC)
     75    if (usage_is_set(_usage,USE_SYSTEMC))
    7076      {
    7177        // Constant : accepted already transaction
     
    95101# endif   
    96102
    97         log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Method - genMoore");
     103        log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Method - genMealy_rename");
    98104
    99         SC_METHOD (genMoore);
     105        SC_METHOD (genMealy_rename);
    100106        dont_initialize ();
    101         sensitive << (*(in_CLOCK)).neg();
     107        sensitive << (*(in_CLOCK)).neg(); // need internal register
     108        for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
     109          {
     110            if (_param->_have_port_front_end_id)
     111            sensitive << (*(in_RENAME_FRONT_END_ID   [i]));
     112            if (_param->_have_port_context_id  )
     113            sensitive << (*(in_RENAME_CONTEXT_ID     [i]));
     114           
     115            sensitive << (*(in_RENAME_NUM_REG_RA_LOG [i]))
     116                      << (*(in_RENAME_NUM_REG_RB_LOG [i]))
     117                      << (*(in_RENAME_NUM_REG_RC_LOG [i]))
     118                      << (*(in_RENAME_NUM_REG_RD_LOG [i]))
     119                      << (*(in_RENAME_NUM_REG_RE_LOG [i]));
     120      }
     121
     122
     123# ifdef SYSTEMCASS_SPECIFIC
     124        // List dependency information
     125# endif   
     126
     127        log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Method - genMealy_retire");
     128
     129        SC_METHOD (genMealy_retire);
     130        dont_initialize ();
     131        sensitive << (*(in_CLOCK)).neg(); // need internal register
     132        for (uint32_t i=0; i<_param->_nb_inst_retire; ++i)
     133          {
     134            if (param->_have_port_front_end_id)
     135            sensitive << (*(in_RETIRE_FRONT_END_ID   [i]));
     136            if (param->_have_port_context_id)
     137            sensitive << (*(in_RETIRE_CONTEXT_ID     [i]));
     138           
     139            sensitive << (*(in_RETIRE_EVENT_STATE    [i]))
     140                      << (*(in_RETIRE_WRITE_RD       [i]))
     141                      << (*(in_RETIRE_WRITE_RE       [i]))
     142                      << (*(in_RETIRE_NUM_REG_RD_LOG [i]))
     143                      << (*(in_RETIRE_NUM_REG_RE_LOG [i]));
     144          }
    102145       
    103146# ifdef SYSTEMCASS_SPECIFIC
     
    117160
    118161#ifdef STATISTICS
    119     if (_usage & USE_STATISTICS)
     162    if (usage_is_set(_usage,USE_STATISTICS))
    120163      {
    121164        log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_allocation.cpp

    r81 r88  
    107107      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_PHY_OLD,"num_reg_rd_phy_old",Tgeneral_address_t,_param->_size_general_register);
    108108      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_OLD,"num_reg_re_phy_old",Tspecial_address_t,_param->_size_special_register);
     109      ALLOC1_SIGNAL_OUT(out_RETIRE_RESTORE_RD_PHY_OLD,"restore_rd_phy_old",Tcontrol_t        ,1);
     110      ALLOC1_SIGNAL_OUT(out_RETIRE_RESTORE_RE_PHY_OLD,"restore_re_phy_old",Tcontrol_t        ,1);
    109111    }
    110112
    111     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     113    if (usage_is_set(_usage,USE_SYSTEMC))
     114      {
    112115    internal_RENAME_ACK = new Tcontrol_t [_param->_nb_inst_insert];
    113116    internal_INSERT_ACK = new Tcontrol_t [_param->_nb_inst_insert];
    114117    internal_RETIRE_ACK = new Tcontrol_t [_param->_nb_inst_retire];
    115118
    116     rat_gpr              = new Tgeneral_address_t ** [_param->_nb_front_end];
    117     rat_gpr_update_table = new bool               ** [_param->_nb_front_end];
    118     rat_spr              = new Tspecial_address_t ** [_param->_nb_front_end];
    119     rat_spr_update_table = new bool               ** [_param->_nb_front_end];
     119    rat_gpr                       = new Tgeneral_address_t ** [_param->_nb_front_end];
     120    rat_spr                       = new Tspecial_address_t ** [_param->_nb_front_end];
     121    rat_gpr_update_table          = new bool               ** [_param->_nb_front_end];
     122    rat_spr_update_table          = new bool               ** [_param->_nb_front_end];
     123    internal_rat_gpr_update_table = new bool               ** [_param->_nb_front_end];
     124    internal_rat_spr_update_table = new bool               ** [_param->_nb_front_end];
    120125
    121126    for (uint32_t i=0; i<_param->_nb_front_end; i++)
    122127      {
    123         rat_gpr              [i] = new Tgeneral_address_t * [_param->_nb_context[i]];
    124         rat_gpr_update_table [i] = new bool               * [_param->_nb_context[i]];
    125         rat_spr              [i] = new Tspecial_address_t * [_param->_nb_context[i]];
    126         rat_spr_update_table [i] = new bool               * [_param->_nb_context[i]];
     128        rat_gpr                       [i] = new Tgeneral_address_t * [_param->_nb_context[i]];
     129        rat_spr                       [i] = new Tspecial_address_t * [_param->_nb_context[i]];
     130        rat_gpr_update_table          [i] = new bool               * [_param->_nb_context[i]];
     131        rat_spr_update_table          [i] = new bool               * [_param->_nb_context[i]];
     132        internal_rat_gpr_update_table [i] = new bool               * [_param->_nb_context[i]];
     133        internal_rat_spr_update_table [i] = new bool               * [_param->_nb_context[i]];
    127134
    128135        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
    129136          {
    130             rat_gpr              [i][j] = new Tgeneral_address_t [_param->_nb_general_register_logic];
    131             rat_gpr_update_table [i][j] = new bool               [_param->_nb_general_register_logic];
    132             rat_spr              [i][j] = new Tspecial_address_t [_param->_nb_special_register_logic];
    133             rat_spr_update_table [i][j] = new bool               [_param->_nb_special_register_logic];
     137            rat_gpr                       [i][j] = new Tgeneral_address_t [_param->_nb_general_register_logic];
     138            rat_spr                       [i][j] = new Tspecial_address_t [_param->_nb_special_register_logic];
     139            rat_gpr_update_table          [i][j] = new bool               [_param->_nb_general_register_logic];
     140            rat_spr_update_table          [i][j] = new bool               [_param->_nb_special_register_logic];
     141            internal_rat_gpr_update_table [i][j] = new bool               [_param->_nb_general_register_logic];
     142            internal_rat_spr_update_table [i][j] = new bool               [_param->_nb_special_register_logic];
    134143          }
    135144      }
     145      }
     146
     147    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    136148
    137149#ifdef POSITION
    138     _component->generate_file();
     150    if (usage_is_set(_usage,USE_POSITION))
     151      _component->generate_file();
    139152#endif
    140153
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_deallocation.cpp

    r81 r88  
    2424    log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
    2525
    26     if (_usage & USE_SYSTEMC)
     26    if (usage_is_set(_usage,USE_SYSTEMC))
    2727      {
    2828        delete     in_CLOCK ;
     
    7272        delete []  in_RETIRE_NUM_REG_RD_PHY_OLD;
    7373        delete []  in_RETIRE_NUM_REG_RE_PHY_OLD;
     74        delete [] out_RETIRE_RESTORE_RD_PHY_OLD;
     75        delete [] out_RETIRE_RESTORE_RE_PHY_OLD;
     76
     77        delete [] internal_RENAME_ACK;
     78        delete [] internal_INSERT_ACK;
     79        delete [] internal_RETIRE_ACK;
     80       
     81        delete [] rat_gpr             ;
     82        delete [] rat_spr             ;
     83        delete [] rat_gpr_update_table;
     84        delete [] rat_spr_update_table;
     85        delete [] internal_rat_gpr_update_table;
     86        delete [] internal_rat_spr_update_table;
    7487      }
     88
    7589    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    76     delete [] internal_RENAME_ACK;
    77     delete [] internal_INSERT_ACK;
    78     delete [] internal_RETIRE_ACK;
    79 
    80     delete [] rat_gpr             ;
    81     delete [] rat_gpr_update_table;
    82     delete [] rat_spr             ;
    83     delete [] rat_spr_update_table;
    8490    delete    _component;
    8591
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_end_cycle.cpp

    r81 r88  
    2626
    2727#ifdef STATISTICS
    28     _stat->end_cycle();
     28    if (usage_is_set(_usage,USE_STATISTICS))
     29      _stat->end_cycle();
    2930#endif   
    3031
     
    3233    // Evaluation before read the ouput signal
    3334//  sc_start(0);
    34     _interfaces->testbench();
     35    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     36      _interfaces->testbench();
    3537#endif
    3638
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_genMealy_rename.cpp

    r87 r88  
    2020
    2121#undef  FUNCTION
    22 #define FUNCTION "Register_Address_Translation_unit::genMoore"
    23   void Register_Address_Translation_unit::genMoore (void)
     22#define FUNCTION "Register_Address_Translation_unit::genMealy_rename"
     23  void Register_Address_Translation_unit::genMealy_rename (void)
    2424  {
    25     log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
     25    log_begin(Register_Address_Translation_unit,FUNCTION);
     26    log_function(Register_Address_Translation_unit,FUNCTION,_name.c_str());
    2627
    2728    for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
     
    3738      }
    3839
    39     log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
     40    log_end(Register_Address_Translation_unit,FUNCTION);
    4041  };
    4142
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_transition.cpp

    r81 r88  
    2323  void Register_Address_Translation_unit::transition (void)
    2424  {
    25     log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin");
     25    log_begin(Register_Address_Translation_unit,FUNCTION);
     26    log_function(Register_Address_Translation_unit,FUNCTION,_name.c_str());
    2627
    2728    if (PORT_READ(in_NRESET) == 0)
     
    9091                    }
    9192
    92  
    93                   // Test if write and have not a previous update
     93                  // Test if write and have not a previous update
    9494                  if (PORT_READ(in_RETIRE_WRITE_RD [i]) == 1)
    9595                    {
    9696                      Tgeneral_address_t rd_log = PORT_READ(in_RETIRE_NUM_REG_RD_LOG [i]);
    9797                     
    98                       log_printf(NONE,Register_Address_Translation_unit,FUNCTION,"retire[%d]",i);
    99                       log_printf(NONE,Register_Address_Translation_unit,FUNCTION," * front_end_id : %d",front_end_id);
    100                       log_printf(NONE,Register_Address_Translation_unit,FUNCTION," * context_id   : %d",context_id  );
    101                       log_printf(NONE,Register_Address_Translation_unit,FUNCTION," * rd_log       : %d",rd_log      );
     98                      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"  * retire[%d]",i);
     99                      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end_id : %d",front_end_id);
     100                      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * context_id   : %d",context_id  );
     101                      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * rd_log       : %d",rd_log      );
    102102                     
     103//                    if (RETIRE_RESTORE_RD_PHY_OLD [i])
    103104                      if (rat_gpr_update_table[front_end_id][context_id][rd_log] == 0)
    104105                        {
     
    112113                      Tspecial_address_t re_log = PORT_READ(in_RETIRE_NUM_REG_RE_LOG [i]);
    113114
     115//                    if (RETIRE_RESTORE_RE_PHY_OLD [i])
    114116                      if (rat_spr_update_table[front_end_id][context_id][re_log] == 0)
    115117                        {
     
    122124      }
    123125
     126#if (DEBUG >= DEBUG_TRACE) and (DEBUG_Register_Address_Translation_unit == true)
     127    log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"  * Dump RAT (Register_Address_Translation_unit)");
     128    for (uint32_t i=0; i<_param->_nb_front_end; ++i)
     129      for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
     130        {
     131          log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end[%d].context[%d]",i,j);
     132
     133          for (uint32_t k=0; k<_param->_nb_general_register_logic; ++k)
     134            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * GPR[%.2d] - %.5d %.1d",k,rat_gpr[i][j][k],rat_gpr_update_table[i][j][k]);
     135
     136          for (uint32_t k=0; k<_param->_nb_special_register_logic; ++k)
     137            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * SPR[%.2d] - %.5d %.1d",k,rat_spr[i][j][k],rat_spr_update_table[i][j][k]);
     138        }
     139#endif
     140
    124141#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    125142    end_cycle ();
    126143#endif
    127144
    128     log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End");
     145    log_end(Register_Address_Translation_unit,FUNCTION);
    129146  };
    130147
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Register_translation_unit_Glue_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/SelfTest/configuration.cfg

    r81 r88  
    221       4       *2      # nb_inst_insert
    331       4       *2      # nb_inst_retire
     45       5       *2      # size_general_register
     52       2       *2      # size_special_register
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/SelfTest/src/main.cpp

    r81 r88  
    88#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/SelfTest/include/test.h"
    99
    10 #define NB_PARAMS 2
     10#define NB_PARAMS 4
    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_inst_insert (uint32_t)\n"));
    17   err (_(" * nb_inst_retire (uint32_t)\n"));
     16  err (_(" * nb_inst_insert        (uint32_t)\n"));
     17  err (_(" * nb_inst_retire        (uint32_t)\n"));
     18  err (_(" * size_general_register (uint32_t)\n"));
     19  err (_(" * size_special_register (uint32_t)\n"));
    1820
    1921  exit (1);
     
    3234
    3335  string name = argv[x++];
    34   uint32_t _nb_inst_insert = atoi(argv[x++]);
    35   uint32_t _nb_inst_retire = atoi(argv[x++]);
     36  uint32_t _nb_inst_insert        = fromString<uint32_t>(argv[x++]);
     37  uint32_t _nb_inst_retire        = fromString<uint32_t>(argv[x++]);
     38  uint32_t _size_general_register = fromString<uint32_t>(argv[x++]);
     39  uint32_t _size_special_register = fromString<uint32_t>(argv[x++]);
     40
    3641
    3742  int _return = EXIT_SUCCESS;
     
    4045      morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_translation_unit_glue::Parameters * param = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_translation_unit_glue::Parameters
    4146        (_nb_inst_insert,
    42          _nb_inst_retire);
     47         _nb_inst_retire,
     48         _size_general_register,
     49         _size_special_register,
     50         true //is_toplevel
     51         );
    4352     
    4453      msg(_("%s"),param->print(1).c_str());
  • 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

    r82 r88  
    2323#endif
    2424
     25  Tusage_t _usage = USE_ALL;
     26
     27//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     28//   _usage = usage_unset(_usage,USE_VHDL                 );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     31//   _usage = usage_unset(_usage,USE_POSITION             );
     32//   _usage = usage_unset(_usage,USE_STATISTICS           );
     33//   _usage = usage_unset(_usage,USE_INFORMATION          );
     34
    2535  Register_translation_unit_Glue * _Register_translation_unit_Glue = new Register_translation_unit_Glue
    2636    (name.c_str(),
     
    2939#endif
    3040     _param,
    31      USE_ALL);
     41     _usage);
    3242 
    3343#ifdef SYSTEMC
     
    5161  ALLOC1_SC_SIGNAL(out_INSERT_STAT_LIST_VAL ,"out_INSERT_STAT_LIST_VAL ",Tcontrol_t,_param->_nb_inst_insert);
    5262  ALLOC1_SC_SIGNAL( in_INSERT_STAT_LIST_ACK ," in_INSERT_STAT_LIST_ACK ",Tcontrol_t,_param->_nb_inst_insert);
     63
     64  ALLOC1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_READ_RA           ," in_INSERT_DEPENDENCY_CHECKING_READ_RA           ",Tcontrol_t        ,_param->_nb_inst_insert);
     65  ALLOC1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RA_PHY    ," in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RA_PHY    ",Tgeneral_address_t,_param->_nb_inst_insert);
     66  ALLOC1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_READ_RB           ," in_INSERT_DEPENDENCY_CHECKING_READ_RB           ",Tcontrol_t        ,_param->_nb_inst_insert);
     67  ALLOC1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RB_PHY    ," in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RB_PHY    ",Tgeneral_address_t,_param->_nb_inst_insert);
     68  ALLOC1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_READ_RC           ," in_INSERT_DEPENDENCY_CHECKING_READ_RC           ",Tcontrol_t        ,_param->_nb_inst_insert);
     69  ALLOC1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RC_PHY    ," in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RC_PHY    ",Tspecial_address_t,_param->_nb_inst_insert);
     70  ALLOC1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_WRITE_RD          ," in_INSERT_DEPENDENCY_CHECKING_WRITE_RD          ",Tcontrol_t        ,_param->_nb_inst_insert);
     71  ALLOC1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_LOG    ," in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_LOG    ",Tgeneral_address_t,_param->_nb_inst_insert);
     72  ALLOC1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD," in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD",Tgeneral_address_t,_param->_nb_inst_insert);
     73  ALLOC1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW," in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW",Tgeneral_address_t,_param->_nb_inst_insert);
     74  ALLOC1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_WRITE_RE          ," in_INSERT_DEPENDENCY_CHECKING_WRITE_RE          ",Tcontrol_t        ,_param->_nb_inst_insert);
     75  ALLOC1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_LOG    ," in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_LOG    ",Tspecial_address_t,_param->_nb_inst_insert);
     76  ALLOC1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_OLD," in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_OLD",Tspecial_address_t,_param->_nb_inst_insert);
     77  ALLOC1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_NEW," in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_NEW",Tspecial_address_t,_param->_nb_inst_insert);
     78
     79  ALLOC1_SC_SIGNAL(out_INSERT_STAT_LIST_READ_RA                     ,"out_INSERT_STAT_LIST_READ_RA                     ",Tcontrol_t        ,_param->_nb_inst_insert);
     80  ALLOC1_SC_SIGNAL(out_INSERT_STAT_LIST_NUM_REG_RA_PHY              ,"out_INSERT_STAT_LIST_NUM_REG_RA_PHY              ",Tgeneral_address_t,_param->_nb_inst_insert);
     81  ALLOC1_SC_SIGNAL(out_INSERT_STAT_LIST_READ_RB                     ,"out_INSERT_STAT_LIST_READ_RB                     ",Tcontrol_t        ,_param->_nb_inst_insert);
     82  ALLOC1_SC_SIGNAL(out_INSERT_STAT_LIST_NUM_REG_RB_PHY              ,"out_INSERT_STAT_LIST_NUM_REG_RB_PHY              ",Tgeneral_address_t,_param->_nb_inst_insert);
     83  ALLOC1_SC_SIGNAL(out_INSERT_STAT_LIST_READ_RC                     ,"out_INSERT_STAT_LIST_READ_RC                     ",Tcontrol_t        ,_param->_nb_inst_insert);
     84  ALLOC1_SC_SIGNAL(out_INSERT_STAT_LIST_NUM_REG_RC_PHY              ,"out_INSERT_STAT_LIST_NUM_REG_RC_PHY              ",Tspecial_address_t,_param->_nb_inst_insert);
     85  ALLOC1_SC_SIGNAL(out_INSERT_STAT_LIST_WRITE_RD                    ,"out_INSERT_STAT_LIST_WRITE_RD                    ",Tcontrol_t        ,_param->_nb_inst_insert);
     86  ALLOC1_SC_SIGNAL(out_INSERT_STAT_LIST_NUM_REG_RD_PHY_NEW          ,"out_INSERT_STAT_LIST_NUM_REG_RD_PHY_NEW          ",Tgeneral_address_t,_param->_nb_inst_insert);
     87  ALLOC1_SC_SIGNAL(out_INSERT_STAT_LIST_WRITE_RE                    ,"out_INSERT_STAT_LIST_WRITE_RE                    ",Tcontrol_t        ,_param->_nb_inst_insert);
     88  ALLOC1_SC_SIGNAL(out_INSERT_STAT_LIST_NUM_REG_RE_PHY_NEW          ,"out_INSERT_STAT_LIST_NUM_REG_RE_PHY_NEW          ",Tspecial_address_t,_param->_nb_inst_insert);
     89
     90  ALLOC1_SC_SIGNAL(out_INSERT_RAT_WRITE_RD                          ,"out_INSERT_RAT_WRITE_RD                          ",Tcontrol_t        ,_param->_nb_inst_insert);
     91  ALLOC1_SC_SIGNAL(out_INSERT_RAT_NUM_REG_RD_LOG                    ,"out_INSERT_RAT_NUM_REG_RD_LOG                    ",Tgeneral_address_t,_param->_nb_inst_insert);
     92  ALLOC1_SC_SIGNAL(out_INSERT_RAT_NUM_REG_RD_PHY_NEW                ,"out_INSERT_RAT_NUM_REG_RD_PHY_NEW                ",Tgeneral_address_t,_param->_nb_inst_insert);
     93  ALLOC1_SC_SIGNAL(out_INSERT_RAT_WRITE_RE                          ,"out_INSERT_RAT_WRITE_RE                          ",Tcontrol_t        ,_param->_nb_inst_insert);
     94  ALLOC1_SC_SIGNAL(out_INSERT_RAT_NUM_REG_RE_LOG                    ,"out_INSERT_RAT_NUM_REG_RE_LOG                    ",Tspecial_address_t,_param->_nb_inst_insert);
     95  ALLOC1_SC_SIGNAL(out_INSERT_RAT_NUM_REG_RE_PHY_NEW                ,"out_INSERT_RAT_NUM_REG_RE_PHY_NEW                ",Tspecial_address_t,_param->_nb_inst_insert);
     96
     97  ALLOC1_SC_SIGNAL(out_INSERT_READ_RA                               ,"out_INSERT_READ_RA                               ",Tcontrol_t        ,_param->_nb_inst_insert);
     98  ALLOC1_SC_SIGNAL(out_INSERT_NUM_REG_RA_PHY                        ,"out_INSERT_NUM_REG_RA_PHY                        ",Tgeneral_address_t,_param->_nb_inst_insert);
     99  ALLOC1_SC_SIGNAL(out_INSERT_READ_RB                               ,"out_INSERT_READ_RB                               ",Tcontrol_t        ,_param->_nb_inst_insert);
     100  ALLOC1_SC_SIGNAL(out_INSERT_NUM_REG_RB_PHY                        ,"out_INSERT_NUM_REG_RB_PHY                        ",Tgeneral_address_t,_param->_nb_inst_insert);
     101  ALLOC1_SC_SIGNAL(out_INSERT_READ_RC                               ,"out_INSERT_READ_RC                               ",Tcontrol_t        ,_param->_nb_inst_insert);
     102  ALLOC1_SC_SIGNAL(out_INSERT_NUM_REG_RC_PHY                        ,"out_INSERT_NUM_REG_RC_PHY                        ",Tspecial_address_t,_param->_nb_inst_insert);
     103  ALLOC1_SC_SIGNAL(out_INSERT_WRITE_RD                              ,"out_INSERT_WRITE_RD                              ",Tcontrol_t        ,_param->_nb_inst_insert);
     104  ALLOC1_SC_SIGNAL(out_INSERT_NUM_REG_RD_LOG                        ,"out_INSERT_NUM_REG_RD_LOG                        ",Tgeneral_address_t,_param->_nb_inst_insert);
     105  ALLOC1_SC_SIGNAL(out_INSERT_NUM_REG_RD_PHY_OLD                    ,"out_INSERT_NUM_REG_RD_PHY_OLD                    ",Tgeneral_address_t,_param->_nb_inst_insert);
     106  ALLOC1_SC_SIGNAL(out_INSERT_NUM_REG_RD_PHY_NEW                    ,"out_INSERT_NUM_REG_RD_PHY_NEW                    ",Tgeneral_address_t,_param->_nb_inst_insert);
     107  ALLOC1_SC_SIGNAL(out_INSERT_WRITE_RE                              ,"out_INSERT_WRITE_RE                              ",Tcontrol_t        ,_param->_nb_inst_insert);
     108  ALLOC1_SC_SIGNAL(out_INSERT_NUM_REG_RE_LOG                        ,"out_INSERT_NUM_REG_RE_LOG                        ",Tspecial_address_t,_param->_nb_inst_insert);
     109  ALLOC1_SC_SIGNAL(out_INSERT_NUM_REG_RE_PHY_OLD                    ,"out_INSERT_NUM_REG_RE_PHY_OLD                    ",Tspecial_address_t,_param->_nb_inst_insert);
     110  ALLOC1_SC_SIGNAL(out_INSERT_NUM_REG_RE_PHY_NEW                    ,"out_INSERT_NUM_REG_RE_PHY_NEW                    ",Tspecial_address_t,_param->_nb_inst_insert);
     111
    53112  ALLOC1_SC_SIGNAL( in_RETIRE_VAL           ," in_RETIRE_VAL           ",Tcontrol_t,_param->_nb_inst_retire);
    54113  ALLOC1_SC_SIGNAL(out_RETIRE_ACK           ,"out_RETIRE_ACK           ",Tcontrol_t,_param->_nb_inst_retire);
     
    78137  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_STAT_LIST_VAL ,_param->_nb_inst_insert);
    79138  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_STAT_LIST_ACK ,_param->_nb_inst_insert);
    80   INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_RETIRE_VAL           ,_param->_nb_inst_retire);
    81   INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_RETIRE_ACK           ,_param->_nb_inst_retire);
    82   INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_RETIRE_RAT_VAL       ,_param->_nb_inst_retire);
    83   INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_RETIRE_RAT_ACK       ,_param->_nb_inst_retire);
    84   INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_RETIRE_STAT_LIST_VAL ,_param->_nb_inst_retire);
    85   INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_RETIRE_STAT_LIST_ACK ,_param->_nb_inst_retire);
     139 
     140  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_DEPENDENCY_CHECKING_READ_RA           ,_param->_nb_inst_insert);
     141  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RA_PHY    ,_param->_nb_inst_insert);
     142  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_DEPENDENCY_CHECKING_READ_RB           ,_param->_nb_inst_insert);
     143  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RB_PHY    ,_param->_nb_inst_insert);
     144  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_DEPENDENCY_CHECKING_READ_RC           ,_param->_nb_inst_insert);
     145  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RC_PHY    ,_param->_nb_inst_insert);
     146  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_DEPENDENCY_CHECKING_WRITE_RD          ,_param->_nb_inst_insert);
     147  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_LOG    ,_param->_nb_inst_insert);
     148  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD,_param->_nb_inst_insert);
     149  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW,_param->_nb_inst_insert);
     150  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_DEPENDENCY_CHECKING_WRITE_RE          ,_param->_nb_inst_insert);
     151  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_LOG    ,_param->_nb_inst_insert);
     152  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_OLD,_param->_nb_inst_insert);
     153  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_NEW,_param->_nb_inst_insert);
     154
     155  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_STAT_LIST_READ_RA                     ,_param->_nb_inst_insert);
     156  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_STAT_LIST_NUM_REG_RA_PHY              ,_param->_nb_inst_insert);
     157  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_STAT_LIST_READ_RB                     ,_param->_nb_inst_insert);
     158  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_STAT_LIST_NUM_REG_RB_PHY              ,_param->_nb_inst_insert);
     159  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_STAT_LIST_READ_RC                     ,_param->_nb_inst_insert);
     160  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_STAT_LIST_NUM_REG_RC_PHY              ,_param->_nb_inst_insert);
     161  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_STAT_LIST_WRITE_RD                    ,_param->_nb_inst_insert);
     162  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_STAT_LIST_NUM_REG_RD_PHY_NEW          ,_param->_nb_inst_insert);
     163  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_STAT_LIST_WRITE_RE                    ,_param->_nb_inst_insert);
     164  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_STAT_LIST_NUM_REG_RE_PHY_NEW          ,_param->_nb_inst_insert);
     165
     166  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_RAT_WRITE_RD                          ,_param->_nb_inst_insert);
     167  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_RAT_NUM_REG_RD_LOG                    ,_param->_nb_inst_insert);
     168  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_RAT_NUM_REG_RD_PHY_NEW                ,_param->_nb_inst_insert);
     169  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_RAT_WRITE_RE                          ,_param->_nb_inst_insert);
     170  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_RAT_NUM_REG_RE_LOG                    ,_param->_nb_inst_insert);
     171  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_RAT_NUM_REG_RE_PHY_NEW                ,_param->_nb_inst_insert);
     172
     173  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_READ_RA                               ,_param->_nb_inst_insert);
     174  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_NUM_REG_RA_PHY                        ,_param->_nb_inst_insert);
     175  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_READ_RB                               ,_param->_nb_inst_insert);
     176  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_NUM_REG_RB_PHY                        ,_param->_nb_inst_insert);
     177  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_READ_RC                               ,_param->_nb_inst_insert);
     178  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_NUM_REG_RC_PHY                        ,_param->_nb_inst_insert);
     179  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_WRITE_RD                              ,_param->_nb_inst_insert);
     180  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_NUM_REG_RD_LOG                        ,_param->_nb_inst_insert);
     181  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_NUM_REG_RD_PHY_OLD                    ,_param->_nb_inst_insert);
     182  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_NUM_REG_RD_PHY_NEW                    ,_param->_nb_inst_insert);
     183  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_WRITE_RE                              ,_param->_nb_inst_insert);
     184  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_NUM_REG_RE_LOG                        ,_param->_nb_inst_insert);
     185  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_NUM_REG_RE_PHY_OLD                    ,_param->_nb_inst_insert);
     186  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_INSERT_NUM_REG_RE_PHY_NEW                    ,_param->_nb_inst_insert);
     187 
     188  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_RETIRE_VAL          ,_param->_nb_inst_retire);
     189  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_RETIRE_ACK          ,_param->_nb_inst_retire);
     190  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_RETIRE_RAT_VAL      ,_param->_nb_inst_retire);
     191  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_RETIRE_RAT_ACK      ,_param->_nb_inst_retire);
     192  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue,out_RETIRE_STAT_LIST_VAL,_param->_nb_inst_retire);
     193  INSTANCE1_SC_SIGNAL(_Register_translation_unit_Glue, in_RETIRE_STAT_LIST_ACK,_param->_nb_inst_retire);
    86194
    87195  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    187295  delete in_NRESET;
    188296
    189   delete []  in_INSERT_RENAME_VAL    ;
    190   delete [] out_INSERT_RENAME_ACK    ;
    191   delete [] out_INSERT_INSERT_VAL    ;
    192   delete []  in_INSERT_INSERT_ACK    ;
    193   delete [] out_INSERT_RAT_INSERT_VAL;
    194   delete []  in_INSERT_RAT_RENAME_ACK;
    195   delete []  in_INSERT_RAT_INSERT_ACK;
    196   delete [] out_INSERT_FREE_LIST_VAL ;
    197   delete []  in_INSERT_FREE_LIST_ACK ;
    198   delete [] out_INSERT_STAT_LIST_VAL ;
    199   delete []  in_INSERT_STAT_LIST_ACK ;
    200   delete []  in_RETIRE_VAL           ;
    201   delete [] out_RETIRE_ACK           ;
    202   delete [] out_RETIRE_RAT_VAL       ;
    203   delete []  in_RETIRE_RAT_ACK       ;
    204   delete [] out_RETIRE_STAT_LIST_VAL ;
    205   delete []  in_RETIRE_STAT_LIST_ACK ;
     297  DELETE1_SC_SIGNAL( in_INSERT_RENAME_VAL    ,_param->_nb_inst_insert);
     298  DELETE1_SC_SIGNAL(out_INSERT_RENAME_ACK    ,_param->_nb_inst_insert);
     299  DELETE1_SC_SIGNAL(out_INSERT_INSERT_VAL    ,_param->_nb_inst_insert);
     300  DELETE1_SC_SIGNAL( in_INSERT_INSERT_ACK    ,_param->_nb_inst_insert);
     301  DELETE1_SC_SIGNAL(out_INSERT_RAT_INSERT_VAL,_param->_nb_inst_insert);
     302  DELETE1_SC_SIGNAL( in_INSERT_RAT_RENAME_ACK,_param->_nb_inst_insert);
     303  DELETE1_SC_SIGNAL( in_INSERT_RAT_INSERT_ACK,_param->_nb_inst_insert);
     304  DELETE1_SC_SIGNAL(out_INSERT_FREE_LIST_VAL ,_param->_nb_inst_insert);
     305  DELETE1_SC_SIGNAL( in_INSERT_FREE_LIST_ACK ,_param->_nb_inst_insert);
     306  DELETE1_SC_SIGNAL(out_INSERT_STAT_LIST_VAL ,_param->_nb_inst_insert);
     307  DELETE1_SC_SIGNAL( in_INSERT_STAT_LIST_ACK ,_param->_nb_inst_insert);
     308 
     309  DELETE1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_READ_RA           ,_param->_nb_inst_insert);
     310  DELETE1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RA_PHY    ,_param->_nb_inst_insert);
     311  DELETE1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_READ_RB           ,_param->_nb_inst_insert);
     312  DELETE1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RB_PHY    ,_param->_nb_inst_insert);
     313  DELETE1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_READ_RC           ,_param->_nb_inst_insert);
     314  DELETE1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RC_PHY    ,_param->_nb_inst_insert);
     315  DELETE1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_WRITE_RD          ,_param->_nb_inst_insert);
     316  DELETE1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_LOG    ,_param->_nb_inst_insert);
     317  DELETE1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD,_param->_nb_inst_insert);
     318  DELETE1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW,_param->_nb_inst_insert);
     319  DELETE1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_WRITE_RE          ,_param->_nb_inst_insert);
     320  DELETE1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_LOG    ,_param->_nb_inst_insert);
     321  DELETE1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_OLD,_param->_nb_inst_insert);
     322  DELETE1_SC_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_NEW,_param->_nb_inst_insert);
     323
     324  DELETE1_SC_SIGNAL(out_INSERT_STAT_LIST_READ_RA                     ,_param->_nb_inst_insert);
     325  DELETE1_SC_SIGNAL(out_INSERT_STAT_LIST_NUM_REG_RA_PHY              ,_param->_nb_inst_insert);
     326  DELETE1_SC_SIGNAL(out_INSERT_STAT_LIST_READ_RB                     ,_param->_nb_inst_insert);
     327  DELETE1_SC_SIGNAL(out_INSERT_STAT_LIST_NUM_REG_RB_PHY              ,_param->_nb_inst_insert);
     328  DELETE1_SC_SIGNAL(out_INSERT_STAT_LIST_READ_RC                     ,_param->_nb_inst_insert);
     329  DELETE1_SC_SIGNAL(out_INSERT_STAT_LIST_NUM_REG_RC_PHY              ,_param->_nb_inst_insert);
     330  DELETE1_SC_SIGNAL(out_INSERT_STAT_LIST_WRITE_RD                    ,_param->_nb_inst_insert);
     331  DELETE1_SC_SIGNAL(out_INSERT_STAT_LIST_NUM_REG_RD_PHY_NEW          ,_param->_nb_inst_insert);
     332  DELETE1_SC_SIGNAL(out_INSERT_STAT_LIST_WRITE_RE                    ,_param->_nb_inst_insert);
     333  DELETE1_SC_SIGNAL(out_INSERT_STAT_LIST_NUM_REG_RE_PHY_NEW          ,_param->_nb_inst_insert);
     334
     335  DELETE1_SC_SIGNAL(out_INSERT_RAT_WRITE_RD                          ,_param->_nb_inst_insert);
     336  DELETE1_SC_SIGNAL(out_INSERT_RAT_NUM_REG_RD_LOG                    ,_param->_nb_inst_insert);
     337  DELETE1_SC_SIGNAL(out_INSERT_RAT_NUM_REG_RD_PHY_NEW                ,_param->_nb_inst_insert);
     338  DELETE1_SC_SIGNAL(out_INSERT_RAT_WRITE_RE                          ,_param->_nb_inst_insert);
     339  DELETE1_SC_SIGNAL(out_INSERT_RAT_NUM_REG_RE_LOG                    ,_param->_nb_inst_insert);
     340  DELETE1_SC_SIGNAL(out_INSERT_RAT_NUM_REG_RE_PHY_NEW                ,_param->_nb_inst_insert);
     341
     342  DELETE1_SC_SIGNAL(out_INSERT_READ_RA                               ,_param->_nb_inst_insert);
     343  DELETE1_SC_SIGNAL(out_INSERT_NUM_REG_RA_PHY                        ,_param->_nb_inst_insert);
     344  DELETE1_SC_SIGNAL(out_INSERT_READ_RB                               ,_param->_nb_inst_insert);
     345  DELETE1_SC_SIGNAL(out_INSERT_NUM_REG_RB_PHY                        ,_param->_nb_inst_insert);
     346  DELETE1_SC_SIGNAL(out_INSERT_READ_RC                               ,_param->_nb_inst_insert);
     347  DELETE1_SC_SIGNAL(out_INSERT_NUM_REG_RC_PHY                        ,_param->_nb_inst_insert);
     348  DELETE1_SC_SIGNAL(out_INSERT_WRITE_RD                              ,_param->_nb_inst_insert);
     349  DELETE1_SC_SIGNAL(out_INSERT_NUM_REG_RD_LOG                        ,_param->_nb_inst_insert);
     350  DELETE1_SC_SIGNAL(out_INSERT_NUM_REG_RD_PHY_OLD                    ,_param->_nb_inst_insert);
     351  DELETE1_SC_SIGNAL(out_INSERT_NUM_REG_RD_PHY_NEW                    ,_param->_nb_inst_insert);
     352  DELETE1_SC_SIGNAL(out_INSERT_WRITE_RE                              ,_param->_nb_inst_insert);
     353  DELETE1_SC_SIGNAL(out_INSERT_NUM_REG_RE_LOG                        ,_param->_nb_inst_insert);
     354  DELETE1_SC_SIGNAL(out_INSERT_NUM_REG_RE_PHY_OLD                    ,_param->_nb_inst_insert);
     355  DELETE1_SC_SIGNAL(out_INSERT_NUM_REG_RE_PHY_NEW                    ,_param->_nb_inst_insert);
     356 
     357  DELETE1_SC_SIGNAL( in_RETIRE_VAL          ,_param->_nb_inst_retire);
     358  DELETE1_SC_SIGNAL(out_RETIRE_ACK          ,_param->_nb_inst_retire);
     359  DELETE1_SC_SIGNAL(out_RETIRE_RAT_VAL      ,_param->_nb_inst_retire);
     360  DELETE1_SC_SIGNAL( in_RETIRE_RAT_ACK      ,_param->_nb_inst_retire);
     361  DELETE1_SC_SIGNAL(out_RETIRE_STAT_LIST_VAL,_param->_nb_inst_retire);
     362  DELETE1_SC_SIGNAL( in_RETIRE_STAT_LIST_ACK,_param->_nb_inst_retire);
    206363
    207364#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/include/Parameters.h

    r82 r88  
    2727  public : uint32_t _nb_inst_insert;
    2828  public : uint32_t _nb_inst_retire;
     29//public : uint32_t _size_general_register;
     30//public : uint32_t _size_special_register;
    2931   
    3032    //-----[ methods ]-----------------------------------------------------------
    3133  public : Parameters  (uint32_t nb_inst_insert,
    32                         uint32_t nb_inst_retire);
     34                        uint32_t nb_inst_retire,
     35                        uint32_t size_general_register,
     36                        uint32_t size_special_register,
     37                        bool     is_toplevel=false
     38                        );
    3339
    3440//   public : Parameters  (Parameters & param) ;
    3541  public : ~Parameters () ;
     42
     43  public :        void            copy       (void);
    3644
    3745  public :        Parameters_test msg_error  (void);
  • 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

    r82 r88  
    6464
    6565    // ~~~~~[ Interface : "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    66   public    : SC_IN (Tcontrol_t)           **  in_INSERT_RENAME_VAL    ;//[nb_inst_insert]
    67   public    : SC_OUT(Tcontrol_t)           ** out_INSERT_RENAME_ACK    ;//[nb_inst_insert]
    68   public    : SC_OUT(Tcontrol_t)           ** out_INSERT_INSERT_VAL    ;//[nb_inst_insert]
    69   public    : SC_IN (Tcontrol_t)           **  in_INSERT_INSERT_ACK    ;//[nb_inst_insert]
    70   public    : SC_OUT(Tcontrol_t)           ** out_INSERT_RAT_INSERT_VAL;//[nb_inst_insert]
    71   public    : SC_IN (Tcontrol_t)           **  in_INSERT_RAT_RENAME_ACK;//[nb_inst_insert]
    72   public    : SC_IN (Tcontrol_t)           **  in_INSERT_RAT_INSERT_ACK;//[nb_inst_insert]
    73   public    : SC_OUT(Tcontrol_t)           ** out_INSERT_FREE_LIST_VAL ;//[nb_inst_insert]
    74   public    : SC_IN (Tcontrol_t)           **  in_INSERT_FREE_LIST_ACK ;//[nb_inst_insert]
    75   public    : SC_OUT(Tcontrol_t)           ** out_INSERT_STAT_LIST_VAL ;//[nb_inst_insert]
    76   public    : SC_IN (Tcontrol_t)           **  in_INSERT_STAT_LIST_ACK ;//[nb_inst_insert]
     66  public    : SC_IN (Tcontrol_t)           **  in_INSERT_RENAME_VAL                            ;//[nb_inst_insert]
     67  public    : SC_OUT(Tcontrol_t)           ** out_INSERT_RENAME_ACK                            ;//[nb_inst_insert]
     68  public    : SC_OUT(Tcontrol_t)           ** out_INSERT_INSERT_VAL                            ;//[nb_inst_insert]
     69  public    : SC_IN (Tcontrol_t)           **  in_INSERT_INSERT_ACK                            ;//[nb_inst_insert]
     70  public    : SC_OUT(Tcontrol_t)           ** out_INSERT_RAT_INSERT_VAL                        ;//[nb_inst_insert]
     71  public    : SC_IN (Tcontrol_t)           **  in_INSERT_RAT_RENAME_ACK                        ;//[nb_inst_insert]
     72  public    : SC_IN (Tcontrol_t)           **  in_INSERT_RAT_INSERT_ACK                        ;//[nb_inst_insert]
     73  public    : SC_OUT(Tcontrol_t)           ** out_INSERT_FREE_LIST_VAL                         ;//[nb_inst_insert]
     74  public    : SC_IN (Tcontrol_t)           **  in_INSERT_FREE_LIST_ACK                         ;//[nb_inst_insert]
     75  public    : SC_OUT(Tcontrol_t)           ** out_INSERT_STAT_LIST_VAL                         ;//[nb_inst_insert]
     76  public    : SC_IN (Tcontrol_t)           **  in_INSERT_STAT_LIST_ACK                         ;//[nb_inst_insert]
     77
     78  public    : SC_IN (Tcontrol_t        )   **  in_INSERT_DEPENDENCY_CHECKING_READ_RA           ;//[nb_inst_insert]
     79  public    : SC_IN (Tgeneral_address_t)   **  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RA_PHY    ;//[nb_inst_insert]
     80  public    : SC_IN (Tcontrol_t        )   **  in_INSERT_DEPENDENCY_CHECKING_READ_RB           ;//[nb_inst_insert]
     81  public    : SC_IN (Tgeneral_address_t)   **  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RB_PHY    ;//[nb_inst_insert]
     82  public    : SC_IN (Tcontrol_t        )   **  in_INSERT_DEPENDENCY_CHECKING_READ_RC           ;//[nb_inst_insert]
     83  public    : SC_IN (Tspecial_address_t)   **  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RC_PHY    ;//[nb_inst_insert]
     84  public    : SC_IN (Tcontrol_t        )   **  in_INSERT_DEPENDENCY_CHECKING_WRITE_RD          ;//[nb_inst_insert]
     85  public    : SC_IN (Tgeneral_address_t)   **  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_LOG    ;//[nb_inst_insert]
     86  public    : SC_IN (Tgeneral_address_t)   **  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD;//[nb_inst_insert]
     87  public    : SC_IN (Tgeneral_address_t)   **  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW;//[nb_inst_insert]
     88  public    : SC_IN (Tcontrol_t        )   **  in_INSERT_DEPENDENCY_CHECKING_WRITE_RE          ;//[nb_inst_insert]
     89  public    : SC_IN (Tspecial_address_t)   **  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_LOG    ;//[nb_inst_insert]
     90  public    : SC_IN (Tspecial_address_t)   **  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_OLD;//[nb_inst_insert]
     91  public    : SC_IN (Tspecial_address_t)   **  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_NEW;//[nb_inst_insert]
     92
     93  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_STAT_LIST_READ_RA                     ;//[nb_inst_insert]
     94  public    : SC_OUT(Tgeneral_address_t)   ** out_INSERT_STAT_LIST_NUM_REG_RA_PHY              ;//[nb_inst_insert]
     95  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_STAT_LIST_READ_RB                     ;//[nb_inst_insert]
     96  public    : SC_OUT(Tgeneral_address_t)   ** out_INSERT_STAT_LIST_NUM_REG_RB_PHY              ;//[nb_inst_insert]
     97  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_STAT_LIST_READ_RC                     ;//[nb_inst_insert]
     98  public    : SC_OUT(Tspecial_address_t)   ** out_INSERT_STAT_LIST_NUM_REG_RC_PHY              ;//[nb_inst_insert]
     99  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_STAT_LIST_WRITE_RD                    ;//[nb_inst_insert]
     100  public    : SC_OUT(Tgeneral_address_t)   ** out_INSERT_STAT_LIST_NUM_REG_RD_PHY_NEW          ;//[nb_inst_insert]
     101  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_STAT_LIST_WRITE_RE                    ;//[nb_inst_insert]
     102  public    : SC_OUT(Tspecial_address_t)   ** out_INSERT_STAT_LIST_NUM_REG_RE_PHY_NEW          ;//[nb_inst_insert]
     103
     104  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_RAT_WRITE_RD                          ;//[nb_inst_insert]
     105  public    : SC_OUT(Tgeneral_address_t)   ** out_INSERT_RAT_NUM_REG_RD_LOG                    ;//[nb_inst_insert]
     106  public    : SC_OUT(Tgeneral_address_t)   ** out_INSERT_RAT_NUM_REG_RD_PHY_NEW                ;//[nb_inst_insert]
     107  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_RAT_WRITE_RE                          ;//[nb_inst_insert]
     108  public    : SC_OUT(Tspecial_address_t)   ** out_INSERT_RAT_NUM_REG_RE_LOG                    ;//[nb_inst_insert]
     109  public    : SC_OUT(Tspecial_address_t)   ** out_INSERT_RAT_NUM_REG_RE_PHY_NEW                ;//[nb_inst_insert]
     110
     111  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_READ_RA                               ;//[nb_inst_insert]
     112  public    : SC_OUT(Tgeneral_address_t)   ** out_INSERT_NUM_REG_RA_PHY                        ;//[nb_inst_insert]
     113  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_READ_RB                               ;//[nb_inst_insert]
     114  public    : SC_OUT(Tgeneral_address_t)   ** out_INSERT_NUM_REG_RB_PHY                        ;//[nb_inst_insert]
     115  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_READ_RC                               ;//[nb_inst_insert]
     116  public    : SC_OUT(Tspecial_address_t)   ** out_INSERT_NUM_REG_RC_PHY                        ;//[nb_inst_insert]
     117  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_WRITE_RD                              ;//[nb_inst_insert]
     118  public    : SC_OUT(Tgeneral_address_t)   ** out_INSERT_NUM_REG_RD_LOG                        ;//[nb_inst_insert]
     119  public    : SC_OUT(Tgeneral_address_t)   ** out_INSERT_NUM_REG_RD_PHY_OLD                    ;//[nb_inst_insert]
     120  public    : SC_OUT(Tgeneral_address_t)   ** out_INSERT_NUM_REG_RD_PHY_NEW                    ;//[nb_inst_insert]
     121  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_WRITE_RE                              ;//[nb_inst_insert]
     122  public    : SC_OUT(Tspecial_address_t)   ** out_INSERT_NUM_REG_RE_LOG                        ;//[nb_inst_insert]
     123  public    : SC_OUT(Tspecial_address_t)   ** out_INSERT_NUM_REG_RE_PHY_OLD                    ;//[nb_inst_insert]
     124  public    : SC_OUT(Tspecial_address_t)   ** out_INSERT_NUM_REG_RE_PHY_NEW                    ;//[nb_inst_insert]
    77125
    78126    // ~~~~~[ Interface : "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    124172  public  : void        transition                (void);
    125173# endif
     174  public  : void        genMealy_insert_valack    (void);
    126175  public  : void        genMealy_insert           (void);
    127176  public  : void        genMealy_retire           (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/src/Parameters.cpp

    r81 r88  
    2121#define FUNCTION "Register_translation_unit_Glue::Parameters"
    2222  Parameters::Parameters (uint32_t nb_inst_insert,
    23                           uint32_t nb_inst_retire)
     23                          uint32_t nb_inst_retire,
     24                          uint32_t size_general_register,
     25                          uint32_t size_special_register,
     26                          bool     is_toplevel)
    2427  {
    2528    log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"Begin");
    2629
    27     _nb_inst_insert = nb_inst_insert;
    28     _nb_inst_retire = nb_inst_retire;
     30    _nb_inst_insert        = nb_inst_insert;
     31    _nb_inst_retire        = nb_inst_retire;
    2932
    3033    test();
     34
     35    if (is_toplevel)
     36      {
     37        _size_general_register = size_general_register;
     38        _size_special_register = size_special_register;
     39
     40        copy ();
     41      }
     42
    3143    log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"End");
    3244  };
     
    4355#undef  FUNCTION
    4456#define FUNCTION "Register_translation_unit_Glue::~Parameters"
    45   Parameters::~Parameters ()
     57  Parameters::~Parameters (void)
     58  {
     59    log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"Begin");
     60    log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"End");
     61  };
     62
     63#undef  FUNCTION
     64#define FUNCTION "Register_translation_unit_Glue::copy"
     65  void Parameters::copy (void)
    4666  {
    4767    log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/src/Parameters_print.cpp

    r81 r88  
    2828
    2929    xml.balise_open("register_translation_unit_glue");
    30     xml.singleton_begin("nb_inst_insert"); xml.attribut("value",toString(_nb_inst_insert)); xml.singleton_end();
    31     xml.singleton_begin("nb_inst_retire"); xml.attribut("value",toString(_nb_inst_retire)); xml.singleton_end();
     30    xml.singleton_begin("nb_inst_insert       "); xml.attribut("value",toString(_nb_inst_insert       )); xml.singleton_end();
     31    xml.singleton_begin("nb_inst_retire       "); xml.attribut("value",toString(_nb_inst_retire       )); xml.singleton_end();
     32    xml.singleton_begin("size_general_register"); xml.attribut("value",toString(_size_general_register)); xml.singleton_end();
     33    xml.singleton_begin("size_special_register"); xml.attribut("value",toString(_size_special_register)); xml.singleton_end();
    3234    xml.balise_close();
    3335
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/src/Register_translation_unit_Glue.cpp

    r81 r88  
    3939    log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"Begin");
    4040
     41#if DEBUG_Register_translation_unit_Glue == true
     42    log_printf(INFO,Register_translation_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
     43
     44    std::cout << *param << std::endl;
     45#endif   
     46
    4147    log_printf(INFO,Register_translation_unit_Glue,FUNCTION,"Allocation");
    4248
     
    4854
    4955#ifdef STATISTICS
    50     if (_usage & USE_STATISTICS)
     56    if (usage_is_set(_usage,USE_STATISTICS))
    5157      {
    5258        log_printf(INFO,Register_translation_unit_Glue,FUNCTION,"Allocation of statistics");
     
    5763
    5864#ifdef VHDL
    59     if (_usage & USE_VHDL)
     65    if (usage_is_set(_usage,USE_VHDL))
    6066      {
    6167        // generate the vhdl
     
    6773
    6874#ifdef SYSTEMC
    69     if (_usage & USE_SYSTEMC)
     75    if (usage_is_set(_usage,USE_SYSTEMC))
    7076      {
    7177        log_printf(INFO,Register_translation_unit_Glue,FUNCTION,"Method - transition");
     
    8389        SC_METHOD (genMealy_retire);
    8490        dont_initialize ();
    85 //      sensitive << (*(in_CLOCK)).neg();
     91//      sensitive << (*(in_CLOCK)).neg(); // don't need internal register
    8692        for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
    8793          sensitive << (*(in_RETIRE_VAL           [i]))
     
    104110# endif   
    105111
    106         log_printf(INFO,Register_translation_unit_Glue,FUNCTION,"Method - genMealy_insert");
    107 
    108         SC_METHOD (genMealy_insert);
    109         dont_initialize ();
    110 //      sensitive << (*(in_CLOCK)).neg();
     112        log_printf(INFO,Register_translation_unit_Glue,FUNCTION,"Method - genMealy_insert_valack");
     113
     114        SC_METHOD (genMealy_insert_valack);
     115        dont_initialize ();
     116//      sensitive << (*(in_CLOCK)).neg(); // don't need internal register
    111117        for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
    112118          sensitive << (*(in_INSERT_RENAME_VAL     [i]))
     
    152158          }
    153159# endif   
     160
     161        log_printf(INFO,Register_translation_unit_Glue,FUNCTION,"Method - genMealy_insert");
     162
     163        SC_METHOD (genMealy_insert);
     164        dont_initialize ();
     165//      sensitive << (*(in_CLOCK)).neg(); // don't need internal register
     166        for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
     167          sensitive << (*(in_INSERT_DEPENDENCY_CHECKING_READ_RA            [i]))
     168                    << (*(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RA_PHY     [i]))
     169                    << (*(in_INSERT_DEPENDENCY_CHECKING_READ_RB            [i]))
     170                    << (*(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RB_PHY     [i]))
     171                    << (*(in_INSERT_DEPENDENCY_CHECKING_READ_RC            [i]))
     172                    << (*(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RC_PHY     [i]))
     173                    << (*(in_INSERT_DEPENDENCY_CHECKING_WRITE_RD           [i]))
     174                    << (*(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_LOG     [i]))
     175                    << (*(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD [i]))
     176                    << (*(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW [i]))
     177                    << (*(in_INSERT_DEPENDENCY_CHECKING_WRITE_RE           [i]))
     178                    << (*(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_LOG     [i]))
     179                    << (*(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_OLD [i]))
     180                    << (*(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_NEW [i]));
     181       
     182# ifdef SYSTEMCASS_SPECIFIC
     183        // List dependency information
     184# endif   
     185
     186
    154187       
    155188#endif
     
    165198
    166199#ifdef STATISTICS
    167     if (_usage & USE_STATISTICS)
     200    if (usage_is_set(_usage,USE_STATISTICS))
    168201      {
    169202        log_printf(INFO,Register_translation_unit_Glue,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/src/Register_translation_unit_Glue_allocation.cpp

    r81 r88  
    7272      ALLOC1_SIGNAL_OUT(out_INSERT_STAT_LIST_VAL ,"stat_list_val" ,Tcontrol_t,1);
    7373      ALLOC1_SIGNAL_IN ( in_INSERT_STAT_LIST_ACK ,"stat_list_ack" ,Tcontrol_t,1);
     74
     75      ALLOC1_SIGNAL_IN ( in_INSERT_DEPENDENCY_CHECKING_READ_RA           ,"DEPENDENCY_CHECKING_READ_RA"           ,Tcontrol_t        ,1);
     76      ALLOC1_SIGNAL_IN ( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RA_PHY    ,"DEPENDENCY_CHECKING_NUM_REG_RA_PHY"    ,Tgeneral_address_t,_param->_size_general_register      );
     77      ALLOC1_SIGNAL_IN ( in_INSERT_DEPENDENCY_CHECKING_READ_RB           ,"DEPENDENCY_CHECKING_READ_RB"           ,Tcontrol_t        ,1);
     78      ALLOC1_SIGNAL_IN ( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RB_PHY    ,"DEPENDENCY_CHECKING_NUM_REG_RB_PHY"    ,Tgeneral_address_t,_param->_size_general_register      );
     79      ALLOC1_SIGNAL_IN ( in_INSERT_DEPENDENCY_CHECKING_READ_RC           ,"DEPENDENCY_CHECKING_READ_RC"           ,Tcontrol_t        ,1);
     80      ALLOC1_SIGNAL_IN ( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RC_PHY    ,"DEPENDENCY_CHECKING_NUM_REG_RC_PHY"    ,Tspecial_address_t,_param->_size_special_register      );
     81      ALLOC1_SIGNAL_IN ( in_INSERT_DEPENDENCY_CHECKING_WRITE_RD          ,"DEPENDENCY_CHECKING_WRITE_RD"          ,Tcontrol_t        ,1);
     82      ALLOC1_SIGNAL_IN ( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_LOG    ,"DEPENDENCY_CHECKING_NUM_REG_RD_LOG"    ,Tgeneral_address_t,_param->_size_general_register_logic);
     83      ALLOC1_SIGNAL_IN ( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD,"DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD",Tgeneral_address_t,_param->_size_general_register      );
     84      ALLOC1_SIGNAL_IN ( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW,"DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW",Tgeneral_address_t,_param->_size_general_register      );
     85      ALLOC1_SIGNAL_IN ( in_INSERT_DEPENDENCY_CHECKING_WRITE_RE          ,"DEPENDENCY_CHECKING_WRITE_RE"          ,Tcontrol_t        ,1);
     86      ALLOC1_SIGNAL_IN ( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_LOG    ,"DEPENDENCY_CHECKING_NUM_REG_RE_LOG"    ,Tspecial_address_t,_param->_size_special_register_logic);
     87      ALLOC1_SIGNAL_IN ( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_OLD,"DEPENDENCY_CHECKING_NUM_REG_RE_PHY_OLD",Tspecial_address_t,_param->_size_special_register      );
     88      ALLOC1_SIGNAL_IN ( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_NEW,"DEPENDENCY_CHECKING_NUM_REG_RE_PHY_NEW",Tspecial_address_t,_param->_size_special_register      );
     89
     90      ALLOC1_SIGNAL_OUT(out_INSERT_STAT_LIST_READ_RA                     ,"STAT_LIST_READ_RA"                     ,Tcontrol_t        ,1);
     91      ALLOC1_SIGNAL_OUT(out_INSERT_STAT_LIST_NUM_REG_RA_PHY              ,"STAT_LIST_NUM_REG_RA_PHY"              ,Tgeneral_address_t,_param->_size_general_register      );
     92      ALLOC1_SIGNAL_OUT(out_INSERT_STAT_LIST_READ_RB                     ,"STAT_LIST_READ_RB"                     ,Tcontrol_t        ,1);
     93      ALLOC1_SIGNAL_OUT(out_INSERT_STAT_LIST_NUM_REG_RB_PHY              ,"STAT_LIST_NUM_REG_RB_PHY"              ,Tgeneral_address_t,_param->_size_general_register      );
     94      ALLOC1_SIGNAL_OUT(out_INSERT_STAT_LIST_READ_RC                     ,"STAT_LIST_READ_RC"                     ,Tcontrol_t        ,1);
     95      ALLOC1_SIGNAL_OUT(out_INSERT_STAT_LIST_NUM_REG_RC_PHY              ,"STAT_LIST_NUM_REG_RC_PHY"              ,Tspecial_address_t,_param->_size_special_register      );
     96      ALLOC1_SIGNAL_OUT(out_INSERT_STAT_LIST_WRITE_RD                    ,"STAT_LIST_WRITE_RD"                    ,Tcontrol_t        ,1);
     97      ALLOC1_SIGNAL_OUT(out_INSERT_STAT_LIST_NUM_REG_RD_PHY_NEW          ,"STAT_LIST_NUM_REG_RD_PHY_NEW"          ,Tgeneral_address_t,_param->_size_general_register      );
     98      ALLOC1_SIGNAL_OUT(out_INSERT_STAT_LIST_WRITE_RE                    ,"STAT_LIST_WRITE_RE"                    ,Tcontrol_t        ,1);
     99      ALLOC1_SIGNAL_OUT(out_INSERT_STAT_LIST_NUM_REG_RE_PHY_NEW          ,"STAT_LIST_NUM_REG_RE_PHY_NEW"          ,Tspecial_address_t,_param->_size_special_register      );
     100
     101      ALLOC1_SIGNAL_OUT(out_INSERT_RAT_WRITE_RD                          ,"RAT_WRITE_RD"                          ,Tcontrol_t        ,1);
     102      ALLOC1_SIGNAL_OUT(out_INSERT_RAT_NUM_REG_RD_LOG                    ,"RAT_NUM_REG_RD_LOG"                    ,Tgeneral_address_t,_param->_size_general_register_logic);
     103      ALLOC1_SIGNAL_OUT(out_INSERT_RAT_NUM_REG_RD_PHY_NEW                ,"RAT_NUM_REG_RD_PHY_NEW"                ,Tgeneral_address_t,_param->_size_general_register      );
     104      ALLOC1_SIGNAL_OUT(out_INSERT_RAT_WRITE_RE                          ,"RAT_WRITE_RE"                          ,Tcontrol_t        ,1);
     105      ALLOC1_SIGNAL_OUT(out_INSERT_RAT_NUM_REG_RE_LOG                    ,"RAT_NUM_REG_RE_LOG"                    ,Tspecial_address_t,_param->_size_special_register_logic);
     106      ALLOC1_SIGNAL_OUT(out_INSERT_RAT_NUM_REG_RE_PHY_NEW                ,"RAT_NUM_REG_RE_PHY_NEW"                ,Tspecial_address_t,_param->_size_special_register      );
     107
     108      ALLOC1_SIGNAL_OUT(out_INSERT_READ_RA                               ,"READ_RA"                               ,Tcontrol_t        ,1);
     109      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RA_PHY                        ,"NUM_REG_RA_PHY"                        ,Tgeneral_address_t,_param->_size_general_register      );
     110      ALLOC1_SIGNAL_OUT(out_INSERT_READ_RB                               ,"READ_RB"                               ,Tcontrol_t        ,1);
     111      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RB_PHY                        ,"NUM_REG_RB_PHY"                        ,Tgeneral_address_t,_param->_size_general_register      );
     112      ALLOC1_SIGNAL_OUT(out_INSERT_READ_RC                               ,"READ_RC"                               ,Tcontrol_t        ,1);
     113      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RC_PHY                        ,"NUM_REG_RC_PHY"                        ,Tspecial_address_t,_param->_size_special_register      );
     114      ALLOC1_SIGNAL_OUT(out_INSERT_WRITE_RD                              ,"WRITE_RD"                              ,Tcontrol_t        ,1);
     115      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RD_LOG                        ,"NUM_REG_RD_LOG"                        ,Tgeneral_address_t,_param->_size_general_register_logic);
     116      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RD_PHY_OLD                    ,"NUM_REG_RD_PHY_OLD"                    ,Tgeneral_address_t,_param->_size_general_register      );
     117      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RD_PHY_NEW                    ,"NUM_REG_RD_PHY_NEW"                    ,Tgeneral_address_t,_param->_size_general_register      );
     118      ALLOC1_SIGNAL_OUT(out_INSERT_WRITE_RE                              ,"WRITE_RE"                              ,Tcontrol_t        ,1);
     119      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RE_LOG                        ,"NUM_REG_RE_LOG"                        ,Tspecial_address_t,_param->_size_special_register_logic);
     120      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RE_PHY_OLD                    ,"NUM_REG_RE_PHY_OLD"                    ,Tspecial_address_t,_param->_size_special_register      );
     121      ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RE_PHY_NEW                    ,"NUM_REG_RE_PHY_NEW"                    ,Tspecial_address_t,_param->_size_special_register      );
    74122    }
    75123
     
    89137
    90138#ifdef POSITION
    91     _component->generate_file();
     139    if (usage_is_set(_usage,USE_POSITION))
     140      _component->generate_file();
    92141#endif
    93142
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/src/Register_translation_unit_Glue_deallocation.cpp

    r81 r88  
    77
    88#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/include/Register_translation_unit_Glue.h"
     9#include "Behavioural/include/Allocation.h"
    910
    1011namespace morpheo                    {
     
    2425    log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"Begin");
    2526
    26     if (_usage & USE_SYSTEMC)
     27    if (usage_is_set(_usage,USE_SYSTEMC))
    2728      {
    2829        delete     in_CLOCK ;
    2930        delete     in_NRESET;
    3031
    31         delete []  in_INSERT_RENAME_VAL    ;
    32         delete [] out_INSERT_RENAME_ACK    ;
    33         delete [] out_INSERT_INSERT_VAL    ;
    34         delete []  in_INSERT_INSERT_ACK    ;
    35         delete [] out_INSERT_RAT_INSERT_VAL;
    36         delete []  in_INSERT_RAT_RENAME_ACK;
    37         delete []  in_INSERT_RAT_INSERT_ACK;
    38         delete [] out_INSERT_FREE_LIST_VAL ;
    39         delete []  in_INSERT_FREE_LIST_ACK ;
    40         delete [] out_INSERT_STAT_LIST_VAL ;
    41         delete []  in_INSERT_STAT_LIST_ACK ;
     32        DELETE1_SIGNAL( in_INSERT_RENAME_VAL    ,_param->_nb_inst_insert,1);
     33        DELETE1_SIGNAL(out_INSERT_RENAME_ACK    ,_param->_nb_inst_insert,1);
     34        DELETE1_SIGNAL(out_INSERT_INSERT_VAL    ,_param->_nb_inst_insert,1);
     35        DELETE1_SIGNAL( in_INSERT_INSERT_ACK    ,_param->_nb_inst_insert,1);
     36        DELETE1_SIGNAL(out_INSERT_RAT_INSERT_VAL,_param->_nb_inst_insert,1);
     37        DELETE1_SIGNAL( in_INSERT_RAT_RENAME_ACK,_param->_nb_inst_insert,1);
     38        DELETE1_SIGNAL( in_INSERT_RAT_INSERT_ACK,_param->_nb_inst_insert,1);
     39        DELETE1_SIGNAL(out_INSERT_FREE_LIST_VAL ,_param->_nb_inst_insert,1);
     40        DELETE1_SIGNAL( in_INSERT_FREE_LIST_ACK ,_param->_nb_inst_insert,1);
     41        DELETE1_SIGNAL(out_INSERT_STAT_LIST_VAL ,_param->_nb_inst_insert,1);
     42        DELETE1_SIGNAL( in_INSERT_STAT_LIST_ACK ,_param->_nb_inst_insert,1);
     43       
     44        DELETE1_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_READ_RA           ,_param->_nb_inst_insert,1);
     45        DELETE1_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RA_PHY    ,_param->_nb_inst_insert,_param->_size_general_register      );
     46        DELETE1_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_READ_RB           ,_param->_nb_inst_insert,1);
     47        DELETE1_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RB_PHY    ,_param->_nb_inst_insert,_param->_size_general_register      );
     48        DELETE1_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_READ_RC           ,_param->_nb_inst_insert,1);
     49        DELETE1_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RC_PHY    ,_param->_nb_inst_insert,_param->_size_special_register      );
     50        DELETE1_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_WRITE_RD          ,_param->_nb_inst_insert,1);
     51        DELETE1_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_LOG    ,_param->_nb_inst_insert,_param->_size_general_register_logic);
     52        DELETE1_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD,_param->_nb_inst_insert,_param->_size_general_register      );
     53        DELETE1_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW,_param->_nb_inst_insert,_param->_size_general_register      );
     54        DELETE1_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_WRITE_RE          ,_param->_nb_inst_insert,1);
     55        DELETE1_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_LOG    ,_param->_nb_inst_insert,_param->_size_special_register_logic);
     56        DELETE1_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_OLD,_param->_nb_inst_insert,_param->_size_special_register      );
     57        DELETE1_SIGNAL( in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_NEW,_param->_nb_inst_insert,_param->_size_special_register      );
     58       
     59        DELETE1_SIGNAL(out_INSERT_STAT_LIST_READ_RA                     ,_param->_nb_inst_insert,1);
     60        DELETE1_SIGNAL(out_INSERT_STAT_LIST_NUM_REG_RA_PHY              ,_param->_nb_inst_insert,_param->_size_general_register      );
     61        DELETE1_SIGNAL(out_INSERT_STAT_LIST_READ_RB                     ,_param->_nb_inst_insert,1);
     62        DELETE1_SIGNAL(out_INSERT_STAT_LIST_NUM_REG_RB_PHY              ,_param->_nb_inst_insert,_param->_size_general_register      );
     63        DELETE1_SIGNAL(out_INSERT_STAT_LIST_READ_RC                     ,_param->_nb_inst_insert,1);
     64        DELETE1_SIGNAL(out_INSERT_STAT_LIST_NUM_REG_RC_PHY              ,_param->_nb_inst_insert,_param->_size_special_register      );
     65        DELETE1_SIGNAL(out_INSERT_STAT_LIST_WRITE_RD                    ,_param->_nb_inst_insert,1);
     66        DELETE1_SIGNAL(out_INSERT_STAT_LIST_NUM_REG_RD_PHY_NEW          ,_param->_nb_inst_insert,_param->_size_general_register      );
     67        DELETE1_SIGNAL(out_INSERT_STAT_LIST_WRITE_RE                    ,_param->_nb_inst_insert,1);
     68        DELETE1_SIGNAL(out_INSERT_STAT_LIST_NUM_REG_RE_PHY_NEW          ,_param->_nb_inst_insert,_param->_size_special_register      );
     69       
     70        DELETE1_SIGNAL(out_INSERT_RAT_WRITE_RD                          ,_param->_nb_inst_insert,1);
     71        DELETE1_SIGNAL(out_INSERT_RAT_NUM_REG_RD_LOG                    ,_param->_nb_inst_insert,_param->_size_general_register_logic);
     72        DELETE1_SIGNAL(out_INSERT_RAT_NUM_REG_RD_PHY_NEW                ,_param->_nb_inst_insert,_param->_size_general_register      );
     73        DELETE1_SIGNAL(out_INSERT_RAT_WRITE_RE                          ,_param->_nb_inst_insert,1);
     74        DELETE1_SIGNAL(out_INSERT_RAT_NUM_REG_RE_LOG                    ,_param->_nb_inst_insert,_param->_size_special_register_logic);
     75        DELETE1_SIGNAL(out_INSERT_RAT_NUM_REG_RE_PHY_NEW                ,_param->_nb_inst_insert,_param->_size_special_register      );
     76       
     77        DELETE1_SIGNAL(out_INSERT_READ_RA                               ,_param->_nb_inst_insert,1);
     78        DELETE1_SIGNAL(out_INSERT_NUM_REG_RA_PHY                        ,_param->_nb_inst_insert,_param->_size_general_register      );
     79        DELETE1_SIGNAL(out_INSERT_READ_RB                               ,_param->_nb_inst_insert,1);
     80        DELETE1_SIGNAL(out_INSERT_NUM_REG_RB_PHY                        ,_param->_nb_inst_insert,_param->_size_general_register      );
     81        DELETE1_SIGNAL(out_INSERT_READ_RC                               ,_param->_nb_inst_insert,1);
     82        DELETE1_SIGNAL(out_INSERT_NUM_REG_RC_PHY                        ,_param->_nb_inst_insert,_param->_size_special_register      );
     83        DELETE1_SIGNAL(out_INSERT_WRITE_RD                              ,_param->_nb_inst_insert,1);
     84        DELETE1_SIGNAL(out_INSERT_NUM_REG_RD_LOG                        ,_param->_nb_inst_insert,_param->_size_general_register_logic);
     85        DELETE1_SIGNAL(out_INSERT_NUM_REG_RD_PHY_OLD                    ,_param->_nb_inst_insert,_param->_size_general_register      );
     86        DELETE1_SIGNAL(out_INSERT_NUM_REG_RD_PHY_NEW                    ,_param->_nb_inst_insert,_param->_size_general_register      );
     87        DELETE1_SIGNAL(out_INSERT_WRITE_RE                              ,_param->_nb_inst_insert,1);
     88        DELETE1_SIGNAL(out_INSERT_NUM_REG_RE_LOG                        ,_param->_nb_inst_insert,_param->_size_special_register_logic);
     89        DELETE1_SIGNAL(out_INSERT_NUM_REG_RE_PHY_OLD                    ,_param->_nb_inst_insert,_param->_size_special_register      );
     90        DELETE1_SIGNAL(out_INSERT_NUM_REG_RE_PHY_NEW                    ,_param->_nb_inst_insert,_param->_size_special_register      );
     91       
     92        DELETE1_SIGNAL( in_RETIRE_VAL          ,_param->_nb_inst_retire,1);
     93        DELETE1_SIGNAL(out_RETIRE_ACK          ,_param->_nb_inst_retire,1);
     94        DELETE1_SIGNAL(out_RETIRE_RAT_VAL      ,_param->_nb_inst_retire,1);
     95        DELETE1_SIGNAL( in_RETIRE_RAT_ACK      ,_param->_nb_inst_retire,1);
     96        DELETE1_SIGNAL(out_RETIRE_STAT_LIST_VAL,_param->_nb_inst_retire,1);
     97        DELETE1_SIGNAL( in_RETIRE_STAT_LIST_ACK,_param->_nb_inst_retire,1);
    4298
    43         delete []  in_RETIRE_VAL           ;
    44         delete [] out_RETIRE_ACK           ;
    45         delete [] out_RETIRE_RAT_VAL       ;
    46         delete []  in_RETIRE_RAT_ACK       ;
    47         delete [] out_RETIRE_STAT_LIST_VAL ;
    48         delete []  in_RETIRE_STAT_LIST_ACK ;
    4999      }
    50100    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/src/Register_translation_unit_Glue_end_cycle.cpp

    r81 r88  
    2626
    2727#ifdef STATISTICS
    28     _stat->end_cycle();
     28    if (usage_is_set(_usage,USE_STATISTICS))
     29      _stat->end_cycle();
    2930#endif   
    3031
     
    3233    // Evaluation before read the ouput signal
    3334//  sc_start(0);
    34     _interfaces->testbench();
     35    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     36      _interfaces->testbench();
    3537#endif
    3638
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/src/Register_translation_unit_Glue_genMealy_insert.cpp

    r81 r88  
    2323  void Register_translation_unit_Glue::genMealy_insert (void)
    2424  {
    25     log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"Begin");
     25    log_begin(Register_translation_unit_Glue,FUNCTION);
     26    log_function(Register_translation_unit_Glue,FUNCTION,_name.c_str());
    2627
    2728    for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
    2829      {
    29         Tcontrol_t rename_val     = PORT_READ(in_INSERT_RENAME_VAL     [i]);
    30         Tcontrol_t insert_ack     = PORT_READ(in_INSERT_INSERT_ACK     [i]);
    31         Tcontrol_t rat_rename_ack = PORT_READ(in_INSERT_RAT_RENAME_ACK [i]);
    32         Tcontrol_t rat_insert_ack = PORT_READ(in_INSERT_RAT_INSERT_ACK [i]);
    33         Tcontrol_t free_list_ack  = PORT_READ(in_INSERT_FREE_LIST_ACK  [i]);
    34         Tcontrol_t stat_list_ack  = PORT_READ(in_INSERT_STAT_LIST_ACK  [i]);
     30        Tcontrol_t         READ_RA            = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_READ_RA            [i]);
     31        Tgeneral_address_t NUM_REG_RA_PHY     = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RA_PHY     [i]);
     32        Tcontrol_t         READ_RB            = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_READ_RB            [i]);
     33        Tgeneral_address_t NUM_REG_RB_PHY     = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RB_PHY     [i]);
     34        Tcontrol_t         READ_RC            = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_READ_RC            [i]);
     35        Tspecial_address_t NUM_REG_RC_PHY     = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RC_PHY     [i]);
     36        Tcontrol_t         WRITE_RD           = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_WRITE_RD           [i]);
     37        Tgeneral_address_t NUM_REG_RD_LOG     = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_LOG     [i]);
     38        Tgeneral_address_t NUM_REG_RD_PHY_OLD = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD [i]);
     39        Tgeneral_address_t NUM_REG_RD_PHY_NEW = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW [i]);
     40        Tcontrol_t         WRITE_RE           = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_WRITE_RE           [i]);
     41        Tspecial_address_t NUM_REG_RE_LOG     = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_LOG     [i]);
     42        Tspecial_address_t NUM_REG_RE_PHY_OLD = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_OLD [i]);
     43        Tspecial_address_t NUM_REG_RE_PHY_NEW = PORT_READ(in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_NEW [i]);
    3544
    36         PORT_WRITE(out_INSERT_RENAME_ACK     [i], (insert_ack     and
    37                                                    rat_rename_ack and
    38                                                    rat_insert_ack and
    39                                                    free_list_ack  and
    40                                                    stat_list_ack  ));
    41         PORT_WRITE(out_INSERT_INSERT_VAL     [i], (rename_val     and
    42                                                    rat_rename_ack and
    43                                                    rat_insert_ack and
    44                                                    free_list_ack  and
    45                                                    stat_list_ack  ));
    46         PORT_WRITE(out_INSERT_RAT_INSERT_VAL [i], (rename_val     and
    47                                                    insert_ack     and
    48                                                    rat_rename_ack and
    49                                                    free_list_ack  and
    50                                                    stat_list_ack  ));
    51         PORT_WRITE(out_INSERT_FREE_LIST_VAL  [i], (rename_val     and
    52                                                    insert_ack     and
    53                                                    rat_rename_ack and
    54                                                    rat_insert_ack and
    55                                                    stat_list_ack  ));
    56         PORT_WRITE(out_INSERT_STAT_LIST_VAL  [i], (rename_val     and
    57                                                    insert_ack     and
    58                                                    rat_rename_ack and
    59                                                    rat_insert_ack and
    60                                                    free_list_ack  ));
     45        PORT_WRITE(out_INSERT_STAT_LIST_READ_RA            [i], READ_RA           );
     46        PORT_WRITE(out_INSERT_STAT_LIST_NUM_REG_RA_PHY     [i], NUM_REG_RA_PHY    );
     47        PORT_WRITE(out_INSERT_STAT_LIST_READ_RB            [i], READ_RB           );
     48        PORT_WRITE(out_INSERT_STAT_LIST_NUM_REG_RB_PHY     [i], NUM_REG_RB_PHY    );
     49        PORT_WRITE(out_INSERT_STAT_LIST_READ_RC            [i], READ_RC           );
     50        PORT_WRITE(out_INSERT_STAT_LIST_NUM_REG_RC_PHY     [i], NUM_REG_RC_PHY    );
     51        PORT_WRITE(out_INSERT_STAT_LIST_WRITE_RD           [i], WRITE_RD          );
     52        PORT_WRITE(out_INSERT_STAT_LIST_NUM_REG_RD_PHY_NEW [i], NUM_REG_RD_PHY_NEW);
     53        PORT_WRITE(out_INSERT_STAT_LIST_WRITE_RE           [i], WRITE_RE          );
     54        PORT_WRITE(out_INSERT_STAT_LIST_NUM_REG_RE_PHY_NEW [i], NUM_REG_RE_PHY_NEW);
     55       
     56        PORT_WRITE(out_INSERT_RAT_WRITE_RD                 [i], WRITE_RD          );
     57        PORT_WRITE(out_INSERT_RAT_NUM_REG_RD_LOG           [i], NUM_REG_RD_LOG    );
     58        PORT_WRITE(out_INSERT_RAT_NUM_REG_RD_PHY_NEW       [i], NUM_REG_RD_PHY_NEW);
     59        PORT_WRITE(out_INSERT_RAT_WRITE_RE                 [i], WRITE_RE          );
     60        PORT_WRITE(out_INSERT_RAT_NUM_REG_RE_LOG           [i], NUM_REG_RE_LOG    );
     61        PORT_WRITE(out_INSERT_RAT_NUM_REG_RE_PHY_NEW       [i], NUM_REG_RE_PHY_NEW);
     62       
     63        PORT_WRITE(out_INSERT_READ_RA                      [i], READ_RA           );
     64        PORT_WRITE(out_INSERT_NUM_REG_RA_PHY               [i], NUM_REG_RA_PHY    );
     65        PORT_WRITE(out_INSERT_READ_RB                      [i], READ_RB           );
     66        PORT_WRITE(out_INSERT_NUM_REG_RB_PHY               [i], NUM_REG_RB_PHY    );
     67        PORT_WRITE(out_INSERT_READ_RC                      [i], READ_RC           );
     68        PORT_WRITE(out_INSERT_NUM_REG_RC_PHY               [i], NUM_REG_RC_PHY    );
     69        PORT_WRITE(out_INSERT_WRITE_RD                     [i], WRITE_RD          );
     70        PORT_WRITE(out_INSERT_NUM_REG_RD_LOG               [i], NUM_REG_RD_LOG    );
     71        PORT_WRITE(out_INSERT_NUM_REG_RD_PHY_OLD           [i], NUM_REG_RD_PHY_OLD);
     72        PORT_WRITE(out_INSERT_NUM_REG_RD_PHY_NEW           [i], NUM_REG_RD_PHY_NEW);
     73        PORT_WRITE(out_INSERT_WRITE_RE                     [i], WRITE_RE          );
     74        PORT_WRITE(out_INSERT_NUM_REG_RE_LOG               [i], NUM_REG_RE_LOG    );
     75        PORT_WRITE(out_INSERT_NUM_REG_RE_PHY_OLD           [i], NUM_REG_RE_PHY_OLD);
     76        PORT_WRITE(out_INSERT_NUM_REG_RE_PHY_NEW           [i], NUM_REG_RE_PHY_NEW);
    6177      }
    6278
    63     log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"End");
     79    log_end(Register_translation_unit_Glue,FUNCTION);
    6480  };
    6581
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/src/Register_translation_unit_Glue_genMealy_retire.cpp

    r81 r88  
    2323  void Register_translation_unit_Glue::genMealy_retire (void)
    2424  {
    25     log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"Begin");
     25    log_begin(Register_translation_unit_Glue,FUNCTION);
     26    log_function(Register_translation_unit_Glue,FUNCTION,_name.c_str());
    2627
    2728    for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
     
    3637      }
    3738
    38     log_printf(FUNC,Register_translation_unit_Glue,FUNCTION,"End");
     39    log_end(Register_translation_unit_Glue,FUNCTION);
    3940  };
    4041
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Register_translation_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/SelfTest/src/main.cpp

    r81 r88  
    6565         _nb_reg_free           ,
    6666         _nb_bank               ,
    67          _size_read_counter     );
     67         _size_read_counter     ,
     68         true //is_toplevel
     69         );
    6870     
    6971      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/SelfTest/src/test.cpp

    r82 r88  
    2323#endif
    2424
     25  Tusage_t _usage = USE_ALL;
     26
     27//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     28//   _usage = usage_unset(_usage,USE_VHDL                 );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     31//   _usage = usage_unset(_usage,USE_POSITION             );
     32   _usage = usage_unset(_usage,USE_STATISTICS           );
     33//   _usage = usage_unset(_usage,USE_INFORMATION          );
     34
    2535  Register_translation_unit * _Register_translation_unit = new Register_translation_unit
    2636    (name.c_str(),
     
    2939#endif
    3040     _param,
    31      USE_ALL);
     41     _usage);
    3242 
    3343#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Stat_List_unit_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/main.cpp

    r81 r88  
    6868         _nb_reg_free           ,
    6969         _nb_bank               ,
    70          _size_counter          );
     70         _size_counter          ,
     71         true //is_toplevel
     72         );
    7173     
    7274      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/test.cpp

    r82 r88  
    3434#endif
    3535
     36  Tusage_t _usage = USE_ALL;
     37
     38//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     39//   _usage = usage_unset(_usage,USE_VHDL                 );
     40//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     41//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     42//   _usage = usage_unset(_usage,USE_POSITION             );
     43//   _usage = usage_unset(_usage,USE_STATISTICS           );
     44//   _usage = usage_unset(_usage,USE_INFORMATION          );
     45
    3646  Stat_List_unit * _Stat_List_unit = new Stat_List_unit
    3747    (name.c_str(),
     
    4050#endif
    4151     _param,
    42      USE_ALL);
     52     _usage);
    4353 
    4454#ifdef SYSTEMC
     
    7282  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RC_PHY    ," in_RETIRE_NUM_REG_RC_PHY    ",Tspecial_address_t,_param->_nb_inst_retire);
    7383  ALLOC1_SC_SIGNAL( in_RETIRE_WRITE_RD          ," in_RETIRE_WRITE_RD          ",Tcontrol_t        ,_param->_nb_inst_retire);
     84  ALLOC1_SC_SIGNAL( in_RETIRE_RESTORE_RD_PHY_OLD," in_RETIRE_RESTORE_RD_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
    7485  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_OLD," in_RETIRE_NUM_REG_RD_PHY_OLD",Tgeneral_address_t,_param->_nb_inst_retire);
    7586  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_NEW," in_RETIRE_NUM_REG_RD_PHY_NEW",Tgeneral_address_t,_param->_nb_inst_retire);
    7687  ALLOC1_SC_SIGNAL( in_RETIRE_WRITE_RE          ," in_RETIRE_WRITE_RE          ",Tcontrol_t        ,_param->_nb_inst_retire);
     88  ALLOC1_SC_SIGNAL( in_RETIRE_RESTORE_RE_PHY_OLD," in_RETIRE_RESTORE_RE_PHY_OLD",Tcontrol_t        ,_param->_nb_inst_retire);
    7789  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_OLD," in_RETIRE_NUM_REG_RE_PHY_OLD",Tspecial_address_t,_param->_nb_inst_retire);
    7890  ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_NEW," in_RETIRE_NUM_REG_RE_PHY_NEW",Tspecial_address_t,_param->_nb_inst_retire);
     
    116128  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RC_PHY    ,_param->_nb_inst_retire);
    117129  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_WRITE_RD          ,_param->_nb_inst_retire);
     130  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_inst_retire);
    118131  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RD_PHY_OLD,_param->_nb_inst_retire);
    119132  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RD_PHY_NEW,_param->_nb_inst_retire);
    120133  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_WRITE_RE          ,_param->_nb_inst_retire);
     134  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_inst_retire);
    121135  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RE_PHY_OLD,_param->_nb_inst_retire);
    122136  INSTANCE1_SC_SIGNAL(_Stat_List_unit, in_RETIRE_NUM_REG_RE_PHY_NEW,_param->_nb_inst_retire);
     
    347361              in_RETIRE_NUM_REG_RC_PHY     [i]->write(rc);
    348362              in_RETIRE_WRITE_RD           [i]->write(write_rd);
     363              in_RETIRE_RESTORE_RD_PHY_OLD [i]->write(0);
    349364              in_RETIRE_NUM_REG_RD_PHY_OLD [i]->write(rd_old);
    350365              in_RETIRE_NUM_REG_RD_PHY_NEW [i]->write(rd_new);
    351366              in_RETIRE_WRITE_RE           [i]->write(write_re);
     367              in_RETIRE_RESTORE_RE_PHY_OLD [i]->write(0);
    352368              in_RETIRE_NUM_REG_RE_PHY_OLD [i]->write(re_old);
    353369              in_RETIRE_NUM_REG_RE_PHY_NEW [i]->write(re_new);
     
    486502            if (in_RETIRE_VAL [i]->read() and out_RETIRE_ACK [i]->read())
    487503              {
    488                 Tcontrol_t         read_ra  = in_RETIRE_READ_RA            [i]->read();
    489                 Tgeneral_address_t ra       = in_RETIRE_NUM_REG_RA_PHY     [i]->read();
    490                 Tcontrol_t         read_rb  = in_RETIRE_READ_RB            [i]->read();
    491                 Tgeneral_address_t rb       = in_RETIRE_NUM_REG_RB_PHY     [i]->read();
    492                 Tcontrol_t         read_rc  = in_RETIRE_READ_RC            [i]->read();
    493                 Tspecial_address_t rc       = in_RETIRE_NUM_REG_RC_PHY     [i]->read();
    494                 Tcontrol_t         write_rd = in_RETIRE_WRITE_RD           [i]->read();
    495                 Tgeneral_address_t rd_old   = in_RETIRE_NUM_REG_RD_PHY_OLD [i]->read();
    496                 Tgeneral_address_t rd_new   = in_RETIRE_NUM_REG_RD_PHY_NEW [i]->read();
    497                 Tcontrol_t         write_re = in_RETIRE_WRITE_RE           [i]->read();
    498                 Tgeneral_address_t re_old   = in_RETIRE_NUM_REG_RE_PHY_OLD [i]->read();
    499                 Tgeneral_address_t re_new   = in_RETIRE_NUM_REG_RE_PHY_NEW [i]->read();         
     504                Tcontrol_t         read_ra        = in_RETIRE_READ_RA            [i]->read();
     505                Tgeneral_address_t ra             = in_RETIRE_NUM_REG_RA_PHY     [i]->read();
     506                Tcontrol_t         read_rb        = in_RETIRE_READ_RB            [i]->read();
     507                Tgeneral_address_t rb             = in_RETIRE_NUM_REG_RB_PHY     [i]->read();
     508                Tcontrol_t         read_rc        = in_RETIRE_READ_RC            [i]->read();
     509                Tspecial_address_t rc             = in_RETIRE_NUM_REG_RC_PHY     [i]->read();
     510                Tcontrol_t         write_rd       = in_RETIRE_WRITE_RD           [i]->read();
     511                Tcontrol_t         restore_rd_old = in_RETIRE_RESTORE_RD_PHY_OLD [i]->read();
     512                Tgeneral_address_t rd_old         = in_RETIRE_NUM_REG_RD_PHY_OLD [i]->read();
     513                Tgeneral_address_t rd_new         = in_RETIRE_NUM_REG_RD_PHY_NEW [i]->read();
     514                Tcontrol_t         write_re       = in_RETIRE_WRITE_RE           [i]->read();
     515                Tcontrol_t         restore_re_old = in_RETIRE_RESTORE_RE_PHY_OLD [i]->read();
     516                Tgeneral_address_t re_old         = in_RETIRE_NUM_REG_RE_PHY_OLD [i]->read();
     517                Tgeneral_address_t re_new         = in_RETIRE_NUM_REG_RE_PHY_NEW [i]->read();           
    500518
    501519                LABEL("RETIRE [%d] - Accepted",i);
     
    519537                LABEL("   * status[%d]._counter  : %d",rc,spr_status[rc]._counter );
    520538                LABEL(" * read_rd          : %d",write_rd);
     539                LABEL(" * restore_rd_old   : %d",restore_rd_old);
    521540                LABEL(" * reg_rd_old       : %d",rd_old  );
    522541                LABEL("   * status[%d]._is_free  : %d",rd_old,spr_status[rd_old]._is_free );
     
    530549                LABEL("   * status[%d]._counter  : %d",rd_new,spr_status[rd_new]._counter );
    531550                LABEL(" * read_re          : %d",write_re);
     551                LABEL(" * restore_re_old   : %d",restore_re_old);
    532552                LABEL(" * reg_re_old       : %d",re_old  );
    533553                LABEL("   * status[%d]._is_free  : %d",re_old,spr_status[re_old]._is_free );
     
    555575                if (write_rd)
    556576                  {
    557                     gpr_status[rd_old]._is_link  = 0;
    558                     gpr_status[rd_new]._is_valid = 1;
     577                    if (restore_rd_old)
     578                      {
     579                        gpr_status[rd_old]._is_link  = 1;
     580                        gpr_status[rd_new]._is_link  = 0;
     581                        gpr_status[rd_new]._is_valid = 1;
     582                      }
     583                    else
     584                      {
     585                        gpr_status[rd_old]._is_link  = 0;
     586                        gpr_status[rd_new]._is_valid = 1;
     587                      }
    559588                  }
    560589                if (write_re)
    561590                  {
    562                     spr_status[re_old]._is_link  = 0;
    563                     spr_status[re_new]._is_valid = 1;
    564                   }
     591                    if (restore_re_old)
     592                      {
     593                        spr_status[re_old]._is_link  = 1;
     594                        spr_status[re_new]._is_link  = 0;
     595                        spr_status[re_new]._is_valid = 1;
     596                      }
     597                    else
     598                      {
     599                        spr_status[re_old]._is_link  = 0;
     600                        spr_status[re_new]._is_valid = 1;
     601                      }
     602                  }
    565603              }
    566604
     
    647685  delete []  in_RETIRE_NUM_REG_RC_PHY    ;
    648686  delete []  in_RETIRE_WRITE_RD          ;
     687  delete []  in_RETIRE_RESTORE_RD_PHY_OLD;
    649688  delete []  in_RETIRE_NUM_REG_RD_PHY_OLD;
    650689  delete []  in_RETIRE_NUM_REG_RD_PHY_NEW;
    651690  delete []  in_RETIRE_WRITE_RE          ;
     691  delete []  in_RETIRE_RESTORE_RE_PHY_OLD;
    652692  delete []  in_RETIRE_NUM_REG_RE_PHY_OLD;
    653693  delete []  in_RETIRE_NUM_REG_RE_PHY_NEW;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Parameters.h

    r82 r88  
    3636  public : uint32_t   _size_counter          ;
    3737
    38   public : uint32_t   _size_general_register ;
    39   public : uint32_t   _size_special_register ;
     38//public : uint32_t   _size_general_register ;
     39//public : uint32_t   _size_special_register ;
    4040                     
    4141  public : uint32_t   _max_reader            ;
     
    6363                        uint32_t   nb_reg_free           ,
    6464                        uint32_t   nb_bank               ,
    65                         uint32_t   size_counter          );
     65                        uint32_t   size_counter          ,
     66                        bool       is_toplevel=false
     67                        );
    6668
    6769//   public : Parameters  (Parameters & param) ;
    6870  public : ~Parameters () ;
     71
     72  public :        void            copy       (void);
    6973
    7074  public :        Parameters_test msg_error  (void);
  • 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

    r82 r88  
    1 #ifndef morpheo_behavioural_core_multi_ooo_engine_ooo_engine_rename_unit_register_translation_unit_stat_list_unit_Stat_List_unit_h
     1 #ifndef morpheo_behavioural_core_multi_ooo_engine_ooo_engine_rename_unit_register_translation_unit_stat_list_unit_Stat_List_unit_h
    22#define morpheo_behavioural_core_multi_ooo_engine_ooo_engine_rename_unit_register_translation_unit_stat_list_unit_Stat_List_unit_h
    33
     
    8686  public    : SC_IN (Tspecial_address_t)   **  in_RETIRE_NUM_REG_RC_PHY    ;//[nb_inst_retire]
    8787  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_WRITE_RD          ;//[nb_inst_retire]
     88  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_RESTORE_RD_PHY_OLD;//[nb_inst_retire]
    8889  public    : SC_IN (Tgeneral_address_t)   **  in_RETIRE_NUM_REG_RD_PHY_OLD;//[nb_inst_retire]
    8990  public    : SC_IN (Tgeneral_address_t)   **  in_RETIRE_NUM_REG_RD_PHY_NEW;//[nb_inst_retire]
    9091  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_WRITE_RE          ;//[nb_inst_retire]
     92  public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_RESTORE_RE_PHY_OLD;//[nb_inst_retire]
    9193  public    : SC_IN (Tspecial_address_t)   **  in_RETIRE_NUM_REG_RE_PHY_OLD;//[nb_inst_retire]
    9294  public    : SC_IN (Tspecial_address_t)   **  in_RETIRE_NUM_REG_RE_PHY_NEW;//[nb_inst_retire]
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Types.h

    r81 r88  
    2323  class stat_list_entry_t
    2424  {
    25   private : bool     _is_free ; // set = is present in free list
    26   private : bool     _is_link ; // set = is present in rat
    27   private : bool     _is_valid; // set = an instruction have write in this register
    28   private : uint32_t _counter ; // number of register that must read this register
     25  public : bool     _is_free ; // set = is present in free list
     26  public : bool     _is_link ; // set = is present in rat
     27  public : bool     _is_valid; // set = an instruction have write in this register
     28  public : uint32_t _counter ; // number of register that must read this register
    2929
    3030  public :  stat_list_entry_t (void) {};
     
    5555    }
    5656
    57   public : void retire_write_old (void)
     57  public : void retire_write_old (bool restore_old)
    5858    {
    59       _is_link  = 0;
     59      if (not restore_old)
     60        {
     61          _is_link  = 0;
     62        }
     63      // else nothing
    6064    }
    6165
    62   public : void retire_write_new (void)
     66  public : void retire_write_new (bool restore_old)
    6367    {
     68      if (restore_old)
     69        {
     70          _is_link  = 0;
     71        }
     72
     73      // in all case
    6474      _is_valid = 1;
    6575    }
     
    7989      return ((_is_free  == 0) and
    8090              (_is_link  == 0) and
    81               (_is_valid == 1) and
     91//            (_is_valid == 1) and // if is_link <- 0, then retire_write_old or reset
    8292              (_counter  == 0));
    8393    }
    8494
    85   public : friend std::ostream& operator<< (std::ostream& output_stream,
     95  public : friend std::ostream& operator<< (std::ostream& output,
    8696                                            stat_list_entry_t & x)
    8797    {
    88       output_stream << x._is_free  << " "
    89                     << x._is_link  << " "
    90                     << x._is_valid << " "
    91                     << x._counter;
     98      output << x._is_free  << " "
     99             << x._is_link  << " "
     100             << x._is_valid << " "
     101             << x._counter;
    92102     
    93       return output_stream;
     103      return output;
    94104    }
    95105
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Parameters.cpp

    r81 r88  
    2929                          uint32_t   nb_reg_free           ,
    3030                          uint32_t   nb_bank               ,
    31                           uint32_t   size_counter          )
     31                          uint32_t   size_counter          ,
     32                          bool       is_toplevel)
    3233  {
    3334    log_printf(FUNC,Stat_List_unit,FUNCTION,"Begin");
     
    4344    _size_counter           = size_counter       ;
    4445
    45     _size_general_register  = log2(nb_general_register);
    46     _size_special_register  = log2(nb_special_register);
    47    
    4846    _max_reader             = 1<<size_counter;
    4947
     
    6866
    6967    test();
     68   
     69    if (is_toplevel)
     70      {
     71        _size_general_register  = log2(nb_general_register);
     72        _size_special_register  = log2(nb_special_register);
     73       
     74        copy ();
     75      }
     76
    7077    log_printf(FUNC,Stat_List_unit,FUNCTION,"End");
    7178  };
     
    8289#undef  FUNCTION
    8390#define FUNCTION "Stat_List_unit::~Parameters"
    84   Parameters::~Parameters ()
     91  Parameters::~Parameters (void)
    8592  {
    8693    log_printf(FUNC,Stat_List_unit,FUNCTION,"Begin");
    8794    log_printf(FUNC,Stat_List_unit,FUNCTION,"End");
    8895  };
     96
     97#undef  FUNCTION
     98#define FUNCTION "Stat_List_unit::copy"
     99  void Parameters::copy (void)
     100  {
     101    log_printf(FUNC,Stat_List_unit,FUNCTION,"Begin");
     102    log_printf(FUNC,Stat_List_unit,FUNCTION,"End");
     103  };
     104
    89105
    90106}; // end namespace stat_list_unit
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit.cpp

    r81 r88  
    1616namespace register_translation_unit {
    1717namespace stat_list_unit {
    18 
    1918
    2019#undef  FUNCTION
     
    3938    log_printf(FUNC,Stat_List_unit,FUNCTION,"Begin");
    4039
     40#if DEBUG_Stat_List_unit == true
     41    log_printf(INFO,Stat_List_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif   
     45
    4146    log_printf(INFO,Stat_List_unit,FUNCTION,"Allocation");
    4247
     
    4853
    4954#ifdef STATISTICS
    50     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5156      {
    5257        log_printf(INFO,Stat_List_unit,FUNCTION,"Allocation of statistics");
     
    5762
    5863#ifdef VHDL
    59     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    6065      {
    6166        // generate the vhdl
     
    6772
    6873#ifdef SYSTEMC
    69     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    7075      {
    7176        // Constant
     
    9095        SC_METHOD (genMoore);
    9196        dont_initialize ();
    92         sensitive << (*(in_CLOCK)).neg();
     97        sensitive << (*(in_CLOCK)).neg(); // need internal register
    9398       
    9499# ifdef SYSTEMCASS_SPECIFIC
     
    100105        SC_METHOD (genMealy);
    101106        dont_initialize ();
    102         sensitive << (*(in_CLOCK)).neg();
     107        sensitive << (*(in_CLOCK)).neg(); // need internal register
    103108        for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
    104109          sensitive << (*(in_INSERT_READ_RA        [i]))
     
    135140
    136141#ifdef STATISTICS
    137     if (_usage & USE_STATISTICS)
     142    if (usage_is_set(_usage,USE_STATISTICS))
    138143      {
    139144        log_printf(INFO,Stat_List_unit,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_allocation.cpp

    r81 r88  
    8787       ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RC_PHY    ,"num_reg_rc_phy"    ,Tspecial_address_t,_param->_size_special_register);
    8888       ALLOC1_SIGNAL_IN ( in_RETIRE_WRITE_RD          ,"write_rd"          ,Tcontrol_t        ,1                             );
     89       ALLOC1_SIGNAL_IN ( in_RETIRE_RESTORE_RD_PHY_OLD,"restore_rd_phy_old",Tcontrol_t        ,1                             );
    8990       ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_PHY_OLD,"num_reg_rd_phy_old",Tgeneral_address_t,_param->_size_general_register);
    9091       ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_PHY_NEW,"num_reg_rd_phy_new",Tgeneral_address_t,_param->_size_general_register);
    9192       ALLOC1_SIGNAL_IN ( in_RETIRE_WRITE_RE          ,"write_re"          ,Tcontrol_t        ,1                             );
     93       ALLOC1_SIGNAL_IN ( in_RETIRE_RESTORE_RE_PHY_OLD,"restore_re_phy_old",Tcontrol_t        ,1                             );
    9294       ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_OLD,"num_reg_re_phy_old",Tspecial_address_t,_param->_size_special_register);
    9395       ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_NEW,"num_reg_re_phy_new",Tspecial_address_t,_param->_size_special_register);
     
    112114     }
    113115
    114     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     116    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     117    if (usage_is_set(_usage,USE_SYSTEMC))
     118      {
    115119     gpr_stat_list = new stat_list_entry_t * [_param->_nb_bank];
    116120     spr_stat_list = new stat_list_entry_t * [_param->_nb_bank];
     
    128132     internal_PUSH_SPR_VAL      = new Tcontrol_t [_param->_nb_reg_free];
    129133     internal_PUSH_SPR_NUM_BANK = new uint32_t   [_param->_nb_reg_free];
     134      }
     135
     136    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    130137
    131138#ifdef POSITION
    132     _component->generate_file();
     139    if (usage_is_set(_usage,USE_POSITION))
     140      _component->generate_file();
    133141#endif
    134142
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_deallocation.cpp

    r81 r88  
    2424    log_printf(FUNC,Stat_List_unit,FUNCTION,"Begin");
    2525
    26     if (_usage & USE_SYSTEMC)
     26    if (usage_is_set(_usage,USE_SYSTEMC))
    2727      {
    2828        delete     in_CLOCK ;
     
    5151        delete []  in_RETIRE_NUM_REG_RC_PHY    ;
    5252        delete []  in_RETIRE_WRITE_RD          ;
     53        delete []  in_RETIRE_RESTORE_RD_PHY_OLD;
    5354        delete []  in_RETIRE_NUM_REG_RD_PHY_OLD;
    5455        delete []  in_RETIRE_NUM_REG_RD_PHY_NEW;
    5556        delete []  in_RETIRE_WRITE_RE          ;
     57        delete []  in_RETIRE_RESTORE_RE_PHY_OLD;
    5658        delete []  in_RETIRE_NUM_REG_RE_PHY_OLD;
    5759        delete []  in_RETIRE_NUM_REG_RE_PHY_NEW;
     
    6466        delete []  in_PUSH_SPR_ACK             ;
    6567        delete [] out_PUSH_SPR_NUM_REG         ;
     68   
     69        // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     70   
     71        delete [] gpr_stat_list;
     72        delete [] spr_stat_list;
     73       
     74        delete [] internal_INSERT_ACK       ;
     75        delete [] internal_RETIRE_ACK       ;
     76        delete [] internal_PUSH_GPR_VAL     ;
     77        delete [] internal_PUSH_GPR_NUM_BANK;
     78        delete [] internal_PUSH_SPR_VAL     ;
     79        delete [] internal_PUSH_SPR_NUM_BANK;
    6680      }
     81
     82
    6783    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    68     delete [] gpr_stat_list;
    69     delete [] spr_stat_list;
    70 
    71     delete [] internal_INSERT_ACK       ;
    72     delete [] internal_RETIRE_ACK       ;
    73     delete [] internal_PUSH_GPR_VAL     ;
    74     delete [] internal_PUSH_GPR_NUM_BANK;
    75     delete [] internal_PUSH_SPR_VAL     ;
    76     delete [] internal_PUSH_SPR_NUM_BANK;
    7784
    7885    delete _component;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_end_cycle.cpp

    r81 r88  
    2626
    2727#ifdef STATISTICS
    28     _stat->end_cycle();
     28    if (usage_is_set(_usage,USE_STATISTICS))
     29      _stat->end_cycle();
    2930#endif   
    3031
     
    3233    // Evaluation before read the ouput signal
    3334//  sc_start(0);
    34     _interfaces->testbench();
     35    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     36      _interfaces->testbench();
    3537#endif
    3638
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_genMealy.cpp

    r81 r88  
    2323  void Stat_List_unit::genMealy (void)
    2424  {
    25     log_printf(FUNC,Stat_List_unit,FUNCTION,"Begin");
     25    log_begin(Stat_List_unit,FUNCTION);
     26    log_function(Stat_List_unit,FUNCTION,_name.c_str());
    2627
    2728    for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
     
    5758      }
    5859   
    59     log_printf(FUNC,Stat_List_unit,FUNCTION,"End");
     60    log_end(Stat_List_unit,FUNCTION);
    6061  };
    6162
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_genMoore.cpp

    r81 r88  
    2323  void Stat_List_unit::genMoore (void)
    2424  {
    25     log_printf(FUNC,Stat_List_unit,FUNCTION,"Begin");
     25    log_begin(Stat_List_unit,FUNCTION);
     26    log_function(Stat_List_unit,FUNCTION,_name.c_str());
    2627
    2728    uint32_t gpr_ptr = internal_GPR_PTR_FREE;
     
    6970      }
    7071   
    71     log_printf(FUNC,Stat_List_unit,FUNCTION,"End");
     72    log_end(Stat_List_unit,FUNCTION);
    7273  };
    7374
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_transition.cpp

    r81 r88  
    2323  void Stat_List_unit::transition (void)
    2424  {
    25     log_printf(FUNC,Stat_List_unit,FUNCTION,"Begin");
     25    log_begin(Stat_List_unit,FUNCTION);
     26    log_function(Stat_List_unit,FUNCTION,_name.c_str());
    2627
    2728    if (PORT_READ(in_NRESET) == 0)
     
    121122              if (PORT_READ(in_RETIRE_WRITE_RD [i]))
    122123                {
     124                  Tcontrol_t restore_old = PORT_READ(in_RETIRE_RESTORE_RD_PHY_OLD [i]);
    123125                  {
    124126                    Tgeneral_address_t num_reg = PORT_READ(in_RETIRE_NUM_REG_RD_PHY_OLD [i]);
    125127                    uint32_t bank = num_reg >> _param->_shift_gpr;
    126128                    uint32_t reg  = num_reg  & _param->_mask_gpr ;
    127                     gpr_stat_list [bank][reg].retire_write_old();
     129                    gpr_stat_list [bank][reg].retire_write_old(restore_old);
    128130                  }
    129131                  {
     
    131133                    uint32_t bank = num_reg >> _param->_shift_gpr;
    132134                    uint32_t reg  = num_reg  & _param->_mask_gpr ;
    133                     gpr_stat_list [bank][reg].retire_write_new();
     135                    gpr_stat_list [bank][reg].retire_write_new(restore_old);
    134136                  }
    135137                }
     
    137139              if (PORT_READ(in_RETIRE_WRITE_RE [i]))
    138140                {
     141                  Tcontrol_t restore_old = PORT_READ(in_RETIRE_RESTORE_RE_PHY_OLD [i]);
    139142                  {
    140143                    Tgeneral_address_t num_reg = PORT_READ(in_RETIRE_NUM_REG_RE_PHY_OLD [i]);
    141144                    uint32_t bank = num_reg >> _param->_shift_spr;
    142145                    uint32_t reg  = num_reg  & _param->_mask_spr ;
    143                     spr_stat_list [bank][reg].retire_write_old();
     146                    spr_stat_list [bank][reg].retire_write_old(restore_old);
    144147                  }
    145148                  {
     
    147150                    uint32_t bank = num_reg >> _param->_shift_spr;
    148151                    uint32_t reg  = num_reg  & _param->_mask_spr ;
    149                     spr_stat_list [bank][reg].retire_write_new();
     152                    spr_stat_list [bank][reg].retire_write_new(restore_old);
    150153                  }
    151154                }
     
    171174        internal_SPR_PTR_FREE = ((internal_SPR_PTR_FREE==0)?_param->_nb_special_register_by_bank:internal_SPR_PTR_FREE)-1;
    172175      }
    173    
    174 //     log_printf(TRACE,Stat_List_unit,FUNCTION,"Print gpr_stat_list :");
    175 //     for (uint32_t i=0; i<_param->_nb_bank; i++)
    176 //       {
    177 //      log_printf(TRACE,Stat_List_unit,FUNCTION," * Bank : %d",i);
    178 //      for (uint32_t j=0; j<_param->_nb_general_register_by_bank; j++)
    179 //        {
    180 //          std::ostringstream str;
    181 //          str << gpr_stat_list [i][j];
    182 //          log_printf(TRACE,Stat_List_unit,FUNCTION,"   [%d] %s",j,str.str().c_str());
    183 
    184 //        }
    185 //       }
    186 //     log_printf(TRACE,Stat_List_unit,FUNCTION,"Print spr_stat_list :");
    187 //     for (uint32_t i=0; i<_param->_nb_bank; i++)
    188 //       {
    189 //      log_printf(TRACE,Stat_List_unit,FUNCTION," * Bank : %d",i);
    190 //      for (uint32_t j=0; j<_param->_nb_special_register_by_bank; j++)
    191 //        {
    192 //          std::ostringstream str;
    193 //          str << spr_stat_list [i][j];
    194 //          log_printf(TRACE,Stat_List_unit,FUNCTION,"   [%d] %s",j,str.str().c_str());
    195 //        }
    196 //       }
     176
     177
     178#if (DEBUG >= DEBUG_TRACE)
     179    log_printf(TRACE,Stat_List_unit,FUNCTION,"  * Dump Stat List");
     180    for (uint32_t i=0; i<_param->_nb_bank; i++)
     181      for (uint32_t j=0; j<_param->_nb_general_register_by_bank; j++)
     182        log_printf(TRACE,Stat_List_unit,FUNCTION,"    * GPR[%.4d][%.5d] (%.5d) - free %.1d, link %.1d, valid %.1d, counter %.4d",
     183                   i,
     184                   j,
     185                   (i<<_param->_shift_gpr)|j,
     186                   gpr_stat_list[i][j]._is_free,
     187                   gpr_stat_list[i][j]._is_link,
     188                   gpr_stat_list[i][j]._is_valid,
     189                   gpr_stat_list[i][j]._counter);
     190    for (uint32_t i=0; i<_param->_nb_bank; i++)
     191      for (uint32_t j=0; j<_param->_nb_special_register_by_bank; j++)
     192        log_printf(TRACE,Stat_List_unit,FUNCTION,"    * SPR[%.4d][%.5d] (%.5d) - free %.1d, link %.1d, valid %.1d, counter %.4d",
     193                   i,
     194                   j,
     195                   (i<<_param->_shift_spr)|j,
     196                   spr_stat_list[i][j]._is_free,
     197                   spr_stat_list[i][j]._is_link,
     198                   spr_stat_list[i][j]._is_valid,
     199                   spr_stat_list[i][j]._counter);
     200#endif
    197201
    198202#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     
    200204#endif
    201205
    202     log_printf(FUNC,Stat_List_unit,FUNCTION,"End");
     206    log_end(Stat_List_unit,FUNCTION);
    203207  };
    204208
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/include/Parameters.h

    r82 r88  
    4040  public : uint32_t   _size_read_counter     ;
    4141
    42   public : uint32_t   _size_front_end_id     ;
    43   public : uint32_t   _size_context_id       ;
    44   public : uint32_t   _size_general_register ;
    45   public : uint32_t   _size_special_register ;
     42//public : uint32_t   _size_front_end_id     ;
     43//public : uint32_t   _size_context_id       ;
     44//public : uint32_t   _size_general_register ;
     45//public : uint32_t   _size_special_register ;
    4646                     
    47   public : uint32_t   _have_port_context_id  ;
    48   public : uint32_t   _have_port_front_end_id;
     47//public : uint32_t   _have_port_context_id  ;
     48//public : uint32_t   _have_port_front_end_id;
    4949
    5050  public : morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::dependency_checking_unit::         Parameters * _param_dependency_checking_unit;
     
    6262                        uint32_t   nb_reg_free           ,
    6363                        uint32_t   nb_bank               ,
    64                         uint32_t   size_read_counter     );
     64                        uint32_t   size_read_counter     ,
     65                        bool       is_toplevel=false);
    6566//   public : Parameters  (Parameters & param) ;
    6667  public : ~Parameters () ;
     68
     69  public :        void            copy       (void);
    6770
    6871  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Parameters.cpp

    r81 r88  
    2828                          uint32_t   nb_reg_free           ,
    2929                          uint32_t   nb_bank               ,
    30                           uint32_t   size_read_counter     )
     30                          uint32_t   size_read_counter     ,
     31                          bool       is_toplevel)
    3132  {
    3233    log_printf(FUNC,Register_translation_unit,FUNCTION,"Begin");
     
    4243    _size_read_counter   = size_read_counter  ;
    4344
    44     uint32_t max_nb_context = max<uint32_t>(nb_context, nb_front_end);
     45    uint32_t size_general_register = log2(nb_general_register);
     46    uint32_t size_special_register = log2(nb_special_register);
     47    uint32_t max_nb_context        = max<uint32_t>(nb_context, nb_front_end);
    4548   
    46     _size_front_end_id      = log2(nb_front_end       );
    47     _size_context_id        = log2(max_nb_context     );
    48     _size_general_register  = log2(nb_general_register);
    49     _size_special_register  = log2(nb_special_register);
    50    
    51     _have_port_front_end_id = _size_front_end_id>0;
    52     _have_port_context_id   = _size_context_id  >0;
    53 
    54 
    5549    uint32_t nb_thread = 0;
    5650    for (uint32_t i=0; i<nb_front_end; i++)
     
    9488    _param_register_translation_unit_glue    = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_translation_unit_glue::Parameters
    9589      (_nb_inst_insert,
    96        _nb_inst_retire);
     90       _nb_inst_retire,
     91        size_general_register,
     92        size_special_register);
    9793     
    9894    test();
     95
     96    if (is_toplevel)
     97      {
     98        _size_front_end_id      = log2(nb_front_end       );
     99        _size_context_id        = log2(max_nb_context     );
     100
     101        _size_general_register  = size_general_register;
     102        _size_special_register  = size_special_register;
     103       
     104        _have_port_front_end_id = _size_front_end_id>0;
     105        _have_port_context_id   = _size_context_id  >0;
     106
     107        copy();
     108      }
     109
    99110    log_printf(FUNC,Register_translation_unit,FUNCTION,"End");
    100111  };
     
    124135  };
    125136
     137#undef  FUNCTION
     138#define FUNCTION "Register_translation_unit::copy"
     139  void Parameters::copy (void)
     140  {
     141    log_printf(FUNC,Register_translation_unit,FUNCTION,"Begin");
     142
     143    COPY(_param_dependency_checking_unit);
     144    COPY(_param_free_list_unit);
     145    COPY(_param_register_address_translation_unit);
     146    COPY(_param_stat_list_unit);   
     147    COPY(_param_register_translation_unit_glue);
     148
     149    log_printf(FUNC,Register_translation_unit,FUNCTION,"End");
     150  };
     151
    126152}; // end namespace register_translation_unit
    127153}; // end namespace rename_unit
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit.cpp

    r81 r88  
    3838    log_printf(FUNC,Register_translation_unit,FUNCTION,"Begin");
    3939
     40#if DEBUG_Register_translation_unit == true
     41    log_printf(INFO,Register_translation_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif   
     45
    4046    log_printf(INFO,Register_translation_unit,FUNCTION,"Allocation");
    4147
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    5157        log_printf(INFO,Register_translation_unit,FUNCTION,"Allocation of statistics");
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
     
    6672
    6773#ifdef SYSTEMC
    68     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    6975      {
    7076        log_printf(INFO,Register_translation_unit,FUNCTION,"Method - transition");
     
    9096
    9197#ifdef STATISTICS
    92     if (_usage & USE_STATISTICS)
     98    if (usage_is_set(_usage,USE_STATISTICS))
    9399      {
    94100        log_printf(INFO,Register_translation_unit,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_allocation.cpp

    r82 r88  
    130130     {
    131131       name = _name+"_dependency_checking_unit";
    132        std::cout << "Create   : " << name << std::endl;
    133        
     132       log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
     133
    134134       _component_dependency_checking_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::dependency_checking_unit::Dependency_checking_unit
    135135         (name.c_str()
     
    149149     {
    150150       name = _name+"_free_list_unit";
    151        std::cout << "Create   : " << name << std::endl;
     151       log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
    152152       
    153153       _component_free_list_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::free_list_unit::Free_List_unit
     
    168168     {
    169169       name = _name+"_register_address_translation_unit";
    170        std::cout << "Create   : " << name << std::endl;
     170       log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
    171171       
    172172       _component_register_address_translation_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_address_translation_unit::Register_Address_Translation_unit
     
    187187     {
    188188       name = _name+"_stat_list_unit";
    189        std::cout << "Create   : " << name << std::endl;
     189       log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
    190190       
    191191       _component_stat_list_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::stat_list_unit::Stat_List_unit
     
    206206     {
    207207       name = _name+"_register_translation_unit_glue";
    208        std::cout << "Create   : " << name << std::endl;
     208       log_printf(INFO,Core,FUNCTION,_("Create   : %s"),name.c_str());
    209209       
    210210       _component_register_translation_unit_glue = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_translation_unit_glue::Register_translation_unit_Glue
     
    225225    // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    226226    std::string src,dest;
     227
     228    // ===================================================================
     229    // =====[ register_address_translation_unit ]=========================
     230    // ===================================================================
     231    {
     232      src = _name+"_register_address_translation_unit";
     233      log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
     234           
     235      {
     236        dest = _name;
     237#ifdef POSITION
     238        _component->interface_map (src ,"",
     239                                   dest,"");
     240#endif
     241        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     242        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     243      }
     244
     245      // ~~~~~[ Interface "rename" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     246      for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
     247        {
     248          dest = _name;
     249#ifdef POSITION
     250          _component->interface_map (src ,"rename_"+toString(i)
     251                                     dest,"rename_"+toString(i));
     252#endif
     253         
     254          PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_VAL"               ,
     255                              dest, "in_RENAME_"+toString(i)+"_VAL"               );
     256          if (_param->_have_port_front_end_id)
     257          PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_FRONT_END_ID"      ,
     258                              dest, "in_RENAME_"+toString(i)+"_FRONT_END_ID"      );
     259          if (_param->_have_port_context_id)
     260          PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_CONTEXT_ID"        ,
     261                              dest, "in_RENAME_"+toString(i)+"_CONTEXT_ID"        );
     262          PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RA_LOG"    ,
     263                              dest, "in_RENAME_"+toString(i)+"_NUM_REG_RA_LOG"    );
     264          PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RB_LOG"    ,
     265                              dest, "in_RENAME_"+toString(i)+"_NUM_REG_RB_LOG"    );
     266          PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RC_LOG"    ,
     267                              dest, "in_RENAME_"+toString(i)+"_NUM_REG_RC_LOG"    );
     268          PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RD_LOG"    ,
     269                              dest, "in_RENAME_"+toString(i)+"_NUM_REG_RD_LOG"    );
     270          PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RE_LOG"    ,
     271                              dest, "in_RENAME_"+toString(i)+"_NUM_REG_RE_LOG"    );
     272
     273          dest = _name+"_register_translation_unit_glue";
     274          COMPONENT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_ACK",
     275                                   dest, "in_INSERT_"+toString(i)+"_RAT_RENAME_ACK");
     276         
     277          dest = _name+"_dependency_checking_unit";
     278          COMPONENT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_NUM_REG_RA_PHY"    ,
     279                                   dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RA_PHY"    );
     280          COMPONENT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_NUM_REG_RB_PHY"    ,
     281                                   dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RB_PHY"    );
     282          COMPONENT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_NUM_REG_RC_PHY"    ,
     283                                   dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RC_PHY"    );
     284          COMPONENT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_NUM_REG_RD_PHY_OLD",
     285                                   dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RD_PHY_OLD");
     286          COMPONENT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_NUM_REG_RE_PHY_OLD",
     287                                   dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RE_PHY_OLD");
     288        }
     289
     290      // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     291      for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
     292        {
     293          dest = _name+"_register_translation_unit_glue";
     294#ifdef POSITION
     295          _component->interface_map (src ,"rename_"+toString(i)
     296                                     dest,"rename_in_"+toString(i));
     297#endif
     298          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_VAL",
     299                                   dest,"out_INSERT_"+toString(i)+"_RAT_INSERT_VAL");
     300          COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_ACK",
     301                                   dest, "in_INSERT_"+toString(i)+"_RAT_INSERT_ACK");
     302          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_WRITE_RD"      ,
     303                                   dest,"out_INSERT_"+toString(i)+"_RAT_WRITE_RD"      );
     304          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_WRITE_RE"      ,
     305                                   dest,"out_INSERT_"+toString(i)+"_RAT_WRITE_RE"      );
     306          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RD_LOG",
     307                                   dest,"out_INSERT_"+toString(i)+"_RAT_NUM_REG_RD_LOG");
     308          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RE_LOG",
     309                                   dest,"out_INSERT_"+toString(i)+"_RAT_NUM_REG_RE_LOG");
     310          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RD_PHY",
     311                                   dest,"out_INSERT_"+toString(i)+"_RAT_NUM_REG_RD_PHY_NEW");
     312          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RE_PHY",
     313                                   dest,"out_INSERT_"+toString(i)+"_RAT_NUM_REG_RE_PHY_NEW");
     314        }
     315
     316      // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     317      for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
     318        {
     319          dest = _name;
     320#ifdef POSITION
     321          _component->interface_map (src ,"retire_"+toString(i)
     322                                     dest,"retire_"+toString(i));
     323#endif
     324
     325          if (_param->_have_port_front_end_id)
     326          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_FRONT_END_ID"      ,
     327                              dest, "in_RETIRE_"+toString(i)+"_FRONT_END_ID"      );
     328          if (_param->_have_port_context_id)
     329          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_CONTEXT_ID"        ,
     330                              dest, "in_RETIRE_"+toString(i)+"_CONTEXT_ID"        );
     331          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_EVENT_STATE"       ,
     332                              dest, "in_RETIRE_"+toString(i)+"_EVENT_STATE"       );
     333          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_WRITE_RD"          ,
     334                              dest, "in_RETIRE_"+toString(i)+"_WRITE_RD"          );
     335          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_WRITE_RE"          ,
     336                              dest, "in_RETIRE_"+toString(i)+"_WRITE_RE"          );
     337          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_LOG"    ,
     338                              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_LOG"    );
     339          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_LOG"    ,
     340                              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_LOG"    );
     341          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD",
     342                              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD");
     343          PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD",
     344                              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD");
     345
     346          dest = _name+"_register_translation_unit_glue";
     347          COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_VAL"          ,
     348                                   dest,"out_RETIRE_"+toString(i)+"_RAT_VAL"      );
     349          COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_ACK"          ,
     350                                   dest, "in_RETIRE_"+toString(i)+"_RAT_ACK"      );
     351
     352          dest = _name+"_stat_list_unit";
     353          COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RESTORE_RD_PHY_OLD",
     354                                   dest, "in_RETIRE_"+toString(i)+"_RESTORE_RD_PHY_OLD");
     355          COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RESTORE_RE_PHY_OLD",
     356                                   dest, "in_RETIRE_"+toString(i)+"_RESTORE_RE_PHY_OLD");
     357        }
     358    }
    227359   
     360    // ===================================================================
     361    // =====[ free_list_unit ]============================================
     362    // ===================================================================
     363    {
     364      src = _name+"_free_list_unit";
     365      log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
     366           
     367      {
     368        dest = _name;
     369#ifdef POSITION
     370        _component->interface_map (src ,"",
     371                                   dest,"");
     372#endif
     373        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
     374        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
     375      }
     376
     377      // ~~~~~[ interface : "pop" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     378      for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
     379        {
     380          dest = _name;
     381#ifdef POSITION
     382          _component->interface_map (src ,"pop_"+toString(i)
     383                                     dest,"rename_"+toString(i));
     384#endif
     385         
     386          PORT_MAP(_component,src , "in_POP_"+toString(i)+"_GPR_VAL"    ,
     387                              dest,"in_RENAME_"+toString(i)+"_WRITE_RD");
     388          PORT_MAP(_component,src , "in_POP_"+toString(i)+"_SPR_VAL"    ,
     389                              dest,"in_RENAME_"+toString(i)+"_WRITE_RE");
     390
     391          dest = _name+"_register_translation_unit_glue";
     392          COMPONENT_MAP(_component,src , "in_POP_"+toString(i)+"_VAL" ,
     393                                   dest,"out_INSERT_"+toString(i)+"_FREE_LIST_VAL" );
     394          COMPONENT_MAP(_component,src ,"out_POP_"+toString(i)+"_ACK" ,
     395                                   dest, "in_INSERT_"+toString(i)+"_FREE_LIST_ACK" );
     396
     397          dest = _name+"_dependency_checking_unit";
     398
     399          COMPONENT_MAP(_component,src ,"out_POP_"+toString(i)+"_GPR_NUM_REG",
     400                                   dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RD_PHY_NEW");
     401          COMPONENT_MAP(_component,src ,"out_POP_"+toString(i)+"_SPR_NUM_REG",
     402                                   dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RE_PHY_NEW");
     403        }
     404
     405      // ~~~~~[ interface : "push_gpr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     406      // ~~~~~[ interface : "push_spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     407      for (uint32_t i=0; i<_param->_nb_reg_free; i++)
     408        {
     409          dest = _name+"_stat_list_unit";
     410#ifdef POSITION
     411          _component->interface_map (src ,"push_gpr_"+toString(i)
     412                                     dest,"push_gpr_"+toString(i));
     413#endif
     414
     415          COMPONENT_MAP(_component,src , "in_PUSH_GPR_"+toString(i)+"_VAL"    ,
     416                                   dest,"out_PUSH_GPR_"+toString(i)+"_VAL"    );
     417          COMPONENT_MAP(_component,src ,"out_PUSH_GPR_"+toString(i)+"_ACK"    ,
     418                                   dest, "in_PUSH_GPR_"+toString(i)+"_ACK"    );
     419          COMPONENT_MAP(_component,src , "in_PUSH_GPR_"+toString(i)+"_NUM_REG",
     420                                   dest,"out_PUSH_GPR_"+toString(i)+"_NUM_REG");
     421
     422#ifdef POSITION
     423          _component->interface_map (src ,"push_spr_"+toString(i)
     424                                     dest,"push_spr_"+toString(i));
     425#endif
     426
     427          COMPONENT_MAP(_component,src , "in_PUSH_SPR_"+toString(i)+"_VAL"    ,
     428                                   dest,"out_PUSH_SPR_"+toString(i)+"_VAL"    );
     429          COMPONENT_MAP(_component,src ,"out_PUSH_SPR_"+toString(i)+"_ACK"    ,
     430                                   dest, "in_PUSH_SPR_"+toString(i)+"_ACK"    );
     431          COMPONENT_MAP(_component,src , "in_PUSH_SPR_"+toString(i)+"_NUM_REG",
     432                                   dest,"out_PUSH_SPR_"+toString(i)+"_NUM_REG");
     433        }
     434    }
     435
     436
    228437    // ===================================================================
    229438    // =====[ dependency_checking_unit ]==================================
     
    231440    {
    232441      src = _name+"_dependency_checking_unit";
    233       std::cout << "Instance : " << src << std::endl;
     442      log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    234443           
    235444      {
     
    252461#endif
    253462
    254 //        PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_VAL"               ,dest,);
    255 //        PORT_MAP(_component,src ,"out_RENAME_IN_"+toString(i)+"_ACK"               ,dest,);
     463// //     PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_VAL"               ,dest,);
     464// //     PORT_MAP(_component,src ,"out_RENAME_IN_"+toString(i)+"_ACK"               ,dest,);
    256465          if (_param->_have_port_front_end_id)
    257466          PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_FRONT_END_ID"      ,
     
    280489          PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RE_LOG"    ,
    281490                              dest, "in_RENAME_"+toString(i)+"_NUM_REG_RE_LOG"    );
    282 
    283           dest = _name+"_register_address_translation_unit";
    284491         
    285           PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RA_PHY"    ,
    286                               dest,"out_RENAME_"+toString(i)+"_NUM_REG_RA_PHY"    );
    287           PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RB_PHY"    ,
    288                               dest,"out_RENAME_"+toString(i)+"_NUM_REG_RB_PHY"    );
    289           PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RC_PHY"    ,
    290                               dest,"out_RENAME_"+toString(i)+"_NUM_REG_RC_PHY"    );
    291           PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RD_PHY_OLD",
    292                               dest,"out_RENAME_"+toString(i)+"_NUM_REG_RD_PHY_OLD");
    293           PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RE_PHY_OLD",
    294                               dest,"out_RENAME_"+toString(i)+"_NUM_REG_RE_PHY_OLD");
     492          // in_RENAME_IN_NUM_REG_RA_PHY     - register_address_translation_unit
     493          // in_RENAME_IN_NUM_REG_RB_PHY     - register_address_translation_unit
     494          // in_RENAME_IN_NUM_REG_RC_PHY     - register_address_translation_unit
     495          // in_RENAME_IN_NUM_REG_RD_PHY_OLD - register_address_translation_unit
     496          // in_RENAME_IN_NUM_REG_RE_PHY_OLD - register_address_translation_unit
    295497         
    296           dest = _name+"_free_list_unit";
    297          
    298           PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RD_PHY_NEW",
    299                               dest,"out_POP_"+toString(i)+"_GPR_NUM_REG");
    300           PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RE_PHY_NEW",
    301                               dest,"out_POP_"+toString(i)+"_SPR_NUM_REG");
     498          // in_RENAME_IN_NUM_REG_RD_PHY_NEW - free_list_unit
     499          // in_RENAME_IN_NUM_REG_RE_PHY_NEW - free_list_unit
    302500        }
    303501
     
    311509#endif
    312510
    313 //        PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_VAL"               ,
    314 //                            dest,"out_INSERT_"+toString(i)+"_VAL"               );
    315 //        PORT_MAP(_component,src , "in_RENAME_OUT_"+toString(i)+"_ACK"               ,
    316 //                            dest, "in_INSERT_"+toString(i)+"_ACK"               );
    317511          if (_param->_have_port_front_end_id)
    318512          PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_FRONT_END_ID"      ,
     
    321515          PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_CONTEXT_ID"        ,
    322516                              dest,"out_INSERT_"+toString(i)+"_CONTEXT_ID"        );
    323           PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RA"           ,
    324                               dest,"out_INSERT_"+toString(i)+"_READ_RA"           );
    325517          PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RA_LOG"    ,
    326518                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RA_LOG"    );
    327           PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RA_PHY"    ,
    328                               dest,"out_INSERT_"+toString(i)+"_NUM_REG_RA_PHY"    );
    329           PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RB"           ,
    330                               dest,"out_INSERT_"+toString(i)+"_READ_RB"           );
    331519          PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RB_LOG"    ,
    332520                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RB_LOG"    );
    333           PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RB_PHY"    ,
    334                               dest,"out_INSERT_"+toString(i)+"_NUM_REG_RB_PHY"    );
    335           PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RC"           ,
    336                               dest,"out_INSERT_"+toString(i)+"_READ_RC"           );
    337521          PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RC_LOG"    ,
    338522                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RC_LOG"    );
    339           PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RC_PHY"    ,
    340                               dest,"out_INSERT_"+toString(i)+"_NUM_REG_RC_PHY"    );
    341           PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_WRITE_RD"          ,
    342                               dest,"out_INSERT_"+toString(i)+"_WRITE_RD"          );
    343           PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD_LOG"    ,
    344                               dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_LOG"    );
    345           PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD_PHY_OLD",
    346                               dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_OLD");
    347           PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD_PHY_NEW",
    348                               dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_NEW");
    349           PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_WRITE_RE"          ,
    350                               dest,"out_INSERT_"+toString(i)+"_WRITE_RE"          );
    351           PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE_LOG"    ,
    352                               dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_LOG"    );
    353           PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE_PHY_OLD",
    354                               dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_OLD");
    355           PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE_PHY_NEW",
    356                               dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_NEW");
    357         }
     523
     524//        PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_VAL"               ,
     525//                            dest,"out_INSERT_"+toString(i)+"_VAL"               );
     526//        PORT_MAP(_component,src , "in_RENAME_OUT_"+toString(i)+"_ACK"               ,
     527//                            dest, "in_INSERT_"+toString(i)+"_ACK"               );
     528
     529          dest = _name+"_register_translation_unit_glue";
     530
     531          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RA"           ,
     532                                   dest, "in_INSERT_"+toString(i)+"_DEPENDENCY_CHECKING_READ_RA"           );
     533          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RA_PHY"    ,
     534                                   dest, "in_INSERT_"+toString(i)+"_DEPENDENCY_CHECKING_NUM_REG_RA_PHY"    );
     535          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RB"           ,
     536                                   dest, "in_INSERT_"+toString(i)+"_DEPENDENCY_CHECKING_READ_RB"           );
     537          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RB_PHY"    ,
     538                                   dest, "in_INSERT_"+toString(i)+"_DEPENDENCY_CHECKING_NUM_REG_RB_PHY"    );
     539          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RC"           ,
     540                                   dest, "in_INSERT_"+toString(i)+"_DEPENDENCY_CHECKING_READ_RC"           );
     541          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RC_PHY"    ,
     542                                   dest, "in_INSERT_"+toString(i)+"_DEPENDENCY_CHECKING_NUM_REG_RC_PHY"    );
     543          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_WRITE_RD"          ,
     544                                   dest, "in_INSERT_"+toString(i)+"_DEPENDENCY_CHECKING_WRITE_RD"          );
     545          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD_LOG"    ,
     546                                   dest, "in_INSERT_"+toString(i)+"_DEPENDENCY_CHECKING_NUM_REG_RD_LOG"    );
     547          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD_PHY_OLD",
     548                                   dest, "in_INSERT_"+toString(i)+"_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD");
     549          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD_PHY_NEW",
     550                                   dest, "in_INSERT_"+toString(i)+"_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW");
     551          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_WRITE_RE"          ,
     552                                   dest, "in_INSERT_"+toString(i)+"_DEPENDENCY_CHECKING_WRITE_RE"          );
     553          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE_LOG"    ,
     554                                   dest, "in_INSERT_"+toString(i)+"_DEPENDENCY_CHECKING_NUM_REG_RE_LOG"    );
     555          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE_PHY_OLD",
     556                                   dest, "in_INSERT_"+toString(i)+"_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_OLD");
     557          COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE_PHY_NEW",
     558                                   dest, "in_INSERT_"+toString(i)+"_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_NEW");
     559        }
    358560    }
    359561
    360562    // ===================================================================
    361     // =====[ free_list_unit ]============================================
     563    // =====[ stat_list_unit ]============================================
    362564    // ===================================================================
    363565    {
    364       src = _name+"_free_list_unit";
    365       std::cout << "Instance : " << src << std::endl;
     566      src = _name+"_stat_list_unit";
     567      log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    366568           
    367569      {
     
    375577      }
    376578
    377       // ~~~~~[ interface : "pop" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    378       for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
    379         {
    380           dest = _name;
    381 #ifdef POSITION
    382           _component->interface_map (src ,"pop_"+toString(i)
    383                                      dest,"rename_"+toString(i));
    384 #endif
    385          
    386           PORT_MAP(_component,src , "in_POP_"+toString(i)+"_GPR_VAL"    ,
    387                               dest,"in_RENAME_"+toString(i)+"_WRITE_RD");
    388           PORT_MAP(_component,src , "in_POP_"+toString(i)+"_SPR_VAL"    ,
    389                               dest,"in_RENAME_"+toString(i)+"_WRITE_RE");
    390 
    391           dest = _name+"_register_translation_unit_glue";
    392           PORT_MAP(_component,src , "in_POP_"+toString(i)+"_VAL" ,
    393                               dest,"out_INSERT_"+toString(i)+"_FREE_LIST_VAL" );
    394           PORT_MAP(_component,src ,"out_POP_"+toString(i)+"_ACK" ,
    395                               dest, "in_INSERT_"+toString(i)+"_FREE_LIST_ACK" );
    396 
    397           dest = _name+"_dependency_checking_unit";
    398 
    399           PORT_MAP(_component,src ,"out_POP_"+toString(i)+"_GPR_NUM_REG",
    400                               dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RD_PHY_NEW");
    401           PORT_MAP(_component,src ,"out_POP_"+toString(i)+"_SPR_NUM_REG",
    402                               dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RE_PHY_NEW");
    403         }
    404       // ~~~~~[ interface : "push_gpr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    405       // ~~~~~[ interface : "push_spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    406       for (uint32_t i=0; i<_param->_nb_reg_free; i++)
    407         {
    408           dest = _name+"_stat_list_unit";
    409 #ifdef POSITION
    410           _component->interface_map (src ,"push_gpr_"+toString(i)
    411                                      dest,"push_gpr_"+toString(i));
    412 #endif
    413 
    414           PORT_MAP(_component,src , "in_PUSH_GPR_"+toString(i)+"_VAL"    ,
    415                               dest,"out_PUSH_GPR_"+toString(i)+"_VAL"    );
    416           PORT_MAP(_component,src ,"out_PUSH_GPR_"+toString(i)+"_ACK"    ,
    417                               dest, "in_PUSH_GPR_"+toString(i)+"_ACK"    );
    418           PORT_MAP(_component,src , "in_PUSH_GPR_"+toString(i)+"_NUM_REG",
    419                               dest,"out_PUSH_GPR_"+toString(i)+"_NUM_REG");
    420 
    421 #ifdef POSITION
    422           _component->interface_map (src ,"push_spr_"+toString(i)
    423                                      dest,"push_spr_"+toString(i));
    424 #endif
    425 
    426           PORT_MAP(_component,src , "in_PUSH_SPR_"+toString(i)+"_VAL"    ,
    427                               dest,"out_PUSH_SPR_"+toString(i)+"_VAL"    );
    428           PORT_MAP(_component,src ,"out_PUSH_SPR_"+toString(i)+"_ACK"    ,
    429                               dest, "in_PUSH_SPR_"+toString(i)+"_ACK"    );
    430           PORT_MAP(_component,src , "in_PUSH_SPR_"+toString(i)+"_NUM_REG",
    431                               dest,"out_PUSH_SPR_"+toString(i)+"_NUM_REG");
    432         }
    433     }
    434 
    435     // ===================================================================
    436     // =====[ register_address_translation_unit ]=========================
    437     // ===================================================================
    438     {
    439       src = _name+"_register_address_translation_unit";
    440       std::cout << "Instance : " << src << std::endl;
    441            
    442       {
    443         dest = _name;
    444 #ifdef POSITION
    445         _component->interface_map (src ,"",
    446                                    dest,"");
    447 #endif
    448         PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
    449         PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
    450       }
    451 
    452       // ~~~~~[ Interface "rename" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    453       for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
    454         {
    455           dest = _name;
    456 #ifdef POSITION
    457           _component->interface_map (src ,"rename_"+toString(i)
    458                                      dest,"rename_"+toString(i));
    459 #endif
    460          
    461           PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_VAL"               ,
    462                               dest, "in_RENAME_"+toString(i)+"_VAL"               );
    463           if (_param->_have_port_front_end_id)
    464           PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_FRONT_END_ID"      ,
    465                               dest, "in_RENAME_"+toString(i)+"_FRONT_END_ID"      );
    466           if (_param->_have_port_context_id)
    467           PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_CONTEXT_ID"        ,
    468                               dest, "in_RENAME_"+toString(i)+"_CONTEXT_ID"        );
    469           PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RA_LOG"    ,
    470                               dest, "in_RENAME_"+toString(i)+"_NUM_REG_RA_LOG"    );
    471           PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RB_LOG"    ,
    472                               dest, "in_RENAME_"+toString(i)+"_NUM_REG_RB_LOG"    );
    473           PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RC_LOG"    ,
    474                               dest, "in_RENAME_"+toString(i)+"_NUM_REG_RC_LOG"    );
    475           PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RD_LOG"    ,
    476                               dest, "in_RENAME_"+toString(i)+"_NUM_REG_RD_LOG"    );
    477           PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RE_LOG"    ,
    478                               dest, "in_RENAME_"+toString(i)+"_NUM_REG_RE_LOG"    );
    479 
    480           dest = _name+"_register_translation_unit_glue";
    481           PORT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_ACK",
    482                               dest, "in_INSERT_"+toString(i)+"_RAT_RENAME_ACK");
    483          
    484           dest = _name+"_dependency_checking_unit";
    485           PORT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_NUM_REG_RA_PHY"    ,
    486                               dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RA_PHY"    );
    487           PORT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_NUM_REG_RB_PHY"    ,
    488                               dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RB_PHY"    );
    489           PORT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_NUM_REG_RC_PHY"    ,
    490                               dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RC_PHY"    );
    491           PORT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_NUM_REG_RD_PHY_OLD",
    492                               dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RD_PHY_OLD");
    493           PORT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_NUM_REG_RE_PHY_OLD",
    494                               dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RE_PHY_OLD");
    495         }
    496 
    497579      // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    498580      for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
    499581        {
    500           dest = _name+"_dependency_checking_unit";
    501 #ifdef POSITION
    502           _component->interface_map (src ,"rename_"+toString(i)
    503                                      dest,"rename_in_"+toString(i));
    504 #endif
    505 
    506           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_WRITE_RD"      ,
    507                               dest,"out_RENAME_OUT_"+toString(i)+"_WRITE_RD"      );
    508           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_WRITE_RE"      ,
    509                               dest,"out_RENAME_OUT_"+toString(i)+"_WRITE_RE"      );
    510           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RD_LOG",
    511                               dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD_LOG");
    512           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RE_LOG",
    513                               dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE_LOG");
    514           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RD_PHY",
    515                               dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD_PHY_OLD");
    516           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RE_PHY",
    517                               dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE_PHY_OLD");
    518 
    519582          dest = _name+"_register_translation_unit_glue";
    520           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_VAL",
    521                               dest,"out_INSERT_"+toString(i)+"_RAT_INSERT_VAL");
    522           PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_ACK",
    523                               dest, "in_INSERT_"+toString(i)+"_RAT_INSERT_ACK");
    524         }
    525 
    526       // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    527       for (uint32_t i=0; i<_param->_nb_inst_retire; i++)
    528         {
    529           dest = _name;
    530 #ifdef POSITION
    531           _component->interface_map (src ,"retire_"+toString(i)
    532                                      dest,"retire_"+toString(i));
    533 #endif
    534 
    535           if (_param->_have_port_front_end_id)
    536           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_FRONT_END_ID"      ,
    537                               dest, "in_RETIRE_"+toString(i)+"_FRONT_END_ID"      );
    538           if (_param->_have_port_context_id)
    539           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_CONTEXT_ID"        ,
    540                               dest, "in_RETIRE_"+toString(i)+"_CONTEXT_ID"        );
    541           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_EVENT_STATE"       ,
    542                               dest, "in_RETIRE_"+toString(i)+"_EVENT_STATE"       );
    543           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_WRITE_RD"          ,
    544                               dest, "in_RETIRE_"+toString(i)+"_WRITE_RD"          );
    545           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_WRITE_RE"          ,
    546                               dest, "in_RETIRE_"+toString(i)+"_WRITE_RE"          );
    547           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_LOG"    ,
    548                               dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_LOG"    );
    549           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_LOG"    ,
    550                               dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_LOG"    );
    551           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD",
    552                               dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD");
    553           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD",
    554                               dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD");
    555 
    556           dest = _name+"_register_translation_unit_glue";
    557           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_VAL"          ,
    558                               dest,"out_RETIRE_"+toString(i)+"_RAT_VAL"      );
    559           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_ACK"          ,
    560                               dest, "in_RETIRE_"+toString(i)+"_RAT_ACK"      );
    561         }
    562     }
    563    
    564     // ===================================================================
    565     // =====[ stat_list_unit ]============================================
    566     // ===================================================================
    567     {
    568       src = _name+"_stat_list_unit";
    569       std::cout << "Instance : " << src << std::endl;
    570            
    571       {
    572         dest = _name;
    573 #ifdef POSITION
    574         _component->interface_map (src ,"",
    575                                    dest,"");
    576 #endif
    577         PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
    578         PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
    579       }
    580 
    581       // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    582       for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
    583         {
    584           dest = _name+"_dependency_checking_unit";
    585583#ifdef POSITION
    586584          _component->interface_map (src ,"insert_"+toString(i)
    587                                      dest,"rename_out_"+toString(i));
    588 #endif
    589 
    590           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_READ_RA"           ,
    591                               dest,"out_RENAME_OUT_"+toString(i)+"_READ_RA"           );
    592           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RA_PHY"    ,
    593                               dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RA_PHY"    );
    594           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_READ_RB"           ,
    595                               dest,"out_RENAME_OUT_"+toString(i)+"_READ_RB"           );
    596           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RB_PHY"    ,
    597                               dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RB_PHY"    );
    598           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_READ_RC"           ,
    599                               dest,"out_RENAME_OUT_"+toString(i)+"_READ_RC"           );
    600           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RC_PHY"    ,
    601                               dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RC_PHY"    );
    602           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_WRITE_RD"          ,
    603                               dest,"out_RENAME_OUT_"+toString(i)+"_WRITE_RD"          );
    604           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_NEW",
    605                               dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD_PHY_NEW");
    606           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_WRITE_RE"          ,
    607                               dest,"out_RENAME_OUT_"+toString(i)+"_WRITE_RE"          );
    608           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_NEW",
    609                               dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE_PHY_NEW");
    610 
    611           dest = _name+"_register_translation_unit_glue";
    612           PORT_MAP(_component,src ,  "in_INSERT_"+toString(i)+"_VAL" ,
    613                               dest,"out_INSERT_"+toString(i)+"_STAT_LIST_VAL");
    614           PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_ACK" ,
    615                               dest, "in_INSERT_"+toString(i)+"_STAT_LIST_ACK" );
     585                                     dest,"insert_stat_list_"+toString(i));
     586#endif
     587
     588          COMPONENT_MAP(_component,src ,  "in_INSERT_"+toString(i)+"_VAL" ,
     589                                   dest,"out_INSERT_"+toString(i)+"_STAT_LIST_VAL");
     590          COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_ACK" ,
     591                                   dest, "in_INSERT_"+toString(i)+"_STAT_LIST_ACK" );
     592          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_READ_RA"           ,
     593                                   dest,"out_INSERT_"+toString(i)+"_STAT_LIST_READ_RA"           );
     594          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RA_PHY"    ,
     595                                   dest,"out_INSERT_"+toString(i)+"_STAT_LIST_NUM_REG_RA_PHY"    );
     596          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_READ_RB"           ,
     597                                   dest,"out_INSERT_"+toString(i)+"_STAT_LIST_READ_RB"           );
     598          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RB_PHY"    ,
     599                                   dest,"out_INSERT_"+toString(i)+"_STAT_LIST_NUM_REG_RB_PHY"    );
     600          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_READ_RC"           ,
     601                                   dest,"out_INSERT_"+toString(i)+"_STAT_LIST_READ_RC"           );
     602          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RC_PHY"    ,
     603                                   dest,"out_INSERT_"+toString(i)+"_STAT_LIST_NUM_REG_RC_PHY"    );
     604          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_WRITE_RD"          ,
     605                                   dest,"out_INSERT_"+toString(i)+"_STAT_LIST_WRITE_RD"          );
     606          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_NEW",
     607                                   dest,"out_INSERT_"+toString(i)+"_STAT_LIST_NUM_REG_RD_PHY_NEW");
     608          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_WRITE_RE"          ,
     609                                   dest,"out_INSERT_"+toString(i)+"_STAT_LIST_WRITE_RE"          );
     610          COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_NEW",
     611                                   dest,"out_INSERT_"+toString(i)+"_STAT_LIST_NUM_REG_RE_PHY_NEW");
    616612        }
    617613
     
    650646                              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_NEW");
    651647
     648          // in_RETIRE_RESTORE_RD_PHY_OLD - register_address_translation_unit.out_RETIRE_RESTORE_RD_PHY_OLD
     649          // in_RETIRE_RESTORE_RE_PHY_OLD - register_address_translation_unit.out_RETIRE_RESTORE_RE_PHY_OLD
     650
    652651          dest = _name+"_register_translation_unit_glue";
    653           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_VAL",
    654                               dest,"out_RETIRE_"+toString(i)+"_STAT_LIST_VAL");
    655           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_ACK",
    656                               dest, "in_RETIRE_"+toString(i)+"_STAT_LIST_ACK");
     652          COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_VAL",
     653                                   dest,"out_RETIRE_"+toString(i)+"_STAT_LIST_VAL");
     654          COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_ACK",
     655                                   dest, "in_RETIRE_"+toString(i)+"_STAT_LIST_ACK");
    657656        }
    658657
     
    667666#endif
    668667
    669           PORT_MAP(_component,src ,"out_PUSH_GPR_"+toString(i)+"_VAL"    ,
    670                               dest, "in_PUSH_GPR_"+toString(i)+"_VAL"    );
    671           PORT_MAP(_component,src , "in_PUSH_GPR_"+toString(i)+"_ACK"    ,
    672                               dest,"out_PUSH_GPR_"+toString(i)+"_ACK"    );
    673           PORT_MAP(_component,src ,"out_PUSH_GPR_"+toString(i)+"_NUM_REG",
    674                               dest, "in_PUSH_GPR_"+toString(i)+"_NUM_REG");
     668          //out_PUSH_GPR_VAL     - free_list_unit
     669          // in_PUSH_GPR_ACK     - free_list_unit
     670          //out_PUSH_GPR_NUM_REG - free_list_unit
    675671
    676672#ifdef POSITION
     
    679675#endif
    680676
    681           PORT_MAP(_component,src ,"out_PUSH_SPR_"+toString(i)+"_VAL"    ,
    682                               dest, "in_PUSH_SPR_"+toString(i)+"_VAL"    );
    683           PORT_MAP(_component,src , "in_PUSH_SPR_"+toString(i)+"_ACK"    ,
    684                               dest,"out_PUSH_SPR_"+toString(i)+"_ACK"    );
    685           PORT_MAP(_component,src ,"out_PUSH_SPR_"+toString(i)+"_NUM_REG",
    686                               dest, "in_PUSH_SPR_"+toString(i)+"_NUM_REG");
     677          //out_PUSH_SPR_VAL     - free_list_unit
     678          // in_PUSH_SPR_ACK     - free_list_unit
     679          //out_PUSH_SPR_NUM_REG - free_list_unit
    687680        }
    688681    }
     
    693686    {
    694687      src = _name+"_register_translation_unit_glue";
    695       std::cout << "Instance : " << src << std::endl;
     688      log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str());
    696689           
    697690      {
     
    723716                              dest, "in_INSERT_"+toString(i)+"_ACK"    );
    724717
    725           dest = _name+"_register_address_translation_unit";
    726           PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_RAT_INSERT_VAL",
    727                               dest, "in_INSERT_"+toString(i)+"_VAL");
    728           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_RAT_RENAME_ACK",
    729                               dest,"out_RENAME_"+toString(i)+"_ACK");
    730           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_RAT_INSERT_ACK",
    731                               dest,"out_INSERT_"+toString(i)+"_ACK");
    732 
    733           dest = _name+"_free_list_unit";
    734           PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_FREE_LIST_VAL" ,
    735                               dest, "in_POP_"+toString(i)+"_VAL" );
    736           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_FREE_LIST_ACK" ,
    737                               dest,"out_POP_"+toString(i)+"_ACK" );
    738 
    739           dest = _name+"_stat_list_unit";
    740           PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_STAT_LIST_VAL" ,
    741                               dest, "in_INSERT_"+toString(i)+"_VAL" );
    742           PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_STAT_LIST_ACK" ,
    743                               dest,"out_INSERT_"+toString(i)+"_ACK" );
     718          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_READ_RA"           ,
     719                              dest,"out_INSERT_"+toString(i)+"_READ_RA"           );
     720          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RA_PHY"    ,
     721                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RA_PHY"    );
     722          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_READ_RB"           ,
     723                              dest,"out_INSERT_"+toString(i)+"_READ_RB"           );
     724          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RB_PHY"    ,
     725                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RB_PHY"    );
     726          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_READ_RC"           ,
     727                              dest,"out_INSERT_"+toString(i)+"_READ_RC"           );
     728          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RC_PHY"    ,
     729                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RC_PHY"    );
     730          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_WRITE_RD"          ,
     731                              dest,"out_INSERT_"+toString(i)+"_WRITE_RD"          );
     732          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RD_LOG"    ,
     733                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_LOG"    );
     734          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_OLD",
     735                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_OLD");
     736          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_NEW",
     737                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_NEW");
     738          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_WRITE_RE"          ,
     739                              dest,"out_INSERT_"+toString(i)+"_WRITE_RE"          );
     740          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RE_LOG"    ,
     741                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_LOG"    );
     742          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_OLD",
     743                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_OLD");
     744          PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_NEW",
     745                              dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_NEW");
     746
     747          // out_INSERT_RAT_INSERT_VAL - register_address_translation_unit
     748          //  in_INSERT_RAT_RENAME_ACK - register_address_translation_unit
     749          //  in_INSERT_RAT_INSERT_ACK - register_address_translation_unit
     750          // out_INSERT_FREE_LIST_VAL  - free_list_unit
     751          //  in_INSERT_FREE_LIST_ACK  - free_list_unit
     752          // out_INSERT_STAT_LIST_VAL  - stat_list_unit
     753          //  in_INSERT_STAT_LIST_ACK  - stat_list_unit
     754
     755          //  in_INSERT_DEPENDENCY_CHECKING_READ_RA            - dependency_checking_unit
     756          //  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RA_PHY     - dependency_checking_unit
     757          //  in_INSERT_DEPENDENCY_CHECKING_READ_RB            - dependency_checking_unit
     758          //  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RB_PHY     - dependency_checking_unit
     759          //  in_INSERT_DEPENDENCY_CHECKING_READ_RC            - dependency_checking_unit
     760          //  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RC_PHY     - dependency_checking_unit
     761          //  in_INSERT_DEPENDENCY_CHECKING_WRITE_RD           - dependency_checking_unit
     762          //  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_LOG     - dependency_checking_unit
     763          //  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_OLD - dependency_checking_unit
     764          //  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RD_PHY_NEW - dependency_checking_unit
     765          //  in_INSERT_DEPENDENCY_CHECKING_WRITE_RE           - dependency_checking_unit
     766          //  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_LOG     - dependency_checking_unit
     767          //  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_OLD - dependency_checking_unit
     768          //  in_INSERT_DEPENDENCY_CHECKING_NUM_REG_RE_PHY_NEW - dependency_checking_unit
     769
     770          // out_INSERT_STAT_LIST_READ_RA                      - stat_list_unit
     771          // out_INSERT_STAT_LIST_NUM_REG_RA_PHY               - stat_list_unit
     772          // out_INSERT_STAT_LIST_READ_RB                      - stat_list_unit
     773          // out_INSERT_STAT_LIST_NUM_REG_RB_PHY               - stat_list_unit
     774          // out_INSERT_STAT_LIST_READ_RC                      - stat_list_unit
     775          // out_INSERT_STAT_LIST_NUM_REG_RC_PHY               - stat_list_unit
     776          // out_INSERT_STAT_LIST_WRITE_RD                     - stat_list_unit
     777          // out_INSERT_STAT_LIST_NUM_REG_RD_PHY_NEW           - stat_list_unit
     778          // out_INSERT_STAT_LIST_WRITE_RE                     - stat_list_unit
     779          // out_INSERT_STAT_LIST_NUM_REG_RE_PHY_NEW           - stat_list_unit
     780
     781          // out_INSERT_RAT_WRITE_RD                           - register_address_translation_unit
     782          // out_INSERT_RAT_NUM_REG_RD_LOG                     - register_address_translation_unit
     783          // out_INSERT_RAT_NUM_REG_RD_PHY_NEW                 - register_address_translation_unit
     784          // out_INSERT_RAT_WRITE_RE                           - register_address_translation_unit
     785          // out_INSERT_RAT_NUM_REG_RE_LOG                     - register_address_translation_unit
     786          // out_INSERT_RAT_NUM_REG_RE_PHY_NEW                 - register_address_translation_unit
    744787        }
    745788
     
    758801                              dest,"out_RETIRE_"+toString(i)+"_ACK"          );
    759802
    760           dest = _name+"_register_address_translation_unit";
    761           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RAT_VAL"      ,
    762                               dest, "in_RETIRE_"+toString(i)+"_VAL"          );
    763           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_RAT_ACK"      ,
    764                               dest,"out_RETIRE_"+toString(i)+"_ACK"          );
    765 
    766           dest = _name+"_stat_list_unit";
    767           PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_STAT_LIST_VAL",
    768                               dest, "in_RETIRE_"+toString(i)+"_VAL");
    769           PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_STAT_LIST_ACK",
    770                               dest,"out_RETIRE_"+toString(i)+"_ACK");
     803          // out_RETIRE_RAT_VAL       - register_address_translation_unit
     804          //  in_RETIRE_RAT_ACK       - register_address_translation_unit
     805          // out_RETIRE_STAT_LIST_VAL - stat_list_unit
     806          //  in_RETIRE_STAT_LIST_ACK - stat_list_unit
    771807        }
    772808     }
     
    774810
    775811    // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    776      _component->test_map();
    777 
    778 #ifdef POSITION
    779     _component->generate_file();
     812#if (DEBUG_Register_translation_unit == true)
     813    _component->test_map();
     814#endif
     815
     816#ifdef POSITION
     817    if (usage_is_set(_usage,USE_POSITION))
     818      _component->generate_file();
    780819#endif
    781820
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_deallocation.cpp

    r81 r88  
    2323    log_printf(FUNC,Register_translation_unit,FUNCTION,"Begin");
    2424
    25     if (_usage & USE_SYSTEMC)
     25    if (usage_is_set(_usage,USE_SYSTEMC))
    2626      {
    2727        delete    in_CLOCK ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
    33     _interfaces->testbench();
     34    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     35      _interfaces->testbench();
    3436#endif
    3537
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/Makefile.deps

    r81 r88  
    1313include                         $(DIR_MORPHEO)/Behavioural/Makefile.deps
    1414endif
     15ifndef Priority
     16include                         $(DIR_MORPHEO)/Behavioural/Generic/Priority/Makefile.deps
     17endif
    1518
    1619#-----[ Directory ]----------------------------------------
    1720
    18 Rename_select_DIR                       =       $(DIR_MORPHEO)/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select
     21Rename_select_DIR               =       $(DIR_MORPHEO)/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select
    1922
    2023#-----[ Library ]------------------------------------------
    2124
    22 Rename_select_LIBRARY           =       -lRename_select \
     25Rename_select_LIBRARY           =       -lRename_select                 \
     26                                        $(Priority_LIBRARY)             \
    2327                                        $(Behavioural_LIBRARY) 
    2428
    25 Rename_select_DIR_LIBRARY               =       -L$(Rename_select_DIR)/lib      \
     29Rename_select_DIR_LIBRARY       =       -L$(Rename_select_DIR)/lib      \
     30                                        $(Priority_DIR_LIBRARY)         \
    2631                                        $(Behavioural_DIR_LIBRARY)
    2732
     
    3136                                @\
    3237                                $(MAKE) Behavioural_library;            \
     38                                $(MAKE) Priority_library;               \
    3339                                $(MAKE) --directory=$(Rename_select_DIR) --makefile=Makefile;
    3440
     
    3642                                @\
    3743                                $(MAKE) Behavioural_library_clean;      \
     44                                $(MAKE) Priority_library_clean;         \
    3845                                $(MAKE) --directory=$(Rename_select_DIR) --makefile=Makefile clean;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Rename_select_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/src/main.cpp

    r81 r88  
    1616  err (_(" * nb_front_end                         (uint32_t         )\n"));
    1717  err (_(" * nb_context            [nb_front_end] (uint32_t         )\n"));
     18//   err (_(" * size_nb_front_end_id                 (uint32_t         )\n"));
     19//   err (_(" * size_nb_context_id                   (uint32_t         )\n"));
    1820  err (_(" * max_branch_speculated                (uint32_t         )\n"));
    1921  err (_(" * size_general_data                    (uint32_t         )\n"));
     
    4951    _nb_context [i] = atoi(argv[x++]);
    5052
     53//   uint32_t          _size_front_end_id    = atoi(argv[x++]);
     54//   uint32_t          _size_context_id      = atoi(argv[x++]);
    5155  uint32_t          _max_branch_speculated= atoi(argv[x++]);
    5256  uint32_t          _size_general_data    = atoi(argv[x++]);
     
    6670        (_nb_front_end         ,
    6771         _nb_context           ,
     72//          _size_front_end_id    ,
     73//          _size_context_id      ,
    6874         _max_branch_speculated,
    6975         _size_general_data    ,
     
    7278         _nb_front_end_select  ,
    7379         _priority             ,
    74          _load_balancing       );
     80         _load_balancing       ,
     81         true // is_toplevel
     82         );
    7583     
    7684      msg(_("%s"),param->print(1).c_str());
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/SelfTest/src/test.cpp

    r82 r88  
    2323#endif
    2424
     25  Tusage_t _usage = USE_ALL;
     26
     27//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     28//   _usage = usage_unset(_usage,USE_VHDL                 );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     31//   _usage = usage_unset(_usage,USE_POSITION             );
     32//   _usage = usage_unset(_usage,USE_STATISTICS           );
     33//   _usage = usage_unset(_usage,USE_INFORMATION          );
     34
    2535  Rename_select * _Rename_select = new Rename_select
    2636    (name.c_str(),
     
    2939#endif
    3040     _param,
    31      USE_ALL);
     41     _usage);
    3242 
    3343#ifdef SYSTEMC
     
    4050  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
    4151
    42   ALLOC2_SC_SIGNAL( in_RENAME_IN_VAL           ," in_RENAME_IN_VAL           ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    43   ALLOC2_SC_SIGNAL(out_RENAME_IN_ACK           ,"out_RENAME_IN_ACK           ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    44   ALLOC2_SC_SIGNAL( in_RENAME_IN_FRONT_END_ID  ," in_RENAME_IN_FRONT_END_ID  ",Tcontext_t        ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    45   ALLOC2_SC_SIGNAL( in_RENAME_IN_CONTEXT_ID    ," in_RENAME_IN_CONTEXT_ID    ",Tcontext_t        ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    46   ALLOC2_SC_SIGNAL( in_RENAME_IN_DEPTH         ," in_RENAME_IN_DEPTH         ",Tdepth_t          ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    47   ALLOC2_SC_SIGNAL( in_RENAME_IN_TYPE          ," in_RENAME_IN_TYPE          ",Ttype_t           ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    48   ALLOC2_SC_SIGNAL( in_RENAME_IN_OPERATION     ," in_RENAME_IN_OPERATION     ",Toperation_t      ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    49   ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS       ," in_RENAME_IN_ADDRESS       ",Tgeneral_data_t   ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    50   ALLOC2_SC_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT  ," in_RENAME_IN_HAS_IMMEDIAT  ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    51   ALLOC2_SC_SIGNAL( in_RENAME_IN_IMMEDIAT      ," in_RENAME_IN_IMMEDIAT      ",Tgeneral_data_t   ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    52   ALLOC2_SC_SIGNAL( in_RENAME_IN_READ_RA       ," in_RENAME_IN_READ_RA       ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    53   ALLOC2_SC_SIGNAL( in_RENAME_IN_NUM_REG_RA    ," in_RENAME_IN_NUM_REG_RA    ",Tgeneral_address_t,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    54   ALLOC2_SC_SIGNAL( in_RENAME_IN_READ_RB       ," in_RENAME_IN_READ_RB       ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    55   ALLOC2_SC_SIGNAL( in_RENAME_IN_NUM_REG_RB    ," in_RENAME_IN_NUM_REG_RB    ",Tgeneral_address_t,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    56   ALLOC2_SC_SIGNAL( in_RENAME_IN_READ_RC       ," in_RENAME_IN_READ_RC       ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    57   ALLOC2_SC_SIGNAL( in_RENAME_IN_NUM_REG_RC    ," in_RENAME_IN_NUM_REG_RC    ",Tspecial_address_t,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    58   ALLOC2_SC_SIGNAL( in_RENAME_IN_WRITE_RD      ," in_RENAME_IN_WRITE_RD      ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    59   ALLOC2_SC_SIGNAL( in_RENAME_IN_NUM_REG_RD    ," in_RENAME_IN_NUM_REG_RD    ",Tgeneral_address_t,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    60   ALLOC2_SC_SIGNAL( in_RENAME_IN_WRITE_RE      ," in_RENAME_IN_WRITE_RE      ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    61   ALLOC2_SC_SIGNAL( in_RENAME_IN_NUM_REG_RE    ," in_RENAME_IN_NUM_REG_RE    ",Tspecial_address_t,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    62   ALLOC2_SC_SIGNAL( in_RENAME_IN_EXCEPTION_USE ," in_RENAME_IN_EXCEPTION_USE ",Texception_t      ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
     52  ALLOC2_SC_SIGNAL( in_RENAME_IN_VAL           ," in_RENAME_IN_VAL           ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     53  ALLOC2_SC_SIGNAL(out_RENAME_IN_ACK           ,"out_RENAME_IN_ACK           ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     54  ALLOC2_SC_SIGNAL( in_RENAME_IN_FRONT_END_ID  ," in_RENAME_IN_FRONT_END_ID  ",Tcontext_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     55  ALLOC2_SC_SIGNAL( in_RENAME_IN_CONTEXT_ID    ," in_RENAME_IN_CONTEXT_ID    ",Tcontext_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     56  ALLOC2_SC_SIGNAL( in_RENAME_IN_DEPTH         ," in_RENAME_IN_DEPTH         ",Tdepth_t          ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     57  ALLOC2_SC_SIGNAL( in_RENAME_IN_TYPE          ," in_RENAME_IN_TYPE          ",Ttype_t           ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     58  ALLOC2_SC_SIGNAL( in_RENAME_IN_OPERATION     ," in_RENAME_IN_OPERATION     ",Toperation_t      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     59  ALLOC2_SC_SIGNAL( in_RENAME_IN_NO_EXECUTE    ," in_RENAME_IN_NO_EXECUTE    ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     60  ALLOC2_SC_SIGNAL( in_RENAME_IN_IS_DELAY_SLOT ," in_RENAME_IN_IS_DELAY_SLOT ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     61  ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS       ," in_RENAME_IN_ADDRESS       ",Tgeneral_data_t   ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     62  ALLOC2_SC_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT  ," in_RENAME_IN_HAS_IMMEDIAT  ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     63  ALLOC2_SC_SIGNAL( in_RENAME_IN_IMMEDIAT      ," in_RENAME_IN_IMMEDIAT      ",Tgeneral_data_t   ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     64  ALLOC2_SC_SIGNAL( in_RENAME_IN_READ_RA       ," in_RENAME_IN_READ_RA       ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     65  ALLOC2_SC_SIGNAL( in_RENAME_IN_NUM_REG_RA    ," in_RENAME_IN_NUM_REG_RA    ",Tgeneral_address_t,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     66  ALLOC2_SC_SIGNAL( in_RENAME_IN_READ_RB       ," in_RENAME_IN_READ_RB       ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     67  ALLOC2_SC_SIGNAL( in_RENAME_IN_NUM_REG_RB    ," in_RENAME_IN_NUM_REG_RB    ",Tgeneral_address_t,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     68  ALLOC2_SC_SIGNAL( in_RENAME_IN_READ_RC       ," in_RENAME_IN_READ_RC       ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     69  ALLOC2_SC_SIGNAL( in_RENAME_IN_NUM_REG_RC    ," in_RENAME_IN_NUM_REG_RC    ",Tspecial_address_t,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     70  ALLOC2_SC_SIGNAL( in_RENAME_IN_WRITE_RD      ," in_RENAME_IN_WRITE_RD      ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     71  ALLOC2_SC_SIGNAL( in_RENAME_IN_NUM_REG_RD    ," in_RENAME_IN_NUM_REG_RD    ",Tgeneral_address_t,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     72  ALLOC2_SC_SIGNAL( in_RENAME_IN_WRITE_RE      ," in_RENAME_IN_WRITE_RE      ",Tcontrol_t        ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     73  ALLOC2_SC_SIGNAL( in_RENAME_IN_NUM_REG_RE    ," in_RENAME_IN_NUM_REG_RE    ",Tspecial_address_t,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     74  ALLOC2_SC_SIGNAL( in_RENAME_IN_EXCEPTION_USE ," in_RENAME_IN_EXCEPTION_USE ",Texception_t      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     75  ALLOC2_SC_SIGNAL( in_RENAME_IN_EXCEPTION     ," in_RENAME_IN_EXCEPTION     ",Texception_t      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    6376
    6477  ALLOC1_SC_SIGNAL(out_RENAME_OUT_VAL          ,"out_RENAME_OUT_VAL          ",Tcontrol_t        ,_param->_nb_inst_rename);
     
    6982  ALLOC1_SC_SIGNAL(out_RENAME_OUT_TYPE         ,"out_RENAME_OUT_TYPE         ",Ttype_t           ,_param->_nb_inst_rename);
    7083  ALLOC1_SC_SIGNAL(out_RENAME_OUT_OPERATION    ,"out_RENAME_OUT_OPERATION    ",Toperation_t      ,_param->_nb_inst_rename);
     84  ALLOC1_SC_SIGNAL(out_RENAME_OUT_NO_EXECUTE   ,"out_RENAME_OUT_NO_EXECUTE   ",Tcontrol_t        ,_param->_nb_inst_rename);
     85  ALLOC1_SC_SIGNAL(out_RENAME_OUT_IS_DELAY_SLOT,"out_RENAME_OUT_IS_DELAY_SLOT",Tcontrol_t        ,_param->_nb_inst_rename);
    7186  ALLOC1_SC_SIGNAL(out_RENAME_OUT_ADDRESS      ,"out_RENAME_OUT_ADDRESS      ",Tgeneral_data_t   ,_param->_nb_inst_rename);
    7287  ALLOC1_SC_SIGNAL(out_RENAME_OUT_HAS_IMMEDIAT ,"out_RENAME_OUT_HAS_IMMEDIAT ",Tcontrol_t        ,_param->_nb_inst_rename);
     
    8398  ALLOC1_SC_SIGNAL(out_RENAME_OUT_NUM_REG_RE   ,"out_RENAME_OUT_NUM_REG_RE   ",Tspecial_address_t,_param->_nb_inst_rename);
    8499  ALLOC1_SC_SIGNAL(out_RENAME_OUT_EXCEPTION_USE,"out_RENAME_OUT_EXCEPTION_USE",Texception_t      ,_param->_nb_inst_rename);
     100  ALLOC1_SC_SIGNAL(out_RENAME_OUT_EXCEPTION    ,"out_RENAME_OUT_EXCEPTION    ",Texception_t      ,_param->_nb_inst_rename);
    85101 
    86102  /********************************************************
     
    93109  (*(_Rename_select->in_NRESET))       (*(in_NRESET));
    94110
    95   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_VAL           ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    96   INSTANCE2_SC_SIGNAL(_Rename_select,out_RENAME_IN_ACK           ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
     111  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_VAL           ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     112  INSTANCE2_SC_SIGNAL(_Rename_select,out_RENAME_IN_ACK           ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    97113  if (_param->_have_port_front_end_id)
    98   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_FRONT_END_ID  ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
     114  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_FRONT_END_ID  ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    99115  if (_param->_have_port_context_id)
    100   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_CONTEXT_ID    ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
     116  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_CONTEXT_ID    ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    101117  if (_param->_have_port_depth)
    102   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_DEPTH         ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    103   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_TYPE          ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    104   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_OPERATION     ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    105   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_ADDRESS       ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    106   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_HAS_IMMEDIAT  ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    107   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_IMMEDIAT      ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    108   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_READ_RA       ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    109   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_NUM_REG_RA    ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    110   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_READ_RB       ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    111   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_NUM_REG_RB    ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    112   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_READ_RC       ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    113   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_NUM_REG_RC    ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    114   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_WRITE_RD      ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    115   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_NUM_REG_RD    ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    116   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_WRITE_RE      ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    117   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_NUM_REG_RE    ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    118   INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_EXCEPTION_USE ,_param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
     118  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_DEPTH         ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     119  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_TYPE          ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     120  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_OPERATION     ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     121  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_NO_EXECUTE    ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     122  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_IS_DELAY_SLOT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     123  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_ADDRESS       ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     124  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_HAS_IMMEDIAT  ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     125  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_IMMEDIAT      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     126  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_READ_RA       ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     127  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_NUM_REG_RA    ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     128  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_READ_RB       ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     129  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_NUM_REG_RB    ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     130  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_READ_RC       ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     131  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_NUM_REG_RC    ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     132  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_WRITE_RD      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     133  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_NUM_REG_RD    ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     134  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_WRITE_RE      ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     135  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_NUM_REG_RE    ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     136  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_EXCEPTION_USE ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
     137  INSTANCE2_SC_SIGNAL(_Rename_select, in_RENAME_IN_EXCEPTION     ,_param->_nb_front_end, _param->_nb_inst_decod[it1]);
    119138
    120139  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_VAL          ,_param->_nb_inst_rename);
     
    128147  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_TYPE         ,_param->_nb_inst_rename);
    129148  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_OPERATION    ,_param->_nb_inst_rename);
     149  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_NO_EXECUTE   ,_param->_nb_inst_rename);
     150  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_IS_DELAY_SLOT,_param->_nb_inst_rename);
    130151  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_ADDRESS      ,_param->_nb_inst_rename);
    131152  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_HAS_IMMEDIAT ,_param->_nb_inst_rename);
     
    142163  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_NUM_REG_RE   ,_param->_nb_inst_rename);
    143164  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_EXCEPTION_USE,_param->_nb_inst_rename);
     165  INSTANCE1_SC_SIGNAL(_Rename_select,out_RENAME_OUT_EXCEPTION    ,_param->_nb_inst_rename);
    144166
    145167  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
    189211            in_RENAME_IN_TYPE         [i][j]->write(range<Ttype_t           >(rand(),_param->_size_type                  ));
    190212            in_RENAME_IN_OPERATION    [i][j]->write(range<Toperation_t      >(rand(),_param->_size_operation             ));
     213            in_RENAME_IN_NO_EXECUTE   [i][j]->write(rand()%2);
     214            in_RENAME_IN_IS_DELAY_SLOT[i][j]->write(rand()%2);
    191215            in_RENAME_IN_ADDRESS      [i][j]->write(address++                                                             );
    192216            in_RENAME_IN_HAS_IMMEDIAT [i][j]->write(range<Tcontrol_t        >(rand(),1                                   ));
     
    203227            in_RENAME_IN_NUM_REG_RE   [i][j]->write(range<Tspecial_address_t>(rand(),_param->_size_special_register_logic));
    204228            in_RENAME_IN_EXCEPTION_USE[i][j]->write(range<Texception_t      >(rand(),_param->_size_exception             ));
     229            in_RENAME_IN_EXCEPTION    [i][j]->write(range<Texception_t      >(rand(),_param->_size_exception             ));
    205230          }
    206231
     
    256281                      TEST(Ttype_t           ,out_RENAME_OUT_TYPE         [i]->read(),in_RENAME_IN_TYPE         [x][y]->read());
    257282                      TEST(Toperation_t      ,out_RENAME_OUT_OPERATION    [i]->read(),in_RENAME_IN_OPERATION    [x][y]->read());
     283                      TEST(Tcontrol_t        ,out_RENAME_OUT_NO_EXECUTE   [i]->read(),in_RENAME_IN_NO_EXECUTE   [x][y]->read());
     284                      TEST(Tcontrol_t        ,out_RENAME_OUT_IS_DELAY_SLOT[i]->read(),in_RENAME_IN_IS_DELAY_SLOT[x][y]->read());
    258285                      TEST(Tcontrol_t        ,out_RENAME_OUT_HAS_IMMEDIAT [i]->read(),in_RENAME_IN_HAS_IMMEDIAT [x][y]->read());
    259286                      TEST(Tgeneral_data_t   ,out_RENAME_OUT_IMMEDIAT     [i]->read(),in_RENAME_IN_IMMEDIAT     [x][y]->read());
     
    269296                      TEST(Tspecial_address_t,out_RENAME_OUT_NUM_REG_RE   [i]->read(),in_RENAME_IN_NUM_REG_RE   [x][y]->read());
    270297                      TEST(Texception_t      ,out_RENAME_OUT_EXCEPTION_USE[i]->read(),in_RENAME_IN_EXCEPTION_USE[x][y]->read());
    271 
     298                      TEST(Texception_t      ,out_RENAME_OUT_EXCEPTION    [i]->read(),in_RENAME_IN_EXCEPTION    [x][y]->read());
    272299                  }
    273300
     
    300327  delete []  in_RENAME_IN_TYPE          ;
    301328  delete []  in_RENAME_IN_OPERATION     ;
     329  delete []  in_RENAME_IN_NO_EXECUTE    ;
     330  delete []  in_RENAME_IN_IS_DELAY_SLOT ;
    302331  delete []  in_RENAME_IN_ADDRESS       ;
    303332  delete []  in_RENAME_IN_HAS_IMMEDIAT  ;
     
    314343  delete []  in_RENAME_IN_NUM_REG_RE    ;
    315344  delete []  in_RENAME_IN_EXCEPTION_USE ;
     345  delete []  in_RENAME_IN_EXCEPTION     ;
    316346 
    317347  delete [] out_RENAME_OUT_VAL          ;
     
    322352  delete [] out_RENAME_OUT_TYPE         ;
    323353  delete [] out_RENAME_OUT_OPERATION    ;
     354  delete [] out_RENAME_OUT_NO_EXECUTE   ;
     355  delete [] out_RENAME_OUT_IS_DELAY_SLOT;
    324356  delete [] out_RENAME_OUT_ADDRESS      ;
    325357  delete [] out_RENAME_OUT_HAS_IMMEDIAT ;
     
    336368  delete [] out_RENAME_OUT_NUM_REG_RE   ;
    337369  delete [] out_RENAME_OUT_EXCEPTION_USE;
     370  delete [] out_RENAME_OUT_EXCEPTION    ;
    338371#endif
    339372
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Parameters.h

    r82 r88  
    2828  public : uint32_t *        _nb_context            ;//[nb_front_end]
    2929  public : uint32_t          _max_branch_speculated ;
    30   public : uint32_t          _size_general_data     ;
     30//public : uint32_t          _size_general_data     ;
    3131  public : uint32_t          _nb_inst_rename        ;
    3232  public : uint32_t *        _nb_inst_decod         ;//[nb_front_end]
     
    3636
    3737  public : uint32_t          _max_nb_inst_decod     ;
     38//public : uint32_t          _size_depth            ;
     39//public : uint32_t          _size_front_end_id     ;
     40//public : uint32_t          _size_context_id       ;
    3841
    39   public : uint32_t          _size_front_end_id     ;
    40   public : uint32_t          _size_context_id       ;
    41   public : uint32_t          _size_depth            ;
    42 
    43   public : bool              _have_port_front_end_id;
    44   public : bool              _have_port_context_id  ;
    45   public : bool              _have_port_depth       ;
     42//public : bool              _have_port_front_end_id;
     43//public : bool              _have_port_context_id  ;
     44//public : bool              _have_port_depth       ;
    4645
    4746    //-----[ methods ]-----------------------------------------------------------
    4847  public : Parameters  (uint32_t          nb_front_end         ,
    4948                        uint32_t *        nb_context           ,
     49//                      uint32_t          size_front_end_id    ,
     50//                      uint32_t          size_context_id      ,
    5051                        uint32_t          max_branch_speculated,
    5152                        uint32_t          size_general_data    ,
     
    5455                        uint32_t          nb_front_end_select  ,
    5556                        Tpriority_t       priority             ,
    56                         Tload_balancing_t load_balancing       );
    57 //   public : Parameters  (Parameters & param) ;
     57                        Tload_balancing_t load_balancing       ,
     58                        bool              is_toplevel=true);
     59//public : Parameters  (Parameters & param) ;
    5860  public : ~Parameters () ;
     61
     62  public :        void            copy       (void);
    5963
    6064  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Rename_select.h

    r82 r88  
    1313#endif
    1414
    15 #include <iostream>
    1615#include "Common/include/ToString.h"
    1716#include "Common/include/Debug.h"
     
    2726#endif
    2827#include "Behavioural/include/Usage.h"
     28
     29#include "Behavioural/Generic/Priority/include/Priority.h"
     30
    2931#include <list>
     32#include <iostream>
    3033
    3134namespace morpheo {
     
    7174  public    : SC_IN (Ttype_t           )  ***  in_RENAME_IN_TYPE          ;//[nb_front_end][nb_inst_decod]
    7275  public    : SC_IN (Toperation_t      )  ***  in_RENAME_IN_OPERATION     ;//[nb_front_end][nb_inst_decod]
     76  public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IN_NO_EXECUTE    ;//[nb_front_end][nb_inst_decod]
     77  public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IN_IS_DELAY_SLOT ;//[nb_front_end][nb_inst_decod]
    7378  public    : SC_IN (Tgeneral_data_t   )  ***  in_RENAME_IN_ADDRESS       ;//[nb_front_end][nb_inst_decod]
    7479  public    : SC_IN (Tcontrol_t        )  ***  in_RENAME_IN_HAS_IMMEDIAT  ;//[nb_front_end][nb_inst_decod]
     
    8590  public    : SC_IN (Tspecial_address_t)  ***  in_RENAME_IN_NUM_REG_RE    ;//[nb_front_end][nb_inst_decod]
    8691  public    : SC_IN (Texception_t      )  ***  in_RENAME_IN_EXCEPTION_USE ;//[nb_front_end][nb_inst_decod]
     92  public    : SC_IN (Texception_t      )  ***  in_RENAME_IN_EXCEPTION     ;//[nb_front_end][nb_inst_decod]
    8793
    8894    // ~~~~~[ Interface : "rename_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    94100  public    : SC_OUT(Ttype_t           )   ** out_RENAME_OUT_TYPE         ;//[nb_inst_rename]
    95101  public    : SC_OUT(Toperation_t      )   ** out_RENAME_OUT_OPERATION    ;//[nb_inst_rename]
     102  public    : SC_OUT(Tcontrol_t        )   ** out_RENAME_OUT_NO_EXECUTE   ;//[nb_inst_rename]
     103  public    : SC_OUT(Tcontrol_t        )   ** out_RENAME_OUT_IS_DELAY_SLOT;//[nb_inst_rename]
    96104  public    : SC_OUT(Tgeneral_data_t   )   ** out_RENAME_OUT_ADDRESS      ;//[nb_inst_rename]
    97105  public    : SC_OUT(Tcontrol_t        )   ** out_RENAME_OUT_HAS_IMMEDIAT ;//[nb_inst_rename]
     
    108116  public    : SC_OUT(Tspecial_address_t)   ** out_RENAME_OUT_NUM_REG_RE   ;//[nb_inst_rename]
    109117  public    : SC_OUT(Texception_t      )   ** out_RENAME_OUT_EXCEPTION_USE;//[nb_inst_rename]
     118  public    : SC_OUT(Texception_t      )   ** out_RENAME_OUT_EXCEPTION    ;//[nb_inst_rename]
    110119
    111120    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     121  private   : generic::priority::Priority   * _priority;
    112122
    113123    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    114   private   : uint32_t                        reg_FRONT_END_PRIORITY;
    115124
    116125    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    117   private   : std::list<select_t>             select;
    118126#endif
    119127
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Types.h

    r81 r88  
    1919namespace rename_select {
    2020
    21   class select_t
    22   {
    23   public : uint32_t _front_end ;
    24   public : uint32_t _inst_decod;
    25    
    26   public : select_t (uint32_t front_end,
    27                      uint32_t inst_decod)
    28     {
    29       _front_end  = front_end ;
    30       _inst_decod = inst_decod;
    31     }
    32   };
    33 
    3421}; // end namespace rename_select
    3522}; // end namespace rename_unit
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Parameters.cpp

    r81 r88  
    2222  Parameters::Parameters (uint32_t          nb_front_end         ,
    2323                          uint32_t *        nb_context           ,
     24//                           uint32_t          size_front_end_id    ,
     25//                           uint32_t          size_context_id      ,
    2426                          uint32_t          max_branch_speculated,
    2527                          uint32_t          size_general_data    ,
     
    2830                          uint32_t          nb_front_end_select  ,
    2931                          Tpriority_t       priority             ,
    30                           Tload_balancing_t load_balancing       )
     32                          Tload_balancing_t load_balancing       ,
     33                          bool              is_toplevel)
    3134  {
    3235    log_printf(FUNC,Rename_select,FUNCTION,"Begin");
     
    3538    _nb_context            = nb_context           ;
    3639    _max_branch_speculated = max_branch_speculated;
    37     _size_general_data     = size_general_data    ;
    3840    _nb_inst_rename        = nb_inst_rename       ;
    3941    _nb_inst_decod         = nb_inst_decod        ;
     
    4446    _max_nb_inst_decod     = max<uint32_t>(nb_inst_decod,nb_front_end);
    4547
    46     _size_front_end_id     = log2(nb_front_end);
    47     _size_context_id       = log2(max<uint32_t>(nb_context,nb_front_end));
    48     _size_depth            = log2(max_branch_speculated);
     48    test();
    4949
    50     _have_port_front_end_id= _size_front_end_id > 0;
    51     _have_port_context_id  = _size_context_id   > 0;
    52     _have_port_depth       = _size_depth        > 0;
     50    if (is_toplevel)
     51      {
     52        _size_general_data     = size_general_data    ;
     53        _size_depth            = log2(max_branch_speculated);
     54        _size_front_end_id     = log2(_nb_front_end);
     55        _size_context_id       = log2(max<uint32_t>(_nb_context,_nb_front_end));
    5356       
    54     test();
     57        _have_port_front_end_id= _size_front_end_id > 0;
     58        _have_port_context_id  = _size_context_id   > 0;
     59        _have_port_depth       = _size_depth        > 0;
     60       
     61        copy();
     62      }
     63
    5564    log_printf(FUNC,Rename_select,FUNCTION,"End");
    5665  };
     
    7382  };
    7483
     84#undef  FUNCTION
     85#define FUNCTION "Rename_select::copy"
     86  void Parameters::copy (void)
     87  {
     88    log_printf(FUNC,Rename_select,FUNCTION,"Begin");
     89    log_printf(FUNC,Rename_select,FUNCTION,"End");
     90  };
     91
    7592}; // end namespace rename_select
    7693}; // end namespace rename_unit
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select.cpp

    r81 r88  
    3838    log_printf(FUNC,Rename_select,FUNCTION,"Begin");
    3939
     40#if DEBUG_Core == true
     41    log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str());
     42
     43    std::cout << *param << std::endl;
     44#endif   
     45
    4046    log_printf(INFO,Rename_select,FUNCTION,"Allocation");
    4147
     
    4753
    4854#ifdef STATISTICS
    49     if (_usage & USE_STATISTICS)
     55    if (usage_is_set(_usage,USE_STATISTICS))
    5056      {
    5157        log_printf(INFO,Rename_select,FUNCTION,"Allocation of statistics");
     
    5662
    5763#ifdef VHDL
    58     if (_usage & USE_VHDL)
     64    if (usage_is_set(_usage,USE_VHDL))
    5965      {
    6066        // generate the vhdl
     
    6672
    6773#ifdef SYSTEMC
    68     if (_usage & USE_SYSTEMC)
     74    if (usage_is_set(_usage,USE_SYSTEMC))
    6975      {
    7076        log_printf(INFO,Rename_select,FUNCTION,"Method - transition");
     
    8995                        << (*(in_RENAME_IN_TYPE          [i][j]))
    9096                        << (*(in_RENAME_IN_OPERATION     [i][j]))
     97                        << (*(in_RENAME_IN_NO_EXECUTE    [i][j]))
     98                        << (*(in_RENAME_IN_IS_DELAY_SLOT [i][j]))
    9199                        << (*(in_RENAME_IN_ADDRESS       [i][j]))
    92100                        << (*(in_RENAME_IN_HAS_IMMEDIAT  [i][j]))
     
    102110                        << (*(in_RENAME_IN_WRITE_RE      [i][j]))
    103111                        << (*(in_RENAME_IN_NUM_REG_RE    [i][j]))
    104                         << (*(in_RENAME_IN_EXCEPTION_USE [i][j]));
     112                        << (*(in_RENAME_IN_EXCEPTION_USE [i][j]))
     113                        << (*(in_RENAME_IN_EXCEPTION     [i][j]));
    105114              if (_param->_have_port_front_end_id)
    106115              sensitive << (*(in_RENAME_IN_FRONT_END_ID  [i][j]));
     
    150159                  (*(out_RENAME_OUT_OPERATION     [x])) (*(in_RENAME_IN_VAL           [i][j]));
    151160                  (*(out_RENAME_OUT_OPERATION     [x])) (*(in_RENAME_IN_OPERATION     [i][j]));
     161                  (*(out_RENAME_OUT_NO_EXECUTE    [x])) (*(in_RENAME_IN_VAL           [i][j]));
     162                  (*(out_RENAME_OUT_NO_EXECUTE    [x])) (*(in_RENAME_IN_NO_EXECUTE    [i][j]));
     163                  (*(out_RENAME_OUT_IS_DELAY_SLOT [x])) (*(in_RENAME_IN_VAL           [i][j]));
     164                  (*(out_RENAME_OUT_IS_DELAY_SLOT [x])) (*(in_RENAME_IN_IS_DELAY_SLOT [i][j]));
    152165                  (*(out_RENAME_OUT_ADDRESS       [x])) (*(in_RENAME_IN_VAL           [i][j]));
    153166                  (*(out_RENAME_OUT_ADDRESS       [x])) (*(in_RENAME_IN_ADDRESS       [i][j]));
     
    178191                  (*(out_RENAME_OUT_EXCEPTION_USE [x])) (*(in_RENAME_IN_VAL           [i][j]));
    179192                  (*(out_RENAME_OUT_EXCEPTION_USE [x])) (*(in_RENAME_IN_EXCEPTION_USE [i][j]));
     193                  (*(out_RENAME_OUT_EXCEPTION     [x])) (*(in_RENAME_IN_VAL           [i][j]));
     194                  (*(out_RENAME_OUT_EXCEPTION     [x])) (*(in_RENAME_IN_EXCEPTION     [i][j]));
    180195                }
    181196          }
     
    194209
    195210#ifdef STATISTICS
    196     if (_usage & USE_STATISTICS)
     211    if (usage_is_set(_usage,USE_STATISTICS))
    197212      {
    198213        log_printf(INFO,Rename_select,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_allocation.cpp

    r81 r88  
    5858    // ~~~~~[ Interface : "rename_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5959    {
    60       ALLOC2_INTERFACE("rename_in", IN, EAST, "output of decod's stage", _param->_nb_front_end, _param->_nb_inst_decod[alloc_interface_it1]);
     60      ALLOC2_INTERFACE("rename_in", IN, EAST, "output of decod's stage", _param->_nb_front_end, _param->_nb_inst_decod[it1]);
    6161     
    62       _ALLOC2_VALACK_IN ( in_RENAME_IN_VAL           ,VAL, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    63       _ALLOC2_VALACK_OUT(out_RENAME_IN_ACK           ,ACK, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    64       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_FRONT_END_ID  ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id          , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    65       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_CONTEXT_ID    ,"context_id"   ,Tcontext_t        ,_param->_size_context_id            , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    66       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_DEPTH         ,"depth"        ,Tdepth_t          ,_param->_size_depth                 , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    67       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_TYPE          ,"type"         ,Ttype_t           ,_param->_size_type                  , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    68       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_OPERATION     ,"operation"    ,Toperation_t      ,_param->_size_operation             , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    69       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS       ,"address"      ,Tgeneral_data_t   ,_param->_size_general_data          , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    70       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAS_IMMEDIAT  ,"has_immediat" ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    71       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IMMEDIAT      ,"immediat"     ,Tgeneral_data_t   ,_param->_size_general_data          , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    72       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RA       ,"read_ra"      ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    73       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RA    ,"num_reg_ra"   ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    74       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RB       ,"read_rb"      ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    75       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RB    ,"num_reg_rb"   ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    76       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RC       ,"read_rc"      ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    77       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RC    ,"num_reg_rc"   ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    78       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RD      ,"write_rd"     ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    79       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RD    ,"num_reg_rd"   ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    80       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RE      ,"write_re"     ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    81       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RE    ,"num_reg_re"   ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
    82       _ALLOC2_SIGNAL_IN ( in_RENAME_IN_EXCEPTION_USE ,"exception_use",Texception_t      ,_param->_size_exception             , _param->_nb_front_end, _param->_nb_inst_decod[alloc_signal_it1]);
     62      _ALLOC2_VALACK_IN ( in_RENAME_IN_VAL           ,VAL, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     63      _ALLOC2_VALACK_OUT(out_RENAME_IN_ACK           ,ACK, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     64      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_FRONT_END_ID  ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id          , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     65      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_CONTEXT_ID    ,"context_id"   ,Tcontext_t        ,_param->_size_context_id            , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     66      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_DEPTH         ,"depth"        ,Tdepth_t          ,_param->_size_depth                 , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     67      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_TYPE          ,"type"         ,Ttype_t           ,_param->_size_type                  , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     68      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_OPERATION     ,"operation"    ,Toperation_t      ,_param->_size_operation             , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     69      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NO_EXECUTE    ,"no_execute"   ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     70      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     71      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS       ,"address"      ,Tgeneral_data_t   ,_param->_size_general_data          , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     72      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAS_IMMEDIAT  ,"has_immediat" ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     73      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IMMEDIAT      ,"immediat"     ,Tgeneral_data_t   ,_param->_size_general_data          , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     74      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RA       ,"read_ra"      ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     75      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RA    ,"num_reg_ra"   ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     76      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RB       ,"read_rb"      ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     77      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RB    ,"num_reg_rb"   ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     78      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RC       ,"read_rc"      ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     79      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RC    ,"num_reg_rc"   ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     80      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RD      ,"write_rd"     ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     81      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RD    ,"num_reg_rd"   ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     82      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RE      ,"write_re"     ,Tcontrol_t        ,1                                   , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     83      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RE    ,"num_reg_re"   ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     84      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_EXCEPTION_USE ,"exception_use",Texception_t      ,_param->_size_exception             , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
     85      _ALLOC2_SIGNAL_IN ( in_RENAME_IN_EXCEPTION     ,"exception"    ,Texception_t      ,_param->_size_exception             , _param->_nb_front_end, _param->_nb_inst_decod[it1]);
    8386    }
    8487
     
    9497      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_TYPE          ,"type"         ,Ttype_t           ,_param->_size_type                  );
    9598      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_OPERATION     ,"operation"    ,Toperation_t      ,_param->_size_operation             );
     99      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_NO_EXECUTE    ,"no_execute"   ,Tcontrol_t        ,1                                   );
     100      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t        ,1                                   );
    96101      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_ADDRESS       ,"address"      ,Tgeneral_data_t   ,_param->_size_general_data          );
    97102      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_HAS_IMMEDIAT  ,"has_immediat" ,Tcontrol_t        ,1                                   );
     
    108113      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_NUM_REG_RE    ,"num_reg_re"   ,Tspecial_address_t,_param->_size_special_register_logic);
    109114      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_EXCEPTION_USE ,"exception_use",Texception_t      ,_param->_size_exception             );
     115      ALLOC1_SIGNAL_OUT(out_RENAME_OUT_EXCEPTION     ,"exception"    ,Texception_t      ,_param->_size_exception             );
    110116    }
    111117
    112 
    113118    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     119    _priority = new generic::priority::Priority (_name+"_priority"      ,
     120                                                 _param->_priority      ,
     121                                                 _param->_load_balancing,
     122                                                 _param->_nb_front_end  ,
     123                                                 _param->_nb_inst_decod ,
     124                                                 _param->_nb_front_end_select);
    114125
    115126#ifdef POSITION
    116     _component->generate_file();
     127    if (usage_is_set(_usage,USE_POSITION))
     128      _component->generate_file();
    117129#endif
    118130
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_deallocation.cpp

    r81 r88  
    2323    log_printf(FUNC,Rename_select,FUNCTION,"Begin");
    2424
    25     if (_usage & USE_SYSTEMC)
     25    if (usage_is_set(_usage,USE_SYSTEMC))
    2626      {
    2727        delete    in_CLOCK ;
     
    3838        delete []  in_RENAME_IN_TYPE          ;
    3939        delete []  in_RENAME_IN_OPERATION     ;
     40        delete []  in_RENAME_IN_NO_EXECUTE    ;
     41        delete []  in_RENAME_IN_IS_DELAY_SLOT ;
    4042        delete []  in_RENAME_IN_ADDRESS       ;
    4143        delete []  in_RENAME_IN_HAS_IMMEDIAT  ;
     
    5254        delete []  in_RENAME_IN_NUM_REG_RE    ;
    5355        delete []  in_RENAME_IN_EXCEPTION_USE ;
     56        delete []  in_RENAME_IN_EXCEPTION     ;
    5457
    5558        delete [] out_RENAME_OUT_VAL          ;
     
    7982      }
    8083    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    81 
     84    delete _priority;
    8285    delete _component;
    8386
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_end_cycle.cpp

    r81 r88  
    2525
    2626#ifdef STATISTICS
    27     _stat->end_cycle();
     27    if (usage_is_set(_usage,USE_STATISTICS))
     28      _stat->end_cycle();
    2829#endif   
    2930
     
    3132    // Evaluation before read the ouput signal
    3233//  sc_start(0);
    33     _interfaces->testbench();
     34    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     35      _interfaces->testbench();
    3436#endif
    3537
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_genMealy.cpp

    r81 r88  
    2222  void Rename_select::genMealy (void)
    2323  {
    24     log_printf(FUNC,Rename_select,FUNCTION,"Begin");
     24    log_begin(Rename_select,FUNCTION);
     25    log_function(Rename_select,FUNCTION,_name.c_str());
    2526
    26     Tcontrol_t ack [_param->_nb_front_end][_param->_max_nb_inst_decod];
     27    Tcontrol_t val                  [_param->_nb_inst_rename];
     28    Tcontrol_t ack                  [_param->_nb_front_end][_param->_max_nb_inst_decod];
     29    Tcontrol_t previous_transaction [_param->_nb_front_end];
     30
     31    for (uint32_t i=0; i<_param->_nb_inst_rename; ++i)
     32      val [i] = false;
    2733    for (uint32_t i=0; i<_param->_nb_front_end; i++)
    28       for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
    29         ack [i][j] = false;
    30    
    31     std::list<select_t>::iterator it=select.begin();
     34      {
     35        previous_transaction [i] = true;
     36        for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
     37          ack [i][j] = false;
     38      }
     39
     40    std::list<generic::priority::select_t> * select = _priority->select();
     41    std::list<generic::priority::select_t>::iterator it=select->begin();
    3242
    3343    for (uint32_t i=0; i<_param->_nb_inst_rename; i++)
    3444      {
    35         Tcontrol_t val = false;
     45        log_printf(TRACE,Rename_select,FUNCTION,"  * inst_rename [%d]",i);
    3646
    37         while ((it != select.end()) and (val == false))
     47        // Scan all instruction until find
     48        while ((it != select->end()) and (val [i] == false))
    3849          {
    39             Tcontext_t x = it->_front_end ;
    40             uint32_t   y = it->_inst_decod;
     50            Tcontext_t x = it->grp;
     51            uint32_t   y = it->elt;
    4152
    42             // Test if this instruction is valid
    43             if (PORT_READ(in_RENAME_IN_VAL[x][y]) == 1)
     53            log_printf(TRACE,Rename_select,FUNCTION,"    * front_end[%d].inst_decod[%d]",x,y);
     54            log_printf(TRACE,Rename_select,FUNCTION,"      * rename_in_val        : %d",PORT_READ(in_RENAME_IN_VAL[x][y]));
     55            log_printf(TRACE,Rename_select,FUNCTION,"      * previous_transaction : %d",previous_transaction[x]);
     56
     57            // Test if this instruction is valid and if all previous instruction of this front end is an valid transaction
     58            if (previous_transaction [x] and
     59                PORT_READ(in_RENAME_IN_VAL[x][y]))
    4460              {
    4561                // Find !!!
    46                 val        = true;
     62                val [i]    = true;
    4763                ack [x][y] = PORT_READ(in_RENAME_OUT_ACK [i]);
     64
     65                log_printf(TRACE,Rename_select,FUNCTION,"      * rename_out_ack       : %d",PORT_READ(in_RENAME_OUT_ACK[i]));
    4866
    4967                if (_param->_have_port_front_end_id)
     
    5573                PORT_WRITE(out_RENAME_OUT_TYPE         [i],PORT_READ(in_RENAME_IN_TYPE          [x][y]));
    5674                PORT_WRITE(out_RENAME_OUT_OPERATION    [i],PORT_READ(in_RENAME_IN_OPERATION     [x][y]));
     75                PORT_WRITE(out_RENAME_OUT_NO_EXECUTE   [i],PORT_READ(in_RENAME_IN_NO_EXECUTE    [x][y]));
     76                PORT_WRITE(out_RENAME_OUT_IS_DELAY_SLOT[i],PORT_READ(in_RENAME_IN_IS_DELAY_SLOT [x][y]));
    5777                PORT_WRITE(out_RENAME_OUT_ADDRESS      [i],PORT_READ(in_RENAME_IN_ADDRESS       [x][y]));
    5878                PORT_WRITE(out_RENAME_OUT_HAS_IMMEDIAT [i],PORT_READ(in_RENAME_IN_HAS_IMMEDIAT  [x][y]));
     
    6989                PORT_WRITE(out_RENAME_OUT_NUM_REG_RE   [i],PORT_READ(in_RENAME_IN_NUM_REG_RE    [x][y]));
    7090                PORT_WRITE(out_RENAME_OUT_EXCEPTION_USE[i],PORT_READ(in_RENAME_IN_EXCEPTION_USE [x][y]));
     91                PORT_WRITE(out_RENAME_OUT_EXCEPTION    [i],PORT_READ(in_RENAME_IN_EXCEPTION     [x][y]));
    7192              }
     93
     94            // ack = 1 if previous_transaction == true and rename_in_val == true and rename_out == true
     95            previous_transaction [x] = ack [x][y];
    7296
    7397            it ++;
    7498          }
    7599
    76         PORT_WRITE(out_RENAME_OUT_VAL [i], val);
    77100      }
     101
     102    for (uint32_t i=0; i<_param->_nb_inst_rename; ++i)
     103      PORT_WRITE(out_RENAME_OUT_VAL [i], val [i]);
    78104
    79105    for (uint32_t i=0; i<_param->_nb_front_end; i++)
     
    81107        PORT_WRITE(out_RENAME_IN_ACK [i][j], ack [i][j]);
    82108
    83     log_printf(FUNC,Rename_select,FUNCTION,"End");
     109    log_end(Rename_select,FUNCTION);
    84110  };
    85111
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_transition.cpp

    r81 r88  
    2626    if (PORT_READ(in_NRESET) == 0)
    2727      {
    28         select.clear();
    29         reg_FRONT_END_PRIORITY = 0;
     28        _priority->reset();
    3029      }
    3130    else
    3231      {
    33         switch (_param->_priority)
    34           {
    35           case PRIORITY_STATIC :
    36             {
    37               reg_FRONT_END_PRIORITY = (reg_FRONT_END_PRIORITY+_param->_nb_front_end_select)%_param->_nb_front_end;
    38               break;
    39             }
    40           case PRIORITY_ROUND_ROBIN :
    41             {
    42               reg_FRONT_END_PRIORITY = (reg_FRONT_END_PRIORITY+1)%_param->_nb_front_end;
    43               break;
    44             }
    45           default:
    46             {
    47               break;
    48             }
    49           }
    50 
    51         // flush list
    52         select.clear();
    53        
    54         // Compute next scan order !!!
    55         switch (_param->_load_balancing)
    56           {
    57           case LOAD_BALANCING_BALANCE :
    58             {
    59               for (uint32_t j=0; j<_param->_max_nb_inst_decod; j++)
    60                 for (uint32_t i=0; i<_param->_nb_front_end_select; i++)
    61                   {
    62                     uint32_t x=(reg_FRONT_END_PRIORITY+i)%_param->_nb_front_end;
    63                    
    64                     // Test valid inst_decod
    65                     if (j < _param->_nb_inst_decod[x])
    66                       select.push_back(select_t(x,j));
    67                   }
    68                  
    69               break;
    70             }
    71           case LOAD_BALANCING_MAXIMUM_FOR_PRIORITY :
    72             {
    73 
    74               for (uint32_t i=0; i<_param->_nb_front_end_select; i++)
    75                 {
    76                   uint32_t x=(reg_FRONT_END_PRIORITY+i)%_param->_nb_front_end;
    77                  
    78                   for (uint32_t j=0; j<_param->_nb_inst_decod[x]; j++)
    79                     select.push_back(select_t(x,j));
    80                 }
    81 
    82               break;
    83             }
    84           default :
    85             {
    86               break;
    87             }
    88           }
     32        _priority->transition();
    8933
    9034// #if (DEBUG >= DEBUG_TRACE)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/include/Custom_default.h

    r81 r88  
    2626  custom_vhdl_t               * default_get_vhdl_execute              (void);
    2727 
    28   custom_information_t          default_get_custom_information        (uint32_t     context);
     28//custom_information_t          default_get_custom_information        (uint32_t     context);
     29  custom_information_t          default_get_custom_information        (void);
    2930
    3031}; // end namespace custom
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/include/Custom_example.h

    r81 r88  
    2626  custom_vhdl_t               * example_get_vhdl_execute              (void);
    2727
    28   custom_information_t          example_get_custom_information        (uint32_t     context);
     28//custom_information_t          example_get_custom_information        (uint32_t     context);
     29  custom_information_t          example_get_custom_information        (void);
    2930
    3031}; // end namespace custom
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/src/Custom_default.cpp

    r81 r88  
    223223#undef  FUNCTION
    224224#define FUNCTION "custom::default_get_custom_information"
    225   custom_information_t default_get_custom_information (uint32_t context)
     225//custom_information_t default_get_custom_information (uint32_t context)
     226  custom_information_t default_get_custom_information (void)
    226227  {
    227228    custom_information_t info;
     
    236237    info._get_vhdl_decod                = &morpheo::behavioural::custom::default_get_vhdl_decod               ;
    237238    info._get_vhdl_execute              = &morpheo::behavioural::custom::default_get_vhdl_execute             ;
     239
    238240    return info;
    239241  }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/src/Custom_example.cpp

    r81 r88  
    265265#undef  FUNCTION
    266266#define FUNCTION "custom::example_get_custom_information"
    267   custom_information_t example_get_custom_information (uint32_t context)
    268   {
    269     // for all context
    270 
     267//custom_information_t example_get_custom_information (uint32_t context)
     268  custom_information_t example_get_custom_information (void)
     269  {
    271270    custom_information_t info;
    272271   
     
    280279    info._get_vhdl_decod                = &morpheo::behavioural::custom::example_get_vhdl_decod               ;
    281280    info._get_vhdl_execute              = &morpheo::behavioural::custom::example_get_vhdl_execute             ;
     281
    282282    return info;
    283283  }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Counter_library_clean
    2525
     26local_clean                     :
     27
    2628include                         ../Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp

    r82 r88  
    3737#endif
    3838
     39  Tusage_t _usage = USE_ALL;
     40
     41//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     42//   _usage = usage_unset(_usage,USE_VHDL                 );
     43//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     44//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     45//   _usage = usage_unset(_usage,USE_POSITION             );
     46//   _usage = usage_unset(_usage,USE_STATISTICS           );
     47//   _usage = usage_unset(_usage,USE_INFORMATION          );
     48
    3949  Counter * _Counter = new Counter (name.c_str(),
    4050#ifdef STATISTICS
     
    4252#endif
    4353                                    param,
    44                                     USE_ALL);
     54                                    _usage);
    4555 
    4656#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h

    r82 r88  
    8585  public  :          ~Counter             (void);
    8686                                               
    87 #ifdef SYSTEMC                                 
    8887  private : void     allocation                (void);
    8988  private : void     deallocation              (void);
    9089                                               
     90#ifdef SYSTEMC                                 
    9191#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    9292  public  : void     transition                (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Parameters.h

    r81 r88  
    2929  public : Parameters  (uint32_t size_data,
    3030                        uint32_t nb_port  );
    31   public : Parameters  (Parameters & param) ;
     31//   public : Parameters  (Parameters & param) ;
    3232  public : ~Parameters () ;
     33
     34  public :        void             copy       (void);
    3335
    3436  public :        Parameters_test  msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter.cpp

    r82 r88  
    3232    log_printf(FUNC,Counter,"Counter","Begin");
    3333
    34 #ifdef SYSTEMC
     34#if DEBUG_Counter == true
     35    log_printf(INFO,Counter,FUNCTION,_("<%s> Parameters"),_name.c_str());
     36
     37    std::cout << param << std::endl;
     38#endif   
     39
     40    log_printf(INFO,Core,FUNCTION,_("<%s> Allocation"),_name.c_str());
    3541    allocation ();
    36 #endif
    3742
    3843#ifdef STATISTICS
    39     // Allocation of statistics
    40     statistics_declaration(param_statistics);
     44    if (usage_is_set(_usage,USE_STATISTICS))
     45      {
     46        log_printf(INFO,Core,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str());
     47
     48        // Allocation of statistics
     49        statistics_declaration(param_statistics);
     50      }
    4151#endif
    4252
    4353#ifdef VHDL
    44     // generate the vhdl
    45     vhdl();
     54    if (usage_is_set(_usage,USE_VHDL))
     55      {
     56        // generate the vhdl
     57        log_printf(INFO,Core,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
     58       
     59        vhdl();
     60      }
    4661#endif
    4762
    4863#ifdef SYSTEMC
    4964
     65    if (usage_is_set(_usage,USE_SYSTEMC))
     66      {
    5067#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    51     SC_METHOD (transition);
    52     dont_initialize ();
    53     sensitive << (*(in_CLOCK)).pos();
     68        log_printf(INFO,Core,FUNCTION,_("<%s> Method - transition"),_name.c_str());
     69
     70        SC_METHOD (transition);
     71        dont_initialize ();
     72        sensitive << (*(in_CLOCK)).pos();
    5473#endif
    5574
    56     SC_METHOD (genMealy);
    57     dont_initialize ();
    58     for (uint32_t i=0; i<_param._nb_port; i++)
    59       sensitive << *(in_COUNTER_DATA   [i])
    60                 << *(in_COUNTER_ADDSUB [i]);
    61 
     75        log_printf(INFO,Core,FUNCTION,_("<%s> Method - genMealy"),_name.c_str());
     76        SC_METHOD (genMealy);
     77        dont_initialize ();
     78        for (uint32_t i=0; i<_param._nb_port; i++)
     79          sensitive << *(in_COUNTER_DATA   [i])
     80                    << *(in_COUNTER_ADDSUB [i]);
     81       
    6282#ifdef SYSTEMCASS_SPECIFIC
    63     // List dependency information
    64     for (uint32_t i=0; i<_param._nb_port; i++)
    65       {
    66         (*(out_COUNTER_DATA [i])) (*(in_COUNTER_DATA   [i]));
    67         (*(out_COUNTER_DATA [i])) (*(in_COUNTER_ADDSUB [i]));
     83        // List dependency information
     84        for (uint32_t i=0; i<_param._nb_port; i++)
     85          {
     86            (*(out_COUNTER_DATA [i])) (*(in_COUNTER_DATA   [i]));
     87            (*(out_COUNTER_DATA [i])) (*(in_COUNTER_ADDSUB [i]));
     88          }
     89#endif   
    6890      }
    69 #endif   
    7091
    7192#endif
     
    7697  {
    7798    log_printf(FUNC,Counter,"~Counter","Begin");
    78 #ifdef SYSTEMC
    79     deallocation ();
     99
     100#ifdef STATISTICS
     101    if (usage_is_set(_usage,USE_STATISTICS))
     102      {
     103        delete _stat;
     104      }
    80105#endif
    81106
    82 #ifdef STATISTICS
    83     delete _stat;
    84 #endif
     107    log_printf(INFO,Core,FUNCTION,_("<%s> Deallocation"),_name.c_str());
     108    deallocation ();
     109
    85110    log_printf(FUNC,Counter,"~Counter","End");
    86111  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp

    r82 r88  
    1 #ifdef SYSTEMC
    21/*
    32 * $Id$
    43 *
    5  * [ Description ]
     4 * [ Description ]
    65 *
    76 */
     
    2928    _interfaces = entity->set_interfaces();
    3029
    31     // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     30    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3231    {
    3332      Interface * interface = _interfaces->set_interface(""
     
    4342    }
    4443
    45     // ~~~~~[ Interface : "counter" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     44    // ~~~~~[ Interface : "counter" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4645     {
    4746        in_COUNTER_DATA  = new SC_IN (Tdata_t)    * [_param._nb_port];
     
    6463         }
    6564     }
     65
    6666#ifdef POSITION
    67     _component->generate_file();
     67     if (usage_is_set(_usage,USE_POSITION))
     68       _component->generate_file();
    6869#endif
    6970
    70     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     71    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    7172    log_printf(FUNC,Counter,"allocation","End");
    7273  };
     
    7778}; // end namespace behavioural
    7879}; // end namespace morpheo             
    79 #endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_deallocation.cpp

    r81 r88  
    1 #ifdef SYSTEMC
    21/*
    32 * $Id$
     
    1918    log_printf(FUNC,Counter,"deallocation","Begin");
    2019
    21     delete     in_CLOCK;
    22     delete     in_NRESET;
    23    
    24     delete []  in_COUNTER_DATA  ;
    25     delete []  in_COUNTER_ADDSUB;
    26     delete [] out_COUNTER_DATA  ;
    27    
     20    if (usage_is_set(_usage,USE_SYSTEMC))
     21      {
     22        delete     in_CLOCK;
     23        delete     in_NRESET;
     24       
     25        delete []  in_COUNTER_DATA  ;
     26        delete []  in_COUNTER_ADDSUB;
     27        delete [] out_COUNTER_DATA  ;
     28      }
     29
    2830    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    2931
     
    3840}; // end namespace behavioural
    3941}; // end namespace morpheo             
    40 #endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_end_cycle.cpp

    r81 r88  
    2020
    2121#ifdef STATISTICS
    22     _stat->end_cycle();
     22    if (usage_is_set(_usage,USE_STATISTICS))
     23      _stat->end_cycle();
    2324#endif   
    2425
     
    2627    // Evaluation before read the ouput signal
    2728//  sc_start(0);
    28     _interfaces->testbench();
     29    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     30      _interfaces->testbench();
    2931#endif
    3032
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Parameters.cpp

    r81 r88  
    2525  };
    2626 
    27   Parameters::Parameters (Parameters & param):
    28     _size_data(param._size_data),
    29     _nb_port  (param._nb_port  ),
    30     _data_max (param._data_max )
    31   {
    32     log_printf(FUNC,Counter,"Parameters","Begin");
    33     test();
    34     log_printf(FUNC,Counter,"Parameters","End");
    35   };
     27//   Parameters::Parameters (Parameters & param):
     28//     _size_data(param._size_data),
     29//     _nb_port  (param._nb_port  ),
     30//     _data_max (param._data_max )
     31//   {
     32//     log_printf(FUNC,Counter,"Parameters","Begin");
     33//     test();
     34//     log_printf(FUNC,Counter,"Parameters","End");
     35//   };
    3636
    3737  Parameters::~Parameters ()
     
    4141  };
    4242
     43  void Parameters::copy (void)
     44  {
     45    log_printf(FUNC,Counter,"copy","Begin");
     46    log_printf(FUNC,Counter,"copy","End");
     47  };
     48
    4349}; // end namespace counter
    4450}; // end namespace generic
    45 
    4651}; // end namespace behavioural
    4752}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Queue_library_clean
    2525
     26local_clean                     :
     27
    2628include                         ../Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/test.cpp

    r82 r88  
    2222#endif
    2323
     24  Tusage_t _usage = USE_ALL;
     25
     26//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     27//   _usage = usage_unset(_usage,USE_VHDL                 );
     28//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     30//   _usage = usage_unset(_usage,USE_POSITION             );
     31//   _usage = usage_unset(_usage,USE_STATISTICS           );
     32//   _usage = usage_unset(_usage,USE_INFORMATION          );
     33
    2434  Queue * _Queue = new Queue
    2535    (name.c_str(),
     
    2838#endif
    2939     _param,
    30      USE_ALL);
     40     _usage);
    3141 
    3242#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/include/Parameters.h

    r81 r88  
    2929  public : Parameters  (uint32_t size_queue,
    3030                        uint32_t size_data );
    31   public : Parameters  (Parameters & param) ;
     31//   public : Parameters  (Parameters & param) ;
    3232  public : ~Parameters () ;
     33
     34  public :        void            copy       (void);
    3335
    3436  public :        Parameters_test msg_error  (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Parameters.cpp

    r81 r88  
    2626  };
    2727 
     28// #undef  FUNCTION
     29// #define FUNCTION "Queue::Parameters (copy)"
     30//   Parameters::Parameters (Parameters & param):
     31//     _size_queue (param._size_queue),
     32//     _size_data  (param._size_data )
     33//   {
     34//     log_printf(FUNC,Queue,FUNCTION,"Begin");
     35//     test();
     36//     log_printf(FUNC,Queue,FUNCTION,"End");
     37//   };
     38
    2839#undef  FUNCTION
    29 #define FUNCTION "Queue::Parameters (copy)"
    30   Parameters::Parameters (Parameters & param):
    31     _size_queue (param._size_queue),
    32     _size_data  (param._size_data )
     40#define FUNCTION "Queue::~Parameters"
     41  Parameters::~Parameters ()
    3342  {
    3443    log_printf(FUNC,Queue,FUNCTION,"Begin");
    35     test();
    3644    log_printf(FUNC,Queue,FUNCTION,"End");
    3745  };
    3846
    3947#undef  FUNCTION
    40 #define FUNCTION "Queue::~Parameters"
    41   Parameters::~Parameters ()
     48#define FUNCTION "Queue::copy"
     49  void Parameters::copy (void)
    4250  {
    4351    log_printf(FUNC,Queue,FUNCTION,"Begin");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue.cpp

    r81 r88  
    3535    log_printf(FUNC,Queue,FUNCTION,"Begin");
    3636
     37#if DEBUG_Core == true
     38    log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str());
     39
     40    std::cout << *param << std::endl;
     41#endif   
     42
    3743    log_printf(INFO,Queue,FUNCTION,"Allocation");
    3844    allocation ();
    3945
    4046#ifdef STATISTICS
    41     if (_usage & USE_STATISTICS)
     47    if (usage_is_set(_usage,USE_STATISTICS))
    4248      {
    4349        log_printf(INFO,Queue,FUNCTION,"Allocation of statistics");
     
    4854
    4955#ifdef VHDL
    50     if (_usage & USE_VHDL)
     56    if (usage_is_set(_usage,USE_VHDL))
    5157      {
    5258        // generate the vhdl
     
    5864
    5965#ifdef SYSTEMC
    60     if (_usage & USE_SYSTEMC)
     66    if (usage_is_set(_usage,USE_SYSTEMC))
    6167      {
    6268        log_printf(INFO,Queue,FUNCTION,"Method - transition");
     
    9298
    9399#ifdef STATISTICS
    94     if (_usage & USE_STATISTICS)
     100    if (usage_is_set(_usage,USE_STATISTICS))
    95101      {
    96102        log_printf(INFO,Queue,FUNCTION,"Generate Statistics file");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_allocation.cpp

    r81 r88  
    7575    }
    7676     
     77    if (usage_is_set(_usage,USE_SYSTEMC))
     78      {
    7779    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    7880    _queue_control = new morpheo::behavioural::generic::queue_control::Queue_Control::Queue_Control(_param->_size_queue);
    7981    _queue_data    = new Tdata_t [_param->_size_queue];
     82      }
    8083
    8184    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    8285
    8386#ifdef POSITION
    84     _component->generate_file();
     87    if (usage_is_set(_usage,USE_POSITION))
     88      _component->generate_file();
    8589#endif
    8690
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_deallocation.cpp

    r81 r88  
    2020    log_printf(FUNC,Queue,FUNCTION,"Begin");
    2121
    22     if (_usage & USE_SYSTEMC)
     22    if (usage_is_set(_usage,USE_SYSTEMC))
    2323      {
    2424        delete    in_CLOCK ;
     
    3333        delete   out_RETIRE_DATA;
    3434       
     35        // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     36        delete _queue_control;
     37        delete _queue_data;
    3538      }
    36     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    37     delete _queue_control;
    38     delete _queue_data;
     39
    3940    delete _component;
    4041
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_end_cycle.cpp

    r81 r88  
    2121
    2222#ifdef STATISTICS
    23     _stat->end_cycle();
     23    if (usage_is_set(_usage,USE_STATISTICS))
     24      _stat->end_cycle();
    2425#endif   
    2526
     
    2728    // Evaluation before read the ouput signal
    2829//  sc_start(0);
    29     _interfaces->testbench();
     30    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     31      _interfaces->testbench();
    3032#endif
    3133
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/Makefile

    r81 r88  
    2323library_clean                   : RegisterFile_Monolithic_library_clean
    2424
     25local_clean                     :
     26
    2527include                         ../Makefile.deps
    2628include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp

    r82 r88  
    3232      exit (EXIT_FAILURE);
    3333    }
     34
     35  Tusage_t _usage = USE_ALL;
     36
     37//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     38//   _usage = usage_unset(_usage,USE_VHDL                 );
     39//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     40//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     41//   _usage = usage_unset(_usage,USE_POSITION             );
     42//   _usage = usage_unset(_usage,USE_STATISTICS           );
     43//   _usage = usage_unset(_usage,USE_INFORMATION          );
    3444
    3545#ifdef STATISTICS
     
    4252#endif
    4353     ,_param
    44      ,USE_ALL);
     54     ,_usage);
    4555 
    4656#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Parameters.h

    r81 r88  
    3434                       uint32_t nb_word      ,
    3535                       uint32_t size_word    );
    36   public : Parameters (Parameters & param) ;
     36//   public : Parameters (Parameters & param) ;
    3737  public : ~Parameters () ;
    3838
     39  public :        void            copy       (void);
     40
    3941  public :        Parameters_test msg_error  (void);
     42
    4043  public :        std::string   print      (uint32_t depth);
    4144  public : friend std::ostream& operator<< (std::ostream& output_stream,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/Parameters.cpp

    r81 r88  
    3232  };
    3333 
    34   Parameters::Parameters (Parameters & param) :
    35     _nb_port_read      (param._nb_port_read ),
    36     _nb_port_write     (param._nb_port_write),
    37     _nb_port_read_write(param._nb_port_read_write),
    38     _nb_word           (param._nb_word      ),
    39     _size_word         (param._size_word    ),
    40     _size_address      (param._size_address ),
    41     _have_port_address (param._have_port_address)
     34//   Parameters::Parameters (Parameters & param) :
     35//     _nb_port_read      (param._nb_port_read ),
     36//     _nb_port_write     (param._nb_port_write),
     37//     _nb_port_read_write(param._nb_port_read_write),
     38//     _nb_word           (param._nb_word      ),
     39//     _size_word         (param._size_word    ),
     40//     _size_address      (param._size_address ),
     41//     _have_port_address (param._have_port_address)
     42//   {
     43//     test();
     44//   };
     45
     46  Parameters::~Parameters ()
    4247  {
    43     test();
    4448  };
    4549
    46   Parameters::~Parameters ()
    47   { };
     50  void Parameters::copy (void)
     51  {
     52  };
    4853
    4954}; // end namespace registerfile_monolithic
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic.cpp

    r81 r88  
    3333    log_printf(FUNC,RegisterFile_Monolithic,"RegisterFile_Monolithic","Begin");
    3434
     35#if DEBUG_RegisterFile_Monolithic == true
     36    log_printf(INFO,RegisterFile_Monolithic,FUNCTION,_("<%s> Parameters"),_name.c_str());
     37
     38    std::cout << *param << std::endl;
     39#endif   
     40
    3541    log_printf(INFO,RegisterFile_Monolithic,"RegisterFile_Monolithic","Allocation");
    3642    allocation ();
    3743
    3844#ifdef STATISTICS
    39     if (_usage & USE_STATISTICS)
     45    if (usage_is_set(_usage,USE_STATISTICS))
    4046      statistics_declaration(param_statistics);
    4147#endif
     
    4753
    4854#ifdef SYSTEMC
    49     if (_usage & USE_SYSTEMC)
     55    if (usage_is_set(_usage,USE_SYSTEMC))
    5056      {
    5157        SC_METHOD (transition);
     
    102108  {
    103109#ifdef STATISTICS
    104     if (_usage & USE_STATISTICS)
     110    if (usage_is_set(_usage,USE_STATISTICS))
    105111      delete _stat;
    106112#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_allocation.cpp

    r81 r88  
    120120
    121121    // ----- Register
    122     reg_DATA = new Tdata_t [_param->_nb_word];
     122    if (usage_is_set(_usage,USE_SYSTEMC))
     123      reg_DATA = new Tdata_t [_param->_nb_word];
    123124   
    124125#ifdef POSITION
    125     _component->generate_file();
     126    if (usage_is_set(_usage,USE_POSITION))
     127      _component->generate_file();
    126128#endif
    127129  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_deallocation.cpp

    r81 r88  
    1818    delete _component;
    1919
    20     if (_usage & USE_SYSTEMC)
     20    if (usage_is_set(_usage,USE_SYSTEMC))
    2121      {
    2222        delete    in_CLOCK;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_end_cycle.cpp

    r81 r88  
    2020
    2121#ifdef STATISTICS
    22     _stat->end_cycle();
     22    if (usage_is_set(_usage,USE_STATISTICS))
     23      _stat->end_cycle();
    2324#endif   
    2425
     
    2728   
    2829//  sc_start(0);
    29     _interfaces->testbench();
     30    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     31      _interfaces->testbench();
    3032#endif
    3133
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp

    r81 r88  
    2424          {
    2525#ifdef STATISTICS
    26             (*_stat_nb_write) ++;
     26            if (usage_is_set(_usage,USE_STATISTICS))
     27              (*_stat_nb_write) ++;
    2728#endif   
    2829
     
    4950              {
    5051#ifdef STATISTICS
    51                 (*_stat_nb_write) ++;
     52                if (usage_is_set(_usage,USE_STATISTICS))
     53                  (*_stat_nb_write) ++;
    5254#endif   
    5355               
     
    6769            else
    6870              {
    69                 (*_stat_nb_read) ++;
     71                if (usage_is_set(_usage,USE_STATISTICS))
     72                  (*_stat_nb_read) ++;
    7073              }
    7174#endif   
     
    7477
    7578#ifdef STATISTICS
    76     for (uint32_t i=0; i<_param->_nb_port_read; i++)
    77       if ( PORT_READ(in_READ_VAL [i]) == 1)
    78         (*_stat_nb_read) ++;
     79    if (usage_is_set(_usage,USE_STATISTICS))
     80      for (uint32_t i=0; i<_param->_nb_port_read; i++)
     81        if ( PORT_READ(in_READ_VAL [i]) == 1)
     82          (*_stat_nb_read) ++;
    7983#endif   
    8084
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : RegisterFile_Multi_Banked_library_clean
    2525
     26local_clean                     :
     27
    2628include                         ../Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/src/test.cpp

    r82 r88  
    2323#endif
    2424
     25  Tusage_t _usage = USE_ALL;
     26
     27//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     28//   _usage = usage_unset(_usage,USE_VHDL                 );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     31//   _usage = usage_unset(_usage,USE_POSITION             );
     32   _usage = usage_unset(_usage,USE_STATISTICS           );
     33//   _usage = usage_unset(_usage,USE_INFORMATION          );
     34
    2535  RegisterFile_Multi_Banked * _RegisterFile_Multi_Banked = new RegisterFile_Multi_Banked
    2636    (name.c_str(),
     
    2939#endif
    3040     _param,
    31      USE_ALL);
     41     _usage);
    3242 
    3343#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Parameters.h

    r81 r88  
    6161                        uint32_t    nb_port_write_by_bank,
    6262                        Tcrossbar_t crossbar             );
    63   public : Parameters  (Parameters & param) ;
     63//   public : Parameters  (Parameters & param) ;
    6464  public : ~Parameters () ;
    6565
     66  public :        void            copy       (void);
     67
    6668  public :        Parameters_test msg_error  (void);
    67   public :        std::string   print      (uint32_t depth);
    68   public : friend std::ostream& operator<< (std::ostream& output_stream,
    69                                             morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters & x);
     69
     70  public :        std::string     print      (uint32_t depth);
     71  public : friend std::ostream&   operator<< (std::ostream& output_stream,
     72                                              morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters & x);
    7073  };
    7174
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/RegisterFile_Multi_Banked.h

    r82 r88  
    106106  public  :          ~RegisterFile_Multi_Banked             (void);
    107107                                               
    108 #ifdef SYSTEMC                                 
    109108  private : void     allocation                (void);
    110109  private : void     deallocation              (void);
    111110                                               
     111#ifdef SYSTEMC                                 
    112112  private : Taddress_t address_bank                 (Taddress_t address);
    113113  private : Taddress_t address_num_reg              (Taddress_t address);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/Parameters.cpp

    r81 r88  
    8787  };
    8888 
    89   Parameters::Parameters (Parameters & param):
    90     _nb_port_read          (param._nb_port_read         ),
    91     _nb_port_write         (param._nb_port_write        ),
    92     _nb_word               (param._nb_word              ),
    93     _size_word             (param._size_word            ),
    94     _nb_bank               (param._nb_bank              ),
    95     _nb_port_read_by_bank  (param._nb_port_read_by_bank ),
    96     _nb_port_write_by_bank (param._nb_port_write_by_bank),
    97     _crossbar              (param._crossbar             ),
    98     _size_address          (param._size_address         ),
    99     _size_address_by_bank  (param._size_address_by_bank ),
    100     _bank_shift            (param._bank_shift           ),
    101     _bank_mask             (param._bank_mask            ),
    102     _num_reg_shift         (param._num_reg_shift        ),
    103     _num_reg_mask          (param._num_reg_mask         ),
    104     _nb_word_by_bank       (param._nb_word_by_bank      ),
    105     _have_port_address     (param._have_port_address     ),
    106     _have_bank_port_address(param._have_bank_port_address)
    107   {
    108     log_printf(FUNC,RegisterFile_Multi_Banked,"Parameters (copy)","Begin");
     89//   Parameters::Parameters (Parameters & param):
     90//     _nb_port_read          (param._nb_port_read         ),
     91//     _nb_port_write         (param._nb_port_write        ),
     92//     _nb_word               (param._nb_word              ),
     93//     _size_word             (param._size_word            ),
     94//     _nb_bank               (param._nb_bank              ),
     95//     _nb_port_read_by_bank  (param._nb_port_read_by_bank ),
     96//     _nb_port_write_by_bank (param._nb_port_write_by_bank),
     97//     _crossbar              (param._crossbar             ),
     98//     _size_address          (param._size_address         ),
     99//     _size_address_by_bank  (param._size_address_by_bank ),
     100//     _bank_shift            (param._bank_shift           ),
     101//     _bank_mask             (param._bank_mask            ),
     102//     _num_reg_shift         (param._num_reg_shift        ),
     103//     _num_reg_mask          (param._num_reg_mask         ),
     104//     _nb_word_by_bank       (param._nb_word_by_bank      ),
     105//     _have_port_address     (param._have_port_address     ),
     106//     _have_bank_port_address(param._have_bank_port_address)
     107//   {
     108//     log_printf(FUNC,RegisterFile_Multi_Banked,"Parameters (copy)","Begin");
    109109
    110     if (_crossbar == PARTIAL_CROSSBAR)
    111       {
    112         // All port_src is connected with one port_dest on each bank
     110//     if (_crossbar == PARTIAL_CROSSBAR)
     111//       {
     112//      // All port_src is connected with one port_dest on each bank
    113113       
    114         _link_port_read_to_bank_read     = new uint32_t [_nb_port_read ];
    115 //      _link_port_read_to_num_bank         = new uint32_t [_nb_port_read ];
    116         _link_port_write_to_bank_write   = new uint32_t [_nb_port_write];
    117 //      _link_port_write_to_num_bank        = new uint32_t [_nb_port_write];
     114//      _link_port_read_to_bank_read     = new uint32_t [_nb_port_read ];
     115// //   _link_port_read_to_num_bank         = new uint32_t [_nb_port_read ];
     116//      _link_port_write_to_bank_write   = new uint32_t [_nb_port_write];
     117// //   _link_port_write_to_num_bank        = new uint32_t [_nb_port_write];
    118118
    119         for (uint32_t i=0; i<_nb_port_read         ;i++)
    120           {
    121             _link_port_read_to_bank_read   [i] = param._link_port_read_to_bank_read     [i];
    122 //          _link_port_read_to_num_bank       [i] = param._link_port_read_to_num_bank    [i];
    123           }
    124         for (uint32_t i=0; i<_nb_port_write        ;i++)
    125           {
    126             _link_port_write_to_bank_write [i] = param._link_port_write_to_bank_write    [i];
    127 //          _link_port_write_to_num_bank      [i] = param._link_port_write_to_num_bank   [i];
    128           }
    129       }
     119//      for (uint32_t i=0; i<_nb_port_read         ;i++)
     120//        {
     121//          _link_port_read_to_bank_read   [i] = param._link_port_read_to_bank_read     [i];
     122// //       _link_port_read_to_num_bank       [i] = param._link_port_read_to_num_bank    [i];
     123//        }
     124//      for (uint32_t i=0; i<_nb_port_write        ;i++)
     125//        {
     126//          _link_port_write_to_bank_write [i] = param._link_port_write_to_bank_write    [i];
     127// //       _link_port_write_to_num_bank      [i] = param._link_port_write_to_num_bank   [i];
     128//        }
     129//       }
    130130
    131     test();
    132     log_printf(FUNC,RegisterFile_Multi_Banked,"Parameters (copy)","End");
    133   };
     131//     test();
     132//     log_printf(FUNC,RegisterFile_Multi_Banked,"Parameters (copy)","End");
     133//   };
    134134
    135135  Parameters::~Parameters ()
     
    147147  };
    148148
     149  void Parameters::copy (void)
     150  {
     151    log_printf(FUNC,RegisterFile_Multi_Banked,"copy","Begin");
     152    log_printf(FUNC,RegisterFile_Multi_Banked,"copy","End");
     153  };
     154
    149155}; // end namespace registerfile_multi_banked
    150156}; // end namespace registerfile
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked.cpp

    r82 r88  
    1414namespace registerfile_multi_banked {
    1515
     16#undef  FUNCTION
     17#define FUNCTION "RegisterFile_Multi_Banked::RegisterFile_Multi_Banked"
    1618  RegisterFile_Multi_Banked::RegisterFile_Multi_Banked
    1719  (
     
    3032    ,_usage (usage)
    3133  {
    32     log_printf(FUNC,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Begin");
     34    log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"Begin");
    3335
    34 #ifdef SYSTEMC
    35     log_printf(INFO,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Allocation");
     36#if DEBUG_RegisterFile_Multi_Banked == true
     37    log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,_("<%s> Parameters"),_name.c_str());
    3638
     39    std::cout << *param << std::endl;
     40#endif   
     41
     42    log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Allocation");
     43   
    3744    allocation ();
    38 #endif
    3945
    4046#ifdef STATISTICS
    41     log_printf(INFO,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Allocation of statistics");
    42 
    43     // Allocation of statistics
    44     statistics_declaration(param_statistics);
     47    if (usage_is_set(_usage,USE_STATISTICS))
     48      {
     49        log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Allocation of statistics");
     50       
     51        // Allocation of statistics
     52        statistics_declaration(param_statistics);
     53      }
    4554#endif
    4655
    4756#ifdef VHDL
    48     // generate the vhdl
    49     log_printf(INFO,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Generate the vhdl");
    50 
    51     vhdl();
     57    if (usage_is_set(_usage,USE_VHDL))
     58      {
     59        // generate the vhdl
     60        log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Generate the vhdl");
     61       
     62        vhdl();
     63      }
    5264#endif
    5365
    5466#ifdef SYSTEMC
     67    if (usage_is_set(_usage,USE_SYSTEMC))
     68      {
    5569    // Function pointer
    5670    if (_param->_crossbar == FULL_CROSSBAR)                             
     
    6781      }
    6882
    69     log_printf(INFO,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Method - transition");
     83    log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Method - transition");
    7084
    7185    SC_METHOD (transition);
     
    7791#endif   
    7892
    79     log_printf(INFO,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","Method - genMealy_write");
     93    log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Method - genMealy_write");
    8094
    8195    SC_METHOD (genMealy_read);
     
    129143      }
    130144#endif   
    131 
     145      }
    132146#endif
    133     log_printf(FUNC,RegisterFile_Multi_Banked,"RegisterFile_Multi_Banked","End");
     147    log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"End");
    134148  };
    135149 
     150#undef  FUNCTION
     151#define FUNCTION "RegisterFile_Multi_Banked::~RegisterFile_Multi_Banked"
    136152  RegisterFile_Multi_Banked::~RegisterFile_Multi_Banked (void)
    137153  {
    138     log_printf(FUNC,RegisterFile_Multi_Banked,"~RegisterFile_Multi_Banked","Begin");
     154    log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"Begin");
    139155
    140156#ifdef STATISTICS
    141     log_printf(INFO,RegisterFile_Multi_Banked,"~RegisterFile_Multi_Banked","Generate Statistics file");
    142    
    143     delete _stat;
     157    if (usage_is_set(_usage,USE_STATISTICS))
     158      {
     159        log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Generate Statistics file");
     160        delete _stat;
     161      }
    144162#endif
    145163
    146 #ifdef SYSTEMC
    147     log_printf(INFO,RegisterFile_Multi_Banked,"~RegisterFile_Multi_Banked","Deallocation");
     164    log_printf(INFO,RegisterFile_Multi_Banked,FUNCTION,"Deallocation");
     165    deallocation ();
    148166
    149     deallocation ();
    150 #endif
    151 
    152     log_printf(FUNC,RegisterFile_Multi_Banked,"~RegisterFile_Multi_Banked","End");
     167    log_printf(FUNC,RegisterFile_Multi_Banked,FUNCTION,"End");
    153168  };
    154169
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_allocation.cpp

    r82 r88  
    1 #ifdef SYSTEMC
    21/*
    32 * $Id$
    43 *
    5  * [ Description ]
     4 * [ Description ]
    65 *
    76 */
     
    3130    _interfaces = entity->set_interfaces();
    3231
    33     // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     32    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3433
    3534      Interface * interface = _interfaces->set_interface(""
     
    4443     in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
    4544
    46     // ~~~~~[ Interface : "read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     45    // ~~~~~[ Interface : "read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    4746
    4847     in_READ_VAL         = new SC_IN (Tcontrol_t) * [_param->_nb_port_read];
     
    6968      }
    7069
    71     // ~~~~~[ Interface : "write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     70    // ~~~~~[ Interface : "write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    7271
    7372     in_WRITE_VAL        = new SC_IN (Tcontrol_t) * [_param->_nb_port_write];
     
    9493      }
    9594
    96     // ~~~~~[ Registers ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     95    if (usage_is_set(_usage,USE_SYSTEMC))
     96      {
     97    // ~~~~~[ Registers ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    9798
    9899    reg_DATA = new Tdata_t * [_param->_nb_bank];
     
    103104      }
    104105
    105     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     106    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    106107    internal_WRITE_VAL     = new bool       [_param->_nb_port_write];
    107108    internal_WRITE_BANK    = new Taddress_t [_param->_nb_port_write];
    108109    internal_WRITE_NUM_REG = new Taddress_t [_param->_nb_port_write];
     110      }
    109111
    110     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     112    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    111113
    112114#ifdef POSITION
    113     _component->generate_file();
     115    if (usage_is_set(_usage,USE_POSITION))
     116      _component->generate_file();
    114117#endif
    115118
     
    123126}; // end namespace behavioural
    124127}; // end namespace morpheo             
    125 #endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_deallocation.cpp

    r81 r88  
    1 #ifdef SYSTEMC
    21/*
    32 * $Id$
     
    2019    log_printf(FUNC,RegisterFile_Multi_Banked,"deallocation","Begin");
    2120
    22     delete in_CLOCK;
    23     delete in_NRESET;
    24 
    25     // ----- Interface Read
    26     delete []  in_READ_VAL    ;
    27     delete [] out_READ_ACK    ;
    28     if (_param->_have_port_address == true)
    29     delete []  in_READ_ADDRESS;
    30     delete [] out_READ_DATA   ;
    31 
    32     // ----- Interface Write
    33     delete []  in_WRITE_VAL    ;
    34     delete [] out_WRITE_ACK    ;
    35     if (_param->_have_port_address == true)
    36     delete []  in_WRITE_ADDRESS;
    37     delete []  in_WRITE_DATA   ;
    38 
    39     // ----- Register
    40     delete [] reg_DATA;
    41 
    42     // ----- Internal
    43     delete [] internal_WRITE_VAL;
    44     delete [] internal_WRITE_BANK;
    45     delete [] internal_WRITE_NUM_REG;
     21    if (usage_is_set(_usage,USE_SYSTEMC))
     22      {
     23        delete in_CLOCK;
     24        delete in_NRESET;
     25       
     26        // ----- Interface Read
     27        delete []  in_READ_VAL    ;
     28        delete [] out_READ_ACK    ;
     29        if (_param->_have_port_address == true)
     30        delete []  in_READ_ADDRESS;
     31        delete [] out_READ_DATA   ;
     32       
     33        // ----- Interface Write
     34        delete []  in_WRITE_VAL    ;
     35        delete [] out_WRITE_ACK    ;
     36        if (_param->_have_port_address == true)
     37        delete []  in_WRITE_ADDRESS;
     38        delete []  in_WRITE_DATA   ;
     39       
     40        // ----- Register
     41        delete [] reg_DATA;
     42       
     43        // ----- Internal
     44        delete [] internal_WRITE_VAL;
     45        delete [] internal_WRITE_BANK;
     46        delete [] internal_WRITE_NUM_REG;
     47      }       
    4648
    4749    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     
    5860}; // end namespace behavioural
    5961}; // end namespace morpheo             
    60 #endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_end_cycle.cpp

    r81 r88  
    2323
    2424#ifdef STATISTICS
    25     _stat->end_cycle();
     25    if (usage_is_set(_usage,USE_STATISTICS))
     26      _stat->end_cycle();
    2627#endif   
    2728
     
    2930    // Evaluation before read the ouput signal
    3031//  sc_start(0);
    31     _interfaces->testbench();
     32    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     33      _interfaces->testbench();
    3234#endif
    3335
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : RegisterFile_library_clean
    2525
     26local_clean                     :
     27
    2628include                         ../Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/src/main.cpp

    r81 r88  
    5858      if (instance == instance_RegisterFile_Monolithic)
    5959        {
    60           morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters * param1 = new morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters (nb_port_read         ,
    61                                                                                                                                                                                                 nb_port_write        ,
    62                                                                                                                                                                                                 0                    ,
    63                                                                                                                                                                                                 nb_word              ,
    64                                                                                                                                                                                                 size_word            );
     60          morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters * param1 = new morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters
     61            (nb_port_read         ,
     62             nb_port_write        ,
     63             0                    ,
     64             nb_word              ,
     65             size_word           
     66             );
    6567         
    6668          param = new morpheo::behavioural::generic::registerfile::Parameters(param1);
     
    6870      else
    6971        {
    70           morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * param2 = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters (nb_port_read         ,
    71                                                                                                                                                                                                 nb_port_write        ,
    72                                                                                                                                                                                                 nb_word              ,
    73                                                                                                                                                                                                 size_word            ,
    74                                                                                                                                                                                                 nb_bank              ,
    75                                                                                                                                                                                                 nb_port_read_by_bank ,
    76                                                                                                                                                                                                 nb_port_write_by_bank,
    77                                                                                                                                                                                                 crossbar             );
     72          morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * param2 = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters
     73            (nb_port_read         ,
     74             nb_port_write        ,
     75             nb_word              ,
     76             size_word            ,
     77             nb_bank              ,
     78             nb_port_read_by_bank ,
     79             nb_port_write_by_bank,
     80             crossbar             
     81             );
    7882         
    7983          param = new morpheo::behavioural::generic::registerfile::Parameters(param2);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/src/test.cpp

    r82 r88  
    2222#endif
    2323 
     24  Tusage_t _usage = USE_ALL;
     25
     26//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     27//   _usage = usage_unset(_usage,USE_VHDL                 );
     28//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     30//   _usage = usage_unset(_usage,USE_POSITION             );
     31//   _usage = usage_unset(_usage,USE_STATISTICS           );
     32//   _usage = usage_unset(_usage,USE_INFORMATION          );
     33
    2434  RegisterFile * _RegisterFile = new RegisterFile (name.c_str(),
    2535#ifdef STATISTICS     
     
    2737#endif
    2838                                                   _param,
    29                                                    USE_ALL);
     39                                                   _usage);
    3040 
    3141#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/include/Parameters.h

    r81 r88  
    4040  public : Parameters  (morpheo::behavioural::generic::registerfile::registerfile_monolithic  ::Parameters * param);
    4141  public : Parameters  (morpheo::behavioural::generic::registerfile::registerfile_multi_banked::Parameters * param);
    42   public : Parameters  (Parameters & param) ;
     42//   public : Parameters  (Parameters & param) ;
    4343  public : ~Parameters () ;
    4444
     45  public :        void             copy       (void);
     46
    4547  public :        Parameters_test  msg_error  (void);
     48
    4649  public :        std::string   print      (uint32_t depth);
    4750  public : friend std::ostream& operator<< (std::ostream& output_stream,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/Parameters.cpp

    r81 r88  
    2626
    2727    _param_registerfile_monolithic   = param;
    28    
     28    _param_registerfile_multi_banked = NULL;
     29
    2930    test();
    3031
     
    4344    log_printf(FUNC,RegisterFile,"Parameters","Begin");
    4445
     46    _param_registerfile_monolithic   = NULL;
    4547    _param_registerfile_multi_banked = param;
    4648
     
    5052  };
    5153 
    52   Parameters::Parameters (Parameters & param):
    53     _instance          (param._instance     ),
    54     _nb_port_read      (param._nb_port_read ),
    55     _nb_port_write     (param._nb_port_write),
    56     _nb_word           (param._nb_word      ),
    57     _size_word         (param._size_word    ),
    58     _size_address      (param._size_address ),
    59     _have_port_address (param._have_port_address)
    60   {
    61     log_printf(FUNC,RegisterFile,"Parameters (copy)","Begin");
     54//   Parameters::Parameters (Parameters & param):
     55//     _instance          (param._instance     ),
     56//     _nb_port_read      (param._nb_port_read ),
     57//     _nb_port_write     (param._nb_port_write),
     58//     _nb_word           (param._nb_word      ),
     59//     _size_word         (param._size_word    ),
     60//     _size_address      (param._size_address ),
     61//     _have_port_address (param._have_port_address)
     62//   {
     63//     log_printf(FUNC,RegisterFile,"Parameters (copy)","Begin");
    6264
    63     _param_registerfile_multi_banked = param._param_registerfile_multi_banked;
    64     _param_registerfile_monolithic   = param._param_registerfile_monolithic;
    65     test();
    66     log_printf(FUNC,RegisterFile,"Parameters (copy)","End");
    67   };
     65//     _param_registerfile_multi_banked = param._param_registerfile_multi_banked;
     66//     _param_registerfile_monolithic   = param._param_registerfile_monolithic;
     67//     test();
     68//     log_printf(FUNC,RegisterFile,"Parameters (copy)","End");
     69//   };
    6870
    6971  Parameters::~Parameters ()
     
    7375  };
    7476
     77  void Parameters::copy (void)
     78  {
     79    log_printf(FUNC,RegisterFile,"copy","Begin");
     80
     81    throw ERRORMORPHEO("RegisterFile::copy",_("Invalid copy"));
     82
     83//     if (_instance == instance_RegisterFile_Monolithic)
     84//       COPY(_param_registerfile_monolithic);
     85//     if (_instance == instance_RegisterFile_Multi_Banked)
     86//       COPY(_param_registerfile_multi_banked);
     87   
     88    log_printf(FUNC,RegisterFile,"copy","End");
     89  };
     90
    7591}; // end namespace registerfile
    7692}; // end namespace generic
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/Makefile

    r81 r88  
    2323library_clean                   : Select_Priority_Fixed_library_clean
    2424
     25local_clean                     :
     26
    2527include                         ../Makefile.deps
    2628include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp

    r82 r88  
    1818  cout << "<" << name << "> : Simulation SystemC" << endl;
    1919
    20 
    2120#ifdef STATISTICS
    2221  morpheo::behavioural::Parameters_Statistics * _param_stat = new morpheo::behavioural::Parameters_Statistics (5,50);
    2322#endif
     23
     24  Tusage_t _usage = USE_ALL;
     25
     26//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     27//   _usage = usage_unset(_usage,USE_VHDL                 );
     28//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     30//   _usage = usage_unset(_usage,USE_POSITION             );
     31//   _usage = usage_unset(_usage,USE_STATISTICS           );
     32//   _usage = usage_unset(_usage,USE_INFORMATION          );
     33
    2434  Select_Priority_Fixed * _Select_Priority_Fixed = new Select_Priority_Fixed
    2535    (name.c_str(),
     
    2838#endif
    2939     _param,
    30      USE_ALL);
     40     _usage);
    3141 
    3242#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Parameters.h

    r81 r88  
    3131                        bool     encoding_one_hot,
    3232                        bool     encoding_compact);
    33   public : Parameters  (Parameters & param) ;
     33//   public : Parameters  (Parameters & param) ;
    3434  public : ~Parameters () ;
    3535
     36  public :        void            copy       (void);
     37
    3638  public :        Parameters_test msg_error  (void);
     39
    3740  public :        std::string   print      (uint32_t depth);
    3841  public : friend std::ostream& operator<< (std::ostream& output_stream,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h

    r82 r88  
    9595  public  :          ~Select_Priority_Fixed             (void);
    9696                                               
    97 #ifdef SYSTEMC                                 
    9897  private : void     allocation                (void);
    9998  private : void     deallocation              (void);
    10099                                               
     100#ifdef SYSTEMC                                 
    101101# if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    102102  public  : void     transition                (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Parameters.cpp

    r81 r88  
    2828  };
    2929 
    30   Parameters::Parameters (Parameters & param):
    31     _nb_entity        (param._nb_entity       ),
    32     _encoding_one_hot (param._encoding_one_hot),
    33     _encoding_compact (param._encoding_compact),
    34     _size_entity      (param._size_entity     )
    35   {
    36     log_printf(FUNC,Select_Priority_Fixed,"Parameters","Begin");
    37     test();
    38     log_printf(FUNC,Select_Priority_Fixed,"Parameters","End");
    39   };
     30//   Parameters::Parameters (Parameters & param):
     31//     _nb_entity        (param._nb_entity       ),
     32//     _encoding_one_hot (param._encoding_one_hot),
     33//     _encoding_compact (param._encoding_compact),
     34//     _size_entity      (param._size_entity     )
     35//   {
     36//     log_printf(FUNC,Select_Priority_Fixed,"Parameters","Begin");
     37//     test();
     38//     log_printf(FUNC,Select_Priority_Fixed,"Parameters","End");
     39//   };
    4040
    4141  Parameters::~Parameters ()
     
    4343    log_printf(FUNC,Select_Priority_Fixed,"~Parameters","Begin");
    4444    log_printf(FUNC,Select_Priority_Fixed,"~Parameters","End");
     45  };
     46
     47  void Parameters::copy (void)
     48  {
     49    log_printf(FUNC,Select_Priority_Fixed,"copy","Begin");
     50    log_printf(FUNC,Select_Priority_Fixed,"copy","End");
    4551  };
    4652
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed.cpp

    r81 r88  
    22 * $Id$
    33 *
    4  * [ Description ]
     4 * [ Description ]
    55 *
    66 */
     
    3333    log_printf(FUNC,Select_Priority_Fixed,"Select_Priority_Fixed","Begin");
    3434
     35#if DEBUG_Select_Priority_Fixed == true
     36    log_printf(INFO,Select_Priority_Fixed,FUNCTION,_("<%s> Parameters"),_name.c_str());
     37
     38    std::cout << *param << std::endl;
     39#endif   
     40
    3541    log_printf(INFO,Select_Priority_Fixed,"Select_Priority_Fixed","Allocation");
    3642    allocation ();
    3743
    3844#ifdef STATISTICS
    39     if (_usage & USE_STATISTICS)
     45    if (usage_is_set(_usage,USE_STATISTICS))
    4046      {
    4147        log_printf(INFO,Select_Priority_Fixed,"Select_Priority_Fixed","Allocation of statistics");
     
    4652
    4753#ifdef VHDL
    48     // generate the vhdl
    49     log_printf(INFO,Select_Priority_Fixed,"Select_Priority_Fixed","Generate the vhdl");
    50 
    51     vhdl();
     54    if (usage_is_set(_usage,USE_VHDL)
     55      {
     56        // generate the vhdl
     57        log_printf(INFO,Select_Priority_Fixed,"Select_Priority_Fixed","Generate the vhdl");
     58       
     59        vhdl();
     60      }
    5261#endif
    5362
    5463#ifdef SYSTEMC
    55     if (_usage & USE_SYSTEMC)
    56       {
     64      if (usage_is_set(_usage,USE_SYSTEMC))
     65        {
    5766#  if defined(STATISTICS) or defined(VHDL_TESTBENCH)
    5867        log_printf(INFO,Select_Priority_Fixed,"Select_Priority_Fixed","Method - transition");
     
    96105
    97106#ifdef STATISTICS
    98     if (_usage & USE_STATISTICS)
     107    if (usage_is_set(_usage,USE_STATISTICS))
    99108      {
    100109        log_printf(INFO,Select_Priority_Fixed,"~Select_Priority_Fixed","Generate Statistics file");
     
    104113#endif
    105114
    106 #ifdef SYSTEMC
    107115    log_printf(INFO,Select_Priority_Fixed,"~Select_Priority_Fixed","Deallocation");
    108 
    109116    deallocation ();
    110 #endif
    111117
    112118    log_printf(FUNC,Select_Priority_Fixed,"~Select_Priority_Fixed","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_allocation.cpp

    r81 r88  
    1 #ifdef SYSTEMC
    21/*
    32 * $Id$
     
    3029    _interfaces = entity->set_interfaces();
    3130
    32     // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     31    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3332
    3433    Interface_fifo * interface = _interfaces->set_interface(""
     
    6362
    6463#ifdef POSITION
    65     _component->generate_file();
     64    if (usage_is_set(_usage,USE_POSITION))
     65      _component->generate_file();
    6666#endif
    6767
     
    7474}; // end namespace behavioural
    7575}; // end namespace morpheo             
    76 #endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_deallocation.cpp

    r81 r88  
    1 #ifdef SYSTEMC
    21/*
    32 * $Id$
     
    2019    log_printf(FUNC,Select_Priority_Fixed,"deallocation","Begin");
    2120
    22     if (_usage & USE_SYSTEMC)
     21    if (usage_is_set(_usage,USE_SYSTEMC))
    2322      {
    2423        delete     in_CLOCK;
     
    4847}; // end namespace behavioural
    4948}; // end namespace morpheo             
    50 #endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_end_cycle.cpp

    r81 r88  
    2222
    2323#ifdef STATISTICS
    24     _stat->end_cycle();
     24    if (usage_is_set(_usage,USE_STATISTICS))
     25      _stat->end_cycle();
    2526#endif   
    2627
     
    2829    // Evaluation before read the ouput signal
    2930//  sc_start(0);
    30     _interfaces->testbench();
     31    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     32      _interfaces->testbench();
    3133#endif
    3234
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/Makefile

    r81 r88  
    2323library_clean                   : Shifter_library_clean
    2424
     25local_clean                     :
     26
    2527include                         ../Makefile.deps
    2628include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/src/test.cpp

    r82 r88  
    3838  morpheo::behavioural::Parameters_Statistics * param_stat = new morpheo::behavioural::Parameters_Statistics(5,50);
    3939#endif
     40
     41  Tusage_t _usage = USE_ALL;
     42
     43//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     44//   _usage = usage_unset(_usage,USE_VHDL                 );
     45//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     46//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     47//   _usage = usage_unset(_usage,USE_POSITION             );
     48   _usage = usage_unset(_usage,USE_STATISTICS           );
     49//   _usage = usage_unset(_usage,USE_INFORMATION          );
     50
    4051  Shifter * _Shifter = new Shifter (name.c_str(),
    4152#ifdef STATISTICS
     
    4354#endif
    4455                                    &param,
    45                                     USE_ALL);
     56                                    _usage);
    4657 
    4758#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Parameters.h

    r82 r88  
    5656                        carry_t     carry               ,
    5757                        bool        type_completion_bool = false);
    58   public : Parameters  (Parameters & param) ;
     58//   public : Parameters  (Parameters & param) ;
    5959  public : ~Parameters () ;
    6060
     61  public :        void            copy       (void);
     62
    6163  public :        Parameters_test msg_error  (void);
     64
    6265  public :        std::string     print      (uint32_t depth);
    6366  public : friend std::ostream&   operator<< (std::ostream& output_stream,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/include/Shifter.h

    r82 r88  
    55 * $Id$
    66 *
    7  * [ Description ]
     7 * [ Description ]
    88 *
    99 */
     
    3838#endif
    3939  {
    40     // -----[ fields ]----------------------------------------------------
     40    // -----[ fields ]----------------------------------------------------
    4141    // Parameters
    4242  protected : const std::string  _name;
     
    5252
    5353#ifdef SYSTEMC
    54     // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     54    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    5555  public    : SC_CLOCK                      *  in_CLOCK             ;
    5656  public    : SC_IN (Tcontrol_t)            *  in_NRESET            ;
     
    6666  public    : SC_OUT(Tdata_t)              ** out_SHIFTER_DATA      ;
    6767   
    68     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
     68    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   
    6969
    70     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     70    // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    7171#endif
    7272
    73     // -----[ methods ]---------------------------------------------------
     73    // -----[ methods ]---------------------------------------------------
    7474
    7575#ifdef SYSTEMC
     
    9393  public  :          ~Shifter             (void);
    9494                                               
    95 #ifdef SYSTEMC                                 
    9695  private : void     allocation                (void);
    9796  private : void     deallocation              (void);
    9897                                               
     98#ifdef SYSTEMC                                 
    9999#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
    100100  public  : void     transition                (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Parameters.cpp

    r81 r88  
    8080  };
    8181 
    82   Parameters::Parameters (Parameters & param):
    83     _size_data                   (param._size_data                   ),
    84     _nb_port                     (param._nb_port                     ),
    85     _shift_value                 (param._shift_value                 ),
    86     _rotate                      (param._rotate                      ),
    87     _direction                   (param._direction                   ),
    88     _carry                       (param._carry                       ),
    89     _size_data_completion        (param._size_data_completion        ),
    90     _type_completion_bool        (param._type_completion_bool        ),
     82//   Parameters::Parameters (Parameters & param):
     83//     _size_data                   (param._size_data                   ),
     84//     _nb_port                     (param._nb_port                     ),
     85//     _shift_value                 (param._shift_value                 ),
     86//     _rotate                      (param._rotate                      ),
     87//     _direction                   (param._direction                   ),
     88//     _carry                       (param._carry                       ),
     89//     _size_data_completion        (param._size_data_completion        ),
     90//     _type_completion_bool        (param._type_completion_bool        ),
    9191
    92     _internal_direction          (param._internal_direction          ),
    93     _internal_type               (param._internal_type               ),
    94     _internal_carry              (param._internal_carry              ),
     92//     _internal_direction          (param._internal_direction          ),
     93//     _internal_type               (param._internal_type               ),
     94//     _internal_carry              (param._internal_carry              ),
    9595   
    96     _have_shift_logic_left       (param._have_shift_logic_left       ),
    97     _have_shift_logic_right      (param._have_shift_logic_right      ),
    98     _have_shift_logic            (param._have_shift_logic            ),
    99     _have_shift_arithmetic_left  (param._have_shift_arithmetic_left  ),
    100     _have_shift_arithmetic_right (param._have_shift_arithmetic_right ),
    101     _have_shift_arithmetic       (param._have_shift_arithmetic       ),
    102     _have_shift                  (param._have_shift                  ),
    103     _have_rotate_left            (param._have_rotate_left            ),
    104     _have_rotate_right           (param._have_rotate_right           ),
    105     _have_rotate                 (param._have_rotate                 ),
     96//     _have_shift_logic_left       (param._have_shift_logic_left       ),
     97//     _have_shift_logic_right      (param._have_shift_logic_right      ),
     98//     _have_shift_logic            (param._have_shift_logic            ),
     99//     _have_shift_arithmetic_left  (param._have_shift_arithmetic_left  ),
     100//     _have_shift_arithmetic_right (param._have_shift_arithmetic_right ),
     101//     _have_shift_arithmetic       (param._have_shift_arithmetic       ),
     102//     _have_shift                  (param._have_shift                  ),
     103//     _have_rotate_left            (param._have_rotate_left            ),
     104//     _have_rotate_right           (param._have_rotate_right           ),
     105//     _have_rotate                 (param._have_rotate                 ),
    106106
    107     _have_direction_left         (param._have_direction_left         ),
    108     _have_direction_right        (param._have_direction_right        )
     107//     _have_direction_left         (param._have_direction_left         ),
     108//     _have_direction_right        (param._have_direction_right        )
    109109
     110//   {
     111//     test();
     112//   };
     113
     114  Parameters::~Parameters ()
    110115  {
    111     test();
    112116  };
    113117
    114   Parameters::~Parameters ()
    115   { };
     118  void Parameters::copy (void)
     119  {
     120  };
    116121
    117122}; // end namespace shifter
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter.cpp

    r82 r88  
    1414
    1515
     16#undef  FUNCTION
     17#define FUNCTION "Shifter::Shifter"
    1618  Shifter::Shifter (
    1719#ifdef SYSTEMC
     
    2931    ,_usage (usage)
    3032  {
    31 #ifdef SYSTEMC
     33
     34#if DEBUG_Shifter == true
     35    log_printf(INFO,Shifter,FUNCTION,_("<%s> Parameters"),_name.c_str());
     36
     37    std::cout << *param << std::endl;
     38#endif   
     39
    3240    allocation ();
    33 #endif
    3441
    3542#ifdef STATISTICS
    36     // Allocation of statistics
    37     statistics_declaration(param_statistics);
     43    if (usage_is_set(_usage,USE_STATISTICS))
     44      {
     45        // Allocation of statistics
     46        statistics_declaration(param_statistics);
     47      }
    3848#endif
    3949
    4050#ifdef VHDL
    41     // generate the vhdl
    42     vhdl();
     51    if (usage_is_set(_usage,USE_VHDL))
     52      {
     53        // generate the vhdl
     54        vhdl();
     55      }
    4356#endif
    4457
    4558#ifdef SYSTEMC
     59    if (usage_is_set(_usage,USE_SYSTEMC))
     60      {
    4661#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
    4762    SC_METHOD (transition);
     
    91106      }
    92107#endif   
    93 
     108      }
    94109#endif
    95110  };
    96111 
     112#undef  FUNCTION
     113#define FUNCTION "Shifter::~Shifter"
    97114  Shifter::~Shifter (void)
    98115  {
    99 #ifdef SYSTEMC
    100     deallocation ();
     116#ifdef STATISTICS
     117    if (usage_is_set(_usage,USE_STATISTICS))
     118      delete _stat;
    101119#endif
    102120
    103 #ifdef STATISTICS
    104     delete _stat;
    105 #endif
     121    deallocation ();
    106122  };
    107123
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_allocation.cpp

    r82 r88  
    1 #ifdef SYSTEMC
    21/*
    32 * $Id$
     
    8685           in_SHIFTER_COMPLETION [i] = interface->set_signal_in  <Tdata_t     > ("completion",_param->_size_data_completion);
    8786          out_SHIFTER_DATA       [i] = interface->set_signal_out <Tdata_t     > ("data"      ,_param->_size_data);
    88         }                                                                                                                       
     87        }
    8988    }
    9089
    9190#ifdef POSITION
    92     _component->generate_file();
     91    if (usage_is_set(_usage,USE_POSITION))
     92      _component->generate_file();
    9393#endif
    9494
     
    9999}; // end namespace behavioural
    100100}; // end namespace morpheo             
    101 #endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_deallocation.cpp

    r82 r88  
    1 #ifdef SYSTEMC
    21/*
    32 * $Id$
     
    1716  void Shifter::deallocation (void)
    1817  {
     18    if (usage_is_set(_usage,USE_SYSTEMC))
     19      {
    1920#if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
    2021    delete     in_CLOCK;
     
    3637    delete []  in_SHIFTER_COMPLETION;
    3738    delete [] out_SHIFTER_DATA      ;
     39      }
    3840
    3941    delete _component;
     
    4648}; // end namespace behavioural
    4749}; // end namespace morpheo             
    48 #endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/src/Shifter_end_cycle.cpp

    r81 r88  
    2121
    2222#ifdef STATISTICS
    23     _stat->end_cycle();
     23    if (usage_is_set(_usage,USE_STATISTICS))
     24      _stat->end_cycle();
    2425#endif   
    2526
     
    2728    // Evaluation before read the ouput signal
    2829//  sc_start(0);
    29     _interfaces->testbench();
     30    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     31      _interfaces->testbench();
    3032#endif
    3133
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Sort_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/SelfTest/src/test.cpp

    r82 r88  
    3131#endif
    3232
     33  Tusage_t _usage = USE_ALL;
     34
     35//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     36//   _usage = usage_unset(_usage,USE_VHDL                 );
     37//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     38//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     39//   _usage = usage_unset(_usage,USE_POSITION             );
     40//   _usage = usage_unset(_usage,USE_STATISTICS           );
     41//   _usage = usage_unset(_usage,USE_INFORMATION          );
     42
    3343  Sort * _Sort = new Sort (name.c_str(),
    3444#ifdef STATISTICS
     
    3646#endif
    3747                           _param,
    38                            USE_ALL);
     48                           _usage);
    3949 
    4050#ifdef SYSTEMC
     
    154164              tab [ptr]._val = false;
    155165
    156               LABEL("OUTPUT [%d] %d - %d",i, out_OUTPUT_VAL [i]->read(), out_OUTPUT_DATA [i]->read(), out_OUTPUT_INDEX [i]->read());
     166              LABEL("OUTPUT [%d] %d %d - %d",i, out_OUTPUT_VAL [i]->read(), out_OUTPUT_DATA [i]->read(), out_OUTPUT_INDEX [i]->read());
    157167
    158168              TEST(Tcontrol_t,out_OUTPUT_VAL   [i]->read(),find);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/include/Parameters.h

    r81 r88  
    4242  public : ~Parameters () ;
    4343
     44  public :        void            copy       (void);
     45
    4446  public :        Parameters_test msg_error  (void);
    4547
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Parameters.cpp

    r81 r88  
    5555  };
    5656
     57#undef  FUNCTION
     58#define FUNCTION "Sort::copy"
     59  void Parameters::copy (void)
     60  {
     61    log_printf(FUNC,Sort,FUNCTION,"Begin");
     62    log_printf(FUNC,Sort,FUNCTION,"End");
     63  };
     64
    5765}; // end namespace sort
    5866}; // end namespace generic
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort.cpp

    r81 r88  
    3535    log_printf(FUNC,Sort,FUNCTION,"Begin");
    3636
     37#if DEBUG_Sort == true
     38    log_printf(INFO,Sort,FUNCTION,_("<%s> Parameters"),_name.c_str());
     39
     40    std::cout << *param << std::endl;
     41#endif   
     42
    3743    log_printf(INFO,Sort,FUNCTION,"Allocation");
    3844
     
    4450
    4551#ifdef STATISTICS
    46     if (_usage & USE_STATISTICS)
     52    if (usage_is_set(_usage,USE_STATISTICS))
    4753      {
    4854        log_printf(INFO,Sort,FUNCTION,"Allocation of statistics");
     
    5359
    5460#ifdef VHDL
    55     if (_usage & USE_VHDL)
     61    if (usage_is_set(_usage,USE_VHDL))
    5662      {
    5763        // generate the vhdl
     
    6369
    6470#ifdef SYSTEMC
    65     if (_usage & USE_SYSTEMC)
     71    if (usage_is_set(_usage,USE_SYSTEMC))
    6672      {
    6773        log_printf(INFO,Sort,FUNCTION,"Method - transition");
     
    117123
    118124#ifdef STATISTICS
    119     if (_usage & USE_STATISTICS)
     125    if (usage_is_set(_usage,USE_STATISTICS))
    120126      {
    121127        statistics_deallocation();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_allocation.cpp

    r81 r88  
    1313namespace generic {
    1414namespace sort {
    15 
    16 
    1715
    1816#undef  FUNCTION
     
    7573
    7674#ifdef POSITION
    77     _component->generate_file();
     75    if (usage_is_set(_usage,USE_POSTION))
     76      _component->generate_file();
    7877#endif
    7978
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_deallocation.cpp

    r81 r88  
    2020    log_printf(FUNC,Sort,FUNCTION,"Begin");
    2121
    22     if (_usage & USE_SYSTEMC)
     22    if (usage_is_set(_usage,USE_SYSTEMC))
    2323      {
    2424        delete     in_CLOCK ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_end_cycle.cpp

    r81 r88  
    2222
    2323#ifdef STATISTICS
    24     _stat->end_cycle();
     24    if (usage_is_set(_usage,USE_STATISTICS))
     25      _stat->end_cycle();
    2526#endif   
    2627
     
    2829    // Evaluation before read the ouput signal
    2930//  sc_start(0);
    30     _interfaces->testbench();
     31    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     32      _interfaces->testbench();
    3133#endif
    3234
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/SelfTest/Makefile

    r81 r88  
    2424library_clean                   : Victim_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/SelfTest/src/test.cpp

    r82 r88  
    2323#endif
    2424
     25  Tusage_t _usage = USE_ALL;
     26
     27//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     28//   _usage = usage_unset(_usage,USE_VHDL                 );
     29//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     30//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     31//   _usage = usage_unset(_usage,USE_POSITION             );
     32//   _usage = usage_unset(_usage,USE_STATISTICS           );
     33//   _usage = usage_unset(_usage,USE_INFORMATION          );
     34
    2535  Victim * _Victim = new Victim (name.c_str(),
    2636#ifdef STATISTICS
     
    2838#endif
    2939                                 _param,
    30                                  USE_ALL);
     40                                 _usage);
    3141 
    3242#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/Makefile

    r81 r88  
    2323library_clean                   : Victim_Pseudo_LRU_library_clean
    2424
     25local_clean                     :
     26
    2527include                         ../Makefile.deps
    2628include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/test.cpp

    r82 r88  
    3838#endif
    3939
    40   Victim_Pseudo_LRU * _Victim_Pseudo_LRU = new Victim_Pseudo_LRU (name.c_str(),
     40  Tusage_t _usage = USE_ALL;
     41
     42//   _usage = usage_unset(_usage,USE_SYSTEMC              );
     43//   _usage = usage_unset(_usage,USE_VHDL                 );
     44//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
     45//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
     46//   _usage = usage_unset(_usage,USE_POSITION             );
     47//   _usage = usage_unset(_usage,USE_STATISTICS           );
     48//   _usage = usage_unset(_usage,USE_INFORMATION          );
     49
     50  Victim_Pseudo_LRU * _Victim_Pseudo_LRU = new Victim_Pseudo_LRU
     51    (name.c_str(),
    4152#ifdef STATISTICS
    42                                                                   param_stat,
    43 #endif
    44                                                                   &param,
    45                                                                   USE_ALL);
     53     param_stat,
     54#endif
     55     &param,
     56     _usage);
    4657 
    4758#ifdef SYSTEMC
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Parameters.h

    r81 r88  
    3535                        uint32_t size_table,
    3636                        bool     table_global);
    37   public : Parameters  (Parameters & param) ;
     37//   public : Parameters  (Parameters & param) ;
    3838  public : ~Parameters () ;
    3939
     40  public :        void            copy       (void);
     41
    4042  public :        Parameters_test msg_error  (void);
     43
    4144  public :        std::string     print      (uint32_t depth);
    4245  public : friend std::ostream&   operator<< (std::ostream& output_stream,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Victim_Pseudo_LRU.h

    r82 r88  
    112112  public  :          ~Victim_Pseudo_LRU             (void);
    113113                                               
    114 #ifdef SYSTEMC                                 
    115114  private : void     allocation                (void);
    116115  private : void     deallocation              (void);
    117116                                               
     117#ifdef SYSTEMC                                 
    118118  public  : void     transition                (void);
    119   public  : void     genMoore                  (void);
     119  public  : void     genMealy                  (void);
    120120#endif
    121121                                               
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Parameters.cpp

    r81 r88  
    3030  };
    3131 
    32   Parameters::Parameters (Parameters & param):
    33     _nb_entity  (param._nb_entity ),
    34     _nb_access  (param._nb_access ),
    35 //     _nb_update  (param._nb_update ),
    36     _size_table (param._size_table),
    37     _table_global(param._table_global),
    38     _size_address(param._size_address)
    39   {
    40     test();
     32//   Parameters::Parameters (Parameters & param):
     33//     _nb_entity  (param._nb_entity ),
     34//     _nb_access  (param._nb_access ),
     35// //     _nb_update  (param._nb_update ),
     36//     _size_table (param._size_table),
     37//     _table_global(param._table_global),
     38//     _size_address(param._size_address)
     39//   {
     40//     test();
     41//   };
     42
     43  Parameters::~Parameters ()
     44  {
    4145  };
    4246
    43   Parameters::~Parameters ()
    44   { };
     47  void Parameters::copy (void)
     48  {
     49  };
    4550
    4651}; // end namespace victim_pseudo_lru
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU.cpp

    r82 r88  
    3232    log_printf(FUNC,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Begin");
    3333
    34 #ifdef SYSTEMC
     34#if DEBUG_Victim_Pseudo_LRU == true
     35    log_printf(INFO,Victim_Pseudo_LRU,FUNCTION,_("<%s> Parameters"),_name.c_str());
     36
     37    std::cout << *param << std::endl;
     38#endif   
     39
    3540    log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Allocation");
    3641    allocation ();
    37 #endif
    3842
    3943#ifdef STATISTICS
    40     log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Allocation of statistics");
    41    
    42     // Allocation of statistics
    43     statistics_declaration(param_statistics);
     44    if (usage_is_set(_usage,USE_STATISTICS))
     45      {
     46        log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Allocation of statistics");
     47       
     48        // Allocation of statistics
     49        statistics_declaration(param_statistics);
     50      }
    4451#endif
    4552
    4653#ifdef VHDL
    47     // generate the vhdl
    48     log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Generation of VHDL");
    49     vhdl();
     54    if (usage_is_set(_usage,USE_VHDL))
     55      {
     56        // generate the vhdl
     57        log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Generation of VHDL");
     58        vhdl();
     59      }
    5060#endif
    5161
    5262#ifdef SYSTEMC
    53     log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Definition of sc_method");
    54     SC_METHOD (transition);
    55     dont_initialize ();
    56     sensitive << (*(in_CLOCK)).pos();
    57 
    58     SC_METHOD (genMoore);
    59     dont_initialize ();
    60     sensitive << (*(in_CLOCK)).neg();
    61 
    62 #ifdef SYSTEMCASS_SPECIFIC
    63 #endif   
    64 
     63    if (usage_is_set(_usage,USE_SYSTEMC))
     64      {
    6565    // Constant - ack is always at one
    6666    for (uint32_t i=0; i<_param->_nb_access; i++)
     
    7070      }
    7171
     72    log_printf(TRACE,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","Definition of sc_method");
     73    SC_METHOD (transition);
     74    dont_initialize ();
     75    sensitive << (*(in_CLOCK)).pos();
     76
     77    SC_METHOD (genMealy);
     78    dont_initialize ();
     79    sensitive << (*(in_CLOCK)).neg();
     80    for (uint32_t i=0; i<_param->_nb_access; i++)
     81      if (_param->_size_table>1)
     82        sensitive << (*(in_ACCESS_ADDRESS[i]));
     83
     84#ifdef SYSTEMCASS_SPECIFIC
     85    if (_param->_size_table>1)
     86      for (uint32_t i=0; i<_param->_nb_access; i++)
     87        (*(out_ACCESS_VICTIM[i])) (*(in_ACCESS_ADDRESS[i]));
     88#endif   
     89      }
    7290#endif
    7391    log_printf(FUNC,Victim_Pseudo_LRU,"Victim_Pseudo_LRU","End");
     
    7795  {
    7896    log_printf(FUNC,Victim_Pseudo_LRU,"~Victim_Pseudo_LRU","Begin");
    79 #ifdef SYSTEMC
     97
    8098    deallocation ();
    81 #endif
     99
    82100
    83101#ifdef STATISTICS
    84     delete _stat;
     102    if (usage_is_set(_usage,USE_STATISTICS))
     103      delete _stat;
    85104#endif
    86105    log_printf(FUNC,Victim_Pseudo_LRU,"~Victim_Pseudo_LRU","End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_allocation.cpp

    r82 r88  
    1 #ifdef SYSTEMC
    21/*
    32 * $Id$
     
    5352    }
    5453
     54    if (usage_is_set(_usage,USE_SYSTEMC))
     55      {
    5556    // -----[ Register ]---------------------------------------------------
    5657    reg_TABLE = new entry_t *  [_param->_size_table];
     
    6263    internal_ACCESS_ACK    = new Tcontrol_t [_param->_nb_access];
    6364    internal_ACCESS_VICTIM = new Tentity_t  [_param->_nb_access];
     65      }
    6466
    6567#ifdef POSITION
    66     _component->generate_file();
     68    if (usage_is_set(_usage,USE_POSITION))
     69      _component->generate_file();
    6770#endif
    6871  };
     
    7477}; // end namespace behavioural
    7578}; // end namespace morpheo             
    76 #endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_deallocation.cpp

    r81 r88  
    1 #ifdef SYSTEMC
    21/*
    32 * $Id$
     
    1716  void Victim_Pseudo_LRU::deallocation (void)
    1817  {
     18    if (usage_is_set(_usage,USE_SYSTEMC))
     19      {
    1920    delete     in_CLOCK;
    2021    delete     in_NRESET;
     
    3435    delete [] internal_ACCESS_ACK   ;
    3536    delete [] internal_ACCESS_VICTIM;
     37      }
    3638
    3739    delete _component;
     
    4345}; // end namespace behavioural
    4446}; // end namespace morpheo             
    45 #endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_end_cycle.cpp

    r81 r88  
    2222
    2323#ifdef STATISTICS
    24     _stat->end_cycle();
     24    if (usage_is_set(_usage,USE_STATISTICS))
     25      _stat->end_cycle();
    2526#endif   
    2627
     
    2829    // Evaluation before read the ouput signal
    2930//  sc_start(0);
    30     _interfaces->testbench();
     31    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
     32      _interfaces->testbench();
    3133#endif
    3234
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_genMealy.cpp

    r87 r88  
    1515namespace victim_pseudo_lru {
    1616
    17   void Victim_Pseudo_LRU::genMoore (void)
     17  void Victim_Pseudo_LRU::genMealy (void)
    1818  {
    1919    for (uint32_t i=0; i<_param->_nb_access; i++)
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/include/Parameters.h

    r81 r88  
    2424namespace generic {
    2525namespace victim {
    26 
    2726
    2827  class Parameters : public morpheo::behavioural::Parameters
     
    5756  public : ~Parameters () ;
    5857
     58  public :        void            copy       (void);
     59
    5960  public :        Parameters_test msg_error  (void);
    6061
     
    6667}; // end namespace victim
    6768}; // end namespace generic
    68 
    6969}; // end namespace behavioural
    7070}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Parameters.cpp

    r81 r88  
    6969    switch (_victim_scheme)
    7070      {
    71 //    case VICTIM_RANDOM      : delete _param_victim_random     ;
    72 //    case VICTIM_ROUND_ROBIN : delete _param_victim_round_robin;
    73 //    case VICTIM_NLU         : delete _param_victim_nlu        ;
    74       case VICTIM_PSEUDO_LRU  : delete _param_victim_pseudo_lru ;
    75 //    case VICTIM_LRU         : delete _param_victim_lru        ;
    76 //    case VICTIM_FIFO        : delete _param_victim_fifo       ;
     71//    case VICTIM_RANDOM      : delete _param_victim_random     ; break;
     72//    case VICTIM_ROUND_ROBIN : delete _param_victim_round_robin; break;
     73//    case VICTIM_NLU         : delete _param_victim_nlu        ; break;
     74      case VICTIM_PSEUDO_LRU  : delete _param_victim_pseudo_lru ; break;
     75//    case VICTIM_LRU         : delete _param_victim_lru        ; break;
     76//    case VICTIM_FIFO        : delete _param_victim_fifo       ; break;
     77      default : break;
     78      }
     79
     80    log_printf(FUNC,Victim,FUNCTION,"End");
     81  };
     82
     83#undef  FUNCTION
     84#define FUNCTION "Victim::copy"
     85  void morpheo::behavioural::generic::victim::Parameters::copy (void)
     86  {
     87    log_printf(FUNC,Victim,FUNCTION,"Begin");
     88
     89    switch (_victim_scheme)
     90      {
     91//    case VICTIM_RANDOM      : COPY(_param_victim_random     ); break;
     92//    case VICTIM_ROUND_ROBIN : COPY(_param_victim_round_robin); break;
     93//    case VICTIM_NLU         : COPY(_param_victim_nlu        ); break;
     94      case VICTIM_PSEUDO_LRU  : COPY(_param_victim_pseudo_lru ); break;
     95//    case VICTIM_LRU         : COPY(_param_victim_lru        ); break;
     96//    case VICTIM_FIFO        : COPY(_param_victim_fifo       ); break;
    7797      default : break;
    7898      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Parameters_msg_error.cpp

    r81 r88  
    2626    switch (_victim_scheme)
    2727      {
    28       case VICTIM_RANDOM      : test.error("Victim scheme '"+toString(_victim_scheme)+"' is not supported. (Coming Soon)"); break;
    29       case VICTIM_ROUND_ROBIN : test.error("Victim scheme '"+toString(_victim_scheme)+"' is not supported. (Coming Soon)"); break;
    30       case VICTIM_NLU         : test.error("Victim scheme '"+toString(_victim_scheme)+"' is not supported. (Coming Soon)"); break;
    31 //    case VICTIM_PSEUDO_LRU  : test.error("Victim scheme '"+toString(_victim_scheme)+"' is not supported. (Coming Soon)"); break;
    32       case VICTIM_LRU         : test.error("Victim scheme '"+toString(_victim_scheme)+"' is not supported. (Coming Soon)"); break;
    33       case VICTIM_FIFO        : test.error("Victim scheme '"+toString(_victim_scheme)+"' is not supported. (Coming Soon)"); break;
     28      case VICTIM_RANDOM      : test.error(toString(_("Victim scheme \"%s\" is not supported. (Coming Soon)\n"),toString(_victim_scheme).c_str())); break;
     29      case VICTIM_ROUND_ROBIN : test.error(toString(_("Victim scheme \"%s\" is not supported. (Coming Soon)\n"),toString(_victim_scheme).c_str())); break;
     30      case VICTIM_NLU         : test.error(toString(_("Victim scheme \"%s\" is not supported. (Coming Soon)\n"),toString(_victim_scheme).c_str())); break;
     31//    case VICTIM_PSEUDO_LRU  : test.error(toString(_("Victim scheme \"%s\" is not supported. (Coming Soon)\n"),toString(_victim_scheme).c_str())); break;
     32      case VICTIM_LRU         : test.error(toString(_("Victim scheme \"%s\" is not supported. (Coming Soon)\n"),toString(_victim_scheme).c_str())); break;
     33      case VICTIM_FIFO        : test.error(toString(_("Victim scheme \"%s\" is not supported. (Coming Soon)\n"),toString(_victim_scheme).c_str())); break;
    3434      default : break;
    3535      }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim.cpp

    r81 r88  
    3939    allocation (
    4040#ifdef STATISTICS
    41                 param_statistics
     41                param_statistics
    4242#endif
    43                 );
     43                );
    4444
    4545#ifdef STATISTICS
    46     if (_usage & USE_STATISTICS)
    47       {
    48         switch (_param->_victim_scheme)
    49           {
    50 //        case VICTIM_RANDOM      : _stat = _component_victim_random      ->_stat; break;
    51 //        case VICTIM_ROUND_ROBIN : _stat = _component_victim_round_robin ->_stat; break;
    52 //        case VICTIM_NLU         : _stat = _component_victim_nlu         ->_stat; break;
    53           case VICTIM_PSEUDO_LRU  : _stat = _component_victim_pseudo_lru  ->_stat; break;
    54 //        case VICTIM_LRU         : _stat = _component_victim_lru         ->_stat; break;
    55 //        case VICTIM_FIFO        : _stat = _component_victim_fifo        ->_stat; break;
    56           default : break;
    57           }
     46    switch (_param->_victim_scheme)
     47      {
     48//    case VICTIM_RANDOM      : _stat = _component_victim_random      ->_stat; break;
     49//    case VICTIM_ROUND_ROBIN : _stat = _component_victim_round_robin ->_stat; break;
     50//    case VICTIM_NLU         : _stat = _component_victim_nlu         ->_stat; break;
     51      case VICTIM_PSEUDO_LRU  : _stat = _component_victim_pseudo_lru  ->_stat; break;
     52//    case VICTIM_LRU         : _stat = _component_victim_lru         ->_stat; break;
     53//    case VICTIM_FIFO        : _stat = _component_victim_fifo        ->_stat; break;
     54      default : break;
    5855      }
    5956#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_deallocation.cpp

    r81 r88  
    3232      }
    3333   
    34     if (_usage & USE_SYSTEMC)
     34    if (usage_is_set(_usage,USE_SYSTEMC))
    3535      {
    3636        delete    in_CLOCK ;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Common

    r85 r88  
    77#
    88
    9 include                         $(MORPHEO_TOPLEVEL)/Makefile.tools
     9ifeq ($(origin MORPHEO_TOPLEVEL), undefined)
     10        $(error "variable MORPHEO_TOPLEVEL is undefined");
     11else
     12        include                         $(MORPHEO_TOPLEVEL)/Makefile.tools
     13endif
     14ifeq ($(origin MORPHEO_TMP), undefined)
     15        $(error "variable MORPHEO_TMP      is undefined");
     16endif
     17ifeq ($(origin MORPHEO_SCRIPT), undefined)
     18        $(error "variable MORPHEO_SCRIPT   is undefined");
     19endif
     20ifeq ($(origin DIR_MORPHEO), undefined)
     21        $(error "variable DIR_MORPHEO      is undefined");
     22endif
    1023
    1124#-----[ Directory ]----------------------------------------
     25DIR_TMP                         = $(MORPHEO_TMP)
    1226DIR_INC                         = include
    1327DIR_SRC                         = src
    1428DIR_OBJ                         = obj
     29#DIR_LIB                                = $(DIR_TMP)/lib
    1530DIR_SCRIPT                      = $(MORPHEO_SCRIPT)
    1631
     
    3550
    3651#-----[ Variable ]-----------------------------------------
    37 
    38 ENTITY                          = `$(BASENAME) $$PWD`
     52ENTITY                          = $$($(BASENAME) $$PWD)
    3953
    4054OBJECTS_COMMON                  = $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp))
     
    4660
    4761test_env                        :
    48 ifeq ($(origin MORPHEO_TOPLEVEL), undefined)
    49                                 $(error "variable MORPHEO_TOPLEVEL is undefined");
    50 endif
    51 ifeq ($(origin MORPHEO_SCRIPT), undefined)
    52                                 $(error "variable MORPHEO_SCRIPT   is undefined");
    53 endif
    54 ifeq ($(origin DIR_MORPHEO), undefined)
    55                                 $(error "variable DIR_MORPHEO      is undefined");
    56 endif
    5762                                @$(ECHO) "-------------------| $(ENTITY)"
    5863
     
    7782                                        $(DIR_INC)/*~;
    7883
     84common_clean_all                : common_clean
     85
    7986common_help                     :
    8087                                @\
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Component

    r81 r88  
    11#-----[ Directory ]----------------------------------------
    22DIR_DOC                         = doc
    3 DIR_LIB                         = lib
    43DIR_TEST                        = SelfTest
     4DIR_LIB                         = lib
    55
    66#-----[ Variable ]-----------------------------------------
     
    3030component_clean                 :
    3131                                @$(RM) $(DIR_LIB)
     32
     33#                               if $(TEST) -d $(DIR_DOC); then $(MAKE) --directory=$(DIR_DOC) --makefile=Makefile clean; fi;
     34
     35component_clean_all             : component_clean
     36
     37#                               if $(TEST) -d $(DIR_DOC); then $(MAKE) --directory=$(DIR_DOC) --makefile=Makefile clean_all; fi;
    3238                               
    3339component_help                  :
     
    5056                                @\
    5157                                $(MAKE) common_clean ;\
    52                                 $(MAKE) component_clean;\
    53                                 if $(TEST) -d $(DIR_DOC); then $(MAKE) --directory=$(DIR_DOC) --makefile=Makefile clean; fi;
     58                                $(MAKE) component_clean;
     59
     60clean_all                               :
     61                                @\
     62                                $(MAKE) common_clean_all ;\
     63                                $(MAKE) component_clean_all;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Documentation

    r81 r88  
    1 #-----[ Directory ]----------------------------------------
     1#-----[ Directory ]----------------------------------------
    22
    3 DIR_DOCUMENTATION       = .
    4 DIR_TEX                 = $(DIR_DOCUMENTATION)
    5 DIR_SCHEMA              = $(DIR_DOCUMENTATION)/fig
    6 DIR_SCHEMA_EPS          = $(DIR_DOCUMENTATION)/eps
     3DIR_DOC                 = .
     4DIR_TEX                 = $(DIR_DOC)
     5DIR_FIG                 = $(DIR_DOC)/fig
     6DIR_EPS                 = $(DIR_DOC)/eps
     7DIR_STY                 = $(DIR_DOC)/sty
    78
    8 #-----[ Files ]--------------------------------------------
     9#-----[ Files ]--------------------------------------------
    910
    1011TEX_FILES               = $(wildcard $(DIR_TEX)/*.tex)
     
    1213PS_FILES                = $(patsubst $(DIR_TEX)/%.tex,%.ps ,$(TEX_FILES))
    1314PDF_FILES               = $(patsubst $(DIR_TEX)/%.tex,%.pdf,$(TEX_FILES))
    14 EPS_FILES               = $(patsubst $(DIR_SCHEMA)/%.fig,$(DIR_SCHEMA_EPS)/%.eps,$(wildcard $(DIR_SCHEMA)/*.fig))       \
    15                           $(patsubst $(DIR_SCHEMA)/%.eps,$(DIR_SCHEMA_EPS)/%.eps,$(wildcard $(DIR_SCHEMA)/*.eps))
     15EPS_FILES               = $(patsubst $(DIR_FIG)/%.fig,$(DIR_EPS)/%.eps,$(wildcard $(DIR_FIG)/*.fig))       \
     16                          $(patsubst $(DIR_FIG)/%.dot,$(DIR_EPS)/%.eps,$(wildcard $(DIR_FIG)/*.dot))       \
     17                          $(patsubst $(DIR_FIG)/%.eps,$(DIR_EPS)/%.eps,$(wildcard $(DIR_FIG)/*.eps))
    1618
    17 #-----[ Rules ]--------------------------------------------
     19#-----[ Rules ]--------------------------------------------
    1820
    1921#--------------------------------------------------------------------------------
    2022# The reset of this file shall not be editted
    2123#--------------------------------------------------------------------------------
    22 .PHONY                  : all clean help
    23 .SECONDARY              : $(DVI_FILES) $(PS_FILES) $(PDF_FILES) $(EPS_FILES) $(DIR_SCHEMA_EPS)
     24.PHONY                  : all clean clean_all help
     25.SECONDARY              : $(DVI_FILES) $(PS_FILES) $(PDF_FILES) $(EPS_FILES) $(DIR_EPS)
    2426
    25 all_documentation       : $(EPS_FILES)
     27all_documentation       : $(EPS_FILES)
    2628                        $(MAKE) $(PDF_FILES)
    2729
     
    3032# regular flow tex -> dvi -> ps -> pdf.
    3133#--------------------------------------------------------------------------------
    32 %.pdf                   : %.ps
     34%.pdf                   : %.ps
    3335                        @\
    34                         $(ECHO) "Génération du fichier $*.pdf";         \
     36                        $(ECHO) "Génération du fichier $*.pdf";         \
    3537                        $(PS2PDF) $< $@;
    3638
    37 %.ps                    : %.dvi
     39%.ps                    : %.dvi
    3840                        @\
    39                         $(ECHO) "Génération du fichier $*.ps";          \
     41                        $(ECHO) "Génération du fichier $*.ps";          \
    4042                        $(DVIPS) -o $@ $<;
    4143
    42 %.dvi                   : $(DIR_TEX)/%.tex
     44%.dvi                   : $(DIR_TEX)/%.tex
    4345                        @\
    44                         $(ECHO) "Génération du fichier $*.dvi";         \
    45                         $(LATEX) $<;                                    \
    46                         $(LATEX) $< > /dev/null;                        \
    47                         citation=`$(GREP) "citation" $*.aux`;           \
    48                         if $(TEST) -n "$$citation" ; then               \
    49                                 $(BIBTEX) $* ;                          \
    50                         fi;                                             \
    51                         $(LATEX) $< > /dev/null;                        \
     46                        $(ECHO) "Génération du fichier $*.dvi";         \
     47                        $(LATEX) $<;                                    \
     48                        $(LATEX) $< > /dev/null;                        \
     49                        citation=`$(GREP) "citation" $*.aux`;           \
     50                        if $(TEST) -n "$$citation" ; then               \
     51                                $(BIBTEX) $* ;                          \
     52                        fi;                                             \
     53                        $(LATEX) $< > /dev/null;                        \
    5254                        $(LATEX) $< > /dev/null;
    5355
     
    5557# The figures directory
    5658#--------------------------------------------------------------------------------
    57 $(DIR_SCHEMA_EPS)       :
     59$(DIR_EPS)      :
    5860                        @\
    59                         $(ECHO) "Make directory       : $@";            \
     61                        $(ECHO) "Make directory       : $@";            \
    6062                        $(MKDIR) $@;
    6163
    62 $(DIR_SCHEMA_EPS)/%.eps : $(DIR_SCHEMA)/%.eps $(DIR_SCHEMA_EPS)
     64$(DIR_EPS)/%.eps        : $(DIR_FIG)/%.eps $(DIR_EPS)
    6365                        @\
    64                         $(ECHO) "Generate   files     : $*.eps";        \
    65                         $(CP) $(DIR_SCHEMA)/$*.eps $(DIR_SCHEMA_EPS);
     66                        $(ECHO) "Generate   files     : $*.eps";        \
     67                        $(CP) $(DIR_FIG)/$*.eps $(DIR_EPS);
    6668
    67 $(DIR_SCHEMA_EPS)/%.eps : $(DIR_SCHEMA)/%.fig $(DIR_SCHEMA_EPS)
     69$(DIR_EPS)/%.eps        : $(DIR_FIG)/%.fig $(DIR_EPS)
    6870                        @\
    69                         $(ECHO) "Generate   files     : $*.eps";        \
     71                        $(ECHO) "Generate   files     : $*.eps";        \
    7072                        $(FIG2EPS) $< $@;
     73
     74$(DIR_EPS)/%.eps        : $(DIR_FIG)/%.dot $(DIR_EPS)
     75                        @\
     76                        $(ECHO) "Generate   files     : $*.eps";        \
     77                        $(DOT) -Tfig -o $(DIR_EPS)/${*}.fig $<; \
     78                        $(FIG2EPS) $(DIR_EPS)/${*}.fig $@;      \
     79                        $(RM) $(DIR_EPS)/${*}.fig;
    7180
    7281#--------------------------------------------------------------------------------
     
    7483#--------------------------------------------------------------------------------
    7584
    76 clean                   :
     85clean                   :
    7786                        @\
    7887                        $(ECHO) "Delete     temporary files              "$(PWD); \
    79                         $(RM) $(DIR_SCHEMA_EPS);                        \
    80                         $(RM) $(DVI_FILES) $(PS_FILES) $(PDF_FILES);    \
    81                         $(MAKE) clean_rec DIR_CLEAN=.;
     88                        $(RM) $(DIR_EPS)                      \
     89                              $(DVI_FILES)                    \
     90                              $(PS_FILES)                     \
     91                              $(DIR_DOC)/*~                   \
     92                              $(DIR_STY)/*~                   \
     93                              $(DIR_TEX)/*~                   \
     94                              $(DIR_FIG)/*~                   \
     95                              $(DIR_DOC)/*.bak                \
     96                              $(DIR_DOC)/*.aux                \
     97                              $(DIR_DOC)/*.bbl                \
     98                              $(DIR_DOC)/*.blg                \
     99                              $(DIR_DOC)/*.bmt                \
     100                              $(DIR_DOC)/*.log                \
     101                              $(DIR_DOC)/*.mtc*               \
     102                              $(DIR_DOC)/*.toc                \
     103                              $(DIR_DOC)/*.idx                \
     104                              $(DIR_DOC)/*.maf                \
     105                              $(DIR_DOC)/*.ilg                \
     106                              $(DIR_DOC)/*.ind                \
     107                              $(DIR_DOC)/*.out                \
     108                              $(DIR_DOC)/*.nav                \
     109                              $(DIR_DOC)/*.snm                \
     110                              $(DIR_DOC)/missfont.log;        \
    82111
    83 #Clean recursive
    84 clean_rec               :
    85                         @\
    86                         $(ECHO) "Delete     temporary files in directory $(DIR_CLEAN)"; \
    87                         $(RM)   $(DIR_CLEAN)/*~                 \
    88                                 $(DIR_CLEAN)/*.bak              \
    89                                 $(DIR_CLEAN)/*.aux              \
    90                                 $(DIR_CLEAN)/*.bbl              \
    91                                 $(DIR_CLEAN)/*.blg              \
    92                                 $(DIR_CLEAN)/*.bmt              \
    93                                 $(DIR_CLEAN)/*.log              \
    94                                 $(DIR_CLEAN)/*.mtc*             \
    95                                 $(DIR_CLEAN)/*.toc              \
    96                                 $(DIR_CLEAN)/*.idx              \
    97                                 $(DIR_CLEAN)/*.ilg              \
    98                                 $(DIR_CLEAN)/*.ind              \
    99                                 $(DIR_CLEAN)/*.out              \
    100                                 $(DIR_CLEAN)/*.nav              \
    101                                 $(DIR_CLEAN)/*.snm              \
    102                                 $(DIR_CLEAN)/missfont.log;      \
    103                         for files in `$(LS) $(DIR_CLEAN)`; do                                                   \
    104                                 if $(TEST) -d $(DIR_CLEAN)/$$files;                                             \
    105                                 then                                                                            \
    106                                         $(MAKE) clean_rec DIR_CLEAN=$(DIR_CLEAN)/$$files;                       \
    107                                 fi;                                                                             \
    108                         done;
     112clean_all               : clean
     113                        @$(RM) $(PDF_FILES);
    109114
    110115#--------------------------------------------------------------------------------
     
    112117#--------------------------------------------------------------------------------
    113118
    114 help                    :
     119help                    :
    115120                        @\
    116                         $(ECHO) " -----[ Documentation ]------------------------------";\
    117                         $(ECHO) "";                                                     \
    118                         $(ECHO) " * all_documentation    : Generate all documents";     \
    119                         $(ECHO) " * clean                : Erase all generate files";   \
    120                         $(ECHO) " * help                 : Print this message";         \
     121                        $(ECHO) " -----[ Documentation ]------------------------------";\
     122                        $(ECHO) "";                                                     \
     123                        $(ECHO) " * all_documentation    : Generate all documents";     \
     124                        $(ECHO) " * clean                : Erase all temporary files";  \
     125                        $(ECHO) " * clean_all            : Erase all generate files";   \
     126                        $(ECHO) " * help                 : Print this message";         \
    121127                        $(ECHO) "";
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest

    r83 r88  
    88
    99#-----[ Directory ]----------------------------------------
    10 DIR_BIN                         = bin
    11 DIR_LIB                         = ../lib
    12 DIR_CFG_GEN                     = configuration_generated
     10DIR_BIN                         = $(DIR_TMP)/bin
     11DIR_LIB                         = ../lib
     12DIR_CFG_GEN                     = $(DIR_TMP)/configuration_generated
    1313DIR_CFG_USER                    = configuration
    1414DIR_LOG                         = log
     
    3434                                @\
    3535                                $(MAKE) library;\
    36                                 $(MAKE) $(DIR_BIN)/$(EXEC).x;
    37 
    38 execute                         : all_selftest
     36                                $(MAKE) $(DIR_BIN)/$(EXEC).x;
     37
     38execute_only                    :
    3939                                @\
    4040                                $(MAKE) $(EXEC_LOG);                                    \
     
    4545                                    $(GREP) -q "Test KO" $$i;                           \
    4646                                    declare -i test_ko=$$?;                             \
    47                                     if $(TEST) $$test_ko -eq 0 -o $$test_ok -ne 0;      \
     47                                    $(GREP) -q "ERROR" $$i;                             \
     48                                    declare -i test_error=$$?;                          \
     49                                    if $(TEST) $$test_ko -eq 0 -o $$test_error -eq 0 -o $$test_ok -ne 0; \
    4850                                    then all_ok=0;                                      \
    4951                                    fi;                                                 \
     
    5456                                fi;
    5557
     58execute                         : all_selftest
     59                                @\
     60                                $(MAKE) execute_only;
     61
    5662reconfig                        :
    5763                                @\
     
    7480                                fi;                                                                                                     \
    7581                                                                                                                                        \
    76                                 for file in $$files; do                                                                                 \
    77                                                                                                                                         \
     82                                declare -i NB_CONFIG=0;                                                                                 \
     83                                declare -i NB_DIGIT=0;                                                                                  \
     84                                                                                                                                        \
     85                                for file in $${files}; do                                                                               \
     86                                        declare -ai PERIOD=();                                                                          \
     87                                        declare -i  IT=0;                                                                               \
     88                                                                                                                                        \
     89                                        PERIOD[0]=1;                                                                                    \
     90                                                                                                                                        \
     91                                        while read line; do                                                                             \
     92                                                declare -a LINE=($${line});                                                             \
     93                                                                                                                                        \
     94                                                if $(TEST) $${IT} -ne 0; then                                                           \
     95                                                        declare -a RANGE_LOCAL=($$($(DIR_SCRIPT)/range.sh $${LINE[0]} $${LINE[1]} $${LINE[2]}));        \
     96                                                        declare -i SIZE=$${#RANGE_LOCAL[*]};                                            \
     97                                                        PERIOD[$${IT}]=$$(($${PERIOD[$$(($${IT}-1))]}*$${SIZE}));                       \
     98                                                fi;                                                                                     \
     99                                                                                                                                        \
     100                                                IT=$$(($${IT}+1));                                                                      \
     101                                        done < $${file};                                                                                \
     102                                                                                                                                        \
     103                                        NB_CONFIG=$$(($${NB_CONFIG} + $${PERIOD[$$(($${IT}-1))]}));                                     \
     104                                done;                                                                                                   \
     105                                                                                                                                        \
     106                                $(ECHO) " * They are $${NB_CONFIG} configurations";                                                     \
     107                                                                                                                                        \
     108                                declare -i x=$${NB_CONFIG};                                                                             \
     109                                                                                                                                        \
     110                                while test $${x} -ne 0; do                                                                              \
     111                                        NB_DIGIT=$$(($${NB_DIGIT} + 1));                                                                \
     112                                        x=$$(($${x} / 10));                                                                             \
     113                                done;                                                                                                   \
     114                                                                                                                                        \
     115                                for file in $${files}; do                                                                               \
    78116                                        declare     NAME;                                                                               \
    79                                         declare -ai MIN ;                                                                               \
    80                                         declare -ai MAX ;                                                                               \
    81                                         declare -a  STEP;                                                                               \
    82                                         declare -a  LINE;                                                                               \
    83                                         declare -ai PERIOD;                                                                             \
    84                                         declare -a  RANGE;                                                                              \
    85                                         declare -a  RANGE_LOCAL;                                                                        \
    86                                         declare -a  SIZE;                                                                               \
     117                                        declare -ai MIN=();                                                                             \
     118                                        declare -ai PERIOD=();                                                                          \
     119                                        declare -a  RANGE_LOCAL=();                                                                     \
     120                                        declare -a  RANGE=();                                                                           \
     121                                        declare -a  SIZE=();                                                                            \
    87122                                        declare -i  IT=0;                                                                               \
    88123                                                                                                                                        \
     
    90125                                                                                                                                        \
    91126                                        while read line; do                                                                             \
    92                                                 LINE=($$line);                                                                          \
    93                                                                                                                                         \
    94                                                 if $(TEST) $$IT -eq 0; then                                                             \
     127                                                declare -a LINE=($${line});                                                             \
     128                                                                                                                                        \
     129                                                if $(TEST) $${IT} -eq 0; then                                                           \
    95130                                                        NAME=$${LINE[0]};                                                               \
    96131                                                else                                                                                    \
    97                                                         MIN[$$IT]=$${LINE[0]};                                                          \
    98                                                         MAX[$$IT]=$${LINE[1]};                                                          \
    99                                                         STEP[$$IT]=$${LINE[2]};                                                         \
    100                                                         RANGE[$$IT]=$$($(DIR_SCRIPT)/range.sh $${LINE[0]} $${LINE[1]} $${LINE[2]});     \
    101                                                         RANGE_LOCAL=($${RANGE[$$IT]});                                                  \
    102                                                         SIZE[$$IT]=$${#RANGE_LOCAL[*]};                                                 \
    103                                                         PERIOD[$$IT]=$$(($${PERIOD[$$(($$IT-1))]}*$${SIZE[$$IT]}));                     \
     132                                                        MIN[$${IT}]=$${LINE[0]};                                                        \
     133                                                        RANGE[$${IT}]=$$($(DIR_SCRIPT)/range.sh $${LINE[0]} $${LINE[1]} $${LINE[2]});   \
     134                                                        RANGE_LOCAL=($${RANGE[$${IT}]});                                                \
     135                                                        SIZE[$${IT}]=$${#RANGE_LOCAL[*]};                                               \
     136                                                        PERIOD[$${IT}]=$$(($${PERIOD[$$(($${IT}-1))]}*$${SIZE[$${IT}]}));               \
    104137                                                fi;                                                                                     \
    105138                                                                                                                                        \
    106                                                 IT=$$(($$IT+1));                                                                        \
    107                                         done < $$file;                                                                                  \
    108                                                                                                                                         \
    109                                         declare -i x;                                                                                   \
    110                                         declare -a DATA;                                                                                \
    111                                         declare -ai ENUM_CONFIG=($$($(DIR_SCRIPT)/range.sh 0 $$(($${PERIOD[$$(($$IT-1))]}-1))));        \
     139                                                IT=$$(($${IT}+1));                                                                      \
     140                                        done < $${file};                                                                                \
     141                                                                                                                                        \
     142                                        declare -a  DATA=();                                                                            \
     143                                        declare -ai ENUM_CONFIG=($$($(DIR_SCRIPT)/range.sh 0 $$(($${PERIOD[$$(($${IT}-1))]}-1))));      \
    112144                                        declare -ai ENUM_PARAM=($$($(DIR_SCRIPT)/range.sh 1 $${#MIN[*]}));                              \
     145                                        declare -i  NB_PARAM=$${#MIN[*]};                                                               \
    113146                                                                                                                                        \
    114147                                        $(ECHO) " * File : $$file";                                                                     \
    115                                         $(ECHO) "   * They are $${#MIN[*]} parameters";                                                 \
    116                                         $(ECHO) "   * Generate $${PERIOD[$$(($$IT-1))]} configurations";                                \
     148                                        $(ECHO) "   * They are $${NB_PARAM} parameters";                                                \
     149                                        $(ECHO) "   * Generate $${PERIOD[$$(($${IT}-1))]} configurations";                              \
    117150                                                                                                                                        \
    118151                                        for i in $${ENUM_CONFIG[*]}; do                                                                 \
    119152                                                x=$$i;                                                                                  \
    120153                                                for j in $${ENUM_PARAM[*]}; do                                                          \
    121                                                         RANGE_LOCAL=($${RANGE[$$j]});                                                   \
     154                                                        declare -a RANGE_LOCAL=($${RANGE[$$j]});                                                        \
    122155                                                        DATA[$$j]="$${RANGE_LOCAL[$$((($$x % $${SIZE[$$j]})))]} ";                      \
    123156                                                        x=$$(($$x/$${SIZE[$$j]}));                                                      \
    124157                                                done;                                                                                   \
    125                                                 $(ECHO) $${DATA[*]} > "$(DIR_CFG_GEN)/$${NAME}_$$CPT.cfg";                              \
    126                                                 $(ECHO) "   - {$$CPT} $${DATA[*]}";                                                     \
    127                                                 CPT=$$(($$CPT+1));                                                                      \
     158                                                declare NUM=$$($(PRINTF) %.$${NB_DIGIT}d $${CPT});                                      \
     159                                                $(ECHO) $${DATA[*]} > "$(DIR_CFG_GEN)/$${NAME}_$${NUM}.cfg";                            \
     160                                                $(ECHO) "   - {$${NUM}} $${DATA[*]}";                                                   \
     161                                                CPT=$$(($${CPT}+1));                                                                    \
    128162                                        done;                                                                                           \
    129163                                done;
     
    132166                                @\
    133167                                $(ECHO) "Execute            : $*";\
    134                                 export SYSTEMC=$(SYSTEMC_$(SIMULATOR)) ; $(EXEC_PREFIX) ./$(DIR_BIN)/$(EXEC).x $(EXEC_PARAMS) $* `$(CAT) $<` &> $@; \
     168                                export SYSTEMC=$(SYSTEMC_$(SIMULATOR)); $(EXEC_PREFIX) $(DIR_BIN)/$(EXEC).x $(EXEC_PARAMS) $* `$(CAT) $<` &> $@; \
    135169                                declare timing=`$(GREP) -h "Timing"  $@`;               \
    136170                                $(GREP) -q "Test OK" $@;                                \
     
    138172                                $(GREP) -q "Test KO" $@;                                \
    139173                                declare -i test_ko=$$?;                                 \
    140                                 if $(TEST) $$test_ko -ne 0 -a $$test_ok -eq 0;          \
     174                                $(GREP) -q "ERROR" $@;                                  \
     175                                declare -i test_error=$$?;                              \
     176                                if $(TEST) $$test_ko -ne 0 -a $$test_error -ne 0 -a $$test_ok -eq 0; \
    141177                                then echo -e "                     $* ... OK\t$$timing";\
    142178                                else echo    "                     $* ... KO";          \
     
    146182                                @\
    147183                                $(ECHO) "Execute            : $*";\
    148                                 export SYSTEMC=$(SYSTEMC_$(SIMULATOR)) ; $(EXEC_PREFIX) ./$(DIR_BIN)/$(EXEC).x $(EXEC_PARAMS) $* `$(CAT) $<` &> $@; \
     184                                export SYSTEMC=$(SYSTEMC_$(SIMULATOR)); $(EXEC_PREFIX) $(DIR_BIN)/$(EXEC).x $(EXEC_PARAMS) $* `$(CAT) $<` &> $@; \
    149185                                declare timing=`$(GREP) -h "Timing"  $@`;               \
    150186                                $(GREP) -q "Test OK" $@;                                \
     
    152188                                $(GREP) -q "Test KO" $@;                                \
    153189                                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";          \
     190                                $(GREP) -q "ERROR" $@;                                  \
     191                                declare -i test_error=$$?;                              \
     192                                if $(TEST) $$test_ko -ne 0 -a $$test_error -ne 0 -a $$test_ok -eq 0; \
     193                                then $(ECHO) -e "                     $* ... OK\t$$timing";\
     194                                else $(ECHO)    "                     $* ... KO";          \
    157195                                fi;
    158196
     
    162200                                $(CXX) $(LFLAGS) -o $@ $(OBJECTS) $(LIBS);
    163201
     202$(DIR_LIB)                      :
     203                                @\
     204                                $(ECHO) "Create directory   : $@";\
     205                                $(MKDIR) $@;
     206
    164207$(DIR_BIN)                      :
    165208                                @\
     
    177220                                $(MKDIR) $@;
    178221
    179 selftest_clean_all              : library_clean
    180                                
    181 selftest_clean                  : config_clean
     222selftest_clean                  : local_clean config_clean
    182223                                @$(RM)  $(DIR_LOG)              \
    183224                                        $(DIR_CFG_USER)/*~      \
     
    185226                                        *.pos                   \
    186227                                        *.stat                  \
     228                                        *.log                   \
    187229                                        *.dot                   \
    188230                                        *.txt                   \
    189231                                        generated_by_systemcass \
     232                                        semantic.cache          \
    190233                                        core*;
     234
     235selftest_clean_all              : library_clean
     236                               
    191237
    192238selftest_help                   :
     
    196242                                $(ECHO) " * all_selftest         : compile all c++ file and execute";\
    197243                                $(ECHO) " * execute              : execute all instance";\
     244                                $(ECHO) " * execute_only         : execute all instance without rebuild all libraries";\
    198245                                $(ECHO) " * config               : generate configuration with configuration's file" ;\
    199246                                $(ECHO) " * reconfig             : regenerate configuration with configuration's file" ;\
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Synthesis

    r81 r88  
    8787                                $(RM) $(DIR_WORK) transcript Makefile.mkf $(FPGA_CFG_FILE_LOCAL) *.wlf;
    8888
     89synthesis_clean_all             : synthesis_clean
     90
    8991synthesis_help                  :
    9092                                @\
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.flags

    r82 r88  
    55#
    66
    7 #-----[ Simulator ]----------------------------------------
    8 SIMULATOR                       = systemcass
    9 #SIMULATOR                      = systemc
    10 
    11 # 3 simulators :
    12 # systemc                       - SystemC   
    13 # systemcass                    - SystemCASS
    14 # systemcass_deps               - Systemcass, and use port dependency information instead of sensitivity list
    15 
    16 #-----[ Flags ]--------------------------------------------
    17 MORPHEO_FLAGS                   =       -DSYSTEMC               \
    18                                         -DSTATISTICS            \
    19                                         -DDEBUG=DEBUG_TRACE
    20 
    21 #                                       -DVHDL                  \
    22 #                                       -DVHDL_TESTBENCH        \
    23 #                                       -DVHDL_TESTBENCH_ASSERT \
    24 #                                       -DPOSITION              \
    25 #                                       -DNO_TRANSLATION        \
    26 
    27 # Flags :
    28 # DEBUG={level}                           - Print Debug Message
    29 # SYSTEMC                                 - To generate a systemc's model
    30 # VHDL                                    - To generate a vhdl's    models
    31 # VHDL_TESTBENCH        (need SYSTEMC)    - In the simulation, generate two testbench's file (input and ouput) to validate the vhdl's model
    32 # VHDL_TESTBENCH_ASSERT (need SYSTEMC)    - In the simulation, generate in  testbench's file an serie of assert
    33 # POSITION                                - To generate a position's files     (it's input of viewer)
    34 # STATISTICS            (need SYSTEMC)    - In the simulation, generate a statistics's file
    35 # INFORMATION           (need STATISTICS) - Instance Information :
    36 #                                             * Static    : at the instance creation
    37 #                                                * register number
    38 #                                                * worst way
    39 #                                             * Dynamique : at the runtime
    40 #                                                * consomation
    41 # NO_TRANSLATION                          - No translate message
    42 # NO_INIT                                 - No init a lot of register
     7ifeq ($(origin MORPHEO_TOPLEVEL), undefined)
     8        $(error "variable MORPHEO_TOPLEVEL is undefined");
     9else
     10        include $(MORPHEO_TOPLEVEL)/Makefile.flags
     11endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/Makefile

    r82 r88  
    2424library_clean                   : @COMPONENT_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/main.cpp

    r83 r88  
    3737      morpheo::behavioural::@NAMESPACE_USE::Parameters * param = new morpheo::behavioural::@NAMESPACE_USE::Parameters
    3838        (
     39         true //is_toplevel
    3940        );
    4041     
    41       msg(_("%s"),param->print(1).c_str());
     42      msg(_("%s"),param->print(0).c_str());
    4243     
    4344      test (name,param);
     
    5859  catch (morpheo::ErrorMorpheo & error)
    5960    {
    60       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
     61//       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
    6162      _return = EXIT_FAILURE;
    6263    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/test.cpp

    r87 r88  
    1414{
    1515  msg(_("<%s> : Simulation SystemC.\n"),name.c_str());
     16
     17  if (setlocale (LC_ALL, "") == NULL)
     18    msg(_("setlocale ko.\n"));
    1619
    1720#ifdef STATISTICS
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/Parameters.h

    r82 r88  
    2121
    2222    //-----[ methods ]-----------------------------------------------------------
    23   public : Parameters  ();
    24 //   public : Parameters  (Parameters & param) ;
    25   public : ~Parameters () ;
     23  public : Parameters  (bool is_toplevel=false);
     24//public : Parameters  (Parameters & param) ;
     25  public : ~Parameters (void);
     26
     27  public :        void            copy       (void);
    2628
    2729  public :        Parameters_test msg_error  (void);
     
    2931  public :        std::string     print      (uint32_t depth);
    3032  public : friend std::ostream&   operator<< (std::ostream& output_stream,
    31                                             morpheo::behavioural::@NAMESPACE_USE::Parameters & x);
     33                                              morpheo::behavioural::@NAMESPACE_USE::Parameters & x);
    3234  };
    3335
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component.cpp

    r82 r88  
    3535    usage_environment(_usage);
    3636
    37     log_printf(INFO,@COMPONENT,FUNCTION,_("Allocation"));
     37    log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Allocation"),_name.c_str());
    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,_("<%s> : Allocation of statistics"),_name.c_str());
    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,_("<%s> : Generate the vhdl"),_name.c_str());
    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,_("<%s> : Method - transition"),_name.c_str());
    6868
    6969        SC_METHOD (transition);
     
    7474        // List dependency information
    7575# endif   
     76
     77//      log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Method - genMoore"),_name.c_str());
     78
     79//      SC_METHOD (genMoore);
     80//      dont_initialize ();
     81//      sensitive << (*(in_CLOCK)).neg(); // need internal register
     82       
     83// # ifdef SYSTEMCASS_SPECIFIC
     84//      // List dependency information
     85// # endif   
    7686       
    7787#endif
     
    93103#endif
    94104
    95     log_printf(INFO,@COMPONENT,FUNCTION,_("Deallocation"));
     105    log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Deallocation"),_name.c_str());
    96106    deallocation ();
    97107
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_statistics_deallocation.cpp

    r82 r88  
    1919    log_begin(@COMPONENT,FUNCTION);
    2020
    21     log_printf(INFO,@COMPONENT,FUNCTION,_("Generate Statistics file"));
     21    log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Generate Statistics file"),_name.c_str());
    2222   
    2323    delete _stat;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters.cpp

    r82 r88  
    1414#undef  FUNCTION
    1515#define FUNCTION "@COMPONENT::Parameters"
    16   Parameters::Parameters ()
     16  Parameters::Parameters (bool is_toplevel)
    1717  {
    1818    log_begin(@COMPONENT,FUNCTION);
     19
    1920    test();
     21
     22    if (is_toplevel)
     23      {
     24        copy();
     25      }
     26
    2027    log_end(@COMPONENT,FUNCTION);
    2128  };
     
    3239#undef  FUNCTION
    3340#define FUNCTION "@COMPONENT::~Parameters"
    34   Parameters::~Parameters ()
     41  Parameters::~Parameters (void)
     42  {
     43    log_begin(@COMPONENT,FUNCTION);
     44    log_end(@COMPONENT,FUNCTION);
     45  };
     46
     47#undef  FUNCTION
     48#define FUNCTION "@COMPONENT::copy"
     49  void Parameters::copy (void)
    3550  {
    3651    log_begin(@COMPONENT,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/Makefile

    r82 r88  
    2424library_clean                   : @COMPONENT_library_clean
    2525
     26local_clean                     :
     27
    2628include                         $(DIR_COMPONENT)/Makefile.deps
    2729include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/main.cpp

    r83 r88  
    3737      morpheo::behavioural::@NAMESPACE_USE::Parameters * param = new morpheo::behavioural::@NAMESPACE_USE::Parameters
    3838        (
     39         true // is_toplevel
    3940        );
    4041     
    41       msg(_("%s"),param->print(1).c_str());
     42      msg(_("%s"),param->print(0).c_str());
    4243     
    4344      test (name,param);
     
    5859  catch (morpheo::ErrorMorpheo & error)
    5960    {
    60       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
     61//       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
    6162      _return = EXIT_FAILURE;
    6263    }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/test.cpp

    r87 r88  
    1414{
    1515  msg(_("<%s> : Simulation SystemC.\n"),name.c_str());
     16 
     17  if (setlocale (LC_ALL, "") == NULL)
     18    msg(_("setlocale ko.\n"));
    1619
    1720#ifdef STATISTICS
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/include/Parameters.h

    r82 r88  
    2121
    2222    //-----[ methods ]-----------------------------------------------------------
    23   public : Parameters  ();
    24 //   public : Parameters  (Parameters & param) ;
    25   public : ~Parameters () ;
     23  public : Parameters  (bool is_toplevel=false);
     24//public : Parameters  (Parameters & param) ;
     25  public : ~Parameters (void);
     26
     27  public :        void            copy       (void);
    2628
    2729  public :        Parameters_test msg_error  (void);
    2830
    2931  public :        std::string     print      (uint32_t depth);
    30   public : friend std::ostream&   operator<< (std::ostream& output_stream,
    31                                             morpheo::behavioural::@NAMESPACE_USE::Parameters & x);
     32  public : friend std::ostream&   operator<< (std::ostream& output,
     33                                              morpheo::behavioural::@NAMESPACE_USE::Parameters & x);
    3234  };
    3335
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component.cpp

    r82 r88  
    3535    usage_environment(_usage);
    3636
    37     log_printf(INFO,@COMPONENT,FUNCTION,_("Allocation"));
     37    log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Allocation"),_name.c_str());
    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,_("<%s> : Allocation of statistics"),_name.c_str());
    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,_("<%s> : Generate the vhdl"),_name.c_str());
    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,_("<%s> : Method - transition"),_name.c_str());
    6868
    6969        SC_METHOD (transition);
     
    9393#endif
    9494
    95     log_printf(INFO,@COMPONENT,FUNCTION,_("Deallocation"));
     95    log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Deallocation"),_name.c_str());
    9696    deallocation ();
    9797
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_statistics_deallocation.cpp

    r82 r88  
    1919    log_begin(@COMPONENT,FUNCTION);
    2020
    21     log_printf(INFO,@COMPONENT,FUNCTION,_("Generate Statistics file"));
     21    log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Generate Statistics file"),_name.c_str());
    2222   
    2323    delete _stat;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/Parameters.cpp

    r82 r88  
    1414#undef  FUNCTION
    1515#define FUNCTION "@COMPONENT::Parameters"
    16   Parameters::Parameters ()
     16  Parameters::Parameters (bool is_toplevel)
    1717  {
    1818    log_begin(@COMPONENT,FUNCTION);
     19
    1920    test();
     21
     22    if (is_toplevel)
     23      {
     24        copy();
     25      }
     26
    2027    log_end(@COMPONENT,FUNCTION);
    2128  };
     
    3239#undef  FUNCTION
    3340#define FUNCTION "@COMPONENT::~Parameters"
    34   Parameters::~Parameters ()
     41  Parameters::~Parameters (void)
     42  {
     43    log_begin(@COMPONENT,FUNCTION);
     44    log_end(@COMPONENT,FUNCTION);
     45  };
     46
     47#undef  FUNCTION
     48#define FUNCTION "@COMPONENT::copy"
     49  void Parameters::copy (void)
    3550  {
    3651    log_begin(@COMPONENT,FUNCTION);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h

    r82 r88  
    1111#include "Common/include/Debug.h"
    1212
     13// ======================================================================
     14// =====[ ALLOCATION / DELETE of ARRAY ]=================================
     15// ======================================================================
     16
     17#define ALLOC1(var,type,s1)                      \
     18  var = new type [s1]
     19 
     20#define ALLOC2(var,type,s1,s2)                   \
     21  var = new type * [s1];                         \
     22  for (uint32_t it1=0; it1<s1; ++it1)            \
     23    {                                            \
     24      var [it1] = new type [s2];                 \
     25    }
     26
     27#define ALLOC3(var,type,s1,s2,s3)                \
     28  var = new type ** [s1];                        \
     29  for (uint32_t it1=0; it1<s1; ++it1)            \
     30    {                                            \
     31      var [it1] = new type * [s2];               \
     32      for (uint32_t it2=0; it2<s2; ++it2)        \
     33        {                                        \
     34          var [it1][it2] = new type [s3];        \
     35        }                                        \
     36    }
     37 
     38#define ALLOC4(var,type,s1,s2,s3,s4)                    \
     39  var = new type *** [s1];                              \
     40  for (uint32_t it1=0; it1<s1; ++it1)                   \
     41    {                                                   \
     42      var [it1] = new type ** [s2];                     \
     43      for (uint32_t it2=0; it2<s2; ++it2)               \
     44        {                                               \
     45          var [it1][it2] = new type * [s3];             \
     46          for (uint32_t it3=0; it3<s3; ++it3)           \
     47            {                                           \
     48              var [it1][it2][it3] = new type [s4];      \
     49            }                                           \
     50        }                                               \
     51    }
     52 
     53#define DELETE1(var,s1)                          \
     54  delete [] var;
     55
     56#define DELETE2(var,s1,s2)                       \
     57  for (uint32_t it1=0; it1<s1; ++it1)            \
     58    {                                            \
     59      delete [] var [it1];                       \
     60    }                                            \
     61  delete [] var;                         
     62 
     63#define DELETE3(var,s1,s2,s3)                    \
     64  for (uint32_t it1=0; it1<s1; ++it1)            \
     65    {                                            \
     66      for (uint32_t it2=0; it2<s2; ++it2)        \
     67        {                                        \
     68          delete [] var [it1][it2];              \
     69        }                                        \
     70      delete [] var [it1];                       \
     71    }                                            \
     72  delete [] var;
     73 
     74#define DELETE4(var,s1,s2,s3,s4)                 \
     75  for (uint32_t it1=0; it1<s1; ++it1)            \
     76    {                                            \
     77      for (uint32_t it2=0; it2<s2; ++it2)        \
     78        {                                        \
     79          for (uint32_t it3=0; it3<s3; ++it3)    \
     80            {                                    \
     81              delete [] var [it1][it2][it3];     \
     82            }                                    \
     83          delete [] var [it1][it2];              \
     84        }                                        \
     85      delete [] var [it1];                       \
     86    }                                            \
     87  delete [] var;                                       
     88
     89// ======================================================================
     90// =====[ ALLOCATION / DELETE of SIGNAL]=================================
     91// ======================================================================
     92
    1393// Help to allocate interface
    14 #define INTERFACE_PRINT(name) log_printf(TRACE,true,"allocation","Interface's creation : %s (%s, %d)",name,__FILE__,__LINE__);
     94#define INTERFACE_PRINT(name) log_printf(TRACE,Allocation,FUNCTION,"<%s> : Interface's creation : %s (%s, %d)",_name.c_str(),name,__FILE__,__LINE__);
     95#define PRINT_SIGNAL_ADDRESS(name,address) log_printf(TRACE,Allocation,FUNCTION,"Signal : %s 0x%.8x(%s, %d)",name,(uint32_t)((uint64_t)(address)),__FILE__,__LINE__);
     96#define PRINT_SIZE_NUL(component,interface,signal) log_printf(TRACE,Allocation,FUNCTION,_("<%s> %s.%s.%s : size is nul."),_name.c_str(),component->get_name().c_str(),interface->get_name().c_str(),signal);
     97#define TEST_SIGNAL(name,address) PRINT_SIGNAL_ADDRESS(name,address); TEST_PTR(address)
    1598
    1699// ----------------------------------------------------------------------
     
    18101// ----------------------------------------------------------------------
    19102
    20 #define __ALLOC_SIGNAL(sig, name, type)         \
    21   {                                             \
    22     sig = new type (name);                      \
     103#define __ALLOC_SIGNAL(sig, name, type)         \
     104  {                                             \
     105    sig = new type (name);                      \
    23106  }
    24107
    25108#ifdef POSITION
    26 #define ALLOC_INTERFACE( name, direction, localisation, str)            \
    27   INTERFACE_PRINT(name);                                                \
    28   Interface_fifo * interface = _interfaces->set_interface( name, direction, localisation, str);
     109#define ALLOC_INTERFACE( name, direction, localisation, str)            \
     110  INTERFACE_PRINT(name);                                                \
     111  morpheo::behavioural::Interface_fifo * interface = _interfaces->set_interface( name, direction, localisation, str);
    29112#else
    30 #define ALLOC_INTERFACE( name, direction, localisation, str)            \
    31   INTERFACE_PRINT(name);                                                \
    32   Interface_fifo * interface = _interfaces->set_interface( name);
     113#define ALLOC_INTERFACE( name, direction, localisation, str)            \
     114  INTERFACE_PRINT(name);                                                \
     115  morpheo::behavioural::Interface_fifo * interface = _interfaces->set_interface( name);
    33116#endif
    34117
    35 #define ALLOC_VAL_ACK_IN(  sig, name, type)                             \
    36   {                                                                     \
    37     sig = interface->set_signal_valack_in (name, type);                 \
    38   }                                                                     
    39 #define ALLOC_VAL_ACK_OUT( sig, name, type)                             \
    40   {                                                                     \
    41     sig = interface->set_signal_valack_out(name, type);                 \
    42   }                                                                     
    43 #define ALLOC_VALACK_IN(     sig, type)                                 \
    44   {                                                                     \
    45     sig = interface->set_signal_valack_in (type);                       \
    46   }                                                                     
    47 #define ALLOC_VALACK_OUT(    sig, type)                                 \
    48   {                                                                     \
    49     sig = interface->set_signal_valack_out(type);                       \
    50   }                                                                     
    51 #define ALLOC_SIGNAL_IN(  sig, name, type, size)                        \
    52   if (size > 0)                                                         \
    53     {                                                                   \
    54       sig = interface->set_signal_in <type> (name, size);               \
    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); \
     118#define ALLOC_VAL_ACK_IN(  sig, name, type)                             \
     119  {                                                                     \
     120    sig = interface->set_signal_valack_in (name, type);                 \
     121  }                                                                     
     122#define ALLOC_VAL_ACK_OUT( sig, name, type)                             \
     123  {                                                                     \
     124    sig = interface->set_signal_valack_out(name, type);                 \
     125  }                                                                     
     126#define ALLOC_VALACK_IN(     sig, type)                                 \
     127  {                                                                     \
     128    sig = interface->set_signal_valack_in (type);                       \
     129  }                                                                     
     130#define ALLOC_VALACK_OUT(    sig, type)                                 \
     131  {                                                                     \
     132    sig = interface->set_signal_valack_out(type);                       \
     133  }                                                                     
     134#define ALLOC_SIGNAL_IN(  sig, name, type, size)                        \
     135  if (size > 0)                                                         \
     136    {                                                                   \
     137      sig = interface->set_signal_in <type> (name, size);               \
     138    }                                                                   \
     139  else                                                                  \
     140    {                                                                   \
     141      PRINT_SIZE_NUL(_component,interface,name);                        \
    59142    }
    60143 
    61 #define ALLOC_SIGNAL_OUT( sig, name, type, size)                        \
    62   if (size > 0)                                                         \
    63     {                                                                   \
    64       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); \
     144#define ALLOC_SIGNAL_OUT( sig, name, type, size)                        \
     145  if (size > 0)                                                         \
     146    {                                                                   \
     147      sig = interface->set_signal_out<type> (name, size);               \
     148    }                                                                   \
     149  else                                                                  \
     150    {                                                                   \
     151      PRINT_SIZE_NUL(_component,interface,name); \
    69152    }
    70153
    71 #define DELETE_SIGNAL( sig, size)                                       \
    72   if (size > 0)                                                         \
    73     {                                                                   \
    74       delete sig;                                                       \
     154#define DELETE_SIGNAL( sig, size)                                       \
     155  if (size > 0)                                                         \
     156    {                                                                   \
     157      delete sig;                                                       \
    75158    }
    76159
    77 #define ALLOC_SC_SIGNAL(  sig, name, type)                              \
    78   sc_signal<type> * sig = new sc_signal<type> (name);
    79 
    80 #define INSTANCE_SC_SIGNAL(component, 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   }
     160#define ALLOC_SC_SIGNAL(  sig, name, type)                              \
     161  sc_signal<type> * sig = new sc_signal<type> (name);                   \
     162  PRINT_SIGNAL_ADDRESS(name,sig);
     163
     164#define INSTANCE_SC_SIGNAL(component, sig)                     \
     165  {                                                            \
     166    TEST_SIGNAL(component->sig->name(),component->sig);        \
     167    TEST_SIGNAL(sig           ->name(),sig);                   \
     168    (*(component->sig)) (*(sig));                              \
     169  }
     170
     171#define _INSTANCE_SC_SIGNAL(component, sig1,sig2)                       \
     172  {                                                                     \
     173    TEST_SIGNAL(component->sig1->name(),component->sig1);               \
     174    TEST_SIGNAL(sig2           ->name(),sig2);                          \
     175    (*(component->sig1)) (*(sig2));                                     \
     176  }
     177
     178#define DELETE_SC_SIGNAL( sig)                  \
     179  {                                             \
     180    delete sig;                                 \
     181  }
     182
     183
     184#define __ALLOC0_SIGNAL(sig, name, type)                      __ALLOC_SIGNAL(sig, name, type)
     185
     186#define ALLOC0_INTERFACE( name, direction, localisation, str) ALLOC_INTERFACE( name, direction, localisation, str)
     187
     188#define ALLOC0_VAL_ACK_IN(  sig, name, type)                  ALLOC_VAL_ACK_IN(  sig, name, type)
     189#define ALLOC0_VAL_ACK_OUT( sig, name, type)                  ALLOC_VAL_ACK_OUT( sig, name, type)
     190#define ALLOC0_VALACK_IN(     sig, type)                      ALLOC_VALACK_IN(     sig, type)
     191#define ALLOC0_VALACK_OUT(    sig, type)                      ALLOC_VALACK_OUT(    sig, type)
     192#define ALLOC0_SIGNAL_IN(  sig, name, type, size)             ALLOC_SIGNAL_IN(  sig, name, type, size)
     193#define ALLOC0_SIGNAL_OUT( sig, name, type, size)             ALLOC_SIGNAL_OUT( sig, name, type, size)
     194#define DELETE0_SIGNAL( sig, size)                            DELETE_SIGNAL( sig, size)
     195
     196#define ALLOC0_SC_SIGNAL(  sig, name, type)                   ALLOC_SC_SIGNAL(  sig, name, type)
     197#define INSTANCE0_SC_SIGNAL(component, sig)                   INSTANCE_SC_SIGNAL(component, sig)
     198#define _INSTANCE0_SC_SIGNAL(component, sig)                  _INSTANCE_SC_SIGNAL(component, sig)
     199#define DELETE0_SC_SIGNAL( sig)                               DELETE_SC_SIGNAL( sig)
    91200
    92201// ----------------------------------------------------------------------
     
    94203// ----------------------------------------------------------------------
    95204
    96 #define __ALLOC1_INTERFACE(name, it1)                                   \
    97   INTERFACE_PRINT(name);                                                \
    98   const std::string interface_name = name;                              \
    99   const uint32_t iterator_1 = it1;
    100 
    101 #define __ALLOC1_SIGNAL_IN( sig, name, type)            \
    102   {                                                                     \
    103     sig = new SC_IN(type) * [iterator_1];                               \
    104     std::string separator="_";                                          \
    105     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
    106       {                                                                 \
    107         std::string str = "in_"+interface_name+separator+toString(alloc_signal_it1)+separator+name; \
    108         sig [alloc_signal_it1] = new SC_IN(type) (str.c_str());         \
    109       }                                                                 \
    110   }
    111 
    112 #define __ALLOC1_SIGNAL_OUT( sig, name, type)           \
    113   {                                                                     \
    114     sig = new SC_OUT(type) * [iterator_1];                              \
    115     std::string separator="_";                                          \
    116     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
    117       {                                                                 \
    118         std::string str = "out_"+interface_name+separator+toString(alloc_signal_it1)+separator+name; \
    119         sig [alloc_signal_it1] = new SC_OUT(type) (str.c_str());                \
    120       }                                                                 \
     205#define __ALLOC1_INTERFACE(name, x1)                                    \
     206  INTERFACE_PRINT(name);                                                \
     207  const std::string interface_name = name;                              \
     208  const uint32_t iterator_1 = x1;
     209
     210#define __ALLOC1_SIGNAL_IN( sig, name, type)                            \
     211  {                                                                     \
     212    sig = new SC_IN(type) * [iterator_1];                               \
     213    std::string separator="_";                                          \
     214    for (uint32_t it1=0; it1<iterator_1; it1++)                        \
     215      {                                                                 \
     216        std::string str = "in_"+interface_name+separator+toString(it1)+separator+name; \
     217        sig [it1] = new SC_IN(type) (str.c_str());                      \
     218      }                                                                 \
     219  }
     220
     221#define __ALLOC1_SIGNAL_OUT( sig, name, type)                           \
     222  {                                                                     \
     223    sig = new SC_OUT(type) * [iterator_1];                              \
     224    std::string separator="_";                                          \
     225    for (uint32_t it1=0; it1<iterator_1; it1++)                        \
     226      {                                                                 \
     227        std::string str = "out_"+interface_name+separator+toString(it1)+separator+name; \
     228        sig [it1] = new SC_OUT(type) (str.c_str());                     \
     229      }                                                                 \
    121230  }
    122231
    123232#ifdef POSITION
    124 #define ALLOC1_INTERFACE( name, direction, localisation, str, it1)      \
    125   INTERFACE_PRINT(name);                                                \
    126   const uint32_t iterator_1 = it1;                                      \
    127   Interface_fifo * interface [iterator_1];                              \
    128   {                                                                     \
    129     std::string separator="_";                                          \
    130     for (uint32_t alloc_interface_it1=0; alloc_interface_it1<iterator_1; alloc_interface_it1++) \
    131       {                                                                 \
    132         interface [alloc_interface_it1] = _interfaces->set_interface( name+separator+toString(alloc_interface_it1), direction, localisation, str); \
    133       }                                                                 \
     233#define ALLOC1_INTERFACE( name, direction, localisation, str, x1)       \
     234  INTERFACE_PRINT(name);                                                \
     235  const uint32_t iterator_1 = x1;                                       \
     236  morpheo::behavioural::Interface_fifo * interface [iterator_1];        \
     237  {                                                                     \
     238    std::string separator="_";                                          \
     239    for (uint32_t it1=0; it1<iterator_1; it1++)                         \
     240      {                                                                 \
     241        interface [it1] = _interfaces->set_interface( name+separator+toString(it1), direction, localisation, str); \
     242      }                                                                 \
    134243  }
    135244#else
    136 #define ALLOC1_INTERFACE( name, direction, localisation, str, it1)      \
    137   INTERFACE_PRINT(name);                                                \
    138   const uint32_t iterator_1 = it1;                                      \
    139   Interface_fifo * interface [iterator_1];                              \
    140   {                                                                     \
    141     std::string separator="_";                                          \
    142     for (uint32_t alloc_interface_it1=0; alloc_interface_it1<iterator_1; alloc_interface_it1++) \
    143       {                                                                 \
    144         interface [alloc_interface_it1] = _interfaces->set_interface( name+separator+toString(alloc_interface_it1)); \
    145       }                                                                 \
     245#define ALLOC1_INTERFACE( name, direction, localisation, str, x1)       \
     246  INTERFACE_PRINT(name);                                                \
     247  const uint32_t iterator_1 = x1;                                       \
     248  morpheo::behavioural::Interface_fifo * interface [iterator_1];        \
     249  {                                                                     \
     250    std::string separator="_";                                          \
     251    for (uint32_t it1=0; it1<iterator_1; it1++)                         \
     252      {                                                                 \
     253        interface [it1] = _interfaces->set_interface( name+separator+toString(it1)); \
     254      }                                                                 \
    146255  }
    147256#endif
    148257
    149 #define ALLOC1_VAL_ACK_IN( sig, name, type)                             \
    150   {                                                                     \
    151     sig = new SC_IN (Tcontrol_t) * [iterator_1];                        \
    152     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
    153       {                                                                 \
    154         sig [alloc_signal_it1] = interface[alloc_signal_it1]->set_signal_valack_in (name, type); \
    155       }                                                                 \
    156   }
    157 #define ALLOC1_VAL_ACK_OUT(sig, name, type)                             \
    158   {                                                                     \
    159     sig = new SC_OUT(Tcontrol_t) * [iterator_1];                        \
    160     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
    161       {                                                                 \
    162         sig [alloc_signal_it1] = interface[alloc_signal_it1]->set_signal_valack_out(name, type); \
    163       }                                                                 \
    164   }
    165 #define ALLOC1_VALACK_IN(    sig, type)                                 \
    166   {                                                                     \
    167     sig = new SC_IN (Tcontrol_t) * [iterator_1];                        \
    168     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
    169       {                                                                 \
    170         sig [alloc_signal_it1] = interface[alloc_signal_it1]->set_signal_valack_in (type); \
    171       }                                                                 \
    172   }
    173 #define ALLOC1_VALACK_OUT(   sig, type)                                 \
    174   {                                                                     \
    175     sig = new SC_OUT(Tcontrol_t) * [iterator_1];                        \
    176     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
    177       {                                                                 \
    178         sig [alloc_signal_it1] = interface[alloc_signal_it1]->set_signal_valack_out(type); \
    179       }                                                                 \
    180   }
    181 #define ALLOC1_SIGNAL_IN( sig, name, type, size)                        \
    182   {                                                                     \
    183     sig = new SC_IN (type) * [iterator_1];                              \
    184     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
    185       {                                                                 \
    186         if (size > 0)                                                   \
    187           {                                                             \
    188             sig [alloc_signal_it1] = interface[alloc_signal_it1]->set_signal_in <type> (name, size); \
    189           }                                                             \
    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           }                                                             \
    194       }                                                                 \
    195   }
    196 
    197 #define ALLOC1_SIGNAL_OUT(sig, name, type, size)                        \
    198   {                                                                     \
    199     sig = new SC_OUT(type) * [iterator_1];                              \
    200     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<iterator_1; alloc_signal_it1++) \
    201       {                                                                 \
    202         if (size > 0)                                                   \
    203           {                                                             \
    204             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); \
    209           }                                                             \
    210       }                                                                 \
    211   }
    212 
    213 #define DELETE1_SIGNAL(sig, it1, size)                                  \
    214   {                                                                     \
    215     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
    216       {                                                                 \
    217         if (size > 0)                                                   \
    218           {                                                             \
    219             delete sig[alloc_signal_it1];                               \
    220           }                                                             \
    221       }                                                                 \
    222     delete [] sig;                                                      \
    223   }
    224 
    225 #define ALLOC1_SC_SIGNAL( sig, name, type, it1)                         \
    226   sc_signal<type> ** sig = new sc_signal<type> * [it1];                 \
    227   {                                                                     \
    228     std::string separator="_";                                          \
    229     std::string str;                                                    \
    230     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
    231       {                                                                 \
    232         str = name+separator+toString(alloc_signal_it1);                \
    233         sig [alloc_signal_it1] = new sc_signal<type> (str.c_str());     \
    234       }                                                                 \
    235   }
    236 
    237 #define INSTANCE1_SC_SIGNAL(component, sig, it1)                        \
    238   for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
    239     {                                                                   \
    240       TEST_PTR(component->sig [alloc_signal_it1]);                      \
    241       TEST_PTR(sig            [alloc_signal_it1]);                      \
    242       (*(component->sig[alloc_signal_it1])) (*(sig[alloc_signal_it1])); \
     258#define ALLOC1_VAL_ACK_IN( sig, name, type)                             \
     259  {                                                                     \
     260    sig = new SC_IN (Tcontrol_t) * [iterator_1];                        \
     261    for (uint32_t it1=0; it1<iterator_1; it1++)                         \
     262      {                                                                 \
     263        sig [it1] = interface[it1]->set_signal_valack_in (name, type);  \
     264      }                                                                 \
     265  }
     266#define ALLOC1_VAL_ACK_OUT(sig, name, type)                             \
     267  {                                                                     \
     268    sig = new SC_OUT(Tcontrol_t) * [iterator_1];                        \
     269    for (uint32_t it1=0; it1<iterator_1; it1++)                         \
     270      {                                                                 \
     271        sig [it1] = interface[it1]->set_signal_valack_out(name, type);  \
     272      }                                                                 \
     273  }
     274#define ALLOC1_VALACK_IN(    sig, type)                                 \
     275  {                                                                     \
     276    sig = new SC_IN (Tcontrol_t) * [iterator_1];                        \
     277    for (uint32_t it1=0; it1<iterator_1; it1++)                         \
     278      {                                                                 \
     279        sig [it1] = interface[it1]->set_signal_valack_in (type);        \
     280      }                                                                 \
     281  }
     282#define ALLOC1_VALACK_OUT(   sig, type)                                 \
     283  {                                                                     \
     284    sig = new SC_OUT(Tcontrol_t) * [iterator_1];                        \
     285    for (uint32_t it1=0; it1<iterator_1; it1++)                         \
     286      {                                                                 \
     287        sig [it1] = interface[it1]->set_signal_valack_out(type);        \
     288      }                                                                 \
     289  }
     290#define ALLOC1_SIGNAL_IN( sig, name, type, size)                        \
     291  {                                                                     \
     292    sig = new SC_IN (type) * [iterator_1];                              \
     293    for (uint32_t it1=0; it1<iterator_1; it1++)                         \
     294      {                                                                 \
     295        if (size > 0)                                                   \
     296          {                                                             \
     297            sig [it1] = interface[it1]->set_signal_in <type> (name, size); \
     298          }                                                             \
     299        else                                                            \
     300          {                                                             \
     301            PRINT_SIZE_NUL(_component,interface[it1],name);             \
     302          }                                                             \
     303      }                                                                 \
     304  }
     305
     306#define ALLOC1_SIGNAL_OUT(sig, name, type, size)                        \
     307  {                                                                     \
     308    sig = new SC_OUT(type) * [iterator_1];                              \
     309    for (uint32_t it1=0; it1<iterator_1; it1++)                         \
     310      {                                                                 \
     311        if (size > 0)                                                   \
     312          {                                                             \
     313            sig [it1] = interface[it1]->set_signal_out<type> (name, size); \
     314          }                                                             \
     315        else                                                            \
     316          {                                                             \
     317            PRINT_SIZE_NUL(_component,interface[it1],name);             \
     318          }                                                             \
     319      }                                                                 \
     320  }
     321
     322#define DELETE1_SIGNAL(sig, x1, size)                                   \
     323  {                                                                     \
     324    for (uint32_t it1=0; it1<x1; it1++)                                 \
     325      {                                                                 \
     326        if (size > 0)                                                   \
     327          {                                                             \
     328            delete sig[it1];                                            \
     329          }                                                             \
     330      }                                                                 \
     331    delete [] sig;                                                      \
     332  }
     333
     334#define ALLOC1_SC_SIGNAL( sig, name, type, x1)                          \
     335  sc_signal<type> ** sig = new sc_signal<type> * [x1];                  \
     336  {                                                                     \
     337    std::string separator="_";                                          \
     338    std::string str;                                                    \
     339    for (uint32_t it1=0; it1<x1; it1++)                                 \
     340      {                                                                 \
     341        str = name+separator+toString(it1);                             \
     342        sig [it1] = new sc_signal<type> (str.c_str());                  \
     343        PRINT_SIGNAL_ADDRESS(str.c_str(),sig[it1]);                     \
     344      }                                                                 \
     345  }
     346
     347#define INSTANCE1_SC_SIGNAL(component, sig, x1) \
     348  for (uint32_t it1=0; it1<x1; it1++)                                   \
     349    {                                                                   \
     350      TEST_SIGNAL(component->sig [it1]->name(),component->sig [it1]);   \
     351      TEST_SIGNAL(sig            [it1]->name(),sig            [it1]);   \
     352      (*(component->sig[it1])) (*(sig[it1]));                           \
    243353    }
    244354
    245 #define DELETE1_SC_SIGNAL(sig, it1)                                     \
    246   {                                                                     \
    247     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
    248       {                                                                 \
    249         delete sig[alloc_signal_it1];                                   \
    250       }                                                                 \
    251     delete [] sig;                                                      \
     355#define _INSTANCE1_SC_SIGNAL(component, sig1, sig2, x1) \
     356  for (uint32_t it1=0; it1<x1; it1++)                                   \
     357    {                                                                   \
     358      TEST_SIGNAL(component->sig1 [it1]->name(),component->sig1 [it1]); \
     359      TEST_SIGNAL(sig2            [it1]->name(),sig2            [it1]); \
     360      (*(component->sig1[it1])) (*(sig2[it1]));                         \
     361    }
     362
     363#define DELETE1_SC_SIGNAL(sig, x1)                                      \
     364  {                                                                     \
     365    for (uint32_t it1=0; it1<x1; it1++)                                 \
     366      {                                                                 \
     367        delete sig[it1];                                                \
     368      }                                                                 \
     369    delete [] sig;                                                      \
    252370  }
    253371
     
    257375
    258376#ifdef POSITION
    259 #define ALLOC2_INTERFACE( name, direction, localisation, str, it1, it2) \
    260   INTERFACE_PRINT(name);                                                \
    261   uint32_t iterator_1 = 0;                                              \
    262   uint32_t iterator_2 = 0;                                              \
    263   Interface_fifo *** interface;                                         \
    264   {                                                                     \
    265     std::string separator="_";                                          \
    266     iterator_1 = it1;                                                   \
    267     interface = new Interface_fifo ** [iterator_1];                     \
    268     for (uint32_t alloc_interface_it1=0; alloc_interface_it1<iterator_1; alloc_interface_it1++) \
    269       {                                                                 \
    270         iterator_2 = it2;                                               \
    271         interface [alloc_interface_it1] = new Interface_fifo * [iterator_2]; \
    272         for (uint32_t alloc_interface_it2=0; alloc_interface_it2<iterator_2; alloc_interface_it2++) \
    273           {                                                             \
    274             interface [alloc_interface_it1][alloc_interface_it2] = _interfaces->set_interface( name+separator+toString(alloc_interface_it1)+separator+toString(alloc_interface_it2), direction, localisation, str); \
    275           }                                                             \
    276       }                                                                 \
     377#define ALLOC2_INTERFACE( name, direction, localisation, str, x1, x2)   \
     378  INTERFACE_PRINT(name);                                                \
     379  uint32_t iterator_1 = 0;                                              \
     380  uint32_t iterator_2 = 0;                                              \
     381  morpheo::behavioural::Interface_fifo *** interface;                   \
     382  {                                                                     \
     383    std::string separator="_";                                          \
     384    iterator_1 = x1;                                                    \
     385    interface = new morpheo::behavioural::Interface_fifo ** [iterator_1]; \
     386    for (uint32_t it1=0; it1<iterator_1; it1++)                         \
     387      {                                                                 \
     388        iterator_2 = x2;                                                \
     389        interface [it1] = new morpheo::behavioural::Interface_fifo * [iterator_2]; \
     390        for (uint32_t it2=0; it2<iterator_2; it2++)                    \
     391          {                                                             \
     392            interface [it1][it2] = _interfaces->set_interface( name+separator+toString(it1)+separator+toString(it2), direction, localisation, str); \
     393          }                                                             \
     394      }                                                                 \
    277395  }
    278396#else
    279 #define ALLOC2_INTERFACE( name, direction, localisation, str, it1, it2) \
    280   INTERFACE_PRINT(name);                                                \
    281   uint32_t iterator_1 = 0;                                              \
    282   uint32_t iterator_2 = 0;                                              \
    283   Interface_fifo *** interface;                                         \
    284   {                                                                     \
    285     std::string separator="_";                                          \
    286     iterator_1 = it1;                                                   \
    287     interface = new Interface_fifo ** [iterator_1];                     \
    288     for (uint32_t alloc_interface_it1=0; alloc_interface_it1<iterator_1; alloc_interface_it1++) \
    289       {                                                                 \
    290         iterator_2 = it2;                                               \
    291         interface [alloc_interface_it1] = new Interface_fifo * [iterator_2]; \
    292         for (uint32_t alloc_interface_it2=0; alloc_interface_it2<iterator_2; alloc_interface_it2++) \
    293           {                                                             \
    294             interface [alloc_interface_it1][alloc_interface_it2] = _interfaces->set_interface( name+separator+toString(alloc_interface_it1)+separator+toString(alloc_interface_it2)); \
    295           }                                                             \
    296       }                                                                 \
     397#define ALLOC2_INTERFACE( name, direction, localisation, str, x1, x2)   \
     398  INTERFACE_PRINT(name);                                                \
     399  uint32_t iterator_1 = 0;                                              \
     400  uint32_t iterator_2 = 0;                                              \
     401  morpheo::behavioural::Interface_fifo *** interface;                   \
     402  {                                                                     \
     403    std::string separator="_";                                          \
     404    iterator_1 = x1;                                                    \
     405    interface = new morpheo::behavioural::Interface_fifo ** [iterator_1]; \
     406    for (uint32_t it1=0; it1<iterator_1; it1++)                         \
     407      {                                                                 \
     408        iterator_2 = x2;                                                \
     409        interface [it1] = new morpheo::behavioural::Interface_fifo * [iterator_2]; \
     410        for (uint32_t it2=0; it2<iterator_2; it2++)                    \
     411          {                                                             \
     412            interface [it1][it2] = _interfaces->set_interface( name+separator+toString(it1)+separator+toString(it2)); \
     413          }                                                             \
     414      }                                                                 \
    297415  }
    298416#endif
    299417
    300 #define _ALLOC2_VAL_ACK_IN( sig, name, type, it1, it2)                  \
    301   {                                                                     \
    302     sig = new SC_IN (Tcontrol_t) ** [it1];                              \
    303     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
    304       {                                                                 \
    305         sig [alloc_signal_it1] = new SC_IN (Tcontrol_t) * [it2];        \
    306         for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
    307           {                                                             \
    308             sig [alloc_signal_it1][alloc_signal_it2] = interface[alloc_signal_it1][alloc_signal_it2]->set_signal_valack_in (name, type); \
    309           }                                                             \
    310       }                                                                 \
    311   }
    312 
    313 #define _ALLOC2_VAL_ACK_OUT( sig, name, type, it1, it2)                 \
    314   {                                                                     \
    315     sig = new SC_OUT (Tcontrol_t) ** [it1];                             \
    316     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
    317       {                                                                 \
    318         sig [alloc_signal_it1] = new SC_OUT (Tcontrol_t) * [it2];       \
    319         for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
    320           {                                                             \
    321             sig [alloc_signal_it1][alloc_signal_it2] = interface[alloc_signal_it1][alloc_signal_it2]->set_signal_valack_out (name, type); \
    322           }                                                             \
    323       }                                                                 \
    324   }
    325 
    326 #define _ALLOC2_VALACK_IN(    sig,type, it1, it2)                       \
    327   {                                                                     \
    328     sig = new SC_IN (Tcontrol_t) ** [it1];                              \
    329     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
    330       {                                                                 \
    331         sig [alloc_signal_it1] = new SC_IN (Tcontrol_t) * [it2];        \
    332         for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
    333           {                                                             \
    334             sig [alloc_signal_it1][alloc_signal_it2] = interface[alloc_signal_it1][alloc_signal_it2]->set_signal_valack_in (type); \
    335           }                                                             \
    336       }                                                                 \
    337   }
    338 
    339 #define _ALLOC2_VALACK_OUT(    sig,type, it1, it2)                      \
    340   {                                                                     \
    341     sig = new SC_OUT (Tcontrol_t) ** [it1];                             \
    342     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
    343       {                                                                 \
    344         sig [alloc_signal_it1] = new SC_OUT (Tcontrol_t) * [it2];       \
    345         for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
    346           {                                                             \
    347             sig [alloc_signal_it1][alloc_signal_it2] = interface[alloc_signal_it1][alloc_signal_it2]->set_signal_valack_out (type); \
    348           }                                                             \
    349       }                                                                 \
    350   }
    351 
    352 #define _ALLOC2_SIGNAL_IN( sig, name, type, size, it1, it2)             \
    353   {                                                                     \
    354     sig = new SC_IN (type) ** [it1];                                    \
    355     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
    356       {                                                                 \
    357         sig [alloc_signal_it1] = new SC_IN (type) * [it2];              \
    358         for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
    359           {                                                             \
    360             if (size > 0)                                               \
    361               {                                                         \
    362                 sig [alloc_signal_it1][alloc_signal_it2] = interface[alloc_signal_it1][alloc_signal_it2]->set_signal_in <type> (name, size); \
    363               }                                                         \
    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               }                                                         \
    368           }                                                             \
    369       }                                                                 \
    370   }
    371 
    372 #define _ALLOC2_SIGNAL_OUT( sig, name, type, size, it1, it2)            \
    373   {                                                                     \
    374     sig = new SC_OUT (type) ** [it1];                                   \
    375     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
    376       {                                                                 \
    377         sig [alloc_signal_it1] = new SC_OUT (type) * [it2];             \
    378         for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
    379           {                                                             \
    380             if (size > 0)                                               \
    381               {                                                         \
    382                 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); \
    387               }                                                         \
    388           }                                                             \
    389       }                                                                 \
     418#define _ALLOC2_VAL_ACK_IN( sig, name, type, x1, x2)                    \
     419  {                                                                     \
     420    sig = new SC_IN (Tcontrol_t) ** [x1];                               \
     421    for (uint32_t it1=0; it1<x1; it1++)                                \
     422      {                                                                 \
     423        sig [it1] = new SC_IN (Tcontrol_t) * [x2];                      \
     424        for (uint32_t it2=0; it2<x2; it2++)                            \
     425          {                                                             \
     426            sig [it1][it2] = interface[it1][it2]->set_signal_valack_in (name, type); \
     427          }                                                             \
     428      }                                                                 \
     429  }
     430
     431#define _ALLOC2_VAL_ACK_OUT( sig, name, type, x1, x2)                   \
     432  {                                                                     \
     433    sig = new SC_OUT (Tcontrol_t) ** [x1];                              \
     434    for (uint32_t it1=0; it1<x1; it1++)                                \
     435      {                                                                 \
     436        sig [it1] = new SC_OUT (Tcontrol_t) * [x2];                     \
     437        for (uint32_t it2=0; it2<x2; it2++)                            \
     438          {                                                             \
     439            sig [it1][it2] = interface[it1][it2]->set_signal_valack_out (name, type); \
     440          }                                                             \
     441      }                                                                 \
     442  }
     443
     444#define _ALLOC2_VALACK_IN(    sig,type, x1, x2)                         \
     445  {                                                                     \
     446    sig = new SC_IN (Tcontrol_t) ** [x1];                               \
     447    for (uint32_t it1=0; it1<x1; it1++)                                 \
     448      {                                                                 \
     449        sig [it1] = new SC_IN (Tcontrol_t) * [x2];                      \
     450        for (uint32_t it2=0; it2<x2; it2++)                            \
     451          {                                                             \
     452            sig [it1][it2] = interface[it1][it2]->set_signal_valack_in (type); \
     453          }                                                             \
     454      }                                                                 \
     455  }
     456
     457#define _ALLOC2_VALACK_OUT(    sig,type, x1, x2)                        \
     458  {                                                                     \
     459    sig = new SC_OUT (Tcontrol_t) ** [x1];                              \
     460    for (uint32_t it1=0; it1<x1; it1++)                                 \
     461      {                                                                 \
     462        sig [it1] = new SC_OUT (Tcontrol_t) * [x2];                     \
     463        for (uint32_t it2=0; it2<x2; it2++)                            \
     464          {                                                             \
     465            sig [it1][it2] = interface[it1][it2]->set_signal_valack_out (type); \
     466          }                                                             \
     467      }                                                                 \
     468  }
     469
     470#define _ALLOC2_SIGNAL_IN( sig, name, type, size, x1, x2)               \
     471  {                                                                     \
     472    sig = new SC_IN (type) ** [x1];                                     \
     473    for (uint32_t it1=0; it1<x1; it1++)                                \
     474      {                                                                 \
     475        sig [it1] = new SC_IN (type) * [x2];                            \
     476        for (uint32_t it2=0; it2<x2; it2++)                            \
     477          {                                                             \
     478            if (size > 0)                                               \
     479              {                                                         \
     480                sig [it1][it2] = interface[it1][it2]->set_signal_in <type> (name, size); \
     481              }                                                         \
     482            else                                                        \
     483              {                                                         \
     484                PRINT_SIZE_NUL(_component,interface[it1][it2],name);    \
     485              }                                                         \
     486          }                                                             \
     487      }                                                                 \
     488  }
     489
     490#define _ALLOC2_SIGNAL_OUT( sig, name, type, size, x1, x2)              \
     491  {                                                                     \
     492    sig = new SC_OUT (type) ** [x1];                                    \
     493    for (uint32_t it1=0; it1<x1; it1++)                                \
     494      {                                                                 \
     495        sig [it1] = new SC_OUT (type) * [x2];                           \
     496        for (uint32_t it2=0; it2<x2; it2++)                            \
     497          {                                                             \
     498            if (size > 0)                                               \
     499              {                                                         \
     500                sig [it1][it2] = interface[it1][it2]->set_signal_out <type> (name, size); \
     501              }                                                         \
     502            else                                                        \
     503              {                                                         \
     504                PRINT_SIZE_NUL(_component,interface[it1][it2],name);    \
     505              }                                                         \
     506          }                                                             \
     507      }                                                                 \
    390508  }
    391509
     
    397515#define ALLOC2_SIGNAL_OUT( sig, name, type, size) _ALLOC2_SIGNAL_OUT( sig, name, type, size, iterator_1, iterator_2)
    398516
    399 #define DELETE2_SIGNAL(sig, it1,it2, size)                              \
    400   {                                                                     \
    401     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
    402       {                                                                 \
    403         for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
    404           {                                                             \
    405             if (size > 0)                                               \
    406               {                                                         \
    407                 delete sig[alloc_signal_it1][alloc_signal_it2];         \
    408               }                                                         \
    409           }                                                             \
    410         delete [] sig[alloc_signal_it1];                                \
    411       }                                                                 \
    412     delete [] sig;                                                      \
    413   }
    414 
    415 #define ALLOC2_SC_SIGNAL( sig, name, type, it1, it2)                    \
    416   sc_signal<type> *** sig = new sc_signal<type> ** [it1];               \
    417   {                                                                     \
    418     std::string separator="_";                                          \
    419     std::string str;                                                    \
    420     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
    421       {                                                                 \
    422         sig [alloc_signal_it1] = new sc_signal<type> * [it2];           \
    423         for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
    424           {                                                             \
    425             str = name+separator+toString(alloc_signal_it1)+separator+toString(alloc_signal_it2); \
    426             sig [alloc_signal_it1][alloc_signal_it2] = new sc_signal<type> (str.c_str()); \
    427           }                                                             \
    428       }                                                                 \
    429   }
    430 
    431 #define INSTANCE2_SC_SIGNAL(component, sig, it1, it2)                   \
    432   for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
    433     for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
    434       {                                                                 \
    435         TEST_PTR(component->sig [alloc_signal_it1][alloc_signal_it2]);  \
    436         TEST_PTR(sig            [alloc_signal_it1][alloc_signal_it2]);  \
    437         (*(component->sig[alloc_signal_it1][alloc_signal_it2])) (*(sig[alloc_signal_it1][alloc_signal_it2])); \
     517#define DELETE2_SIGNAL(sig, x1,x2, size)                                \
     518  {                                                                     \
     519    for (uint32_t it1=0; it1<x1; it1++)                                 \
     520      {                                                                 \
     521        for (uint32_t it2=0; it2<x2; it2++)                             \
     522          {                                                             \
     523            if (size > 0)                                               \
     524              {                                                         \
     525                delete sig[it1][it2];                                   \
     526              }                                                         \
     527          }                                                             \
     528        delete [] sig[it1];                                             \
     529      }                                                                 \
     530    delete [] sig;                                                      \
     531  }
     532
     533#define ALLOC2_SC_SIGNAL( sig, name, type, x1, x2)                      \
     534  sc_signal<type> *** sig = new sc_signal<type> ** [x1];                \
     535  {                                                                     \
     536    std::string separator="_";                                          \
     537    std::string str;                                                    \
     538    for (uint32_t it1=0; it1<x1; it1++)                                 \
     539      {                                                                 \
     540        sig [it1] = new sc_signal<type> * [x2];                         \
     541        for (uint32_t it2=0; it2<x2; it2++)                             \
     542          {                                                             \
     543            str = name+separator+toString(it1)+separator+toString(it2); \
     544            sig [it1][it2] = new sc_signal<type> (str.c_str());         \
     545            PRINT_SIGNAL_ADDRESS(str.c_str(),sig[it1][it2]);            \
     546          }                                                             \
     547      }                                                                 \
     548  }
     549
     550#define INSTANCE2_SC_SIGNAL(component, sig, x1, x2)                     \
     551  for (uint32_t it1=0; it1<x1; it1++)                                   \
     552    for (uint32_t it2=0; it2<x2; it2++)                                 \
     553      {                                                                 \
     554        TEST_SIGNAL(component->sig  [it1][it2]->name(),component->sig  [it1][it2]); \
     555        TEST_SIGNAL(sig             [it1][it2]->name(),sig             [it1][it2]); \
     556        (*(component->sig[it1][it2])) (*(sig[it1][it2]));               \
    438557      }
    439558
    440 #define DELETE2_SC_SIGNAL(sig,it1,it2)                                  \
    441   {                                                                     \
    442     for (uint32_t alloc_signal_it1=0; alloc_signal_it1<it1; alloc_signal_it1++) \
    443       {                                                                 \
    444         for (uint32_t alloc_signal_it2=0; alloc_signal_it2<it2; alloc_signal_it2++) \
    445           {                                                             \
    446             delete sig[alloc_signal_it1][alloc_signal_it2];             \
    447           }                                                             \
    448         delete [] sig[alloc_signal_it1];                                \
    449       }                                                                 \
    450     delete [] sig;                                                      \
    451   }
    452 
     559#define _INSTANCE2_SC_SIGNAL(component, sig1, sig2, x1, x2)             \
     560  for (uint32_t it1=0; it1<x1; it1++)                                   \
     561    for (uint32_t it2=0; it2<x2; it2++)                                 \
     562      {                                                                 \
     563        TEST_SIGNAL(component->sig1 [it1][it2]->name(),component->sig1 [it1][it2]); \
     564        TEST_SIGNAL(sig2            [it1][it2]->name(),sig2            [it1][it2]); \
     565        (*(component->sig1[it1][it2])) (*(sig2[it1][it2]));             \
     566      }
     567
     568#define DELETE2_SC_SIGNAL(sig,x1,x2)                                    \
     569  {                                                                     \
     570    for (uint32_t it1=0; it1<x1; it1++)                                 \
     571      {                                                                 \
     572        for (uint32_t it2=0; it2<x2; it2++)                             \
     573          {                                                             \
     574            delete sig[it1][it2];                                       \
     575          }                                                             \
     576        delete [] sig[it1];                                             \
     577      }                                                                 \
     578    delete [] sig;                                                      \
     579  }
     580
     581// ----------------------------------------------------------------------
     582// -----[ ITERATION 3 ]--------------------------------------------------
     583// ----------------------------------------------------------------------
     584
     585#ifdef POSITION
     586#define ALLOC3_INTERFACE( name, direction, localisation, str, x1, x2, x3) \
     587  INTERFACE_PRINT(name);                                                \
     588  uint32_t iterator_1 = 0;                                              \
     589  uint32_t iterator_2 = 0;                                              \
     590  uint32_t iterator_3 = 0;                                              \
     591  morpheo::behavioural::Interface_fifo **** interface;                  \
     592  {                                                                     \
     593    std::string separator="_";                                          \
     594    iterator_1 = x1;                                                    \
     595    interface = new morpheo::behavioural::Interface_fifo *** [iterator_1]; \
     596    for (uint32_t it1=0; it1<iterator_1; it1++)                         \
     597      {                                                                 \
     598        iterator_2 = x2;                                                \
     599        interface [it1] = new morpheo::behavioural::Interface_fifo ** [iterator_2]; \
     600        for (uint32_t it2=0; it2<iterator_2; it2++)                     \
     601          {                                                             \
     602            iterator_3 = x3;                                            \
     603            interface [it1][it2] = new morpheo::behavioural::Interface_fifo * [iterator_3]; \
     604            for (uint32_t it3=0; it3<iterator_3; it3++)                 \
     605              {                                                         \
     606                interface [it1][it2][it3] = _interfaces->set_interface( name+separator+toString(it1)+separator+toString(it2)+separator+toString(it3), direction, localisation, str); \
     607              }                                                         \
     608          }                                                             \
     609      }                                                                 \
     610  }
     611#else
     612#define ALLOC3_INTERFACE( name, direction, localisation, str, x1, x2, x3) \
     613  INTERFACE_PRINT(name);                                                \
     614  uint32_t iterator_1 = 0;                                              \
     615  uint32_t iterator_2 = 0;                                              \
     616  uint32_t iterator_3 = 0;                                              \
     617  morpheo::behavioural::Interface_fifo **** interface;                  \
     618  {                                                                     \
     619    std::string separator="_";                                          \
     620    iterator_1 = x1;                                                    \
     621    interface = new morpheo::behavioural::Interface_fifo *** [iterator_1]; \
     622    for (uint32_t it1=0; it1<iterator_1; it1++)                         \
     623      {                                                                 \
     624        iterator_2 = x2;                                                \
     625        interface [it1] = new morpheo::behavioural::Interface_fifo ** [iterator_2]; \
     626        for (uint32_t it2=0; it2<iterator_2; it2++)                     \
     627          {                                                             \
     628            iterator_3 = x3;                                            \
     629            interface [it1][it2] = new morpheo::behavioural::Interface_fifo * [iterator_3]; \
     630            for (uint32_t it3=0; it3<iterator_3; it3++)                 \
     631              {                                                         \
     632                interface [it1][it2][it3] = _interfaces->set_interface( name+separator+toString(it1)+separator+toString(it2)+separator+toString(it3)); \
     633              }                                                         \
     634          }                                                             \
     635      }                                                                 \
     636  }
    453637#endif
     638
     639// #define _ALLOC3_VAL_ACK_IN( sig, name, type, x1, x2, x3)
     640// #define _ALLOC3_VAL_ACK_OUT( sig, name, type, x1, x2, x3)
     641
     642#define _ALLOC3_VALACK_IN(    sig,type, x1, x2, x3)                     \
     643  {                                                                     \
     644    sig = new SC_IN (Tcontrol_t) *** [x1];                              \
     645    for (uint32_t it1=0; it1<x1; it1++)                                 \
     646      {                                                                 \
     647        sig [it1] = new SC_IN (Tcontrol_t) ** [x2];                     \
     648        for (uint32_t it2=0; it2<x2; it2++)                             \
     649          {                                                             \
     650            sig [it1][it2] = new SC_IN (Tcontrol_t) * [x3];             \
     651            for (uint32_t it3=0; it3<x3; it3++)                         \
     652              {                                                         \
     653                sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_valack_in (type); \
     654              }                                                         \
     655          }                                                             \
     656      }                                                                 \
     657  }
     658
     659#define _ALLOC3_VALACK_OUT(    sig,type, x1, x2, x3)                    \
     660  {                                                                     \
     661    sig = new SC_OUT (Tcontrol_t) *** [x1];                             \
     662    for (uint32_t it1=0; it1<x1; it1++)                                 \
     663      {                                                                 \
     664        sig [it1] = new SC_OUT (Tcontrol_t) ** [x2];                    \
     665        for (uint32_t it2=0; it2<x2; it2++)                             \
     666          {                                                             \
     667            sig [it1][it2] = new SC_OUT (Tcontrol_t) * [x3];            \
     668            for (uint32_t it3=0; it3<x3; it3++)                         \
     669              {                                                         \
     670                sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_valack_out (type); \
     671              }                                                         \
     672          }                                                             \
     673      }                                                                 \
     674  }
     675
     676
     677#define _ALLOC3_SIGNAL_IN( sig, name, type, size, x1, x2,x3)            \
     678  {                                                                     \
     679    sig = new SC_IN (type) *** [x1];                                    \
     680    for (uint32_t it1=0; it1<x1; it1++)                                 \
     681      {                                                                 \
     682        sig [it1] = new SC_IN (type) ** [x2];                           \
     683        for (uint32_t it2=0; it2<x2; it2++)                             \
     684          {                                                             \
     685            sig [it1][it2] = new SC_IN (type) * [x3];                   \
     686            for (uint32_t it3=0; it3<x3; it3++)                         \
     687              {                                                         \
     688                if (size > 0)                                           \
     689                  {                                                     \
     690                    sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_in <type> (name, size); \
     691                  }                                                     \
     692                else                                                    \
     693                  {                                                     \
     694                    PRINT_SIZE_NUL(_component,interface[it1][it2][it3],name); \
     695                  }                                                     \
     696              }                                                         \
     697          }                                                             \
     698      }                                                                 \
     699  }
     700
     701#define _ALLOC3_SIGNAL_OUT( sig, name, type, size, x1, x2,x3)           \
     702  {                                                                     \
     703    sig = new SC_OUT (type) *** [x1];                                   \
     704    for (uint32_t it1=0; it1<x1; it1++)                                 \
     705      {                                                                 \
     706        sig [it1] = new SC_OUT (type) ** [x2];                          \
     707        for (uint32_t it2=0; it2<x2; it2++)                             \
     708          {                                                             \
     709            sig [it1][it2] = new SC_OUT (type) * [x3];                  \
     710            for (uint32_t it3=0; it3<x3; it3++)                         \
     711              {                                                         \
     712                if (size > 0)                                           \
     713                  {                                                     \
     714                    sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_out <type> (name, size); \
     715                  }                                                     \
     716                else                                                    \
     717                  {                                                     \
     718                    PRINT_SIZE_NUL(_component,interface[it1][it2][it3],name); \
     719                  }                                                     \
     720              }                                                         \
     721          }                                                             \
     722      }                                                                 \
     723  }
     724
     725// #define ALLOC3_VAL_ACK_IN( sig, name, type      ) _ALLOC3_VAL_ACK_IN( sig, name, type      , iterator_1, iterator_2, iterator_3)
     726// #define ALLOC3_VAL_ACK_OUT(sig, name, type      ) _ALLOC3_VAL_ACK_OUT(sig, name, type      , iterator_1, iterator_2, iterator_3)
     727#define ALLOC3_VALACK_IN(  sig,       type      ) _ALLOC3_VALACK_IN(  sig,       type      , iterator_1, iterator_2, iterator_3)
     728#define ALLOC3_VALACK_OUT( sig,       type      ) _ALLOC3_VALACK_OUT( sig,       type      , iterator_1, iterator_2, iterator_3)
     729#define ALLOC3_SIGNAL_IN(  sig, name, type, size) _ALLOC3_SIGNAL_IN(  sig, name, type, size, iterator_1, iterator_2, iterator_3)
     730#define ALLOC3_SIGNAL_OUT( sig, name, type, size) _ALLOC3_SIGNAL_OUT( sig, name, type, size, iterator_1, iterator_2, iterator_3)
     731
     732#define DELETE3_SIGNAL(sig, x1, x2, x3, size)                           \
     733  {                                                                     \
     734    for (uint32_t it1=0; it1<x1; it1++)                                 \
     735      {                                                                 \
     736        for (uint32_t it2=0; it2<x2; it2++)                             \
     737          {                                                             \
     738            for (uint32_t it3=0; it3<x3; it3++)                         \
     739              {                                                         \
     740                if (size > 0)                                           \
     741                  {                                                     \
     742                    delete sig[it1][it2][it3];                          \
     743                  }                                                     \
     744              }                                                         \
     745            delete [] sig[it1][it2];                                    \
     746          }                                                             \
     747        delete [] sig[it1];                                             \
     748      }                                                                 \
     749    delete [] sig;                                                      \
     750  }
     751
     752#define ALLOC3_SC_SIGNAL( sig, name, type, x1, x2, x3)                  \
     753  sc_signal<type> **** sig = new sc_signal<type> *** [x1];              \
     754  {                                                                     \
     755    std::string separator="_";                                          \
     756    std::string str;                                                    \
     757    for (uint32_t it1=0; it1<x1; it1++)                                 \
     758      {                                                                 \
     759         sig [it1] = new sc_signal<type> ** [x2];                       \
     760         for (uint32_t it2=0; it2<x2; it2++)                            \
     761           {                                                            \
     762              sig [it1][it2] = new sc_signal<type> * [x3];              \
     763              for (uint32_t it3=0; it3<x3; it3++)                       \
     764                {                                                       \
     765                  str = name+separator+toString(it1)+separator+toString(it2)+separator+toString(it3); \
     766                  sig [it1][it2][it3] = new sc_signal<type> (str.c_str()); \
     767                  PRINT_SIGNAL_ADDRESS(str.c_str(),sig[it1][it2][it3]); \
     768                }                                                       \
     769           }                                                            \
     770      }                                                                 \
     771  }
     772
     773#define INSTANCE3_SC_SIGNAL(component, sig, x1, x2, x3)                 \
     774  for (uint32_t it1=0; it1<x1; it1++)                                   \
     775    for (uint32_t it2=0; it2<x2; it2++)                                 \
     776      for (uint32_t it3=0; it3<x3; it3++)                               \
     777        {                                                               \
     778          TEST_SIGNAL(component->sig  [it1][it2][it3]->name(),component->sig  [it1][it2][it3]); \
     779          TEST_SIGNAL(sig             [it1][it2][it3]->name(),sig             [it1][it2][it3]); \
     780          (*(component->sig[it1][it2][it3])) (*(sig[it1][it2][it3]));   \
     781        }
     782
     783#define _INSTANCE3_SC_SIGNAL(component, sig1, sig2, x1, x2, x3)         \
     784  for (uint32_t it1=0; it1<x1; it1++)                                   \
     785    for (uint32_t it2=0; it2<x2; it2++)                                 \
     786      for (uint32_t it3=0; it3<x3; it3++)                               \
     787        {                                                               \
     788          TEST_SIGNAL(component->sig1 [it1][it2][it3]->name(),component->sig1 [it1][it2][it3]); \
     789          TEST_SIGNAL(sig2            [it1][it2][it3]->name(),sig2            [it1][it2][it3]); \
     790          (*(component->sig1[it1][it2][it3])) (*(sig2[it1][it2][it3])); \
     791        }
     792
     793#define DELETE3_SC_SIGNAL(sig,x1,x2,x3)                                 \
     794  {                                                                     \
     795    for (uint32_t it1=0; it1<x1; it1++)                                 \
     796      {                                                                 \
     797        for (uint32_t it2=0; it2<x2; it2++)                             \
     798          {                                                             \
     799            for (uint32_t it3=0; it3<x3; it3++)                         \
     800              {                                                         \
     801                delete sig[it1][it2][it3];                              \
     802              }                                                         \
     803            delete [] sig[it1][it2];                                    \
     804          }                                                             \
     805        delete [] sig[it1];                                             \
     806      }                                                                 \
     807    delete [] sig;                                                      \
     808  }
     809
     810#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Constants.h

    r81 r88  
    22#define morpheo_behavioural_Constants_h
    33
     4/*
     5  WARNING :
     6 
     7  I Use reserved exception :
     8
     9  0x10 - EXCEPTION_MEMORY_MISS_SPECULATION   - Load miss speculation
     10  0x11 - EXCEPTION_MEMORY_LOAD_SPECULATIVE   - The load is speculative : write in register file, but don't commit
     11  0x12 - EXCEPTION_ALU_SPR_ACCESS_INVALID    - SPR     present in ALU but not compatible privilege
     12  0x13 - EXCEPTION_ALU_SPR_ACCESS_MUST_READ  - SPR not present in ALU
     13  0x14 - EXCEPTION_ALU_SPR_ACCESS_MUST_WRITE - SPR not present in ALU
     14
     15  I Use reserved SPR :
     16  [0][19] - SPR_CID
     17*/
     18
    419namespace morpheo {
    520namespace behavioural {
     21
     22#  define SET_FLAG(     x,pos)  {(x) |=  (1<<(pos));} while (0)
     23#  define UNSET_FLAG(   x,pos)  {(x) &= ~(1<<(pos));} while (0)
     24#  define IS_SET_FLAG(  x,pos) (((x) &   (1<<(pos))) != 0)
     25#  define IS_UNSET_FLAG(x,pos) (((x) &   (1<<(pos))) == 0)
     26#  define CHANGE_FLAG(  x,pos,f) \
     27   {                        \
     28     if (f)                 \
     29       {SET_FLAG(x,pos);}   \
     30     else                   \
     31       {UNSET_FLAG(x,pos);} \
     32   } while (0)
    633
    734  //=========================================================[ Type ]=====
     
    1037#  define TYPE_MOVE                                0x2        // 00000 - unit multiple
    1138#  define TYPE_TEST                                0x3        // 00000 - unit multiple
    12 #  define TYPE_MUL_DIV                             0x4        // 00000 - unit multiple
    13 #  define TYPE_EXTEND                              0x5        // 00000 - unit multiple, type optionnal
    14 #  define TYPE_FIND                                0x6        // 00000 - unit multiple, type optionnal
    15 #  define TYPE_SPECIAL                             0x7        // 00000 - unit uniq
    16 #  define TYPE_CUSTOM                              0x8        // 00000 - unit uniq    , type optionnal
    17 #  define TYPE_BRANCH                              0x9        // 00000 - unit multiple
    18 #  define TYPE_MEMORY                              0xa        // 00000 - unit uniq
    19 
     39#  define TYPE_MUL                                 0x4        // 00000 - unit multiple
     40#  define TYPE_DIV                                 0x5        // 00000 - unit multiple, type optionnal
     41#  define TYPE_EXTEND                              0x6        // 00000 - unit multiple, type optionnal
     42#  define TYPE_FIND                                0x7        // 00000 - unit multiple, type optionnal
     43#  define TYPE_SPECIAL                             0x8        // 00000 - unit uniq
     44#  define TYPE_CUSTOM                              0x9        // 00000 - unit uniq    , type optionnal
     45#  define TYPE_BRANCH                              0xa        // 00000 - unit multiple
     46#  define TYPE_MEMORY                              0xb        // 00000 - unit uniq
     47
     48//#define NB_TYPE                                  11
    2049#  define SIZE_TYPE                                5
    2150#  define MAX_TYPE                                 (1<<SIZE_TYPE)
     51
     52#  define is_type_valid(x) \
     53  (( x == TYPE_ALU    ) or \
     54   ( x == TYPE_SHIFT  ) or \
     55   ( x == TYPE_MOVE   ) or \
     56   ( x == TYPE_TEST   ) or \
     57   ( x == TYPE_MUL    ) or \
     58   ( x == TYPE_DIV    ) or \
     59   ( x == TYPE_EXTEND ) or \
     60   ( x == TYPE_FIND   ) or \
     61   ( x == TYPE_SPECIAL) or \
     62   ( x == TYPE_CUSTOM ) or \
     63   ( x == TYPE_BRANCH ) or \
     64   ( x == TYPE_MEMORY ))
    2265
    2366  //====================================================[ Operation ]=====
     
    149192#  define OPERATION_TEST_L_SFNE                    0x20       // 000_0000 l.sfne  , l.sfnei
    150193
    151 #  define OPERATION_MUL_DIV_L_MUL                  0x1        // 000_0000 l.mul   , l.muli
    152 #  define OPERATION_MUL_DIV_L_MULU                 0x2        // 000_0000 l.mulu
    153 #  define OPERATION_MUL_DIV_L_DIV                  0x4        // 000_0000 l.div
    154 #  define OPERATION_MUL_DIV_L_DIVU                 0x8        // 000_0000 l.divu
     194#  define OPERATION_MUL_L_MUL                      0x1        // 000_0000 l.mul   , l.muli
     195#  define OPERATION_MUL_L_MULU                     0x2        // 000_0000 l.mulu
     196
     197#  define OPERATION_DIV_L_DIV                      0x1        // 000_0000 l.div
     198#  define OPERATION_DIV_L_DIVU                     0x2        // 000_0000 l.divu
    155199
    156200#  define OPERATION_EXTEND_L_EXTEND_Z              0x1        // 000_0000 l.extbz , l.exthz, l.extwz
     
    204248#  define SIZE_EXCEPTION                           5
    205249#  define SIZE_EXCEPTION_USE                       4
    206 #  define SIZE_EXCEPTION_MEMORY                    3
    207 #  define SIZE_EXCEPTION_CUSTOM                    3
    208 #  define SIZE_EXCEPTION_ALU                       2
    209 #  define SIZE_EXCEPTION_DECOD                     2
    210 #  define SIZE_EXCEPTION_IFETCH                    2
     250#  define SIZE_EXCEPTION_MEMORY                    5
     251#  define SIZE_EXCEPTION_CUSTOM                    5
     252#  define SIZE_EXCEPTION_ALU                       5
     253#  define SIZE_EXCEPTION_DECOD                     5
     254#  define SIZE_EXCEPTION_IFETCH                    5
    211255
    212256#  define EXCEPTION_NONE                           0x00       // none exception
     
    243287#  define EXCEPTION_CUSTOM_6                       0x1f       // Reserved for custom exceptions
    244288
    245 
    246 #define exception_to_address(x) (x<<8)
     289  //SR[14].EPH : Exception Prefix High
     290  // EPH = 0 Exceptions vectors are located in memory area starting at 0x0
     291  // EPH = 1 Exception vectors are located in memory area starting at 0xF0000000
     292
     293#define exception_to_address(eph,x) (((eph==0)?0x0:0xF0000000)+(x<<8))
    247294
    248295  // Exception Execution
    249 #  define EXCEPTION_MEMORY_NONE                    0x0        // Load/Store generate none exception
    250 #  define EXCEPTION_MEMORY_ALIGNMENT               0x1        // Load/Store access is not aligned
    251 #  define EXCEPTION_MEMORY_DATA_TLB                0x2        // DTLB miss
    252 #  define EXCEPTION_MEMORY_DATA_PAGE               0x3        // No matching or page violation protection in pages tables
    253 #  define EXCEPTION_MEMORY_BUS_ERROR               0x4        // Access at a invalid physical address
    254 #  define EXCEPTION_MEMORY_MISS_SPECULATION        0x5        // Load miss speculation
    255 #  define EXCEPTION_MEMORY_LOAD_SPECULATIVE        0x6        // The load is speculative : write in register file, but don't commit
    256 
    257 #  define EXCEPTION_CUSTOM_NONE                    0x1        // Custom unit generate none exception
    258 #  define EXCEPTION_CUSTOM_CUST_0                  0x1        // Reserved for custom exceptions
    259 #  define EXCEPTION_CUSTOM_CUST_1                  0x2        // Reserved for custom exceptions
    260 #  define EXCEPTION_CUSTOM_CUST_2                  0x3        // Reserved for custom exceptions
    261 #  define EXCEPTION_CUSTOM_CUST_3                  0x4        // Reserved for custom exceptions
    262 #  define EXCEPTION_CUSTOM_CUST_4                  0x5        // Reserved for custom exceptions
    263 #  define EXCEPTION_CUSTOM_CUST_5                  0x6        // Reserved for custom exceptions
    264 #  define EXCEPTION_CUSTOM_CUST_6                  0x7        // Reserved for custom exceptions
    265 
    266 #  define EXCEPTION_ALU_NONE                       0x0        // Functionnal unit generate none exception
    267 #  define EXCEPTION_ALU_RANGE                      0x1        //
    268 #  define EXCEPTION_ALU_SPR_ACCESS_INVALID         0x2        // SPR     present in ALU but not compatible privilege
    269 #  define EXCEPTION_ALU_SPR_ACCESS_NOT_COMPLETE    0x3        // SPR not present in ALU
    270 
    271 #  define EXCEPTION_DECOD_NONE                     0x0        // none exception
    272 #  define EXCEPTION_DECOD_ILLEGAL_INSTRUCTION      0x1        // Instruction is illegal (no implemented)
    273 #  define EXCEPTION_DECOD_SYSCALL                  0x2        // System Call
    274 //#define EXCEPTION_DECOD_TRAP                     0x4        // L.trap or debug unit (note : must read SR !)
    275 
    276 #  define EXCEPTION_IFETCH_NONE                    0x0        // Fetch Unit generate none exception
    277 #  define EXCEPTION_IFETCH_INSTRUCTION_TLB         0x1        // ITLB miss
    278 #  define EXCEPTION_IFETCH_INSTRUCTION_PAGE        0x2        // No matching or page violation protection in pages tables
    279 #  define EXCEPTION_IFETCH_BUS_ERROR               0x3        // Access at a invalid physical address
    280 
    281 #  define EXCEPTION_USE_NONE                       0x0        //
    282 #  define EXCEPTION_USE_ILLEGAL_INSTRUCTION        0x1        // illegal_instruction
    283 #  define EXCEPTION_USE_RANGE                      0x2        // range
    284 #  define EXCEPTION_USE_MEMORY_WITH_ALIGNMENT      0x3        // TLB miss, page fault, bus error, alignment
    285 #  define EXCEPTION_USE_MEMORY_WITHOUT_ALIGNMENT   0x4        // TLB miss, page fault, bus error
    286 #  define EXCEPTION_USE_SYSCALL                    0x5        // syscall
    287 #  define EXCEPTION_USE_TRAP                       0x6        // trap
    288 #  define EXCEPTION_USE_CUSTOM_0                   0x7        //
    289 #  define EXCEPTION_USE_CUSTOM_1                   0x8        //
    290 #  define EXCEPTION_USE_CUSTOM_2                   0x9        //
    291 #  define EXCEPTION_USE_CUSTOM_3                   0xa        //
    292 #  define EXCEPTION_USE_CUSTOM_4                   0xb        //
    293 #  define EXCEPTION_USE_CUSTOM_5                   0xc        //
    294 #  define EXCEPTION_USE_CUSTOM_6                   0xd        //
     296#  define EXCEPTION_IFETCH_NONE                    0x00       // Fetch Unit generate none exception
     297#  define EXCEPTION_IFETCH_INSTRUCTION_TLB         0x0a       // ITLB miss
     298#  define EXCEPTION_IFETCH_INSTRUCTION_PAGE        0x04       // No matching or page violation protection in pages tables
     299#  define EXCEPTION_IFETCH_BUS_ERROR               0x02       // Access at a invalid physical address
     300
     301#  define EXCEPTION_DECOD_NONE                     0x00       // none exception
     302#  define EXCEPTION_DECOD_ILLEGAL_INSTRUCTION      0x01       // Instruction is illegal (no implemented)
     303#  define EXCEPTION_DECOD_SYSCALL                  0x02       // System Call
     304//#define EXCEPTION_DECOD_TRAP                     0x0e       // L.trap or debug unit (note : must read SR !)
     305#  define EXCEPTION_DECOD_INSTRUCTION_TLB          0x0a       // ITLB miss
     306#  define EXCEPTION_DECOD_INSTRUCTION_PAGE         0x04       // No matching or page violation protection in pages tables
     307#  define EXCEPTION_DECOD_BUS_ERROR                0x02       // Access at a invalid physical address
     308
     309#  define EXCEPTION_ALU_NONE                       0x00       // Functionnal unit generate none exception
     310#  define EXCEPTION_ALU_RANGE                      0x0b       //
     311#  define EXCEPTION_ALU_SPR_ACCESS_INVALID         0x12       // SPR     present in ALU but not compatible privilege
     312#  define EXCEPTION_ALU_SPR_ACCESS_MUST_READ       0x13       // SPR not present in ALU
     313#  define EXCEPTION_ALU_SPR_ACCESS_MUST_WRITE      0x14       // SPR not present in ALU
     314
     315#  define EXCEPTION_MEMORY_NONE                    0x00       // Load/Store generate none exception
     316#  define EXCEPTION_MEMORY_ALIGNMENT               0x06       // Load/Store access is not aligned
     317#  define EXCEPTION_MEMORY_DATA_TLB                0x09       // DTLB miss
     318#  define EXCEPTION_MEMORY_DATA_PAGE               0x03       // No matching or page violation protection in pages tables
     319#  define EXCEPTION_MEMORY_BUS_ERROR               0x02       // Access at a invalid physical address
     320#  define EXCEPTION_MEMORY_MISS_SPECULATION        0x10       // Load miss speculation
     321#  define EXCEPTION_MEMORY_LOAD_SPECULATIVE        0x11       // The load is speculative : write in register file, but don't commit
     322
     323#  define EXCEPTION_CUSTOM_NONE                    0x00       // Custom unit generate none exception
     324#  define EXCEPTION_CUSTOM_CUST_0                  0x19       // Reserved for custom exceptions
     325#  define EXCEPTION_CUSTOM_CUST_1                  0x1a       // Reserved for custom exceptions
     326#  define EXCEPTION_CUSTOM_CUST_2                  0x1b       // Reserved for custom exceptions
     327#  define EXCEPTION_CUSTOM_CUST_3                  0x1c       // Reserved for custom exceptions
     328#  define EXCEPTION_CUSTOM_CUST_4                  0x1d       // Reserved for custom exceptions
     329#  define EXCEPTION_CUSTOM_CUST_5                  0x1e       // Reserved for custom exceptions
     330#  define EXCEPTION_CUSTOM_CUST_6                  0x1f       // Reserved for custom exceptions
     331
     332#  define EXCEPTION_USE_NONE                       0x00       //
     333#  define EXCEPTION_USE_ILLEGAL_INSTRUCTION        0x01       // illegal_instruction
     334#  define EXCEPTION_USE_RANGE                      0x02       // range
     335#  define EXCEPTION_USE_MEMORY_WITH_ALIGNMENT      0x03       // TLB miss, page fault, bus error, alignment
     336#  define EXCEPTION_USE_MEMORY_WITHOUT_ALIGNMENT   0x04       // TLB miss, page fault, bus error
     337#  define EXCEPTION_USE_SYSCALL                    0x05       // syscall
     338#  define EXCEPTION_USE_TRAP                       0x06       // trap
     339#  define EXCEPTION_USE_CUSTOM_0                   0x07       //
     340#  define EXCEPTION_USE_CUSTOM_1                   0x08       //
     341#  define EXCEPTION_USE_CUSTOM_2                   0x09       //
     342#  define EXCEPTION_USE_CUSTOM_3                   0x0a       //
     343#  define EXCEPTION_USE_CUSTOM_4                   0x0b       //
     344#  define EXCEPTION_USE_CUSTOM_5                   0x0c       //
     345#  define EXCEPTION_USE_CUSTOM_6                   0x0d       //
     346
     347#  define exception_ifetch_to_exception_decod(x) x
     348#  define exception_decod_to_exception(x)        x
     349#  define exception_alu_to_exception(x)          x
     350#  define exception_memory_to_exception(x)       x
     351#  define exception_custom_to_exception(x)       x
    295352
    296353  //=======================================================[ icache ]=====
     
    298355  //--------------------------------------------------[ icache_type ]-----
    299356
    300 #  define SIZE_ICACHE_TYPE                              2
    301 
    302 #  define ICACHE_TYPE_LOAD                              0x0        // 0000
    303 #  define ICACHE_TYPE_LOCK                              0x1        // 0001
    304 #  define ICACHE_TYPE_INVALIDATE                        0x2        // 0010
    305 #  define ICACHE_TYPE_PREFETCH                          0x3        // 0011
     357#  define SIZE_ICACHE_TYPE                         2
     358
     359#  define ICACHE_TYPE_LOAD                         0x0        // 0000
     360#  define ICACHE_TYPE_LOCK                         0x1        // 0001
     361#  define ICACHE_TYPE_INVALIDATE                   0x2        // 0010
     362#  define ICACHE_TYPE_PREFETCH                     0x3        // 0011
    306363
    307364// just take the 2 less significative bits.
     
    310367  //-------------------------------------------------[ icache_error ]-----
    311368
    312 #  define SIZE_ICACHE_ERROR                             1
    313 
    314 #  define ICACHE_ERROR_NONE                             0x0
    315 #  define ICACHE_ERROR_BUS_ERROR                        0x1
     369#  define SIZE_ICACHE_ERROR                        1
     370
     371#  define ICACHE_ERROR_NONE                        0x0
     372#  define ICACHE_ERROR_BUS_ERROR                   0x1
    316373
    317374  //=======================================================[ dcache ]=====
     
    319376  //--------------------------------------------------[ dcache_type ]-----
    320377
    321 #  define SIZE_DCACHE_TYPE                              4
    322 
    323 //#define DCACHE_TYPE_                                  0x0        // 0000
    324 #  define DCACHE_TYPE_LOCK                              0x1        // 0001
    325 #  define DCACHE_TYPE_INVALIDATE                        0x2        // 0010
    326 #  define DCACHE_TYPE_PREFETCH                          0x3        // 0011
    327 //#define DCACHE_TYPE_                                  0x4        // 0100
    328 //#define DCACHE_TYPE_                                  0x5        // 0101
    329 #  define DCACHE_TYPE_FLUSH                             0x6        // 0110
    330 #  define DCACHE_TYPE_SYNCHRONIZATION                   0x7        // 0111
    331 #  define DCACHE_TYPE_LOAD_8                            0x8        // 1000
    332 #  define DCACHE_TYPE_LOAD_16                           0x9        // 1001
    333 #  define DCACHE_TYPE_LOAD_32                           0xa        // 1010
    334 #  define DCACHE_TYPE_LOAD_64                           0xb        // 1011
    335 #  define DCACHE_TYPE_STORE_8                           0xc        // 1100
    336 #  define DCACHE_TYPE_STORE_16                          0xd        // 1101
    337 #  define DCACHE_TYPE_STORE_32                          0xe        // 1110
    338 #  define DCACHE_TYPE_STORE_64                          0xf        // 1111
     378#  define SIZE_DCACHE_TYPE                         4
     379
     380//#define DCACHE_TYPE_                             0x0        // 0000
     381#  define DCACHE_TYPE_LOCK                         0x1        // 0001
     382#  define DCACHE_TYPE_INVALIDATE                   0x2        // 0010
     383#  define DCACHE_TYPE_PREFETCH                     0x3        // 0011
     384//#define DCACHE_TYPE_                             0x4        // 0100
     385//#define DCACHE_TYPE_                             0x5        // 0101
     386#  define DCACHE_TYPE_FLUSH                        0x6        // 0110
     387#  define DCACHE_TYPE_SYNCHRONIZATION              0x7        // 0111
     388#  define DCACHE_TYPE_LOAD_8                       0x8        // 1000
     389#  define DCACHE_TYPE_LOAD_16                      0x9        // 1001
     390#  define DCACHE_TYPE_LOAD_32                      0xa        // 1010
     391#  define DCACHE_TYPE_LOAD_64                      0xb        // 1011
     392#  define DCACHE_TYPE_STORE_8                      0xc        // 1100
     393#  define DCACHE_TYPE_STORE_16                     0xd        // 1101
     394#  define DCACHE_TYPE_STORE_32                     0xe        // 1110
     395#  define DCACHE_TYPE_STORE_64                     0xf        // 1111
    339396
    340397// just take the 4 less significative bits.
     
    343400  //-------------------------------------------------[ dcache_error ]-----
    344401
    345 #  define SIZE_DCACHE_ERROR                             1
    346 
    347 #  define DCACHE_ERROR_NONE                             0x0
    348 #  define DCACHE_ERROR_BUS_ERROR                        0x1
     402#  define SIZE_DCACHE_ERROR                        1
     403
     404#  define DCACHE_ERROR_NONE                        0x0
     405#  define DCACHE_ERROR_BUS_ERROR                   0x1
    349406
    350407  //=================================================[ special_data ]=====
    351408
    352 #  define SIZE_SPECIAL_DATA                             2
     409#  define SIZE_SPECIAL_DATA                        2
    353410
    354411// Position of flag in "rename register SR" (NOT IN "SR")
    355 #  define FLAG_POSITION_F                               0x0         // Conditionnal branch flag
    356 #  define FLAG_POSITION_CY                              0x1         // Carry was produced by last arithmetic operation
    357 #  define FLAG_POSITION_OV                              0x0         // Overflow occured during last arithmetic operation
    358 
    359 #  define FLAG_F                                        (1<<FLAG_POSITION_F ) // Conditionnal branch flag
    360 #  define FLAG_CY                                       (1<<FLAG_POSITION_CY) // Carry was produced by last arithmetic operation
    361 #  define FLAG_OV                                       (1<<FLAG_POSITION_OV) // Overflow occured during last arithmetic operation
     412#  define FLAG_POSITION_F                          0x0         // Conditionnal branch flag
     413#  define FLAG_POSITION_CY                         0x1         // Carry was produced by last arithmetic operation
     414#  define FLAG_POSITION_OV                         0x0         // Overflow occured during last arithmetic operation
     415
     416#  define FLAG_F                                   (1<<FLAG_POSITION_F ) // Conditionnal branch flag
     417#  define FLAG_CY                                  (1<<FLAG_POSITION_CY) // Carry was produced by last arithmetic operation
     418#  define FLAG_OV                                  (1<<FLAG_POSITION_OV) // Overflow occured during last arithmetic operation
    362419
    363420  //==========================================================[ spr ]=====
     
    396453      GROUP_CUSTOM_6,            // 29     
    397454      GROUP_CUSTOM_7,            // 30     
    398       GROUP_CUSTOM_8             // 31     
     455      GROUP_CUSTOM_8,            // 31     
     456      NB_GROUP
    399457    };
    400458
    401 #  define NB_GROUP                                 32
    402459#  define NB_REG_GROUP_SYSTEM_AND_CONTROL          1536
    403460#  define NB_REG_GROUP_DMMU                        1536
     
    432489#  define NB_REG_GROUP_CUSTOM_7                    0
    433490#  define NB_REG_GROUP_CUSTOM_8                    0
    434                                                    
     491
     492  static const uint32_t NB_REG_GROUP [] =
     493    {NB_REG_GROUP_SYSTEM_AND_CONTROL  ,
     494     NB_REG_GROUP_DMMU                ,
     495     NB_REG_GROUP_IMMU                ,
     496     NB_REG_GROUP_DCACHE              ,
     497     NB_REG_GROUP_ICACHE              ,
     498     NB_REG_GROUP_MAC                 ,
     499     NB_REG_GROUP_DEBUG               ,
     500     NB_REG_GROUP_PERFORMANCE_COUNTER ,
     501     NB_REG_GROUP_POWER_MANAGEMENT    ,
     502     NB_REG_GROUP_PIC                 ,
     503     NB_REG_GROUP_TICK_TIMER          ,
     504     NB_REG_GROUP_FLOATING_POINT      ,
     505     NB_REG_GROUP_RESERVED_1          ,
     506     NB_REG_GROUP_RESERVED_2          ,
     507     NB_REG_GROUP_RESERVED_3          ,
     508     NB_REG_GROUP_RESERVED_4          ,
     509     NB_REG_GROUP_RESERVED_5          ,
     510     NB_REG_GROUP_RESERVED_6          ,
     511     NB_REG_GROUP_RESERVED_7          ,
     512     NB_REG_GROUP_RESERVED_8          ,
     513     NB_REG_GROUP_RESERVED_9          ,
     514     NB_REG_GROUP_RESERVED_10         ,
     515     NB_REG_GROUP_RESERVED_11         ,
     516     NB_REG_GROUP_RESERVED_12         ,
     517     NB_REG_GROUP_CUSTOM_1            ,
     518     NB_REG_GROUP_CUSTOM_2            ,
     519     NB_REG_GROUP_CUSTOM_3            ,
     520     NB_REG_GROUP_CUSTOM_4            ,
     521     NB_REG_GROUP_CUSTOM_5            ,
     522     NB_REG_GROUP_CUSTOM_6            ,
     523     NB_REG_GROUP_CUSTOM_7            ,
     524     NB_REG_GROUP_CUSTOM_8            };
     525 
     526  // GROUP_SYSTEM_AND_CONTROL
     527#  define SPR_VR                                   0          // Version register
     528#  define SPR_UPR                                  1          // Unit Present register
     529#  define SPR_CPUCFGR                              2          // CPU Configuration register
     530#  define SPR_DMMUCFGR                             3          // Data MMU Configuration register
     531#  define SPR_IMMUCFGR                             4          // Instruction MMU Configuration register
     532#  define SPR_DCCFGR                               5          // Data Cache Configuration register
     533#  define SPR_ICCFGR                               6          // Instruction Cache Configuration register
     534#  define SPR_DCFGR                                7          // Debug Configuration register
     535#  define SPR_PCCFGR                               8          // Performance Counters Configuration register
     536#  define SPR_NPC                                  16         // PC mapped to SPR space (next PC)
     537#  define SPR_SR                                   17         // Supervision register
     538#  define SPR_PPC                                  18         // PC mapped to SPR space (previous PC)
     539#  define SPR_CID                                  19         // Context Id
     540#  define SPR_FPCSR                                20         // FP Control Status register
     541#  define SPR_EPCR                                 32         // Exception PC register
     542#  define SPR_EEAR                                 48         // Exception EA register
     543#  define SPR_ESR                                  64         // Exception SR register
     544#  define SPR_GPR                                  1024       // GPRs mappted to SPR space
     545 
     546  // GROUP_DCACHE
     547#  define SPR_DCCR                                 0          // DC Control register
     548#  define SPR_DCBPR                                1          // DC Block Prefetch register
     549#  define SPR_DCBFR                                2          // DC Block Flush register
     550#  define SPR_DCBIR                                3          // DC Block Invalidate register
     551#  define SPR_DCBWR                                4          // DC Block Write-back register
     552#  define SPR_DCBLR                                5          // DC Block Lock register
     553
     554  // GROUP_ICACHE
     555#  define SPR_ICCR                                 0          // IC Control register
     556#  define SPR_ICBPR                                1          // IC Block Prefetch register
     557#  define SPR_ICBIR                                2          // IC Block Invalidate register
     558#  define SPR_ICBLR                                3          // IC Block Lock register
    435559                                                   
    436560  // GROUP_MAC                                     
     
    438562#  define SPR_MACHI                                2          // MAC High
    439563
     564
     565
     566  // SR RENAME
    440567#  define NB_SPR_LOGIC                             2
    441568#  define LOG2_NB_SPR_LOGIC                        1
     
    863990#  define OPCOD_L_EXTWZ                            0x1           // 0001
    864991
    865   /*
    866 
    867   //--------------------------------------------------[ destination ]-----
    868 #define                 _size_destination1            4
    869 
    870 #define                  cst_DESTINATION1_NONE        0x0
    871 #define                 mask_DESTINATION1_GPR         0x1
    872 #define                 mask_DESTINATION1_MEMORY      0x2
    873 #define                 mask_DESTINATION1_SPR         0x4
    874 #define                 mask_DESTINATION1_MAC_UNIT    0x8
    875  
    876 #define                 _size_destination2  3
    877 
    878 #define                  cst_DESTINATION2_NONE        0x0
    879 #define                 mask_DESTINATION2_COMMIT      0x1
    880 #define                 mask_DESTINATION2_MEMORY      0x2
    881 #define                 mask_DESTINATION2_SPR         0x4
    882  
    883   //----------------------------------------------------[ exec_flag ]-----
    884 #define                 _size_exec_flag               2
    885 
    886 #define                 mask_EXEC_FLAG_NONE           0x1
    887 #define                 mask_EXEC_FLAG_CARRY          0x1
    888 #define                 mask_EXEC_FLAG_FLAG           0x1
    889 #define                 mask_EXEC_FLAG_OVERFLOW       0x2
    890 
    891   //---------------------------------------------------[ exec_excep ]-----
    892 #define                  _size_exec_excep             1
    893 
    894 #define                 mask_EXEC_EXCEP_NONE          0x0
    895 #define                 mask_EXEC_EXCEP_RANGE         0x1
    896  
    897   //----------------------------------------------------[ Condition ]-----
    898 #define                 _size_condition               3
    899    
    900 #define                  cst_CONDITION_UNCONDITIONAL  0x0           // None condition (jump)
    901 #define                 mask_CONDITION_CONDITIONAL    0x2           
    902 #define                 mask_CONDITION_CONDITIONAL_NF 0x0           // Branch if Flag is clear
    903 #define                 mask_CONDITION_CONDITIONAL_F  0x1           // Branch if Flag is set   
    904 #define                 mask_CONDITION_REG            0x4           // Branch if a register is read
    905 #define                 mask_CONDITION_STACK          0x8           // Branch with pop  in stack pointer
    906 
    907   */
    908 
    909   /*
    910 #define M_CPU_SIZE_INST       32
    911 
    912 //----------------------------------------------------
    913 // Exception type
    914 //----------------------------------------------------
    915 
    916 #define M_CPU_LOG2_NB_EXCP    5
    917 #define M_CPU_NB_EXCP         32
    918 
    919 #define EXCP_NO               0x00          // none exception
    920 #define EXCP_RESET            0x01          // software or hardware reset
    921 #define EXCP_BERR             0x02          // Access at a invalid physical adress
    922 #define EXCP_D_PAGE           0x03          // No matching or page violation protection in pages tables
    923 #define EXCP_I_PAGE           0x04          // No matching or page violation protection in pages tables
    924 #define EXCP_TICK_TIMER       0x05          // Tick timer interruption
    925 #define EXCP_ALIGNMENT        0x06          // Load/Store access is not aligned
    926 #define EXCP_ILL_INST         0x07          // Instruction is illegal (no implemented)
    927 #define EXCP_IRQ              0x08          // External interruption
    928 #define EXCP_D_TLB            0x09          // DTLB miss
    929 #define EXCP_I_TLB            0x0a          // ITLB miss
    930 #define EXCP_RANGE            0x0b          // Overflow or access at a unimplemented register or context
    931 #define EXCP_SYSCALL          0x0c          // System Call
    932 #define EXCP_FP               0x0d          // Caused by a floating instruction
    933 #define EXCP_TRAP             0x0e          // L.trap or debug unit
    934 #define EXCP_RES0             0x0f          // Reserved for a futur usage
    935 #define EXCP_RES1             0x10          // Reserved for a futur usage
    936 #define EXCP_RES2             0x11          // Reserved for a futur usage
    937 #define EXCP_RES3             0x12          // Reserved for a futur usage
    938 #define EXCP_RES4             0x13          // Reserved for a futur usage
    939 #define EXCP_RES5             0x14          // Reserved for a futur usage
    940 #define EXCP_RES6             0x15          // Reserved for implemented specific exceptions
    941 #define EXCP_RES7             0x16          // Reserved for implemented specific exceptions
    942 #define EXCP_RES8             0x17          // Reserved for implemented specific exceptions
    943 #define EXCP_RES9             0x18          // Reserved for implemented specific exceptions
    944 #define EXCP_CUST0            0x19          // Reserved for custom exceptions
    945 #define EXCP_CUST1            0x1a          // Reserved for custom exceptions
    946 #define EXCP_CUST2            0x1b          // Reserved for custom exceptions
    947 #define EXCP_CUST3            0x1c          // Reserved for custom exceptions
    948 #define EXCP_CUST4            0x1d          // Reserved for custom exceptions
    949 #define EXCP_CUST5            0x1e          // Reserved for custom exceptions
    950 #define EXCP_CUST6            0x1f          // Reserved for custom exceptions
    951 
    952 //----------------------------------------------------
    953 // Flags
    954 //----------------------------------------------------
    955 
    956 #define M_CPU_NB_FLAG         3
    957 
    958 // Integer flags
    959 #define FLAG_F                0x1           // Conditionnal branch flag
    960 #define FLAG_CY               0x2           // Carry was produced by last arithmétic operation
    961 #define FLAG_OV               0x4           // Overflow occured during last arithmetic operation
    962 
    963 // Floating flags
    964 #define FLAG_OVF              0x004         // Overflow occured during last arithmetic operation
    965 #define FLAG_UNF              0x008         // Underflow flags
    966 #define FLAG_SNF              0x010         // Result SNAN
    967 #define FLAG_QNF              0x020         // Result QNAN
    968 #define FLAG_ZF               0x040         // Result is nul
    969 #define FLAG_IXF              0x080         // Result is inexact
    970 #define FLAG_IVF              0x100         // Result is invalid
    971 #define FLAG_INF              0x200         // Result is infinite
    972 #define FLAG_DZF              0x400         // Division by zero
    973 
    974 // Position of flag in "rename register SR" (NOT IN "SR")
    975 #define FLAG_POS_F            0x0           // Conditionnal branch flag
    976 #define FLAG_POS_CY           0x1           // Carry was produced by last arithmétic operation
    977 #define FLAG_POS_OV           0x0           // Overflow occured during last arithmetic operation
    978 
    979 //----------------------------------------------------
    980 // Instruction type
    981 //----------------------------------------------------
    982 
    983 #define M_CPU_LOG2_NB_TYPE    4
    984 
    985 #define TYPE_NOP              0x0
    986 #define TYPE_ALU_F            0x1           // Instruction ALU with    flag using (ADD, SUB, ADDC ...)
    987 #define TYPE_ALU_NF           0x2           // Instruction ALU without flag using (AND, OR ...)
    988 #define TYPE_MAC              0x3           // Instruction ALU with    utilisation of register HI/LO
    989 #define TYPE_J                0x4           // Branch instruction
    990 #define TYPE_SPR_READ         0x5           // Instruction special : l.mfspr
    991 #define TYPE_SPR_WRITE        0x6           // Instruction special : l.mtspr
    992 #define TYPE_SPECIAL          0x7           // Instruction execute in decode stage
    993 #define TYPE_CUSTOM           0x8           // Instruction Custom
    994 
    995 #define TYPE_LOAD_Z           0x9           // Load  access (extended by zero)
    996 #define TYPE_LOAD_S           0xa           // Load  access (sign extended)
    997 #define TYPE_STORE            0xc           // Store access
    998 
    999 //----------------------------------------------------
    1000 // Condition to branch
    1001 //----------------------------------------------------
    1002 
    1003 #define M_CPU_LOG2_NB_COND    4
    1004 
    1005 #define COND_NONE             0x0           // None condition (jump)
    1006 #define COND_F                0x2           // Branch if Flag is set
    1007 #define COND_NF               0x3           // Branch if Flag is clear
    1008 #define COND_REG              0x4           // Branch if a register is read
    1009 #define COND_STACK            0x8           // Branch with pop  in stack pointer
    1010 
    1011 //----------------------------------------------------
    1012 // Event : State and Type
    1013 //----------------------------------------------------
    1014 
    1015 #define EVENT_STATE_NO_EVENT  0             // no event : current case
    1016 #define EVENT_STATE_EVENT     1             // Have a event : make necessary to manage the event
    1017 #define EVENT_STATE_WAITEND   2             // Wait end of manage event (restaure a good context)
    1018 #define EVENT_STATE_END       3             // CPU can continue
    1019 
    1020 #define EVENT_TYPE_MISS       0             // miss of speculation
    1021 #define EVENT_TYPE_EXCP       1             // exception or interruption occure
    1022 
    1023 // SPEC? TAKE?
    1024 #define BRANCH_STATE_NONE         0  // 0     0
    1025 #define BRANCH_STATE_NSPEC_TAKE   1  // 0     1  -> incondionnal
    1026 #define BRANCH_STATE_SPEC_NTAKE   2  // 1     0
    1027 #define BRANCH_STATE_SPEC_TAKE    3  // 1     1
    1028 
    1029 //----------------------------------------------------
    1030 // Name to particular register
    1031 //----------------------------------------------------
    1032 
    1033 //~~~~~~~~~~~~~~~~~~~~~~~~~~
    1034 // GENERAL PURPOSE REGISTER
    1035 //~~~~~~~~~~~~~~~~~~~~~~~~~~
    1036 #define M_CPU_LOG2_NB_GPR_LOG 5
    1037 #define M_CPU_NB_GPR_LOG      (1<<M_CPU_LOG2_NB_GPR_LOG)
    1038 
    1039 #define GPR_LOG_LR            0x09          // Link register
    1040 #define REG_PHY_SR            0x00          // Status register
    1041 
    1042 //~~~~~~~~~~~~~~~~~~~~~~~~~~
    1043 // SPECIAL PURPOSE REGISTER
    1044 //~~~~~~~~~~~~~~~~~~~~~~~~~~
    1045 #define M_CPU_LOG2_NB_SPR_LOG 1
    1046 #define M_CPU_NB_SPR_LOG      (1<<M_CPU_LOG2_NB_SPR_LOG)
    1047 #define M_CPU_SPR_SIZE_DATA   2             // Size of the most great register
    1048 
    1049 #define SPR_LOG_SR_F          0x00          // Status register bit F                   (size = 1)
    1050 #define SPR_LOG_SR_CY_OV      0x01          // Status register bit overflow and carry  (size = 2)
    1051 //#define SPR_LOG_SR_LO         0x02          // MAC LSB                                 (size = 32)
    1052 //#define SPR_LOG_SR_HI         0x03          // MAC MSB                                 (size = 32)
    1053   */
    1054 
    1055   /*
    1056   */
    1057 
    1058992}; // end namespace behavioural
    1059993}; // end namespace morpheo             
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h

    r86 r88  
    22#define Debug_component_H
    33
    4 #  define DEBUG_true                                                true
    5 #  define DEBUG_false                                               false
     4// Boolean
     5#  define DEBUG_true                                              true
     6#  define DEBUG_false                                             false
    67
    7 #  define DEBUG_Behavioural                                         false
    8 #  define   DEBUG_Generic                                           false
    9 #  define     DEBUG_Counter                                         false
    10 #  define     DEBUG_Queue                                           false
    11 #  define     DEBUG_Queue_Control                                   false
    12 #  define     DEBUG_RegisterFile                                    false
    13 #  define       DEBUG_RegisterFile_Monolithic                       false
    14 #  define       DEBUG_RegisterFile_Multi_Banked                     false
    15 #  define     DEBUG_Select                                          false
    16 #  define       DEBUG_Select_Priority_Fixed                         false
    17 #  define     DEBUG_Shifter                                         false
    18 #  define     DEBUG_Sort                                            false
    19 #  define     DEBUG_Victim                                          false
    20 #  define       DEBUG_Victim_Pseudo_LRU                             false
    21 #  define   DEBUG_Core                                              false
    22 #  define     DEBUG_Multi_Execute_loop                              false
    23 #  define       DEBUG_Execute_loop                                  false
    24 #  define         DEBUG_Multi_Execute_unit                          false
    25 #  define           DEBUG_Execute_unit                              false
    26 #  define             DEBUG_Functionnal_unit                        false
    27 #  define             DEBUG_Load_store_unit                         false
    28 #  define         DEBUG_Multi_Read_unit                             false
    29 #  define           DEBUG_Read_unit                                 false
    30 #  define             DEBUG_Read_queue                              false
    31 #  define             DEBUG_Reservation_station                     false
    32 #  define         DEBUG_Multi_Write_unit                            false
    33 #  define           DEBUG_Write_unit                                false
    34 #  define             DEBUG_Execute_queue                           false
    35 #  define             DEBUG_Write_queue                             false
    36 #  define         DEBUG_Network                                     false
    37 #  define           DEBUG_Execution_unit_to_Write_unit              false
    38 #  define           DEBUG_Read_unit_to_Execution_unit               false
    39 #  define         DEBUG_Register_unit                               false
    40 #  define           DEBUG_Register_unit_Glue                        false
    41 #  define     DEBUG_Multi_Front_end                                 false
    42 #  define       DEBUG_Front_end                                     false
    43 #  define         DEBUG_Context_State                               false
    44 #  define         DEBUG_Decod_unit                                  true
    45 #  define           DEBUG_Decod                                     true
    46 #  define           DEBUG_Decod_queue                               true
    47 #  define         DEBUG_Ifetch_unit                                 false
    48 #  define           DEBUG_Address_management                        false
    49 #  define           DEBUG_Ifetch_queue                              false
    50 #  define           DEBUG_Ifetch_unit_Glue                          false
    51 #  define         DEBUG_Prediction_unit                             false
    52 #  define           DEBUG_Branch_Target_Buffer                      false
    53 #  define             DEBUG_Branch_Target_Buffer_Glue               false
    54 #  define             DEBUG_Branch_Target_Buffer_Register           false
    55 #  define           DEBUG_Direction                                 false
    56 #  define             DEBUG_Direction_Glue                          false
    57 #  define             DEBUG_Meta_Predictor                          false
    58 #  define               DEBUG_Meta_Predictor_Glue                   false
    59 #  define               DEBUG_Two_Level_Branch_Predictor            false
    60 #  define                 DEBUG_Two_Level_Branch_Predictor_Glue     false
    61 #  define                 DEBUG_Branch_History_Table                false
    62 #  define                 DEBUG_Pattern_History_Table               false
    63 #  define           DEBUG_Prediction_unit_Glue                      false
    64 #  define           DEBUG_Return_Address_Stack                      false
    65 #  define           DEBUG_Update_Prediction_Table                   false
    66 #  define     DEBUG_Multi_OOO_Engine                                false
    67 #  define       DEBUG_OOO_Engine                                    false
    68 #  define         DEBUG_Rename_unit                                 false
    69 #  define           DEBUG_Load_Store_pointer_unit                   false
    70 #  define           DEBUG_Register_translation_unit                 false
    71 #  define             DEBUG_Dependency_checking_unit                false
    72 #  define             DEBUG_Free_List_unit                          false
    73 #  define             DEBUG_Register_Address_Translation_unit       false
    74 #  define             DEBUG_Register_translation_unit_Glue          false
    75 #  define             DEBUG_Stat_List_unit                          false
    76 //#define           DEBUG_Rename_queue                              false
    77 #  define           DEBUG_Rename_select                             false
     8// Component
     9#  define DEBUG_Morpheo                                           true
     10#  define   DEBUG_Behavioural                                     true
     11#  define   DEBUG_Configuration                                   true
     12#  define     DEBUG_Generic                                       true
     13#  define       DEBUG_Counter                                     true
     14#  define       DEBUG_Priority                                    true
     15#  define       DEBUG_Queue                                       true
     16#  define       DEBUG_Queue_Control                               true
     17#  define       DEBUG_RegisterFile                                true
     18#  define         DEBUG_RegisterFile_Monolithic                   true
     19#  define         DEBUG_RegisterFile_Multi_Banked                 true
     20#  define       DEBUG_Select                                      true
     21#  define         DEBUG_Select_Priority_Fixed                     true
     22#  define       DEBUG_Shifter                                     true
     23#  define       DEBUG_Sort                                        true
     24#  define       DEBUG_Victim                                      true
     25#  define         DEBUG_Victim_Pseudo_LRU                         true
     26#  define     DEBUG_Core                                          true
     27#  define       DEBUG_Core_Glue                                   true
     28#  define       DEBUG_Dcache_Access                               true
     29#  define       DEBUG_Icache_Access                               true
     30#  define       DEBUG_Multi_Front_end                             true
     31#  define         DEBUG_Front_end                                 true
     32#  define           DEBUG_Context_State                           true
     33#  define           DEBUG_Decod_unit                              true
     34#  define             DEBUG_Decod                                 true
     35#  define             DEBUG_Decod_queue                           true
     36#  define           DEBUG_Front_end_Glue                          true
     37#  define           DEBUG_Ifetch_unit                             true
     38#  define             DEBUG_Address_management                    true
     39#  define             DEBUG_Ifetch_queue                          true
     40#  define             DEBUG_Ifetch_unit_Glue                      true
     41#  define           DEBUG_Prediction_unit                         true
     42#  define             DEBUG_Branch_Target_Buffer                  true
     43#  define               DEBUG_Branch_Target_Buffer_Glue           true
     44#  define               DEBUG_Branch_Target_Buffer_Register       true
     45#  define             DEBUG_Direction                             true
     46#  define               DEBUG_Direction_Glue                      true
     47#  define               DEBUG_Meta_Predictor                      true
     48#  define                 DEBUG_Meta_Predictor_Glue               true
     49#  define                 DEBUG_Two_Level_Branch_Predictor        true
     50#  define                   DEBUG_Two_Level_Branch_Predictor_Glue true
     51#  define                   DEBUG_Branch_History_Table            true
     52#  define                   DEBUG_Pattern_History_Table           true
     53#  define             DEBUG_Prediction_unit_Glue                  true
     54#  define             DEBUG_Return_Address_Stack                  true
     55#  define             DEBUG_Update_Prediction_Table               true
     56#  define       DEBUG_Multi_OOO_Engine                            true
     57#  define         DEBUG_OOO_Engine                                true
     58#  define           DEBUG_Commit_unit                             true
     59#  define           DEBUG_Issue_queue                             true
     60#  define           DEBUG_OOO_Engine_Glue                         true
     61#  define           DEBUG_Reexecute_unit                          true
     62#  define           DEBUG_Rename_unit                             true
     63#  define             DEBUG_Load_Store_pointer_unit               true
     64#  define             DEBUG_Register_translation_unit             true
     65#  define               DEBUG_Dependency_checking_unit            true
     66#  define               DEBUG_Free_List_unit                      true
     67#  define               DEBUG_Register_Address_Translation_unit   true
     68#  define               DEBUG_Register_translation_unit_Glue      true
     69#  define               DEBUG_Stat_List_unit                      true
     70#  define             DEBUG_Rename_select                         true
     71#  define             DEBUG_Rename_unit_Glue                      true
     72#  define           DEBUG_Special_Register_unit                   true
     73#  define       DEBUG_Multi_Execute_loop                          true
     74#  define         DEBUG_Execute_loop                              true
     75#  define           DEBUG_Execute_loop_Glue                       true
     76#  define           DEBUG_Multi_Execute_unit                      true
     77#  define             DEBUG_Execute_unit                          true
     78#  define               DEBUG_Functionnal_unit                    true
     79#  define               DEBUG_Load_store_unit                     true
     80#  define           DEBUG_Multi_Read_unit                         true
     81#  define             DEBUG_Read_unit                             true
     82#  define               DEBUG_Read_queue                          true
     83#  define               DEBUG_Reservation_station                 true
     84#  define           DEBUG_Multi_Write_unit                        true
     85#  define             DEBUG_Write_unit                            true
     86#  define               DEBUG_Execute_queue                       true
     87#  define               DEBUG_Write_queue                         true
     88#  define           DEBUG_Network                                 true
     89#  define             DEBUG_Execution_unit_to_Write_unit          true
     90#  define             DEBUG_Read_unit_to_Execution_unit           true
     91#  define           DEBUG_Register_unit                           true
     92#  define             DEBUG_Register_unit_Glue                    true
     93
     94// Others
     95#  define DEBUG_Allocation                                        true
     96#  define DEBUG_Interface                                         true
    7897#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Environment.h

    r81 r88  
    22#define morpheo_behavioural_Environment_h
    33
    4 #if (defined(STATISTICS) and not defined(SYSTEMC))
    5 #  error "To have the statistics, you must set flags SYSTEMC"
    6 #endif
    7 
    8 #if (defined(INFORMATION) and not defined(STATISTICS))
    9 #  error "To have the information, you must set flags STATISTICS"
    10 #endif
    11 
    12 #if (defined(VHDL_TESTBENCH) and not defined(SYSTEMC))
    13 #  error "To have the vhdl's test bench, you must set flags SYSTEMC"
    14 #endif
    15 
    16 #if (defined(VHDL_TESTBENCH) and not defined(VHDL))
    17 #  error "To have the vhdl's test bench, you must set flags VHDL"
    18 #endif
    19 
    20 #if (defined(VHDL_TESTBENCH_ASSERT) and not defined(VHDL_TESTBENCH))
    21 #  error "To have an assert in vhdl's test bench, you must set flags VHDL_TESTBENCH"
    22 #endif
    23 
    24 #if (defined(VHDL_TESTBENCH) and defined(SYSTEMC))
    25 #  define SYSTEMC_VHDL_COMPATIBILITY
    26 #endif
    27 
    28 #if (defined(DEBUG))
    29 #  define DEBUG_TEST
    30 #endif
    31 
    32 // Environment variable
    33 #define MORPHEO_HOME          "MORPHEO_HOME"
     4//#include "Common/include/Environment.h"
    345
    356#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h

    r82 r88  
    3434  {
    3535    // -----[ fields ]----------------------------------------------------
    36   protected : const std::string          _name         ;
     36  protected : const std::string     _name         ;
    3737#ifdef POSITION
    3838  protected : const direction_t     _direction    ;
     
    4242
    4343#ifdef POSITION
    44   protected :       std::string          _comment      ;
    45 #endif
    46 
    47   protected : std::list<Signal *>      * _list_signal  ;
     44  protected :       std::string     _comment      ;
     45#endif
     46
     47  protected : std::list<Signal *> * _list_signal  ;
    4848
    4949#ifdef POSITION
     
    6969  public    :                       ~Interface           ();
    7070
    71   public    : std::string                get_name             ();
     71  public    : std::string           get_name             ();
    7272
    7373#ifdef POSITION
    7474  public    : void                  set_comment          (std::string comment);
    75   protected : std::string                get_comment          (void          );
    76 #endif
    77 
    78   protected : std::string                signal_name          (std::string      name_interface,
    79                                                           std::string      name_signal   ,
     75  protected : std::string           get_comment          (void);
     76#endif
     77
     78  protected : std::string           signal_name          (std::string name_interface,
     79                                                          std::string name_signal   ,
    8080                                                          direction_t direction     );
    8181
     
    8383  public    : bool                  find_signal          (Signal * signal);
    8484
    85   protected : std::string                get_signal           (void);
    86   public    : Signal *              set_signal           (std::string          name     ,
     85  protected : std::string           get_signal           (void);
     86  public    : Signal *              set_signal           (std::string     name     ,
    8787                                                          direction_t     direction,
    8888                                                          uint32_t        size     ,
    8989                                                          presence_port_t presence_port = PORT_VHDL_YES_TESTBENCH_YES);
    90   public    : std::list<Signal *>      * get_signal_list      (void);
     90  public    : std::list<Signal *> * get_signal_list      (void);
    9191
    9292#ifdef SYSTEMC
    93   public    : sc_in_clk *           set_signal_clk       (std::string          name     ,
     93  public    : sc_in_clk *           set_signal_clk       (std::string     name     ,
    9494                                                          uint32_t        size     ,
    9595                                                          presence_port_t presence_port=CLOCK_VHDL_YES)
     
    120120
    121121  public    : template <typename T>
    122               sc_in <T> *           set_signal_in       (std::string          name     ,
     122              sc_in <T> *           set_signal_in       (std::string     name     ,
    123123                                                         uint32_t        size     ,
    124124                                                         presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
     
    149149
    150150  public    : template <typename T>
    151               sc_out <T> *          set_signal_out      (std::string          name     ,
     151              sc_out <T> *          set_signal_out      (std::string     name     ,
    152152                                                         uint32_t        size     ,
    153153                                                         presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
     
    218218  public    : void                  testbench_cycle      (void);
    219219  public    : void                  testbench_body       (Vhdl           * & vhdl          ,
    220                                                           std::string             counter_name  ,
    221                                                           std::string             reset_name    );
     220                                                          std::string        counter_name  ,
     221                                                          std::string        reset_name    );
    222222  public    : std::string           testbench_test       (Vhdl           * & vhdl        ,
    223                                                           std::string             counter_name,
    224                                                           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);
     223                                                          std::string        counter_name,
     224                                                          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);
    229229#endif
    230230
    231231  public    : bool                  test_map             (uint32_t depth, bool top_level, bool is_behavioural);
    232 //   public    : bool                  test_equi            (uint32_t depth);
     232//public    : bool                  test_equi            (uint32_t depth);
    233233
    234234#ifdef POSITION
     
    238238  public    : XML                   toXML_mapping        (void);
    239239#endif
    240   public    : friend std::ostream&       operator<<           (std::ostream& output_stream,
    241                                                                morpheo::behavioural::Interface & x);
     240  public    : friend std::ostream&  operator<<           (std::ostream& output_stream,
     241                                                          morpheo::behavioural::Interface & x);
    242242
    243243  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface_fifo.h

    r82 r88  
    55 * $Id$
    66 *
    7  * [ Description ]
     7 * [ Description ]
    88 *
    99 */
     
    3535
    3636#ifdef VHDL_TESTBENCH
    37   private   : bool                  _test_exhaustive;
     37  private   : bool                       _test_exhaustive;
    3838  private   : std::list<uint32_t>      * _list_cycle   ;
    3939#endif
    4040
    41    // -----[ methods ]---------------------------------------------------
     41   // -----[ methods ]---------------------------------------------------
    4242  public    :                       Interface_fifo       (std::string         name       
    4343#ifdef POSITION
     
    107107  public    : bool                  testbench_transaction(void);
    108108  public    : void                  testbench_cycle      (void);
    109   public    : std::string           testbench_test       (Vhdl   * & vhdl        ,
    110                                                           std::string     counter_name,
    111                                                           std::string     reset_name  );
     109  public    : std::string           testbench_test       (Vhdl    * & vhdl        ,
     110                                                          std::string counter_name,
     111                                                          std::string reset_name  );
     112#ifdef VHDL_TESTBENCH_ASSERT
     113  public    : void                  testbench_assert     (Vhdl    * & vhdl        ,
     114                                                          std::string counter_name);
     115#endif
    112116
    113117  public    : std::string           testbench_test_transaction (Vhdl * & vhdl);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h

    r82 r88  
    2727  {
    2828    // -----[ fields ]----------------------------------------------------
    29   private   : const std::string               _name;
    30   private   : const Tusage_t             _usage;
    31   private   : std::list<Interface_fifo*>    * _list_interface;
     29  private   : const std::string            _name;
     30  private   : const Tusage_t               _usage;
     31  private   : std::list<Interface_fifo*> * _list_interface;
    3232
    3333    // -----[ methods ]---------------------------------------------------
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h

    r82 r88  
    99 */
    1010
    11 #include <stdint.h>
    12 #include <iostream>
    13 #include <math.h>
    14 #include "Behavioural/include/Environment.h"
     11#include "Common/include/Environment.h"
     12#include "Behavioural/include/Parameters_test.h"
    1513#include "Behavioural/include/Constants.h"
    1614#include "Behavioural/include/Test.h"
     
    1917#include "Common/include/Log2.h"
    2018#include "Common/include/Debug.h"
     19#include <stdint.h>
     20#include <iostream>
     21#include <math.h>
    2122
    2223namespace morpheo     {
    2324namespace behavioural {
     25 
     26#ifdef COPY
     27#error "Need COPY macro"
     28#endif
    2429
    25   template <typename T> bool test (uint32_t size)
    26   {
    27     return (size <= (8*sizeof(T)));
    28   };
    29 
    30   class Parameters_test
    31   {
    32   private   : std::string _component;
    33   protected : std::string _error;
    34   protected : std::string _warning;
    35   protected : std::string _information;
    36 
    37   public    : Parameters_test (std::string component)
    38     {
    39       _component = component;
    40       _error     = "";
    41       _warning   = "";
    42     };
    43   public    : ~Parameters_test (void) {};
    44 
    45   public    : bool        have_error  (void)            { return (_error.length() != 0);};
    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";}
    49   public    : std::string print       (void)            { return _error + _warning + _information;};
    50   };
     30#define COPY(param) do {duplicate(param); param->copy();} while (0)
    5131
    5232  // Virtual Class - Interface of each component
     
    5434  {
    5535    // -----[ fields ]----------------------------------------------------
    56   public   : static const uint32_t   _size_instruction            = 32;
    57   public   : static const uint32_t   _nb_operation                = MAX_OPERATION;
    58   public   : static const uint32_t   _nb_type                     = MAX_TYPE;
    59   public   : static const uint32_t   _size_operation              = SIZE_OPERATION;
    60   public   : static const uint32_t   _size_type                   = SIZE_TYPE;     
    61   public   : static const uint32_t   _size_exception              = SIZE_EXCEPTION;
    62   public   : static const uint32_t   _size_exception_use          = SIZE_EXCEPTION_USE;
    63   public   : static const uint32_t   _size_exception_memory       = SIZE_EXCEPTION_MEMORY;
    64   public   : static const uint32_t   _size_exception_custom       = SIZE_EXCEPTION_CUSTOM;
    65   public   : static const uint32_t   _size_exception_alu          = SIZE_EXCEPTION_ALU   ;
    66   public   : static const uint32_t   _size_exception_decod        = SIZE_EXCEPTION_DECOD ;
    67   public   : static const uint32_t   _size_exception_ifetch       = SIZE_EXCEPTION_IFETCH;
    68   public   : static const uint32_t   _size_icache_type            = SIZE_ICACHE_TYPE;
    69   public   : static const uint32_t   _size_icache_error           = SIZE_ICACHE_ERROR;
    70   public   : static const uint32_t   _size_dcache_type            = SIZE_DCACHE_TYPE;
    71   public   : static const uint32_t   _size_dcache_error           = SIZE_DCACHE_ERROR;
    72   public   : static const uint32_t   _nb_general_register_logic   = 32;
    73   public   : static const uint32_t   _nb_special_register_logic   = NB_SPR_LOGIC;
    74   public   : static const uint32_t   _size_general_register_logic = 5;
    75   public   : static const uint32_t   _size_special_register_logic = LOG2_NB_SPR_LOGIC;
    76   public   : static const uint32_t   _size_event_state            = SIZE_EVENT_STATE;
    77   public   : static const uint32_t   _size_event_type             = SIZE_EVENT_TYPE;
    78   public   : static const uint32_t   _size_branch_state           = SIZE_BRANCH_STATE;
    79   public   : static const uint32_t   _size_branch_condition       = SIZE_BRANCH_CONDITION;
     36  public   : static const uint32_t   _size_instruction              = 32;
     37  public   : static const uint32_t   _size_spr                      = 32;
     38  public   : static const uint32_t   _nb_operation                  = MAX_OPERATION;
     39  public   : static const uint32_t   _nb_type                       = MAX_TYPE;
     40  public   : static const uint32_t   _size_operation                = SIZE_OPERATION;
     41  public   : static const uint32_t   _size_type                     = SIZE_TYPE;     
     42  public   : static const uint32_t   _size_exception                = SIZE_EXCEPTION;
     43  public   : static const uint32_t   _size_exception_use            = SIZE_EXCEPTION_USE;
     44  public   : static const uint32_t   _size_exception_memory         = SIZE_EXCEPTION_MEMORY;
     45  public   : static const uint32_t   _size_exception_custom         = SIZE_EXCEPTION_CUSTOM;
     46  public   : static const uint32_t   _size_exception_alu            = SIZE_EXCEPTION_ALU   ;
     47  public   : static const uint32_t   _size_exception_decod          = SIZE_EXCEPTION_DECOD ;
     48  public   : static const uint32_t   _size_exception_ifetch         = SIZE_EXCEPTION_IFETCH;
     49  public   : static const uint32_t   _size_icache_type              = SIZE_ICACHE_TYPE;
     50  public   : static const uint32_t   _size_icache_error             = SIZE_ICACHE_ERROR;
     51  public   : static const uint32_t   _size_dcache_type              = SIZE_DCACHE_TYPE;
     52  public   : static const uint32_t   _size_dcache_error             = SIZE_DCACHE_ERROR;
     53  public   : static const uint32_t   _nb_general_register_logic     = 32;
     54  public   : static const uint32_t   _nb_special_register_logic     = NB_SPR_LOGIC;
     55  public   : static const uint32_t   _size_general_register_logic   = 5;
     56  public   : static const uint32_t   _size_special_register_logic   = LOG2_NB_SPR_LOGIC;
     57  public   : static const uint32_t   _size_special_address_group    = 5;
     58  public   : static const uint32_t   _size_special_address_register = 11;
     59  public   : static const uint32_t   _size_event_state              = SIZE_EVENT_STATE;
     60  public   : static const uint32_t   _size_event_type               = SIZE_EVENT_TYPE;
     61  public   : static const uint32_t   _size_branch_state             = SIZE_BRANCH_STATE;
     62  public   : static const uint32_t   _size_branch_condition         = SIZE_BRANCH_CONDITION;
     63
     64  public   : static const uint32_t   _shift_spr_num_group           = _size_special_address_register;
     65  public   : static const uint32_t   _mask_spr_num_group            = 0x1f ; //        1_1111
     66  public   : static const uint32_t   _mask_spr_num_reg              = 0x7ff; // 111_1111_1111
     67
     68    // simulation
     69  public  :               uint64_t   _simulation_nb_cyle                    ;
     70  public  :               uint64_t   _simulation_nb_instruction             ;
     71
     72    // parameters depends
     73  public   :              uint32_t   _size_context_id                       ;
     74  public   :              bool       _have_port_context_id                  ;
     75
     76  public   :              uint32_t   _size_front_end_id                     ;
     77  public   :              bool       _have_port_front_end_id                ;
     78
     79  public   :              uint32_t   _size_ooo_engine_id                    ;
     80  public   :              bool       _have_port_ooo_engine_id               ;
     81                         
     82  public   :              uint32_t   _size_instruction_address              ;
     83//public   :              bool       _have_port_instruction_address         ; // always true
     84
     85  public   :              uint32_t   _size_data_address                     ;
     86//public   :              bool       _have_port_data_address                ; // always true
     87
     88  public   :              uint32_t   _size_nb_inst_decod                    ;
     89//public   :              bool       _have_port_nb_inst_decod               ; // always true
     90
     91  public   :              uint32_t   _size_nb_inst_commit                   ;
     92//public   :              bool       _have_port_nb_inst_commit              ; // always true
     93                         
     94  public   :              uint32_t   _size_depth                            ;
     95  public   :              bool       _have_port_depth                       ;
     96                         
     97  public   :              uint32_t   _size_ifetch_queue_ptr                 ;
     98  public   :              bool       _have_port_ifetch_queue_ptr            ;
     99                         
     100  public   :              uint32_t   _size_inst_ifetch_ptr                  ; // nb_inst_fetch
     101  public   :              bool       _have_port_inst_ifetch_ptr             ;
     102                         
     103//public   :              uint32_t   _size_branch_update_prediction_id      ; // = size_depth
     104//public   :              bool       _have_port_branch_update_prediction_id ; // = size_depth
     105
     106  public   :              uint32_t   _size_rob_ptr                          ;
     107  public   :              bool       _have_port_rob_ptr                     ;
     108
     109  public   :              uint32_t   _size_load_queue_ptr                   ;
     110  public   :              bool       _have_port_load_queue_ptr              ;
     111
     112  public   :              uint32_t   _size_store_queue_ptr                  ;
     113//public   :              bool       _have_port_store_queue_ptr             ; // always true (min = 1)
     114
     115  public   :              uint32_t   _size_general_data                     ;
     116//public   :              bool       _have_port_general_data                ; // always true
     117                         
     118  public   :              uint32_t   _size_special_data                     ;
     119//public   :              bool       _have_port_special_data                ; // always true
     120 
     121  public   :              uint32_t   _size_general_register                 ;
     122//public   :              bool       _have_port_general_register            ; // always true
     123
     124  public   :              uint32_t   _size_special_register                 ;
     125//public   :              bool       _have_port_special_register            ; // always true
    80126
    81127    // -----[ methods ]---------------------------------------------------
     
    87133  public   : virtual Parameters_test    msg_error   (void) = 0;
    88134
    89     // methods to generate configuration file
    90    
     135    // methods to copy depends parameters
     136    // (these parameters can't be static : because can have multi instance of toplevel)
     137  public   : virtual void               copy        (void) = 0;
     138//public   :         void               copy        (Parameters * param);
     139  public   :         void               duplicate   (Parameters * param);
     140
    91141    // methods to test
    92142  public   :         void               test        (void);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/SPR_access_mode.h

    r81 r88  
    1010namespace behavioural {
    1111
    12   typedef struct
     12  class spr_address_t
    1313  {
    14     Tgeneral_data_t _group;
    15     Tgeneral_data_t _register;
    16   } spr_address_t;
     14  public : Tgeneral_data_t _group;
     15  public : Tgeneral_data_t _register;
    1716
     17  public : spr_address_t (void) {};
     18  public : spr_address_t (Tgeneral_data_t grp,
     19                          Tgeneral_data_t reg)
     20    {
     21      _group    = grp;
     22      _register = reg;
     23    };
     24  };
    1825
    1926  class SPR_access_mode
    2027  {
    21   private : spr_access_mode_t   ** _spr_generic;
    22   private : uint32_t             * _max_register_by_group;
     28  private : spr_access_mode_t   ** _spr_generic          ; //[NB_GROUP][NB_REG_GROUP]
     29  private : uint32_t             * _max_register_by_group; //[NB_GROUP]
    2330
    2431  public  : SPR_access_mode();
     
    2936  public  : bool          valid (uint32_t num_group, uint32_t num_reg);
    3037  public  : bool          valid (spr_address_t address);
     38  public  : bool          exist (uint32_t num_group, uint32_t num_reg);
     39  public  : bool          exist (spr_address_t address);
    3140  public  : bool          read  (spr_address_t address, Tcontrol_t SM, Tcontrol_t SUMRA);
    3241  public  : bool          write (spr_address_t address, Tcontrol_t SM, Tcontrol_t SUMRA);
     
    3544  public  : uint32_t      implement_group (uint32_t num_group);
    3645  public  : void          change_mode     (uint32_t num_group, uint32_t num_reg, spr_access_mode_t new_mode);
     46  public  : void          invalid_register(uint32_t num_group, uint32_t num_reg);
     47
    3748  };
    3849 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h

    r82 r88  
    3838                UINT64_T                   } type_info_t;
    3939
    40   typedef enum {PORT_VHDL_YES_TESTBENCH_YES,
     40  typedef enum {PORT_SYSTEMC_NO            , // also, vhdl_no and testbench_no
     41                PORT_VHDL_YES_TESTBENCH_YES,
    4142                PORT_VHDL_YES_TESTBENCH_NO ,
    4243                PORT_VHDL_NO_TESTBENCH_YES ,
     
    7273
    7374    // -----[ methods ]---------------------------------------------------
    74   public    :                   Signal          (std::string          name          ,
    75                                                  direction_t     direction     ,
    76                                                  uint32_t        size          ,
    77                                                  presence_port_t presence_port = PORT_VHDL_YES_TESTBENCH_YES);
    78   public    :                   Signal          (const Signal &);
    79   public    :                   ~Signal         ();
     75  public    :                   Signal                  (std::string     name          ,
     76                                                         direction_t     direction     ,
     77                                                         uint32_t        size          ,
     78                                                         presence_port_t presence_port = PORT_VHDL_YES_TESTBENCH_YES);
     79  public    :                   Signal                  (const Signal &);
     80  public    :                   ~Signal                 ();
    8081
    8182  public    : std::string       get_name                (void);
     
    9394
    9495  public    : bool              test_map                (uint32_t depth, bool top_level, bool is_behavioural);
    95 //   public    : bool              test_equi               (uint32_t depth);
     96//public    : bool              test_equi               (uint32_t depth);
    9697
    9798  public    : void              link                    (Signal * signal_dest,
     
    108109        case IN  : {return read_in  <T>();}
    109110        case OUT : {return read_out <T>();}
    110         default  : throw (ErrorMorpheo ("Signal \""+_name+"\" : direction unknow."));
     111        default  : throw (ErrorMorpheo ("Signal \""+_name+"\" : direction unknow.\n"));
    111112        }
    112113    }
     
    122123        case UINT32_T : return (static_cast<sc_in  <uint32_t> *>(_sc_signal_map)->read());
    123124        case UINT64_T : return (static_cast<sc_in  <uint64_t> *>(_sc_signal_map)->read());
    124         default       : throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow."));
     125        default       : throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.\n"));
    125126        }
    126127    }
     
    136137        case UINT32_T : return (static_cast<sc_out <uint32_t> *>(_sc_signal_map)->read());
    137138        case UINT64_T : return (static_cast<sc_out <uint64_t> *>(_sc_signal_map)->read());
    138         default       : throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow."));
     139        default       : throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.\n"));
    139140        }
    140141    }
     
    148149
    149150      if (_type_info != UNKNOW)
    150         throw (ErrorMorpheo ("Signal \""+_name+"\" : already allocate."));
     151        throw (ErrorMorpheo (toString(_("Signal \"%s\" : already allocate.\n"),_name.c_str())));
    151152
    152153      if (test<T>(_size) == false)
    153         throw (ErrorMorpheo ("Signal \""+_name+"\" : size is too small to the associate type."));
     154        throw (ErrorMorpheo (toString(_("Signal \"%s\" : size is too small (%d bits) to the associate type (%d bits).\n"),_name.c_str(),_size,8*sizeof(T))));
    154155
    155156      _is_allocate    = true;
     
    157158      _sc_signal_map  = sc_signal;
    158159
    159       log_printf(TRACE,Behavioural,FUNCTION, "Allocation of %s - %.8x", _name.c_str(), (uint32_t)(_sc_signal_map));
    160 
    161160      if (typeid(T) == typeid(bool    ))
    162161        _type_info = BOOL;
     
    175174      else
    176175        _type_info = UNKNOW;
     176
     177      log_printf(TRACE,Behavioural,FUNCTION, "Allocation of %s (%s, 0x%.8x)", _name.c_str(),toString(_type_info).c_str(), static_cast<uint32_t>(reinterpret_cast<uint64_t>(_sc_signal_map)));
    177178
    178179      log_printf(FUNC,Behavioural,FUNCTION,"End");
     
    204205  };
    205206}; // end namespace behavioural         
     207
     208
     209
    206210
    207211  template<>           inline std::string toString<morpheo::behavioural::presence_port_t>(const morpheo::behavioural::presence_port_t& x)
     
    221225  }
    222226
     227  typedef enum {UNKNOW                     ,
     228                BOOL                       ,
     229                UINT8_T                    ,
     230                UINT16_T                   ,
     231                UINT32_T                   ,
     232                UINT64_T                   } type_info_t;
     233
     234  template<>           inline std::string toString<morpheo::behavioural::type_info_t>(const morpheo::behavioural::type_info_t& x)
     235  {
     236    switch (x)
     237      {
     238      case morpheo::behavioural::BOOL     : return "bool"    ; break;
     239      case morpheo::behavioural::UINT8_T  : return "uint8_t" ; break;
     240      case morpheo::behavioural::UINT16_T : return "uint16_t"; break;
     241      case morpheo::behavioural::UINT32_T : return "uint32_t"; break;
     242      case morpheo::behavioural::UINT64_T : return "uint64_t"; break;
     243      case morpheo::behavioural::UNKNOW   :
     244      default                             : return "unknow"  ; break;
     245      }
     246  }
     247
    223248}; // end namespace morpheo             
    224249
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Stat.h

    r84 r88  
    4444    class Stat
    4545    {
    46       const std::string              _name_instance;
    47       const std::string              _name_component;
    48       const cycle_t                  _nb_cycle_before_begin;
    49       const cycle_t                  _period;
    50       const bool                     _save_periodic;
     46    private: const std::string              _name_instance;
     47    private: const std::string              _name_component;
     48    private: const cycle_t                  _nb_cycle_before_begin;
     49    private: const cycle_t                  _period;
     50    private: const bool                     _save_periodic;
    5151      // Tableau des variables
    52       std::map<std::string, var_t> * _list_operand;
     52    private: std::map<std::string, var_t> * _list_operand;
    5353      // Liste chaîné des expressions
    54       std::list<expr_t>            * _list_expr;
     54    private: std::list<expr_t>            * _list_expr;
    5555
    56       counter_t                    * _cycle;
     56    private: counter_t                    * _cycle;
    5757
    58       std::list<Stat *>            * _list_stat;
     58    private: std::list<Stat *>            * _list_stat;
    5959
    60       bool                           _generate_file;
     60    private: bool                           _generate_file;
    6161
    6262    public :                     Stat                         (std::string name_instance,
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Stat_binary_tree.h

    r81 r88  
    1414namespace behavioural {
    1515
    16   typedef enum {VARIABLE, CONSTANT, OPERATOR_UNARY, OPERATOR_BINARY} data_type_t;
     16  typedef enum {NONE, VARIABLE, CONSTANT, OPERATOR_UNARY, OPERATOR_BINARY} data_type_t;
    1717
    1818  typedef union
     
    2626  {
    2727    // arbre binaire
    28     private : Stat_binary_tree * _root;
    29     private : Stat_binary_tree * _left;
    30     private : Stat_binary_tree * _right;
    31     private : data_type_t        _data_type;
    32     private : data_t             _data;
     28  private : Stat_binary_tree * _root;
     29  private : Stat_binary_tree * _left;
     30  private : Stat_binary_tree * _right;
     31  private : data_type_t        _data_type;
     32  private : data_t             _data;
    3333   
    3434    /*     private :  Stat_binary_tree (data_type_t data_type, data_t data); */
    35     public  :  Stat_binary_tree (counter_t   cst);
    36     public  :  Stat_binary_tree (counter_t * var);
    37     public  :  Stat_binary_tree (operator_t  op );
    38  
    39     public  : ~Stat_binary_tree (void);
     35  public  :  Stat_binary_tree (std::string expr,
     36                               std::map<std::string, counter_t*> * operand);
     37  public  :  Stat_binary_tree (counter_t   cst);
     38  public  :  Stat_binary_tree (counter_t * var);
     39  public  :  Stat_binary_tree (operator_t  op );
    4040   
    41     private : void               insert_tree (Stat_binary_tree * tree);
    42     public  : Stat_binary_tree * insert_tree (counter_t   cst);
    43     public  : Stat_binary_tree * insert_tree (counter_t * var);
    44     public  : Stat_binary_tree * insert_tree (operator_t  op );
     41  public  : ~Stat_binary_tree (void);
     42   
     43  private : void               insert_tree (Stat_binary_tree * tree);
     44  public  : Stat_binary_tree * insert_tree (counter_t   cst);
     45  public  : Stat_binary_tree * insert_tree (counter_t * var);
     46  public  : Stat_binary_tree * insert_tree (operator_t  op );
    4547
    46     public  : Stat_binary_tree * goto_top_level (void);
    47     public  : Stat_binary_tree * goto_next_root (void);
     48  private : void               change_type (counter_t   cst);
     49  private : void               change_type (counter_t * var);
     50  private : void               change_type (operator_t  op );
     51   
     52  public  : Stat_binary_tree * goto_top_level (void);
     53  public  : Stat_binary_tree * goto_next_root (void);
    4854
    49     public  : bool      valid    (void);
     55  public  : bool               valid    (void);
    5056
    51     public  : counter_t eval     (void);
     57  public  : counter_t          eval     (void);
    5258
    53     private : counter_t val_tree (void);
    54     private : counter_t val_leaf (void);
    55     private : bool      is_leaf  (void);
     59  private : counter_t          val_tree (void);
     60  private : counter_t          val_leaf (void);
     61  private : bool               is_leaf  (void);
     62
     63  public  : void               import   (std::string expr,
     64                                         std::map<std::string, counter_t*> * operand);
     65
     66
     67  public  : void               print    (uint32_t depth=0);
    5668
    5769//     public  : friend std::ostream& operator<< (std::ostream&, const morpheo::Stat_binary_tree &);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Types.h

    r81 r88  
    2525  typedef uint8_t            Tcounter_t; // universal counter
    2626  typedef uint8_t            Tptr_t;     // universal pointer
    27                              
     27  typedef uint32_t           Tspr_t;
     28  typedef uint16_t           Tspr_address_t;
     29
    2830//typedef uint32_t           Tdestination1_t;
    2931//typedef uint32_t           Tdestination2_t;
     
    6971  typedef enum
    7072    {
     73      ORBIS32,
     74      ORBIS64,
     75      ORFPX32,
     76      ORFPX64,
     77      ORVDX64
     78    } ISA;
     79
     80  typedef enum
     81    {
    7182      PRIORITY_STATIC,
    7283      PRIORITY_ROUND_ROBIN
     
    93104      PREDICTOR_NEVER_TAKE      , // Branch is never  Take
    94105      PREDICTOR_ALWAYS_TAKE     , // Branch is always Take
    95       PREDICTOR_STATIC          , // If the adress of destination is previous, then the branch is take
     106      PREDICTOR_STATIC          , // If the address of destination is previous, then the branch is take
    96107      PREDICTOR_LAST_TAKE       , // The direction is as the last time (if is the first time : static)
    97108      PREDICTOR_COUNTER         , // Counter table
     
    99110      PREDICTOR_GLOBAL          , // Counter bank indexed with history table
    100111      PREDICTOR_META            , // A meta_predictor choose between 2 predictor : the local or the global
    101       PREDICTOR_CUSTOM            // Note predefined scheme
     112      PREDICTOR_CUSTOM            // Not predefined scheme
    102113    } Tpredictor_t;
     114
     115  //--------------------------------------------------[ instruction ]-----
     116  class instruction_t
     117  {
     118  public :
     119    Ttype_t      _type      ;
     120    Toperation_t _operation ;
     121    ISA          _isa_subset;
     122    uint8_t      _isa_class ;
     123
     124    instruction_t (Ttype_t      type      ,
     125                   Toperation_t operation ,
     126                   ISA          isa_subset,
     127                   uint8_t      isa_class )
     128    {
     129      _type       = type      ;
     130      _operation  = operation ;
     131      _isa_subset = isa_subset;
     132      _isa_class  = isa_class ;
     133    }
     134  };
     135
     136  instruction_t instruction_information (uint32_t instruction);
     137  uint32_t      instruction_size_data   (uint32_t instruction);
    103138
    104139  //----------------------------------------------[ spr_mode_access ]-----
     
    122157    switch (x)
    123158      {
    124       case TYPE_ALU     : return "ALU"    ; break;
    125       case TYPE_SHIFT   : return "SHIFT"  ; break;
    126       case TYPE_MOVE    : return "MOVE"   ; break;
    127       case TYPE_TEST    : return "TEST"   ; break;
    128       case TYPE_MUL_DIV : return "MUL_DIV"; break;
    129       case TYPE_EXTEND  : return "EXTEND" ; break;
    130       case TYPE_FIND    : return "FIND"   ; break;
    131       case TYPE_SPECIAL : return "SPECIAL"; break;
    132       case TYPE_CUSTOM  : return "CUSTOM" ; break;
    133       case TYPE_BRANCH  : return "BRANCH" ; break;
    134       case TYPE_MEMORY  : return "MEMORY" ; break;
    135       default           : return ""       ; break;
     159      case TYPE_ALU     : return "ALU"        ; break;
     160      case TYPE_SHIFT   : return "SHIFT"      ; break;
     161      case TYPE_MOVE    : return "MOVE"       ; break;
     162      case TYPE_TEST    : return "TEST"       ; break;
     163      case TYPE_MUL     : return "MUL"        ; break;
     164      case TYPE_DIV     : return "DIV"        ; break;
     165      case TYPE_EXTEND  : return "EXTEND"     ; break;
     166      case TYPE_FIND    : return "FIND"       ; break;
     167      case TYPE_SPECIAL : return "SPECIAL"    ; break;
     168      case TYPE_CUSTOM  : return "CUSTOM"     ; break;
     169      case TYPE_BRANCH  : return "BRANCH"     ; break;
     170      case TYPE_MEMORY  : return "MEMORY"     ; break;
     171      default           : return "Unknow type"; break;
    136172      }
    137173  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Usage.h

    r81 r88  
    1616#  define USE_STATISTICS            0x20
    1717#  define USE_INFORMATION           0x40
     18#  define USE_HEADER                0x80
    1819//#define USE_                      0x80
    1920
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h

    r87 r88  
    1010#define MORPHEO_MAJOR_VERSION 0
    1111#define MORPHEO_MINOR_VERSION 2
    12 #define MORPHEO_REVISION      87
     12#define MORPHEO_REVISION      @REVISION
     13#define MORPHEO_CODENAME      "Castor"
     14
     15#define MORPHEO_DATE_DAY      @DATE_DAY 
     16#define MORPHEO_DATE_MONTH    @DATE_MONTH
     17#define MORPHEO_DATE_YEAR     @DATE_YEAR
    1318
    1419#define MORPHEO_VERSION       morpheo::toString(MORPHEO_MAJOR_VERSION)+"."+morpheo::toString(MORPHEO_MINOR_VERSION)+"."+morpheo::toString(MORPHEO_REVISION)
     20#define MORPHEO_HEADER        morpheo::toString(MORPHEO_VERSION)+" - "+morpheo::toString(MORPHEO_CODENAME)
     21#define MORPHEO_DATE          morpheo::toString(MORPHEO_DATE_YEAR)+"/"+morpheo::toString(MORPHEO_DATE_MONTH)+"/"+morpheo::toString(MORPHEO_DATE_DAY)
    1522
    1623/*
    17  
    1824 [ Change Log ]
    1925 |
     
    2228   | SystemC Only
    2329   |
    24    +-[ Minor Version 1 ]
     30   +-[ Minor Version 1 ] - Castor
    2531   | |
    2632   | | Second Architecture, change the load_store_unit and implement exception
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h.sed

    r85 r88  
    1111#define MORPHEO_MINOR_VERSION 2
    1212#define MORPHEO_REVISION      @REVISION
     13#define MORPHEO_CODENAME      "Castor"
     14
     15#define MORPHEO_DATE_DAY      @DATE_DAY 
     16#define MORPHEO_DATE_MONTH    @DATE_MONTH
     17#define MORPHEO_DATE_YEAR     @DATE_YEAR
    1318
    1419#define MORPHEO_VERSION       morpheo::toString(MORPHEO_MAJOR_VERSION)+"."+morpheo::toString(MORPHEO_MINOR_VERSION)+"."+morpheo::toString(MORPHEO_REVISION)
     20#define MORPHEO_HEADER        morpheo::toString(MORPHEO_VERSION)+" - "+morpheo::toString(MORPHEO_CODENAME)
     21#define MORPHEO_DATE          morpheo::toString(MORPHEO_DATE_YEAR)+"/"+morpheo::toString(MORPHEO_DATE_MONTH)+"/"+morpheo::toString(MORPHEO_DATE_DAY)
    1522
    1623/*
    17  
    1824 [ Change Log ]
    1925 |
     
    2228   | SystemC Only
    2329   |
    24    +-[ Minor Version 1 ]
     30   +-[ Minor Version 1 ] - Castor
    2531   | |
    2632   | | Second Architecture, change the load_store_unit and implement exception
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl.h

    r81 r88  
    1414#include <iostream>
    1515#include <list>
    16 #include "Behavioural/include/Environment.h"
     16#include "Common/include/Environment.h"
    1717#include "Behavioural/include/Direction.h"
    1818#include "Common/include/ToString.h"
     
    5353    private   : void             generate_file_package       (void);
    5454    private   : void             generate_file_model         (void);
    55 
    56     private   : std::string           get_package                 (uint32_t    depth                 ,
    57                                                                    std::string      filename              ,
    58                                                                    std::string      package_name          ,
    59                                                                    std::string      entity_name           );
    60     private   : std::string           get_model                   (uint32_t    depth                 ,
    61                                                                    std::string      filename              ,
    62                                                                    std::string      entity_name           ,
    63                                                                    std::string      architecture_name     );
    64     private   : std::string           get_header                  (uint32_t    depth                 ,
    65                                                                    std::string      filename              );
    66     private   : std::string           get_entity                  (uint32_t    depth                 ,
    67                                                                    std::string      name                  );
    68     private   : std::string           get_architecture            (uint32_t    depth                 ,
    69                                                                    std::string      name                  ,
    70                                                                    std::string      entity_name           );
    71     private   : std::string           get_component               (uint32_t    depth                 ,
    72                                                                    std::string      name                  );
    73 
    74     private   : std::string           get_port                    (uint32_t    depth                 );
    75     public    : void             set_port                    (std::string      name                  ,
     55     
     56    private   : std::string      get_package                 (uint32_t    depth                 ,
     57                                                              std::string filename              ,
     58                                                              std::string package_name          ,
     59                                                              std::string entity_name           );
     60    private   : std::string      get_model                   (uint32_t    depth                 ,
     61                                                              std::string filename              ,
     62                                                              std::string entity_name           ,
     63                                                              std::string architecture_name     );
     64    private   : std::string      get_header                  (uint32_t    depth                 ,
     65                                                              std::string filename              );
     66    private   : std::string      get_entity                  (uint32_t    depth                 ,
     67                                                              std::string name                  );
     68    private   : std::string      get_architecture            (uint32_t    depth                 ,
     69                                                              std::string name                  ,
     70                                                              std::string entity_name           );
     71    private   : std::string      get_component               (uint32_t    depth                 ,
     72                                                              std::string name                  );
     73     
     74    private   : std::string      get_port                    (uint32_t    depth                 );
     75    public    : void             set_port                    (std::string name                  ,
    7676                                                              direction_t direction             ,
    77                                                               std::string      type                  );
    78     public    : void             set_port                    (std::string      name                  ,
     77                                                              std::string type                  );
     78    public    : void             set_port                    (std::string name                  ,
    7979                                                              direction_t direction             ,
    8080                                                              uint32_t    size                  );
    81     private   : std::string           get_signal                  (uint32_t    depth                 );
    82     public    : void             set_signal                  (std::string      name                  ,
    83                                                               std::string      type                  );
    84     public    : void             set_signal                  (std::string      name                  ,
     81    private   : std::string      get_signal                  (uint32_t    depth                 );
     82    public    : void             set_signal                  (std::string name                  ,
     83                                                              std::string type                  );
     84    public    : void             set_signal                  (std::string name                  ,
    8585                                                              uint32_t    signal                );
    86     public    : void             set_signal                  (std::string      name                  ,
    87                                                               std::string      type                  ,
    88                                                               std::string      init                  );
    89     public    : void             set_signal                  (std::string      name                  ,
     86    public    : void             set_signal                  (std::string name                  ,
     87                                                              std::string type                  ,
     88                                                              std::string init                  );
     89    public    : void             set_signal                  (std::string name                  ,
    9090                                                              uint32_t    size                  ,
    91                                                               std::string      init                  );
    92     public    : void             set_signal                  (std::string      name                  ,
     91                                                              std::string init                  );
     92    public    : void             set_signal                  (std::string name                  ,
    9393                                                              uint32_t    size                  ,
    9494                                                              uint32_t    init                  );
    95     public    : void             set_constant                (std::string      name                  ,
    96                                                               std::string      type                  ,
    97                                                               std::string      init                  );
    98     public    : void             set_constant                (std::string      name                  ,
     95    public    : void             set_constant                (std::string name                  ,
     96                                                              std::string type                  ,
     97                                                              std::string init                  );
     98    public    : void             set_constant                (std::string name                  ,
    9999                                                              uint32_t    size                  ,
    100                                                               std::string      init                  );
    101     public    : void             set_constant                (std::string      name                  ,
     100                                                              std::string init                  );
     101    public    : void             set_constant                (std::string name                  ,
    102102                                                              uint32_t    size                  ,
    103103                                                              uint32_t    init                  );
    104104
    105     private   : std::string           get_type                    (uint32_t    depth                 );
    106     public    : void             set_type                    (std::string      name                  ,
    107                                                               std::string      type                  );
    108     private   : std::string           get_alias                   (uint32_t    depth                 );
    109     public    : void             set_alias                   (std::string      name1                 ,
    110                                                               std::string      type1                 ,
    111                                                               std::string      name2                 ,
    112                                                               std::string      range2                );
    113     public    : void             set_alias                   (std::string      name1                 ,
     105    private   : std::string      get_type                    (uint32_t    depth                 );
     106    public    : void             set_type                    (std::string name                  ,
     107                                                              std::string type                  );
     108    private   : std::string      get_alias                   (uint32_t    depth                 );
     109    public    : void             set_alias                   (std::string name1                 ,
     110                                                              std::string type1                 ,
     111                                                              std::string name2                 ,
     112                                                              std::string range2                );
     113    public    : void             set_alias                   (std::string name1                 ,
    114114                                                              uint32_t    size1                 ,
    115                                                               std::string      name2                 ,
    116                                                               std::string      range2                );
     115                                                              std::string name2                 ,
     116                                                              std::string range2                );
     117     
     118    public    : std::string      get_list                    (std::list<std::string> liste      ,
     119                                                              uint32_t     depth                ,
     120                                                              std::string  separator            ,
     121                                                              bool         last_separator       );
     122    public    : void             set_list                    (std::list<std::string> & liste    ,
     123                                                              std::string  text                 );
    117124
    118     public    : std::string           get_list                    (std::list<std::string> liste                ,
    119                                                                    uint32_t     depth                ,
    120                                                                    std::string       separator            ,
    121                                                                    bool         last_separator       );
    122     public    : void             set_list                    (std::list<std::string> & liste              ,
    123                                                               std::string         text               );
     125    private   : std::string      get_body                    (uint32_t     depth                );
     126    public    : void             set_body                    (std::string  text                 );
     127                                                                                               
     128    public    : void             set_body                    (Vhdl *       vhdl                 );
     129                                                                                               
     130    public    : void             set_body_component          (std::string  name_instance        ,
     131                                                              std::string  name_component       ,
     132                                                              std::list<std::string>   list_port_map);
     133    public    : void             set_body_component_port_map (std::list<std::string> & list_port_map,
     134                                                              std::string  name_port            ,
     135                                                              uint32_t     size_port            ,
     136                                                              std::string  name_signal          ,
     137                                                              uint32_t     size_signal          );
    124138
    125     private   : std::string           get_body                    (uint32_t       depth              );
    126     public    : void             set_body                    (std::string         text               );
     139    private   : std::string      get_library_ieee            (uint32_t     depth                );
     140    private   : std::string      get_library_work            (uint32_t     depth                );
     141    public    : void             set_library_work            (std::string  package_name         );
    127142
    128     public    : void        set_body_component          (std::string         name_instance      ,
    129                                                          std::string         name_component     ,
    130                                                          std::list<std::string>   list_port_map      );
    131     public    : void        set_body_component_port_map (std::list<std::string> & list_port_map      ,
    132                                                          std::string         name_port          ,
    133                                                          uint32_t       size_port          ,
    134                                                          std::string         name_signal        ,
    135                                                          uint32_t       size_signal        );
    136 
    137     private   : std::string get_library_ieee            (uint32_t    depth                 );
    138     private   : std::string get_library_work            (uint32_t    depth                 );
    139     public    : void        set_library_work            (std::string      package_name          );
    140 
    141     private   : std::string direction_toString          (direction_t direction);
     143    private   : std::string      direction_toString          (direction_t  direction            );
    142144    };
    143145
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/include/XML.h

    r81 r88  
    4040  public   : bool             singleton_end       (void);
    4141  public   : bool             attribut            (std::string name, std::string value);
    42   public   : bool             insert_XML          (XML    xml );
     42  public   : bool             insert_XML          (XML    xml, uint32_t offset_depth=0);
    4343
    4444  public   : void             filename_extension  (std::string extension);
    45   public   : void             generate_file       (void);
    46   public   : void             generate_file       (std::string encoding);
    47   public   : std::string           get_body            (void);
    48   public   : std::string           get_body            (uint32_t depth);
     45  public   : void             generate_file       (std::string dirname, std::string encoding);
     46  public   : void             generate_file       (std::string dirname=".");
     47  public   : std::string      get_body            (void);
     48  public   : std::string      get_body            (uint32_t depth);
    4949
    5050  public   : bool             comment             (std::string text);
    5151  public   : bool             text                (std::string text);
    5252                                                 
    53   private  : std::string           indent              (uint32_t depth );
    54   private  : std::string           indent              (void);
     53  private  : std::string      indent              (uint32_t depth );
     54  private  : std::string      indent              (void);
    5555  private  : uint32_t         depth               (void);
    5656                                                 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_generate_file.cpp

    r81 r88  
    88
    99#include "Behavioural/include/Component.h"
     10#include "Common/include/Environment.h"
    1011
    1112namespace morpheo              {
    1213namespace behavioural          {
    1314
     15#undef  FUNCTION
     16#define FUNCTION "Component::generate_file"
    1417  void Component::generate_file (void)
    1518  {
     
    1821    try
    1922      {
     23        directory();
     24
    2025        XML xml = toXML();
    2126
    22         xml.filename_extension ("pos");
     27        xml.filename_extension (".pos");
    2328       
    24         xml.generate_file("ISO-8859-1");
     29        xml.generate_file(MORPHEO_POSITION,"ISO-8859-1");
    2530
    2631      }
    2732    catch (ErrorMorpheo e)
    2833      {
    29         throw (ErrorMorpheo ("Component \""+_entity->get_name()+"\" have a bad mapping : "+e.what()));
     34        throw ERRORMORPHEO(FUNCTION,toString(_("Component \"%s\" have a bad mapping : %s\n")),_entity->get_name().c_str(),e.what().c_str());
    3035      }
    3136
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp

    r82 r88  
    2020    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    2121
    22 //     log_printf(NONE,Behavioural,FUNCTION,"Map %s.%s with %s.%s",
     22//     log_printf(INFO,Behavioural,FUNCTION,"Map %s.%s with %s.%s",
    2323//             component_src.c_str(),
    2424//             port_src.c_str(),
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_test_map.cpp

    r82 r88  
    1515  bool Component::test_map (bool recursive)
    1616  {
    17     log_printf(NONE,Behavioural,FUNCTION, "Test port map and interface.");
     17    log_printf(INFO,Behavioural,FUNCTION, "Test port map and interface.");
    1818    return test_map (0, recursive);
    1919  }
     
    2323    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    2424
    25     std::string tab  = std::string(depth,'\t');
     25    std::string tab  = std::string(depth,' ');
    2626    std::string name = _entity->get_name();
    2727    bool test_ok = true;
     
    3030    if (is_behavioural)
    3131      {
    32         log_printf(NONE,Behavioural,FUNCTION, "%s* Component \"%s\" is a behavioural description",tab.c_str(),name.c_str());
     32        log_printf(INFO,Interface,FUNCTION, "%s* Component \"%s\" is a behavioural description",tab.c_str(),name.c_str());
    3333      }
    3434    else
    3535      {
    36         log_printf(NONE,Behavioural,FUNCTION, "%s* Component \"%s\" is a structural description",tab.c_str(),name.c_str());
     36        log_printf(INFO,Interface,FUNCTION, "%s* Component \"%s\" is a structural description",tab.c_str(),name.c_str());
    3737      }
    3838
    3939   
    40     //  log_printf(NONE,Behavioural,FUNCTION, "%s* Test port I/O",tab.c_str());
     40    //  log_printf(INFO,Behavioural,FUNCTION, "%s* Test port I/O",tab.c_str());
    4141   
    4242    test_ok &= _entity->test_map(depth+1,true,is_behavioural);
    4343   
    44     //  log_printf(NONE,Behavioural,FUNCTION, "%s* Test all internal component",tab.c_str());
     44    //  log_printf(INFO,Behavioural,FUNCTION, "%s* Test all internal component",tab.c_str());
    4545       
    4646    for (std::list<Tcomponent_t *>::iterator i= _list_component->begin();
     
    7272//   bool Component::test_equi (bool recursive)
    7373//   {
    74 //     log_printf(NONE,Behavioural,FUNCTION, "Test port equi and interface.");
     74//     log_printf(INFO,Behavioural,FUNCTION, "Test port equi and interface.");
    7575//     return test_equi (0, recursive);
    7676//   }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_test_map.cpp

    r82 r88  
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1919 
    20     std::string tab  = std::string(depth,'\t');
    21     log_printf(NONE,Behavioural,FUNCTION, "%s* Entity \"%s\"",tab.c_str(),_name.c_str());
     20    std::string tab  = std::string(depth,' ');
     21    log_printf(INFO,Interface,FUNCTION,"%s* Entity \"%s\"",tab.c_str(),_name.c_str());
    2222 
    2323    bool _return = _interfaces->test_map(depth+1,top_level, is_behavioural);
     
    4242 
    4343//     std::string tab  = std::string(depth,'\t');
    44 //     log_printf(NONE,Behavioural,FUNCTION, "%s* Entity \"%s\"",tab.c_str(),_name.c_str());
     44//     log_printf(INFO,Behavioural,FUNCTION, "%s* Entity \"%s\"",tab.c_str(),_name.c_str());
    4545 
    4646//     bool _return = _interfaces->test_equi(depth+1);
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_test.cpp

    r81 r88  
    1313
    1414  std::string Interface_fifo::testbench_test (Vhdl * & vhdl,
    15                                         std::string   counter_name,
    16                                         std::string   reset_name  )
     15                                              std::string   counter_name,
     16                                              std::string   reset_name  )
    1717  {
    1818    log_printf(FUNC,Behavioural,"testbench_test","Begin");
     
    2727        vhdl->set_body("");
    2828
    29                test_name        = testbench_test_name        (vhdl);
     29                    test_name        = testbench_test_name        (vhdl);
    3030        std::string test_name_tmp    = test_name+"_tmp";
    3131        std::string test_name_ok     = testbench_test_ok          (vhdl);
     
    5454        vhdl->set_body(test_name + " <= '1' when ("+reset_name+" = '0') else "+test_name_tmp+";");
    5555
    56 #ifdef VHDL_TESTBENCH_ASSERT
    57         if (_list_cycle->empty()== false)
    58           {
    59             vhdl->set_body("");
    60             vhdl->set_body("-- Assert ...");
    61             vhdl->set_body("");
     56// #ifdef VHDL_TESTBENCH_ASSERT
     57//      if (_list_cycle->empty()== false)
     58//        {
     59//          vhdl->set_body("");
     60//          vhdl->set_body("-- Assert ...");
     61//          vhdl->set_body("");
    6262
    63             uint32_t                 j = 0;
    64             std::list<uint32_t>::iterator i = _list_cycle->begin();
     63//          uint32_t                 j = 0;
     64//          std::list<uint32_t>::iterator i = _list_cycle->begin();
    6565           
    66             while (i != _list_cycle->end())
    67               {
    68                 vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '1')) report \"***** <"+_name+"> Test number "+toString(j)+" is OK     *****\" severity NOTE;");
    69                 vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '0')) report \"@@@@@ <"+_name+"> Test number "+toString(j)+" is KO !!! @@@@@\" severity NOTE;");
    70                 j++;
    71                 ++i;
    72               }
     66//          while (i != _list_cycle->end())
     67//            {
     68//              vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '1')) report \"***** <"+_name+"> Test number "+toString(j)+" is OK     *****\" severity NOTE;");
     69//              vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '0')) report \"@@@@@ <"+_name+"> Test number "+toString(j)+" is KO !!! @@@@@\" severity NOTE;");
     70//              j++;
     71//              ++i;
     72//            }
    7373
    74             vhdl->set_body("");
    75           }
    76 #endif
     74//          vhdl->set_body("");
     75//        }
     76// #endif
    7777      }
    7878
     
    8080
    8181    return test_name;
    82 
    8382  };
    8483
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp

    r81 r88  
    1111namespace behavioural          {
    1212
    13   Signal * Interface::set_signal (std::string          name     ,
     13  Signal * Interface::set_signal (std::string     name     ,
    1414                                  direction_t     direction,
    1515                                  uint32_t        size     ,
     
    1919
    2020    std::string signame = signal_name(_name, name, direction);
    21 
     21   
    2222    Signal * sig = new Signal       (signame, direction, size, presence_port);
    2323
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_test_map.cpp

    r82 r88  
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1919
    20     std::string tab  = std::string(depth,'\t');
     20    std::string tab  = std::string(depth,' ');
    2121    bool _return = true;
    2222
    23     log_printf(NONE,Behavioural,FUNCTION, "%s* Interface \"%s\"",tab.c_str(),_name.c_str());
     23    log_printf(INFO,Interface,FUNCTION, "%s* Interface \"%s\"",tab.c_str(),_name.c_str());
    2424   
    2525    for (std::list<Signal*>::iterator i  = _list_signal->begin();
     
    4242//     bool _return = true;
    4343
    44 //     log_printf(NONE,Behavioural,FUNCTION, "%s* Interface \"%s\"",tab.c_str(),_name.c_str());
     44//     log_printf(INFO,Behavioural,FUNCTION, "%s* Interface \"%s\"",tab.c_str(),_name.c_str());
    4545   
    4646//     for (std::list<Signal*>::iterator i  = _list_signal->begin();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_test_map.cpp

    r82 r88  
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1919
    20     std::string tab  = std::string(depth,'\t');
     20    std::string tab  = std::string(depth,' ');
    2121
    2222    bool _return = true;
    2323
    24     log_printf(NONE,Behavioural,FUNCTION, "%s* Interfaces \"%s\"",tab.c_str(),_name.c_str());
     24    log_printf(INFO,Interface,FUNCTION, "%s* Interfaces \"%s\"",tab.c_str(),_name.c_str());
    2525   
    2626    for (std::list<Interface_fifo*>::iterator i  = _list_interface->begin();
     
    4444//     bool _return = true;
    4545
    46 //     log_printf(NONE,Behavioural,FUNCTION, "%s* Interfaces \"%s\"",tab.c_str(),_name.c_str());
     46//     log_printf(INFO,Behavioural,FUNCTION, "%s* Interfaces \"%s\"",tab.c_str(),_name.c_str());
    4747   
    4848//     for (std::list<Interface_fifo*>::iterator i  = _list_interface->begin();
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_generate_file.cpp

    r81 r88  
    1717    log_printf(FUNC,Behavioural,"generate_file","Begin");
    1818
    19     Vhdl   * vhdl        = new Vhdl(_name+"_Testbench");
    20     std::string   counter     = "counter";
    21     Signal * clock       = this->get_clock();
    22     Signal * reset       = this->get_reset();
    23     std::string   clock_name  = clock->get_name();
    24     std::string   reset_name  = reset->get_name();
    25     uint32_t cycle       = this->get_cycle();
     19    Vhdl   *    vhdl        = new Vhdl(_name+"_Testbench");
     20    std::string counter     = "counter";
     21    Signal *    clock       = this->get_clock();
     22    Signal *    reset       = this->get_reset();
     23    std::string clock_name  = clock->get_name();
     24    std::string reset_name  = reset->get_name();
     25    uint32_t    cycle       = this->get_cycle();
    2626
    2727    vhdl->set_signal    (clock_name, 1, 0);
     
    8787    vhdl->set_body("\t\t\t"+counter+" <= "+counter+"+1;");
    8888    vhdl->set_body("");
    89     vhdl->set_body("\t\t\tassert not ("+counter+" >= "+toString(cycle)+") report \"Test OK\" severity FAILURE;");
    90     vhdl->set_body("\t\t\tassert not ("+test_name+" = '0') report \"Test KO\" severity FAILURE;");
    91 
    9289#ifdef VHDL_TESTBENCH_ASSERT
    93     vhdl->set_body("\t\t\t-- Assert ...");
    9490    for (uint32_t cpt=0; cpt<=cycle; cpt++)
    9591      vhdl->set_body("\t\t\tassert not ("+counter+" = "+toString(cpt)+") report \"===== Test number "+toString(cpt)+" =====\" severity NOTE;");
     92
     93    for (std::list<Interface_fifo*>::iterator it=_list_interface->begin();
     94         it!=_list_interface->end();
     95         ++it)
     96      {
     97        Vhdl * vhdl_assert = new Vhdl("");
     98
     99        (*it)->testbench_assert (vhdl_assert,counter);
     100
     101        vhdl->set_body(vhdl_assert);
     102       
     103        delete vhdl_assert;
     104      }
    96105#endif
    97106
    98107    vhdl->set_body("");
     108    vhdl->set_body("\t\t\tassert not ("+counter+" >= "+toString(cycle)+") report \"Test OK\" severity FAILURE;");
     109    vhdl->set_body("\t\t\tassert not ("+test_name+" = '0') report \"Test KO\" severity FAILURE;");
    99110    vhdl->set_body("\t\tend if;");
    100111    vhdl->set_body("\tend if;");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters_test.cpp

    r82 r88  
    2323
    2424    if (x.have_error())
    25       throw (ErrorMorpheo ("Error(s) in parameters"));
     25      throw ERRORMORPHEO (FUNCTION,_("Error(s) in parameters\n"));
    2626
    2727    log_printf(FUNC,Behavioural,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/SPR_access_mode_implement_group.cpp

    r81 r88  
    2828            for (uint32_t i=16; i<=18; i++)
    2929            _spr_generic [GROUP_SYSTEM_AND_CONTROL ][   i]._supervisor_access_mode = SPR_ACCESS_MODE_READ_WRITE;
     30            _spr_generic [GROUP_SYSTEM_AND_CONTROL ][  19]._user_access_mode       = SPR_ACCESS_MODE_READ_ONLY;
     31            _spr_generic [GROUP_SYSTEM_AND_CONTROL ][  19]._supervisor_access_mode = SPR_ACCESS_MODE_READ_WRITE;
    3032            _spr_generic [GROUP_SYSTEM_AND_CONTROL ][  20]._user_access_mode       = SPR_ACCESS_MODE_READ_ONLY_COND;
    3133            _spr_generic [GROUP_SYSTEM_AND_CONTROL ][  20]._supervisor_access_mode = SPR_ACCESS_MODE_READ_WRITE;
     
    7779
    7880            _spr_generic [GROUP_DCACHE             ][   0]._supervisor_access_mode = SPR_ACCESS_MODE_READ_WRITE;
    79             for (uint32_t i=0; i<=5; i++)
     81            for (uint32_t i=1; i<=5; i++)
    8082                {
    8183            _spr_generic [GROUP_DCACHE             ][   i]._supervisor_access_mode = SPR_ACCESS_MODE_WRITE_ONLY;
     
    9193
    9294            _spr_generic [GROUP_ICACHE             ][   0]._supervisor_access_mode = SPR_ACCESS_MODE_READ_WRITE;
    93             for (uint32_t i=0; i<=3; i++)
     95            for (uint32_t i=1; i<=3; i++)
    9496                {
    9597            _spr_generic [GROUP_ICACHE             ][   i]._supervisor_access_mode = SPR_ACCESS_MODE_WRITE_ONLY;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/SPR_access_mode_read_write.cpp

    r81 r88  
    11#include "Behavioural/include/SPR_access_mode.h"
     2
     3#include "Common/include/Debug.h"
    24
    35namespace morpheo {
     
    1416  bool SPR_access_mode::read (spr_address_t address, Tcontrol_t SM, Tcontrol_t SUMRA)
    1517    {
    16       if (not valid(address))
     18//       log_printf(TRACE,true,"SPR_access_mode::read","address [%d][%d]",address._group,address._register);
     19//       log_printf(TRACE,true,"SPR_access_mode::read","sm        : %d",SM   );
     20//       log_printf(TRACE,true,"SPR_access_mode::read","sumra     : %d",SUMRA);
     21
     22      if (not exist(address))
    1723        return false;
    1824
    1925      spr_access_mode_t mode = _spr_generic [address._group][address._register];
     26
     27//       log_printf(TRACE,true,"SPR_access_mode::read","kernel    : %d",(int)mode._supervisor_access_mode);
     28//       log_printf(TRACE,true,"SPR_access_mode::read","user      : %d",(int)mode._supervisor_access_mode);
    2029
    2130      return (((SM == 1) and ( (mode._supervisor_access_mode == SPR_ACCESS_MODE_READ_ONLY     ) or
     
    2837  bool SPR_access_mode::write(spr_address_t address, Tcontrol_t SM, Tcontrol_t SUMRA)
    2938    {
    30       if (not valid(address))
     39      if (not exist(address))
    3140        return false;
    3241
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp

    r82 r88  
    5151//     if (destination_have_multi_producer)
    5252// //       throw (ERRORMORPHEO (FUNCTION,"Signal \""+_name+"\" can't been linked with signal \""+signal_dest->get_name()+"\" : destination have multi producer."));
    53 //       log_printf(NONE,Behavioural,FUNCTION,"Signal \"%s\" can't been linked with signal \"%s\" : destination have multi producer.",_name.c_str(),signal_dest->get_name().c_str());
     53//       log_printf(INFO,Behavioural,FUNCTION,"Signal \"%s\" can't been linked with signal \"%s\" : destination have multi producer.",_name.c_str(),signal_dest->get_name().c_str());
    5454
    5555    // update info source
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_test_map.cpp

    r82 r88  
    1919
    2020    std::string str     = "";
    21     std::string tab     = std::string(depth,'\t');
     21    std::string tab     = std::string(depth,' ');
    2222    bool        _return = true;
    2323
    24 //     log_printf(NONE,Behavioural,FUNCTION, "%s* Signal \"%s\"",tab.c_str(),_name.c_str());
    25 //     log_printf(NONE,Behavioural,FUNCTION, "%s%d - %d - %d",tab.c_str(),
     24//     log_printf(INFO,Behavioural,FUNCTION, "%s* Signal \"%s\"",tab.c_str(),_name.c_str());
     25//     log_printf(INFO,Behavioural,FUNCTION, "%s%d - %d - %d",tab.c_str(),
    2626//             _is_map_as_toplevel_dest,
    2727//             _is_map_as_component_src,
    2828//             _is_map_as_component_dest);
    29 //     log_printf(NONE,Behavioural,FUNCTION, "%stop_level %d, is_behavioural %d",tab.c_str(),
     29//     log_printf(INFO,Behavioural,FUNCTION, "%stop_level %d, is_behavioural %d",tab.c_str(),
    3030//             top_level,
    3131//             is_behavioural);
     
    143143    if (_return == false)
    144144      {
    145         log_printf(NONE,Behavioural,FUNCTION, "%s* %s",tab.c_str(),str.c_str());
    146        
    147145#ifndef DEBUG
    148146        std::cerr << str << std::endl;
     147#else
     148        log_printf(INFO,Interface,FUNCTION, "%s* %s",tab.c_str(),str.c_str());
    149149#endif
    150150      }
    151151    else
    152152      {
    153 //      log_printf(NONE,Behavioural,FUNCTION, "%s* Signal \"%s\" is OK.",tab.c_str(),_name.c_str());
     153//      log_printf(INFO,Interface,FUNCTION, "%s* Signal \"%s\" is OK.",tab.c_str(),_name.c_str());
    154154      }
    155155
     
    173173//     if (_return == false)
    174174//       {
    175 //      log_printf(NONE,Behavioural,FUNCTION, "%s* %s",tab.c_str(),str.c_str());
     175//      log_printf(INFO,Behavioural,FUNCTION, "%s* %s",tab.c_str(),str.c_str());
    176176       
    177177// #ifndef DEBUG
     
    181181//     else
    182182//       {
    183 // //   log_printf(NONE,Behavioural,FUNCTION, "%s* Signal \"%s\" is OK.",tab.c_str(),_name.c_str());
     183// //   log_printf(INFO,Behavioural,FUNCTION, "%s* Signal \"%s\" is OK.",tab.c_str(),_name.c_str());
    184184//       }
    185185   
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_binary_tree.cpp

    r81 r88  
    2121  Stat_binary_tree:: Stat_binary_tree (counter_t   cst)
    2222  {
    23     _root  = NULL;
    24     _left  = NULL;
    25     _right = NULL;
     23    _root      = NULL;
     24    _left      = NULL;
     25    _right     = NULL;
     26    _data_type = NONE;
    2627
    27     data_t data;
    28     data.cst = cst;
    29     _data_type   = CONSTANT;
    30     _data        = data;
    31 
    32 //     Stat_binary_tree(CONSTANT, data);
     28    change_type (cst);
    3329  }
    3430 
    3531  Stat_binary_tree:: Stat_binary_tree (counter_t * var)
    3632  {
    37     _root  = NULL;
    38     _left  = NULL;
    39     _right = NULL;
     33    _root      = NULL;
     34    _left      = NULL;
     35    _right     = NULL;
     36    _data_type = NONE;
    4037
    41     data_t data;
    42     data.var   = var;
    43     _data_type = VARIABLE;
    44     _data      = data;
    45 
    46 //     Stat_binary_tree(VARIABLE, data);
     38    change_type (var);
    4739  }
    4840
    4941  Stat_binary_tree:: Stat_binary_tree (operator_t  op)
    5042  {
    51     _root  = NULL;
    52     _left  = NULL;
    53     _right = NULL;
     43    _root      = NULL;
     44    _left      = NULL;
     45    _right     = NULL;
     46    _data_type = NONE;
    5447
    55     data_t data;
    56     data.op    = op;
    57     _data_type = ((op == inc) or (op == dec))?OPERATOR_UNARY:OPERATOR_BINARY;
    58     _data      = data;
     48    change_type (op);
     49  }
    5950
     51  Stat_binary_tree:: Stat_binary_tree (std::string expr,
     52                                       std::map<std::string, counter_t*> * operand)
     53  {
     54    _root      = NULL;
     55    _left      = NULL;
     56    _right     = NULL;
     57    _data_type = NONE;
     58
     59    import (expr, operand);
    6060  }
    6161
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_binary_tree_valid.cpp

    r81 r88  
    44namespace morpheo {
    55namespace behavioural {
     6
    67  bool Stat_binary_tree::valid (void)
    78  {
     9    if (_data_type == NONE)
     10      return false;
     11
    812    if ((_data_type == VARIABLE) or
    913        (_data_type == CONSTANT))
    1014      return ((_left  == NULL) and
    11               (_right == NULL) );
    12 
     15              (_right == NULL) );
     16   
    1317    if (_data_type == OPERATOR_UNARY)
    1418      return ((_right == NULL) and
    15               (_left  != NULL) and
    16               (_left->valid()));
     19              (_left  != NULL) and
     20              (_left->valid()));
    1721
    1822    if (_data_type == OPERATOR_BINARY)
    1923      return ((_left  != NULL ) and
    20               (_left ->valid()) and
    21               (_right != NULL ) and
    22               (_right->valid()));
     24              (_left ->valid()) and
     25              (_right != NULL ) and
     26              (_right->valid()));
    2327
    2428    return false;
    2529  }
     30
     31  void Stat_binary_tree::print (uint32_t depth)
     32  {
     33    std::string tab = std::string(depth,'\t');
     34    std::string sep = " ";
     35    if (_data_type == NONE)
     36      {
     37        std::cout << tab << "<node> NONE (error)" << std::endl;
     38
     39        if (_left  != NULL)
     40          _left ->print(depth+1);
     41        if (_right != NULL)
     42          _right->print(depth+1);
     43      }
     44
     45    if ((_data_type == VARIABLE) or
     46        (_data_type == CONSTANT))
     47      {
     48        std::cout << tab << "<leaf>"
     49                  << " "
     50                  << ((_left   == NULL)?"left  == NULL        ":"left  != NULL (error)")
     51                  << " "
     52                  << ((_right  == NULL)?"right == NULL        ":"right != NULL (error)")
     53                  << std::endl;
     54
     55        if (_left  != NULL)
     56          _left ->print(depth+1);
     57        if (_right != NULL)
     58          _right->print(depth+1);
     59      }
     60   
     61    if (_data_type == OPERATOR_UNARY)
     62      {
     63        std::cout << tab << "<unary>"
     64                  << " "
     65                  << ((_left   == NULL)?"left  == NULL (error)":"left  != NULL        ")
     66                  << " "
     67                  << ((_right  == NULL)?"right == NULL        ":"right != NULL (error)")
     68                  << std::endl;
     69       
     70        if (_left  != NULL)
     71          _left ->print(depth+1);
     72        if (_right != NULL)
     73          _right->print(depth+1);
     74      }
     75
     76    if (_data_type == OPERATOR_BINARY)
     77      {
     78        std::cout << tab << "<binary>"
     79                  << " "
     80                  << ((_left   == NULL)?"left  == NULL (error)":"left  != NULL        ")
     81                  << " "
     82                  << ((_right  == NULL)?"right == NULL (error)":"right != NULL        ")
     83                  << std::endl;
     84
     85        if (_left  != NULL)
     86          _left ->print(depth+1);
     87        if (_right != NULL)
     88          _right->print(depth+1);
     89      }
     90  }
     91
    2692};
    2793};
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_generate_file.cpp

    r81 r88  
    22#include "Behavioural/include/Stat.h"
    33#include "Behavioural/include/Version.h"
     4#include "Common/include/Environment.h"
    45
    56namespace morpheo {
     
    89  void Stat::generate_file (void)
    910  {
     11    directory();
     12
    1013    std::string body = print(1);
    1114
     
    2629    xml->balise_close();
    2730
    28     xml->filename_extension ("stat");
    29     xml->generate_file();
     31    xml->filename_extension (".stat");
     32    xml->generate_file(MORPHEO_STATISTICS);
    3033
    3134    delete xml;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_have_counter.cpp

    r81 r88  
    1010         i!= _list_operand->end();
    1111         ++i)
    12       if (i->second.type == TYPE_COUNTER)
    13         return true;
    14 
     12      {
     13        if (i->second.type == TYPE_COUNTER)
     14          return true;
     15      }
    1516    return false;
    1617  }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_print.cpp

    r81 r88  
    77  std::string Stat::print (uint32_t depth)
    88  {
     9//     log_printf(TRACE,Behavioural,"Stat::print","Component name : %s",_name_component.c_str());
     10//     log_printf(TRACE,Behavioural,"Stat::print","Instance  name : %s",_name_instance .c_str());
     11
    912    end_simulation();
    1013
     
    2124         stat != _list_stat->end();
    2225         stat ++)
    23       xml.text((*stat)->print(1));
    24    
     26      {
     27        xml.text((*stat)->print(1));
     28      }
    2529
    2630    // Test special case
     
    6367                     ++operand)
    6468                  {
    65                     if (operand->second.type == TYPE_COUNTER)
     69                    if (operand->second.type == TYPE_COUNTER)
    6670                      {
    6771                        xml.singleton_begin(operand->second.name);
     
    8084          }
    8185      }
     86   
    8287    xml.balise_close();
    83 
     88   
    8489    return xml.get_body(depth);
    8590  }
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_string2tree.cpp

    r81 r88  
    55namespace behavioural {
    66
    7 #define string2operator(x) (x=="+")?add:((x=="-")?sub:((x=="*")?mul:((x=="/" )?div:((x=="++")?inc:dec))))
    8 
    97  Stat_binary_tree * Stat::string2tree     (std::string expr)
    108  {
    11     const std::string delims  (" ");          // délimiteur : " "
    12     const std::string numbers ("0123456789"); // délimiteur : " "
    13     std::string::size_type index_begin, index_end;
     9    std::map<std::string, counter_t*> * operand = new std::map<std::string, counter_t*>;
    1410
    15     Stat_binary_tree * tree = NULL;
     11    for (std::map<std::string, var_t>::iterator it = _list_operand->begin();
     12         it != _list_operand->end();
     13         ++ it)
     14      (*operand) [it->first] = it->second.counter;
    1615
    17     index_begin = expr.find_first_not_of(delims);
     16    Stat_binary_tree * tree = new Stat_binary_tree(expr,operand);
    1817
    19     while (index_begin != std::string::npos)
    20       {
    21         index_end = expr.find_first_of(delims, index_begin);
    22 
    23         if (index_end == std::string::npos)
    24           {
    25             index_end = expr.length();
    26           }
    27        
    28         std::string str = expr.substr(index_begin, index_end-index_begin);
    29        
    30         // 3 possibilités :
    31         //  * operator
    32         //  * constante
    33         //  * variable
    34         {
    35           // Test constantes
    36           std::string::size_type index = str.find_first_not_of(numbers);
    37           if (index  == std::string::npos)
    38             {
    39 //            std::cout << " * c'est une constante." << std::endl;
    40 
    41               if (tree==NULL)
    42                 tree = new Stat_binary_tree (atoi(str.c_str()));
    43               else
    44                 tree = tree->insert_tree (atoi(str.c_str()));
    45             }
    46           else
    47             {
    48               // Test variables
    49               std::map<std::string, var_t>::iterator it = _list_operand->find(str);
    50               if (it != _list_operand->end())
    51                 {
    52 //                std::cout << " * c'est une variable." << std::endl;
    53 
    54                   if (tree==NULL)
    55                     tree = new Stat_binary_tree (it->second.counter);
    56                   else
    57                     tree = tree->insert_tree (it->second.counter);
    58                 }
    59               else
    60                 {
    61                   if ((str == "+") or
    62                       (str == "-") or
    63                       (str == "*") or
    64                       (str == "/"))
    65                     {
    66 //                    std::cout << " * c'est un operator à 2 opérandes." << std::endl;
    67                      
    68 //                    if (tree==NULL)
    69 //                      tree = new Stat_binary_tree (morpheo::string2operator[str].second);
    70 //                    else
    71 //                      tree->insert_tree (morpheo::string2operator[str].second);
    72                       if (tree==NULL)
    73                         tree = new Stat_binary_tree (string2operator(str));
    74                       else
    75                         tree = tree->insert_tree (string2operator(str));
    76                     }
    77                   else
    78                     {
    79                       if ((str == "++") or
    80                           (str == "--"))
    81                         {
    82 //                        std::cout << " * c'est un operator à 1 opérande." << std::endl;
    83 
    84 //                        if (tree==NULL)
    85 //                          tree = new Stat_binary_tree (string2operator[str.c_str()]);
    86 //                        else
    87 //                          tree->insert_tree (string2operator[str.c_str()]);
    88 
    89                           if (tree==NULL)
    90                             tree = new Stat_binary_tree (string2operator(str));
    91                           else
    92                             tree = tree->insert_tree (string2operator(str));
    93                          
    94                         }
    95                       else
    96                         {
    97 //                        std::cout << " * c'est autre chose." << std::endl;
    98                           str = "expression '"+str+"' doesn't a constant, a declarated variable or an operator.";
    99                           throw(ERRORMORPHEO("Stat::string2tree",_(str.c_str())));
    100                         }
    101                     }
    102                 }
    103             }
    104         }
    105 
    106         index_begin = expr.find_first_not_of(delims, index_end);
    107 
    108         if (index_begin != std::string::npos)
    109           tree = tree->goto_next_root();
    110       }
    111 
    112     if (tree == NULL)
    113       throw (ERRORMORPHEO("Stat::string2tree",_("the tree generated is empty.")));
    114 
    115 //     std::cout << "<Stat::string2tree> goto_top_level" << std::endl;
    116 
    117     tree = tree->goto_top_level();
    118 
    119 //     std::cout << "<Stat::string2tree> valid" << std::endl;
    120 
    121     if (not tree->valid())
    122       throw (ERRORMORPHEO("Stat::string2tree",_("the tree generated is invalid.")));
    123 
    124 //     std::cout << "<Stat::string2tree> End" << std::endl;
     18    delete operand;
    12519
    12620    return tree;
    127 
    12821  }
    12922 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Usage.cpp

    r81 r88  
    2020    return ((usage & flag) != 0);
    2121  }
    22 
     22#undef  FUNCTION
     23#define FUNCTION "usage_environment"
    2324  void     usage_environment (Tusage_t usage)
    2425  {
    2526#ifndef SYSTEMC
    2627    if (usage_is_set(usage,USE_SYSTEMC))
    27       throw ErrorMorpheo(_("Component use the flag \"USE_SYSTEMC\", but the macro's compiler \"SYSTEMC\" is unset."));
     28      throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_SYSTEMC\", but the macro's compiler \"SYSTEMC\" is unset.\n"));
    2829#endif
    2930#ifndef VHDL
    3031    if (usage_is_set(usage,USE_VHDL))
    31       throw ErrorMorpheo(_("Component use the flag \"USE_VHDL\", but the macro's compiler \"VHDL\" is unset."));
     32      throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_VHDL\", but the macro's compiler \"VHDL\" is unset.\n"));
    3233#endif
    3334#ifndef VHDL_TESTBENCH
    3435    if (usage_is_set(usage,USE_VHDL_TESTBENCH))
    35       throw ErrorMorpheo(_("Component use the flag \"USE_VHDL_TESTBENCH\", but the macro's compiler \"VHDL_TESTBENCH\" is unset."));
     36      throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_VHDL_TESTBENCH\", but the macro's compiler \"VHDL_TESTBENCH\" is unset.\n"));
    3637#endif
    3738#ifndef VHDL_TESTBENCH_ASSERT
    3839    if (usage_is_set(usage,USE_VHDL_TESTBENCH_ASSERT))
    39       throw ErrorMorpheo(_("Component use the flag \"USE_VHDL_TESTBENCH_ASSERT\", but the macro's compiler \"VHDL_TESTBENCH_ASSERT\" is unset."));
     40      throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_VHDL_TESTBENCH_ASSERT\", but the macro's compiler \"VHDL_TESTBENCH_ASSERT\" is unset.\n"));
    4041#endif
    4142#ifndef POSITION
    4243    if (usage_is_set(usage,USE_POSITION))
    43       throw ErrorMorpheo(_("Component use the flag \"USE_POSITION\", but the macro's compiler \"POSITION\" is unset."));
     44      throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_POSITION\", but the macro's compiler \"POSITION\" is unset.\n"));
    4445#endif
    4546#ifndef STATISTICS
    4647    if (usage_is_set(usage,USE_STATISTICS))
    47       throw ErrorMorpheo(_("Component use the flag \"USE_STATISTICS\", but the macro's compiler \"STATISTICS\" is unset."));
     48      throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_STATISTICS\", but the macro's compiler \"STATISTICS\" is unset.\n"));
    4849#endif
    4950#ifndef INFORMATION
    5051    if (usage_is_set(usage,USE_INFORMATION))
    51       throw ErrorMorpheo(_("Component use the flag \"USE_INFORMATION\", but the macro's compiler \"INFORMATION\" is unset."));
     52      throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_INFORMATION\", but the macro's compiler \"INFORMATION\" is unset.\n"));
    5253#endif
    5354
     
    5657
    5758    if (usage_is_set(usage,USE_STATISTICS) and not usage_is_set(usage,USE_SYSTEMC))
    58       throw ErrorMorpheo(_("Usage flags conflit : to use the statistics, you must set flag USE_SYSTEMC"));
     59      throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the statistics, you must set flag USE_SYSTEMC\n"));
    5960   
    6061    if (usage_is_set(usage,USE_INFORMATION) and not usage_is_set(usage,USE_STATISTICS))
    61       throw ErrorMorpheo(_("Usage flags conflit : to use the information, you must set flag USE_STATISTICS"));
     62      throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the information, you must set flag USE_STATISTICS\n"));
    6263   
    6364    if (usage_is_set(usage,USE_VHDL_TESTBENCH) and not usage_is_set(usage,USE_SYSTEMC))
    64       throw ErrorMorpheo(_("Usage flags conflit : to use the vhdl's test bench, you must set flag USE_SYSTEMC"));
     65      throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the vhdl's test bench, you must set flag USE_SYSTEMC\n"));
    6566   
    6667    if (usage_is_set(usage,USE_VHDL_TESTBENCH) and not usage_is_set(usage,USE_VHDL))
    67       throw ErrorMorpheo(_("Usage flags conflit : to use the vhdl's test bench, you must set flag USE_VHDL"));
     68      throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the vhdl's test bench, you must set flag USE_VHDL\n"));
    6869   
    6970    if (usage_is_set(usage,USE_VHDL_TESTBENCH_ASSERT) and not usage_is_set(usage,USE_VHDL_TESTBENCH))
    70       throw ErrorMorpheo(_("Usage flags conflit : to use an assert in vhdl's test bench, you must set flag USE_VHDL_TESTBENCH"));
     71      throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use an assert in vhdl's test bench, you must set flag USE_VHDL_TESTBENCH\n"));
    7172  }
    7273
     
    9697    usage = usage_set(usage,USE_INFORMATION);
    9798#endif
    98 
     99    usage = usage_set(usage,USE_HEADER);
    99100#ifdef DEBUG
    100101#endif
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_generate_file_model.cpp

    r81 r88  
    99
    1010#include "Behavioural/include/Vhdl.h"
     11#include "Common/include/Environment.h"
    1112#include <sstream>
    1213#include <fstream>
     
    1920    log_printf(FUNC,Behavioural,"generate_file_model","Begin");
    2021
    21     std::string filename = _name + ".vhdl";
     22    directory();
     23
     24    std::string filename = MORPHEO_VHDL + "/" + _name + ".vhdl";
    2225   
    23     log_printf(TRACE,Behavioural,"generate_file_model","print %s",filename.c_str());
    24     std::cout << "Generate file \""<< filename << "\"" << std::endl;
     26    msg_printf(INFORMATION,_("Generate file \"%s\"."),filename.c_str());
    2527
    2628    log_printf(TRACE,Behavioural,"generate_file_model","declaration");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_generate_file_package.cpp

    r81 r88  
    99
    1010#include "Behavioural/include/Vhdl.h"
     11#include "Common/include/Environment.h"
    1112#include <sstream>
    1213#include <fstream>
     
    1920    log_printf(FUNC,Behavioural,"generate_file_package","Begin");
    2021
     22    directory();
     23
    2124    std::string name     = _name + "_Pack";
    22     std::string filename = name + ".vhdl";
     25    std::string filename = MORPHEO_VHDL + "/" + name + ".vhdl";
    2326
    24     std::cout << "Generate file \""<< filename << "\"" << std::endl;
     27    msg_printf(INFORMATION,_("Generate file \"%s\"."),filename.c_str());
    2528
    2629    std::ofstream file;
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_header.cpp

    r85 r88  
    3232    text += "-- "+toString(_("File : "))            + filename  +"\n";
    3333    text += "-- "+toString(_("Date : "))            + ctime (&current_time );
    34     text += "-- "+toString(_("Morpheo version : ")) + MORPHEO_VERSION +"\n";
     34    text += "-- "+toString(_("Morpheo version : ")) + MORPHEO_HEADER +"\n";
    3535    text += "-- "+toString(_("Comment : "))         + _("it's a autogenerated file, don't modify") +"\n";
    3636    text += "-------------------------------------------------------------------------------\n";
     
    3838    log_printf(FUNC,Behavioural,FUNCTION,"End");
    3939
    40     return text.str();
     40    return text;
    4141  };
    4242 
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body.cpp

    r81 r88  
    1717#undef  FUNCTION
    1818#define FUNCTION "Vhdl::set_body"
    19   void Vhdl::set_body (std::string      text     )
     19  void Vhdl::set_body (std::string text)
    2020  {
    2121    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    2222    set_list(_list_body, text);
     23    log_printf(FUNC,Behavioural,FUNCTION,"End");
     24  };
     25 
     26#undef  FUNCTION
     27#define FUNCTION "Vhdl::set_body"
     28  void Vhdl::set_body (Vhdl * vhdl)
     29  {
     30    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     31   
     32    for (std::list<std::string>::iterator it=vhdl->_list_body.begin();
     33         it!=vhdl->_list_body.end();
     34         ++it)
     35      set_list(_list_body, *it);
     36
    2337    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2438  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML.cpp

    r81 r88  
    1717  {
    1818    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    19     _filename_extension="xml";
     19    _filename_extension=".xml";
    2020    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2121  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_generate_file.cpp

    r81 r88  
    77
    88#include "Behavioural/include/XML.h"
     9#include "Common/include/ErrorMorpheo.h"
    910#include <fstream>
    1011
     
    1415#undef  FUNCTION
    1516#define FUNCTION "XML::generate_file"
    16   void XML::generate_file (std::string encoding)
     17  void XML::generate_file (std::string dirname, std::string encoding)
    1718  {
    1819    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     
    2021    header (encoding);
    2122
    22     std::string filename =  _name + "." + _filename_extension;
     23    std::string filename = dirname + "/" + _name + _filename_extension;
    2324
    24     std::cout << "Generate file \""<< filename << "\"" << std::endl;
     25    msg_printf(INFORMATION,_("Generate file \"%s\"."),filename.c_str());
    2526
    2627    std::ofstream file;
    27     file.open(filename.c_str(),std::ios::out | std::ios::trunc);
     28    file.open(filename.c_str() ,std::ios::out | std::ios::trunc);
     29
     30    if (!file)
     31      throw ERRORMORPHEO(FUNCTION,toString(_("Error opening \"%s\" file.\n"),filename.c_str()));
    2832
    2933    file << get_body();
     
    3438  };
    3539
    36   void XML::generate_file (void)
     40  void XML::generate_file (std::string dirname)
    3741  {
    3842    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    39     generate_file("UTF-8");
     43    generate_file(dirname,"UTF-8");
    4044    log_printf(FUNC,Behavioural,FUNCTION,"End");
    4145  };
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_get_body.cpp

    r83 r88  
    2424    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    2525
    26     std::string body       = _body;
    27     std::string tabulation = indent(depth);
     26    std::string body = _body;
     27    std::string tab  = indent(depth);
    2828
    29 //  body.insert(0,tabulation);
     29    body.insert(0,tab);
    3030    for (size_t pos=body.find('\n',0); (pos<body.length()-1); pos=body.find('\n',++pos))
    31       body.insert(++pos,tabulation);
     31      body.insert(++pos,tab);
    3232
    3333    log_printf(FUNC,Behavioural,FUNCTION,"End");
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_header.cpp

    r85 r88  
    2626    str += "\n";
    2727    str += "<!--\n";
    28     str += "\t"+toString(_("File : "))            + _name+"."+_filename_extension + "\n";
     28    str += "\t"+toString(_("File : "))            + _name + _filename_extension + "\n";
    2929    str += "\t"+toString(_("Date : "))            + ctime (&current_time );
    30     str += "\t"+toString(_("Morpheo version : ")) + MORPHEO_VERSION +"\n";
     30    str += "\t"+toString(_("Morpheo version : ")) + MORPHEO_HEADER +"\n";
    3131    str += "\t"+toString(_("Comment : "))         + toString(_("it's a autogenerated file, don't modify")) +"\n";
    3232    str += "-->\n";
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_insert_XML.cpp

    r81 r88  
    1313#undef  FUNCTION
    1414#define FUNCTION "XML::insert_XML"
    15   bool XML::insert_XML (XML xml)
     15  bool XML::insert_XML (XML xml, uint32_t offset_depth)
    1616  {
    1717    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    1818    //return text (xml.get_body());
    19     _body += xml.get_body(depth());
     19    _body += xml.get_body(depth()+offset_depth);
    2020    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2121
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_text.cpp

    r81 r88  
    1616  {
    1717    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
    18     _body += indent()+text; // +"\n";
     18    _body += text; // +"\n";
    1919    log_printf(FUNC,Behavioural,FUNCTION,"End");
    2020
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Address.h

    r81 r88  
    1 #ifndef morpheo_Address
    2 #define morpheo_Address
     1#ifndef Morpheo_Address_h
     2#define Morpheo_Address_h
    33
    44/*
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Average.h

    r81 r88  
    1 #ifndef morpheo_Average
    2 #define morpheo_Average
     1#ifndef Morpheo_Average_h
     2#define Morpheo_Average_h
    33
    44/*
  • trunk/IPs/systemC/processor/Morpheo/Common/include/BitManipulation.h

    r81 r88  
    1 #ifndef morpheo_BitManipulation
    2 #define morpheo_BitManipulation
     1#ifndef Morpheo_BitManipulation_h
     2#define Morpheo_BitManipulation_h
    33
    44/*
  • trunk/IPs/systemC/processor/Morpheo/Common/include/ChangeCase.h

    r81 r88  
    1 #ifndef morpheo_changecase
    2 #define morpheo_changecase
     1#ifndef Morpheo_ChangeCase_h
     2#define Morpheo_ChangeCase_h
    33
    44/*
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h

    r83 r88  
    1 #ifndef DEBUG_H
    2 #define DEBUG_H
     1#ifndef Morpheo_Debug_h
     2#define Morpheo_Debug_h
    33
    44/*
     
    1313 *  - log_begin
    1414 *  - log_end
     15 *  - log_function
     16 *  - msg_print
    1517 *  - breakpoint
    1618 *
     
    2527#include "Common/include/Message.h"
    2628#include "Behavioural/include/Debug_component.h"
    27 #include "Behavioural/include/Environment.h"
     29#include <systemc.h>
    2830#include <stdio.h>
    2931#include <string.h>
     
    3133#include <sstream>
    3234#include <string>
     35
     36namespace morpheo {
    3337
    3438enum _debug_verbosity
     
    5458           ( DEBUG_ ## component == true )) )                           \
    5559        {                                                               \
     60          if (DEBUG_ ## level <= DEBUG_INFO)                            \
     61            {                                                           \
     62              msg("%s ",MSG_INFORMATION);                               \
     63            }                                                           \
     64          else                                                          \
     65            {                                                           \
     66              msg("%s ",MSG_DEBUG);                                     \
     67            }                                                           \
     68                                                                        \
    5669          if (DEBUG >= DEBUG_FUNC)                                      \
    5770            {                                                           \
    58               msg(_("%s"),debug_tab().c_str());                         \
     71              msg("%s",debug_tab().c_str());                            \
    5972            }                                                           \
    6073          if (DEBUG >= DEBUG_ALL )                                      \
     
    7285          if (DEBUG >= DEBUG_FUNC)                                      \
    7386            {                                                           \
    74               msg(_("<%s> "),func);                                     \
    75               msg(_("In file %s, "),__FILE__);                          \
    76               msg(_("at line %d " ),__LINE__);                          \
    77               msg(_(": "));                                             \
    78             }                                                           \
    79           msg(str);                                                     \
    80           msg(_("\n"));                                                 \
    81           fflush (stdout);                                              \
     87              msg(  "<%s> " ,func);                                     \
     88              msg(_("In file %s, "),__FILE__);                          \
     89              msg(_("at line %d " ),__LINE__);                          \
     90              msg(  ": " );                                             \
     91            }                                                           \
     92          msg(str);                                                     \
     93          msg("\n");                                                    \
    8294        }                                                               \
    8395    } while(0)
     
    8799    {                                                                   \
    88100      debug_tab_inc ();                                                 \
    89       log_printf(FUNC,component,func,"Begin");                          \
     101      log_printf(FUNC,component,func,_("Begin"));                       \
    90102    } while(0)
    91103
     
    93105  do                                                                    \
    94106    {                                                                   \
    95       log_printf(FUNC,component,func,"End");                            \
     107      log_printf(FUNC,component,func,_("End"));                         \
    96108      debug_tab_dec ();                                                 \
    97109    } while(0)
     
    115127#endif // DEBUG
    116128
     129# define log_function(component,func,name)                              \
     130  do                                                                    \
     131    {                                                                   \
     132      log_printf(TRACE,component,func,_("[%d] %s.%s"),static_cast<uint32_t>(sc_simulation_time()),name,func); \
     133    } while(0)
     134
     135
     136#define msg_printf(type,str...)                                         \
     137  do                                                                    \
     138    {                                                                   \
     139      msg("%s ",MSG_ ## type);                                          \
     140      msg(str);                                                         \
     141      msg("\n");                                                        \
     142    } while(0)
     143
     144
    117145#define breakpoint(str...)                                              \
    118146  do                                                                    \
    119147    {                                                                   \
    120       msg(_("Breakpoint : file %s, line %d. Enter Any key to continue\n"),__FILE__,__LINE__); \
    121       msg(str);                                                         \
     148      fprintf(stdout,_("%s "),MSG_BREAKPOINT);                                     \
     149      fprintf(stdout,_("Breakpoint in file %s, line %d.\n"),__FILE__,__LINE__);    \
     150      fprintf(stdout,_("%s "),MSG_NONE);                                           \
     151      fprintf(stdout,str);                                                              \
     152      fprintf(stdout,_("\n"));                                                     \
     153      fprintf(stdout,_("%s "),MSG_NONE);                                           \
     154      fprintf(stdout,_("Enter any key to continue\n"));                            \
    122155      getchar();                                                        \
    123156    } while(0)
     
    128161    {                                                                   \
    129162      if (x == NULL)                                                    \
    130         err(_("%s File %s, Line %d, this pointeur is null\n"),MSG_ERROR,__FILE__,__LINE__); \
     163        err(_("File %s, Line %d, this pointeur is null\n"),__FILE__,__LINE__); \
    131164    }                                                                   \
    132165  while (0)
     
    139172#endif
    140173
    141 
     174}; // end namespace morpheo
    142175#endif // !DEBUG_H
  • trunk/IPs/systemC/processor/Morpheo/Common/include/ErrorMorpheo.h

    r82 r88  
    1 #ifndef morpheo_ErrorMorpheo
    2 #define morpheo_ErrorMorpheo
     1#ifndef Morpheo_ErrorMorpheo_h
     2#define Morpheo_ErrorMorpheo_h
    33
    44/*
     
    99 */
    1010
    11 #include "ToString.h"
     11#include "Common/include/ToString.h"
     12#include "Common/include/Translation.h"
     13#include "Common/include/Message.h"
     14
    1215#include <iostream>
    1316#include <exception>
     
    2326   
    2427    // -----[ methods ]---------------------------------------------------
    25   public  :             ErrorMorpheo  ()                throw() {_msg="Exception detected ...";}
    26   public  :             ErrorMorpheo  (std::string msg) throw() {_msg=msg;}
     28  public  :             ErrorMorpheo  ()                throw() {_msg = toString("%s ",MSG_ERROR); _msg+="Exception detected ...";}
     29  public  :             ErrorMorpheo  (std::string msg) throw() {_msg = toString("%s ",MSG_ERROR); _msg+=msg;}
    2730  public  :             ErrorMorpheo  (std::string funcname,
    2831                                       std::string msg     ,
     
    3033                                       std::string file    ) throw()
    3134    {
    32       _msg = toString("<%s> at line %d, in file %s : %s",funcname.c_str(),line,file.c_str(),msg.c_str());
     35#ifdef DEBUG
     36      _msg = toString(_("%s <%s> at line %d, in file %s : %s"),MSG_ERROR,funcname.c_str(),line,file.c_str(),msg.c_str());
     37#else
     38      _msg = toString(_("%s %s"),MSG_ERROR,msg.c_str());
     39#endif
    3340    }
    3441  public  :             ~ErrorMorpheo (void)       throw() {}
     
    4350   
    4451    // -----[ methods ]---------------------------------------------------
    45   public  :             TestMorpheo   ()                throw() {_msg="Test error ...";}
     52  public  :             TestMorpheo   ()                throw() {_msg=_("Test error ...");}
    4653  public  :             TestMorpheo   (std::string msg) throw() {_msg=msg;}
    4754  public  :             ~TestMorpheo  (void)            throw() {}
  • trunk/IPs/systemC/processor/Morpheo/Common/include/FromString.h

    r81 r88  
    1 #ifndef morpheo_fromstring
    2 #define morpheo_fromstring
     1#ifndef Morpheo_FromString_h
     2#define Morpheo_FromString_h
    33
    44/*
     
    2727  }
    2828
     29  template<>           inline uint64_t fromString<uint64_t>   (const std::string& x)
     30  {
     31    return static_cast<uint64_t>(atoll(x.c_str()));
     32  }
     33
     34  template<>           inline double   fromString<double>     (const std::string& x)
     35  {
     36    return static_cast<double>(atof(x.c_str()));
     37  }
     38
    2939  template<>           inline bool     fromString<bool>       (const std::string& x)
    3040  {
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Log2.h

    r81 r88  
    1 #ifndef morpheo_Log2
    2 #define morpheo_Log2
     1#ifndef Morpheo_Log2_h
     2#define Morpheo_Log2_h
    33
    44/*
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Max.h

    r87 r88  
    1 #ifndef morpheo_max
    2 #define morpheo_max
     1#ifndef Morpheo_Max_h
     2#define Morpheo_Max_h
    33
    44/*
     
    1313namespace morpheo {
    1414
    15   template<typename T> inline T max (const T * x, uint32_t size)
     15  template<typename T> inline T max (T * x, uint32_t size)
    1616  {
    1717    T res = x[0];
    1818
    1919    for (uint32_t i=1; i<size; i++)
    20       if (res<x[i])
    21         res = x[i];
     20      {
     21        T tmp = x[i];
     22        if (res<tmp)
     23          res = tmp;
     24      }
    2225
    2326    return res;
    2427  }
    2528
    26   template<typename T> inline T max (const T * x, uint32_t size, uint32_t n)
     29  template<typename T> inline T max (T ** x, uint32_t size1, uint32_t size2)
     30  {
     31    T res = max(x[0],size2);
     32
     33    for (uint32_t i=1; i<size1; i++)
     34      {
     35        T tmp = max(x[i],size2);
     36        if (res<tmp)
     37          res = tmp;
     38      }
     39
     40    return res;
     41  }
     42
     43  template<typename T> inline T max (T ** x, uint32_t size1, uint32_t * size2)
     44  {
     45    T res = max(x[0],size2[0]);
     46
     47    for (uint32_t i=1; i<size1; i++)
     48      {
     49        T tmp = max(x[i],size2[i]);
     50        if (res<tmp)
     51          res = tmp;
     52      }
     53
     54    return res;
     55  }
     56
     57
     58  template<typename T> inline T max (T * x, uint32_t size, uint32_t n)
    2759  {
    2860    if ((n==0) or (n>size))
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Message.h

    r83 r88  
    1 #ifndef MESSAGE_H
    2 #define MESSAGE_H
     1#ifndef Morpheo_Message_h
     2#define Morpheo_Message_h
    33/*
    44 * $Id$
     
    1515namespace morpheo {
    1616
    17 #define MSG_ERROR         _("[   ERROR   ]")
    18 #define MSG_WARNING       _("[  WARNING  ]")
    19 #define MSG_INFORMATION   _("[INFORMATION]")
     17  // Color
     18  // 31 : rouge
     19  // 32 : vert
     20  // 33 : jaune
     21  // 34 : bleu
     22  // 35 : rose
     23  // 36 : cyan
     24  // 37 : blanc
     25  // 38 : noir souligne
     26  // 39 : noir
    2027
    21 #define msg(arg...)                             \
     28#  define MSG_NONE          _("             ")
     29#ifdef PRINT_COLOR
     30#  define MSG_DEBUG         _("[1;34m[   DEBUG   ][0m")
     31#  define MSG_ERROR         _("[1;31m[   ERROR   ][0m")
     32#  define MSG_WARNING       _("[1;35m[  WARNING  ][0m")
     33#  define MSG_INFORMATION   _("[1;32m[INFORMATION][0m")
     34#  define MSG_BREAKPOINT    _("[1;38m[   BREAK   ][0m")
     35#else
     36#  define MSG_DEBUG         _("[   DEBUG   ]")
     37#  define MSG_ERROR         _("[   ERROR   ]")
     38#  define MSG_WARNING       _("[  WARNING  ]")
     39#  define MSG_INFORMATION   _("[INFORMATION]")
     40#  define MSG_BREAKPOINT    _("[   BREAK   ]")
     41#endif
     42
     43#ifdef LOG_FILE
     44extern FILE * log_stream;
     45void log_init (void);
     46
     47#define fmsg(stream,arg...)                     \
    2248  do                                            \
    2349    {                                           \
    24       fprintf(stdout,arg);                      \
     50      log_init();                               \
     51      fprintf(log_stream,arg);                  \
     52      fflush(log_stream);                       \
     53    } while (0)
     54
     55#else
     56
     57#define fmsg(stream,arg...)                     \
     58  do                                            \
     59    {                                           \
     60      fprintf(stream,arg);                      \
     61      fflush(stream);                           \
    2562    } while (0)
    2663
    27 #define err(arg...)                             \
     64#endif
     65
     66#define fmsgDebug(stream,arg...)                \
    2867  do                                            \
    2968    {                                           \
    30       fprintf(stderr,arg);                      \
     69      fmsg(stream,"%s ",MSG_DEBUG);             \
     70      fmsg(stream,arg);                         \
    3171    } while (0)
    3272
     73#define fmsgError(stream,arg...)                \
     74  do                                            \
     75    {                                           \
     76      fmsg(stream,"%s ",MSG_ERROR);             \
     77      fmsg(stream,arg);                         \
     78    } while (0)
     79
     80#define fmsgWarning(stream,arg...)              \
     81  do                                            \
     82    {                                           \
     83      fmsg(stream,"%s ",MSG_WARNING);           \
     84      fmsg(stream,arg);                         \
     85    } while (0)
     86
     87#define fmsgInformation(stream,arg...)          \
     88  do                                            \
     89    {                                           \
     90      fmsg(stream,"%s ",MSG_INFORMATION);       \
     91      fmsg(stream,arg);                         \
     92    } while (0)
     93
     94#define msg(arg...)             fmsg(stdout,arg)
     95#define msgDebug(arg...)        fmsgDebug(stdout,arg)
     96#define msgError(arg...)        fmsgError(stdout,arg)
     97#define msgWarning(arg...)      fmsgWarning(stdout,arg)
     98#define msgInformation(arg...)  fmsgInformation(stdout,arg)
     99#define err(arg...)             fmsgError(stderr,arg)
    33100
    34101}; // end namespace morpheo
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Percent.h

    r81 r88  
    1 #ifndef morpheo_Percent
    2 #define morpheo_Percent
     1#ifndef Morpheo_Percent_h
     2#define Morpheo_Percent_h
    33
    44/*
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Test.h

    r83 r88  
    1 #ifndef TEST_H
    2 #define TEST_H
     1#ifndef Morpheo_Test_h
     2#define Morpheo_Test_h
     3
     4/*
     5 * $Id$
     6 *
     7 * [ Description ]
     8 *
     9 * Macro / function to test
     10 */
    311
    412#include <iostream>
     
    1119namespace morpheo {
    1220
    13 //-----[ Routine de test ]---------------------------------------
     21#define STR_OK "Test OK"
     22#define STR_KO "Test KO"
    1423
    1524static uint32_t num_test;
     
    2433inline void test_ko (char * file, uint32_t line, T exp1, T exp2)
    2534{
    26   std::cerr << "[" << num_test << "] : Test KO"
     35  fflush (stdout);
     36  fflush (stderr);
     37
     38  std::cerr << "[" << num_test << "] : " << STR_KO
    2739       << "\tline " << line                      << std::endl
    2840       << " * Localisation"                      << std::endl
     
    3850inline void test_ko (char * file, uint32_t line)
    3951{
    40   std::cerr << "[" << num_test << "] : Test KO"
     52  fflush (stdout);
     53  fflush (stderr);
     54
     55  std::cerr << "[" << num_test << "] : " << STR_KO
    4156       << "\tline " << line                           << std::endl
    4257       << " * Localisation"                           << std::endl
     
    4964inline void test_ok ()
    5065{
    51   msg (_("[%d] : Test OK\n"), num_test);
     66  fflush (stdout);
     67  fflush (stderr);
     68
     69  msg (_("[%d] : %s\n"), num_test,STR_OK);
    5270
    5371  num_test ++;
     
    5674inline void test_ok (char * file, uint32_t line)
    5775{
    58   msg (_("[%d] : Test OK\n"), num_test);
     76  fflush (stdout);
     77  fflush (stderr);
     78
     79  msg (_("[%d] : %s\n"), num_test,STR_OK);
    5980  msg (_("\tline %d\n"), line);
    6081
     
    6586inline void test_ok (char * file, uint32_t line, T exp)
    6687{
    67   msg (_("[%d] : Test OK\n"), num_test);
     88  fflush (stdout);
     89  fflush (stderr);
     90
     91  msg (_("[%d] : %s\n"), num_test, STR_OK);
    6892  msg (_("\tline %d\n"), line);
    6993  msg (_("\tvalue %s\n"), (morpheo::toString(exp)).c_str());
     
    91115    msg (str);                                                          \
    92116    msg (_("\n"));                                                      \
     117    fflush (stdout);                                                    \
    93118  } while(0)
    94 
    95119
    96120#ifndef CYCLE_MAX
     
    109133        }                                                               \
    110134                                                                        \
    111       if (cycle_current > CYCLE_MAX)                                    \
     135      if ((CYCLE_MAX != 0) and (cycle_current > CYCLE_MAX))             \
    112136        {                                                               \
    113137          TEST_KO("Maximal cycles Reached");                            \
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Time.h

    r81 r88  
    1 #ifndef TIME_H
    2 #define TIME_H
     1#ifndef Morpheo_Time_h
     2#define Morpheo_Time_h
    33
    44#ifdef SYSTEMC
     
    1010#include <sys/time.h>
    1111
     12namespace morpheo {
     13
    1214class Time
    1315{
    14 private : timeval time_begin;
     16#ifdef SYSTEMC
     17private : double   nb_cycles_begin;
     18#endif
     19private : timeval  time_begin;
    1520// private : timeval time_end;
    1621 
    1722public  : Time ()
    18   {
    19     gettimeofday(&time_begin     ,NULL);
     23  {
     24#ifdef SYSTEMC
     25    nb_cycles_begin = sc_simulation_time();
     26#endif
     27    gettimeofday(&time_begin,NULL);
    2028  };
    21 
     29 
    2230public  : ~Time ()
    2331  {
     
    2533  };
    2634
    27 public  : friend std::ostream& operator<< (std::ostream& output_stream,
     35public  : friend std::ostream& operator<< (std::ostream& output,
    2836                                           const Time & x)
    2937  {
    3038    timeval time_end;
    3139   
    32     gettimeofday(&time_end       ,NULL);
     40    gettimeofday(&time_end,NULL);
    3341   
    34     uint32_t nb_cycles = static_cast<uint32_t>(sc_simulation_time());
    35 
    36     double average = static_cast<double>(nb_cycles) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec+1);
     42#ifdef SYSTEMC
     43    double nb_cycles_end = sc_simulation_time();
     44    double average       = static_cast<double>(nb_cycles_end-x.nb_cycles_begin+1) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec+1);
    3745   
    38     output_stream << "Timing : " << nb_cycles << " cycles \t(" << average << " cycles/s)" << std::endl;
    39 
    40     return output_stream;
     46    output << "Timing : " << nb_cycles_end << " cycles \t(" << average << " cycles/s)" << std::endl;
     47#else
     48    double average       = static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec+1);
     49   
     50    output << "Timing : " average << " s" << std::endl;
     51#endif
     52   
     53    return output;
    4154  }
    4255};
    4356
     57}; // end namespace morpheo
     58
    4459#endif
  • trunk/IPs/systemC/processor/Morpheo/Common/include/ToBase2.h

    r81 r88  
    1 #ifndef morpheo_ToBase2
    2 #define morpheo_ToBase2
     1#ifndef Morpheo_ToBase2_h
     2#define Morpheo_ToBase2_h
    33
    44/*
  • trunk/IPs/systemC/processor/Morpheo/Common/include/ToString.h

    r82 r88  
    1 #ifndef morpheo_tostring
    2 #define morpheo_tostring
     1#ifndef Morpheo_ToString_h
     2#define Morpheo_ToString_h
    33
    44/*
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Translation.h

    r82 r88  
    1 #ifndef morpheo_Translation_H
    2 #define morpheo_Translation_H
     1#ifndef Morpheo_Translation_h
     2#define Morpheo_Translation_h
    33/*
    44 * $Id$
     
    1616#define MORPHEO_PACKAGE "morpheo"
    1717
    18 #ifdef NO_TRANSLATION
     18#ifdef TRANSLATION
     19# define _(str) dgettext (MORPHEO_PACKAGE,str)
     20#else
    1921# define _(str) (str)
    20 #else
    21 # define _(str) dgettext (MORPHEO_PACKAGE,str)
    2222#endif
    2323
    2424namespace morpheo
    2525{
    26   class Translation
    27   {
    28   public :  Translation (void);
    29   public : ~Translation (void);
    30   };
    31 
     26  void translation (void);
    3227}; // end namespace morpheo
    3328#endif
  • trunk/IPs/systemC/processor/Morpheo/Common/include/Types.h

    r81 r88  
    1 #ifndef morpheo_Type
    2 #define morpheo_Type
     1#ifndef Morpheo_Type_h
     2#define Morpheo_Type_h
    33
    44/*
     
    3434// #endif
    3535
    36 #define SC_CLOCK                 sc_in_clk       
    37 // #define SC_INTERNAL(type)        type
    38 // #define SC_REGISTER(type)        sc_signal<type >
    39 // #define SC_SIGNAL(type)          sc_signal<type >
    40 #define SC_IN(type)              sc_in    <type >
    41 #define SC_OUT(type)             sc_out   <type >
     36#  define SC_CLOCK                 sc_in_clk       
     37//#define SC_INTERNAL(type)        type
     38//#define SC_REGISTER(type)        sc_signal<type >
     39//#define SC_SIGNAL(type)          sc_signal<type >
     40#  define SC_IN(type)              sc_in    <type >
     41#  define SC_OUT(type)             sc_out   <type >
    4242                                 
    43 #define PORT_READ(sig)           sig->read()
    44 #define PORT_WRITE(sig,val)      sig->write(val)
    45 // #define INTERNAL_READ(sig)       (*sig)
    46 // #define INTERNAL_WRITE(sig,val)  (*sig) = val
    47 // #define SIGNAL_READ(sig)         sig->read()
    48 // #define SIGNAL_WRITE(sig,val)    sig->write(val)
    49 // #define REGISTER_READ(sig)       sig->read()
    50 // #define REGISTER_WRITE(sig,val)  sig->write(val)
     43#  define PORT_READ(sig)           sig->read()
     44#  define PORT_WRITE(sig,val)      sig->write(val)
     45//#define INTERNAL_READ(sig)       (*sig)
     46//#define INTERNAL_WRITE(sig,val)  (*sig) = val
     47//#define SIGNAL_READ(sig)         sig->read()
     48//#define SIGNAL_WRITE(sig,val)    sig->write(val)
     49//#define REGISTER_READ(sig)       sig->read()
     50//#define REGISTER_WRITE(sig,val)  sig->write(val)
    5151
    5252#endif 
  • trunk/IPs/systemC/processor/Morpheo/Common/src/Debug.cpp

    r82 r88  
    77
    88#include "Common/include/Debug.h"
     9#include "Common/include/Environment.h"
     10
     11namespace morpheo {
    912
    1013static uint32_t _debug_depth = 0;
    1114
     15#undef  FUNCTION
     16#define FUNCTION "debug_tab"
    1217std::string debug_tab (void)
    1318{
     
    1520}
    1621
     22#undef  FUNCTION
     23#define FUNCTION "debug_tab_inc"
    1724void debug_tab_inc (void)
    1825{
     
    2027}
    2128
     29#undef  FUNCTION
     30#define FUNCTION "debug_tab_dec"
    2231void debug_tab_dec (void)
    2332{
    2433//   _debug_depth --;
    2534}
     35
     36}; // end namespace morpheo
  • trunk/IPs/systemC/processor/Morpheo/Common/src/Translation.cpp

    r82 r88  
    66 */
    77
    8 #include "../include/Translation.h"
    9 #include "../include/ErrorMorpheo.h"
     8#include "Common/include/Environment.h"
     9#include "Common/include/Translation.h"
     10#include "Common/include/ErrorMorpheo.h"
    1011
    1112namespace morpheo {
    1213
    13   Translation:: Translation (void)
     14  static bool translation_initialized;
     15
     16  void translation (void)
    1417  {
    15 #ifndef NO_TRANSLATION
    16     char * top_level = getenv("MORPHEO_TOPLEVEL");
    17    
    18     if (top_level == NULL)
    19       throw ERRORMORPHEO("Translation","Error morpheo environment is not positioned\n");
    20  
    21     std::string dirname = top_level;
    22     dirname += "IPs/systemC/processor/Morpheo/locale";
     18#ifdef TRANSLATION
     19    if (not translation_initialized)
     20      {
     21        environment();
     22       
     23        std::string dirname = MORPHEO_TOPLEVEL;
     24        dirname += "/IPs/systemC/processor/Morpheo/locale";
    2325
    24     bindtextdomain(MORPHEO_PACKAGE,dirname.c_str());
     26        if (bindtextdomain(MORPHEO_PACKAGE,dirname.c_str()) == NULL)
     27          throw ERRORMORPHEO("Translation","Error in set directory containing message catalogs.\n");
     28       
     29        translation_initialized = true;
     30      }
    2531#endif   
    2632  }
    2733
    28   Translation::~Translation (void)
    29   {
    30 
    31   }
    32 
    3334}; // end namespace morpheo
  • trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Include/doc-style.sty

    r82 r88  
    1414\usepackage[latin1]{inputenc}  % Pour utiliser les caractères accentués dans votre texte
    1515\usepackage{openbib}
    16 \usepackage[draft]{fixme}
     16%\usepackage[draft]{fixme}
    1717\bibliographystyle{plain}
    1818
  • trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Makefile

    r84 r88  
    3232DIR_SCHEMA_PNG          = Schema_png
    3333DIR_TEX                 = Source
    34 DIR_LINK                = Link
    3534
    3635#--------------------------------------------------------------------------------
     
    103102                        $(DVIPS) -o $@ $<;
    104103
    105 #$(DIR_LINK)/%/*
    106104%.dvi                   : $(DIR_TEX)/%.tex
    107105                        @\
     
    170168                        $(MKDIR) $(DIR_DOCUMENTS)/$$FILENAME/$(DEFAULT_LANG);                                   \
    171169                                                                                                                \
    172                         $(ECHO) "Create link      : $(DIR_LINK)/$$FILENAME-$(DEFAULT_LANG)";                    \
    173                         $(LINK_SYMBOLIC) $(DIR_DOCUMENTS)/$$FILENAME/$(DEFAULT_LANG) $(DIR_LINK)/$$FILENAME-$(DEFAULT_LANG); \
    174                                                                                                                 \
    175170                        $(ECHO) "Create file      : $(DIR_DOCUMENTS)/$$FILENAME/$(DEFAULT_LANG)/root.tex";      \
    176171                        $(TOUCH) $(DIR_DOCUMENTS)/$$FILENAME/$(DEFAULT_LANG)/root.tex
     
    224219                                                                                                                \
    225220                        $(ECHO) "Delete directory : $(DIR_DOCUMENTS)/$$FILENAME";                               \
    226                         $(RM) $(DIR_DOCUMENTS)/$$FILENAME;                                                      \
    227                         $(ECHO) "Delete link      : $(DIR_DOCUMENTS)/$$FILENAME";                               \
    228                         $(RM) $(DIR_LINK)/$$FILENAME-*;
     221                        $(RM) $(DIR_DOCUMENTS)/$$FILENAME;                                                     
    229222
    230223rename                  :
     
    282275                                                                                                                \
    283276                        $(ECHO) "Rename directory : $(DIR_DOCUMENTS)/$$FILENAME_SRC";                           \
    284                         $(MV) $(DIR_DOCUMENTS)/$$FILENAME_SRC     $(DIR_DOCUMENTS)/$$FILENAME_DEST;             \
    285                         $(ECHO) "Rename link      : manually please";
     277                        $(MV) $(DIR_DOCUMENTS)/$$FILENAME_SRC     $(DIR_DOCUMENTS)/$$FILENAME_DEST;             
    286278
    287279
  • trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Schema/MORPHEO_micro_architecture-ex01.fig

    r81 r88  
    1212         5490 4140 4770 4140 4770 3690 5490 3690 5490 4140
    13134 1 0 50 -1 -1 12 0.0000 4 135 450 5130 3960 decod\001
    14 -6
    15 6 4770 3240 5490 3690
    16 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    17          5490 3690 4770 3690 4770 3240 5490 3240 5490 3690
    18 4 1 0 50 -1 -1 12 0.0000 4 105 570 5130 3420 context\001
    19 4 1 0 50 -1 -1 12 0.0000 4 105 390 5130 3600 state\001
    2014-6
    21156 5850 3690 6570 4140
     
    40344 1 0 50 -1 -1 12 0.0000 4 135 540 10170 2655 dcache\001
    4135-6
    42 6 6570 3015 7290 3465
    43 2 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    44          7290 3465 6570 3465 6570 3015 7290 3015 7290 3465
    45 4 1 0 50 -1 -1 12 0.0000 4 135 555 6930 3285 commit\001
    46 -6
    47366 3825 3060 4635 3510
    48372 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     
    60494 1 0 50 -1 -1 12 0.0000 4 150 300 2250 4050 port\001
    61504 1 0 50 -1 -1 12 0.0000 4 135 495 2250 3870 icache\001
     51-6
     526 4770 3240 5490 3690
     532 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     54         5490 3690 4770 3690 4770 3240 5490 3240 5490 3690
     554 1 0 50 -1 -1 12 0.0000 4 105 570 5130 3420 context\001
     564 1 0 50 -1 -1 12 0.0000 4 105 390 5130 3600 state\001
    6257-6
    63582 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 4
     
    168163        3 0 1.00 60.00 120.00
    169164         3690 4050 4770 4050
     1652 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     166         7290 3465 6570 3465 6570 3015 7290 3015 7290 3465
    1701674 1 0 50 -1 -1 12 0.0000 4 180 585 10170 4905 register\001
    1711684 1 0 50 -1 -1 12 1.5708 4 135 465 10935 3915 select\001
     
    1781754 1 0 50 -1 -1 12 0.0000 4 105 600 10170 4230 execute\001
    1791764 1 0 50 -1 -1 12 0.0000 4 135 600 10170 3690 memory\001
     1774 1 0 50 -1 -1 12 0.0000 4 135 555 6930 3285 commit\001
  • trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Schema/MORPHEO_micro_architecture-ex02.fig

    r81 r88  
    29294 1 0 50 -1 -1 12 0.0000 4 135 540 10170 2655 dcache\001
    3030-6
    31 6 6570 3015 7290 3465
    32 2 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    33          7290 3465 6570 3465 6570 3015 7290 3015 7290 3465
    34 4 1 0 50 -1 -1 12 0.0000 4 135 555 6930 3285 commit\001
    35 -6
    36316 4770 3285 5490 3735
    37322 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     
    39344 1 0 50 -1 -1 12 0.0000 4 135 450 5130 3555 decod\001
    4035-6
     366 3825 2655 4635 3105
     372 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     38         4590 3105 3870 3105 3870 2655 4590 2655 4590 3105
     394 1 0 50 -1 -1 12 0.0000 4 180 675 4230 2925 predictor\001
     40-6
     416 2970 3285 3690 3735
     422 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     43         3690 3735 2970 3735 2970 3285 3690 3285 3690 3735
     444 1 0 50 -1 -1 12 0.0000 4 135 390 3330 3555 fetch\001
     45-6
     466 1890 3690 2610 4140
     472 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     48         2610 4140 1890 4140 1890 3690 2610 3690 2610 4140
     494 1 0 50 -1 -1 12 0.0000 4 150 300 2250 4050 port\001
     504 1 0 50 -1 -1 12 0.0000 4 135 495 2250 3870 icache\001
     51-6
    41526 4770 2835 5490 3285
    42 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     532 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    4354         5490 3285 4770 3285 4770 2835 5490 2835 5490 3285
    44554 1 0 50 -1 -1 12 0.0000 4 105 570 5130 3015 context\001
    45564 1 0 50 -1 -1 12 0.0000 4 105 390 5130 3195 state\001
    46 -6
    47 6 3825 2655 4635 3105
    48 2 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    49          4590 3105 3870 3105 3870 2655 4590 2655 4590 3105
    50 4 1 0 50 -1 -1 12 0.0000 4 180 675 4230 2925 predictor\001
    51 -6
    52 6 2970 3285 3690 3735
    53 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    54          3690 3735 2970 3735 2970 3285 3690 3285 3690 3735
    55 4 1 0 50 -1 -1 12 0.0000 4 135 390 3330 3555 fetch\001
    56 -6
    57 6 1890 3690 2610 4140
    58 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    59          2610 4140 1890 4140 1890 3690 2610 3690 2610 4140
    60 4 1 0 50 -1 -1 12 0.0000 4 150 300 2250 4050 port\001
    61 4 1 0 50 -1 -1 12 0.0000 4 135 495 2250 3870 icache\001
    6257-6
    63582 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 3
     
    204199         1710 5535 12510 5535 12510 2295 1710 2295 1710 5535
    2052002 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     201         5490 4095 4770 4095 4770 4545 5490 4545 5490 4095
     2022 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     203         4590 4725 3870 4725 3870 5175 4590 5175 4590 4725
     2042 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     205         3690 4095 2970 4095 2970 4545 3690 4545 3690 4095
     2062 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     207         7290 3465 6570 3465 6570 3015 7290 3015 7290 3465
     2082 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    206209         5490 4545 4770 4545 4770 4995 5490 4995 5490 4545
    207 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    208          5490 4095 4770 4095 4770 4545 5490 4545 5490 4095
    209 2 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    210          4590 4725 3870 4725 3870 5175 4590 5175 4590 4725
    211 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    212          3690 4095 2970 4095 2970 4545 3690 4545 3690 4095
    2132104 1 0 50 -1 -1 12 0.0000 4 180 585 10170 4905 register\001
    2142114 1 0 50 -1 -1 12 1.5708 4 135 465 10935 3915 select\001
     
    2262234 1 0 50 -1 -1 12 0.0000 4 105 570 5130 4860 context\001
    2272244 1 0 50 -1 -1 12 0.0000 4 180 675 4230 4995 predictor\001
     2254 1 0 50 -1 -1 12 0.0000 4 135 555 6930 3285 commit\001
  • trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Schema/MORPHEO_micro_architecture-ex03.fig

    r81 r88  
    1281284 1 0 50 -1 -1 12 0.0000 4 135 540 10170 7695 dcache\001
    129129-6
    130 6 1890 3600 7650 6660
    1311306 5850 4995 6570 5445
    1321312 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     
    1341334 1 0 50 -1 -1 12 0.0000 4 90 555 6210 5265 rename\001
    135134-6
    136 6 6570 4320 7290 4770
    137 2 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    138          7290 4770 6570 4770 6570 4320 7290 4320 7290 4770
    139 4 1 0 50 -1 -1 12 0.0000 4 135 555 6930 4590 commit\001
    140 -6
    1411356 4770 4590 5490 5040
    1421362 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     
    1441384 1 0 50 -1 -1 12 0.0000 4 135 450 5130 4860 decod\001
    145139-6
     1406 3825 3960 4635 4410
     1412 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     142         4590 4410 3870 4410 3870 3960 4590 3960 4590 4410
     1434 1 0 50 -1 -1 12 0.0000 4 180 675 4230 4230 predictor\001
     144-6
     1456 2970 4590 3690 5040
     1462 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     147         3690 5040 2970 5040 2970 4590 3690 4590 3690 5040
     1484 1 0 50 -1 -1 12 0.0000 4 135 390 3330 4860 fetch\001
     149-6
     1506 1890 4995 2610 5445
     1512 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     152         2610 5445 1890 5445 1890 4995 2610 4995 2610 5445
     1534 1 0 50 -1 -1 12 0.0000 4 150 300 2250 5355 port\001
     1544 1 0 50 -1 -1 12 0.0000 4 135 495 2250 5175 icache\001
     155-6
    1461566 4770 4140 5490 4590
    147 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     1572 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    148158         5490 4590 4770 4590 4770 4140 5490 4140 5490 4590
    1491594 1 0 50 -1 -1 12 0.0000 4 105 570 5130 4320 context\001
    1501604 1 0 50 -1 -1 12 0.0000 4 105 390 5130 4500 state\001
    151161-6
    152 6 3825 3960 4635 4410
    153 2 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    154          4590 4410 3870 4410 3870 3960 4590 3960 4590 4410
    155 4 1 0 50 -1 -1 12 0.0000 4 180 675 4230 4230 predictor\001
    156 -6
    157 6 2970 4590 3690 5040
    158 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    159          3690 5040 2970 5040 2970 4590 3690 4590 3690 5040
    160 4 1 0 50 -1 -1 12 0.0000 4 135 390 3330 4860 fetch\001
    161 -6
    162 6 1890 4995 2610 5445
    163 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    164          2610 5445 1890 5445 1890 4995 2610 4995 2610 5445
    165 4 1 0 50 -1 -1 12 0.0000 4 150 300 2250 5355 port\001
    166 4 1 0 50 -1 -1 12 0.0000 4 135 495 2250 5175 icache\001
    167 -6
     1622 1 0 1 0 7 50 -1 20 3.000 0 0 -1 1 0 2
     163        3 0 1.00 60.00 120.00
     164         8010 3915 8370 3915
     1652 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 4
     166        3 0 1.00 60.00 120.00
     167         11970 3915 12150 3915 12150 3240 8010 3240
     1682 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2
     169        3 0 1.00 60.00 120.00
     170        3 0 1.00 60.00 120.00
     171         10170 2925 10170 3420
     1722 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2
     173        3 0 1.00 60.00 120.00
     174        3 0 1.00 60.00 120.00
     175         10170 7020 10170 7515
     1762 2 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 5
     177         1710 8145 12510 8145 12510 2295 1710 2295 1710 8145
     1782 4 0 1 0 7 50 -1 20 3.000 0 0 8 0 0 5
     179         8010 2880 8010 7560 7650 7560 7650 2880 8010 2880
     1802 1 0 1 0 7 50 -1 20 3.000 0 0 -1 1 0 2
     181        3 0 1.00 60.00 120.00
     182         8010 6525 8370 6525
     1832 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 4
     184        3 0 1.00 60.00 120.00
     185         11970 6525 12150 6525 12150 7200 8010 7200
    1681862 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 3
    169187        3 0 1.00 60.00 120.00
     
    256274         6930 4320 6930 4095 6030 4095 5130 3645 5130 4140
    2572752 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     276         5490 5400 4770 5400 4770 5850 5490 5850 5490 5400
     2772 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     278         4590 6030 3870 6030 3870 6480 4590 6480 4590 6030
     2792 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     280         3690 5400 2970 5400 2970 5850 3690 5850 3690 5400
     2812 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     282         7290 4770 6570 4770 6570 4320 7290 4320 7290 4770
     2832 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    258284         5490 5850 4770 5850 4770 6300 5490 6300 5490 5850
    259 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    260          5490 5400 4770 5400 4770 5850 5490 5850 5490 5400
    261 2 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    262          4590 6030 3870 6030 3870 6480 4590 6480 4590 6030
    263 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    264          3690 5400 2970 5400 2970 5850 3690 5850 3690 5400
     2854 0 1 50 -1 -1 12 0.0000 4 135 360 1710 2205 Core\001
     2864 0 1 50 -1 -1 12 0.0000 4 180 1185 8190 3015 Execution Loop\001
     2874 1 0 50 -1 -1 12 1.5708 4 135 465 7875 5220 select\001
    2652884 0 1 50 -1 -1 12 0.0000 4 180 1575 5760 3825 Out Of Order Engine\001
    2662894 0 1 50 -1 -1 12 0.0000 4 135 750 2790 3735 Front End\001
     
    2702934 1 0 50 -1 -1 12 0.0000 4 105 570 5130 6165 context\001
    2712944 1 0 50 -1 -1 12 0.0000 4 180 675 4230 6300 predictor\001
    272 -6
    273 2 1 0 1 0 7 50 -1 20 3.000 0 0 -1 1 0 2
    274         3 0 1.00 60.00 120.00
    275          8010 3915 8370 3915
    276 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 4
    277         3 0 1.00 60.00 120.00
    278          11970 3915 12150 3915 12150 3240 8010 3240
    279 2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2
    280         3 0 1.00 60.00 120.00
    281         3 0 1.00 60.00 120.00
    282          10170 2925 10170 3420
    283 2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2
    284         3 0 1.00 60.00 120.00
    285         3 0 1.00 60.00 120.00
    286          10170 7020 10170 7515
    287 2 2 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 5
    288          1710 8145 12510 8145 12510 2295 1710 2295 1710 8145
    289 2 4 0 1 0 7 50 -1 20 3.000 0 0 8 0 0 5
    290          8010 2880 8010 7560 7650 7560 7650 2880 8010 2880
    291 2 1 0 1 0 7 50 -1 20 3.000 0 0 -1 1 0 2
    292         3 0 1.00 60.00 120.00
    293          8010 6525 8370 6525
    294 2 1 0 1 0 7 50 -1 -1 3.000 0 0 -1 1 0 4
    295         3 0 1.00 60.00 120.00
    296          11970 6525 12150 6525 12150 7200 8010 7200
    297 4 0 1 50 -1 -1 12 0.0000 4 135 360 1710 2205 Core\001
    298 4 0 1 50 -1 -1 12 0.0000 4 180 1185 8190 3015 Execution Loop\001
    299 4 1 0 50 -1 -1 12 1.5708 4 135 465 7875 5220 select\001
     2954 1 0 50 -1 -1 12 0.0000 4 135 555 6930 4590 commit\001
  • trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Schema/MORPHEO_micro_architecture-ex04.fig

    r81 r88  
    157157         7470 4320 5760 4320 5760 2610 7470 2610 7470 4320
    158158-6
    159 6 2790 2880 5580 4320
     1596 1890 6300 2610 6750
     1602 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     161         2610 6750 1890 6750 1890 6300 2610 6300 2610 6750
     1624 1 0 50 -1 -1 12 0.0000 4 150 300 2250 6660 port\001
     1634 1 0 50 -1 -1 12 0.0000 4 135 495 2250 6480 icache\001
     164-6
    1601656 4770 3690 5490 4140
    1611662 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     
    1631684 1 0 50 -1 -1 12 0.0000 4 135 450 5130 3960 decod\001
    164169-6
     1706 3825 3060 4635 3510
     1712 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     172         4590 3510 3870 3510 3870 3060 4590 3060 4590 3510
     1734 1 0 50 -1 -1 12 0.0000 4 180 675 4230 3330 predictor\001
     174-6
     1756 2970 3690 3690 4140
     1762 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     177         3690 4140 2970 4140 2970 3690 3690 3690 3690 4140
     1784 1 0 50 -1 -1 12 0.0000 4 135 390 3330 3960 fetch\001
     179-6
    1651806 4770 3240 5490 3690
    166 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     1812 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    167182         5490 3690 4770 3690 4770 3240 5490 3240 5490 3690
    1681834 1 0 50 -1 -1 12 0.0000 4 105 570 5130 3420 context\001
    1691844 1 0 50 -1 -1 12 0.0000 4 105 390 5130 3600 state\001
    170 -6
    171 6 3825 3060 4635 3510
    172 2 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    173          4590 3510 3870 3510 3870 3060 4590 3060 4590 3510
    174 4 1 0 50 -1 -1 12 0.0000 4 180 675 4230 3330 predictor\001
    175 -6
    176 6 2970 3690 3690 4140
    177 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    178          3690 4140 2970 4140 2970 3690 3690 3690 3690 4140
    179 4 1 0 50 -1 -1 12 0.0000 4 135 390 3330 3960 fetch\001
    180 -6
    181 2 1 0 1 0 31 50 -1 -1 4.000 0 0 -1 1 1 3
    182         3 0 1.00 60.00 120.00
    183         3 0 1.00 60.00 120.00
    184          4410 3510 4410 3870 4770 3870
    185 2 1 0 1 0 31 50 -1 -1 4.000 0 0 -1 1 1 3
    186         3 0 1.00 60.00 120.00
    187         3 0 1.00 60.00 120.00
    188          4050 3510 4050 3870 3690 3870
    189 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
    190         3 0 1.00 60.00 120.00
    191          3780 3960 4770 3960
    192 2 4 0 1 0 11 51 -1 20 0.000 0 0 7 0 0 5
    193          3780 4050 3060 4050 3060 3600 3780 3600 3780 4050
    194 2 1 0 1 0 31 50 -1 -1 4.000 0 0 -1 1 1 3
    195         3 0 1.00 60.00 120.00
    196         3 0 1.00 60.00 120.00
    197          3960 3510 3960 3780 3780 3780
    198 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
    199         3 0 1.00 60.00 120.00
    200          3690 4050 4770 4050
    201 2 2 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 5
    202          5580 2880 2790 2880 2790 4320 5580 4320 5580 2880
    203 -6
    204 6 1890 6300 2610 6750
    205 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    206          2610 6750 1890 6750 1890 6300 2610 6300 2610 6750
    207 4 1 0 50 -1 -1 12 0.0000 4 150 300 2250 6660 port\001
    208 4 1 0 50 -1 -1 12 0.0000 4 135 495 2250 6480 icache\001
    209185-6
    2101862 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 3
     
    292268         3690 6390 4770 6390
    2932692 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    294          5490 6750 4770 6750 4770 7200 5490 7200 5490 6750
    295 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    296270         5490 6300 4770 6300 4770 6750 5490 6750 5490 6300
    2972712 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     
    3142882 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    315289         6570 6300 5850 6300 5850 6750 6570 6750 6570 6300
     2902 1 0 1 0 31 50 -1 -1 4.000 0 0 -1 1 1 3
     291        3 0 1.00 60.00 120.00
     292        3 0 1.00 60.00 120.00
     293         4410 3510 4410 3870 4770 3870
     2942 1 0 1 0 31 50 -1 -1 4.000 0 0 -1 1 1 3
     295        3 0 1.00 60.00 120.00
     296        3 0 1.00 60.00 120.00
     297         4050 3510 4050 3870 3690 3870
     2982 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
     299        3 0 1.00 60.00 120.00
     300         3780 3960 4770 3960
     3012 4 0 1 0 11 51 -1 20 0.000 0 0 7 0 0 5
     302         3780 4050 3060 4050 3060 3600 3780 3600 3780 4050
     3032 1 0 1 0 31 50 -1 -1 4.000 0 0 -1 1 1 3
     304        3 0 1.00 60.00 120.00
     305        3 0 1.00 60.00 120.00
     306         3960 3510 3960 3780 3780 3780
     3072 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
     308        3 0 1.00 60.00 120.00
     309         3690 4050 4770 4050
     3102 2 2 1 0 7 50 -1 -1 3.000 0 0 -1 0 0 5
     311         5580 2880 2790 2880 2790 4320 5580 4320 5580 2880
     3122 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     313         5490 6750 4770 6750 4770 7200 5490 7200 5490 6750
    3163144 0 1 50 -1 -1 12 0.0000 4 135 360 1710 2205 Core\001
    3173154 0 1 50 -1 -1 12 0.0000 4 180 1575 5760 2520 Out Of Order Engine\001
     
    3243224 1 0 50 -1 -1 12 0.0000 4 105 570 5130 7065 context\001
    3253234 1 0 50 -1 -1 12 0.0000 4 180 675 4230 7200 predictor\001
    326 4 1 0 50 -1 -1 12 6.2832 4 135 555 6930 7245 commit\001
    327 4 1 0 50 -1 -1 12 6.2832 4 90 555 6210 6525 rename\001
     3244 1 0 50 -1 -1 12 0.0000 4 135 555 6930 7245 commit\001
     3254 1 0 50 -1 -1 12 0.0000 4 90 555 6210 6525 rename\001
  • trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Schema/MORPHEO_micro_architecture-overview.fig

    r81 r88  
    1 #FIG 3.2  Produced by xfig version 3.2.5
     1#FIG 3.2
    22Landscape
    33Center
     
    88-2
    991200 2
    10 6 4770 3240 5490 3690
    11 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    12          5490 3690 4770 3690 4770 3240 5490 3240 5490 3690
    13 4 1 0 50 -1 -1 12 0.0000 4 120 645 5130 3420 context\001
    14 4 1 0 50 -1 -1 12 0.0000 4 120 420 5130 3600 state\001
    15 -6
    16106 8370 3690 9090 4140
    17112 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    1812         9090 4140 8370 4140 8370 3690 9090 3690 9090 4140
    19 4 1 0 50 -1 -1 12 0.0000 4 150 390 8730 3960 read\001
     134 1 0 50 -1 -1 12 0.0000 4 135 330 8730 3960 read\001
    2014-6
    21156 11250 3690 11970 4140
    22162 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    2317         11970 4140 11250 4140 11250 3690 11970 3690 11970 4140
    24 4 1 0 50 -1 -1 12 0.0000 4 150 450 11610 3960 write\001
     184 1 0 50 -1 -1 12 0.0000 4 135 390 11610 3960 write\001
    2519-6
    26206 9810 2475 10530 2925
    27212 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    2822         10530 2925 9810 2925 9810 2475 10530 2475 10530 2925
    29 4 1 0 50 -1 -1 12 0.0000 4 165 345 10170 2835 port\001
    30 4 1 0 50 -1 -1 12 0.0000 4 150 630 10170 2655 dcache\001
     234 1 0 50 -1 -1 12 0.0000 4 150 300 10170 2835 port\001
     244 1 0 50 -1 -1 12 0.0000 4 135 540 10170 2655 dcache\001
    3125-6
    32266 3825 3060 4635 3510
    33272 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    3428         4590 3510 3870 3510 3870 3060 4590 3060 4590 3510
    35 4 1 0 50 -1 -1 12 0.0000 4 195 780 4230 3330 predictor\001
    36 -6
    37 6 2970 3690 3690 4140
    38 2 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    39          3690 4140 2970 4140 2970 3690 3690 3690 3690 4140
    40 4 1 0 50 -1 -1 12 0.0000 4 150 435 3330 3960 fetch\001
     294 1 0 50 -1 -1 12 0.0000 4 180 675 4230 3330 predictor\001
    4130-6
    42316 1890 3690 2610 4140
    43322 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    4433         2610 4140 1890 4140 1890 3690 2610 3690 2610 4140
    45 4 1 0 50 -1 -1 12 0.0000 4 165 345 2250 4050 port\001
    46 4 1 0 50 -1 -1 12 0.0000 4 150 570 2250 3870 icache\001
     344 1 0 50 -1 -1 12 0.0000 4 150 300 2250 4050 port\001
     354 1 0 50 -1 -1 12 0.0000 4 135 495 2250 3870 icache\001
    4736-6
    48376 1800 4590 5265 5355
     
    53422 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    5443         2160 5310 1800 5310 1800 5130 2160 5130 2160 5310
    55 4 0 0 50 -1 -1 12 0.0000 4 195 660 2340 4770 Groupe\001
    56 4 0 0 50 -1 -1 12 0.0000 4 195 2610 2340 5310 Une occurence dans le groupe\001
    57 4 0 0 50 -1 -1 12 0.0000 4 195 3120 2340 5040 Plusieurs occurences dans le groupe\001
     444 0 0 50 -1 -1 12 0.0000 4 180 555 2340 4770 Groupe\001
     454 0 0 50 -1 -1 12 0.0000 4 180 2280 2340 5310 Une occurence dans le groupe\001
     464 0 0 50 -1 -1 12 0.0000 4 180 2760 2340 5040 Plusieurs occurences dans le groupe\001
    5847-6
    59486 6570 3015 7290 3465
    60492 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    6150         7290 3465 6570 3465 6570 3015 7290 3015 7290 3465
    62 4 1 0 50 -1 -1 12 0.0000 4 150 645 6930 3285 commit\001
    63 -6
    64 6 4770 3690 5490 4140
    65 2 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
    66          5490 4140 4770 4140 4770 3690 5490 3690 5490 4140
    67 4 1 0 50 -1 0 12 0.0000 4 150 525 5130 3960 decod\001
     514 1 0 50 -1 -1 12 0.0000 4 135 555 6930 3285 commit\001
    6852-6
    69532 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 4
     
    1651492 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    166150         10530 3870 9810 3870 9810 3420 10530 3420 10530 3870
     1512 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     152         3690 4140 2970 4140 2970 3690 3690 3690 3690 4140
     1532 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
     154         5490 4140 4770 4140 4770 3690 5490 3690 5490 4140
    1671552 4 0 1 0 31 50 -1 20 4.000 0 0 7 0 0 5
     156         5490 3690 4770 3690 4770 3240 5490 3240 5490 3690
     1572 4 0 1 0 11 50 -1 20 4.000 0 0 7 0 0 5
    168158         6570 4140 5850 4140 5850 3690 6570 3690 6570 4140
    169 4 1 0 50 -1 -1 12 0.0000 4 195 660 10170 4905 register\001
    170 4 1 0 50 -1 -1 12 1.5708 4 150 510 10935 3915 select\001
    171 4 1 0 50 -1 -1 12 1.5708 4 150 510 9495 3915 select\001
    172 4 0 1 50 -1 -1 12 0.0000 4 150 435 1710 2205 Core\001
    173 4 0 1 50 -1 -1 12 0.0000 4 150 855 2790 2790 Front End\001
    174 4 0 1 50 -1 -1 12 0.0000 4 195 1365 8190 3015 Execution Loop\001
    175 4 0 1 50 -1 -1 12 0.0000 4 195 1770 5760 2520 Out Of Order Engine\001
    176 4 1 0 50 -1 -1 12 1.5708 4 150 510 7875 3600 select\001
    177 4 1 0 50 -1 -1 12 0.0000 4 120 690 10170 4230 execute\001
    178 4 1 0 50 -1 -1 12 0.0000 4 150 720 10170 3690 memory\001
    179 4 1 0 50 -1 0 12 0.0000 4 105 660 6210 3960 rename\001
     1594 1 0 50 -1 -1 12 0.0000 4 180 585 10170 4905 register\001
     1604 1 0 50 -1 -1 12 1.5708 4 135 465 10935 3915 select\001
     1614 1 0 50 -1 -1 12 1.5708 4 135 465 9495 3915 select\001
     1624 0 1 50 -1 -1 12 0.0000 4 135 360 1710 2205 Core\001
     1634 0 1 50 -1 -1 12 0.0000 4 135 750 2790 2790 Front End\001
     1644 0 1 50 -1 -1 12 0.0000 4 180 1185 8190 3015 Execution Loop\001
     1654 0 1 50 -1 -1 12 0.0000 4 180 1575 5760 2520 Out Of Order Engine\001
     1664 1 0 50 -1 -1 12 1.5708 4 135 465 7875 3600 select\001
     1674 1 0 50 -1 -1 12 0.0000 4 105 600 10170 4230 execute\001
     1684 1 0 50 -1 -1 12 0.0000 4 135 600 10170 3690 memory\001
     1694 1 0 50 -1 0 12 0.0000 4 90 555 6210 3960 rename\001
     1704 1 0 50 -1 -1 12 0.0000 4 135 390 3330 3960 fetch\001
     1714 1 0 50 -1 0 12 0.0000 4 135 450 5130 3960 decod\001
     1724 1 0 50 -1 -1 12 0.0000 4 105 570 5130 3420 context\001
     1734 1 0 50 -1 -1 12 0.0000 4 105 390 5130 3600 state\001
  • trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Schema/VHDL_methodologie.fig

    r81 r88  
    88-2
    991200 2
    10 6 -1425 -600 2850 4050
     106 900 -1500 2100 -750
     116 900 -1500 2100 -1200
     122 4 0 1 0 30 51 -1 20 0.000 0 0 7 0 0 5
     13         2100 -1200 900 -1200 900 -1500 2100 -1500 2100 -1200
     144 1 0 50 -1 2 8 0.0000 0 105 315 1500 -1350 D\351but\001
     15-6
     162 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
     17        3 0 1.00 60.00 120.00
     18         1500 -1200 1500 -750
     19-6
    11201 1 0 1 0 6 51 -1 20 0.000 1 0.0000 -750 750 600 225 -750 750 -150 525
     211 1 0 1 0 6 51 -1 20 0.000 1 0.0000 1500 3075 600 225 1500 3075 2100 2850
     221 1 0 1 0 6 51 -1 20 0.000 1 0.0000 1500 375 600 225 1500 375 2100 150
    12231 1 0 1 0 6 51 -1 20 0.000 1 0.0000 1500 2175 600 225 1500 2175 2100 1950
    13 1 1 0 1 0 6 51 -1 20 0.000 1 0.0000 1500 3075 600 225 1500 3075 2100 2850
    14242 1 0 1 0 7 50 -1 20 0.000 0 0 -1 1 0 2
    1525        3 0 1.00 60.00 120.00
    16          1650 600 2250 1050
    17 2 1 0 1 0 7 50 -1 20 0.000 0 0 -1 1 0 2
    18         3 0 1.00 60.00 120.00
    19          1350 600 1050 1050
     26         1500 825 2250 1050
    20272 1 0 1 0 7 50 -1 20 0.000 0 0 -1 1 0 2
    2128        3 0 1.00 60.00 120.00
     
    38452 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 4
    3946        3 0 1.00 60.00 120.00
    40          -750 525 -750 -75 1200 -75 1200 150
     47         -750 525 -750 -975 1200 -975 1200 -750
    41482 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 3
    4249        3 0 1.00 60.00 120.00
    4350         900 3075 -750 3075 -750 975
    44 2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
    45         3 0 1.00 60.00 120.00
    46          1500 -300 1500 150
    47 2 4 0 1 0 30 51 -1 20 0.000 0 0 7 0 0 5
    48          2100 -300 900 -300 900 -600 2100 -600 2100 -300
    49512 4 0 1 0 30 51 -1 20 0.000 0 0 7 0 0 5
    5052         2100 4050 900 4050 900 3750 2100 3750 2100 4050
    51 2 4 0 1 0 11 51 -1 20 0.000 0 0 7 0 0 5
    52          2100 600 900 600 900 150 2100 150 2100 600
    53532 4 0 1 0 11 51 -1 20 0.000 0 0 7 0 0 5
    5454         1350 1500 150 1500 150 1050 1350 1050 1350 1500
    55552 4 0 1 0 11 51 -1 20 0.000 0 0 7 0 0 5
    5656         2850 1500 1650 1500 1650 1050 2850 1050 2850 1500
    57 4 1 0 50 -1 2 8 0.0000 0 75 240 1500 2175 Test\001
    58 4 1 0 50 -1 2 8 0.0000 0 90 990 2250 1275 TestBench VHDL\001
    59 4 1 0 50 -1 2 8 0.0000 0 105 1005 750 1275 G\351n\351rateur VHDL\001
    60 4 1 0 50 -1 2 8 0.0000 0 105 465 1500 375 SystemC\001
    61 4 1 0 50 -1 2 8 0.0000 0 90 1050 -750 675 Modification locale\001
    62 4 1 0 50 -1 2 8 0.0000 0 105 1035 -750 825 (micro architecture)\001
    63 4 1 0 50 -1 2 8 0.0000 0 105 315 1500 -450 D\351but\001
    64 4 1 0 50 -1 2 8 0.0000 0 135 810 1500 3075 Synth\350tisable ?\001
    65 4 1 0 50 -1 2 8 0.0000 0 90 195 1500 3900 Fin\001
    66 -6
     572 1 0 1 0 7 50 -1 20 0.000 0 0 7 1 0 2
     58        3 0 1.00 60.00 120.00
     59         1500 825 1050 1050
     602 1 0 1 0 7 50 -1 20 0.000 0 0 -1 0 0 2
     61         1500 600 1500 825
     622 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 5
     63        3 0 1.00 60.00 120.00
     64         2100 375 2250 375 2250 -900 1800 -900 1800 -750
     652 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
     66        3 0 1.00 60.00 120.00
     67         1500 -300 1500 150
     682 4 0 1 0 11 51 -1 20 0.000 0 0 7 0 0 5
     69         2100 -300 900 -300 900 -750 2100 -750 2100 -300
    67704 0 0 51 -1 0 8 0.0000 0 75 120 1575 3450 ok\001
    68714 0 0 51 -1 0 8 0.0000 0 75 315 -75 675 locale\001
    69724 0 0 51 -1 0 8 0.0000 0 90 375 -675 450 globale\001
    70734 2 0 51 -1 0 8 0.0000 0 75 120 900 3000 ko\001
    71 4 2 0 51 -1 0 8 0.0000 0 75 120 900 2100 ko\001
     744 1 0 50 -1 2 8 0.0000 0 90 1050 -750 675 Modification locale\001
     754 1 0 50 -1 2 8 0.0000 0 105 1035 -750 825 (micro architecture)\001
     764 1 0 50 -1 2 8 0.0000 0 135 810 1500 3075 Synth\350tisable ?\001
     774 1 0 50 -1 2 8 0.0000 0 90 195 1500 3900 Fin\001
     784 0 0 51 -1 0 8 0.0000 0 75 120 1575 750 ok\001
     794 1 0 50 -1 2 8 0.0000 0 75 240 1500 375 Test\001
     804 0 0 51 -1 0 8 0.0000 0 75 120 2025 225 ko\001
    72814 0 0 51 -1 0 8 0.0000 0 75 120 1575 2550 ok\001
     824 1 0 50 -1 2 8 0.0000 0 75 240 1500 2175 Test\001
     834 2 0 51 -1 0 8 0.0000 0 75 120 825 2025 ko\001
     844 1 0 50 -1 2 8 0.0000 0 75 375 750 1425 VHDL\001
     854 1 0 50 -1 2 8 0.0000 0 75 375 2250 1425 VHDL\001
     864 1 0 50 -1 2 8 0.0000 0 90 615 2250 1200 TestBench \001
     874 1 0 50 -1 2 8 0.0000 0 105 465 1500 -375 SystemC\001
     884 1 0 50 -1 2 8 0.0000 0 105 450 750 1200 Mod\350le \001
     894 1 0 50 -1 2 8 0.0000 0 105 450 1500 -600 Mod\350le \001
  • trunk/IPs/systemC/processor/Morpheo/Makefile

    r81 r88  
    1 include $(MORPHEO_TOPLEVEL)/Makefile.tools
     1#
     2# $Id$
     3#
     4# [ Description ]
     5#
     6# Makefile
     7#
     8
     9#----------------------------------------------------------------------
     10#----------------------------------------------------------------------
     11#-----[ Variables ]----------------------------------------------------
     12#----------------------------------------------------------------------
     13#----------------------------------------------------------------------
    214
    315#-----[ Directory ]----------------------------------------------------
    4 DIR_LIB                 = Library
    5 DIR_DOC                 = Documentation/Source
     16DIR_DOC                 = ./Documentation/Source
     17DIR_LOCALE              = ./locale
    618
    7 #-----[ Options ]------------------------------------------------------
     19#----------------------------------------------------------------------
     20#----------------------------------------------------------------------
     21#-----[ Rules ]--------------------------------------------------------
     22#----------------------------------------------------------------------
     23#----------------------------------------------------------------------
     24.PHONY                  : all help lib translate clean clean_all
    825
    9 PREFIXE_PATH            = "."
    10 SUFFIXE_PATH            = ".txt"
     26all                     : doc translate lib
    1127
    12 #-----[ Rules ]--------------------------------------------------------
    13 .PHONY                  : all help
    14 
    15 all                     : help
    16 
    17 #~~~~~[ doc ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1828doc                     :
    1929                        @\
    20                         $(ECHO) "";\
    21                         $(ECHO) "=====[ doc ]=====================================";\
    22                         $(ECHO) "";\
    23                         $(MAKE) -C $(DIR_DOC) view;
     30                        $(MAKE) -C $(DIR_DOC) doc;
    2431
    25 #~~~~~[ path ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    26 path                    :
     32lib                     : Morpheo_library
     33
     34translate               :
    2735                        @\
    28                         $(ECHO) "";\
    29                         $(ECHO) "=====[ path ]====================================";\
    30                         $(ECHO) "";\
    31                         $(ECHO) -n "+ ";\
    32                         $(BASENAME) $(PWD);\
    33                         $(ECHO) "| <Top Level>";\
    34                         $(ECHO) "|";\
    35                         $(MAKE) path_rec TAB="|    " DIR_PATH=.;
     36                        for i in $(DIR_LOCALE)/*/*/*.po; do             \
     37                                dir=$$($(DIRNAME) $$i);                 \
     38                                file=$$($(BASENAME) $$i .po);           \
     39                                $(ECHO) "Translate          : $$i";     \
     40                                $(MSGFMT) $$i -o $$dir/$$file.mo;       \
     41                        done
    3642
    37 path_rec                :
    38                         @\
    39                         for files in `$(LS) $(DIR_PATH)`; do                                                            \
    40                                 if $(TEST) -d $(DIR_PATH)/$$files;                                                      \
    41                                 then                                                                                    \
    42                                         $(ECHO) "$(TAB)+ $$files";                                                      \
    43                                                                                                                         \
    44                                         if test -f $(DIR_PATH)/$(PREFIXE_PATH)`$(BASENAME) $$files`$(SUFFIXE_PATH);     \
    45                                         then                                                                            \
    46                                                 $(ECHO) "$(TAB)| <\c";                                                  \
    47                                                 $(CAT) $(DIR_PATH)/$(PREFIXE_PATH)`$(BASENAME) $$files`$(SUFFIXE_PATH); \
    48                                                 $(ECHO) ">";                                                            \
    49                                         else                                                                            \
    50                                                 $(ECHO) "$(TAB)| <No description>";                                     \
    51                                         fi;                                                                             \
    52                                         $(ECHO) "$(TAB)|";                                                              \
    53                                                                                                                         \
    54                                         $(MAKE) path_rec TAB="$(TAB)|    " DIR_PATH=$(DIR_PATH)/$$files;                \
    55                                 fi;                                                                                     \
    56                         done;
    57 
    58 #~~~~~[ Lib ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    59 
    60 lib                     :
    61                         @\
    62                         $(ECHO) "";\
    63                         $(ECHO) "=====[ lib ]=====================================";\
    64                         $(ECHO) "";\
    65                         $(ECHO) " Function unimplemented";\
    66                         $(ECHO) "";
    67 
    68 #                       @$(ECHO) " The library is generate into the directory : $(PWD)/$(DIR_LIB)"
    69 
    70 #~~~~~[ Maintenance ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     43#~~~~~[ Clean ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    7144
    7245clean                   :
    7346                        @\
    74                         $(ECHO) "";\
    75                         $(ECHO) "=====[ clean ]===================================";\
    76                         $(ECHO) "";\
    77                         $(ECHO) "Delete     temporary files              "$(PWD);\
    78                         $(RM) *~;
    79 #                       @$(MAKE) clean_rec DIR_CLEAN=.
     47                        $(RM) *~;\
     48                        $(MAKE) -C $(DIR_DOC) clean;
    8049
    81 #Clean recursive
    82 #clean_rec              :
    83 #                       @$(ECHO) "Delete     temporary files in directory $(DIR_CLEAN)"
    84 #                       @$(RM) -f $(DIR_CLEAN)/*~
    85 #                       @                                                                               \
    86 #                       if $(TEST) -f $(DIR_CLEAN)/Makefile -a "$(DIR_CLEAN)" != ".";                   \
    87 #                       then                                                                            \
    88 #                               ($(CD) $(DIR_CLEAN); $(MAKE) clean;)                                    \
    89 #                       else                                                                            \
    90 #                               for files in `$(LS) $(DIR_CLEAN)`; do                                   \
    91 #                                       if $(TEST) -d $(DIR_CLEAN)/$$files;                             \
    92 #                                       then                                                            \
    93 #                                               $(MAKE) clean_rec DIR_CLEAN=$(DIR_CLEAN)/$$files;       \
    94 #                                       fi;                                                             \
    95 #                               done;                                                                   \
    96 #                       fi;
     50
     51clean_all               :
     52                        @\
     53                        $(RM) *~ $(DIR_LOCALE)/*/*/*.mo;\
     54                        $(MAKE) -C $(DIR_DOC) clean_all;\
     55                        $(MAKE)  Morpheo_library_clean
     56
    9757
    9858#~~~~~[ Help ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     
    10767                        $(ECHO) " * all              cf rule \"help\"";\
    10868                        $(ECHO) " * clean            Delete temporary files";\
     69                        $(ECHO) " * clean_all        Delete all generated files";\
    10970                        $(ECHO) " * doc              View documentation files";\
     71                        $(ECHO) " * help             Print this message";\
    11072                        $(ECHO) " * lib              Generate the library to include";\
    111                         $(ECHO) " * help             Print this message";\
    112                         $(ECHO) " * path             Print a little description of each directory";\
     73                        $(ECHO) " * translate        Generate the traduction";\
    11374                        $(ECHO) "";
    11475
     76include Makefile.deps
  • trunk/IPs/systemC/processor/Morpheo/Script/SelfTest.sh

    r85 r88  
    1010declare    test_ok="Test OK";
    1111declare    tmp="${MORPHEO_HOME}/tmp/SelfTest";
    12 declare    path="${MORPHEO_TOPLEVEL}/IPs/systemC/processor/Morpheo/Behavioural";
     12declare    path="${MORPHEO_TOPLEVEL}/IPs/systemC/processor/Morpheo/";
    1313
    1414declare -a directory=(
    15     ""
    16     "Custom"
    17 
    18     "Generic/Counter"
    19     "Generic/Queue_Control"                                 
    20     "Generic/Queue"                                 
    21     "Generic/RegisterFile/RegisterFile_Monolithic" 
    22     "Generic/RegisterFile/RegisterFile_Multi_Banked"
    23     "Generic/RegisterFile"                         
    24     "Generic/Select/Select_Priority_Fixed"           
    25     "Generic/Select"                               
    26     "Generic/Shifter"                               
    27     "Generic/Sort"                                 
    28     "Generic/Victim/Victim_Pseudo_LRU"             
    29     "Generic/Victim"                               
    30 
    31     "Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation"
    32     "Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit"
    33     "Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit"
    34     "Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit"
    35     "Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit"
    36     "Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue"
    37     "Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station"
    38     "Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit"
    39     "Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit"
    40     "Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue"
    41     "Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue"
    42     "Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit"
    43     "Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit"
    44     "Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit"
    45     "Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit"
    46     "Core/Multi_Execute_loop/Execute_loop/Network"
    47     "Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue"
    48     "Core/Multi_Execute_loop/Execute_loop/Register_unit"
    49 #   "Core/Multi_Execute_loop/Execute_loop"
    50 #   "Core/Multi_Execute_loop"
    51 
    52     "Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit"
    53     "Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit"
    54     "Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit"
    55     "Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit"
    56     "Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue"
    57     "Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit"
    58     "Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit"
    59     "Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_queue"
    60     "Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select"
    61     "Core/Multi_OOO_Engine/OOO_Engine/Rename_unit"
    62     "Core/Multi_OOO_Engine/OOO_Engine"
    63     "Core/Multi_OOO_Engine"
     15    "Common"
     16
     17    "Behavioural"
     18    "Behavioural/Configuration"
     19    "Behavioural/Custom"
     20
     21    "Behavioural/Generic/Counter"
     22    "Behavioural/Generic/Priority"
     23    "Behavioural/Generic/Queue_Control"                                 
     24    "Behavioural/Generic/Queue"                                 
     25    "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic" 
     26    "Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked"
     27    "Behavioural/Generic/RegisterFile"                         
     28    "Behavioural/Generic/Select/Select_Priority_Fixed"           
     29    "Behavioural/Generic/Select"                               
     30    "Behavioural/Generic/Shifter"                               
     31    "Behavioural/Generic/Sort"                                 
     32    "Behavioural/Generic/Victim/Victim_Pseudo_LRU"             
     33    "Behavioural/Generic/Victim"                               
     34
     35    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue"
     36    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation"
     37    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit"
     38    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit"
     39    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit"
     40    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit"
     41    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue"
     42    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station"
     43    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit"
     44    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit"
     45    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue"
     46    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue"
     47    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit"
     48    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit"
     49    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit"
     50    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit"
     51    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Network"
     52    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue"
     53    "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit"
     54    "Behavioural/Core/Multi_Execute_loop/Execute_loop"
     55    "Behavioural/Core/Multi_Execute_loop"
     56
     57    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit"
     58    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue"
     59    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue"
     60    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit"
     61    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit"
     62    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit"
     63    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit"
     64    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit"
     65    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue"
     66    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit"
     67    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit"
     68    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue"
     69    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select"
     70    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit"
     71    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit"
     72    "Behavioural/Core/Multi_OOO_Engine/OOO_Engine"
     73    "Behavioural/Core/Multi_OOO_Engine"
    6474   
    65     "Core/Multi_Front_end/Front_end/Context_State"
    66     "Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction"
    67     "Core/Multi_Front_end/Front_end/Decod_unit/Decod"
    68     "Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue"
    69     "Core/Multi_Front_end/Front_end/Decod_unit"
    70     "Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management"
    71     "Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue"
    72     "Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue"
    73     "Core/Multi_Front_end/Front_end/Ifetch_unit"
    74     "Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue"
    75     "Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register"
    76     "Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer"
    77     "Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue"
    78     "Core/Multi_Front_end/Front_end/Prediction_unit/Direction"
    79 #   "Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue"
    80 #   "Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue"
    81 #   "Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table"
    82 #   "Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table"
    83 #   "Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor"
    84 #   "Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor"
    85     "Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue"
    86     "Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack"
    87     "Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table"
    88     "Core/Multi_Front_end/Front_end/Prediction_unit"
    89     "Core/Multi_Front_end/Front_end"
    90     "Core/Multi_Front_end"
    91 
     75    "Behavioural/Core/Multi_Front_end/Front_end/Context_State"
     76    "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction"
     77    "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod"
     78    "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue"
     79    "Behavioural/Core/Multi_Front_end/Front_end/Decod_unit"
     80    "Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue"
     81    "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management"
     82    "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue"
     83    "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue"
     84    "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit"
     85    "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue"
     86    "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register"
     87    "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer"
     88    "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue"
     89    "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction"
     90#   "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue"
     91#   "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue"
     92#   "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Branch_History_Table"
     93#   "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table"
     94#   "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor"
     95#   "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor"
     96    "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue"
     97    "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack"
     98    "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table"
     99    "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit"
     100    "Behavioural/Core/Multi_Front_end/Front_end"
     101    "Behavioural/Core/Multi_Front_end"
     102
     103    "Behavioural/Core/Icache_Access"
     104    "Behavioural/Core/Dcache_Access"
     105
     106    "Behavioural/Core/Core_Glue"
     107    "Behavioural/Core"
     108
     109    "TopLevel"
    92110    );
    93111                                           
     
    126144
    127145    if test ! -d ${tmp}; then
    128         mkdir ${tmp};
     146        mkdir -p ${tmp};
    129147    fi;
    130148
     
    212230
    213231                cd ${path}/${i};
    214                 make clean;
    215                 dir="SelfTest";
    216 
    217                 if test -d ${dir}; then
    218                     cd ${dir};
     232
     233                if test -f "Makefile"; then
    219234                    make clean;
    220                 else
    221                     echo "${component} have not SelfTest directory.";
    222                 fi;
    223                 cd ${pwd};
    224 
     235                    dir="SelfTest";
     236                   
     237                    if test -d ${dir}; then
     238                        cd ${dir};
     239                        make clean;
     240                    else
     241                        echo "${component} have not SelfTest directory.";
     242                    fi;
     243                    cd ${pwd};
     244                fi;
    225245            done;
    226246            ;;
  • trunk/IPs/systemC/processor/Morpheo/Script/version.sh

    r85 r88  
    77file_sed_src="${MORPHEO_TOPLEVEL}/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h.sed";
    88file_sed_dest="${MORPHEO_TOPLEVEL}/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h";
     9file_sed_script="/tmp/file_sed_script";
    910
    1011#-----[ usage ]---------------------------------------------
     
    4748            # +1 because is the next revision
    4849            revision=$(($(export LC_ALL=C; svnversion  | tr -d [:alpha:] | cut -d : -f 2) + 1));
    49    
    50             cat ${file_sed_src} |sed s/"@REVISION"/"${revision}"/ &> ${file_sed_dest};
    51    
     50            date_day=$(date +%d);
     51            date_month=$(date +%m);
     52            date_year=$(date +%Y);
     53           
     54            echo "s/\"@REVISION\"/\"${revision}\"/"     >  ${file_sed_script};
     55            echo "s/\"@DATE_DAY\"/\"${date_day}\"/"     >> ${file_sed_script};
     56            echo "s/\"@DATE_MONTH\"/\"${date_month}\"/" >> ${file_sed_script};
     57            echo "s/\"@DATE_YEAR\"/\"${date_year}\"/"   >> ${file_sed_script};
     58
     59            cat ${file_sed_src} |sed -f ${file_sed_script} &> ${file_sed_dest};
     60
     61            rm ${file_sed_script};
     62           
    5263            svn commit;
    5364
  • trunk/IPs/systemC/processor/Morpheo/locale/fr/LC_MESSAGES/morpheo.po

    r82 r88  
     1msgid  "Read file \"%s\"."
     2msgstr "Lecture du fichier \"%s\"."
Note: See TracChangeset for help on using the changeset viewer.