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

Almost complete design
with Test and test platform

Location:
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit
Files:
1 deleted
31 edited

Legend:

Unmodified
Added
Removed
  • 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");
Note: See TracChangeset for help on using the changeset viewer.